python (3.12.0)

(root)/
lib/
python3.12/
importlib/
__pycache__/
_bootstrap.cpython-312.opt-1.pyc

̑e

dZdZdZdZdZdadZdZGddeZ	GddZ
iZdaGd	d
Z
GddeZd
ZGddZGddZGddZdZdZdZdddZdZdZdZdZGddZddd d!ZdBd"Zd#d$d%Zd&Z d'Z!d(Z"d)Z#d*Z$d+Z%Gd,d-Z&Gd.d/Z'Gd0d1Z(d2Z)dCd3Z*d4Z+d5Z,e,d6zZ-d7Z.e/Z0d8Z1dDd9Z2d#d:d;Z3d<Z4dEd=Z5d>Z6d?Z7d@Z8dAZ9y)FaSCore implementation of import.

This module is NOT meant to be directly imported! It has been designed such
that it can be bootstrapped into Python as the implementation of import. As
such it requires the injection of specific modules and attributes in order to
work. One should use importlib as the public-facing version of this module.

cd	|jS#t$rt|jcYSwxYwN)__qualname__AttributeErrortype)objs H/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/importlib/_bootstrap.py_object_namer	s2&&Cy%%%&s//Nc	dD]&}t||st||t||(|jj	|jy)z/Simple substitute for functools.update_wrapper.)
__module____name__r__doc__N)hasattrsetattrgetattr__dict__update)newoldreplaces   r_wrapr(sFH93 C'#w"789LL%c,tt|Sr)rsysnames r_new_moduler0s49T?rceZdZy)_ListNrrrrrrr7rrc.eZdZdZdZdZddZddZy)_WeakValueDictionaryctj|Gfddtj}||_|jy)NcBeZdZdZfdZfdZefdZxZS)/_WeakValueDictionary.__init__.<locals>.KeyedRef)keycLt||||j}||_|Sr)super__new__remover')robr'self	__class__s    rr*z7_WeakValueDictionary.__init__.<locals>.KeyedRef.__new__Js%wtR=rc:t|||jyr)r)__init__r+)r-r,r'r.s   rr0z8_WeakValueDictionary.__init__.<locals>.KeyedRef.__init__Os T[[1rc}|]|jr&|jj|jytj|j|jyyr)
_iterating_pending_removalsappendr'_weakref_remove_dead_weakrefdata)wrr-self_weakrefs  rr+z6_WeakValueDictionary.__init__.<locals>.KeyedRef.removeRsN$~#..55bff= 55diiH	$r)	rrr	__slots__r*r0staticmethodr+
__classcell__)r.r9s@rKeyedRefr&Fs(I


2
I
Irr=)r5ref	_KeyedRefclear)r-r=r9s  @rr0z_WeakValueDictionary.__init__@s5||D)
	Ix||	I."

