Ë
    òT•jw  ã                   ó"  — 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g d¢ZdZej                  j                  d«      rdZn ej                  «       Z G d„ de«      Ze j                  d„ «       Zd	„ Zdd
„Z	 	 dd„Zd„ Zdd„Zedk(  r e«        yy)é    N)ÚZipAppErrorÚcreate_archiveÚget_interpreterz8# -*- coding: utf-8 -*-
import {module}
{module}.{fn}()
Úwinúutf-8c                   ó   — e Zd Zy)r   N)Ú__name__Ú
__module__Ú__qualname__© ó    ú/usr/lib/python3.12/zipapp.pyr   r   !   s   „ Ør   r   c              #   ó    K  — t        | t        t        j                  f«      rt	        | |«      5 }|–— d d d «       y | –— y # 1 sw Y   y xY w­w©N)Ú
isinstanceÚstrÚosÚPathLikeÚopen)ÚarchiveÚmodeÚfs      r   Ú_maybe_openr   %   sJ   è ø€ ä�'œC¤§¡Ð-Ô.Ü�'˜4Ó ð 	 AØŠG÷	ð 	ð ‹÷	ð 	üs   ‚-A¯A´AÁAÁAc                 ób   — |r-d|j                  t        «      z   dz   }| j                  |«       yy)zWrite a shebang line.ó   #!ó   
N)ÚencodeÚshebang_encodingÚwrite)r   ÚinterpreterÚshebangs      r   Ú_write_file_prefixr"   .   s1   € áØ˜+×,Ñ,Ô-=Ó>Ñ>ÀÑFˆØ	�‰�Õð r   c                 óî  — t        | d«      5 }|j                  d«      }|dk(  rd}|j                  «        t        |d«      5 }t        ||«       |j	                  |«       t        j                  ||«       ddd«       ddd«       |rVt        |t        «      rEt        j                  |t        j                  |«      j                  t        j                  z  «       yyy# 1 sw Y   ŒjxY w# 1 sw Y   ŒnxY w)z8Copy an application archive, modifying the shebang line.Úrbé   r   r   ÚwbN)r   ÚreadÚreadliner"   r   ÚshutilÚcopyfileobjr   r   r   ÚchmodÚstatÚst_modeÚS_IEXEC)r   Únew_archiver    ÚsrcÚfirst_2Údsts         r   Ú_copy_archiver3   5   sÌ   € ä	�W˜dÓ	#ð ) sð —(‘(˜1“+ˆØ�eÒàˆGØ�L‰LŒNä˜ dÓ+ð 	)¨sÜ˜s KÔ0ð �I‰I�gÔÜ×Ñ˜s CÔ(÷	)÷)ñ" ”z +¬sÔ3Ü
�‰�œbŸg™g kÓ2×:Ñ:¼T¿\¹\ÑIÕJð 4€{÷	)ð 	)ú÷)ð )ús#   �5C+Á4CÁ6C+ÃC(	Ã$C+Ã+C4c                 óH  — d}t        | d«      rt        | d«      rd}n't        j                  | «      } | j                  «       rd}|rt	        | ||«       y| j                  «       st        d«      ‚| dz  j                  «       }|r|rt        d«      ‚|s|st        d	«      ‚d}|r…|j                  d
«      \  }	}
}t        d„ |	j                  d«      D «       «      }t        d„ |j                  d«      D «       «      }|
d
k(  r|r|st        d|z   «      ‚t        j                  |	|¬«      }|€| j                  d«      }n!t        |d«      st        j                  |«      }t        |d«      5 }t        ||«       |rt        j                   nt        j"                  }t        j$                  |d|¬«      5 }t'        | j)                  d«      «      D ]>  }|j+                  | «      }|�	 ||«      sŒ|j-                  ||j/                  «       «       Œ@ |r!|j1                  d|j3                  d«      «       ddd«       ddd«       |rHt        |d«      s;|j5                  |j7                  «       j8                  t6        j:                  z  «       yyy# 1 sw Y   Œ\xY w# 1 sw Y   Œ`xY w)ab  Create an application archive from SOURCE.

    The SOURCE can be the name of a directory, or a filename or a file-like
    object referring to an existing archive.

    The content of SOURCE is packed into an application archive in TARGET,
    which can be a filename or a file-like object.  If SOURCE is a directory,
    TARGET can be omitted and will default to the name of SOURCE with .pyz
    appended.

    The created application archive will have a shebang line specifying
    that it should run with INTERPRETER (there will be no shebang line if
    INTERPRETER is None), and a __main__.py which runs MAIN (if MAIN is
    not specified, an existing __main__.py will be used).  It is an error
    to specify MAIN for anything other than a directory source with no
    __main__.py, and it is an error to omit MAIN if the directory has no
    __main__.py.
    Fr'   r(   TNzSource does not existz__main__.pyz8Cannot specify entry point if the source has __main__.pyzArchive has no entry pointú:c              3   ó<   K  — | ]  }|j                  «       –— Œ y ­wr   ©Úisidentifier©Ú.0Úparts     r   ú	<genexpr>z!create_archive.<locals>.<genexpr>{   s   è ø€ ÒD¨T�T×&Ñ&×(ÑDùó   ‚ú.c              3   ó<   K  — | ]  }|j                  «       –— Œ y ­wr   r7   r9   s     r   r<   z!create_archive.<locals>.<genexpr>|   s   è ø€ ÒB¨D�D×%Ñ%×'ÑBùr=   zInvalid entry point: )ÚmoduleÚfnz.pyzr   r&   Úw)ÚcompressionÚ*r   )ÚhasattrÚpathlibÚPathÚis_filer3   Úexistsr   Ú	partitionÚallÚsplitÚMAIN_TEMPLATEÚformatÚwith_suffixr   r"   ÚzipfileÚZIP_DEFLATEDÚ
