ó ā\e[c@s¬ddlmZddlZddlZddlZddlZddlmZdZdZ ej dƒZ ej dd kre ZeZnd efd „ƒYZd efd „ƒYZdefd„ƒYZdefd„ƒYZd„Zd„Zd„Zd„Zd„Zd„Zed„Zd„Zd„Zd„Z d„Z!ed„Z"d„Z#d„Z$d „Z%e&ed!„Z'eeeed"„Z(eeed#„Z)dS($i(tidnadatai’’’’N(tintranges_containi sxn--u [.ć€‚ļ¼Žļ½”]iit IDNAErrorcBseZdZRS(s7 Base exception for all IDNA-encoding related problems (t__name__t __module__t__doc__(((s4/tmp/pip-install-0xiv62/pip/pip/_vendor/idna/core.pyRst IDNABidiErrorcBseZdZRS(s= Exception when bidirectional requirements are not satisfied (RRR(((s4/tmp/pip-install-0xiv62/pip/pip/_vendor/idna/core.pyRstInvalidCodepointcBseZdZRS(s> Exception when a disallowed or unallocated codepoint is used (RRR(((s4/tmp/pip-install-0xiv62/pip/pip/_vendor/idna/core.pyRstInvalidCodepointContextcBseZdZRS(sE Exception when the codepoint is not valid in the context it is used (RRR(((s4/tmp/pip-install-0xiv62/pip/pip/_vendor/idna/core.pyRscCsLtjt|ƒƒ}|dkrHtjt|ƒƒsHtdƒ‚qHn|S(Nis Unknown character in unicodedata(t unicodedatat combiningtunichrtnamet ValueError(tcptv((s4/tmp/pip-install-0xiv62/pip/pip/_vendor/idna/core.pyt_combining_class$s  cCstt|ƒtj|ƒS(N(RtordRtscripts(Rtscript((s4/tmp/pip-install-0xiv62/pip/pip/_vendor/idna/core.pyt _is_script+scCs |jdƒS(Ntpunycode(tencode(ts((s4/tmp/pip-install-0xiv62/pip/pip/_vendor/idna/core.pyt _punycode.scCs dj|ƒS(Ns U+{0:04X}(tformat(R((s4/tmp/pip-install-0xiv62/pip/pip/_vendor/idna/core.pyt_unot1scCst|ƒdkrtStS(Ni?(tlentFalsetTrue(tlabel((s4/tmp/pip-install-0xiv62/pip/pip/_vendor/idna/core.pytvalid_label_length5scCs&t|ƒ|rdndkr"tStS(Nižiż(RRR(Rt trailing_dot((s4/tmp/pip-install-0xiv62/pip/pip/_vendor/idna/core.pytvalid_string_length<sc Cst}xnt|dƒD]]\}}tj|ƒ}|dkr^tdjt|ƒ|ƒƒ‚n|dkrt}qqW| r‰| r‰tStj|dƒ}|dkr±t}n0|dkrĘt}ntd jt|ƒƒƒ‚t}t}x t|dƒD]ł\}}tj|ƒ}|rØ|dkrBtdj|ƒƒ‚n|dkrWt}n|dkrlt}n|dkrö|s‡|}q„||kr„tdƒ‚q„qöqż|dkrĢtdj|ƒƒ‚n|dkrįt}qż|dkrżt}qżqżW|stdƒ‚ntS(Nits3Unknown directionality in label {0} at position {1}tRtALtANitLs>First codepoint in label {0} must be directionality L, R or ALtENtEStCStETtONtBNtNSMsHInvalid direction for codepoint at position {0} in a right-to-left labels2Can not mix numeral types in a right-to-left labelsHInvalid direction for codepoint at position {0} in a left-to-right labels0Label ends with illegal codepoint directionality(R#sALsAN(R#sAL( R#sALsANsENsESsCSsETsONsBNsNSM(R#sALsENsAN(sANsEN(R&sENsESsCSsETsONsBNsNSM(R&sEN(Rt enumerateR t bidirectionalRRtreprR( Rt check_ltrt bidi_labeltidxRt directiontrtlt valid_endingt number_type((s4/tmp/pip-install-0xiv62/pip/pip/_vendor/idna/core.pyt check_bidiCsP !                   cCs0tj|dƒddkr,tdƒ‚ntS(NitMs0Label begins with an illegal combining character(R tcategoryRR(R((s4/tmp/pip-install-0xiv62/pip/pip/_vendor/idna/core.pytcheck_initial_combinerscCsU|dd!dkr"tdƒ‚n|ddksB|ddkrQtdƒ‚ntS( Niis--s4Label has disallowed hyphens in 3rd and 4th positionit-i’’’’s)Label must not start or end with a hyphen(RR(R((s4/tmp/pip-install-0xiv62/pip/pip/_vendor/idna/core.pytcheck_hyphen_ok†s  cCs+tjd|ƒ|kr'tdƒ‚ndS(NtNFCs%Label must be in Normalization Form C(R t normalizeR(R((s4/tmp/pip-install-0xiv62/pip/pip/_vendor/idna/core.pyt check_nfcscCs±t||ƒ}|dkrf|dkrOtt||dƒƒtkrOtSnt}xzt|dddƒD]b}tjjt||ƒƒ}|tdƒkr¦qln|tdƒtdƒgkrlt}PqlqlW|sÜtSt}x}t|dt |ƒƒD]b}tjjt||ƒƒ}|tdƒkr6qün|tdƒtdƒgkrüt}PqüqüW|S|d kr©|dkr„tt||dƒƒtkr„tSntStSdS( Ni iii’’’’tTR&tDR#i ( RRt_virama_combining_classRRtrangeRt joining_typestgetR(Rtpostcp_valuetoktit joining_type((s4/tmp/pip-install-0xiv62/pip/pip/_vendor/idna/core.pytvalid_contextj•s<       cCs!t||ƒ}|dkrd|ko=t|ƒdknr}t||dƒdkr}t||dƒdkr}tSntS|dkrĪ|t|ƒdkrŹt|ƒdkrŹt||ddƒStS|dksę|dkr |dkrt||dd ƒStS|d kroxQ|D]I}|d kr6qnt|d ƒsct|d ƒsct|dƒrtSqWtSd|ko†dknrĘx4|D],}dt|ƒkoµdknr’tSq’WtSd|koŻdknrx4|D],}dt|ƒko dknrétSqéWtSdS(Ni·iiiliutGreekióiōtHebrewiū0u惻tHiraganatKatakanatHani`iiišił(RRRRR(RRGt exceptionRHR((s4/tmp/pip-install-0xiv62/pip/pip/_vendor/idna/core.pytvalid_contextoĮs> &4 (    - " "cCsÓt|ttfƒr'|jdƒ}nt|ƒdkrHtdƒ‚nt|ƒt|ƒt|ƒx\t |ƒD]N\}}t |ƒ}t |t j dƒr§qsqst |t j dƒr@yAt||ƒsżtdjt|ƒ|dt|ƒƒƒ‚nWqĮtk r<tdjt|ƒ|dt|ƒƒƒ‚qĮXqst |t j d ƒr–t||ƒsĮtd jt|ƒ|dt|ƒƒƒ‚qĮqstd jt|ƒ|dt|ƒƒƒ‚qsWt|ƒdS( Nsutf-8is Empty LabeltPVALIDtCONTEXTJs-Joiner {0} not allowed at position {1} in {2}is?Unknown codepoint adjacent to joiner {0} at position {1} in {2}tCONTEXTOs0Codepoint {0} not allowed at position {1} in {2}s0Codepoint {0} at position {1} of {2} not allowed(t isinstancetbytest bytearraytdecodeRRR@R=R;R.RRRtcodepoint_classesRLRRRR0R RSRR8(RRGRRH((s4/tmp/pip-install-0xiv62/pip/pip/_vendor/idna/core.pyt check_labelźs0     )  )1/cCsŻyi|jdƒ}yt|ƒWn&tk rHtdj|ƒƒ‚nXt|ƒsdtdƒ‚n|SWntk r|nX|s’tdƒ‚nt|ƒ}t|ƒt|ƒ}t |}t|ƒsŁtdƒ‚n|S(Ntasciis$The label {0} is not a valid A-labelsLabel too longsNo Input( RtulabelRRRtUnicodeEncodeErrortunicodeR\Rt_alabel_prefix(R((s4/tmp/pip-install-0xiv62/pip/pip/_vendor/idna/core.pytalabel s(        cCs¬t|ttfƒsJy|jdƒ}WqJtk rFt|ƒ|SXn|jƒ}|jtƒrx|t tƒ}nt|ƒ|j dƒS|j dƒ}t|ƒ|S(NR]R( RWRXRYRR_R\tlowert startswithRaRRZ(R((s4/tmp/pip-install-0xiv62/pip/pip/_vendor/idna/core.pyR^&s      c Cs”ddlm}d}yHx1t|ƒD]#\}}t|ƒ}||dkrS|ntj||dfƒd}|d} t|ƒdkr–|dnd} | dksŚ| d kr»| sŚ| d krē| rē| dkrē||7}q&| dk r1| d ks$| d kr| s$| d kr1|r1|| 7}q&| d kr&tƒ‚q&q&Wtj d |ƒSWn<tk rœt dj t |ƒ|dt |ƒƒƒ‚nXdS(sBRe-map the characters in the string according to UTS46 processing.i(t uts46datauitZiitVRBt3R9tIR>s0Codepoint {0} not allowed at position {1} in {2}N(ReR.Rtbisectt bisect_leftRtNonet IndexErrorR R?RRRR0( tdomaint std3_rulest transitionalRetoutputRGtchart code_pointtuts46rowtstatust replacement((s4/tmp/pip-install-0xiv62/pip/pip/_vendor/idna/core.pyt uts46_remap;s0  "     c Cs@t|ttfƒr'|jdƒ}n|rBt|||ƒ}nt}g}|rf|jdƒ}ntj|ƒ}| s‹|dgkrštdƒ‚n|ddkrŗ|d=t }nx<|D]4}t |ƒ}|ré|j |ƒqĮtdƒ‚qĮW|r|j dƒndj |ƒ}t ||ƒs<tdƒ‚n|S(NR]t.R"s Empty domaini’’’’s Empty labelsDomain too long(RWRXRYRZRwRtsplitt_unicode_dots_reRRRbtappendtjoinR!( Rtstricttuts46RoRpR tresulttlabelsR((s4/tmp/pip-install-0xiv62/pip/pip/_vendor/idna/core.pyRWs2   cCst|ttfƒr'|jdƒ}n|rBt||tƒ}nt}g}|sftj|ƒ}n|jdƒ}| s‹|dgkrštdƒ‚n|ds“|d=t }nx<|D]4}t |ƒ}|rć|j |ƒq»tdƒ‚q»W|r |j dƒndj |ƒS(NR]u.R"s Empty domaini’’’’s Empty labelu( RWRXRYRZRwRRzRyRRR^R{R|(RR}R~RoR RR€R((s4/tmp/pip-install-0xiv62/pip/pip/_vendor/idna/core.pyRZvs,    (*R"RRjR tretsyst intrangesRRCRatcompileRzt version_infotstrR`tchrR t UnicodeErrorRRRRRRRRRR!RR8R;R=R@RLRSR\RbR^RRwRRZ(((s4/tmp/pip-install-0xiv62/pip/pip/_vendor/idna/core.pytsB            <   , )