+
     hD*  c                   s8   ^ RI Ht ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^RI
Ht ^RIHtHtHt ]P                   ! ]4      tRs ! R R]4      t ! R R]4      t ! R	 R
]4      t ! R R]4      t ! R R]4      t ! R R]4      t]! R4      ]]	P8                  ]/t  ^ RIt]]]PD                  &   ]]]PF                  &   ]]]PH                  &   AR t&/ t'R t(]PR                  ! ]*! R4      4      t+R t,R#   ]  d    ^ RI!t L`i ; i  ] ]%3 d     LAi ; i)i    )unicode_literalsN)DistlibException)cached_propertyget_cache_baseCachec                   sB   a a ] tR t^t oRV 3R lltR tR tRtVtV ;t	# )ResourceCachec                s   < Vf2   \         P                  P                  \        4       \	        R4      4      p\
        \        V `  V4       R # )Nzresource-cache)ospathjoinr   strsuperr   __init__)selfbase	__class__s   &&B/usr/lib/python3.14/site-packages/pip/_vendor/distlib/resources.pyr   ZResourceCache.__init__   s4    <77<< 0#6F2GHDmT+D1    c                s    R# )z
Is the cache stale for the given resource?

:param resource: The :class:`Resource` being cached.
:param path: The path of the resource in the cache.
:return: True if the cache is stale.
T r   resourcer      &&&r   is_staleZResourceCache.is_stale"   s     r   c                s   VP                   P                  V4      w  r#Vf   TpV# \        P                  P	                  V P
                  V P                  V4      V4      p\        P                  P                  V4      p\        P                  P                  V4      '       g   \        P                  ! V4       \        P                  P                  V4      '       g   RpMV P                  W4      pV'       d;   \        VR4      ;_uu_ 4       pVP                  VP                  4       RRR4       V# V#   + '       g   i     T# ; i)z
Get a resource into the cache,

:param resource: A :class:`Resource` instance.
:return: The pathname of the resource in the cache.
NTZwb)finderget_cache_infor   r   r   r   Zprefix_to_dirdirnameisdirZmakedirsexistsr   openZwritebytes)r   r   prefixr   resultr   Zstalef   &&      r   getZResourceCache.get-   s      55h?>F  WW\\$))T-?-?-GNFggoof-G77==))G$77>>&))h5&$''1GGHNN+ (v ('s   D77E	r   N)
__name__
__module____qualname____firstlineno__r   r   r!   __static_attributes____classdictcell____classcell__r   __classdict__   @@r   r   r      s     2	 r   r   c                   s&   a  ] tR t^Gt o R tRtV tR# )ResourceBasec                s    Wn         W n        R # r"   r   name)r   r   r/   r   r   r   ZResourceBase.__init__H   s    	r   r.   N)r#   r$   r%   r&   r   r'   r(   r+      @r   r-   r-   G   s      r   r-   c                   s^   a  ] tR t^Mt o RtRtR t]R 4       t]R 4       t	]R 4       t
RtV tR# )	Resourcez
A class representing an in-package resource, such as a data file. This is
not normally instantiated by user code, but rather by a
:class:`ResourceFinder` which manages the resource.
Fc                8    V P                   P                  V 4      # )zr
Get the resource as a stream.

This is not a property to make it obvious that it returns a new stream
each time.
)r   
get_streamr      &r   	as_streamZResource.as_streamU   s     {{%%d++r   c                sP    \         f   \        4       s \         P                  V 4      # r"   )cacher   r!   r5   r6   r   	file_pathZResource.file_path^   s     =!OEyyr   c                r3   r"   )r   	get_bytesr5   r6   r   r   ZResource.bytese   s    {{$$T**r   c                r3   r"   )r   get_sizer5   r6   r   sizeZResource.sizei   s    {{##D))r   r   N)r#   r$   r%   r&   __doc__is_containerr7   r   r9   r   r<   r'   r(   r0   r1   r   r2   r2   M   sR     
 L,   + + * *r   r2   c                   s4   a  ] tR t^nt o Rt]R 4       tRtV tR# )ResourceContainerTc                r3   r"   )r   get_resourcesr5   r6   r   	resourcesZResourceContainer.resourcesq   s    {{((..r   r   N)	r#   r$   r%   r&   r>   r   rA   r'   r(   r0   r1   r   r?   r?   n   s     L/ /r   r?   c                   s   a  ] tR t^vt o Rt]P                  P                  R4      '       d   RtMRtR t	R t
R tR tR tR tR	 tR
 tR tR tR t]! ]P,                  P.                  4      tR tRtV tR# )ResourceFinderz,