rc>g|_t|_i|_yr)r3setr2r7r-s rr@z_WeakValueDictionary.clear`s!#%	rc|jj}|j}		|}tj||#t$rYywxYwr)r3popr7
IndexErrorr5r6)r-rEdr's    r_commit_removalsz%_WeakValueDictionary._commit_removalsesV$$((II
e
))!S1

sA	AANc|jr|j	|j|}|x}|S|S#t$r|cYSwxYwr)r3rHr7KeyError)r-r'defaultr8os     rgetz_WeakValueDictionary.getosW!!!!#	3BT	"
	N	s:AAc	|j|}|=|jr|j|j	|||j|<|S|S#t$rd}YNwxYwr)r7rJr3rHr?)r-r'rKrLs    r
setdefaultz_WeakValueDictionary.setdefault|sm			# A
9%%%%'!^^GS9DIIcNNH	A	sAA%$A%r)rrrr0r@rHrMrOr rrr#r#>s@
2rr#c"eZdZdZdZdZdZy)_BlockingOnManagerz;A context manager responsible to updating ``_blocking_on``.c ||_||_yr)	thread_idlock)r-rSrTs   rr0z_BlockingOnManager.__init__s"	rctj|jt|_|jj|jy)zCMark the running thread as waiting for self.lock. via _blocking_on.N)_blocking_onrOrSr
blocked_onr4rTrCs r	__enter__z_BlockingOnManager.__enter__s4'11$..%'Jtyy)rcN|jj|jy)z6Remove self.lock from this thread's _blocking_on list.N)rWr+rTr-argskwargss   r__exit__z_BlockingOnManager.__exit__styy)rN)rrrr
r0rXr]r rrrQrQsE	**rrQceZdZy)_DeadlockErrorNrr rrr_r_r!rr_c||vry|D]W}|j|x}s||vry|j||Dcgc]}|j}}t||||sWyycc}w)aCheck if 'target_id' is holding the same lock as another thread(s).

    The search within 'blocking_on' starts with the threads listed in
    'candidate_ids'.  'seen_ids' contains any threads that are considered
    already traversed in the search.

    Keyword arguments:
    target_id     -- The thread id to try to reach.
    seen_ids      -- A set of threads that have already been visited.
    candidate_ids -- The thread ids from which to begin.
    blocking_on   -- A dict representing the thread/blocking-on graph.  This may
                     be the same object as the global '_blocking_on' but it is
                     a parameter to reduce the impact that global mutable
                     state has on the result of this function.
    TF)seen_ids
candidate_idsblocking_on)rMaddowner_has_deadlocked)	target_idrarbrctidcandidate_blocking_onrTedgess        rrfrfs M!)4)==%=
H_
S)>>>>9xu')!$?sA#c.eZdZdZdZdZdZdZdZy)_ModuleLockzA recursive lock implementation which is able to detect deadlocks
    (e.g. thread 1 trying to take locks A then B, and thread 2 trying to
    take locks B then A).
    ctj|_tj|_||_d|_g|_g|_yr)	_threadRLockrT
allocate_lockwakeuprrecountwaitersr-rs  rr0z_ModuleLock.__init__sE*MMO	++-	

rcrttjt|jgt
S)N)rgrarbrc)rfrn	get_identrBrerVrCs rhas_deadlockz_ModuleLock.has_deadlock s0
'')U ::,$	
		
rcVtj}t||5	|j5|jgk(s|j
|k(r4||_|jj
d	ddddddy|jrtd||jjdr|jj
dddd|jj|jj#1swY>xYw#1swYyxYw)z
        Acquire the module lock.  If a potential deadlock is detected,
        a _DeadlockError is raised.
        Otherwise, the lock is always acquired and True is returned.
        TNzdeadlock detected by F)
rnrvrQrTrrrer4rwr_rqacquirersreleaser-rhs  rryz_ModuleLock.acquire0s!
T
*;	&YY,2zzR'4::+<&)


))$/#,2;	&;	&D((*,/DTH-MNN{{**51++D1Y,2b##%
##%u,2,2;	&;	&s0DAD1DAD=DD	DD(ctj}|j5|j|k7rt	d|j
j
t|j
sSd|_t|jdkDr4|jj
|jjdddy#1swYyxYw)Ncannot release un-acquired lock)rnrvrTreRuntimeErrorrrrElenrsrqrzr{s  rrzz_ModuleLock.releasets!
YY		*zzS "#DEEJJNNtzz?!
t||$q(LL$$&KK'')		*		*		*sBCCc8d|jdt|S)Nz_ModuleLock() at ridrCs r__repr__z_ModuleLock.__repr__sdii]%4z::rN)	rrrr
r0rwryrzrr rrrlrls#
6p
 B&H*;rrlc(eZdZdZdZdZdZdZy)_DummyModuleLockzVA simple _ModuleLock equivalent for Python builds without
    multi-threading support.c ||_d|_yNr~)rrrrts  rr0z_DummyModuleLock.__init__s	
rc.|xjdz
c_y)NT)rrrCs rryz_DummyModuleLock.acquires

a
rcb|jdk(rtd|xjdzc_y)Nr~r}r)rrrrCs rrzz_DummyModuleLock.releases&::?@AA

a
rc8d|jdt|S)Nz_DummyModuleLock(rrrCs rrz_DummyModuleLock.__repr__s"499-uRXJ??rN)rrrr
r0ryrzrr rrrrs 
@rrceZdZdZdZdZy)_ModuleLockManagerc ||_d|_yr)_name_lockrts  rr0z_ModuleLockManager.__init__s

rclt|j|_|jjyr)_get_module_lockrrryrCs rrXz_ModuleLockManager.__enter__s"%djj1


rc8|jjyr)rrzrZs   rr]z_ModuleLockManager.__exit__s

rN)rrrr0rXr]r rrrrsrrcJtj		t|}|?tt|}nt
|}|fd}tj||t|<tj|S#t$rd}YdwxYw#tjwxYw)zGet or create the module lock for a given module name.

    Acquire/release internally the global import lock to protect
    _module_locks.Nctj	tj||urt|=tj	y#tj	wxYwr)_impacquire_lock
_module_locksrMrelease_lock)r>rs  rcbz_get_module_lock.<locals>.cbsI!!#(%((.#5)$/%%'D%%'sA		A)
rrrrJrnrrlr5r>r)rrTrs   rrrs		 &(D<'-"4(!	
(#+,,tR"8M$K1	D	,	
s)
A;AB;B	BB		BB"czt|}	|j|jy#t$rYywxYw)zAcquires then releases the module lock for a given module name.

    This is used to ensure a module is completely initialized, in the
    event it is being imported by another thread.
    N)rryrzr_)rrTs  r_lock_unlock_modulers=D!D	

	

s.	::c||i|S)a.remove_importlib_frames in import.c will always remove sequences
    of importlib frames that end with a call to this function

    Use it instead of a normal call in places where including the importlib
    frames introduces unwanted noise into the traceback (e.g. when executing
    module code)
    r )fr[kwdss   r_call_with_frames_removedrs
ddrr)	verbosityctjj|k\r?|jdsd|z}t	|j
|tjyy)z=Print the message to stderr if -v/PYTHONVERBOSE is turned on.)#zimport z# )fileN)rflagsverbose
startswithprintformatstderr)messagerr[s   r_verbose_messagersJ
yyI%!!"23WnG
ngnnd##**5&rc*fd}t||S)z1Decorator to verify the named module is built-in.cZ|tjvrt|d|||S)N is not a built-in moduler)rbuiltin_module_namesImportErrorr-fullnamefxns  r_requires_builtin_wrapperz4_requires_builtin.<locals>._requires_builtin_wrappers83333,EF#+-
-4""rr)rrs` r_requires_builtinrs#


