
    ce                    ^   d Z ddlmZ g dZddlZddlZddlZ ej        d          Z ej        dd          Z	 G d	 d
ej
                  Z G d dej
                  Z ej        dddd           G d dej        e	                               Z G d dej        e                   ZdS )zXCommon configuration structures to use in :mod:`~anaconda_navigator.config.preferences`.    )annotations)SidebarLinkSidebarSocialInterval	IntervalsNTT_coT)	covariantc                  2    e Zd ZU dZded<   ded<   ded<   dS )r   z*Description of a single link in a sidebar.strtexturl
utm_mediumN__name__
__module____qualname____doc____annotations__     Dlib/python3.11/site-packages/anaconda_navigator/config/structures.pyr   r      s1         44IIIHHHOOOOOr   r   c                  (    e Zd ZU dZded<   ded<   dS )r   z3Description of a single social button in a sidebar.r   r   r   Nr   r   r   r   r   r      s(         ==IIIHHHHHr   r   F)auto_attribseqfrozenslotsc                  (    e Zd ZU dZded<   ded<   dS )r   z
    Value that repeats `count` times.

    :param count: how many times the value should be repeated.
    :param value: value that should be repeated.
    intcountr	   valueNr   r   r   r   r   r   !   s.           JJJKKKKKr   r   c                  b    e Zd ZdZdZddddZedd            Zedd            ZddddZ	dS )r   a?  
    Sequence of repeating values.

    :param args: values to store in this sequence.
    :param offset: index of the first value in the sequence. This allows creating custom sequences, which may start
                   from any custom index (e.g. create sequence with indices from -5 to 15, or from 100 to 123).
    )__keys__offset__valuesr   )offsetargsInterval[T]r&   r   returnNonec               L   |st          dt          j         d          g | _        || _        g | _        |dz  }|D ]g}|j        dk    rt          d|j                   ||j        z  }| j                            |           | j                            |j	                   hdS )z,Initialize new :class:`~Intervals` instance.zat least single z must be provided   r   z:each item may repeat only a positive number of times, not N)
	TypeErrorr   r   _Intervals__keys_Intervals__offset_Intervals__valuesr    
ValueErrorappendr!   )selfr&   r'   args       r   __init__zIntervals.__init__9   s     	USx/@SSSTTT68+168!  	, 	,CyA~~ !i^a^g!i!ijjjciFKv&&&M  ++++	, 	,r   c                    | j         S )z+Index of the first element in the sequence.)r/   r3   s    r   firstzIntervals.firstM   s     }r   c                    | j         d         S )z*Index of the last element in the sequence.)r.   r7   s    r   lastzIntervals.lastR   s     {2r   F)strictindexr<   boolr   c                  |rJ|| j         k     rt          d| j                   || j        d         k    rt          d| j                   t          j        | j        |dt          | j                  dz
            }| j        |         S )z
        Retrieve element at `index`.

        If `strict` is set - method may raise an :exc:`~IndexError` if invalid item is requested. Otherwise - method
        will return value closest to the requested index.
        zindex must be at least r:   zindex must be at most r   r,   )r/   
IndexErrorr.   bisectbisect_leftlenr0   )r3   r=   r<   s      r   getzIntervals.getW   s      	Mt}$$ !L4=!L!LMMMt{2&& !K$-!K!KLLL"4;q#dk:J:JQ:NOO}U##r   N)r'   r(   r&   r   r)   r*   )r)   r   )r=   r   r<   r>   r)   r   )
r   r   r   r   	__slots__r5   propertyr8   r;   rD   r   r   r   r   r   .   s          3I9: , , , , , ,(    X    X 16 $ $ $ $ $ $ $ $r   r   )r   
__future__r   __all__rA   typingattrTypeVarr   r	   
NamedTupler   r   sGenericr   r   r   r   r   <module>rO      sU   _ ^ " " " " " "
C
C
C   FN3v~f---    &#       F%    TeD===	 	 	 	 	v~d# 	 	 >=	7$ 7$ 7$ 7$ 7$q! 7$ 7$ 7$ 7$ 7$r   