Resource finder for file system resources.
Zjavac                s    Wn         \        VR R4      V n        \        P                  P                  \        VRR4      4      V n        R# )
__loader__N__file__ )modulegetattrloaderr   r   r   r   )r   rF      &&r   r   ZResourceFinder.__init__   s4    flD9GGOOGFJ$CD	r   c                @    \         P                  P                  V4      # r"   )r   r   Zrealpathr   r   rI   r   _adjust_pathZResourceFinder._adjust_path   s    ww%%r   c                s    \        V\        4      '       d   R pMRpVP                  V4      pVP                  ^ V P                  4       \
        P                  P                  ! V!  pV P                  V4      # )s   //)	Z
isinstancer   splitZinsertr   r   r   r   rL   )r   resource_namesepZpartsr   s   &&   r   
_make_pathZResourceFinder._make_path   s`     mU++CC##C(Q		"u%  ((r   c                rJ   r"   )r   r   r   rK   rI   r   _findZResourceFinder._find   s    ww~~d##r   c                s    R VP                   3# r"   )r   r   r   rI   r   r   ZResourceFinder.get_cache_info   s    X]]""r   c                s    V P                  V4      pV P                  V4      '       g   R pV# V P                  V4      '       d   \        W4      pM\	        W4      pW#n        V# r"   )rQ   rR   _is_directoryr?   r2   r   )r   rO   r   r      &&  r   findZResourceFinder.find   s\    }-zz$F  !!$''*4?!$6Kr   c                s.    \        VP                  R 4      # )rb)r   r   rS   rI   r   r4   ZResourceFinder.get_stream   s    HMM4((r   c                s    \        VP                  R 4      ;_uu_ 4       pVP                  4       uuRRR4       #   + '       g   i     R# ; i)rW   N)r   r   Zread)r   r   r      && r   r:   ZResourceFinder.get_bytes   s-    (--&&!668 '&&&s	   :A	c                sT    \         P                  P                  VP                  4      # r"   )r   r   ZgetsizerS   rI   r   r;   ZResourceFinder.get_size   s    wwx}}--r   c                s   a  V 3R  lp\        \        P                  ! VP                  4       Uu. uF  q2! V4      '       g   K  VNK  	  up4      # u upi )c                 s^   < V R 8g  ;'       d!    V P                  SP                  4      '       * # )Z__pycache__)Zendswithskipped_extensions)r   r   s   &r   allowedZ-ResourceFinder.get_resources.<locals>.allowed   s1    & 8 8JJt667,8 9r   )setr   Zlistdirr   )r   r   rZ   r   s   f&  r   r@   ZResourceFinder.get_resources   s>    	9 rzz(--8G8!GAJAA8GHHGs   AAc                s8    V P                  VP                  4      # r"   )rT   r   rS   rI   r   r>   ZResourceFinder.is_container   s    !!(--00r   c              #  s  "   V P                  V4      pVe   V.pV'       d   VP                  ^ 4      pVx  VP                  '       g   K1  VP                  pVP                   FZ  pV'       g   TpMRP                  WE.4      pV P                  V4      pVP                  '       d   VP                  V4       KV  Vx  K\  	  K  R # R # 5i)NrM   )rV   Zpopr>   r/   rA   r   Zappend)r   rO   r   ZtodoZrnamer/   Znew_nameZchildr    r   iteratorZResourceFinder.iterator   s     99]+:D88A;((($MME ( 2 2$'+H'*xx'>H $		( 3 --- KK."'K !3   s    C$CAC'!C)r   rH   rF   N).pyc.pyoz.class)r]   r^   )r#   r$   r%   r&   r=   sysZplatform
startswithrY   r   rL   rQ   rR   r   rV   r4   r:   r;   r@   r>   Zstaticmethodr   r   r   rT   r\   r'   r(   r0   r1   r   rB   rB   v   s      ||v&&7-E
&
)$#
).I1 !/M( (r   rB   c                   sf   a a ] tR t^t oRtV 3R ltR tR tR tR t	R t
R tR	 tR
 tRtVtV ;t# )ZipResourceFinderz.
Resource finder for resources in .zip files.
c                sd  < \         \        V `  V4       V P                  P                  p^\        V4      ,           V n        \        V P                  R4      '       d   V P                  P                  V n        M\        P                  V,          V n        \        V P                  4      V n        R# )   _filesN)r
   ra   r   rH   archivelen
prefix_lenZhasattrrc   	zipimportZ_zip_directory_cacheZsortedindex)r   rF   rd   r   s   && r   r   ZZipResourceFinder.__init__   sv    /7++%%c'l*4;;))++,,DK#88ADKDKK(
r   c                s    V# r"   r   rK   rI   r   rL   ZZipResourceFinder._adjust_path   s    r   c                s(   WP                   R  pWP                  9   d   RpMV'       d4   VR,          \        P                  8w  d   V\        P                  ,           p\        P                  ! V P
                  V4      p V P
                  V,          P                  V4      pV'       g-   \        P                  RWP                  P                  4       V# \        P                  RWP                  P                  4       V#   \         d    Rp Loi ; i)NTFz_find failed: %r %rz_find worked: %r %r)rf   rc   r   rP   bisectrh   r`   
