ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ ]c@sddlZddlZddlZddlmZddlmZdefdYZigd6gd6Z dddd&dZ e d d Z ej d Ze dd dd dZeedre ddejdZnej dZe dddddZyddlZWnek rEnXe ddedZyddlZWnYek ryddlZWnek rqXe ddeejfdZnXe ddZe ddejdZe dddedZe dd ded!Zyddl Z Wnek r_n7Xd"Z!e dd#dee"fd$Z#d%Z$ee dZ%ee dZ&dS('iN(t str_types(t FormatErrort FormatCheckercBsJeZdZiZddZddZeeZdZ dZ RS(s A ``format`` property checker. JSON Schema does not mandate that the ``format`` property actually do any validation. If validation is desired however, instances of this class can be hooked into validators to enable format validation. :class:`FormatChecker` objects always return ``True`` when asked about formats that they do not know how to validate. To check a custom format using a function that takes an instance and returns a ``bool``, use the :meth:`FormatChecker.checks` or :meth:`FormatChecker.cls_checks` decorators. Arguments: formats (iterable): The known formats to validate. This argument can be used to limit which formats will be used during validation. csD|dkr!jj_ntfd|D_dS(Nc3s"|]}|j|fVqdS(N(tcheckers(t.0tk(tself(sC/opt/alt/python27/lib/python2.7/site-packages/jsonschema/_format.pys 's(tNoneRtcopytdict(Rtformats((RsC/opt/alt/python27/lib/python2.7/site-packages/jsonschema/_format.pyt__init__#s csfd}|S(s Register a decorated function as validating a new format. Arguments: format (str): The format that the decorated function will check. raises (Exception): The exception(s) raised by the decorated function when an invalid instance is found. The exception object will be accessible as the :attr:`ValidationError.cause` attribute of the resulting validation error. cs|fj<|S(N(R(tfunc(tformattraisesR(sC/opt/alt/python27/lib/python2.7/site-packages/jsonschema/_format.pyt_checks>s((RR RR((R RRsC/opt/alt/python27/lib/python2.7/site-packages/jsonschema/_format.pytchecks)scCs||jkrdS|j|\}}d\}}y||}Wn|k r]}|}nX|std||fd|ndS(s~ Check whether the instance conforms to the given format. Arguments: instance (any primitive type, i.e. str, number, bool): The instance to check format (str): The format that instance should conform to Raises: :exc:`FormatError` if instance does not conform to ``format`` Ns%r is not a %rtcause(NN(RRR(RtinstanceR R RtresultRte((sC/opt/alt/python27/lib/python2.7/site-packages/jsonschema/_format.pytcheckEs  cCs1y|j||Wntk r(tSXtSdS(s[ Check whether the instance conforms to the given format. Arguments: instance (any primitive type, i.e. str, number, bool): The instance to check format (str): The format that instance should conform to Returns: bool: Whether it conformed N(RRtFalsetTrue(RRR ((sC/opt/alt/python27/lib/python2.7/site-packages/jsonschema/_format.pytconformshs  N(( t__name__t __module__t__doc__RRR Rt classmethodt cls_checksRR(((sC/opt/alt/python27/lib/python2.7/site-packages/jsonschema/_format.pyR s    #tdraft3tdraft4cs1p |p|fd}|S(Ncshr2tdjtj|}nrdtdjtj|}n|S(NRR(t_draft_checkerstappendRR(R (RRR(sC/opt/alt/python27/lib/python2.7/site-packages/jsonschema/_format.pytwraps((tbothRRRR"((RRRsC/opt/alt/python27/lib/python2.7/site-packages/jsonschema/_format.pyt_checks_draftss  temailcCst|tstSd|kS(Nt@(t isinstanceRR(R((sC/opt/alt/python27/lib/python2.7/site-packages/jsonschema/_format.pytis_emailss$^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$s ip-addresstipv4cCsCt|tstStj|s&tStd|jdDS(Ncss1|]'}dt|ko&dknVqdS(iiN(tint(Rt component((sC/opt/alt/python27/lib/python2.7/site-packages/jsonschema/_format.pys st.(R'RRt_ipv4_retmatchRtalltsplit(R((sC/opt/alt/python27/lib/python2.7/site-packages/jsonschema/_format.pytis_ipv4s t inet_ptontipv6RcCs&t|tstStjtj|S(N(R'RRtsocketR2tAF_INET6(R((sC/opt/alt/python27/lib/python2.7/site-packages/jsonschema/_format.pytis_ipv6ss#^[A-Za-z0-9][A-Za-z0-9\.\-]{1,255}$s host-namethostnamecCs`t|tstStj|s&tS|jd}x$|D]}t|dkr<tSq<WtS(NR,i?(R'RRt _host_name_reR.RR0tlen(Rt componentsR+((sC/opt/alt/python27/lib/python2.7/site-packages/jsonschema/_format.pyt is_host_names turicCs&t|tstStj|ddS(NtruletURI(R'RRtrfc3987tparse(R((sC/opt/alt/python27/lib/python2.7/site-packages/jsonschema/_format.pytis_uriss date-timecCs t|tstStj|S(N(R'RRtisodatetparse_datetime(R((sC/opt/alt/python27/lib/python2.7/site-packages/jsonschema/_format.pyt is_datetimescCs t|tstStj|S(N(R'RRtstrict_rfc3339tvalidate_rfc3339(R((sC/opt/alt/python27/lib/python2.7/site-packages/jsonschema/_format.pyRDstregexcCs t|tstStj|S(N(R'RRtretcompile(R((sC/opt/alt/python27/lib/python2.7/site-packages/jsonschema/_format.pytis_regexstdatecCs&t|tstStjj|dS(Ns%Y-%m-%d(R'RRtdatetimetstrptime(R((sC/opt/alt/python27/lib/python2.7/site-packages/jsonschema/_format.pytis_datesttimecCs&t|tstStjj|dS(Ns%H:%M:%S(R'RRRLRM(R((sC/opt/alt/python27/lib/python2.7/site-packages/jsonschema/_format.pytis_timescCs tj|S(N(t webcolorst normalize_hex(R((sC/opt/alt/python27/lib/python2.7/site-packages/jsonschema/_format.pytis_css_color_codestcolorcCs3t|t s%|jtjkr)tSt|S(N(R'RtlowerRQtcss21_names_to_hexRRS(R((sC/opt/alt/python27/lib/python2.7/site-packages/jsonschema/_format.pytis_css21_colorscCs#|jtjkrtSt|S(N(RURQtcss3_names_to_hexRRS(R((sC/opt/alt/python27/lib/python2.7/site-packages/jsonschema/_format.pyt is_css3_colors(('RLRHR4tjsonschema.compatRtjsonschema.exceptionsRtobjectRR RR$R(RIR-R1thasattrterrorR6R8R;R?t ImportErrort ValueErrorRARERBt ISO8601ErrorRDRJRNRPRQRSt TypeErrorRWRYtdraft3_format_checkertdraft4_format_checker(((sC/opt/alt/python27/lib/python2.7/site-packages/jsonschema/_format.pytsP   { !    (  $