pE:dZddlmZmZmZddlmZmZmZm Z m Z m Z ddl m Z ddlZddlZddlZgdZgdZgdZgd Zgd Zgd Zgd Zd ZdZiZdZdZdZdZeefdZeefdZ dZ!Gdde"Z#Gdde"Z$Gdde"Z%Gdde%e#Z&Gdde%e$Z'dd lm(Z(e(d!d"Z)e(d#d$Z*e(d%d&Z+e&Z,Gd'd!e)e#Z-Gd(d#e*e&Z.Gd)d%e+e&Z/Gd*d+e)e$Z0Gd,d-e*e'Z1Gd.d/e+e'Z2d0Z3e3[3d[d3Z4d4Z5d\d5Z6d[d6Z7d7Z8d8Z9d]d9Z:d:Z;d;Z<ed<eej?d>Z@d^dAZA d_dCZB d_dDZCd^dEZDeEedFZFeeFZGiZHGdGdHejIZJd`dJZKdadKZLdbdLZMdcdMZNdNZOdOZPdaQdPZRdaSdQZTdaUdRZVdaWdSZXdaYdTZZda[dddVZ\da]dWZ^da_dXZ`dYZadabdZZcdS)ea Ported using Python-Future from the Python 3.3 standard library. Parse (absolute and relative) URLs. urlparse module is based upon the following RFC specifications. RFC 3986 (STD66): "Uniform Resource Identifiers" by T. Berners-Lee, R. Fielding and L. Masinter, January 2005. RFC 2732 : "Format for Literal IPv6 Addresses in URL's by R.Hinden, B.Carpenter and L.Masinter, December 1999. RFC 2396: "Uniform Resource Identifiers (URI)": Generic Syntax by T. Berners-Lee, R. Fielding, and L. Masinter, August 1998. RFC 2368: "The mailto URL scheme", by P.Hoffman , L Masinter, J. Zawinski, July 1998. RFC 1808: "Relative Uniform Resource Locators", by R. Fielding, UC Irvine, June 1995. RFC 1738: "Uniform Resource Locators (URL)" by T. Berners-Lee, L. Masinter, M. McCahill, December 1994 RFC 3986 is considered the current standard and any future changes to urlparse module should conform with it. The urlparse module is currently not entirely compliant with this RFC due to defacto scenarios for parsing, and for backward compatibility purposes, some parsing quirks from older RFCs are retained. The testcases in test_urlparse.py provides a good indicator of parsing behavior. )absolute_importdivisionunicode_literals)byteschrdictintrangestr)raise_with_tracebackN)urlparse urlunparseurljoin urldefragurlsplit urlunsplit urlencodeparse_qs parse_qslquote quote_plusquote_from_bytesunquote unquote_plusunquote_to_bytes)ftphttpgophernntpimapwaisfilehttpsshttpmmsprosperortsprtspusftpsvnsvn+ssh)rrrrtelnetr r!r"r%r#r$snewsr&r'r(rsyncr)r+r,r*nfsgitzgit+ssh)rhdlr&rr r#r$r'r(sipsipsr%r)r*tel) rr2mailtonewsr-r!r r.r3r4) rr!r r#r$r%rr'r(r3r4r)) rr2rrr7rr!r#r$r.r"r&r)zAabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-.cjttdS)z,Clear the parse cache and the quoters cache.N) _parse_cacheclear _safe_quoterso/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/future/backports/urllib/parse.py clear_cacher@Ns,r>asciistrictc|SNr=)objs r?_nooprF]s Jr>c.|||SrDencode)rEencodingerrorss r?_encode_resultrL`s ::h ' ''r>c>tfd|DS)Nc3LK|]}|r|ndVdS)r)Ndecode.0xrJrKs r? z_decode_args..fs;GGQq8(F+++bGGGGGGr>)tuple)argsrJrKs ``r? _decode_argsrWds* GGGGG$GGG G GGr>ct|dt}|ddD],}|r(t|t|krtd-|r |tfzSt |t fzS)Nrz$Cannot mix str and non-str arguments) isinstancer TypeErrorrFrWrL)rV str_inputargs r? _coerce_argsr^hs 47C((IABBxDD  D:c3''944BCC Cuh    1 11r>ceZdZdZdZddZdS)_ResultMixinStrz>Standard approach to encoding parsed results from str to bytesr=rArBc4|jfd|DS)Nc3DK|]}|VdSrDrHrQs r?rTz)_ResultMixinStr.encode..~1*T*T!188Hf+E+E*T*T*T*T*T*Tr>)_encoded_counterpartselfrJrKs ``r?rIz_ResultMixinStr.encode},(t(*T*T*T*T*Tt*T*T*TUUr>NrArB)__name__ __module__ __qualname____doc__ __slots__rIr=r>r?r`r`y9HHIVVVVVVr>r`ceZdZdZdZddZdS)_ResultMixinBytesz>Standard approach to decoding parsed results from bytes to strr=rArBc4|jfd|DS)Nc3DK|]}|VdSrDrOrQs r?rTz+_ResultMixinBytes.decode..rcr>)_decoded_counterpartres ``r?rPz_ResultMixinBytes.decodergr>Nrh)rirjrkrlrmrPr=r>r?rprprnr>rpcneZdZdZdZedZedZedZedZ dS)_NetlocResultMixinBasezHShared methods for the parsed result objects containing a netloc elementr=c|jdSNr _userinforfs r?usernamez_NetlocResultMixinBase.username~a  r>c|jdS)NrYrxrzs r?passwordz_NetlocResultMixinBase.passwordr|r>cV|jd}|sd}n||}|Srw) _hostinfolower)rfhostnames r?rz_NetlocResultMixinBase.hostnames7>!$ (HH  !~~''Hr>cf|jd}|!t|d}d|cxkrdksndS|S)NrY ri)rr )rfports r?rz_NetlocResultMixinBase.portsJ~a   tR==D$''''%''''t r>N) rirjrkrlrmpropertyr{r~rrr=r>r?rurusRRI !!X!!!X!XXr>ruc>eZdZdZedZedZdS)_NetlocResultMixinStrr=c|j}|d\}}}|r|d\}}}|sd}ndx}}||fS)N@:netloc rpartition partitionrfruserinfo have_infohostinfor{ have_passwordr~s r?ryz_NetlocResultMixinStr._userinfosh(.(9(9#(>(>%)X  '080B0B30G0G -HmX  "& &Hx!!r>c |j}|d\}}}|d\}}}|r3|d\}}}|d\}}}n|d\}}}|sd}||fS)Nr[]rr rfr_r have_open_br bracketedrr have_ports r?rz_NetlocResultMixinStr._hostinfos**3//1h%-%7%7%<%<"<  @ ) 3 3C 8 8 Ha!%!4!4 Ay$$(0(:(:3(?(? %Hi D~r>Nrirjrkrmrryrr=r>r?rrMI  " "X "  X   r>rc>eZdZdZedZedZdS)_NetlocResultMixinBytesr=c|j}|d\}}}|r|d\}}}|sd}ndx}}||fS)N@:rrs r?ryz!_NetlocResultMixinBytes._userinfosh(.(9(9$(?(?%)X  '080B0B40H0H -HmX  "& &Hx!!r>c |j}|d\}}}|d\}}}|r3|d\}}}|d\}}}n|d\}}}|sd}||fS)Nr[]rrrs r?rz!_NetlocResultMixinBytes._hostinfos**4001h%-%7%7%=%="<  A ) 3 3D 9 9 Ha!%!5!5 Ay$$(0(:(:4(@(@ %Hi D~r>Nrr=r>r?rrrr>r) namedtuple DefragResultz url fragment SplitResultz!scheme netloc path query fragment ParseResultz(scheme netloc path params query fragmentceZdZdZdZdS)rr=cB|jr|jdz|jzS|jS)N#fragmenturlrzs r?geturlzDefragResult.geturls& = 8c>DM1 18Or>Nrirjrkrmrr=r>r?rr(Ir>ceZdZdZdZdS)rr=c t|SrDrrzs r?rzSplitResult.geturl$r>Nrr=r>r?rr(I     r>ceZdZdZdZdS)rr=c t|SrDrrzs r?rzParseResult.geturlrr>Nrr=r>r?rrrr>ceZdZdZdZdS)DefragResultBytesr=cB|jr|jdz|jzS|jS)N#rrzs r?rzDefragResultBytes.geturls& = 8d?T]2 28Or>Nrr=r>r?rrrr>rceZdZdZdZdS)SplitResultBytesr=c t|SrDrrzs r?rzSplitResultBytes.geturlrr>Nrr=r>r?rr rr>rceZdZdZdZdS)ParseResultBytesr=c t|SrDrrzs r?rzParseResultBytes.geturlrr>Nrr=r>r?rrrr>rcttfttftt ff}|D]\}}||_||_dSrD)rrrrrrrdrs) _result_pairs_decoded_encodeds r?_fix_result_transcodingrsW () &' &'M ,11((0%(0%%11r>r)Tct||\}}}t|||}|\}}}}}|tvrd|vrt|\}}nd}t ||||||} || S)a#Parse a URL into 6 components: :///;?# Return a 6-tuple: (scheme, netloc, path, params, query, fragment). Note that we don't break the components up in smaller bits (e.g. netloc is a single string) and we don't expand % escapes.;r))r^r uses_params _splitparamsr) rschemeallow_fragments_coerce_result splitresultrqueryrparamsresults r?r r $s #/sF";";C388K+6(FFC "3'' VV feX F FF >& ! !!r>cd|vr4|d|d}|dkr|dfSn|d}|d|||dzdfS)N/rrr)rY)findrfind)ris r?rr4so s{{ HHS#))C.. ) ) q557N  HHSMM rr7C!I r>ct|}dD].}|||}|dkrt||}/|||||dfS)Nz/?#r)lenrmin)rstartdelimcwdelims r? _splitnetlocr=sd HHE ''!U## Q;;v&&E uU{ S[ ((r>c.t||\}}}t|}|||t|t|f}t|d}|r ||St tt krtdx}x}}|d} | dkr9|d| dkr|d|  }|| dzd}|dddkr2t|d\}}d |vrd |vsd |vrd |vrtd |rd |vr| d d\}}d |vr| d d\}}t|||||} | t|<|| S|d| D] } | tvrnG|| dzd} | rtd| Dr|d|  | }}|dddkr2t|d\}}d |vrd |vsd |vrd |vrtd |rd |vr| d d\}}d |vr| d d\}}t|||||} | t|<|| S)aParse a URL into 5 components: :///?# Return a 5-tuple: (scheme, netloc, path, query, fragment). Note that we don't break the components up in smaller bits (e.g. netloc is a single string) and we don't expand % escapes.Nr)rrrrY//rrzInvalid IPv6 URLr?c3K|]}|dvV dS) 0123456789Nr=rRrs r?rTzurlsplit..ls'CCq 4CCCCCCr>)r^booltyper:getrMAX_CACHE_SIZEr@rrr ValueErrorsplitr scheme_charsany) rrrrkeycachedrrrrvrrests r?rrEs #/sF";";C?++O vS 4<< ?C   c4 ( (F &~f%%% <N** ""F"UX  A1uu rr7f  !W]]__Facdd)C2A2w$*322 F]]s&'8'83f+<+<$%7888 23#:: # #q 1 1 Xczz YYsA.. UFFCAAA !L !>!$$ $RaR 4 4A $$% qstt9D 43CCdCCCCC 4!"1"gmmoot 2A2w$"3**  F]]s&003f#4#4/00 0*3#:: #q)) X czzYYsA&& UFFC99AL >!  r>c pt|\}}}}}}}|r|d|}|t|||||fS)zPut a parsed URL back together again. This may result in a slightly different, but equivalent URL, if the URL that was parsed originally had redundant delimiters, e.g. a ? with an empty query (the draft states that these are equivalent).r)r^r) componentsrrrrrrrs r?rr}s[ 3? 2KAFFC. &ff% >*ffc5(%KLL M MMr>ct|\}}}}}}|s|r6|tvr-|dddkr|r|dddkrd|z}d|pdz|z}|r|dz|z}|r|dz|z}|r|d z|z}||S) akCombine the elements of a tuple as returned by urlsplit() into a complete URL as a string. The data argument can be any five-item iterable. This may result in a slightly different, but equivalent URL, if the URL that was parsed originally had unnecessary delimiters (for example, a ? with an empty query; the RFC states that these are equivalent).NrrrYrr)rrr)r^ uses_netloc)rrrrrrrs r?rrs+7 *C9FFC. *&*V{22s2A2w$ 23rr7c>>s3fl#c) !slS   Ci%#Ci(" >#  r>c |s|S|s|St||\}}}t|d|\}}}}}} t|||\} } } } }}| |ks | tvr ||S| tvr"| r|t | | | | ||fS|} | dddkr|t | | | | ||fS| s(| s&|} |} |s|}|t | | | | ||fS|ddd| dz}|ddkrd|d<d|vr|dd|v d}t|dz }||kr0||dkr||dz dvr ||dz |dz=n |dz}||k0nL|ddgkrd|d<n't|d kr|ddkrdg|d d<|t | | d|| ||fS) zaJoin a base URL and a possibly relative URL to form an absolute interpretation of the latter.r)NrYr...)r)rr) r^r uses_relativerrrremoverjoin)baserrrbschemebnetlocbpathbparamsbquery bfragmentrrpathrrrsegmentsrns r?rrs   ,T3 7 7D#~ T2 / /8GWeWfi S'? 3 32FFD&% F-77~c"""   I!>*ffd.4eX.G#H#HII I BQBx3~j&&$*0%*CDDEE E EE E~j&&$*0%*CDDEE E{{3$tzz#6H|s // //   MMA !ee t##QqSM33QqS1W%!A !ee  B: X!    4 4 >*ffchhx6H6H&,eX&?@@ A AAr>ct|\}}d|vr,t|\}}}}}}t|||||df}nd}|}|t||S)zRemoves any existing fragment from URL. Returns a tuple of the defragmented URL and the fragment. If the URL contained no fragments, the second element is the empty string. rr))r^r rr) rrsr paqfragdefrags r?rrsw's++C czz&smm1aAtQ1aB/00 >,vt44 5 55r>0123456789ABCDEFabcdefc #K|]F}tD]<}||ztt||zdgfV=GdS)N)_hexdigrIrr )rRrbs r?rTrTst55G55'(E>>##UCArNN+;%<%<=5555555r>c&|s|jtdSt|tr|d}t|}|d}t |dkr|S|dg}|j}|ddD]Z} |t|dd||dd5#t$r|d||YWwxYwtd |S)z,unquote_to_bytes('abc%20def') -> b'abc def'.r>utf-8%rYrNr) rrrZr rIrappend _hextobyteKeyErrorr)stringbitsresritems r?rrs-  Szz&#(w''6]]F <<  D 4yyA~~ 7)C ZFQRR  F:d2A2h' ( ( ( F48        F4LLL F4LLLLL  ::??3  s1C  C.-C.z([-]+)rreplacecxd|vr |j|S|d}|d}t|}|dg}|j}tdt |dD]H}|t |||||||dzId|S) aReplace %xx escapes by their single-character equivalent. The optional encoding and errors parameters specify how to decode percent-encoded sequences into Unicode characters, as accepted by the bytes.decode() method. By default, percent-encoded sequences are decoded with UTF-8, and invalid sequences are replaced by a placeholder character. unquote('abc%20def') -> 'abc def'. %Nrr"rrYrr))r_asciirerr rrrPr)rrJrKrr rrs r?rrs &   ~ >>& ! !D 7)C ZF 1c$ii # #Q((//&AABBBtAE{ 773<<r>Fci}t|||||}|D]+\}}||vr|||%|g||<,|S)aOParse a query given as a string argument. Arguments: qs: percent-encoded query string to be parsed keep_blank_values: flag indicating whether blank values in percent-encoded queries should be treated as blank strings. A true value indicates that blanks should be retained as blank strings. The default false value indicates that blank values are to be ignored and treated as if they were not included. strict_parsing: flag indicating what to do with parsing errors. If false (the default), errors are silently ignored. If true, errors raise a ValueError exception. encoding and errors: specify how to decode percent-encoded sequences into Unicode characters, as accepted by the bytes.decode() method. rJrK)rr) qskeep_blank_valuesstrict_parsingrJrK parsed_resultpairsnamevalues r?rrsx,M b+^' 8 8 8E** e = $  & &u - - - -#('M$   r>clt|\}}d|dD}g}|D]}|s|s|dd} t| dkr-|rtd||r| dn]t| ds|r| dd d } t | || } || } | dd d } t | || } || } || | f|S) a;Parse a query given as a string argument. Arguments: qs: percent-encoded query string to be parsed keep_blank_values: flag indicating whether blank values in percent-encoded queries should be treated as blank strings. A true value indicates that blanks should be retained as blank strings. The default false value indicates that blank values are to be ignored and treated as if they were not included. strict_parsing: flag indicating what to do with parsing errors. If false (the default), errors are silently ignored. If true, errors raise a ValueError exception. encoding and errors: specify how to decode percent-encoded sequences into Unicode characters, as accepted by the bytes.decode() method. Returns a list, as G-d intended. cBg|]}|dD]}|S)rr)rRs1s2s r? zparse_qsl..Ts/ @ @ @B"((3-- @ @BR @ @ @ @r>&=rYrzbad query field: r)r+ r')r^rrrrr"r) r(r)r*rJrKrr,r name_valuenvr-r.s r?rr<sa.&b))B @ @"((3-- @ @ @E A$$  .     c1 % % r77a<< H j**!FGGG   "  r!u:: $* $a5==c**D4(6BBBD!>$''DqEMM#s++EEHVDDDE"N5))E HHdE] # # # Hr>cP|dd}t|||S)zLike unquote(), but also replace plus signs by spaces, as required for unquoting HTML form values. unquote_plus('%7e/abc+def') -> '~/abc def' r7r8)r"r)rrJrKs r?rrls) ^^C % %F 68V , ,,r>sAABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.-c$eZdZdZdZdZdZdS)QuoterzA mapping from bytes (in range(0,256)) to strings. String values are percent-encoded byte values, unless the key < 128, and in the "safe" set (either the specified safe set, or default set). c^tt||_dS)zsafe: bytes object.N) _ALWAYS_SAFEunionrsafe)rfrBs r?__init__zQuoter.__init__s! &&uT{{33 r>c&dt|zS)Nz )rrzs r?__repr__zQuoter.__repr__stDzz))r>cj||jvrt|nd|}|||<|S)Nz%{0:02X})rBrformat)rfrr s r? __missing__zQuoter.__missing__s7TYc!fffJ,=,=a,@,@Q r>N)rirjrkrlrCrErHr=r>r?r>r>|sK444***r>r>rct|tr#|s|S|d}|d}|||}n"|td|tdt ||S)aquote('abc def') -> 'abc%20def' Each part of a URL, e.g. the path info, the query, etc., has a different set of reserved characters that must be quoted. RFC 2396 Uniform Resource Identifiers (URI): Generic Syntax lists the following reserved characters. reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | "$" | "," Each of these characters is reserved in some component of a URL, but not necessarily in all of them. By default, the quote function is intended for quoting the path section of a URL. Thus, it will not encode '/'. This character is reserved, but in typical usage the quote function is being called on a path where the existing slash characters are used as reserved characters. string and safe may be either str or bytes objects. encoding must not be specified if string is a str. The optional encoding and errors parameters specify how to deal with non-ASCII characters, as accepted by the str.encode method. By default, encoding='utf-8' (characters are encoded with UTF-8), and errors='strict' (unsupported characters raise a UnicodeEncodeError). NrrBz,quote() doesn't support 'encoding' for bytesz*quote() doesn't support 'errors' for bytes)rZr rIr[r)rrBrJrKs r?rrs:&# J M  H >Fx00  JKK K  HII I FD ) ))r>cHt|trd|vst|trd|vrt||||St|trtd}ntd}t|||z||}|ddS)zLike quote(), but also replace ' ' with '+', as required for quoting HTML form values. Plus signs in the original string are escaped unless they are included in safe. It also does not have safe default to '/'. r8 r7)rZr rrr")rrBrJrKspaces r?rrs FC 5S%6%6 FE " "&7'+6'9'9VT8V444$Cd  64%<6 : :F >>#s # ##r>ct|ttfstd|st dSt|}t|tr$t |dd}n(t|}td|D}|t|zs|S t|n.#t$r!t|j xt|<YnwxYwt d fd|DS)zLike quote(), but accepts a bytes object rather than a str, and does not perform string-to-bytes encoding. It always returns an ASCII string. quote_from_bytes(b'abc def?') -> 'abc%20def%3f' z!quote_from_bytes() expected bytesr)rAignorecg|] }|dk| S)r=rs r?r4z$quote_from_bytes..s111ASar>c&g|] }|Sr=r=)rRcharquoters r?r4z$quote_from_bytes..s!555$555r>)rZr bytearrayr[r rIrstrip_ALWAYS_SAFE_BYTESrPr<rr> __getitem__r)bsrBrSs @r?rrsC b5), - -=;<<< 2ww rB$34yy22T{{1111122 99'$. / /yy{{@t$ @@@'-d||'?? dfff@ r77<<5555"555 6 66s C..(DDc t|dr|}nw t|r"t|dtst nD#t $r7t j\}}}tt d|YnwxYwg}|s|D]\} } t| trt| |} ntt| |||} t| trt| |} ntt| |||} | | dz| zn|D]\} } t| trt| |} ntt| |||} t| tr,t| |} | | dz| zt| tr.t| |||} | | dz| z t| } | D]b} t| trt| |} ntt| |||} | | dz| zcF#t $r>tt| |||} | | dz| zYwxYwtd |S)a#Encode a sequence of two-element tuples or dictionary into a URL query string. If any values in the query arg are sequences and doseq is true, each sequence element is converted to a separate parameter. If the query arg is a sequence of two-element tuples, the order of the parameters in the output will match the order of parameters in the input. The query arg may be either a string or a bytes type. When query arg is a string, the safe, encoding and error parameters are sent the quote_plus for encoding. itemsrz1not a valid non-string sequence or mapping objectr6r5)hasattrrZrrZrUr[sysexc_infor rrr rr) rdoseqrBrJrKtyvatblkrrSelts r?rrs=ugE  E5zz *U1Xu"="=   E E EJBB ,?"@"@AC E E E E E E A (0 " "DAq!U## ?q$''s1vvtXv>>!U## ?q$''s1vvtXv>> HHQWq[ ! ! ! ! " 0 0DAq!U## ?q$''s1vvtXv>>!U## 0q$''S1%%%%As## 0q$&99S1%%%%0AA !00%c511O",S$"7"7CC",SXXtXv"N"NCS3//// 0 !***"3q6646BBAHHQWq[)))))* s88==  s$1A>BB"JAK K ct|trY |d}n0#t$r#t dt |zdzwxYw|S)zto_bytes(u"URL") --> 'URL'.ASCIIzURL z contains non-ASCII characters)rZr rIrP UnicodeErrorreprrs r?to_bytesrjHs #sA A**W%%,,..CC A A AvS 1? @AA A A Js '?-A,c t|}|dddkr*|dddkr|dd}|dddkr|dd}|S)z8unwrap('') --> 'type://host/path'.NrYzURL:)r stripris r?unwraprpUs{ c((..  C 2A2w#~~#bcc(c//!B$ioo 2A2w&ABB # Jr>ctddl}|jdat|}|rC|d}||t |dzdfSd|fS)z:splittype('type:opaquestring') --> 'type', 'opaquestring'.Nrz ^([^/:]+):rY) _typeprogrecompilematchgrouprr)rrsrurs r? splittyperw^s~ BJ|,, OOC E 5Q||~~s3v;;?#3#3444 9r>c tddl}|jdat|}|rJ|d}|d}|r|dsd|z}||fSd|fS)z;splithost('//host[:port]/path') --> 'host[:port]', '/path'.Nrz^//([^/?]*)(.*)$rYrr) _hostprogrsrtrurv startswith)rrsru host_portr s r? splithostr|ls BJ122 OOC E KKNN {{1~~  ,, :D$ 9r>ctddl}|jdat|}|r|ddSd|fS)zJsplituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'.Nrz ^(.*)@(.*)$rYr) _userprogrsrtrurvhostrsrus r? splituserr}sX BJ}-- OOD ! !E &U[[A&&& :r>ctddl}|jd|jat|}|r|ddS|dfS)z/splitpasswd('user:passwd') -> 'user', 'passwd'.Nrz^([^:]*):(.*)$rYr) _passwdprogrsrtSrurv)userrsrus r? splitpasswdrs_  bj!1"$77   d # #E &U[[A&&& :r>ctddl}|jdat|}|r|ddS|dfS)z*splitport('host:port') --> 'host', 'port'.Nrz^(.*):([0-9]+)$rYr) _portprogrsrtrurvrs r? splitportrsY BJ011 OOD ! !E &U[[A&&& :r>rctddl}|jdat|}|rQ|dd\}} |st dt |}n#t $rd}YnwxYw||fS||fS)zSplit host and port, returning numeric port. Return given default port if no ':' found; defaults to -1. Return numerical port if a valid number are found after ':'. Return None if ':' but not a valid number.Nrz ^(.*):(.*)$rYrz no digits) _nportprogrsrtrurvrr )rdefportrsrurnports r? splitnportrs  RZ ..   T " "E [[A&& d  6z+666IIEE   EEE U{ =s A33 BBctddl}|jdat|}|r|ddS|dfS)z/splitquery('/path?query') --> '/path', 'query'.Nrz^(.*)\?([^?]*)$rYr) _queryprogrsrtrurvrrsrus r? splitqueryrs[ RZ 122   S ! !E &U[[A&&& 9r>ctddl}|jdat|}|r|ddS|dfS)z)splittag('/path#tag') --> '/path', 'tag'.Nrz^(.*)#([^#]*)$rYr)_tagprogrsrtrurvrs r?splittagrsY 2:.// NN3  E &U[[A&&& 9r>cP|d}|d|ddfS)zksplitattr('/path;attr1=value1;attr2=value2;...') -> '/path', ['attr1=value1', 'attr2=value2', ...].rrrYNr1)rwordss r? splitattrrs* IIcNNE 8U122Y r>ctddl}|jdat|}|r|ddS|dfS)z-splitvalue('attr=value') --> 'attr', 'value'.Nrz^([^=]*)=(.*)$rYr) _valueprogrsrtrurv)attrrsrus r? splitvaluers[ RZ 011   T " "E &U[[A&&& :r>)r)T)r)T)rr")FFrr")rNN)r)NN)r)Fr)NN)r)drl __future__rrrfuture.builtinsrrrr r r future.utilsr rsr\ collections__all__rrrnon_hierarchical uses_query uses_fragmentrrr:r@_implicit_encoding_implicit_errorsrFrLrWr^objectr`rprurrr_DefragResultBase_SplitResultBase_ParseResultBase ResultBaserrrrrrrr rrrrrrrrrrrtr%rrrr frozensetr@rVr< defaultdictr>rrrrrjrprrrwryr|r~rrrrrrrrrrrrrrr=r>r?rs>CBBBBBBBBB================------  : : : ### BBB ))) FFF<<< )))   "4/((((!3.HHHH222"VVVVVfVVVVVVVVVVVV@2O<46G<#"""""J~~>>:m-PQQ:m-WXX # $o     "$9        "$9   )+<     ')@        ')@   111"""" ))))6666p N N N&3A3A3A3Aj666 # T55"55555    : 2:& ' '2:?&/@;@'0. . . . `----y &''(( U<(( [ $,********X$$$$"77778LLLLz                         *               r>