� ��^i���z�ddlZddlZddlZddlZddlmZddlmZde dee fd�Z de de fd �Z de de fd �Z dS) �N)�Optional�)�WINDOWS�url�returnc�j�d|vrdS|�dd��d���S)N�:rr)�split�lower)rs ��/builddir/build/BUILDROOT/alt-python311-pip-21.3.1-4.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_internal/utils/urls.py�get_url_schemer s5�� �#�~�~��t� �9�9�S�!� � �Q� � %� %� '� '�'��pathc���tj�tj�|����}tj�dtj�|����}|S)zh Convert a path to a file: URL. The path will be made absolute and have quoted path parts. �file:) �osr�normpath�abspath�urllib�parse�urljoin�request� pathname2url)rrs r � path_to_urlrsS�� �7� � �B�G�O�O�D�1�1� 2� 2�D� �,� � �w���(C�(C�D�(I�(I� J� J�C� �Jrc���|�d��sJd|�d����tj�|��\}}}}}|r|dkrd}ntrd|z}nt d|�����tj�||z��}trK|sIt|��dkr6|d d kr*|d tj vr|d d �dvr |d d�}|S)z( Convert a file: URL to a path. rz1You can only turn file: urls into filenames (not �)� localhost�z\\z8non-local file URIs are not supported on this platform: �r�/r��)r z:/N) � startswithrr�urlsplitr� ValueErrorr� url2pathname�len�string� ascii_letters)r�_�netlocrs r � url_to_pathr,s0�� �>�>�� � �D�D�C�3�C�C�C�D�D� �#�L�1�1�#�6�6��A�v�t�Q�� �  �V�{�*�*���� � ��&����� N�s� N� N� � � � �>� &� &�v��}� 5� 5�D� ���� ��I�I��N�N� ��G�s�N�N� ��G�v�+� +� +� ��1��I�� $� $��A�B�B�x�� �Kr) rr(� urllib.parser�urllib.request�typingr�compatr�strr rr,�rr �r3s��� � � � � � � � ���������������������(��(��� �(�(�(�(� �c��c�����$�S�$�S�$�$�$�$�$�$r