�
u��g� � �D � d dl Z d dlZ ej e� � Zdd�Zd� ZdS )� Nc � � t j � dd� � � dd� � � � � }|r|S | rt | � � S d S )N�REGION_NAME� � )�os�environ�get�replace�lower�_detect_region_of_azure_vm)�http_client�regions �[/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/msal/region.py�_detect_regionr s[ � �
�Z�^�^�M�2�
.�
.�
6�
6�s�B�
?�
?�
E�
E�
G�
G�F�
� ��
�� 7�)�+�6�6�6��4� c �0 � d}t � d� |� � � � | � |ddi�� � }|j � � � S # t � d� |� � � � Y d S xY w)Nz\http://169.254.169.254/metadata/instance/compute/location?format=text&api-version=2021-01-01a7 Connecting to IMDS {}. It may take a while if you are running outside of Azure. You should consider opting in/out region behavior on-demand, by loading a boolean flag "is_deployed_in_azure" from your per-deployment config and then do "app = ConfidentialClientApplication(..., azure_region=is_deployed_in_azure)"�Metadata�true)�headersz5IMDS {} unavailable. Perhaps not running in Azure VM?)�logger�info�formatr �text�strip)r
�url�resps r r r s� � � "� � �K�K� .� /5�f�S�k�k�;� ;� ;�!����s�Z��,@��A�A�� �y��� � � ������C�J�J�3�O�O� Q� Q� Q��t�t���s �A# �#/B)N)r �logging� getLogger�__name__r r r � r r �<module>r! sV �� � � � � ���� �� �8� $� $��� � � �!� !� !� !� !r