python (3.12.0)

(root)/
lib/
python3.12/
zipfile/
__pycache__/
__init__.cpython-312.pyc

͑e8GdZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZ	ddlZejZ
	ddlZ	ddlZgdZGddeZGddeZexZZdZd	Zd	ZdZd
ZdZdZd
ZdZdZ dZ!dZ"dZ#dZ$ejJe#Z&dZ'dZ(dZ)dZ*dZ+dZ,dZ-dZ.d
Z/dZ0dZ1dZ2ejJe1Z3dZ4dZ5dZ6dZ7dZ8dZ9dZ:dZ;d
Z<dZ=dZ>dZ?dZ@dZAdZBd ZCd!ZDd"ZEd#ZFdZGdZHd
ZId$ZJd%ZKd&ZLd'ZMd(ZNejJeMZOdZPdZQdZRdZSdZTdZUdZVdZWd
ZXdZYdZZdZ[d)Z\d*Z]ejJe\Z^d+Z_d,Z`ejJe_ZadZbdZcdZddZedZfdZgdZhdZid
ZjdZkd-Zlejd.Znd/Zod0Zpd1Zqd2Zrd3Zsd4ZtGd5d6euZvdawd7Zxd8ZyGd9d:ZzGd;d<Z{idd=dd>dd?dd?dd?dd?dd@ddAd
dBddCdd@ddDddEd#dFdGdHdIdJdKdLZ|dMZ}d^dNZ~dOZGdPdQZGdRdSZGdTdUejZGdVdWejZGdXdYZGdZd[eZdd\lmZmZdd]lmZy#e$rdZejZ
Y&wxYw#e$rdZY/wxYw#e$rdZY8wxYw)_zP
Read and write ZIP files.

XXX references to utf-8 need further investigation.
N)
BadZipFile
BadZipfileerror
ZIP_STOREDZIP_DEFLATED	ZIP_BZIP2ZIP_LZMA
is_zipfileZipInfoZipFile	PyZipFileLargeZipFilePathceZdZy)rN)__name__
__module____qualname__D/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/zipfile/__init__.pyrr'srrceZdZdZy)rzu
    Raised when writing a zipfile, the zipfile requires ZIP64 extensions
    and those extensions are disabled.
    N)rrr__doc__rrrrr+srri-.?s<4s4H2LHsPK	z<4s4B4HL2L5H2LsPK

 @iz<4s2B4HL2L2HsPKz<4sLQLsPKz
<4sQ2H2L4QsPKiPK<HHc^tj}d}g}dx}}|dzt|krN||||dz\}}|dz|z}	||vr||k7r|j||||	}d}|	}|dzt|krN|s|S|t|k7r|j||ddj	|S)NFrr$Tr)_EXTRA_FIELD_STRUCTunpacklenappendjoin)
extraxidsr5modifiedbufferstartixidxlenjs
          r_strip_extrarBs
 
'
'FH
FMEA
a%3u:
5QU+,	T
EDL$;Ez

eEA./EH
a%3u:
E


eEFm$88Frc>	t|ry	y#t$rYywxYw)NTF)_EndRecDataOSErrorfps r_check_zipfilerHs2
r?

s	cd}	t|drt|}|St|d5}t|}ddd|S#1swY|SxYw#t$rY|SwxYw)zQuickly see if a file is a ZIP file by checking the magic number.

    The filename argument may be a file or file-like object too.
    FreadrFrbN)hasattrrHopenrE)filenameresultrGs   rr
r
sw
F
8V$#x0FM	h%
,'+
,M	
,M
M
s2A
A
AA
A
A

A

	AAc
	|j|tz
d|jt}t	|tk7r|Stjt|\}}}}|tk7r|S|dk7s|dkDrtd|j|tz
tz
d|jt}t	|tk7r|Stjt|\
}}}	}
}}}
}}}|tk7r|S||t<||t<||t<|
|t <||t"<||t$<||t&<|S#t$r|cYSwxYw)zM
    Read the ZIP64 end-of-archive records and use that to update endrec
    r"rr!z3zipfiles that span multiple disks are not supported)seeksizeEndCentDir64LocatorrErJr6structr5structEndArchive64LocatorstringEndArchive64LocatorrsizeEndCentDir64structEndArchive64stringEndArchive64_ECD_SIGNATURE_ECD_DISK_NUMBER_ECD_DISK_START_ECD_ENTRIES_THIS_DISK_ECD_ENTRIES_TOTAL	_ECD_SIZE_ECD_OFFSET)fpinoffsetendrecdatasigdisknoreloffdisksszcreate_versionread_versiondisk_numdisk_dirdircount	dircount2dirsize	diroffsets                 r
_EndRecData64rqs^		&22A699,-D
4y++
!'/H$!OC
''

{eaiNOO	IIf..1AA1E99%&D
4y$$
	

($/0C^\8X)Wi
  
!F>'F&F?%-F!"!*FF9#F;ME
sD==E
Ec|jdd|j}	|jtd|j	}t|tk(rt|ddtk(rh|dddk(r`tjt|}t|}|jd|j|tz
t|t|St|dz
tz
d}|j|d|j	}|jt}|dk\r|||tz}t|tk7ryttjt|}|t}||tz|tz|z}|j||j||zt|||z|z
|Sy#t$rYywxYw)	zReturn data from the "End of Central Directory" record, or None.

    The data is a list of the nine items in the ZIP "End of central dir"
    record followed by a tenth item, the file seek offset of this record.rr"Nr$sri)rQtellsizeEndCentDirrErJr6stringEndArchiverSr5structEndArchivelistr7rqmaxrfind_ECD_COMMENT_SIZE)	r`filesizercrbmaxCommentStartr=recDatacommentSizecomments	         rrDrDs	IIaOyy{H
		>/1%99;DD	^#Qq	%%RS	[ /6F|	

c

h/0TN?F;;(g.?COIIoq!99;DJJ'(EzuU>12w<>)fmm$4g>?./u^+E.,@,LM

g

o-.T?U#:X#E#%	%WsF==	G	G	c|jtd}|dk\r|d|}tjdk7r2tj|vr |j	tjd}tj
rEtj
dk7r2tj
|vr |j	tj
d}|S)zzTerminate the file name at the first null byte and
    ensure paths always use forward slashes as the directory separator.r/)findchrossepreplacealtsep)rN	null_bytes  r_sanitize_filenamerUs

c!f%IA~Ai(
vv}8+##BFFC0	yyRYY#%"))x*?##BIIs3OrcTeZdZdZdZd
dZdZddZdZdZ	e
dd	d
dZdZy)rz>Class with attributes describing each file in the ZIP archive.)
orig_filenamerN	date_time
compress_type_compresslevelrr9
create_systemriextract_versionreserved	flag_bitsvolume
internal_attr
external_attr
header_offsetCRC
compress_size	file_size	_raw_timec|||_t|}||_||_|ddkrt	dt
|_d|_d|_d|_	tjdk(rd|_nd|_t|_t|_d|_d|_d|_d|_d|_d|_d|_y)Nrz+ZIP does not support timestamps before 1980rwin32r#)rrrNr
ValueErrorrrrrr9sysplatformrDEFAULT_VERSIONrirrrrrrrr)selfrNrs   r__init__zZipInfo.__init__s%&h/ 
"Q<$JKK("
<<7"!"D"#D-.
rcd|jjd|jg}|jtk7r<|jdtj|j|jz|jdz	}|jdz}|r'|jdtj|z|r|jd|z|j}|r|jr|jd|jz|r|jrJ|jtk7s|j|jk7r|jd	|jz|jd
dj|S)N<z
 filename= compress_type=%sr-rz filemode=%rz external_attr=%#xz
 file_size=%rz compress_size=%r>)	__class__rrNrrr7compressor_namesgetrstatfilemodeis_dirrrr8)rrOhiloisdirs     r__repr__zZipInfo.__repr__s;'+~~'>'>

