WcG dZdZdZdS)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. cddl}ddl}|jdd}d|vrL|dddkr|dd}|jd}|jj d j |S|jd}t|dks|dd |jvrd |z}t||dd j}|d jd}|dz}|D]'}|s|d z|jj |z})|jdr|jdr|d z }|S) z{OS-specific conversion from a relative URL of the 'file' scheme to a file system path; not recommended for general use.N:|z/////\z Bad URL: ) string urllib.parsereplacesplitparseunquotejoinlen ascii_lettersOSErrorupperendswith)urlr urllib componentscomperrordrivepaths #/usr/lib64/python3.12/nturl2path.py url2pathnamer sT  ++c3 C #:: r7f  ab'CYYs^ ||##DIIj$9:: 99S>D 4yA~~aF,@,@@@c!en GBK   Eas#J 3;D<< 4$;!5!5d!;;DD }}Scll3//   Kcddl}|dddkr?|dd}|ddjdkr d|ddz}n|ddd krtd |zd |vrL|ddd krd |z}|jd}|jj d j |S|jd d }t|dkst|ddkrd |z}t||jj |dj}|djd}d|zd z}|D]'}|s|d z|jj |z})|S)z{OS-specific conversion from a file system path to a relative URL of the 'file' scheme; not recommended for general use.rNrz\\?\zUNC\r r rrz Bad path: z\\r)maxsplitz///)r rrrrquoterr)prrrrrrs r pathname2urlr&-s !u  abE Ra5;;=G # #qu AA qVs]],*+ + !88 Ra5F?? AWWT] ||!!#((:"677 7737 #D 4yA~~T!W))q en LL  tAw}} /Eat$J 5=3 D99 4#: 2 24 88DD Kr!N)__doc__r r&r!rr)s8###J$$$$$r!