
    F\hF	                         S r S rS rg)zConvert a NT pathname to a file URL and vice versa.

This module only exists to provide OS-specific code
for urllib.requests, thus do not use directly.
c                    SSK nSSKnU SS S:X  a  U SS n OU SS S:X  a  U SS n U SS S:X  a  U S	S n U R                  S
S5      n SU ;  a+  UR                  R	                  U R                  SS5      5      $ U R                  S5      n[        U5      S:w  d  US   S   UR                  ;  a  SU -   n[        U5      eUS   S   R                  5       nUR                  R	                  US	   R                  SS5      5      nUS
-   U-   $ )zwOS-specific conversion from a relative URL of the 'file' scheme
to a file system path; not recommended for general use.    N   ///      z//localhost/      :|/\z	Bad URL: )
stringurllib.parsereplaceparseunquotesplitlenascii_lettersOSErrorupper)urlr   urllibcomperrordrivetails          !/usr/lib/python3.13/nturl2path.pyurl2pathnamer       s     
2Aw% !"g	Sb^	#"#h
2Aw%!"g
++c3
C#: ||##CKKT$:;;99S>D
4yA~aF,@,@@c!enGBKE<<QT :;D3;    c                 &   SSK nU R                  SS5      n U SS S:X  a<  U SS n U SS R                  5       S:X  a	  SU SS -   n OU S	S
 S:w  a  [        SU -   5      eSU ;  a  UR                  R                  U 5      $ U R                  SS
S9n[        U5      S
:w  d  [        US   5      S	:  a  SU -   n[        U5      eUR                  R                  US   R                  5       5      nUR                  R                  US	   5      nSU-   S-   U-   $ )zwOS-specific conversion from a file system path to a relative URL
of the 'file' scheme; not recommended for general use.r   Nr   r      z//?/zUNC/z//r	   r   r
   z
Bad path: )maxsplitr   )r   r   r   r   r   quoter   r   )pr   r   r   r   r   s         r   pathname2urlr'   *   s     	
		$A!uabERa5;;=F"quAqVs],*++!8||!!!$$7737#D
4yA~T!W)q enLLtAw}}/E<<d1g&D5=3%%r!   N)__doc__r    r'    r!   r   <module>r*      s    D&r!   