NO+MM-*..t/A/A/3/A/ACC
D

2
%


&
(
MM.4==+<<=
MM.34
MM/DNN:;$,,


:
-
^^t11
1MM-0B0BBC

cwwvrNc|j}|ddz
dz|ddzz|dz}|ddz|d	dzz|ddzz}|jtzrdx}x}}n$|j}|j}|j
}|j}d}	||tkDxs	|tkD}|r>d
}
|tj|
dtj|
d	z
||z}d}d}t}	|jtk(rtt|	}	n#|jt k(rtt"|	}	t|	|j$|_t|	|j&|_|j)\}}tjt*t,|j$|j.||j|||||t1|t1|
}
|
|z|zS)zReturn the per-file header as a bytes object.

        When the optional zip64 arg is None rather than a bool, we will
        decide based upon the file_size and compress_size, if known,
        False otherwise.
        rrr(r!r%r"r#r*r$z<HHQQ)rr_MASK_USE_DATA_DESCRIPTORrrrr9ZIP64_LIMITrSpackcalcsize
ZIP64_VERSIONrrry
BZIP2_VERSIONr	LZMA_VERSIONrri_encodeFilenameFlagsstructFileHeaderstringFileHeaderrr6)rzip64dtdosdatedostimerrrr9min_versionfmtrNrheaders              r
FileHeaderzZipInfo.FileHeaders^^a54<A%1
2RU:Q%2+1
*beqj9>>55.//C/-)((C ..MI

=+J}{/JECFKK()6??3+?+A9m]]E"I&M'K*m[9K


8
+lK8K";0D0DE!+t/B/BC"779)-/?!114==)!//'3*I ]CJ	8
 5((rc	|jjd|jfS#t$r1|jjd|jtzfcYSwxYw)Nasciiutf-8)rNencoderUnicodeEncodeError_MASK_UTF_FILENAMErs rrzZipInfo._encodeFilenameFlagss[	V==''0$..@@!	V==''0$..CU2UUU	Vs&)7A#"A#c|j}tj}t|dk\r2|d|dd\}}|dzt|kDrt	d||fz|dk(r|d|dz}	|j
dvrd}|d|dd\|_|dd}|jd	k(rd
}|d|dd\|_|dd}|jd	k(rd}|d|dd\|_ne|dk(r`|d|dz}	|d|dd\}}	|dk(rC|	|k(r>|ddjd}
|
rt|
|_ntjdd||dzd}t|dk\r1yy#tj$rt	dd
dwxYw#tj$r}t	d|d}~wt$r}t	d|d}~wwxYw)Nr$r2z"Corrupt extra field %04x (size=%d)r!)lrz	File sizez<Qrrz
Compress sizez
Header offsetzCorrupt zip64 extra field. z not found.iupz<BLr%rz'Empty unicode path extra field (0x7075)r"
stacklevelz)Corrupt unicode path extra field (0x7075)z>Corrupt unicode path extra field (0x7075): invalid utf-8 bytes)r9rSr5r6rrrrrdecoderrNwarningswarnUnicodeDecodeError)rfilename_crcr9r5tplnrcfield
up_versionup_name_crcup_unicode_namees            r_decodeExtrazZipInfo._decodeExtras

%jAoE5!9-FB!tc%j  !ER!PQQV|Qr!t}F~~)MM +*0tBQx*@#ABx))[8 /.4T48.D+*#ABx))[8 /.4T48.D+*vQr!t}n.4UD!H.E+J!Q;,+F*.qr(//'*B*,>,ODM$MM*S`aMb"Q$%LEM%jAo&||F$'B(-wk&;<AEFF||Y$%PQWXX)n$%eflmmns2*A5E.AF$FGF%%G1F==GTstrict_timestampsct|tjrtj|}tj|}t	j
|j}tj|j}|dd}|s|ddkrd}n|s
|ddkDrd}||}tjjtjj|d}|dtjtjfvr+|dd}|dtjtjfvr+|r|d	z
}|||}|jd
zdz|_|rd|_|xjdzc_|S|j"|_|S)a_Construct an appropriate ZipInfo for a file on the filesystem.

        filename should be the path to a file or directory on the filesystem.

        arcname is the name which it will have within the archive (by default,
        this will be the same as filename, but without a drive letter and with
        leading path separators removed).
        rr&rrr!r!rrr;)rr;rNr!rrr-)
isinstancerPathLikefspathrS_ISDIRst_modetime	localtimest_mtimepathnormpath
splitdriverrrrst_size)	clsrNarcnamerstrmtimerzinfos	         r	from_filezZipInfo.from_filesVh,yy*H
WWX
RZZ(r{{+!AJ	 Yq\D%8-I"y|d':2I?G''""277#5#5g#>q#ABajRVVRYY//abkGajRVVRYY//sNGGY'!zzF2r9EO4'!jjEOrc8|jjdS)z2Return True if this archive member is a directory.r)rNendswithrs rrzZipInfo.is_dirDs}}%%c**r)NoNamerN)
rrrr	__slots__rrrrrclassmethodrrrrrrrhsJHI.H,.)`V*!X#D##J+rrcLtdD]}|dzr	|dz	dz}|dz}|S)Nrr!l q[)range)crcrAs  r_gen_crcrNs:
1X7!8z)CAIC	
Jrcdddt"tttt	datfdfd|D]
}|fd}|S)NixV4igE#ixV4c&|dz	||zdzzS)z(Compute the CRC32 primitive on one byte.rr)chrcrctables  rcrc32z_ZipDecrypter.<locals>.crc32hs qHcBh$%6777rc\|dzzdzdzdzdzdz	y)Nrrir!r)cr	key0key1key2s rupdate_keysz"_ZipDecrypter.<locals>.update_keyslsEQ~t$
2y 1$
2TRZ&rct}|j}|D](}dz}|||dzzdz	dzz}|||*t|S)zDecrypt a bytes object.r"r!rr)	bytearrayr7bytes)rcrOr7rkrrs     r	decrypterz _ZipDecrypter.<locals>.decryptervsa	AqA
1!9"d**AN1I		
V}r)	_crctablerxmaprr)	pwdprr	rr
rrrs	   @@@@@@r
_ZipDecrypterr^scDDDXuSz23	H8'A	rc$eZdZdZdZdZdZy)LZMACompressorcd|_yr)_comprs rrzLZMACompressor.__init__s	
rc.tjdtji}tjtjtj
tj|g|_tjdddt||zS)Nidfiltersz<BBHr(r$)
lzma_encode_filter_propertiesFILTER_LZMA1r
FORMAT_RAW_decode_filter_propertiesrrSrr6)rpropss  r_initzLZMACompressor._initsq..d6G6G/HI((**4+<+<eDC

{{61aU4u<<rc|j,|j|jj|zS|jj|Sr)rr)compressrrcs  rr+zLZMACompressor.compresssA::::<$**"5"5d";;;zz""4((rc|j+|j|jjzS|jjSr)rr)flushrs rr.zLZMACompressor.flushs=::::<$**"2"2"444zz!!rN)rrrrr)r+r.rrrrrs=)
"rrceZdZdZdZy)LZMADecompressorc.d|_d|_d|_y)NrF)_decomp_unconsumedeofrs rrzLZMADecompressor.__init__src
J|j|xj|z
c_t|jdkrytjd|jdd\}t|jd|zkrytjt
jtjt
j|jdd|zg|_|jd|zd}|`|jj|}|jj|_|S)Nr$rz<Hr"r!)r2r3r6rSr5r#r0r&r'r%
decompressr4)rrcpsizerOs    rr6zLZMADecompressor.decompresss<<$4##$)]]4)9)9!A)>?FE4##$E	100..t/@/@/3/?/?!e)/LNKDL##AIJ/D ((.<<##
rN)rrrrr6rrrr0r0s
rr0storeshrinkreduceimplodetokenizedeflate	deflate64bzip2r#terselz77awavpackbppmdc|tk(ry|tk(rtstdy|tk(rt
stdy|tk(rtstdytd)Nz.Compression requires the (missing) zlib modulez-Compression requires the (missing) bz2 modulez.Compression requires the (missing) lzma modulez(That compression method is not supported)	rrzlibRuntimeErrorrbz2r	r#NotImplementedError)compressions r_check_compressionrMsj 		$@B
B
		!?A
