//>>built
define("dojox/json/ref","dojo/_base/array dojo/_base/json dojo/_base/kernel dojo/_base/lang dojo/date/stamp dojox".split(" "),function(K,v,N,L,I,E){L.getObject("json",!0,E);return E.json.ref={resolveJson:function(h,f){function n(a,p,e,b,m,g,w){var c,d;e=t in a?a[t]:e;if(t in a||void 0!==e&&b)e=(u+e).replace(q,"$2$3");b=g||a;if(void 0!==e){F&&(a.__id=e);!f.schemas||a instanceof Array||!(d=e.match(/^(.+\/)[^\.\[]*$/))||(m=f.schemas[d[1]]);if(k[e]&&a instanceof Array==k[e]instanceof Array){b=k[e];delete b.$ref;
delete b._loadObject;var z=!0}else if(d=m&&m.prototype)A.prototype=d,b=new A;k[e]=b;B&&(B[e]=f.time)}for(;m;){if(d=m.properties)for(c in a){var x=d[c];x&&"date-time"==x.format&&"string"==typeof a[c]&&(a[c]=I.fromISOString(a[c]))}m=m["extends"]}m=a.length;for(c in a){if(c==m)break;if(a.hasOwnProperty(c)){d=a[c];if("object"==typeof d&&d&&!(d instanceof Date)&&"__parent"!=c)if(l=d[y]||C&&d[t],a==r||l&&d.__parent||(d.__parent=w?w:b),l)if(delete a[c],g=l.toString().replace(/(#)([^\.\[])/,"$1.$2").match(/(^([^\[]*\/)?[^#\.\[]*)#?([\.\[].*)?/),
k[(u+l).replace(q,"$2$3")]?l=k[(u+l).replace(q,"$2$3")]:(l="$"==g[1]||"this"==g[1]||""===g[1]?h:k[(u+g[1]).replace(q,"$2$3")])&&g[3]&&g[3].replace(/(\[([^\]]+)\])|(\.?([^\.\[]+))/g,function(D,O,J,P,M){l=l&&l[J?J.replace(/["'\\]/,""):M]}),l)d=l;else{if(!p){G||r.push(b);var G=!0;d=n(d,!1,d[y],!0,x);d._loadObject=f.loader}}else p||(d=n(d,r==a,void 0===e?void 0:H(e,c),!1,x,b!=a&&"object"==typeof b[c]&&b[c],a));a[c]=d;if(b!=a&&!b.__isDirty&&(g=b[c],b[c]=d,!(!z||d===g||b._loadObject||"_"==c.charAt(0)&&
"_"==c.charAt(1)||"$ref"==c||d instanceof Date&&g instanceof Date&&d.getTime()==g.getTime()||"function"==typeof d&&"function"==typeof g&&d.toString()==g.toString())&&k.onUpdate))k.onUpdate(b,c,g,d)}}if(z&&(t in a||b instanceof Array))for(c in b){if(!(b.__isDirty||!b.hasOwnProperty(c)||a.hasOwnProperty(c)||"_"==c.charAt(0)&&"_"==c.charAt(1)||b instanceof Array&&isNaN(c))){if(k.onUpdate&&"_loadObject"!=c&&"_idAttr"!=c)k.onUpdate(b,c,b[c],void 0);for(delete b[c];b instanceof Array&&b.length&&void 0===
b[b.length-1];)b.length--}}else if(k.onLoad)k.onLoad(b);return b}f=f||{};var t=f.idAttribute||"id",y=this.refAttribute,C=f.idAsRef,u=f.idPrefix||"",F=f.assignAbsoluteIds,k=f.index||{},B=f.timeStamps,l,r=[],q=/^(.*\/)?(\w+:\/\/)|[^\/\.]+\/\.\.\/|^.*\/(\/)/,H=this._addProp,A=function(){};h&&"object"==typeof h&&(h=n(h,!1,f.defaultId,!0),n(r,!1));return h},fromJson:function(h,f){try{var n=eval("("+h+")")}catch(t){throw new SyntaxError("Invalid JSON string: "+t.message+" parsing: "+h);}return n?this.resolveJson(n,
f):n},toJson:function(h,f,n,t,y){function C(){var a=(H++).toString();return r.hasOwnProperty(a)?C():a}function u(a,p,e){if("object"==typeof a&&a){if(a instanceof Date)return'"'+I.toISOString(a,{zulu:!0})+'"';var b=a.__id;if(b){if("#"!=p&&(F&&!b.match(/#/)||l[b]))return e=b,"#"!=b.charAt(0)&&(e=a.__clientId==b?"cid:"+b:b.substring(0,n.length)==n?b.substring(n.length):b),a={},a[B]=e,v.toJson(a,f);p=b}else q?a instanceof Array||(p=C(),a.__id=p,r[p]=a):(a.__id=p,r[p]=a);l[p]=a;e=e||"";var m=f?e+v.toJsonIndentStr:
"",g=f?"\n":"";b=f?" ":"";if(a instanceof Array)return"["+K.map(a,function(x,G){var D=u(x,q?void 0:k(p,G),m);"string"!=typeof D&&(D="undefined");return g+m+D}).join(","+b)+g+e+"]";var w=[];q&&"undefined"===typeof a[y]&&w.push(g+m+v._escapeString(y)+":"+b+v.toJson(a.__id));for(var c in a)if(a.hasOwnProperty(c)){if("number"==typeof c)var d='"'+c+'"';else if("string"!=typeof c||"_"==c.charAt(0)&&"_"==c.charAt(1))continue;else d=v._escapeString(c);var z=u(a[c],q?void 0:k(p,c),m);"string"==typeof z&&w.push(g+
m+d+":"+b+z)}return"{"+w.join(","+b)+g+e+"}"}return"function"==typeof a&&E.json.ref.serializeFunctions?a.toString():v.toJson(a)}var F=this._useRefs,k=this._addProp,B=this.refAttribute;n=n||"";var l={},r={},q=y?!0:!1,H=1;h=u(h,q?void 0:"#","");if(!t)for(var A in r)delete r[A].__id;return h},_addProp:function(h,f){return h+(h.match(/#/)?1==h.length?"":".":"#")+f},refAttribute:"$ref",_useRefs:!1,serializeFunctions:!1}});