
    wBf                     J    d dl mZ d dlmZ  ee      Zd ZddZd	dZd	dZ	y)
    )	getLogger)dedentc                 4    t        |       j                         S )zdedent and left-strip)r   lstrip)strings    0lib/python3.12/site-packages/conda/auxlib/ish.pydalsr	      s    &>  ""    c                     	 t        | |      S # t        $ r( |D ]!  }	 t        | |      c cY S # t        $ r Y w xY w  w xY w)N)getattrAttributeError)obj	attr_namealiasesaliass       r   	_get_attrr      s[    	sI&&  	EsE**! 	 s     ?-?	9?9?c                     	 t        ||   | |      }||S t        | |dd |      S # t        $ r t        | |||dz         cY S t        $ r Y yw xY w)a  Return the value of the first key found in the list of search_maps,
    otherwise return None.

    Examples:
        >>> from .collection import AttrDict
        >>> d1 = AttrDict({'a': 1, 'b': 2, 'c': 3, 'e': None})
        >>> d2 = AttrDict({'b': 5, 'e': 6, 'f': 7})
        >>> find_or_none('c', (d1, d2))
        3
        >>> find_or_none('f', (d1, d2))
        7
        >>> find_or_none('b', (d1, d2))
        2
        >>> print(find_or_none('g', (d1, d2)))
        None
        >>> find_or_none('e', (d1, d2))
        6

    N   )r   find_or_noner   
IndexErrorkeysearch_mapsr   
_map_indexattrs        r   r   r      sj    (Z0#w?'tX\#{12PW-XX ECgz!|DD s   & & AAAc                     	 t        ||   | |      }||S t        | |dd  |      S # t        $ r t        | |||dz         cY S t        $ r t               w xY w)Nr   )r   find_or_raiser   r   r   s        r   r   r   8   sp    Z0#w?'tY]3ABQX-YY FS+w
1EE s   & & AAN) )r   r   )
loggingr   textwrapr   __name__logr	   r   r   r   r   r
   r   <module>r#      s)     #

>	r
   