A
	 @B
B""LMMrcX|tk(rZ|%tj|tjdStjtjtjdS|t
k(r+|t
j|St
jS|tk(r
tSy)N)
rrHcompressobjDEFLATEDZ_DEFAULT_COMPRESSIONrrJ
BZ2Compressorr	r)r
compresslevels  r_get_compressorrUs$$##M4==#FF : :DMM3OO	)	#$$$]33  ""	(	"rc4t||tk(ry|tk(rtjdS|t
k(rt
jS|tk(r
tStj|}|rtd||fztd|fz)NrOzcompression type %d (%s)zcompression type %d)
rMrrrH
decompressobjrrJBZ2Decompressorr	r0rrrK)rdescrs  r_get_decompressorrZs}%
"	,	&!!#&&	)	#""$$	(	"!! $$]3%&@MSXCY&YZZ%&;}>N&NOOrc.eZdZdZdZddZddZdZy)	_SharedFilecl||_||_||_||_||_|j
|_yr)_file_pos_close_lock_writingseekable)rfileposcloselockwritings      rrz_SharedFile.__init__s0
	




rc|jSr)r_rs rrtz_SharedFile.tell	syyrc
|j5|jrtd|jj	|||jj|_|jcdddS#1swYyxYw)Nz}Can't reposition in the ZIP file while there is an open writing handle on it. Close the writing handle before trying to read.)rarbrr^rQrtr_)rrawhences   rrQz_SharedFile.seeksi
ZZ	}} "JKK
JJOOFF+

)DI99			sA"A99Bc>|j5|jrtd|jj	|j
|jj
|}|jj|_|cdddS#1swYyxYw)NyCan't read from the ZIP file while there is an open writing handle on it. Close the writing handle before trying to read.)rarbrr^rQr_rJrtrnrcs   rrJz_SharedFile.readsy
ZZ	}} "JKK
JJOODII&::??1%D

)DI			sA<BBcf|j%|j}d|_|j|yyr)r^r`)rfileobjs  rrfz_SharedFile.close!s-::!jjGDJKK "rN)r)rrrrrtrQrJrfrrrr\r\s&	!rr\c*eZdZdZdZdZdZdZy)	_Tellablec ||_d|_yNr)rGrarrGs  rrz_Tellable.__init__)srcf|jj|}|xj|z
c_|Sr)rGwritera)rrcros   rrzz_Tellable.write-s'GGMM$qrc|jSr)rars rrtz_Tellable.tell2s{{rc8|jjyr)rGr.rs rr.z_Tellable.flush5

rc8|jjyr)rGrfrs rrfz_Tellable.close8r}rN)rrrrrzrtr.rfrrrruru(s
rruceZdZdZdZdZdZ		ddZdZdZ	ddZ
dd	Zd
ZddZ
dZd
ZdZdZfdZdZej*fdZdZxZS)
ZipExtFilezZFile-like object for reading an archive member.
       Is returned by ZipFile.open().
    i@iic||_||_||_|j|_|j
|_|j|_t|j|_
d|_d|_d|_
d|_||_|j |_t%|dr"|j&|_t+d|_nd|_d|_	|j1r`|j3|_|j
|_|j|_|j,|_|j(|_d|_d|_ |rf|jBtDzr|jFdz	dz}n|j&dz	dz}|jI}||k7rtKd	|jLzyy#t>$rY{wxYw)
NFrrrTrrrzBad password for file %r)'_fileobj_pwd_close_fileobjr_compress_typer_compress_leftr_leftrZ
_decompressor_eof_readbuffer_offsetnewlinesmoderNnamerLr
_expected_crcr	_running_crc	_seekablercrt_orig_compress_start_orig_compress_size_orig_file_size_orig_start_crc	_orig_crcAttributeError
_decrypterrrr_init_decrypterrIr)rrqrzipinfor
close_fileobj
check_bytehs        rrzZipExtFile.__init__Js
	+%33%33&&
.t/B/BC	
	$$	7E"!(D %c
