File: //opt/alt/python311/lib/python3.11/site-packages/botocore/__pycache__/useragent.cpython-311.pyc
�
/�;f�G � � � d Z ddlZddlZddlmZ ddlmZmZ ddlmZm Z ddl
mZ ddl
mZ eez dz Zd Zd
diZdZd
� Z G d� de� � Z G d� d� � Z ddlmZ n# e$ r d� ZY nw xY w G d� d� � Zd� ZdS )a�
NOTE: All classes and functions in this module are considered private and are
subject to abrupt breaking changes. Please do not use them directly.
To modify the User-Agent header sent by botocore, use one of these
configuration options:
* The ``AWS_SDK_UA_APP_ID`` environment variable.
* The ``sdk_ua_app_id`` setting in the shared AWS config file.
* The ``user_agent_appid`` field in the :py:class:`botocore.config.Config`.
* The ``user_agent_extra`` field in the :py:class:`botocore.config.Config`.
� N)�copy)�
ascii_letters�digits)�
NamedTuple�Optional)�__version__)�HAS_CRTz!$%&'*+-.^_`|~)�windows�linux�macos�android�ios�watchos�tvos�other�darwinr �Botocorec �F �� d� �fd�| D � � � � S )a} Replaces all not allowed characters in the string with a dash ("-").
Allowed characters are ASCII alphanumerics and ``!$%&'*+-.^_`|~``. If
``allow_hash`` is ``True``, "#"``" is also allowed.
:type raw_str: str
:param raw_str: The input string to be sanitized.
:type allow_hash: bool
:param allow_hash: Whether "#" is considered an allowed character.
� c 3 �B �K � | ]}|t v s�r|d k r|ndV � �dS )�#�-N)�_USERAGENT_ALLOWED_CHARACTERS)�.0�c�
allow_hashs ��E/opt/alt/python311/lib/python3.11/site-packages/botocore/useragent.py� <genexpr>z7sanitize_user_agent_string_component.<locals>.<genexpr>A sY �� � � � � �
�
�-�-�-�*�-��c���
��
�� � � � � � )�join)�raw_strr s `r �$sanitize_user_agent_string_componentr"