+
     Bi                        ^ 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t^ RI	t	^ RI
HtHtHt ^RIHtHt ]]P"                  ]3,          t]tR t]RR R ll4       tR R lt]P0                  R	 R
 l4       t]P4                  R R l4       t]P4                  R R l4       tR tR R lt]P<                  RR] P>                  /R ll4       t R t!R R lt"]P0                  R 4       t#]#P5                  ]PH                  4      ]P<                  R 4       4       t]P<                  R R l4       t%]P<                  R 4       t&R t'R# )    N)UnionOptionalcast)ResourceReaderTraversablec                f   a a \        4       o\        P                  ! S 4      SS3V V3R ll4       pV# )a  
Replace 'package' parameter as 'anchor' and warn about the change.

Other errors should fall through.

>>> files('a', 'b')
Traceback (most recent call last):
TypeError: files() takes from 0 to 1 positional arguments but 2 were given

Remove this compatibility in Python 3.14.
c                    < VSJd4   V SJd	   S! W4      # \         P                  ! R \        ^R7       S! V4      # V SJ d   S! 4       # S! V 4      # )z/First parameter to files is renamed to 'anchor')
stacklevel)warningswarnDeprecationWarning)anchorpackagefunc	undefineds   &&2/usr/lib/python3.14/importlib/resources/_common.pywrapper"package_to_anchor.<locals>.wrapper!   sX    )#Y&F,,MMA"
 = y 6MF|    )object	functoolswraps)r   r   r   s   f @r   package_to_anchorr      s3     I__T )   Nr   c                F    V ^8  d   QhR\         \        ,          R\        /# )   r   return)r   Anchorr   )formats   "r   __annotate__r   4   s     ) )(6" )k )r   c                *    \        \        V 4      4      # )z+