D!%D		!,3LLN)+2+@+@('.'8'8$'+'8'8$!%!3!3!%  #<<%//14<
&kkR/47
$$&AJ"#=@U@U#UVV			sA0F44	G?Gct|j|_|jj	d}|xj
dzc_|j|dS)Nrr*)rrrrrJr)rrs  rrzZipExtFile._init_decrypter~sM'		2##B'r!v&r**rcd|jjd|jjg}|js{|j	d|j
d|j|jtk7rN|j	dtj|j|jzn|j	d|j	ddj|S)	Nr.z name=z mode=r	 [closed]rr)rrrclosedr7rrrrrrr8rrOs  rrzZipExtFile.__repr__s"nn77"nn99;<{{MM		499EF""j0

1.2243F3F373F3FHHI
MM+&

cwwvrc|dkrP|jjd|jdz}|dkDr"|j|j|}||_|Stjj||S)zrRead and return a line from the stream.

        If limit is specified, at most limit bytes will be read.
        r
r!)rrrioBufferedIOBasereadline)rlimitr>lines    rrzZipExtFile.readlinesn19  %%eT\\:Q>A1u''a8   ))$66rcx|t|j|jz
kDrp|j|}t||jkDr)||j|jdz|_d|_n|xjt|zc_|j|j|jdzS)z6Returns buffered bytes without advancing the position.Nri)r6rrrJ)rrochunks   rpeekzZipExtFile.peekss4##$t||33IIaLE5zDLL(#(4+;+;DLLM+J#J  E
*dllS.@AArc2|jrtdy)NI/O operation on closed file.T)rrrs rreadablezZipExtFile.readables;;<==rc|jrtd||dkr`|j|jd}d|_d|_|js+||j|jz
}|js+|S||jz}|t|jkr"|j|j|}||_|S|t|jz
}|j|jd}d|_d|_|dkDri|js]|j|}|t|kr||_||_||d|z
}	|S||z
}|t|z}|dkDr
|js]|S)zRead and return up to n bytes.
        If the argument is omitted, None, or negative, data is read and returned until EOF is reached.
        zread from closed file.Nrr)rrrrr_read1MAX_Nr6)rrobufendrcs     rrJzZipExtFile.readsk;;5669A""4<<=1C"DDLiit{{4::..iiJ$,,T%%&&""4<<4CDLJ#d&&''t||}-!eDII;;q>D3t9}#'  tBQx

4KC
TNA!eDII
rc|jyt||j|_|jr2|j|jk7rt	d|j
zyy)NzBad CRC-32 for file %r)rr	rrrr)rnewdatas  r_update_crczZipExtFile._update_crcs]%!'4+<+<=99**d.@.@@5		ABBA9rc||dkrg|j|jd}d|_d|_|js2|j|j}|r||z
}	|S|js2|S||jz}|t|jkr"|j|j|}||_|S|t|jz
}|j|jd}d|_d|_|dkDr[|jsO|j|}|t|kr||_||_||d|z
}	|S|r||z
}	|S|jsO|S)z7Read up to n bytes with at most one read() system call.Nrr)rrrrrr6)rrorrcrs     rread1zZipExtFile.read1sb
9A""4<<=1C"DDLii{{4::.4KCJii
J$,,T%%&&""4<<4CDLJ#d&&''t||}-q5ii{{1~s4y='+D$#$DL48OC
4KC
ii
rc|js|dkry|jtk(rE|jj}|t|kDr2||j
|t|z
z
}n|j
|}|jtk(r|jdk|_n|jtk(rt||j}|jj||}|jjxs(|jdkxr|jj|_|jre||jjz
}nG|jj|}|jjxs|jdk|_|d|j}|xjt|zc_|jdkrd|_|j||S)NrrT)rrrrunconsumed_tailr6_read2rrry
MIN_READ_SIZEr6r4r.rrrns   rrzZipExtFile._read1s99Q,.%%55D3t9}AD	M22;;q>D*,++q0DI

 
 L
0At))*A%%00q9D++//@,,1@!//???
Iyy**0022%%006D**..J$2E2E2JDIKTZZ 

c$i
::?DIrc:|jdkryt||j}t||j}|jj|}|xjt
|zc_|st|j|j|}|S)Nrr)	rryrminrrJr6EOFErrorrrns   rrzZipExtFile._read2/s!#4%%&4&&'}}!!!$s4y(N??&??4(Drc	|jr|jjt|	y#t|	wxYwr)rrrfsuper)rrs rrfzZipExtFile.close?s4	""

##%GMOEGMOs	&8AcH|jrtd|jSNr)rrrrs rrczZipExtFile.seekableFs;;<==~~rcJ|jrtd|jstjd|j}|tjk(r|}nG|tjk(r||z}n.|tjk(r|j|z}ntd||jkDr|j}|dkrd}||z
}||jz}|jtk(r|j|dkDr|d|_|t!|j"|jz
z}|j$j'|tj|xj(|zc_d}d|_d|_n|dk\r"|t!|j"kr
||_d}n|dkr|j$j'|j*|j,|_|j0|_|j2|_|j|_d|_d|_t7|j|_d|_|}|j|j=|dkDr2t?|j@|}|jC|||z}|dkDr2|jS)Nzseek on closed file.!underlying stream is not seekablezCwhence must be os.SEEK_SET (0), os.SEEK_CUR (1), or os.SEEK_END (2)rrF)"rrrrUnsupportedOperationrtrSEEK_SETSEEK_CURSEEK_ENDrrrrrrr6rrrQrrrrrrrrZrrrr
MAX_SEEK_READrJ)rrarkcurr_posnew_posread_offsetbuff_offsetread_lens        rrQzZipExtFile.seekKsT;;344~~))*MNN99;R[[ G
r{{
"'G
r{{
"**V3GCD
DT)))**GQ;G(!DLL0*,1H[[\_!%D3t//04<<??KMM{BKK8JJ+%JK"DDL
A
+D4D4D0E"E&DLK
1_MMt889 $ 4 4D!%D"&":":D--DJ"DDL!243F3F!GDDI!K*$$&Ao4--{;HIIh8#KAo
yy{rc|jrtd|jstjd|j
|jz
t|jz
|jz}|S)Nztell on closed file.r)
rrrrrrrr6rr)rfileposs  rrtzZipExtFile.tells`;;344~~))*MNN&&3c$:J:J6KKdllZr)NFrrr!)rrrrrrrrrrrrrrJrrrrrfrcrrrQrt
__classcell__rs@rrr<s

EMM37$1Wh	+7 B
!FC#J"H 
#%++=~rrc@eZdZdZedZdZdZfdZxZ	S)
_ZipWriteFilec||_||_||_t|j|j
|_d|_d|_d|_	yrw)
_zinfo_zip64_zipfilerUrr_compressor
_file_size_compress_size_crc)rzfrrs    rrz_ZipWriteFile.__init__sL
*5+>+>+0+?+?A	rc.|jjSr)rrGrs rrz_ZipWriteFile._fileobjs}}rcy)NTrrs rwritablez_ZipWriteFile.writablesrc|jrtdt|ttfrt|}nt
|}|j}|xj|z
c_t||j|_
|jr9|jj|}|xjt|z
c_
|jj||Sr)rrrrrr6
memoryviewnbytesrr	rrr+rrrz)rrcrs   rrzz_ZipWriteFile.writes;;<==dUI./YFd#D[[F6!$		*	##,,T2D3t9,

