//>>built
define("dojox/json/schema",["dojo/_base/kernel","dojox","dojo/_base/array"],function(w,p){w.getObject("json.schema",!0,p);p.json.schema.validate=function(k,l){return this._validate(k,l,!1)};p.json.schema.checkPropertyChange=function(k,l,q){return this._validate(k,l,q||"property")};p.json.schema.mustBeValid=function(k){if(!k.valid)throw new TypeError(w.map(k.errors,function(l){return"for property "+l.property+": "+l.message}).join(", "));};p.json.schema._validate=function(k,l,q){function m(b,a,f,d){function c(h){e.push({property:f,
message:h})}function g(h,n){if(h){if(!("string"!=typeof h||"any"==h||("null"==h?null===n:typeof n==h)||n instanceof Array&&"array"==h||"integer"==h&&0===n%1))return[{property:f,message:typeof n+" value found, but a "+h+" is required"}];if(h instanceof Array){for(var t=[],u=0;u<h.length&&(t=g(h[u],n)).length;u++);if(t.length)return t}else if("object"==typeof h)return t=e,e=[],m(n,h,f),u=e,e=t,u}return[]}var r;f+=f?"number"==typeof d?"["+d+"]":"undefined"==typeof d?"":"."+d:d;if(("object"!=typeof a||
a instanceof Array)&&(f||"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;q&&a.readonly&&c("is a readonly field, it can not be changed");a["extends"]&&m(b,a["extends"],f,d);if(void 0===b)a.optional||c("is missing and it is not optional");else if(e=e.concat(g(a.type,b)),a.disallow&&!g(a.disallow,b).length&&c(" disallowed value was matched"),null!==b){if(b instanceof Array){if(a.items)if(a.items instanceof
Array)for(d=0,r=b.length;d<r;d++)e.concat(m(b[d],a.items[d],f,d));else for(d=0,r=b.length;d<r;d++)e.concat(m(b[d],a.items,f,d));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&&e.concat(y(b,a.properties,f,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");typeof b==typeof a.minimum&&a.minimum>b&&c("must have a minimum value of "+a.minimum);typeof b==typeof a.maximum&&a.maximum<b&&c("must have a maximum value of "+a.maximum);if(a["enum"]){d=a["enum"];r=d.length;for(var x,v=0;v<r;v++)if(d[v]===b){x=1;break}x||c("does not have a value in the enumeration "+d.join(", "))}"number"==
typeof a.maxDecimal&&b.toString().match(new RegExp("\\.[0-9]{"+(a.maxDecimal+1)+",}"))&&c("may only have "+a.maxDecimal+" digits of decimal places")}return null}function y(b,a,f,d){if("object"==typeof a){("object"!=typeof b||b instanceof Array)&&e.push({property:f,message:"an object is required"});for(var c in a)if(a.hasOwnProperty(c)&&("_"!=c.charAt(0)||"_"!=c.charAt(1))){var g=b[c];m(g,a[c],f,c)}}for(c in b)!b.hasOwnProperty(c)||"_"==c.charAt(0)&&"_"==c.charAt(1)||!a||a[c]||!1!==d||e.push({property:f,
message:typeof g+"The property "+c+" is not defined in the schema and the schema does not allow additional properties"}),g=a&&a[c]&&a[c].requires,!g||g in b||e.push({property:f,message:"the presence of the property "+c+" requires that "+g+" also be present"}),g=b[c],!a||"object"!=typeof a||c in a||m(g,d,f,c),!q&&g&&g.$schema&&(e=e.concat(m(g,g.$schema,f,c)));return e}var e=[];l&&m(k,l,"",q||"");!q&&k&&k.$schema&&m(k,k.$schema,"","");return{valid:!e.length,errors:e}};return p.json.schema});