Ë
    `Qêjì  ã            	       ó¨  — d dl mZ d dlmZ d dlmZ d dlmZ d dlm	Z	m
Z
mZ d dlmZ d dlmZmZmZ  e	d«      Z ee«      Z ee«      Z ee«      Z ee«      Z	 dd
ed	z  deeef   fd„Zdded
ed	z  ded	z  fd„Zddeded
ed	z  defd„Zdded
ed	z  defd„Zdd
ed	z  defd„Zdd
ed	z  deeef   fd„Z dede!fd„Z"dede!fd„Z#dedede!fd„Z$y	)é    )ÚMapping)Ú	getLogger)Úcompile)ÚMappingProxyType)Ú
create_keyÚ	get_valueÚ	set_value)ÚContext)Ú_BAGGAGE_PROPERTY_FORMATÚ_KEY_FORMATÚ_VALUE_FORMATÚbaggageNÚcontextÚreturnc                 ó,   — t        t        | ¬«      «      S )z»Returns the name/value pairs in the Baggage

    Args:
        context: The Context to use. If not set, uses current Context

    Returns:
        The name/value pairs in the Baggage
    ©r   )r   Ú_get_baggage_valuer   s    úc/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/opentelemetry/baggage/__init__.pyÚget_allr      s   € ô Ô.°wÔ?Ó@Ð@ó    Únamec                 ó8   — t        |¬«      j                  | «      S )a=  Provides access to the value for a name/value pair in the
    Baggage

    Args:
        name: The name of the value to retrieve
        context: The Context to use. If not set, uses current Context

    Returns:
        The value associated with the given name, or null if the given name is
        not present.
    r   )r   Úget)r   r   s     r   Úget_baggager   '   s   € ô  gÔ.×2Ñ2°4Ó8Ð8r   Úvaluec                 ód   — t        |¬«      j                  «       }||| <   t        t        ||¬«      S )zóSets a value in the Baggage

    Args:
        name: The name of the value to set
        value: The value to set
        context: The Context to use. If not set, uses current Context

    Returns:
        A Context with the value updated
    r   )r   Úcopyr	   Ú_BAGGAGE_KEY)r   r   r   r   s       r   Úset_baggager   6   s/   € ô !¨Ô1×6Ñ6Ó8€GØ€GˆD�MÜ”\ 7°GÔ<Ð<r   c                 ó~   — t        |¬«      j                  «       }|j                  | d«       t        t        ||¬«      S )zàRemoves a value from the Baggage

    Args:
        name: The name of the value to remove
        context: The Context to use. If not set, uses current Context

    Returns:
        A Context with the name/value removed
    r   N)r   r   Úpopr	   r   )r   r   r   s      r   Úremove_baggager"   F   s4   € ô !¨Ô1×6Ñ6Ó8€GØ‡K�K��dÔä”\ 7°GÔ<Ð<r   c                 ó&   — t        t        i | ¬«      S )zºRemoves all values from the Baggage

    Args:
        context: The Context to use. If not set, uses current Context

    Returns:
        A Context with all baggage entries removed
    r   )r	   r   r   s    r   Úclearr$   V   s   € ô ”\ 2¨wÔ7Ð7r   c                 óL   — t        t        | ¬«      }t        |t        «      r|S i S )Nr   )r   r   Ú
isinstanceÚdict)r   r   s     r   r   r   b   s"   € Üœ¨gÔ6€GÜ�'œ4Ô ØˆØ€Ir   c                 óB   — t         j                  t        | «      «      d uS ©N)Ú_KEY_PATTERNÚ	fullmatchÚstr)r   s    r   Ú_is_valid_keyr-   i   s   € Ü×!Ñ!¤# d£)Ó,°DÐ8Ð8r   c                 óð   — t        | «      j                  d«      }t        j                  |d   j	                  d«      «      d u}t        |«      dkD  r$|dd  D ]  }t        j                  |«      �Œd} |S  |S )Nú;r   z 	é   F)r,   ÚsplitÚ_VALUE_PATTERNr+   ÚrstripÚlenÚ_PROPERT_PATTERN)r   ÚpartsÚis_valid_valueÚpropertys       r   Ú_is_valid_valuer9   m   s   € Ü�‹J×Ñ˜SÓ!€Eä#×-Ñ-¨e°A©h¯o©o¸eÓ.DÓEÈTÐQ€NÜ
ˆ5ƒz�A‚~Ø˜a˜b˜	ò 	ˆHÜ×)Ñ)¨(Ó3Ñ;Ø!&�ØØÐð		ð Ðr   Úkeyc                 ó2   — t        | «      xr t        |«      S r)   )r-   r9   )r:   r   s     r   Ú_is_valid_pairr<   y   s   € Ü˜ÓÒ8¤/°%Ó"8Ð8r   r)   )%Úcollections.abcr   Úloggingr   Úrer   Útypesr   Úopentelemetry.contextr   r   r	   Úopentelemetry.context.contextr
   Úopentelemetry.util.rer   r   r   r   Ú__name__Ú_loggerr*   r2   r5   r,   Úobjectr   r   r   r"   r$   r'   r   Úboolr-   r9   r<   © r   r   ú<module>rI      sb  ðõ $Ý Ý Ý "ç BÑ BÝ 1÷ñ ñ ˜)Ó$€Ù
�HÓ
€á�{Ó#€Ù˜Ó'€ÙÐ3Ó4Ð ð #ñAØ�t‰^ðAàˆS�&ˆ[ÑóAñ9�cð 9 G¨d¡Nð 9¸fÀt¹mó 9ñ=�cð = &ð =°7¸T±>ð =ÈWó =ñ =˜ð = w°¡~ð =Àó =ñ 	8�7˜T‘>ð 	8¨Wó 	8ñ ¨$¡ð ¸$¸sÀF¸{Ñ:Kó ð9˜ð 9 ó 9ð	˜6ð 	 dó 	ð9˜ð 9 Cð 9¨Dô 9r   