#S)$$rc*fd}t||S)z/Decorator to verify the named module is frozen.c`tj|st|d|||S)Nz is not a frozen moduler)r	is_frozenrrs  r_requires_frozen_wrapperz2_requires_frozen.<locals>._requires_frozen_wrappers6~~h',CD#+-
-4""rr)rrs` r_requires_frozenrs#


"C(##rcd}tj|tt||}|tj
vr2tj
|}t
||tj
|St|S)zLoad the specified module into sys.modules and return it.

    This method is deprecated.  Use loader.exec_module() instead.

    zgthe load_module() method is deprecated and slated for removal in Python 3.12; use exec_module() instead)	_warningswarnDeprecationWarningspec_from_loaderrmodules_exec_load)r-rmsgspecmodules     r_load_module_shimr
sa3C
NN3*+Hd+D3;;X&
dF{{8$$T{rct|dd}t|ddx}rt|S	|j}	|j}d|d|dS#t$rd}Y#wxYw#t$r|d|dcYSd|d|d	cYSwxYw)
z,The implementation of ModuleType.__repr__().
__loader__N__spec__?<module  from > ()>)r_module_repr_from_specrr__file__)rloaderrrfilenames     r_module_reprrs
V\4
0Fvz400t0%d++6??$|1555>dXQ''dXRz44	5s(AAAAA;/	A;:A;ceZdZdZdddddZdZdZedZejdZed	Z
ed
ZejdZy)
ModuleSpecaThe specification for a module, used for loading.

    A module's spec is the source for information about the module.  For
    data associated with the module, including source, use the spec's
    loader.

    `name` is the absolute name of the module.  `loader` is the loader
    to use when loading the module.  `parent` is the name of the
    package the module is in.  The parent is derived from the name.

    `is_package` determines if the module is considered a package or
    not.  On modules this is reflected by the `__path__` attribute.

    `origin` is the specific location used by the loader from which to
    load the module, if that information is available.  When filename is
    set, origin will match.

    `has_location` indicates that a spec's "origin" reflects a location.
    When this is True, `__file__` attribute of the module is set.

    `cached` is the location of the cached bytecode file, if any.  It
    corresponds to the `__cached__` attribute.

    `submodule_search_locations` is the sequence of path entries to
    search when importing submodules.  If set, is_package should be
    True--and False otherwise.

    Packages are simply modules that (may) have submodules.  If a spec
    has a non-None value in `submodule_search_locations`, the import
    system will consider modules loaded from the spec as packages.

    Only finders (see importlib.abc.MetaPathFinder and
    importlib.abc.PathEntryFinder) should modify ModuleSpec instances.

    N)originloader_state
is_packagec|||_||_||_||_|rgnd|_g|_d|_d|_yNF)rrrrsubmodule_search_locations_uninitialized_submodules
_set_fileattr_cached)r-rrrrrs      rr0zModuleSpec.__init__WsD	(0:"')+&#rc<d|jd|jg}|j|jd|j|j|jd|j|j
jddj|dS)Nzname=zloader=zorigin=zsubmodule_search_locations=(z, ))rrrr4rr.rjoin)r-r[s  rrzModuleSpec.__repr__ds		}%'@A;;"KK'$++12**6KK5d6U6U5VWX..))*!DIIdO+<A>>rcr|j}	|j|jk(xr{|j|jk(xr`|j|jk(xrE||jk(xr4|j|jk(xr|j
|j
k(S#t$r	tcYSwxYwr)rrrrcachedhas_locationrNotImplemented)r-othersmsls   r__eq__zModuleSpec.__eq__ls..	"II+<KK5<</<KK5<</<E<<<<KK5<</	<
%%););;
=	"!!	"sBB$$B65B6c|jH|j<|jr0tttj|j|_|jSr)rrr_bootstrap_externalNotImplementedError_get_cachedrCs rrzModuleSpec.cachedxsJ<<{{&4+=+=&.--2>>t{{K||rc||_yr)r)r-rs  rrzModuleSpec.cacheds	rcn|j|jjddS|jS)z The name of the module's parent..r~)rr
rpartitionrCs rparentzModuleSpec.parents4**299'',Q//99rc|jSr)rrCs rrzModuleSpec.has_locations!!!rc$t||_yr)boolr)r-values  rrzModuleSpec.has_locations!%[r)rrrr
r0rrpropertyrsetterrrr rrrr2s"H04$ ?
"]]""))rrrrc4|
t|dd}|sEt|dr9tttj}|
|||S|rgnd}||||S|!t|dr	|j|}nd}t||||S#t$rd}YwxYw)	z5Return a module spec based on various loader methods.N_ORIGINget_filename)r)rrrFr)rrrrspec_from_file_locationrrr)rrrrrsearchs      rrrs
~D1gfn5&%%"5"M"M*4??!t&tFBHJ	J6<(
"#..t4

