kf0ddlZddlZddlZddlZddlmZmZmZGddeZGdde Z dZ dd Z d Z d Zd Zd ZdZdZdZe e fdZdZdS)N)MutableMapping str_typesurlsplitcBeZdZdZdZdZdZdZdZdZ dZ d Z d S) URIDictz8 Dictionary which uses normalized URIs as keys. cDt|SN)rgeturlselfuris q/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/jsonschema/_utils.py normalizezURIDict.normalizes}}##%%%cPt|_|jj|i|dSr )dictstoreupdate)r argskwargss r__init__zURIDict.__init__s-VV  4*6*****rcB|j||Sr rrr s r __getitem__zURIDict.__getitem__sz$..--..rc@||j||<dSr r)r r values r __setitem__zURIDict.__setitem__s */ 4>>#&&'''rc<|j||=dSr rr s r __delitem__zURIDict.__delitem__s Jt~~c** + + +rc*t|jSr )iterrr s r__iter__zURIDict.__iter__DJrc*t|jSr )lenrr"s r__len__zURIDict.__len__!s4:rc*t|jSr )reprrr"s r__repr__zURIDict.__repr__$r$rN) __name__ __module__ __qualname____doc__rrrrrr#r'r*rrrr s&&&+++///000,,,        rrceZdZdZdZdS)UnsetzG An as-of-yet unset attribute or unprovided default parameter. cdS)Nzr/r"s rr*zUnset.__repr__-syrN)r+r,r-r.r*r/rrr1r1(s-rr1ctjdd|}tj|dS)zC Load a schema from ./schemas/``name``.json and return it. jsonschemazschemas/{0}.jsonzutf-8)pkgutilget_dataformatjsonloadsdecode)namedatas r load_schemar=1sA  L*<*C*CD*I*I J JD :dkk'** + ++rcjdfd|DS)z> A dumb version of `textwrap.indent` from Python 3.3.  c3.K|]}ddzz|zVdS) Nr/).0linetimess r zindent..?s1NN$SAI&-NNNNNNr)join splitlines)stringrFs `rindentrK:s8 99NNNN&:K:K:M:MNNN N NNrcN|sdSddd|DzS)z Construct a single string containing indexing operations for the indices. For example, [1, 2, "foo"] -> [1][2]["foo"] Arguments: indices (sequence): The indices to format. z[%s]z][c34K|]}t|VdSr r))rDindexs rrGz"format_as_index..Qs(??ed5kk??????r)rH)indicess rformat_as_indexrRBs7 r DII??w????? ??rc#K|di}d|di}|D]"}||vr|rtj||r|V#dS)z Return the set of additional properties for the given ``instance``. Weeds out properties that should have been validated by ``properties`` and / or ``patternProperties``. Assumes ``instance`` is dict-like already. properties|patternPropertiesN)getrHresearch)instanceschemarTpatternspropertys rfind_additional_propertiesr^TsL"--Jxx #6;;<waswere, c34K|]}t|VdSr rO)rDextras rrGzextras_msg..ps(55UT%[[555555r)r&rH)extrasverbs r extras_msgrggsG  6{{a 9955f555 5 5t ;;rcg}|D]]} |t|d,#t$r%|t|YZwxYw|dd|S)a+ Create an error message for a failure to match the given types. If the ``instance`` is an object and contains a ``name`` property, it will be considered to be a description of that object and used as its type. Otherwise the message is simply the reprs of the given ``types``. r;z is not of type rb)appendr) ExceptionrH)rZtypesreprstypes r types_msgrnss E%% % LLd6l++ , , , , % % % LLd $ $ $ $ $ %%-XXtyy/?/?/? @@s(1,A A ct}t|ts|f}|D]O}t|tr#|t |:||Pt|S)z isinstance() can accept a bunch of really annoying different types: * a single type * a tuple of types * an arbitrary nested tree of tuples Return a flattened tuple of the given argument. )set isinstancetuplerflattenadd)suitable_for_isinstancerkthings rrsrss EEE -u 5 5=#:"<( eU # #  LL ( ( ( ( IIe     <<rc6t|tr|gS|S)z] Wrap ``thing`` in a list if it's a single str. Otherwise, return it unchanged. )rqr)rvs r ensure_listrxs"%##w LrcBt|t|kS)zQ Check if two things are equal, but evade booleans and ints being equal. unbool)onetwos requalr~s #;;&++ %%rc|dur|S|dur|S|S)zH A hack to make True and 1 and False and 0 unique for ``uniq``. TFr/)elementtruefalses rr{r{s' $ E   Nrc ttd|Dt|kS#t$r td|D}t j|dd}t ||D]\}}||krYdSnK#ttf$r7g}|D]/}t|}||vrYYdS| |0YnwxYwYnwxYwdS)z Check if all of a container's elements are unique. Successively tries first to rely that the elements are hashable, then falls back on them being sortable, and finally falls back on brute force. c34K|]}t|VdSr rzrDis rrGzuniq..s(44Qvayy444444rc34K|]}t|VdSr rzrs rrGzuniq..s(77&))777777rr>NFT) r&rp TypeErrorsorted itertoolsislicezipNotImplementedErrorr{ri) containersortslicedrjseenes runiqrs9344)4444455YGG     77Y77777D%dAt44FD&)) ! !166 555 !$Y/   D  1II99 5555 A      4sF69 C"A BBC"+C?C"CC"CC"!C")r>)rr8r5rXjsonschema.compatrrrrobjectr1r=rKrRr^rgrnrsrxr~r{rr/rrrst  AAAAAAAAAA     n   >F,,,OOOO@@@$& < < <AAA&,   &&&     r