//>>built
define("dojox/json/schema",["dojo/_base/kernel","dojox","dojo/_base/array"],function(k,d){k.getObject("json.schema",!0,d);d.json.schema.validate=function(f,j){return this._validate(f,j,!1)};d.json.schema.checkPropertyChange=function(f,j,d){return this._validate(f,j,d||"property")};d.json.schema.mustBeValid=function(f){if(!f.valid)throw new TypeError(k.map(f.errors,function(f){return"for property "+f.property+": "+f.message}).join(", "));};d.json.schema._validate=function(f,d,l){function i(b,a,h,e){function c(a){g.push({property:h,
message:a})}function f(a,b){if(a){if("string"==typeof a&&"any"!=a&&("null"==a?null!==b:typeof b!=a)&&!(b instanceof Array&&"array"==a)&&!("integer"==a&&0===b%1))return[{property:h,message:typeof b+" value found, but a "+a+" is required"}];if(a instanceof Array){for(var c=[],e=0;e<a.length&&(c=f(a[e],b)).length;e++);if(c.length)return c}else if("object"==typeof a)return c=g,g=[],i(b,a,h),e=g,g=c,e}return[]}var d,h=h+(h?"number"==typeof e?"["+e+"]":"undefined"==typeof e?"":"."+e:e);if(("object"!=typeof a||
a instanceof Array)&&(h||"function"!=typeof a))return"function"==typeof a?Object(b)instanceof a||c("is not an instance of the class/constructor "+a.name):a&&c("Invalid schema/property definition "+a),null;l&&a.readonly&&c("is a readonly field, it can not be changed");a["extends"]&&i(b,a["extends"],h,e);if(void 0===b)a.optional||c("is missing and it is not optional");else if(g=g.concat(f(a.type,b)),a.disallow&&!f(a.disallow,b).length&&c(" disallowed value was matched"),null!==b){if(b instanceof Array){if(a.items)if(a.items instanceof
Array)for(e=0,d=b.length;e<d;e++)g.concat(i(b[e],a.items[e],h,e));else for(e=0,d=b.length;e<d;e++)g.concat(i(b[e],a.items,h,e));a.minItems&&b.length<a.minItems&&c("There must be a minimum of "+a.minItems+" in the array");a.maxItems&&b.length>a.maxItems&&c("There must be a maximum of "+a.maxItems+" in the array")}else a.properties&&g.concat(k(b,a.properties,h,a.additionalProperties));a.pattern&&"string"==typeof b&&!b.match(a.pattern)&&c("does not match the regex pattern "+a.pattern);a.maxLength&&"string"==
typeof b&&b.length>a.maxLength&&c("may only be "+a.maxLength+" characters long");a.minLength&&"string"==typeof b&&b.length<a.minLength&&c("must be at least "+a.minLength+" characters long");void 0!==typeof a.minimum&&typeof b==typeof a.minimum&&a.minimum>b&&c("must have a minimum value of "+a.minimum);void 0!==typeof a.maximum&&typeof b==typeof a.maximum&&a.maximum<b&&c("must have a maximum value of "+a.maximum);if(a["enum"]){e=a["enum"];d=e.length;for(var j,m=0;m<d;m++)if(e[m]===b){j=1;break}j||
c("does not have a value in the enumeration "+e.join(", "))}"number"==typeof a.maxDecimal&&b.toString().match(RegExp("\\.[0-9]{"+(a.maxDecimal+1)+",}"))&&c("may only have "+a.maxDecimal+" digits of decimal places")}return null}function k(b,a,f,e){if("object"==typeof a){("object"!=typeof b||b instanceof Array)&&g.push({property:f,message:"an object is required"});for(var c in a)if(a.hasOwnProperty(c)&&!("_"==c.charAt(0)&&"_"==c.charAt(1))){var d=b[c];i(d,a[c],f,c)}}for(c in b)b.hasOwnProperty(c)&&
!("_"==c.charAt(0)&&"_"==c.charAt(1))&&a&&!a[c]&&!1===e&&g.push({property:f,message:typeof d+"The property "+c+" is not defined in the schema and the schema does not allow additional properties"}),(d=a&&a[c]&&a[c].requires)&&!(d in b)&&g.push({property:f,message:"the presence of the property "+c+" requires that "+d+" also be present"}),d=b[c],a&&"object"==typeof a&&!(c in a)&&i(d,e,f,c),!l&&d&&d.$schema&&(g=g.concat(i(d,d.$schema,f,c)));return g}var g=[];d&&i(f,d,"",l||"");!l&&f&&f.$schema&&i(f,f.$schema,
"","");return{valid:!g.length,errors:g}};return d.json.schema});