ó
    µ'Ôi¼  ã                   óÞ   • S r SSKrSSKrSSKrSSKrSSKrSSKrSSKJr  SSK	J
r
  / SQr " S S\
5      rS	 r\S4 SS jjr\4SS jjr\4SS jjr\4S jrS rS r\4S
\4S jjr\\\4rg)z/Utilities for extracting common archive formatsé    Né   )Úensure_directory)ÚDistutilsError)Úunpack_archiveÚunpack_zipfileÚunpack_tarfileÚdefault_filterÚUnrecognizedFormatÚextraction_driversÚunpack_directoryc                   ó   • \ rS rSrSrSrg)r
   é   z#Couldn't recognize the archive type© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú__static_attributes__r   ó    ÚV/var/www/surfInsights/venv3-11/lib/python3.13/site-packages/setuptools/archive_util.pyr
   r
      s   † Ü-r   r
   c                 ó   • U$ )z@The default progress/filter callback; returns True for all filesr   )ÚsrcÚdsts     r   r	   r	      s   € à€Jr   Úreturnc                 ó€   • U=(       d    [          H  n U" XU5          g   [        SU  35      e! [         a     M,  f = f)a]  Unpack `filename` to `extract_dir`, or raise ``UnrecognizedFormat``

`progress_filter` is a function taking two arguments: a source path
internal to the archive ('/'-separated), and a filesystem path where it
will be extracted.  The callback must return the desired extract path
(which may be the same as the one passed in), or else ``None`` to skip
that file or directory.  The callback can thus be used to report on the
progress of the extraction, as well as to filter the items extracted or
alter their extraction paths.

`drivers`, if supplied, must be a non-empty sequence of functions with the
same signature as this function (minus the `drivers` argument), that raise
``UnrecognizedFormat`` if they do not support extracting the designated
archive type.  The `drivers` are tried in sequence until one is found that
does not raise an error, or until all are exhausted (in which case
``UnrecognizedFormat`` is raised).  If you do not supply a sequence of
drivers, the module's ``extraction_drivers`` constant will be used, which
means that ``unpack_zipfile`` and ``unpack_tarfile`` will be tried, in that
order.
NzNot a recognized archive type: )r   r
   )ÚfilenameÚextract_dirÚprogress_filterÚdriversÚdrivers        r   r   r   "   sT   € ð. ×/Ô/Ò/ˆð	Ù�8¨/Ô:ñ ñ 0ô !Ð#BÀ8À*Ð!MÓNÐNøô "ó 	Úð	ús   ”	/¯