JdF6jII

"!

"s&B		BBc	|j}||S|j}|
	|j}	|j}||
t|dd}|s||}	|j}	t|j}t|||}|dn||k(|_
||_||_|S#t$rYwxYw#t$rYwxYw#t$rd}YwxYw#t$rd}Y~wxYw#t$rd}YywxYw)NrrF)
rrrrrr
__cached__list__path__rrrr)rrrrrlocationrrs        r_spec_from_moduler
s5K??D
~	&&F??~VY5F(.F""*%)&//%:"dF62D"*"289KDDK&@D#KG

		
*%)"*sWB B/B>CC  	B,+B,/	B;:B;>CCCC C.-C.Foverridec||s
t|dd	|j|_|s
t|ddn|j}|X|j
Ltttj}|j|}|j
|_
||_d|_	||_|s
t|dd	|j|_	||_|s
t|dd|j
	|j
|_|j"rP|s
t|dd	|j$|_|s
t|dd |j&	|j&|_|S|S#t$rY=wxYw#t$rYwxYw#t$rYwxYw#t$rYwxYw#t$rYwxYw#t$rYwxYw#t$rY|SwxYw)Nrr__package__rrr)rrrrrrrrNamespaceLoaderr*_pathrrrrrrrrrr)rrrrrs     r_init_module_attrsrs	GFJ5=	"iiFO76<6>>..:&.--"5"E"E(00A#>>$#'	 &F76=$7?	!%F
76:t4<**6
"&"A"Awvz48@
"&++wv|T:B{{&(,F%M6M		8				


