Ë
    G)f)  ã            	       óŠ  — d dl mZ d dlmZ d dlmZ d dlmZ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e   deeef   fd„Zdded
ee   dee   fd„Zddeded
ee   defd„Zdded
ee   defd„Zdd
ee   de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	)é    )Ú	getLogger)Úcompile)ÚMappingProxyType)ÚMappingÚOptional)Ú
create_keyÚ	get_valueÚ	set_value)ÚContext)Ú_BAGGAGE_PROPERTY_FORMATÚ_KEY_FORMATÚ_VALUE_FORMATÚbaggageNÚcontextÚreturnc                 óp   — t        t        | ¬«      }t        |t        «      rt	        |«      S t	        i «      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	   Ú_BAGGAGE_KEYÚ
isinstanceÚdictr   )r   r   s     úa/var/www/html/flask-app/venv/lib/python3.12/site-packages/mysql/opentelemetry/baggage/__init__.pyÚget_allr   $   s0   € ô œ¨gÔ6€GÜ�'œ4Ô Ü Ó(Ð(Ü˜BÓÐó    Ú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   5   s   € ô ˜7Ô#×'Ñ'¨Ó-Ð-r   Úvaluec                 óZ   — t        t        |¬«      «      }||| <   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   r   r
   r   )r   r   r   r   s       r   Úset_baggager    D   s+   € ô ”7 7Ô+Ó,€GØ€GˆD�MÜ”\ 7°GÔ<Ð<r   c                 ót   — t        t        |¬«      «      }|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#   T   s0   € ô ”7 7Ô+Ó,€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%   d   s   € ô ”\ 2¨wÔ7Ð7r   c                 óB   — t         j                  t        | «      «      d uS ©N)Ú_KEY_PATTERNÚ	fullmatchÚstr)r   s    r   Ú_is_valid_keyr+   p   s   € Ü×!Ñ!¤# d£)Ó,°DÐ8Ð8r   c                 óÒ   — t        | «      j                  d«      }t        j                  |d   «      d u}t	        |«      dkD  r$|dd  D ]  }t
        j                  |«      �Œd} |S  |S )Nú;r   é   F)r*   ÚsplitÚ_VALUE_PATTERNr)   ÚlenÚ_PROPERT_PATTERN)r   ÚpartsÚis_valid_valueÚpropertys       r   Ú_is_valid_valuer6   t   sv   € Ü�‹J×Ñ˜SÓ!€EÜ#×-Ñ-¨e°A©hÓ7¸tÐC€NÜ
ˆ5ƒz�A‚~Ø˜a˜b˜	ò 	ˆHÜ×)Ñ)¨(Ó3Ñ;Ø!&�ØØÐð		ð Ðr   Úkeyc                 ó2   — t        | «      xr t        |«      S r'   )r+   r6   )r7   r   s     r   Ú_is_valid_pairr9      s   € Ü˜ÓÒ8¤/°%Ó"8Ð8r   r'   )$Úloggingr   Úrer   Útypesr   Útypingr   r   Úmysql.opentelemetry.contextr   r	   r
   Ú#mysql.opentelemetry.context.contextr   Úmysql.opentelemetry.util.rer   r   r   r   Ú__name__Ú_loggerr(   r0   r2   r*   Úobjectr   r   r    r#   r%   Úboolr+   r6   r9   © r   r   ú<module>rF      sF  ðõ Ý Ý "ß $ç HÑ HÝ 7÷ñ ñ ˜)Ó$€Ù
�HÓ
€á�{Ó#€Ù˜Ó'€ÙÐ3Ó4Ð ð "&ñ Ø�gÑð àˆS�&ˆ[Ñó ñ".�cð . H¨WÑ$5ð .ÀÈ&ÑAQó .ñ=�cð = &ð =°8¸GÑ3Dð =ÐPWó =ñ =˜ð = x°Ñ'8ð =ÀGó =ñ 	8�8˜GÑ$ð 	8°ó 	8ð9˜ð 9 ó 9ð˜6ð  dó ð9˜ð 9 Cð 9¨Dô 9r   