D!
rc	|jry	t|	|jro|jj	}|xj
t
|z
c_|jj||j
|j_
n|j|j_
|j|j_
|j|j_|js<|jt kDrt#d|j
t kDrt#d|jj$t&zr|jrdnd}|jjt)j*|t,|jj|jj|jj|jj/|j0_n|jj/|j0_|jj5|jj6|jj|jj9|j|jj5|j0j2|j0j:j=|j|j|j0j>|jj@<d|j0_!y#d|j0_!wxYw)Nz*File size too large, try using force_zip64z0Compressed size too large, try using force_zip64z<LLQQz<LLLLF)"rrrfrr.rr6rrzrrrrrrrrrIrrrSr
_DD_SIGNATURErtr	start_dirrQrrfilelistr7
NameToInforNrb)rrrrs   rrfz_ZipWriteFile.closes+;;(	+GMO&&,,.##s3x/#

##C(,0,?,?),0OO)"iiDKKO$(OODKK!;;??[0&'STT&&4&'YZZ{{$$'@@!%g'

##FKK]DKKOOKK--t{{/D/D%FG*.--*<*<*>

'+/--*<*<*>

'

""4;;#<#<=

##DKK$:$:4;;$GH

""4==#:#:;
MM""))$++6=A[[DMM$$T[[%9%9:%*DMM"UDMM"sLL88M)
rrrrpropertyrrrzrfrrs@rrrs0  &++++rrc"eZdZdZdZdZdeddfddddZdZdZ	d	Z
d
ZdZdZ
d$d
ZdZdZdZedZej(dZd$dZd%dddZd&dZd'dZd(dZedZdZdZ		d(dZ	d'dZd)dZ d Z!d!Z"d"Z#d#Z$y)*rai Class with methods to open, read, write, close, list zip files.

    z = ZipFile(file, mode="r", compression=ZIP_STORED, allowZip64=True,
                compresslevel=None)

    file: Either the path to the file, or a file-like object.
          If it is a path, the file will be opened and closed by ZipFile.
    mode: The mode can be either read 'r', write 'w', exclusive create 'x',
          or append 'a'.
    compression: ZIP_STORED (no compression), ZIP_DEFLATED (requires zlib),
                 ZIP_BZIP2 (requires bz2) or ZIP_LZMA (requires lzma).
    allowZip64: if True ZipFile will create files with ZIP64 extensions when
                needed, otherwise it will raise an exception when this would
                be necessary.
    compresslevel: None (default for the given compression type) or an integer
                   specifying the level to pass to the compressor.
                   When using ZIP_STORED or ZIP_LZMA this keyword has no effect.
                   When using ZIP_DEFLATED integers 0 through 9 are accepted.
                   When using ZIP_BZIP2 integers 1 through 9 are accepted.

    NrT)rmetadata_encodingc|dvrtdt|||_d|_d|_i|_g|_||_||_||_	d|_
d|_||_||_
|jr|dk7rtdt|tj rtj"|}t|t$r;d|_||_d	d
ddd
d
dd}||}			t+j,||	|_n d|_||_t3|dd|_d|_t7j8|_d|_d|_	|dk(r|jAy|dvrNd|_	|j.jC|_"	|j.jG|jDy|dk(r7	|jA|j.jG|jDytd#t0$r|	|vr||	}	Y1wxYw#tHt0f$r
d|_YywxYw#tHt0f$r+tK|j.|_d|_"d|_YywxYw#tL$rE|j.jGddd|_|j.jC|_"YywxYw#|j.}
d|_|jO|
xYw)z]Open the ZIP file with mode read 'r', write 'w', exclusive create 'x',
        or append 'a'.)rwxaz+ZipFile requires mode 'r', 'w', 'x', or 'a'FrNrrz5metadata_encoding is only supported for reading filesrKw+bx+br+bwbxb)rrrrrrrTr!r)rrrr"z"Mode must be 'r', 'w', 'x', or 'a')(rrM_allowZip64
_didModifydebugrrrLrTrr_comment_strict_timestampsrrrrrstr_filePassedrNrrMrGrEgetattr_fileRefCnt	threadingRLockrarrb_RealGetContentsrtrrQrrur_fpclose)rrdrrL
allowZip64rTrrmodeDictrrGs           rrzZipFile.__init__s++JKK;'%

&*	
"3!2!!dckGI
IdBKK(99T?DdC  D DM"U%$T$@H~H ggdH5DG DDG#D&$7DM__&

'	s{%%'##'/%)WW\\^DN/T^^44))+GGLL0!!EFFc8+#+H#5 	@+G4/)./'0+'0DG%&DN%*DN+ "4GGLLA&'+DO%)WW\\^DN4	BDGMM"s)HK*K6H9%H<K5I68KHHH63K5H66K97I30K2I33K6AKKKK'K.c|Srrrs r	__enter__zZipFile.__enter__asrc$|jyrrf)rtypevalue	tracebacks    r__exit__zZipFile.__exit__ds

rcd|jjd|jjg}|jt|jr|jd|jzn*|j|jd|jz|jd|jzn|jd|jddj|S)	Nrrz file=%rz filename=%rz mode=%rrrr)	rrrrGrr7rNrr8rs  rrzZipFile.__repr__gs"nn77"nn99;<77

j47723*

nt}}<=MM*tyy01MM+&

cwwvrc|j}	t|}|std|jdkDrt||t}|t}|t|_	|t|z
|z
}|ttk(r|ttzz}|jdkDr||z}td|||||z|_|jdkrtd|j!|jd|j#|}t%j&|}d}||kr|j#t(}	t+|	t(k7rtdt-j.t0|	}	|	t2t4k7rtd|jdkDrt|	|j#|	t6}
t9|
}|	t:}|t<zr|
j?d	}
n|
j?|j@xsd
}
tC|
}
|j#|	tD|
_#|j#|	tH|
_%|	tL|
_'|	dd\|
_(|
_)|
_*|
_+|
_,|
_-}}|
_.|
_/|
_0|
jTtbkDrted|
jTd
zz|	dd\|
_3|
_4|
_5||
_6|dz	dz|dz	dz|dz|dz	|dz	dz|dzdzf|
_7|
jq||
jN|z|
_'|jrju|
|
|jv|
jx<|t(z|	t6z|	tDz|	tHz}|jdkDrtd|||kryy#t$rtdwxYw)z/Read in the table of contents for the ZIP file.zFile is not a zip filer!r"zgiven, inferred, offsetrz Bad offset for central directoryzTruncated central directoryz&Bad magic number for central directoryrcp437rzzip file version %.1fr)r,r/r(rr%rr*r totalN)=rGrDrErrprintr^r__ECD_COMMENTr
_ECD_LOCATIONrYrXrVrRrrQrJrBytesIOsizeCentralDirr6rSr5structCentralDir
_CD_SIGNATUREstringCentralDir_CD_FILENAME_LENGTHr	
_CD_FLAG_BITSrrrr_CD_EXTRA_FIELD_LENGTHr9_CD_COMMENT_LENGTHr_CD_LOCAL_HEADER_OFFSETrrirrrrrrrrMAX_EXTRACT_VERSIONrKrrrrrrrr7rrN)rrGrbsize_cd	offset_cdconcatinferredrcrcentdirrNorig_filename_crcflagsrtds                rrzZipFile._RealGetContentsus
WW	7 _F566::>&M#;'	|,

&09<.!%77'*AABF::>	)H+Y&I"V+>>A?@@
"www
ZZ
goggn-G7|~- !>??mm$4g>G}%)99 !IJJzzA~gwww':;<H %hM*E))#??73$??4+A+A+LWM!Aggg&<=>AG(: ;<AI%&=>AO5<AbM
2Q
q0A1:
[!/1a
UAOQ[  #66)*A+,+<+<r+A+CDD9@B6AHaoqAKT4K!Q$QtVrEAqD$;41?AK
NN,-oo6AOMM  #*+DOOAJJ'^+g6I.JJ567123EzzA~gu%[go7	7566	7sN33OcT|jDcgc]}|jc}Scc}w)z+Return a list of file names in the archive.)rrNr,s  rnamelistzZipFile.namelists*.--8$

888s%c|jS)zJReturn a list of class ZipInfo instances for files in the
        archive.)rrs rinfolistzZipFile.infolist}}rctddz||jD];}d|jddz}td|j||jfz|=y)z+Print a table of contents for the zip file.z%-46s %19s %12s)z	File NamezModified    Size)rdz%d-%02d-%02d %02d:%02d:%02dNr&z
%-46s %s %12d)rrrrNr)rrdrdates    rprintdirzZipFile.printdirs_
"GG	]]	E05??2A3FFD/U^^T5??$KK
	rcd}|jD]L}	|j|jd5}|j|r	|j|rdddNy#1swYxYw#t$r|jcYcSwxYw)zRead all the files and check the CRC.

        Return None if all files could be read successfully, or the name
        of the offending file otherwise.irN)rrMrNrJr)r