"

"

&Ms}EE#/E2F$FF>F.	E E #	E/.E/2	E>=E>	F
F
	FF	F+*F+.	F;:F;cd}t|jdr|jj|}n!t|jdrtd|t	|j
}t
|||S)z+Create a module based on the provided spec.N
create_moduleexec_modulezBloaders that define exec_module() must also define create_module())rrrrrrrrrs  rmodule_from_specr&soFt{{O,**40	m	,=>	>
~TYY'tV$Mrc6|jdn|j}|j8|jd|dSd|dt|jjdS|j
rd|d|jdSd|jd|jdS)z&Return the repr to use for the module.rrrz (namespace) from rrr)rrrrrr)rrs  rrr7s))#3D{{;;dXQ''dX%7T[[=N=N8O7PPQRRdXVDKK?!<<dii]"T[[M<<rc|j}t|5tjj	||urd|d}t||	|j2|jtd|jt||dnt||dt|jdsNt|jd	}tj|t|jj|n|jj|tjj!|j}|tj|j<	ddd|S#tjj!|j}|tj|j<wxYw#1swY|SxYw)
zFExecute the spec's specified module in an existing module's namespace.zmodule z not in sys.modulesrNmissing loaderTrr7.exec_module() not found; falling back to load_module())rrrrrMrrrrrr	rr
ImportWarningload_modulerrE)rrrrs    rrrGsX99D	D	!,;;??4 .D8#67Cc--	,{{"22:%&6TYYGG"4$?"4$?t{{M:*4;;789;;CNN3
6KK++D1KK++F3[[__TYY/F%+CKK		"/,0M[[__TYY/F%+CKK		"/,0Ms&5F5CE*AF5*AF22F55F?c	|jj|jtjj|j}|tj|j<t
|dd	|j|_t
|ddA	|j|_
t|ds#|jjdd|_
t
|dd
	||_
|S|S#|jtjvrFtjj|j}|tj|j<xYw#t$rYwxYw#t$rYwxYw#t$rY|SwxYw)Nrrrrr~r)rrrrrrErrrrrrrrrs  r_load_backward_compatibleresY		*[[__TYY
'F#CKK		v|T*2	 $Fv}d+3	"(F6:.%)YY%9%9#%>q%A"vz4(0	"FOM6M;99#[[__TYY/F%+CKK		"
				
	M	sC%C3;EAE*(E93A%E	E'&E'*	E65E69	FFc|jSt|jds=t|jd}tj	|t
t
|St|}d|_	|tj|j<	|j#|j2td|j|jj|tjj!|j}|tj|j<t#d|j|jd|_|S#	tj|j=#t$rYwxYwxYw#d|_wxYw)NrrTrrzimport {!r} # {!r}F)rrr	rrrrr
_initializingrrrrrrrJrEr)rrrs   r_load_unlockedr!sH{{t{{M2"4;;/0144CNN3
.,T22
d
#F
D#!'DII	{{"22:%&6TYYGG''/+!'DII-tyy$++F"M!	
KK		*


#sJ3E<A
EA'E<E9E*)E9*	E63E95E66E99E<<	Fcnt|j5t|cdddS#1swYyxYw)zReturn a new module object, loaded by the spec's loader.

    The module is not added to its parent.

    If a module is already in sys.modules, that existing module gets
    clobbered.

    N)rrr!rs rrrs-
DII	&$d#$$$s+4ceZdZdZdZed
dZedZedZ	ee
dZee
dZee
d	Z
eeZy)BuiltinImporterzMeta path import for built-in modules.

    All methods are either class or static methods to avoid the need to
    instantiate the class.

    zbuilt-inNc^tj|rt|||jSy)Nr)r
