+
    ~j                     P    ^ RI HtHt ^ RIHt RR lt]]33R lt ! R R4      t	R# )	    )defaultdictdeque)filterfalseNc              #     "   \        4       pVP                  pVf,   \        VP                  V 4       F  pV! V4       Vx  K  	  R# V  F  pV! V4      pWR9  g   K  V! V4       Vx  K!  	  R# 5i)zHList unique elements, preserving order. Remember all elements ever seen.N)setaddr   __contains__)iterablekeyseenseen_addelementks   &&    r/Users/mitch_tango/dev/rabbit-r1-livekit/agent/.venv/lib/python3.14/site-packages/importlib_metadata/_itertools.pyunique_everseenr      sg      5DxxH
{"4#4#4h?GWM @  GGA}	  s   AA/A/c                    V f   \        R4      # Ve   \        W4      '       d   \        V 34      #  \        V 4      #   \         d    \        T 34      u # i ; i)a  If *obj* is iterable, return an iterator over its items::

    >>> obj = (1, 2, 3)
    >>> list(always_iterable(obj))
    [1, 2, 3]

If *obj* is not iterable, return a one-item iterable containing *obj*::

    >>> obj = 1
    >>> list(always_iterable(obj))
    [1]

If *obj* is ``None``, return an empty iterable:

    >>> obj = None
    >>> list(always_iterable(None))
    []

By default, binary and text strings are not considered iterable::

    >>> obj = 'foo'
    >>> list(always_iterable(obj))
    ['foo']

If *base_type* is set, objects for which ``isinstance(obj, base_type)``
returns ``True`` won't be considered iterable.

    >>> obj = {'a': 1}
    >>> list(always_iterable(obj))  # Iterate over the dict's keys
    ['a']
    >>> list(always_iterable(obj, base_type=dict))  # Treat dicts as a unit
    [{'a': 1}]

Set *base_type* to ``None`` to avoid any special handling and treat objects
Python considers iterable as iterable:

    >>> obj = 'foo'
    >>> list(always_iterable(obj, base_type=None))
    ['f', 'o', 'o']
 )iter
isinstance	TypeError)obj	base_types   &&r   always_iterabler      sY    R {Bx:c#=#=SF|Cy SF|s   
= AAc                   F   a  ] tR t^Nt o RtR	R ltR tR tR tR t	Rt
V tR# )
bucketar  Wrap *iterable* and return an object that buckets the iterable into
child iterables based on a *key* function.

    >>> iterable = ['a1', 'b1', 'c1', 'a2', 'b2', 'c2', 'b3']
    >>> s = bucket(iterable, key=lambda x: x[0])  # Bucket by 1st character
    >>> sorted(list(s))  # Get the keys
    ['a', 'b', 'c']
    >>> a_iterable = s['a']
    >>> next(a_iterable)
    'a1'
    >>> next(a_iterable)
    'a2'
    >>> list(s['b'])
    ['b1', 'b2', 'b3']

The original iterable will be advanced and its items will be cached until
they are used by the child iterables. This may require significant storage.

By default, attempting to select a bucket to which no items belong  will
exhaust the iterable and cache all values.
If you specify a *validator* function, selected buckets will instead be
checked against it.

    >>> from itertools import count
    >>> it = count(1, 2)  # Infinite sequence of odd numbers
    >>> key = lambda x: x % 10  # Bucket by last digit
    >>> validator = lambda x: x in {1, 3, 5, 7, 9}  # Odd digits only
    >>> s = bucket(it, key=key, validator=validator)
    >>> 2 in s
    False
    >>> list(s[2])
    []

Nc                ~    \        V4      V n        W n        \        \        4      V n        T;'       g    R  V n        R# )c                     R # )Tr   )xs   &r   <lambda>!bucket.__init__.<locals>.<lambda>v   s    $    N)r   _it_keyr   r   _cache
_validator)selfr
   r   	validators   &&&&r   __init__bucket.__init__r   s-    >	!%(#77r!   c                    V P                  V4      '       g   R #  \        W,          4      pV P                  V,          P                  V4       R#   \         d     R # i ; i)FT)r%   nextr$   
appendleftStopIteration)r&   valueitems   && r   r	   bucket.__contains__x   sU    u%%	0$D KK))$/  		s   A AAc              #    "    V P                   V,          '       d&   V P                   V,          P                  4       x  K?    \        V P                  4      pT P                  T4      pY18X  d   Tx  Ks  T P                  T4      '       g   KM  T P                   T,          P                  T4       Kq    \         d     R# i ; i5i)z
Helper to yield items from the parent iterator that match *value*.
Items that don't match are stored in the local cache as they
are encountered.
N)r$   popleftr+   r"   r-   r#   r%   append)r&   r.   r/   
item_values   &&  r   _get_valuesbucket._get_values   s       {{5!!kk%(0022 #DHH~ "&4J!*"
44J/66t< ) s4   C&CB3 1C$C3C>CCCc              #    "   V P                    FO  pV P                  V4      pV P                  V4      '       g   K-  V P                  V,          P	                  V4       KQ  	  V P                  P                  4        R j  xL
  R #  L5iN)r"   r#   r%   r$   r3   keys)r&   r/   r4   s   &  r   __iter__bucket.__iter__   s^     HHD4Jz**J'..t4 
 ;;##%%%s   5BAB?B Bc                h    V P                  V4      '       g   \        R4      # V P                  V4      # )Nr   )r%   r   r5   )r&   r.   s   &&r   __getitem__bucket.__getitem__   s+    u%%8O&&r!   )r$   r"   r#   r%   r8   )__name__
__module____qualname____firstlineno____doc__r(   r	   r5   r:   r=   __static_attributes____classdictcell__)__classdict__s   @r   r   r   N   s)     !F8=4&' 'r!   r   r8   )
collectionsr   r   	itertoolsr   r   strbytesr   r   r   r!   r   <module>rK      s+    * !& %(< 2l]' ]'r!   