Get a Traversable resource for an anchor.
)from_packageresolve)r   s   &r   filesr#   3   s    
 ((r   c                Z    V ^8  d   QhR\         P                  R\        \        ,          /# )r   r   r   )types
ModuleTyper   r   )r   s   "r   r   r   ;   s%      !1!1 h~6N r   c                x    V P                   p\        VP                  RR4      pVf   R# V! VP                  4      # )z7
Return the package's loader if it's a ResourceReader.
get_resource_readerN)__spec__getattrloadername)r   specreaders   &  r   r(   r(   ;   s9     DT[["7>F~$))r   c                Z    V ^8  d   QhR\         \        ,          R\        P                  /# r   candr   )r   r   r%   r&   )r   s   "r   r   r   L   s%     ( ((6" (u'7'7 (r   c                 6    \        \        P                  V 4      # N)r   r%   r&   r1   s   &r   r"   r"   K   s      $''r   c                D    V ^8  d   QhR\         R\        P                  /# r0   )strr%   r&   )r   s   "r   r   r   Q   s      ) )C )E$$ )r   c                 .    \         P                  ! V 4      # r3   )	importlibimport_moduler4   s   &r   _r:   P   s    ""4((r   c                <    V ^8  d   QhRRR\         P                  /# )r   r1   Nr   r%   r&   )r   s   "r   r   r   V   s      : :D :U%% :r   c                 J    \        \        4       P                  R ,          4      # )__name__)r"   _infer_caller	f_globalsr4   s   &r   r:   r:   U   s    =?,,Z899r   c                    a V3R lp R p\         P                  ! 4       o\        P                  ! V S4      p\        P                  ! W4      p\	        V4      P
                  # )zK
Walk the stack and find the frame of the first caller not in this module.
c                 D   < V P                   S^ ,          P                   8H  # )r   )filename)
frame_infostacks   &r   is_this_file#_infer_caller.<locals>.is_this_file_   s    ""eAh&7&777r   c                      V P                   R 8H  # )r   )function)rD   s   &r   
is_wrapper!_infer_caller.<locals>.is_wrapperb   s    ""i//r   )inspectrE   	itertoolsfilterfalsenextframe)rF   rJ   not_this_filecallersrE   s       @r   r?   r?   Z   sL    
80 MMOE)),>M##J>G=r   c                8    V ^8  d   QhR\         P                  /# )r   r   r<   )r   s   "r   r   r   l   s     
 
%** 
r   c                    ^RI Hp V! V 4      pVP                  P                  VP                  4      pVP                  4       # )z5
Return a Traversable object for the given package.

)	wrap_spec)	_adaptersrU   r+   r(   r,   r#   )r   rU   r-   r.   s   &   r   r!   r!   l   s5     %WD[[,,TYY7F<<>r   
_os_removec             #     "   \         P                  ! VR 7      w  r4  \        P                  ! W0! 4       4       \        P                  ! V4       ? \
        P                  ! V4      x   V! V4       R#   \        P                  ! T4       i ; i  \         d     R# i ; i   T! T4       i   \         d     i i ; i; i5i)suffixN)tempfilemkstemposwriteclosepathlibPathFileNotFoundError)r.   rZ   rW   fdraw_paths   &&$  r   	_tempfilere   y   s      ##62LB	HHR"HHRLll8$$	x  HHRL ! 			x   		so   B?A3 /B  )B 1B?3BB  BB?BB? B<"B+*B<+B96B<8B99B<<B?c                 D    \        V P                  V P                  R 7      # )rY   )re   
read_bytesr,   paths   &r   
_temp_filerj      s    T__TYY77r   c                0    V ^8  d   QhR\         R\        /# )r   ri   r   )r   bool)r   s   "r   r   r      s     
 
+ 
$ 
r   c                    \         P                  ! \        4      ;_uu_ 4        V P                  4       uuRRR4       #   + '       g   i     R# ; i)z
Some Traversables implement ``is_dir()`` to raise an
exception (i.e. ``FileNotFoundError``) when the
directory doesn't exist. This function wraps that call
to always return a boolean and only return True
if there's a dir and it exists.
NF)
contextlibsuppressrb   is_dirrh   s   &r   _is_present_dirrq      s1     
		.	/	/{{} 
0	/	/	/s	   >A	c                P    \        V 4      '       d   \        V 4      # \        V 4      # )zi
Given a Traversable object, return that object as a
path on the local file system in a context manager.
)rq   	_temp_dirrj   rh   s   &r   as_filert      s"     .d339T?ID9IIr   c              #     "   V x  R# 5i)z/
Degenerate behavior for pathlib.Path objects.
N rh   s   &r   r:   r:      s      Js   	c                8    V ^8  d   QhR\         P                  /# )r   dir)r[   TemporaryDirectory)r   s   "r   r   r      s     # #H// #r   c              #     "   V ;_uu_ 4       p\         P                  ! V4      x  RRR4       R#   + '       g   i     R# ; i5i)z>
Wrap tempfile.TemporaryDirectory to return a pathlib object.
N)r`   ra   )rx   results   & r   
_temp_pathr|      s(     
 
ll6"" 
s   A0
AA		Ac              #     "   V P                  4       '       g   Q h\        \        P                  ! 4       4      ;_uu_ 4       p\	        W4      x  RRR4       R#   + '       g   i     R# ; i5i)zh
Given a traversable dir, recursively replicate the whole tree
to the file system in a context manager.
N)rp   r|   r[   ry   _write_contents)ri   temp_dirs   & r   rs   rs      sF      ;;===	H//1	2	2hh-- 
3	2	2	2s   ?A-A
A-A*	$	A-c                    V P                  VP                  4      pVP                  4       '       d5   VP                  4        VP	                  4        F  p\        W#4       K  	  V# VP                  VP                  4       4       V# r3   )joinpathr,   rp   mkdiriterdirr~   write_bytesrg   )targetsourcechilditems   &&  r   r~   r~      sf    OOFKK(E}}NN$DE( % L 	&++-.Lr   r3   ) )(r]   r`   r[   r   rn   r%   r8   rL   r   rM   typingr   r   r   abcr   r   r&   r6   Packager   r   r#   r(   singledispatchr"   registerr:   r?   r!   contextmanagerremovere   rj   rq   rt   ra   r|   rs   r~   rv   r   r   <module>r      su   	          ( ( ,
  #%
&	@ ) )  ( ( 	) ) 	: :$
  yy 48
 J J 	',,    # # . .r   