+
     hp  c                   s   ^ RI t ^ RIt ^ RIt^ RIt^ RIt^ RIt. ROt]P                  ! R4      t	 ! R R]
4      t ! R	 R]4      t ! R
 R]4      t ! R R]4      t ! R R]4      t] P                   P"                  3R ltRR ltRR ltR# )i    NLibraryExceptionLibraryNotFoundExceptionNoLibraryCandidatesExceptionLibraryNotLoadedExceptionLibraryMissingSymbolsExceptionzusb.libloaderc                   s    ] tR t^7tRtR# )r     NZ__name__Z
__module__Z__qualname__Z__firstlineno__Z__static_attributes__r       2/usr/lib/python3.14/site-packages/usb/libloader.pyr    r    7       r   c                   s    ] tR t^:tRtR# )r   r   Nr   r   r   r   r   r   :   r	   r   c                   s    ] tR t^=tRtR# )r   r   Nr   r   r   r   r   r   =   r	   r   c                   s    ] tR t^@tRtR# )r   r   Nr   r   r   r   r   r   @   r	   r   c                   s    ] tR t^CtRtR# )r   r   Nr   r   r   r   r   r   C   r	   r   c                s@   Vf   \         P                  P                  p\        P                  R8H  ;'       d    V\         P                  P                  J p\        P                  R8H  ;'       d=    \        P
                  ! 4       R8H  ;'       d    V\         P                  P                  J pV  Fk  pV'       d
   VR,          pV! V4      pV'       d   Vu # V'       g   K2  RV,           R,           p\        P                  P                  V4      '       g   Ki  Vu # 	  R# )a  Tries to locate a library listed in candidates using the given
find_library() function (or ctypes.util.find_library).
Returns the first library found, which can be the library's name
or the path to the library file, depending on find_library().
Returns None if no library is found.

arguments:
* candidates   -- iterable with library names
* find_library -- function that takes one positional arg (candidate)
                  and returns a non-empty str if a library has been found.
                  Any "false" value (None,False,empty str) is interpreted
                  as "library not found".
                  Defaults to ctypes.util.find_library if not given or
                  None.
Nwin32ZdarwinZarm64z.dllz/opt/homebrew/lib/z.dylib)	ctypesutilfind_librarysysplatformZmachineosZpathZisfile)
candidatesr   Zuse_dll_workaroundZuse_apple_silicon_workaroundZ	candidateZlibnames   &&    r   locate_libraryr   G   s      {{// 	LLLFKK4L4L$L 
 	  	9 	9X%5%5%77%B 	9 	9 8 88 !
  	Iy)N
 ('*Y6AGww~~g&&  " r   c                s    V'       d	   V! V 4      # \         P                  ! V 4      #   \         dX    T'       d   T: RT : R2pMT pTR,          p\        P                  R8X  d
   TR,          p\
        P                  TRR7        R# i ; i)	a3  Loads a library. Catches and logs exceptions.

Returns: the loaded library or None

arguments:
* lib        -- path to/name of the library to be loaded
* name       -- the library's identifier (for logging)
                Defaults to None.
* lib_cls    -- library class. Defaults to None (-> ctypes.CDLL).
z (Z)z could not be loadedcygwinz
 in cygwinT)Zexc_infoN)r   ZCDLLZ	Exceptionr   r   _LOGGERerror)libnameZlib_clsZlib_msgs   &&& r   load_libraryr   v   sx    3<;;s## #'-GG))<<8#|#Gg-s   ( ( ( B
AB
	B
c                s   \         P                  R8X  d!   V'       d   \        WV4      pM\        V4      hV '       d   \	        W4      p	V	'       dQ   \
        P                  RT;'       g    T V	4       \         P                  R8X  d   \        WV4      pMC\        WV4      pM6\
        P                  RT;'       g    T 4       \        V4      h\        V4      hVf   \        V4      hV'       dT   V U
u. uF  p
\        W4      '       d   K  V
NK  	  pp
V'       d&   RX	V3p\
        P                  V4       \        V	4      hV# V# u up
i )a  Locates and loads a library.

Returns: the loaded library

arguments:
* candidates    -- candidates list for locate_library()
* cygwin_lib    -- name of the cygwin library
* name          -- lib identifier (for logging). Defaults to None.
* win_cls       -- class that is used to instantiate the library on
                   win32 platforms. Defaults to None (-> ctypes.CDLL).
* cygwin_cls    -- library class for cygwin platforms.
                   Defaults to None (-> ctypes.CDLL).
* others_cls    -- library class for all other platforms.
                   Defaults to None (-> ctypes.CDLL).
* find_library  -- see locate_library(). Defaults to None.
* check_symbols -- either None or a list of symbols that the loaded lib
                   must provide (hasattr(<>)) in order to be considered
                   valid. LibraryMissingSymbolsException is raised if
                   any symbol is missing.

raises:
* NoLibraryCandidatesException
* LibraryNotFoundException
* LibraryNotLoadedException
* LibraryMissingSymbolsException
r   z%r found as %sr
   z%r could not be foundz%r, missing symbols: %r)r   r   r   r   r   r   Zdebugr   r   r   Zhasattrr   )r   Z
cygwin_libr   Zwin_clsZ
cygwin_clsZ
others_clsr   Zcheck_symbolsZ
loaded_libr   ZsZsymbols_missingZmsgs   &&&&&&&&     r   load_locate_libraryr      s   : ||x%j
CJ.t44	Z6MM*T-?-?Z#F||w&)#W=
)#Z@
MM1D4F4FJH*400*400'--	,
,!GJ4JAA} 	 
 ,c?DCMM#055
s   2E
E)r    r   r   r   r   r   r   r   )NN)NNNNN)r   Zctypes.utilZloggingZos.pathr   r   r   Z__all__Z	getLoggerr   ZOSErrorr    r   r   r   r   r   r   r   r   r   r   r   r   <module>r      s   B      
	 

O
,	w 		/ 		#; 		 0 		%5 	 -3KK,D,D -^:=r   