chunk_sizerfs    rtestzipzZipFile.testzips

]]	&E
&YYu~~s3q&&,&&,		&
&~~%
&s(A+$AA+A(	$A++BBc\|jj|}|td|z|S)z,Return the instance of ZipInfo given 'name'.z(There is no item named %r in the archive)rrKeyError)rrinfos   rgetinfozZipFile.getinfos9""4(<:TAC
Crc|r1t|ts!tdt|jz|r||_yd|_y)z)Set default password for encrypted files.pwd: expected bytes, got %sN)rr	TypeErrorr
rr)rrs  rsetpasswordzZipFile.setpasswords:z#u-9DI<N<NNOODHDHrc|jS)z.The comment text associated with the ZIP file.)rrs rrzZipFile.commentr0rct|ts!tdt|jzt|tkDr'ddl}|jdtzd|dt}||_	d|_
y)Nzcomment: expected bytes, got %srz3Archive comment is too long; truncating to %d bytesr"rT)rrr?r
rr6ZIP_MAX_COMMENTrrrr)rrrs   rrzZipFile.commentsp'5)=W
@V@VVWWw</)MMO+,89

;./G
rct|j|d|5}|jcdddS#1swYyxYw)zReturn file bytes for name.rN)rMrJ)rrrrGs    rrJzZipFile.reads2
YYtS#
&	"779			s.7Fforce_zip64c|dvrtd|r|dk(rtdjstdt|tr|}nD|dk(r.t|}j|_j|_nj|}|dk(rj||Sjrtdxjdz
c_tj|jjjfd	}	|j!t"}t%|t"k7rt'd
t)j*t,|}|t.t0k7rt'd|j!|t2}|t4r|j7|t4d|j8t:zrt=d
|j8t>zrt=d|t@tBzr|jEd}	n|jEjFxsd}	|	|jHk7rt'd|jHd|d|j8tJz}
|
rQ|sjL}|r1t|tNs!tQdtS|jTz|stWd|zd}tY||||dS#|j[xYw)auReturn file-like object for 'name'.

        name is a string for the file name within the ZIP file, or a ZipInfo
        object.

        mode should be 'r' to read a file already in the ZIP file, or 'w' to
        write to a file newly added to the archive.

        pwd is the password to decrypt files (only used for reading).

        When writing, if the file size is not known in advance but may exceed
        2 GiB, pass force_zip64 to use the ZIP64 format, which can handle large
        files.  If the size is known in advance, it is best to pass a ZipInfo
        instance for name, with zinfo.file_size set.
        >rrzopen() requires mode "r" or "w"rz'pwd is only supported for reading filesz2Attempt to use ZIP archive that was already closedrErmr!cjSr)rbrsr<lambda>zZipFile.open.<locals>.<lambda>?s$--rzTruncated file headerz Bad magic number for file header)rkz$compressed patched data (flag bit 5)zstrong encryption (flag bit 6)rrzFile name in directory z and header z differ.r>z6File %r is encrypted, password required for extractionNT).rrGrrrLrrTrr<_open_to_writerbrr\rrrarJsizeFileHeaderr6rrSr5r