is_builtinrr)clsrpathtargets    r	find_speczBuiltinImporter.find_specs$??8$#Hc#++FFrc|jtjvr$t|jd|jt	t
j|S)zCreate a built-in modulerr)rrrrrrcreate_builtinr#s rrzBuiltinImporter.create_modulesK99C444
-FG#'99.
.()<)<dCCrc8ttj|y)zExec a built-in moduleN)rrexec_builtin)rs rrzBuiltinImporter.exec_modules	"$"3"3V<rcy)z9Return None as built-in modules do not have code objects.Nr r(rs  rget_codezBuiltinImporter.get_codercy)z8Return None as built-in modules do not have source code.Nr r1s  r
get_sourcezBuiltinImporter.get_sourcer3rcy)z4Return False as built-in modules are never packages.Fr r1s  rrzBuiltinImporter.is_packagesrNN)rrrr
rclassmethodr+r;rrrr2r5rrrr rrr%r%sGDD==/0Krr%ceZdZdZdZedZed
dZeddZe	dZ
e	dZed	Zee
d
Zee
dZee
dZy)FrozenImporterzMeta path import for frozen modules.

    All methods are either class or static methods to avoid the need to
    instantiate the class.

    frozenc|j}|j}|t|jdd}t	|d}|j||j|\}}ttj|||_|j}|r|r|jjd|	|r	||_|r,|j|k7r|jj|yyy|j}|du}|j r-|j|j |j|\}	}|rnd}	|	r	|ryy#t$rYwxYw)N__origname__rrorignamer~)rrvarsrEr_resolve_filenamerrrimplementationrinsertrrrextendr?)
r(rrstater?ispkgrpkgdirrrs
          r_fix_up_modulezFrozenImporter._fix_up_modulesS!!=F|''=HFJ/E"44Xtyy%PHf 8S%7%7 8!!!D66H33::1fE&.FO??h.OO**84/66HD(E~~**5>>499eL6
 
A&s8E	EENc|rttddsy	|j}||k7r |jdr
|dd}|s|d}nd	}|j
d
|}|r!tj||}||d}||fSd}tj||d}||fS#t$r!tjdk(rdndx}|_YwxYw)
N_stdlib_dirr7win32\/<rz	.__init__Frz__init__.pyz.py)rr_SEPrplatformrrrJ)r(raliasrFseprelfilerGrs        rrAz FrozenImporter._resolve_filenameIswsM4@	F((Cu""3'#AB<"*95H""3,(gY7F #k2HF//*3%y<H#	F%(\\W%<T#EC#(	FsB'CCc2ttj|}|y|\}}}t|||j|}|j|||\}	}
t
tj|	||_	|
r|jjd|
|S)Nrr>r~)rrfind_frozenrrrArrrBrrrC)r(rr)r*info_rFr?rrrGs           rr+zFrozenImporter.find_specbs()9)98D<"5(#'*{{+02008UK&4D!3!34
++221f=rct|j}	|jj}|r||_|S#t
$rY|SwxYw)zSet __file__, if able.)rrrrrr)rrrs   rrzFrozenImporter.create_modulesTTYY'	+((11H"*
	
	s8	AAc|j}|j}ttj|}t||jyr)rrrrget_frozen_objectexecr)rrrcodes    rrzFrozenImporter.exec_modules4yy()?)?FT6??#rct||}tj|}|\}}}||_t	|jdd|rg|_|j||S)z_Load a frozen module.

        This method is deprecated.  Use exec_module() instead.

        rN)rrrUr=r@rErrH)r(rrrVrWrFr?s       rrzFrozenImporter.load_modulese#31)!5(&VT* FO6"
rc,tj|S)z-Return the code object for the frozen module.)rrZr1s  rr2zFrozenImporter.get_code%%h//rcy)z6Return None as frozen modules do not have source code.Nr r1s  rr5zFrozenImporter.get_sourcer3rc,tj|S)z.Return True if the frozen module is a package.)ris_frozen_packager1s  rrzFrozenImporter.is_packager_rrr7)rrrr
rr8rHrAr+r;rrrrr2r5rr rrr:r:sGB%B%H  0:

$$$0000rr:ceZdZdZdZdZy)_ImportLockContextz$Context manager for the import lock.c,tjy)zAcquire the import lock.N)rrrCs rrXz_ImportLockContext.__enter__rc,tjy)z<Release the import lock regardless of any raised exceptions.N)rr)r-exc_type	exc_value
exc_tracebacks    rr]z_ImportLockContext.__exit__rfrN)rrrr
rXr]r rrrdrds.rrdc~|jd|dz
}t||krtd|d}|r|d|S|S)z2Resolve a relative module name to an absolute one.rrz2attempted relative import beyond top-level packager~)rsplitrr)rpackagelevelbitsbases     r
_resolve_namerqsO>>#uqy)D
4y5NOO7D#dV1TF--rctj}|td|stj	dt
|tjv}|D]q}t5	|j}||||}	ddd1|s<|tjvr*tj|}	|j}	|	|cS|	cS|cSy#t$rYdddwxYw#1swYgxYw#t$r|cYcSwxYw)zFind a module's spec.Nz5sys.meta_path is None, Python is likely shutting downzsys.meta_path is empty)r	meta_pathrrrrrrdr+rr)
rr)r*rs	is_reloadfinderr+rrrs
          r
_find_specrvs

I*+	+/?
#I

!	5
5",,	!tV4
	5!4T*(%H '#'36/"
		5	5
	5	5&  K	 sBCC)
C'C&	CCCCC#	&C65C6ct|tstdt||dkrt	d|dkDr(t|tstd|std|s|dk(rt	dyy)zVerify arguments are "sane".zmodule name must be str, not r~zlevel must be >= 0z__package__ not set to a stringz6attempted relative import with no known parent packagezEmpty module nameN)
isinstancestr	TypeErrorr
ValueErrorrrrmrns   r
_sanity_checkr}sdC 7T
|DEEqy-..qy'3'=>>()
)EQJ,--4rzNo module named z{!r}cVd}|jdd}d}|r|tjvrt|||tjvrtj|Stj|}	|j}|j}|jdd}t||}|tt|||r|jj	t|}	|r|jj	|r#tj|}	t||	|	S|	S#t
$rt|d|d}t||dwxYw#|r|jjwwxYw#t
$r&d|d}tj!|t"Y|	SwxYw)	Nrr~z; z is not a packagerzCannot set an attribute on z for child module )rrrrrr_ERR_MSG_PREFIXModuleNotFoundErrorrrvrr4r!rErrrr)
rimport_r)rparent_spec
parent_modulerchildrrs
          r_find_and_load_unlockedrsD
__S
!!
$FK
$%gv63;;;;t$$F+
	@ ))D$,,$Q'dD!D|!_$5dX">TJJ
1188?	<#D)F5599;
F+
	/M5&1M6M5	@$%dXRz9JKC%c54?	@ 5599;	//z9KE9UCNN3
.M	/s*2D.E
E9.&EE69+F('F(ctjj|t}|tust	t	|ddddrat|5tjj|t}|turt
||cdddS	dddt||d|d}t|||S#1swY+xYw)zFind and load the module.rNr Fz
import of z halted; None in sys.modulesr)	rrrM_NEEDS_LOADINGrrrrr)rrrrs    r_find_and_loadr?s
[[__T>
2F. 
D1?EJ

%	>[[__T>:F'.tW=	>	>'	>	D!
~tf$@A!'55M	>	>s8B==Cc`t||||dkDr
t|||}t|tS)a2Import and return the module based on its name, the package the call is
    being made from, and the level adjustment.

    This function represents the greatest common denominator of functionality
    between import_module and __import__. This includes setting __package__ if
    the loader did not.

    r~)r}rqr_gcd_importr|s   rrrYs2$'qyT7E2$,,r	recursivec	|D]}t|ts8|r|jdz}nd}td|dt	|j|dk(r*|rSt|ds`t
