o ?Ogx@sN ddlZddlmZmZddlZddlZddlZddlZddl Z ddl Z ddl Z ddgZ ej Z ejddZGdddeZiZee ZdZdZd ZGd ddejZe d d d fe d dd fddfZddZddZddZddZdZda ddZ!ddZ"ddZ#d d!Z$ee$j%Z&d"d#Z'd$d%Z(d&d'Z)d(d)Z*d*d+Z+d,d-Z,dS).N)_unpack_uint16_unpack_uint32ZipImportError zipimporterc@s eZdZdS)rN)__name__ __module__ __qualname__r r 0/opt/alt/python310/lib64/python3.10/zipimport.pyr"ssPKic@s|eZdZ ddZdddZdddZddd Zd d Zd d ZddZ ddZ ddZ ddZ ddZ ddZddZdS)rc Cs$t|tsddl}||}|std|dtr|tt}g} zt |}Wn#t t fyKt |\}}||krBtd|d|}| |Ynw|jd@dkrYtd|dnq!zt|}Wntyrt|}|t|<Ynw||_||_tj|ddd|_|jr|jt7_dSdS) Nrzarchive path is emptypathTznot a Zip fileii) isinstancestrosfsdecoder alt_path_sepreplacepath_sep_bootstrap_external _path_statOSError ValueError _path_splitappendst_mode_zip_directory_cacheKeyError_read_directory_filesarchive _path_joinprefix)selfrrr$stdirnamebasenamefilesr r r __init__@sD         zzipimporter.__init__NcCs\ tdtt||}|dur|gfSt||}t||r*d|jt|gfSdgfS)Nzfzipimporter.find_loader() is deprecated and slated for removal in Python 3.12; use find_spec() instead) _warningswarnDeprecationWarning_get_module_info_get_module_path_is_dirr"r)r%fullnamermimodpathr r r find_loaderns    zzipimporter.find_loadercCs tdt|||dS)Nzfzipimporter.find_module() is deprecated and slated for removal in Python 3.12; use find_spec() insteadr)r+r,r-r4)r%r1rr r r find_modules  zzipimporter.find_modulecCsn t||}|durtj|||dSt||}t||r5|jt|}tj|ddd}|j ||SdS)N) is_packageT)nameloaderr6) r. _bootstrapspec_from_loaderr/r0r"r ModuleSpecsubmodule_search_locationsr)r%r1target module_infor3rspecr r r find_specs    zzipimporter.find_speccCs t||\}}}|SN_get_module_coder%r1code ispackager3r r r get_codeszzipimporter.get_codecCsr tr |tt}|}||jtr|t|jtd}z|j|}Wn ty2tdd|wt |j|S)Nr) rrr startswithr"lenr!rr _get_data)r%pathnamekey toc_entryr r r get_datas    zzipimporter.get_datacCs t||\}}}|SrArBrDr r r get_filenameszzipimporter.get_filenamecCs t||}|durtd||dt||}|r!t|d}n|d}z|j|}Wn ty7YdSwt|j| S)Ncan't find module r7 __init__.py.py) r.rr/rr#r!rrKr"decode)r%r1r2rfullpathrNr r r get_sources    zzipimporter.get_sourcecCs* t||}|durtd||d|S)NrQrR)r.r)r%r1r2r r r r6s  zzipimporter.is_packagec Cs d}t|tt||\}}}tj|}|dus t|ts)t|}|tj|<||_ z*|r?t ||}t |j |}|g|_t|dsGt|_t |j||t||jWntj|=ztj|}Wntyutd|dwtd|||S)Nzrzipimport.zipimporter.load_module() is deprecated and slated for removal in Python 3.12; use exec_module() instead __builtins__zLoaded module z not found in sys.moduleszimport {} # loaded from Zip {})r+r,r-rCsysmodulesgetr _module_type __loader__r/rr#r"__path__hasattrrX_fix_up_module__dict__execr ImportErrorr9_verbose_message) r%r1msgrErFr3modrrVr r r load_modules8      zzipimporter.load_modulecCsB z ||s WdSWn tyYdSwddlm}|||S)Nr) ZipReader)r6rimportlib.readersrh)r%r1rhr r r get_resource_reader;s    zzipimporter.get_resource_readercCsJ zt|j|_|jt|j<WdSty$t|jdi|_YdSwrA)r r"r!rrpopr%r r r invalidate_cachesJs   zzipimporter.invalidate_cachescCsd|jt|jdS)Nz)r"rr$rlr r r __repr__Tszzipimporter.__repr__rA)rrr r*r4r5r@rGrOrPrWr6rgrjrmrnr r r r r.s . %    + z __init__.pycTrSF)z.pycTF)rTFFcCs|j|ddS)N.)r$ rpartition)r%r1r r r r/fsr/cCs|t}||jvSrA)rr!)r%rdirpathr r r r0js r0cCs8t||}tD]\}}}||}||jvr|SqdSrA)r/_zip_searchorderr!)r%r1rsuffix isbytecoderFrVr r r r.ss  r.c Cszt|}Wntytd||dw|T|}z@z|t d|}|t}WntyDtd||dwt|tkrTtd||d|ddt krz |dd|}Wntyxtd||dwt |t td}z |||}Wntytd||dw| t }|dkrtd||d|||t}t|tkrtd||d|t||}t |d d } t |d d } || krtd ||d|| krtd ||d|| 8}|| } | dkrtd||di} d} z||Wnty+td||dw |d}t|dkr=td|dddkrHnt|dkrStdt|dd}t|dd }t|d d}t|dd }t |d d }t |d d}t |dd}t|dd}t|dd}t|dd}t |dd}|||} || krtd||d|| 7}z||}Wntytd||dwt||krtd||dzt|| || |krtd||dWntytd||dw|d@r!|}nz|d}Wnty:|dt}Ynw|d t}t||}||||||||f}|| |<| d!7} q-W||n||wWdn 1sswYtd"| || S)#Nzcan't open Zip file: r rpcan't read Zip file: rznot a Zip file: zcorrupt Zip file: zbad central directory size: zbad central directory offset: z&bad central directory size or offset: T.EOF read where not expectedsPK  "*zbad local header offset: iasciilatin1/rz!zipimport: found {} names in {!r})_io open_coderrtellseekEND_CENTRAL_DIR_SIZEreadrJSTRING_END_ARCHIVEmaxMAX_COMMENT_LENrfindrEOFErrorrrUUnicodeDecodeError translate cp437_tablerrrr#r9rd)r"fp start_offsetheader_positionbuffer file_sizemax_comment_startdatapos header_size header_offset arc_offsetr)countflagscompresstimedatecrc data_size name_size extra_size comment_size file_offsetr7rtr r r r s                       2tr u  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ cCsjtr tdtddazzddlm}Wnty&tdtdwWdandawtd|S)Nzzipimport: zlib UNAVAILABLE)can't decompress data; zlib not availableTr decompressFzzipimport: zlib available)_importing_zlibr9rdrzlibr Exceptionrr r r _get_decompress_func7s     rc Csx|\}}}}}}}} |dkrtdt|} z| |Wnty/td||dw| d} t| dkr?td| dddkrPtd ||dt| d d } t| d d} d| | }||7}z| |Wntytd||dw| |}t||krtd Wdn1swY|dkr|Szt }Wn t ytd w||dS)Nrznegative data sizervr rr|rwsPKzbad local file header: rzzipimport: can't read datari) rrrrrrrJrrrr)r"rNdatapathrrrrrrrrrrrrraw_datarr r r rKLsH           rKcCst||dkS)Nr)abs)t1t2r r r _eq_mtimezsrcCs||d}t|||}|d@dk}|r?|d@dk}tjdkr>|s&tjdkr>t||} | dur>ttj| } t|| ||n(t||\} } | rgt t |dd| r]t |dd | krgt d |dSt |d d} t| ts}td |d | S) N)r7rrrrpneveralwaysr}rxryzbytecode is stale for zcompiled module z is not a code object)r _classify_pyc_impcheck_hash_based_pycs_get_pyc_source source_hash_RAW_MAGIC_NUMBER_validate_hash_pyc_get_mtime_and_size_of_sourcerrr9rdmarshalloadsr _code_type TypeError)r%rLrVr1r exc_detailsr hash_based check_source source_bytesr source_mtime source_sizerEr r r _unmarshal_codesD      rcCs|dd}|dd}|S)Ns   )r)sourcer r r _normalize_line_endingss  rcCst|}t||dddS)NrbT) dont_inherit)rcompile)rLrr r r _compile_sourcesrc CsDt|d?d|d?d@|d@|d?|d?d@|d@dd d d f S) N i ?rpr)rmktime)drr r r _parse_dostimes    rc CsZz|dd}|j|}|d}|d}|d}t|||fWStttfy,YdSw)Nrr)rr)r!rr IndexErrorr)r%rrNrruncompressed_sizer r r rs  rcCs<|dd}z|j|}Wn tyYdSwt|j|S)Nr)r!rrKr")r%rrNr r r rs   rc Cst||}d}tD]f\}}}||}tjd|jt|ddz|j|}Wn ty-Yq w|d} t|j|} d} |r[z t || ||| } Wnt yZ} z| }WYd} ~ n d} ~ wwt | | } | dureq |d} | || fS|r~d|} t | |d|t d||d)Nz trying {}{}{}rp) verbosityrzmodule load failed: rRrQ) r/rsr9rdr"rr!rrKrrcrr)r%r1r import_errorrtrurFrVrNr3rrEexcrer r r rCs:     rC)-_frozen_importlib_externalrrr_frozen_importlibr9rrrrYrr+__all__rpath_separatorsrrcrrtyper\rrr _LoaderBasicsrrsr/r0r.r rrrrKrr__code__rrrrrrrCr r r r s\ 2   . (