_FH_SIGNATUREr_FH_FILENAME_LENGTH_FH_EXTRA_FIELD_LENGTHrQr_MASK_COMPRESSED_PATCHrK_MASK_STRONG_ENCRYPTION_FH_GENERAL_PURPOSE_FLAG_BITSrrrr_MASK_ENCRYPTEDrrr?r
rrIrrf)rrrrrFrzef_filefheaderfname	fname_stris_encrypteds`          rrMzZipFile.opens z!>??DCKFGGwwDF
FdG$E
S[DME"&"2"2E#'#5#5E LL&E3;&&u+&FF==FG
G
	
Atww(;(;#}}djj:OQ0	mmN3G7|~- !899mm$4g>G}%)99 !CDDMM'*=">?E-.

g&<=a
H!77)*PQQ!88)*JKK458JJ!LL1	!LL)?)?)J7K	E/// **E344
!??_<L((Cz#u5#$ADIDVDV$VWW&(ACG(HIIheS$??	NNs
GKK$c|r|jstd|jrtdd|_d|_d|_|jtk(r|xj
tzc_|js|xj
tzc_|jsd|_|xs|jdztkD}|js
|rtd|jr%|jj!|j"|jj%|_|j)|d|_|jj-|j/|d|_t1|||S)NzHforce_zip64 is True, but allowZip64 was False when opening the ZIP file.zzCan't write to the ZIP file while there is another write handle open on it. Close the first handle before opening another.rg?z'Filesize would require ZIP64 extensionsT)rrrbrrrrr	_MASK_COMPRESS_OPTION_1rrrrrrrGrQrrtr_writecheckrrzrr)rrrFrs    rrJzZipFile._open_to_writers=t// 
==NO
O
 	(*OO66O~~OO88O"""-EE$ 6 DEHII>>GGLL("gglln

e&&u-.
T5%00rc|tj}ntj|}|j|||S)a#Extract a member from the archive to the current working directory,
           using its full name. Its file information is extracted as accurately
           as possible. `member' may be a filename or a ZipInfo object. You can
           specify a different directory using `path'.
        )rgetcwdr_extract_member)rmemberrrs    rextractzZipFile.extracts6<99;D99T?D##FD#66rc||j}|tj}ntj|}|D]}|j	|||y)zExtract all members from the archive to the current working
           directory. `path' specifies a different directory to extract to.
           `members' is optional and must be a subset of the list returned
           by namelist().
        N)r-rr]rr^)rrmembersrrs     r
extractallzZipFile.extractallsR?mmoG<99;D99T?D	5G  $4	5rc|j}|s+d}tj|dt|z}||_|j	|}d|j|D}|j
d|D}|S)z;Replace bad characters and remove trailing dots from parts.z:<>|"?*_c3>K|]}|jdyw)z .N)rstrip.0rs  r	<genexpr>z1ZipFile._sanitize_windows_name.<locals>.<genexpr>sBa188D>Bsc3&K|]	}|s|ywrrrhs  rrjz1ZipFile._sanitize_windows_name.<locals>.<genexpr>s7QQq7s)!_windows_illegal_name_trans_tabler	maketransr6	translatesplitr8)rrpathseptableillegals     r_sanitize_windows_namezZipFile._sanitize_windows_namest55GMM'3W+=>E49C1##E*B7==+AB,,7'77rct|ts|j|}|jj	dt
jj}t
jjrB|j	t
jjt
jj}t
jj|d}dt
jjt
jjft
jjjfd|jt
jjD}t
jjdk(r*|j|t
jj}|stdt
jj||}t
jj!|}t
jj#|}|r4t
jj%|stj&||j)r6t
jj+|stj,||S|j/||5}t/|d5}t1j2||d	d	d	d	d	d	|S#1swYxYw#1swY|SxYw)
zbExtract the ZipInfo object 'member' to a physical
           file on the path targetpath.
        rr!rc3*K|]
}|vr|ywrr)ririnvalid_path_partss  rrjz*ZipFile._extract_member.<locals>.<genexpr>s##C&'/A&A$%#Cs\zEmpty filename.)rrN)rrr<rNrrrrrrcurdirpardirr8rorsrrdirnameexistsmakedirsrrmkdirrMshutilcopyfileobj)	rr_
targetpathrr	upperdirssourcetargetrvs	        @rr^zZipFile._extract_members&'*\\&)F//))#rww{{;
77>>oobggnnbggkkBG''$$W-a0 "''.."''..A''++""#CgmmBGGKK.H#CC
77;;$11'277;;GG.//WW\\*g6
WW%%j1
GGOOJ/	RWW^^I6KK	"==?77==,$
YYv3Y
'	/6
*d
#	/'-vv.	/	/		/	/	/s$$
K&1KK&K#	K&&K0c|j|jvr$ddl}|jd|jzd|jdvrtd|jstdt|j|js]d}t|jtk\rd	}n+|jtkDrd
}n|jtkDrd}|rt!|dzyy)
z6Check for errors before writing a file to the archive.rNzDuplicate name: %rr#rrrrz&write() requires mode 'w', 'x', or 'a'z4Attempt to write ZIP archive that was already closedFiles countFilesizezZipfile size would require ZIP64 extensions)rNrrrrrrGrMrrr6rZIP_FILECOUNT_LIMITrrrr)rrrrequires_zip64s    rr[zZipFile._writechecks>>T__,MM.?AMN99O+EFFwwFH
H5../!N4==!%88!.;.!+$${2!/">#D$EFF rc.|jstd|jrtdtj	|||j
}|j
r d|_d|_|j|y|||_
n|j|_
|||_n|j|_t|d5}|j|d5}tj ||dddddddy#1swYxYw#1swYyxYw)	zLPut the bytes from filename into the archive under the name
        arcname.7Attempt to write to ZIP archive that was already closedz>Can't write to ZIP archive while an open writing handle existsrrNrKri )rGrrbrrrrrrr}rrLrrTrMr~r)rrNrrrTrsrcdests        rrzz
ZipFile.write
swwIK
K==P
!!(G484K4K"M<<>"#EEIJJu(&3#&*&6&6#('4$'+'9'9$h%
6diis.C
6t""3f5
6
6
6
6
6
6s$DC?.D?D	DDct|tr|jd}t|tst|t	j
t	jdd}|j|_|j|_	|jjdrd|_|xjdzc_n
d|_n|}|jstd	|jrtd
|||_|||_	t!||_|j$5|j'|d5}|j)|ddddddy#1swYxYw#1swYyxYw)
aWrite a file into the archive.  The contents is 'data', which
        may be either a 'str' or a 'bytes' instance; if it is a 'str',
        it is encoded as UTF-8 first.
        'zinfo_or_arcname' is either a ZipInfo instance or
        the name of the file in the archive.rNr&)rNrriAr-rYrz?Can't write to ZIP archive while an open writing handle exists.r)r)rrrrrrrLrrTrrNrrrGrrbr6rrarMrz)rzinfo_or_arcnamercrrTrrs       rwritestrzZipFile.writestr.sOdC ;;w'D*G4%5&*nnTYY[&A"1&EGE"&"2"2E#'#5#5E ~~&&s+&3###t+#&1#$EwwIK
K==Q
$"/E$#0E d)
ZZ	!5s+
!t

4 
!	!	!
!
!	!	!s$'E*;E
E*E'	#E**E3ct|tr|}|jstdt|tr^|}|jds|dz
}t|}d|_d|_d|zdzdz|_d|_	|xjdzc_ntd|j5|jr%|jj|j|jj!|_|j$t&k(r|xj(t*zc_|j-|d|_|j0j3|||j4|j6<|jj9|j;d	|jj!|_d
d
d
y
#1swYy
xYw)z+Creates a directory inside the zip archive.z/The given ZipInfo does not describe a directoryrri@rr-zExpected type str or ZipInfoTFN)rrrrrrrrrrr?rarrGrQrrtrrr	rrZr[rrr7rrNrzr)rzinfo_or_directory_namerrdirectory_names     rr}z
ZipFile.mkdirWsm-w7+E<<> !RSS
/
54N!**3/#%N+E"#EEI$+dNf#<"CEEO4':;;
ZZ	,~~T^^,"&'',,.E""h.#::U#"DOMM  '.3DOOENN+GGMM%**512!WW\\^DN	,	,	,s
3DGGc$|jy)z2Call the "close()" method in case the user forgot.Nrrs r__del__zZipFile.__del__zs

rc|jy|jrtd	|jdvrb|jrV|j
5|jr%|jj|j|jddd|j}d|_|j|y#1swY.xYw#|j}d|_|j|wxYw)zOClose the file, and for mode 'w', 'x' and 'a' write the ending
        records.NzvCan't close the ZIP file while there is an open writing handle on it. Close the writing handle before closing the zip.r)rGrbrrrrarrQr_write_end_recordrrxs  rrfz
ZipFile.close~s77?==PQ
Q		yyO+ZZ-~~T^^4**,-
BDGMM"--
BDGMM"s$&CAB;C;CC&C-c	|jD]}|j}|ddz
dz|ddzz|dz}|ddz|d	dzz|ddzz}g}|jtkDs|jtkDr;|j|j|j|jd
}d
}n|j}|j}|jtkDr|j|jd
}n|j}|j}	d}
|rHt|	d}	tjdd
t|zzddt|zg||	z}	t}
|jtk(rtt |
}
n#|jt"k(rtt$|
}
t|
|j&}t|
|j(}|j+\}
}tjt,t.||j0||j2||j|||j4||t|
t|	t|j6d|j8|j:|}|j<j?||j<j?|
|j<j?|	|j<j?|j6|j<jA}t|j}||jBz
}|jB}d}|tDkDrd}n|tkDrd}n|tkDrd}|r|jFstI|dztjtJtLddddd||||}|j<j?|tjtNtPd|d}|j<j?|tS|d}tS|d
}tS|d
}tjtTtVdd||||t|jX	}|j<j?||j<j?|jX|jZdk(r|j<j]|j<j_y)Nrrr(r!r%r"r#r*r$rrr2QrrzCentral directory offsetzCentral directory sizer,rrr)0rrrrrr7rr9rBrSrr6rrrryrr	rrrirrrrrrrrrrGrzrtrrrrrWrXrTrUrrwrvrrtruncater.)rrrrrr9rrr
extra_datarrrirNrr'pos2centDirCountcentDirSize
centDirOffsetrzip64endreczip64locrecrbs                        rrzZipFile._write_end_records
]]3	)EB!ut|)BqEQJ6A>GerkBqEQJ."Q%1*=GE,%%3U__-U001&	 *
!OO	 % 3 3
""[0U001 *
 % 3 3
JK)*d;
#[[CE
N*qU|-&+-/9:
,""i/!-=$$0!,<!+u/D/DEO e.B.BCN"'"<"<">Hikk"2"2N"'"5"5"+U-@-@'7"'))]I"%h-Z#emmBT"#U%8%8%:M:M"/1G
GGMM'"GGMM(#GGMM*%GGMM%--(g3	)jww||~4==)T^^+
--*N
[
(7N
;
&5N##">#D$EFF ++"$6BAq,],K
GGMM+& ++))1dA7K
GGMM+&|V4Lk:6K
z:M-/?<(-T]]9KM	


f

dmm$99GG

rc|jdkDsJ|xjdzc_|js|js|jyyy)Nrr!)rrrfrxs  rrzZipFile._fpclosesF!##A(8(8HHJ)9rr)rN)F)NN)NNN)i)%rrrrrGrlrrr
rrrr-r/r4r8r<r@rrsetterrJrMrJr`rcrrsr^r[rzrr}rrfrrrrrrrs
,
B(,%"%:$#^:>RV^@M&`9
& 
^^


`E`D(1T75"+ZF.'+046D48'!R!,F,\|rrc.eZdZdZdeddfdZd	dZdZy)
r
zDClass to create ZIP archives with Python library files and packages.rTrscFtj|||||||_y)N)rrLr)rr	_optimize)rrdrrLroptimizes      rrzPyZipFile.__init__s't$K$.		0!rNctj|}|rI||sA|jr4tjj	|rdnd}t|d|dytjj
|\}}tjj	|rtjj|d}tjj|r|r|d|}n|}|jrtd|d	||j|d
d|\}}	|jrtd|	|j||	ttj|}
|
jd|
D]$}tjj||}tjj|\}
}tjj	|rStjjtjj|ds|j|||
|dk(s|r#||s|jrtd|z|j|d
d|\}}	|jrtd|	|j||	'y|jrtd|ttj|D]}tjj||}tjj|\}
}|dk(sK|r#||s|jrtd|zp|j|d
d|\}}	|jrtd|	|j||	y|dddk7rt!d|j|d
d|\}}	|jrtd|	|j||	y)aAdd all files from "pathname" to the ZIP archive.

        If pathname is a package directory, search the directory and
        all package subdirectories recursively for all *.py and enter
        the modules into the archive.  If pathname is a plain
        directory, listdir *.py and enter all modules.  Else, pathname
        must be a Python *.py file and the module will be put into the
        archive.  Added modules are always module.pyc.
        This method will compile the module.py into module.pyc if
        necessary.
        If filterfunc(pathname) is given, it is called with every argument.
        When it is False, the file or directory is skipped.
        rrd z skipped by filterfuncNz__init__.pyrzAdding package inasrAdding)