ZIP_STOREDÚZipFileÚsortedÚrglobÚrelative_tor   Úas_posixÚwritestrr   r+   r,   r-   r.   )ÚsourceÚtargetr    ÚmainÚfilterÚ
compressedÚsource_is_fileÚhas_mainÚmain_pyÚmodÚseprA   Úmod_okÚfn_okÚfdrC   ÚzÚchildÚarcnames                      r   r   r   L   s`  € ð* €NÜˆv�vÔ¤7¨6°:Ô#>Ø‰ä—‘˜fÓ%ˆØ�>‰>ÔØ!ˆNáÜ�f˜f kÔ2Øð �=‰=Œ?ÜÐ1Ó2Ð2Ø˜Ñ&×/Ñ/Ó1€HÙ‘ÜØFóHð 	Há‘HÜÐ6Ó7Ð7à€GÙà—~‘~ cÓ*‰ˆˆS�"ÜÑD°S·Y±Y¸s³^ÔDÓDˆÜÑB°B·H±H¸S³MÔBÓBˆØ�s’
™v©%ÜÐ5¸Ñ<Ó=Ð=Ü×&Ñ&¨c°bÐ&Ó9ˆà€~Ø×#Ñ# FÓ+‰Ü�V˜WÔ%Ü—‘˜fÓ%ˆä	�V˜TÓ	"ð 
C bÜ˜2˜{Ô+Ù/9”w×+Ò+Ü×)Ñ)ð 	ä�_‰_˜R °+Ô>ð 	CÀ!Ü §¡¨SÓ 1Ó2ò 7�Ø×+Ñ+¨FÓ3�Ø�>¡V¨G¥_Ø—G‘G˜E 7×#3Ñ#3Ó#5Õ6ð7ñ Ø—
‘
˜=¨'¯.©.¸Ó*AÔB÷	C÷	
Cñ œ7 6¨7Ô3Ø�‰�V—[‘[“]×*Ñ*¬T¯\©\Ñ9Õ:ð 4€{÷	Cð 	Cú÷	
Cð 
Cús,   Å+AJÆ29JÇ,AJÈ1JÊJ	ÊJÊJ!c                 óä   — t        | d«      5 }|j                  d«      dk(  r:|j                  «       j                  «       j	                  t
        «      cd d d «       S 	 d d d «       y # 1 sw Y   y xY w)Nr$   r%   r   )r   r'   r(   ÚstripÚdecoder   )r   r   s     r   r   r   –   sd   € Ü	�W˜dÓ	#ð A qØ�6‰6�!‹9˜ÒØ—:‘:“<×%Ñ%Ó'×.Ñ.Ô/?Ó@÷Añ AØ÷A÷ Añ Aús   �AA&Á&A/c                 óB  — ddl }|j                  «       }|j                  dddd¬«       |j                  dddd	¬«       |j                  d
ddd¬«       |j                  dddd¬«       |j                  dddd¬«       |j                  dd¬«       |j                  | «      } | j                  r|t
        j                  j                  | j                  «      st        d«      ‚t        | j                  «      }t        dj                  |xs d«      «       t        j                  d«       t
        j                  j                  | j                  «      r‹| j                  �]t
        j                  j!                  | j                  «      r?t
        j                  j#                  | j                  | j                  «      rt        d«      ‚| j$                  rt        d«      ‚t'        | j                  | j                  | j(                  | j$                  | j*                  ¬«       y)zÞRun the zipapp command line interface.

    The ARGS parameter lets you specify the argument list directly.
    Omitting ARGS (or setting it to None) works as for argparse, using
    sys.argv[1:] as the argument list.
    r   Nz--outputz-ozAThe name of the output archive. Required if SOURCE is an archive.)ÚdefaultÚhelpz--pythonz-pzEThe name of the Python interpreter to use (default: no shebang line).z--mainz-mzLThe main function of the application (default: use an existing __main__.py).z
--compressz-cÚ
store_truezQCompress files with the deflate method. Files are stored uncompressed by default.)Úactionrn   z--infoFz)Display the interpreter from the archive.)rm   rp   rn   rY   z'Source directory (or existing archive).)rn   z%Can only get info for an archive filezInterpreter: {}z<none>z-In-place editing of archives is not supportedz,Cannot change the main function when copying)r    r[   r]   )ÚargparseÚArgumentParserÚadd_argumentÚ
parse_argsÚinfor   ÚpathÚisfilerY   Ú
SystemExitr   ÚprintrN   ÚsysÚexitÚoutputrI   Úsamefiler[   r   ÚpythonÚcompress)Úargsrq   Úparserr    s       r   r[   r[   œ   sÊ  € ó à×$Ñ$Ó&€FØ
×Ñ˜
 D°$ð5ð ô 6ð ×Ñ˜
 D°$ð/ð ô 0ð ×Ñ˜ $°ð;ð ô <ð ×Ñ˜ d°<ð=ð ô >ð ×Ñ˜¨%¸Ø<ð ô >à
×Ñ˜Ø:ð ô <ð ×Ñ˜TÓ"€Dð ‡y‚yÜ�w‰w�~‰~˜dŸk™kÔ*ÜÐDÓEÐEÜ% d§k¡kÓ2ˆÜÐ×&Ñ& {Ò'>°hÓ?Ô@Ü�‰�Œä	‡w�w‡~�~�d—k‘kÔ"Ø�;‰;Ð¤2§7¡7§>¡>°$·+±+Ô#>Ü#%§7¡7×#3Ñ#3°D·K±KÀÇÁÔ#MÜÐLÓMÐMØ�9Š9ÜÐKÓLÐLä�4—;‘; §¡Ø#Ÿ{™{°·±Ø"Ÿm™mö-r   Ú__main__r   )NNNNF)Ú
contextlibr   rF   r)   r,   rz   rP   Ú__all__rM   ÚplatformÚ
startswithr   ÚgetfilesystemencodingÚ
ValueErrorr   Úcontextmanagerr   r"   r3   r   r   r[   r	   r   r   r   ú<module>rŠ      s³   ðÛ Û 	Û Û Û Û 
Û â
>€ð€ð ‡<�<×Ñ˜5Ô!ØÑà0�s×0Ñ0Ó2Ðô	�*ô 	ð ×Ññó ðòóKð. @DØ+0óG;òTAó.-ðb ˆzÒÙ…Fð r   