IndexErrorloggerZdebugrH   r   )r   r   r   irU   r   rR   ZZipResourceFinder._find   s    OO$%;;FRBFF*bff}djj$/AA11$7 LL.kk6H6HI  LL.kk6H6HI  s   ?"D DDc                sr    V P                   P                  pVP                  ^\        V4      ,           R pW#3# )rb   N)rH   rd   r   re   )r   r   r   r   rU   r   r   Z ZipResourceFinder.get_cache_info   s2    $$}}QV_-.|r   c                sL    V P                   P                  VP                  4      # r"   )rH   Zget_datar   rS   rI   r   r:   ZZipResourceFinder.get_bytes   s    {{##HMM22r   c                sL    \         P                  ! V P                  V4      4      # r"   )ioZBytesIOr:   rS   rI   r   r4   ZZipResourceFinder.get_stream   s    zz$..233r   c                sh    VP                   V P                  R  pV P                  V,          ^,          # r"   )r   rf   rc   r   rX   r   r;   ZZipResourceFinder.get_size   s+    }}T__-.{{4 ##r   c                sR   VP                   V P                  R  pV'       d4   VR,          \        P                  8w  d   V\        P                  ,          p\	        V4      p\        4       p\        P                  ! V P                  V4      pV\	        V P                  4      8  d   V P                  V,          P                  V4      '       g    V# V P                  V,          VR  pVP                  VP                  \        P                  ^4      ^ ,          4       V^,          pK  V# )Nri   )r   rf   r   rP   re   r[   rj   rh   r`   ZaddrN   )r   r   r   Zplenr   rm   Zss   &&     r   r@   ZZipResourceFinder.get_resources  s    }}T__-.DH&BFFND4yMM$**d+#djj/!::a=++D11  

1de$AJJqwwrvvq)!,-FAr   c                sH   WP                   R  pV'       d4   VR,          \        P                  8w  d   V\        P                  ,          p\        P                  ! V P                  V4      p V P                  V,          P                  V4      pV#   \         d    Rp T# i ; i)NFri   )rf   r   rP   rj   rh   r`   rk   )r   r   rm   r   rU   r   rT   ZZipResourceFinder._is_directory  s    OO$%DH&BFFNDMM$**d+	ZZ]--d3F   	F	s   ,"B B! B!)rc   rh   rf   )r#   r$   r%   r&   r=   r   rL   rR   r   r:   r4   r;   r@   rT   r'   r(   r)   r*   r,   r   ra   ra      s<     	)$
34$	 	r   ra   c                 s*    V\         \        V 4      &   R # r"   )_finder_registrytype)rH   finder_makerrI   r   register_finderrr   2  s    %1T&\"r   c                s   V \         9   d   \         V ,          pV# V \        P                  9  d   \        V 4       \        P                  V ,          p\	        VRR4      pVf   \        R4      h\	        VRR4      p\        P                  \        V4      4      pVf   \        RV ,          4      hV! V4      pV\         V &   V# )z
Return a resource finder for a package.
:param package: The name of the package.
:return: A :class:`ResourceFinder` instance for the package.
Z__path__Nz8You cannot get a finder for a module, only for a packagerC   zUnable to locate finder for %r)	_finder_cacher_   ZmodulesZ
__import__rG   r   ro   r!   rp   )Zpackager   rF   r   rH   rq   s   &     r   r   r   9  s     -w' M #++%wW%vz40<" $8 9 9t4'++DL9"#Cg#MNNf%!'gMr   Z	__dummy__c                s2   Rp\         P                  ! V 4       \        P                  P	                  V 4      p\
        P	                  \        V4      4      pV'       d:   \        p\        P                  P                  V R4      Vn        W$n        V! V4      pV# )z
Return a resource finder for a path, which should represent a container.

:param path: The path.
:return: A :class:`ResourceFinder` instance for the path.
NrE   )pkgutilZget_importerr_   Zpath_importer_cacher!   ro   rp   _dummy_moduler   r   r   rD   rC   )r   r   rH   r   rF   s   &    r   finder_for_pathrv   U  ss     F$$((.F!!$v,/F'',,tR0"Mr   )-Z
__future__r    rj   rn   Zloggingr   rt   r_   Ztypesrg   rE   r   Zutilr   r   r   Z	getLoggerr#   rl   r8   r   Zobjectr-   r2   r?   rB   ra   rp   Zzipimporterro   Z_frozen_importlib_externalZ_fiZImportErrorZ_frozen_importlibZSourceFileLoaderZ
FileFinderZSourcelessFileLoaderZAttributeErrorrr   rs   r   Z
ModuleTyper	   ru   rv   r   r   r   <module>rw      sN   (  	  	  
    8 8			8	$ 	)E )X6 *| *B/ /W(V W(tK K^ 	J, 
	(0 .<S))*'5S^^$1?S--.
2 2   [!12]  ('( 	^$ 		s0   %C< ).D <D
D 	D

D 	DD