filterfunc.pyzfile %r skipped by filterfunczAdding files from directoryz.Files added with writepy() must end with ".py"zAdding file)rrrrrrror8isfile
_get_codenamerzsortedlistdirremovesplitextwritepyrI)rpathnamebasenamerlabeldirrinitnamerUrdirlistrNrrootexts               rrzPyZipFile.writepys"99X&j2zz"$''--"9vuhGHGGMM(+	T
77=="ww||Hm<Hww~~h'*2D9H#H::-xxH!%!3!3HQrNH!Mw::(G,

5'* H!56}- '3H77<<(;D " 0 0 :ID#ww}}T*77>>"'',,t]*KL LLx4>)@%j.>#zz %&E&L M$)-););D2J<D*Fw::!(G4

5'2#3(::7B &rzz('; <3H77<<(;D " 0 0 :ID#e|%j.>#zz %&E&L M$)-););D2J<D*Fw::!(G4

5'23}%"DFF!//2INE7zzmW-JJug&rcd
fd	}|dz}|dz}tjj|d}tjj|d}tjj|d}jdk(rtj
j
|rEt	j|jt	j|jk\r|x}	}
nTtj
j
|rEt	j|jt	j|jk\r|}
|}	ntj
j
|rEt	j|jt	j|jk\r|}
|}	ntj
j
|rEt	j|jt	j|jk\r|}
|}	n(||rEtjjd	k(r|}
n"tjjdk(r|}
n|}
|}	n|x}
}	n։jd	k(r|}
|}	nL|}	jdk(r|}
n8jdk(r|}
n&d
jj}t|tj
j
|
r?t	j|
jt	j|jk\s||js|x}
}	tj
j|	d}|r|d|}|
|fS)aReturn (filename, archivename) for the path.

        Given a module name path, return the correct file path and
        archive name, compiling if necessary.  For example, given
        /python/lib/string, return (/python/lib/string.pyc, string).
        rscddl}jrtd|	|j|d|y#|j$r}t|j
Yd}~yd}~wwxYw)Nr	CompilingT)doraiserF)
py_compilerrcompilePyCompileErrormsg)rdrrerrrs    r_compilez)PyZipFile._get_codename.<locals>._compile[s\zzk4(
""4"I,,
cgg
s4A"AA"rz.pycr)optimizationr!r"rz"invalid value for 'optimize': {!r})rrrr)	importlibutilcache_from_sourcerrrrrrrr)rformatrro)
rrrrfile_pyfile_pycpycache_opt0pycache_opt1pycache_opt2rrUrarchivenames
`            rrzPyZipFile._get_codenameTs		e#f$ ~~77b7Q ~~77a7P ~~77a7P>>Rx(''(#,,0@0I0II"**%''...'','00BGGG4D4M4MM%"''...'','00BGGG4D4M4MM%"''...'','00BGGG4D4M4MM%"G$yy))Q. ,++q0 , ,&G&--EG~~"$"">>Q&(E^^q((E>EEdnnUC$S/)GGNN5)GGEN++rwww/?/H/HH$..A&--EGggmmG,Q/%-{;K{##r)rN)rrrrrrrrrrrr
r
s!N"%: 2"P'dP$rr
)rCompleteDirs)mainr)rbinasciiimportlib.utilrrrr~rrSrrrrHr	ImportErrorrJr#__all__	ExceptionrrrrrrrCrrrr	rrrrr"rwrvrrurYrZr[r\r]r^r_r{rrrrrr_CD_CREATE_VERSION_CD_CREATE_SYSTEM_CD_EXTRACT_VERSION_CD_EXTRACT_SYSTEMr_CD_COMPRESS_TYPE_CD_TIME_CD_DATE_CD_CRC_CD_COMPRESSED_SIZE_CD_UNCOMPRESSED_SIZErrr _CD_DISK_NUMBER_START_CD_INTERNAL_FILE_ATTRIBUTES_CD_EXTERNAL_FILE_ATTRIBUTESr!rRrZrrOrPrrrrKrL_FH_EXTRACT_VERSION_FH_EXTRACT_SYSTEMrQ_FH_COMPRESSION_METHOD_FH_LAST_MOD_TIME_FH_LAST_MOD_DATE_FH_CRC_FH_COMPRESSED_SIZE_FH_UNCOMPRESSED_SIZErMrNrTrUrRrWrXrV_CD64_SIGNATURE_CD64_DIRECTORY_RECSIZE_CD64_CREATE_VERSION_CD64_EXTRACT_VERSION_CD64_DISK_NUMBER_CD64_DISK_NUMBER_START_CD64_NUMBER_ENTRIES_THIS_DISK_CD64_NUMBER_ENTRIES_TOTAL_CD64_DIRECTORY_SIZE_CD64_OFFSET_START_CENTDIRrStructr4rBrHr
rqrDrobjectrrrrrr0rrMrUrZr\rurrrrr
_pathrr__main__rrrr<module>rs
		


JJE

		9 
#
	


  !12
	
$  !12


!! 
#  
"  !12
 !
%))&//*CD"""6??#56!"
#fmmE** (V:x&^+v^+J
	 #L"".8wxxx	
xx
yzy{	 	!"#(N&
 P$%!%!P(T""Tn
P+B%%P+hOOdk$k$\wDDNNE
C
Ds4II&I4I#"I#&I10I14I?>I?