gЯ ddlmZddlZddlZddlZddlZddlZddlZgdZgdZ gdZ gdZ gdZ gdZ gd Zd Zd Zgd Zd ZdZdZdZeefdZeefdZdZGddeZGddeZGddeZGddeeZGddeeZeddZed d!Z ed"d#Z!d$e_"d%ejF_"d&ejH_"d'e _"d(e jJ_"d)e jL_"d*e jN_"d+e jP_"d,e jH_"d-e!_"e jJjDe!jJ_"e jLjDe!jL_"e jNjDe!jN_"d.e!jR_"e jPjDe!jP_"e jHjDe!jH_"eZ*Gd/deeZ+Gd0d e eZ,Gd1d"e!eZ-Gd2d3eeZ.Gd4d5e eZ/Gd6d7e!eZ0d8Z1e1[1drd;Z2d<Z3dsd=Z4d>Z5d?Z6ejnd:@drdAZ8dBZ9dCZ:dtdDZ;dEZdGZ?dHe@eAzeBzdIe@eAzfdJZCejdKZEdLZFdudMZG dvdOZH dvdPZIdudQZJeKdRZLe@eLZMdSZNGdTdUeOZPdwdVZQdxdWZRejndXZSdydYZTdNd9ddeRfdZZUd[ZVd\ZWd]ZXd^ZYdaZd_Z[d`Z\da]daZ^dbZ_dcZ`ddZadeZbdfZcdaddgZedzdhZfdzdiZgdjZhdkZidlZjdmZkdnZldoZmdpZndqZoy){) namedtupleN)urlparse urlunparseurljoin urldefragurlsplit urlunsplit urlencodeparse_qs parse_qslquote quote_plusquote_from_bytesunquote unquote_plusunquote_to_bytes DefragResult ParseResult SplitResultDefragResultBytesParseResultBytesSplitResultBytes)ftphttpgophernntpimapwaisfilehttpsshttpmmsprosperortsprtspsrtspusftpsvnsvn+sshwswss)rrrrrtelnetrrr r#r!r"snewsr$r%r&r'rsyncr)r*r(nfsgitzgit+sshr+r,z itms-services)rrhdlr$rrr!r"r%r&r'sipsipsr#r(tel) rr2mailtonewsr-rrr.r3r4) rrrrr!r"r#rr%r&r'r3r4) rrr2rrr7rrr!r"r.r r$zAabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-.z!  )   cV tjtjyN)r cache_clear_byte_quoter_factory3/opt/alt/python312/lib64/python3.12/urllib/parse.py clear_cacherB^sN $$&r@asciistrictc|Sr<r?)objs rA_nooprGls Jr@c&|j||Sr<encode)rFencodingerrorss rA_encode_resultrMos ::h ''r@c0tfd|DS)Nc3JK|]}|r|jndyw)rNdecode.0xrKrLs rA z_decode_args..us$G$Qq(F+b8$s #)tuple)argsrKrLs ``rA _decode_argsrXss G$G GGr@ct|dt}|ddD]#}|st|t|k7std|r |tfzSt |t fzS)Nrz$Cannot mix str and non-str arguments) isinstancestr TypeErrorrGrXrM)rW str_inputargs rA _coerce_argsr`wsg 47C(IABx :c3'94BC C  uh   1 11r@ceZdZ dZddZy)_ResultMixinStrr?c8|jfd|DS)Nc3BK|]}|jywr<rIrRs rArUz)_ResultMixinStr.encode..*Tt!188Hf+Et)_encoded_counterpartselfrKrLs ``rArJz_ResultMixinStr.encode(t((*Tt*TUUr@NrCrD)__name__ __module__ __qualname__ __slots__rJr?r@rArbrbHIVr@rbceZdZ dZddZy)_ResultMixinBytesr?c8|jfd|DS)Nc3BK|]}|jywr<rPrRs rArUz+_ResultMixinBytes.decode..rerf)_decoded_counterpartrhs ``rArQz_ResultMixinBytes.decoderjr@Nrk)rlrmrnrorQr?r@rArrrrrpr@rrcveZdZ dZedZedZedZedZe e jZ y)_NetlocResultMixinBaser?c |jdS)Nr _userinforis rAusernamez_NetlocResultMixinBase.username~~a  r@c |jdS)NrZryr{s rApasswordz_NetlocResultMixinBase.passwordr}r@c|jd}|syt|trdnd}|j|\}}}|j |z|zS)Nr%%) _hostinfor[r\ partitionlower)rihostname separatorpercentzones rArz_NetlocResultMixinBase.hostnamesV>>!$&h4C$ "*"4"4Y"?'4~~')D00r@c|jd}|\|jr|jr t|}nt d|d|cxkrdkst dt d|S)NrZz+Port could not be cast to integer value as rizPort out of range 0-65535)risdigitisasciiint ValueError)riports rArz_NetlocResultMixinBase.portsr~~a   ||~$,,.4y #Nth!WXX&& !<==' !<== r@N) rlrmrnropropertyr|rrr classmethodtypes GenericAlias__class_getitem__r?r@rArwrwskRI !!!!11  $E$6$67r@rwc0eZdZdZedZedZy)_NetlocResultMixinStrr?c|j}|jd\}}}|r|jd\}}}|sd}||fSdx}}||fS)N@:netloc rpartitionrriruserinfo have_infohostinfor| have_passwordrs rArzz_NetlocResultMixinStr._userinfosh(.(9(9#(>%)X 080B0B30G -HmX !!#' &Hx!!r@c|j}|jd\}}}|jd\}}}|r+|jd\}}}|jd\}}}n|jd\}}}|sd}||fS)Nr[]rrrir_r have_open_br bracketedrrs rArz_NetlocResultMixinStr._hostinfos**3/1h%-%7%7%<"<  ) 3 3C 8 Ha,JAq$ ( 2 23 7 HaD~r@Nrlrmrnrorrzrr?r@rArr-I  " "  r@rc0eZdZdZedZedZy)_NetlocResultMixinBytesr?c|j}|jd\}}}|r|jd\}}}|sd}||fSdx}}||fS)N@:rrs rArzz!_NetlocResultMixinBytes._userinfosh(.(9(9$(?%)X 080B0B40H -HmX !!#' &Hx!!r@c|j}|jd\}}}|jd\}}}|r+|jd\}}}|jd\}}}n|jd\}}}|sd}||fS)Nr[]rrrs rArz!_NetlocResultMixinBytes._hostinfos**401h%-%7%7%="<  ) 3 3D 9 Ha-JAq$ ( 2 24 8 HaD~r@Nrr?r@rArrrr@rrz url fragmentrz!scheme netloc path query fragmentrz(scheme netloc path params query fragmentz DefragResult(url, fragment) A 2-tuple that contains the url without fragment identifier and the fragment identifier as a separate argument. z$The URL with no fragment identifier.z Fragment identifier separated from URL, that allows indirect identification of a secondary resource by reference to a primary resource and additional identifying information. z SplitResult(scheme, netloc, path, query, fragment) A 5-tuple that contains the different components of a URL. Similar to ParseResult, but does not split params. z%Specifies URL scheme for the request.z0 Network location where the request is made to. z@ The hierarchical path, such as the path to a file to download. z The query component, that contains non-hierarchical data, that along with data in path component, identifies a resource in the scope of URI's scheme and network location. z Fragment identifier, that allows indirect identification of a secondary resource by reference to a primary resource and additional identifying information. zq ParseResult(scheme, netloc, path, params, query, fragment) A 6-tuple that contains components of a parsed URL. z Parameters for last path element used to dereference the URI in order to provide access to perform some operation on the resource. ceZdZdZdZy)rr?cj|jr|jdz|jzS|jSN#fragmenturlr{s rAgeturlzDefragResult.geturlEs) ==88c>DMM1 188Or@Nrlrmrnrorr?r@rArrC Ir@ceZdZdZdZy)rr?ct|Sr<r r{s rArzSplitResult.geturlM $r@Nrr?r@rArrK I r@ceZdZdZdZy)rr?ct|Sr<rr{s rArzParseResult.geturlRrr@Nrr?r@rArrPrr@ceZdZdZdZy)rr?cj|jr|jdz|jzS|jS)N#rr{s rArzDefragResultBytes.geturlXs) ==88d?T]]2 288Or@Nrr?r@rArrVrr@rceZdZdZdZy)rr?ct|Sr<rr{s rArzSplitResultBytes.geturl`rr@Nrr?r@rArr^rr@rceZdZdZdZy)rr?ct|Sr<rr{s rArzParseResultBytes.geturlerr@Nrr?r@rArrcrr@rczttfttftt ff}|D]\}}||_||_yr<)rrrrrrrgru) _result_pairs_decoded_encodeds rA_fix_result_transcodingrisE () &' &'M ,((0%(0%,r@rTc t||\}}}t|||}|\}}}}}|tvrd|vrt|\}}nd}t ||||||} || S)N;r)r`r uses_params _splitparamsr) rschemeallow_fragments_coerce_result splitresultrqueryrparamsresults rArrvsz&#/sF";C38K+6(FFC "3' V feX FF & !!r@cd|vr*|jd|jd}|dkr|dfS|jd}|d|||dzdfS)N/rrrrZ)findrfind)ris rArrsY s{ HHS#))C. ) q57N HHSM r7C!I r@ct|}dD]&}|j||}|dk\st||}(|||||dfS)Nz/?#r)lenrmin)rstartdelimcwdelims rA _splitnetlocrsR HE !U# Q;v&E uU S[ ((r@c0|r|jryddl}|jdd}|jdd}|jdd}|jdd}|jd|}||k(rydD]}||vst d |zd zd zy) Nrrrrr?NFKCz/?#@:znetloc 'z' contains invalid z#characters under NFKC normalization)r unicodedatareplace normalizer)rrnnetloc2rs rA _checknetlocrs V^^%sBA #rA #rA #rA##FA.GG|  <Z&03HHBCD Dr@c|jdr"tjd|s tdyt j |}t |tjr tdy)Nvz\Av[a-fA-F0-9]+\..+\ZzIPvFuture address is invalidz%An IPv4 address cannot be in brackets) startswithrematchr ipaddress ip_addressr[ IPv4Address)rips rA_check_bracketed_hostrsc3xx0(;;= =< ! !( + b)// 0DF F 1r@)typedcP t||\}}}|jt}|jt}tD]&}|j |d}|j |d}(t |}dx}x}}|jd}|dkDrU|djrB|djr/|d|D] } | tvs n|d|j||dzd}}|dddk(rct|d\}}d|vrd|vsd|vrd|vr td d|vr5d|vr1|jddjdd} t| |rd |vr|j!d d\}}d |vr|j!d d\}}t#|t%|||||} || S) NrrrrZ//rrzInvalid IPv6 URLrr)r`lstrip_WHATWG_C0_CONTROL_OR_SPACEstrip_UNSAFE_URL_BYTES_TO_REMOVErboolrrisalpha scheme_charsrrrrrsplitrr) rrrrbrrrrrbracketed_hostrs rArrs(#/sF";C **0 1C \\5 6F (kk!R 2&)?+O ""F"UX  A1uQ!c!fnn&6RaA $bq'--/3qst9CF 2Aw$"3*  F]s&03f#4/0 0 &=SF]#--c215??DQGN !. 13#: #q) X czYYsA& UFFC9A ! r@c b t|\}}}}}}}|r|d|}|t|||||fS)Nr)r`r ) componentsrrrrrrrs rArrsM5 3? 2KAFFC. f% *ffc5(%KL MMr@c t|\}}}}}}|r|r |dddk7rd|z}d|z|z}n'|dddk(rd|z}n|r|tvr|r|dddk(rd|z}|r|dz|z}|r|dz|z}|r|dz|z}||S)NrZrrrrrr)r` uses_netloc)r rrrrrrs rAr r s? +7 *C9FFC. 3r7c>s3Vmc! RaDSj Fk)3#bq'S.Sj slS  Ci%Ci(" # r@c  |s|S|s|St||\}}}t|d|\}}}}}} t|||\} } } } }}| |k7s| tvr||S| tvr| r|t | | | | ||fS|} | s!| s|} |} |s|}|t | | | | ||fS|j d}|ddk7r|d=| dddk(r| j d}n&|| j dz}t d|dd|ddg}|D]0}|dk(r |j|dk(r |j|2|ddvr|jd|t | | dj|xsd| ||fS#t$rYwxYw)NrrrZ...)rr) r`r uses_relativer rrfilterpop IndexErrorappendjoin)baserrrbschemebnetlocbpathbparamsbquery bfragmentrrpathrrr base_partssegments resolved_pathsegs rArrs%   ,T3 7D#~ T2 /8GWeWfi S'? 32FFD&%F-7c""  !*ffd.4eX.G#HI I Ej&&$*0%*CDE ES!J"~ rN BQx3::c? 3/ hqn52M $; !!# CZ    %|{" R *ffchh77vuh&89 ::  sE22 E>=E>c t|\}}d|vr$t|\}}}}}}t|||||df}nd}|}|t||S)Nrr)r`rrr) rrsrpaqfragdefrags rArrdsh 's+C cz&sm1aAtQ1aB/0 ,vt4 55r@0123456789ABCDEFabcdefc, tt|Sr<)bytes _unquote_impl)strings rArrws6 v& ''r@r/returnc |s |jyt|tr|jd}|jd}t |dk(r|St |d}|j }tItDcic]7}tD],}||zjtj||z.9c}}a|ddD] } |t|dd||dd"|Scc}}w#t$r|d||YFwxYw)Nr@utf-8rrZrr) rr[r\rJr bytearrayextend _hextobyte_hexdigr-fromhexKeyError)r/bitsresrr'ritems rAr.r.{s   &#w' << D 4yA~ DG C ZZF&9&!11unn& a!e(<<07'&9 QR  :d2Ah' ( 48  J9   4L 4L s;}|j\}}|||t|dj |||}@||dyw)NrrZ)_asciirefinditerspanr.rQ)r/rKrLprevious_match_end ascii_matchrends rA_generate_unquoted_partsrCst((0  %%' s'..KN+228VDD  1 #$ %%sA!A#c t|trt|j||Sd|vr|j|S|d}|d}dj t |||S)Nrr2rr)r[r-r.rQrrrCr/rKrLs rArrsm&% V$++Hf== &   ~ 77+FHfE FFr@Fc  i}t|||||||}|D]$\} } | |vr|| j| | g|| <&|S)N)rKrLmax_num_fieldsr)r r) qskeep_blank_valuesstrict_parsingrKrLrGr parsed_resultpairsnamevalues rAr r si8M b+^'%3y JE e = $  & &u -#('M$   r@cZ |rt|ttfs tdt|tr%t|ts t|d}d}fd}n9|sgStt |}t|tr t|d}d}d}|sgS|$d|j |z} || kr tdg} |j |D]V} | s|s| j|\} } }| s|rtd | |s|s4|| } ||}| j| |fX| S) Nz*Separator must be of type string or bytes.rC=c t|S)N)rKrL)r)r%rKrLs rA_unquotezparse_qsl.._unquote sHVD Dr@=c8t|jddS)N+ )rr)r%s rArRzparse_qsl.._unquotes#AIIdD$9: :r@rZzMax number of fields exceededzbad query field: ) r[r\r-r memoryviewcountrrr)rHrIrJrKrLrGreqrR num_fieldsr name_valuerMhas_eqrNs `` rAr r s:8 Jy3,?EFF"c)S)Iw/I  EI:b> " i %i1I  ;  !),, J &<= = Ahhy) ","6"6r": D&%n *!FGG)~ $'* Hr@cB |jdd}t|||S)N+ )rrrEs rArr.s( ^^C %F 68V ,,r@sBABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.-~cz|dk(r"tjdtdtSt dt d|)NQuoterzoDeprecated in 3.11. urllib.parse.Quoter will be removed in Python 3.14. It was not intended to be a public API.r stacklevelzmodule z has no attribute )warningswarnDeprecationWarning_QuoterAttributeErrorrl)rMs rA __getattr__rj=sC x @)Q 8 78,.@I JJr@c eZdZ dZdZdZy)rhc: tj||_yr<) _ALWAYS_SAFEunionsafe)riros rA__init__z_Quoter.__init__Ns! &&t, r@c dt|dS)Nz)dictr{s rA__repr__z_Quoter.__repr__Rs$t*q))r@cd||jvr t|ndj|}|||<|S)Nz%{:02X})rochrformat)rirr:s rA __missing__z_Quoter.__missing__Us0TYYc!fI,<,Fx0  JK K  HI I FD ))r@c t|trd|vst|trd|vrt||||St|trd}nd}t|||z||}|j ddS)Nr`rVr_)r[r\r-r r)r/rorKrLspaces rArrsu FC S%6 FE "t6'9VT8V44$ 64%<6 :F >>#s ##r@c,t|jSr<)rh __getitem__)ros rAr>r>s 4= $ $$r@c ^ t|ttfs td|syt|tr|j dd}nt|Dcgc] }|dks | c}}|j t|zs|jSt|}t|x}dkrdjt||Stj|}td||Dcgc]#}djt|||||z%}}dj|Scc}wcc}w)Nz!quote_from_bytes() expected bytesrrCignorei@ r)r[r-r3r]r\rJrstrip_ALWAYS_SAFE_BYTESrQr>rrmapmathisqrtrange)bsrorquoterbs_len chunk_sizerchunkss rArrs b5), -;<< ${{7H-1ASa12 99'$. /yy{ !$ 'Fb'W$wws62''ZZ'  FJ797a''#fb1Z<&89:7 9wwv29s D%D%*(D*cF t|dr|j}n% t|rt|dtst g}|s~|D]x\}} t|t r |||}n|t||||}t| t r || |} n|t| |||} |j|dz| zzn|D]\}} t|t r |||}n|t||||}t| t r!|| |} |j|dz| zet| tr#|| |||} |j|dz| z t| } | D]G} t| t r || |} n|t| |||} |j|dz| zIdj|S#t $r}t d|d}~wwxYw#t $r/|t| |||} |j|dz| zYWwxYw)Nitemsrz1not a valid non-string sequence or mapping objectrP&) hasattrrrr[rVr]r-r\rr) rdoseqrorKrL quote_viaerrlkrrTelts rAr r s ug  :5z*U1Xu"= A DAq!U#a&c!fdHf=!U#a&c!fdHf= HHQWq[ !DAq!U#a&c!fdHf=!U#a&S1%As#ax8S1%0AA !%c51"+C"6C"+CHdHf"MCS3/ !-8 88A;] :0169 : :D!*!#a&$&AAHHQWq[)*s)$G ! G( G% G  G%(4H H cPtjdtdt|S)Nz/urllib.parse.to_bytes() is deprecated as of 3.8rrc)rerfrg _to_bytesrs rAto_bytesrs  MMC$4 S>r@c t|tr" |jdj}|S|S#t$rt dt |zdzwxYw)NASCIIzURL z contains non-ASCII characters)r[r\rJrQ UnicodeErrorreprrs rArrso%#s A**W%,,.C J3J AvS 1? @A A As 6$Ac t|j}|dddk(r|dddk(r|ddj}|dddk(r|ddj}|S)NrZdllnIEU{EU{ =r@cPtjdtdt|S)NzVurllib.parse.splitquery() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrrc)rerfrg _splitqueryrs rA splitqueryrs% MM8$4 s r@cB |jd\}}}|r||fS|dfS)Nrr)rrrrs rArrs19,D% U{ 9r@cPtjdtdt|S)NzTurllib.parse.splittag() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrrc)rerfrg _splittagrs rAsplittagrs$ MM8$4 S>r@cB |jd\}}}|r||fS|dfSrr)rrrtags rArrs13~~c*D% Sy 9r@cPtjdtdt|S)NzUurllib.parse.splitattr() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrrc)rerfrg _splitattrrs rA splitattrrrr@c: |jd}|d|ddfS)NrrrZ)r)rwordss rArrs); IIcNE 8U12Y r@cPtjdtdt|S)NzWurllib.parse.splitvalue() is deprecated as of 3.8, use urllib.parse.parse_qsl() insteadrrc)rerfrg _splitvalue)attrs rA splitvaluers% MM9$4 t r@c@ |jd\}}}||r|fSdfS)NrPr)rrrNs rArrs/7,D% 5% ++d ++r@)rT)r)T)r2r)FFr2rNr)rNN)rNN)r)r)p collectionsr functoolsrrrrer__all__rr rnon_hierarchical uses_query uses_fragmentrrrrB_implicit_encoding_implicit_errorsrGrMrXr`objectrbrrrwrr_DefragResultBase_SplitResultBase_ParseResultBase__doc__rrrrrrr ResultBaserrrrrrrrrrrr lru_cacherrr rrr6r5rr-r3r\r.rr=rCrr r r frozensetrmrrjrsrhr rr>rr rrrrrrrrrrrrrrrrrrrrrrrrrrr?r@rArsB#  H0 - - FA %  \1'"4/(!3.H2"VfVVV#8V#8L2O<46G<~~>68=?!K&" #N#!" %!  #3"9"9"A"A"2"9"9"A"A 0 5 5 = =# "2!7!7!?!?$4$=$=$E$E! # $o "$9  "$9 )+< ')@  ')@ 1"<)D(G4 6!6p N.B:J6 #  (%)+c1ei6G: 2::& '&G.:?PS'T;@QTG R-!" <(Kd*4*l$$ %%6!rD"M`        + -    &",r@