||j|dzt||r|jd	|}	t|||S#t$r>}|j|k(r)tjj|tYd
}~d
}~wwxYw)zFigure out what __import__ should return.

    The import_ parameter is a callable which takes the name of module to
    import. It is required to decouple the function from assuming importlib's
    import implementation is desired.

    z.__all__z
``from list''zItem in z must be str, not *__all__TrrN)rxryrrzrr_handle_fromlistrrrrrrrMr)rfromlistrrxwhere	from_nameexcs        rrrhs!S!*4'hug.##'7#3#3"467
7
#X!; +/1#!??+1QC0I	
)'9=0M'
HH	)KKOOI~>J
sB,,	C353C.-C..C3c\|jd}|jd}|@|<||jk7r-tjd|d|jdtd|S||jStjdt
d|d	}d
|vr|j
dd}|S)
zCalculate what __package__ should be.

    __package__ is not guaranteed to be defined or could be set to None
    to represent that its proper value is unknown.

    rrz __package__ != __spec__.parent (z != r)
stacklevelzYcan't resolve package from __spec__ or __package__, falling back on __name__ and __path__rrrr~)rMrrrrrr)globalsrmrs   r_calc___package__rskk-(G;;z"D4;; 6NN&kdkk_A?-!

=	
	{{?$		4*%W$((-a0GNrc|dk(rt|}n||ni}t|}t|||}|s|dk(rt|jddS|s|St|t|jddz
}tj
|jdt|j|z
St|drt||tS|S)aImport a module.

    The 'globals' argument is used to infer where the import is occurring from
    to handle relative imports. The 'locals' argument is ignored. The
    'fromlist' argument specifies what should exist as attributes on the module
    being imported (e.g. ``from module import <fromlist>``).  The 'level'
    argument represents the package location to import from in a relative
    import (e.g. ``from ..pkg import mod`` would have a 'level' of 2).

    r~Nrr)	rr	partitionrrrrrr)	rrlocalsrrnrglobals_rmcut_offs	         r
__import__rs
zT"%17r#H-T7E2A:t~~c21566M$i#dnnS&9!&<"==G;;v/LFOO0DW0LMNN		$+>>
rcbtj|}|td|zt|S)Nzno built-in module named )r%r+rr!)rrs  r_builtin_from_namers3$$T*D|5<==$rc,|a|att}tjj	D]z\}}t||s|tjvrt}ntj|rt}nIt||}t|||tusj|j||tjt}dD]@}|tjvrt|}	ntj|}	t|||	Bt!ay)zSetup importlib by importing needed built-in modules and injecting them
    into the global namespace.

    As sys is needed for sys.modules access and _imp is needed to load built-in
    modules, those two modules must be explicitly passed in.

    )rnrr5N)rrrritemsrxrr%rr:r
rrHrrrr#rV)

sys_module_imp_modulemodule_typerrrrself_modulebuiltin_namebuiltin_modules
          r_setuprsD
Cs)K))+.ffk*s///(%'$VV4DtV,'%%f-.++h'K<;s{{*/=N [[6N\>:;()Lrct||tjjttjjt
y)z0Install importers for builtin and frozen modulesN)rrrsr4r%r:)rrs  r_installrs0
:{#MM)MM(rc\ddl}|a|jtjt
y)z9Install importers that require external filesystem accessr~N)_frozen_importlib_externalrrrrr)rs r_install_external_importersrs$&4''H(=>rr7rr)NNr r~):r
r	rnrr5rrrrrr#rrVrQrr_rfrlrrrrrrrrrrrrr
rrrrrr!rr%r:rdrqrvr}r_ERR_MSGrobjectrrrrrrrrrrr rr<module>rs,&	&	D	II\
**,	\	
(V`;`;F@@* "J"016%$&6*a)a)H.2dJ:'T27FR"= <"H)Z
$1111h~0~0F

.*Z
. %V#'T4->C"J6"J %*P)?r