=¼=c                 ó‚  • [         R                  R                  U 5      (       d  [        U  S35      eU SU40n[         R                  " U 5       Hí  u  pEnX4   u  pxU HI  n	Xy-   S-   [         R                  R                  X‰5      4U[         R                  R                  XI5      '   MK     U HŒ  n
[         R                  R                  XŠ5      nU" Xz-   U5      nU(       d  M6  [        U5        [         R                  R                  XJ5      n
[        R                  " X«5        [        R                  " X«5        MŽ     Mï     g)z"Unpack" a directory, using the same interface as for archives

Raises ``UnrecognizedFormat`` if `filename` is not a directory
z is not a directoryÚ Ú/N)
ÚosÚpathÚisdirr
   ÚwalkÚjoinr   ÚshutilÚcopyfileÚcopystat)r   r   r   ÚpathsÚbaseÚdirsÚfilesr   r   ÚdÚfÚtargets               r   r   r   D   sû   € ô
 �7‰7�=‰=˜×"Ñ"Ü  H :Ð-@Ð!AÓBÐBð 	�2�{Ð#ð€Eô  ŸWšW XÖ.Ñˆ�EØ‘;‰ˆÛˆAØ+.©7°S©=¼"¿'¹'¿,¹,ÀsÓ:NÐ+NˆE”"—'‘'—,‘,˜tÓ'Ó(ñ ãˆAÜ—W‘W—\‘\ #Ó)ˆFÙ$ S¡W¨fÓ5ˆFÞáÜ˜VÔ$Ü—‘—‘˜TÓ%ˆAÜ�OŠO˜AÔ&Ü�OŠO˜AÖ&ó ò	 /r   c                 óÎ   • [         R                  " U 5      (       d  [        U  S35      e[         R                  " U 5       n[	        X1U5        SSS5        g! , (       d  f       g= f)zâUnpack zip `filename` to `extract_dir`

Raises ``UnrecognizedFormat`` if `filename` is not a zipfile (as determined
by ``zipfile.is_zipfile()``).  See ``unpack_archive()`` for an explanation
of the `progress_filter` argument.
z is not a zip fileN)ÚzipfileÚ
is_zipfiler
   ÚZipFileÚ_unpack_zipfile_obj)r   r   r   Úzs       r   r   r   _   sL   € ô ×Ò˜h×'Ñ'Ü  H :Ð-?Ð!@ÓAÐAä	�Š˜Ô	" aÜ˜A¨OÔ<÷ 
#×	"Ö	"ús   Á AÁ
A$c                 ó†  • U R                  5        GH  nUR                  nUR                  S5      (       d  SUR                  S5      ;   a  M=  [        R
                  R                  " U/UR                  S5      Q76 nU" XE5      nU(       d  M~  UR                  S5      (       a  [        U5        OL[        U5        U R                  UR                  5      n[        US5       nUR                  U5        SSS5        UR                  S-	  nU(       d  GM  [        R                  " XX5        GM     g! , (       d  f       NC= f)z«Internal/private API used by other parts of setuptools.
Similar to ``unpack_zipfile``, but receives an already opened :obj:`zipfile.ZipFile`
object instead of a filename.
r$   ú..ÚwbNé   )Úinfolistr   Ú
startswithÚsplitr%   r&   r)   Úendswithr   ÚreadÚopenÚwriteÚexternal_attrÚchmod)	Úzipfile_objr   r   ÚinfoÚnamer3   Údatar2   Úunix_attributess	            r   r8   r8   n   sí   € ð
 ×$Ñ$×&ˆØ�}‰}ˆð �?‰?˜3×Ñ 4¨4¯:©:°c«?Ó#:Ùä—‘—’˜kÐ<¨D¯J©J°s«OÒ<ˆÙ  Ó.ˆÞÙØ�=‰=˜×Ñä˜VÕ$ô ˜VÔ$Ø×#Ñ# D§M¡MÓ2ˆDÜ�f˜dÔ# qØ—‘˜”÷ $à×,Ñ,°Ñ2ˆß‰?Ü�HŠH�V×-ò- '÷$ $Õ#ús   Ã#D2Ä2
E 	c                 óF  • UbÙ  UR                  5       (       d  UR                  5       (       a¯  UR                  nUR                  5       (       aL  [        R                  " UR
                  5      n[        R                  " X25      n[        R                  " U5      nU R                  U5      nUb.  UR                  5       (       a  M˜  UR                  5       (       a  M¯  USL=(       a'    UR                  5       =(       d    UR                  5       nU(       a  U$ [        S5      e)z;Resolve any links and extract link targets as normal files.NzGot unknown file type)ÚislnkÚissymÚlinknameÚ	posixpathÚdirnamerI   r)   ÚnormpathÚ
_getmemberÚisfiler'   ÚLookupError)Útar_objÚtar_member_objÚlinkpathr.   Úis_file_or_dirs        r   Ú_resolve_tar_file_or_dirrZ   Œ   sí   € à
Ñ
$Ø×Ñ×Ñ .×"6Ñ"6×"8Ñ"8à!×*Ñ*ˆØ×Ñ×!Ñ!Ü×$Ò$ ^×%8Ñ%8Ó9ˆDÜ —~’~ dÓ5ˆHÜ ×)Ò)¨(Ó3ˆHØ ×+Ñ+¨HÓ5ˆð Ñ
$Ø×Ñ×Ó .×"6Ñ"6×"8Ó"8ð $¨4Ð/÷ Ø×ÑÓ×9 >×#7Ñ#7Ó#9ð ö ØÐä
Ð-Ó
.Ð.r   c              #   ó  #   • S U l         [        R                  " U 5         U  H·  nUR                  nUR	                  S5      (       d  SUR                  S5      ;   a  M<  [        R                  R                  " U/UR                  S5      Q76 n [        X5      nU" XE5      nU(       d  M‰  UR                  [        R                  5      (       a  USS nX64v •  M¹     SSS5        g! [         a     MÑ  f = f! , (       d  f       g= f7f)z1Emit member-destination pairs from a tar archive.c                  ó   • g )Nr   )Úargss    r   Ú<lambda>Ú _iter_open_tar.<locals>.<lambda>¤   s   €  $r   r$   r;   Néÿÿÿÿ)ÚchownÚ
contextlibÚclosingrI   r?   r@   r%   r&   r)   rZ   rU   rA   Úsep)rV   r   r   ÚmemberrI   Ú
prelim_dstÚ	final_dsts          r   Ú_iter_open_tarrh   ¡   sÝ   é € ñ '€G„Mä	×	Ò	˜GÕ	$ÛˆFØ—;‘;ˆDà�‰˜s×#Ñ# t¨t¯z©z¸#«Ó'>ÙäŸ™Ÿš kÐD°D·J±J¸s³OÒDˆJðÜ1°'ÓB�ñ (¨Ó9ˆIÞÙà×!Ñ!¤"§&¡&×)Ñ)Ø% c r˜N�	àÐ#Ô#ñ) ÷ 
%Ð	$øô ó Úðú÷ 
%Õ	$üsB   ‚D
¡A/C9ÂC(ÂAC9Ã	D
Ã(
C6Ã2C9Ã5C6Ã6C9Ã9
DÄD
c                 ó  •  [         R                  " U 5      n[	        UUU5       H  u  pV UR                  XV5        M     g! [         R                   a  n[        U  S35      UeSnAff = f! [         R                   a     M^  f = f)zëUnpack tar/tar.gz/tar.bz2 `filename` to `extract_dir`

Raises ``UnrecognizedFormat`` if `filename` is not a tarfile (as determined
by ``tarfile.open()``).  See ``unpack_archive()`` for an explanation
of the `progress_filter` argument.
z- is not a compressed or uncompressed tar fileNT)ÚtarfilerC   ÚTarErrorr
   rh   Ú_extract_memberÚExtractError)r   r   r   ÚtarobjÚere   rg   s          r   r   r   ¾   s–   € ðÜ—’˜hÓ'ˆô ,ØØØöÑˆð
	à×"Ñ" 6Ö5ñð øô# ×Ñó Ü ØˆjÐEÐFó
àð	ûðûô ×#Ñ#ó 	âð	ús(   ‚A «A,ÁA)ÁA$Á$A)Á,BÂB)r   N)r   rb   r%   rP   r*   rj   r5   Ú_pathr   Údistutils.errorsr   Ú__all__r
   r	   r   r   r   r8   rZ   rh   Úboolr   r   r   r   r   Ú<module>rt      sœ   ðÙ 5ã Û 	Û Û Û Û å #å +ò€ô.˜ô .òð ,:À4ðOà	õOðD =Kö 'ð6 ;Iö =ð CQô .ò</ò*$ð: ;Iñ ÈTõ ð: & ~°~ÐEÑ r   