/*
	Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/

/*
	This is an optimized version of Dojo, built for deployment and not for
	development. To get sources and documentation, please visit:

		http://dojotoolkit.org
*/

if(!dojo._hasResource["esri.layers.agsimageservice"]){dojo._hasResource["esri.layers.agsimageservice"]=true;dojo.provide("esri.layers.agsimageservice");dojo.declare("esri.layers.ArcGISImageServiceLayer",esri.layers.DynamicMapServiceLayer,{constructor:function(_1,_2){this._url=esri.urlToObject(_1);var _3=_2&&_2.imageServiceParameters;this.format=_3&&_3.format;this.interpolation=_3?_3.interpolation:null;this.compressionQuality=_3?_3.compressionQuality:null;this.bandIds=_3?_3.bandIds:null;this.mosaicRule=_3?_3.mosaicRule:null;this.renderingRule=_3?_3.renderingRule:null;this._params=dojo.mixin({},this._url.query,{f:"image",interpolation:this.interpolation,format:this.format,compressionQuality:this.compressionQuality,bandIds:this.bandIds?this.bandIds.join(","):null},_3?_3.toJson():{});this._initLayer=dojo.hitch(this,this._initLayer);this.useMapImage=(_2&&_2.useMapImage)||false;this._loadCallback=_2&&_2.loadCallback;var _4=_2&&_2.resourceInfo;if(_4){this._initLayer(_4);}else{esri.request({url:this._url.path,content:dojo.mixin({f:"json"},this._url.query),callbackParamName:"callback",load:this._initLayer,error:this._errorHandler});}},disableClientCaching:false,_initLayer:function(_5,io){this._findCredential();dojo.mixin(this,_5);this.initialExtent=(this.fullExtent=this.extent=(new esri.geometry.Extent(_5.extent)));this.spatialReference=this.initialExtent.spatialReference;this.pixelSizeX=parseFloat(this.pixelSizeX);this.pixelSizeY=parseFloat(this.pixelSizeY);var i,il,_6=this.minValues,_7=this.maxValues,_8=this.meanValues,_9=this.stdvValues,bs=(this.bands=[]);for(i=0,il=this.bandCount;i<il;i++){bs[i]={min:_6[i],max:_7[i],mean:_8[i],stddev:_9[i]};}var _a=this.timeInfo;this.timeInfo=(_a&&_a.timeExtent)?new esri.layers.TimeInfo(_a):null;var _b=this.fields=[];var _c=_5.fields;if(_c){for(i=0;i<_c.length;i++){_b.push(new esri.layers.Field(_c[i]));}}this.version=_5.currentVersion;if(!this.version){var _d;if("fields" in _5||"objectIdField" in _5||"timeInfo" in _5){_d=10;}else{_d=9.3;}this.version=_d;}this.loaded=true;this.onLoad(this);var _e=this._loadCallback;if(_e){delete this._loadCallback;_e(this);}},getImageUrl:function(_f,_10,_11,_12){var sr=_f.spatialReference.wkid||dojo.toJson(_f.spatialReference.toJson());delete this._params._ts;var _13=this._url.path+"/exportImage?";dojo.mixin(this._params,{bbox:_f.xmin+","+_f.ymin+","+_f.xmax+","+_f.ymax,imageSR:sr,bboxSR:sr,size:_10+","+_11},this.disableClientCaching?{_ts:new Date().getTime()}:{});var _14=(this._params.token=this._getToken()),_15=esri._getProxiedUrl(_13+dojo.objectToQuery(dojo.mixin(this._params,{f:"image"})));if((_15.length>esri.config.defaults.io.postLength)||this.useMapImage){this._jsonRequest=esri.request({url:_13,content:dojo.mixin(this._params,{f:"json"}),callbackParamName:"callback",load:function(_16,io){var _17=_16.href;if(_14){_17+=(_17.indexOf("?")===-1?("?token="+_14):("&token="+_14));}_12(esri._getProxiedUrl(_17));},error:this._errorHandler});}else{_12(_15);}},setInterpolation:function(_18,_19){this.interpolation=(this._params.interpolation=_18);if(!_19){this.refresh(true);}},setCompressionQuality:function(_1a,_1b){this.compressionQuality=(this._params.compressionQuality=_1a);if(!_1b){this.refresh(true);}},setBandIds:function(ids,_1c){this.bandIds=ids;this._params.bandIds=ids.join(",");if(!_1c){this.refresh(true);}},setDefaultBandIds:function(_1d){this.bandIds=(this._params.bandIds=null);if(!_1d){this.refresh(true);}},setDisableClientCaching:function(_1e){this.disableClientCaching=_1e;},setMosaicRule:function(_1f,_20){this.mosaicRule=_1f;this._params.mosaicRule=dojo.toJson(_1f.toJson());if(!_20){this.refresh(true);}},setRenderingRule:function(_21,_22){this.renderingRule=_21;this._params.renderingRule=dojo.toJson(_21.toJson());if(!_22){this.refresh(true);}},setImageFormat:function(_23,_24){this.format=(this._params.format=_23);if(!_24){this.refresh(true);}},refresh:function(_25){if(_25){this.inherited(arguments);}else{var dc=this.disableClientCaching;this.disableClientCaching=true;this.inherited(arguments);this.disableClientCaching=dc;}},exportMapImage:function(_26,_27){var m=esri.config.defaults.map,p=dojo.mixin({size:m.width+","+m.height},this._params,_26?_26.toJson(this.normalization):{},{f:"json"});delete p._ts;this._exportMapImage(this._url.path+"/exportImage",p,_27);}});dojo.declare("esri.layers.ImageServiceParameters",null,{extent:null,width:null,height:null,imageSpatialReference:null,format:null,interpolation:null,compressionQuality:null,bandIds:null,timeExtent:null,mosaicRule:null,renderingRule:null,noData:null,toJson:function(_28){var ext=this.bbox||this.extent;ext=ext&&_28&&ext._normalize(true);var _29=ext?(ext.spatialReference.wkid||dojo.toJson(ext.spatialReference.toJson())):null,_2a=this.imageSpatialReference,_2b={bbox:ext?(ext.xmin+","+ext.ymin+","+ext.xmax+","+ext.ymax):null,bboxSR:_29,size:(this.width!==null&&this.height!==null?this.width+","+this.height:null),imageSR:(_2a?(_2a.wkid||dojo.toJson(_2a.toJson())):_29),format:this.format,interpolation:this.interpolation,compressionQuality:this.compressionQuality,bandIds:this.bandIds?this.bandIds.join(","):null,mosaicRule:this.mosaicRule?dojo.toJson(this.mosaicRule.toJson()):null,renderingRule:this.renderingRule?dojo.toJson(this.renderingRule.toJson()):null,noData:this.noData};var _2c=this.timeExtent;_2b.time=_2c?_2c.toJson().join(","):null;return esri.filter(_2b,function(_2d){if(_2d!==null){return true;}});}});dojo.mixin(esri.layers.ImageServiceParameters,{INTERPOLATION_BILINEAR:"RSP_BilinearInterpolation",INTERPOLATION_CUBICCONVOLUTION:"RSP_CubicConvolution",INTERPOLATION_MAJORITY:"RSP_Majority",INTERPOLATION_NEARESTNEIGHBOR:"RSP_NearestNeighbor"});dojo.declare("esri.layers.MosaicRule",null,{method:null,where:null,sortField:null,sortValue:null,ascending:false,lockRasterIds:null,viewpoint:null,objectIds:null,operation:null,toJson:function(){var _2e={mosaicMethod:this.method,where:this.where,sortField:this.sortField,sortValue:this.sortValue?dojo.toJson(this.sortValue):null,ascending:this.ascending,lockRasterIds:this.lockRasterIds,viewpoint:this.viewpoint?this.viewpoint.toJson():null,fids:this.objectIds,mosaicOperation:this.operation};return esri.filter(_2e,function(_2f){if(_2f!==null){return true;}});}});dojo.mixin(esri.layers.MosaicRule,{METHOD_NONE:"esriMosaicNone",METHOD_CENTER:"esriMosaicCenter",METHOD_NADIR:"esriMosaicNadir",METHOD_VIEWPOINT:"esriMosaicViewpoint",METHOD_ATTRIBUTE:"esriMosaicAttribute",METHOD_LOCKRASTER:"esriMosaicLockRaster",METHOD_NORTHWEST:"esriMosaicNorthwest",METHOD_SEAMLINE:"esriMosaicSeamline",OPERATION_FIRST:"MT_FIRST",OPERATION_LAST:"MT_LAST",OPERATION_MIN:"MT_MIN",OPERATION_MAX:"MT_MAX",OPERATION_MEAN:"MT_MEAN",OPERATION_BLEND:"MT_BLEND"});dojo.declare("esri.layers.RasterFunction",null,{functionName:null,"arguments":null,variableName:null,toJson:function(){var _30={rasterFunction:this.functionName,rasterFunctionArguments:this["arguments"],variableName:this.variableName};return esri.filter(_30,function(_31){if(_31!==null){return true;}});}});}if(!dojo._hasResource["esri.layers.osm"]){dojo._hasResource["esri.layers.osm"]=true;dojo.provide("esri.layers.osm");dojo.declare("esri.layers.OpenStreetMapLayer",esri.layers.TiledMapServiceLayer,{constructor:function(_32){this.spatialReference=new esri.SpatialReference({wkid:102100});this.tileInfo=new esri.layers.TileInfo({rows:256,cols:256,dpi:96,format:"PNG8",compressionQuality:0,origin:{x:-20037508.342787,y:20037508.342787},spatialReference:{wkid:102100},lods:[{level:0,scale:591657527.591555,resolution:156543.033928},{level:1,scale:295828763.795777,resolution:78271.5169639999},{level:2,scale:147914381.897889,resolution:39135.7584820001},{level:3,scale:73957190.948944,resolution:19567.8792409999},{level:4,scale:36978595.474472,resolution:9783.93962049996},{level:5,scale:18489297.737236,resolution:4891.96981024998},{level:6,scale:9244648.868618,resolution:2445.98490512499},{level:7,scale:4622324.434309,resolution:1222.99245256249},{level:8,scale:2311162.217155,resolution:611.49622628138},{level:9,scale:1155581.108577,resolution:305.748113140558},{level:10,scale:577790.554289,resolution:152.874056570411},{level:11,scale:288895.277144,resolution:76.4370282850732},{level:12,scale:144447.638572,resolution:38.2185141425366},{level:13,scale:72223.819286,resolution:19.1092570712683},{level:14,scale:36111.909643,resolution:9.55462853563415},{level:15,scale:18055.954822,resolution:4.77731426794937},{level:16,scale:9027.977411,resolution:2.38865713397468},{level:17,scale:4513.988705,resolution:1.19432856685505},{level:18,scale:2256.994353,resolution:0.597164283559817}]});this.fullExtent=new esri.geometry.Extent({xmin:-20037508.34,ymin:-20037508.34,xmax:20037508.34,ymax:20037508.34,spatialReference:{wkid:102100}});this.initialExtent=new esri.geometry.Extent({xmin:-20037508.34,ymin:-20037508.34,xmax:20037508.34,ymax:20037508.34,spatialReference:{wkid:102100}});this.tileServers=(_32&&_32.tileServers)||["http://a.tile.openstreetmap.org/","http://b.tile.openstreetmap.org/","http://c.tile.openstreetmap.org/"];this.serversLength=this.tileServers.length;this._displayLevels=_32?_32.displayLevels:null;this.loaded=true;this.onLoad(this);var _33=_32&&_32.loadCallback;if(_33){_33(this);}},getTileUrl:function(_34,row,col){return esri._getProxiedUrl(this.tileServers[row%this.serversLength]+"/"+_34+"/"+col+"/"+row+".png");}});}if(!dojo._hasResource["esri.tasks._task"]){dojo._hasResource["esri.tasks._task"]=true;dojo.provide("esri.tasks._task");dojo.declare("esri.tasks._Task",null,{constructor:function(url){if(url&&dojo.isString(url)){this._url=esri.urlToObject(this.url=url);}this.normalization=true;this._errorHandler=dojo.hitch(this,this._errorHandler);},_encode:function(_35,_36,_37){var _38,_39,_3a={},i,p,pl;for(i in _35){if(i==="declaredClass"){continue;}_38=_35[i];_39=typeof (_38);if(_38!==null&&_38!==undefined&&_39!=="function"){if(dojo.isArray(_38)){_3a[i]=[];pl=_38.length;for(p=0;p<pl;p++){_3a[i][p]=this._encode(_38[p]);}}else{if(_39==="object"){if(_38.toJson){var _3b=_38.toJson(_37&&_37[i]);if(_38 instanceof esri.tasks.FeatureSet){if(_3b.spatialReference){_3b.sr=_3b.spatialReference;delete _3b.spatialReference;}}_3a[i]=_36?_3b:dojo.toJson(_3b);}}else{_3a[i]=_38;}}}}return _3a;},_successHandler:function(_3c,_3d,_3e,dfd){if(_3d){this[_3d].apply(this,_3c);}if(_3e){_3e.apply(null,_3c);}if(dfd){esri._resDfd(dfd,_3c);}},_errorHandler:function(err,_3f,dfd){this.onError(err);if(_3f){_3f(err);}if(dfd){dfd.errback(err);}},setNormalization:function(_40){this.normalization=_40;},onError:function(){}});dojo.declare("esri.tasks.FeatureSet",null,{constructor:function(_41){if(_41){dojo.mixin(this,_41);var _42=this.features,sr=_41.spatialReference,_43=esri.Graphic,_44=esri.geometry.getGeometryType(_41.geometryType);sr=(this.spatialReference=new esri.SpatialReference(sr));this.geometryType=_41.geometryType;if(_41.fields){this.fields=_41.fields;}dojo.forEach(_42,function(_45,i){var _46=_45.geometry&&_45.geometry.spatialReference;_42[i]=new _43((_44&&_45.geometry)?new _44(_45.geometry):null,_45.symbol&&esri.symbol.fromJson(_45.symbol),_45.attributes);if(_42[i].geometry&&!_46){_42[i].geometry.setSpatialReference(sr);}});}else{this.features=[];}},displayFieldName:null,geometryType:null,spatialReference:null,fields:[],features:[],fieldAliases:null,toJson:function(_47){var _48={};if(this.displayFieldName){_48.displayFieldName=this.displayFieldName;}if(this.fields){_48.fields=this.fields;}if(this.spatialReference){_48.spatialReference=this.spatialReference.toJson();}else{if(this.features[0]&&this.features[0].geometry){_48.spatialReference=this.features[0].geometry.spatialReference.toJson();}}if(this.features[0]){if(this.features[0].geometry){_48.geometryType=esri.geometry.getJsonType(this.features[0].geometry);}_48.features=esri._encodeGraphics(this.features,_47);}_48.exceededTransferLimit=this.exceededTransferLimit;return esri._sanitize(_48);}});esri.tasks._SpatialRelationship={SPATIAL_REL_INTERSECTS:"esriSpatialRelIntersects",SPATIAL_REL_CONTAINS:"esriSpatialRelContains",SPATIAL_REL_CROSSES:"esriSpatialRelCrosses",SPATIAL_REL_ENVELOPEINTERSECTS:"esriSpatialRelEnvelopeIntersects",SPATIAL_REL_INDEXINTERSECTS:"esriSpatialRelIndexIntersects",SPATIAL_REL_OVERLAPS:"esriSpatialRelOverlaps",SPATIAL_REL_TOUCHES:"esriSpatialRelTouches",SPATIAL_REL_WITHIN:"esriSpatialRelWithin",SPATIAL_REL_RELATION:"esriSpatialRelRelation"};}if(!dojo._hasResource["esri.tasks.query"]){dojo._hasResource["esri.tasks.query"]=true;dojo.provide("esri.tasks.query");dojo.declare("esri.tasks.QueryTask",esri.tasks._Task,{constructor:function(url,_49){this._handler=dojo.hitch(this,this._handler);this._relationshipQueryHandler=dojo.hitch(this,this._relationshipQueryHandler);this._executeForIdsHandler=dojo.hitch(this,this._executeForIdsHandler);this._countHandler=dojo.hitch(this,this._countHandler);this.source=_49&&_49.source;this.gdbVersion=_49&&_49.gdbVersion;},__msigns:[{n:"execute",c:4,a:[{i:0,p:["geometry"]}],e:2},{n:"executeForIds",c:3,a:[{i:0,p:["geometry"]}],e:2},{n:"executeForCount",c:3,a:[{i:0,p:["geometry"]}],e:2}],onComplete:function(){},onExecuteRelationshipQueryComplete:function(){},onExecuteForIdsComplete:function(){},onExecuteForCountComplete:function(){},execute:function(_4a,_4b,_4c,_4d,_4e){var _4f=_4e.assembly,_50=this._encode(dojo.mixin({},this._url.query,{f:"json"},_4a.toJson(_4f&&_4f[0]))),_51=this._handler,_52=this._errorHandler;if(this.source){var _53={source:this.source.toJson()};_50.layer=dojo.toJson(_53);}if(this.gdbVersion){_50.gdbVersion=this.gdbVersion;}return esri.request({url:this._url.path+"/query",content:_50,callbackParamName:"callback",load:function(r,i){_51(r,i,_4b,_4c,_4e.dfd);},error:function(r){_52(r,_4c,_4e.dfd);},callbackSuffix:_4d});},executeRelationshipQuery:function(_54,_55,_56){var _57=this._encode(dojo.mixin({},this._url.query,{f:"json"},_54.toJson())),_58=this._relationshipQueryHandler,_59=this._errorHandler;if(this.gdbVersion){_57.gdbVersion=this.gdbVersion;}var dfd=new dojo.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/queryRelatedRecords",content:_57,callbackParamName:"callback",load:function(r,i){_58(r,i,_55,_56,dfd);},error:function(r){_59(r,_56,dfd);}});return dfd;},executeForIds:function(_5a,_5b,_5c,_5d){var _5e=_5d.assembly,_5f=this._encode(dojo.mixin({},this._url.query,{f:"json",returnIdsOnly:true},_5a.toJson(_5e&&_5e[0]))),_60=this._executeForIdsHandler,_61=this._errorHandler;if(this.source){var _62={source:this.source.toJson()};_5f.layer=dojo.toJson(_62);}if(this.gdbVersion){_5f.gdbVersion=this.gdbVersion;}return esri.request({url:this._url.path+"/query",content:_5f,callbackParamName:"callback",load:function(r,i){_60(r,i,_5b,_5c,_5d.dfd);},error:function(r){_61(r,_5c,_5d.dfd);}});},executeForCount:function(_63,_64,_65,_66){var _67=_66.assembly,_68=this._encode(dojo.mixin({},this._url.query,{f:"json",returnIdsOnly:true,returnCountOnly:true},_63.toJson(_67&&_67[0]))),_69=this._countHandler,_6a=this._errorHandler;if(this.source){var _6b={source:this.source.toJson()};_68.layer=dojo.toJson(_6b);}if(this.gdbVersion){_68.gdbVersion=this.gdbVersion;}return esri.request({url:this._url.path+"/query",content:_68,callbackParamName:"callback",load:function(r,i){_69(r,i,_64,_65,_66.dfd);},error:function(r){_6a(r,_65,_66.dfd);}});},_handler:function(_6c,io,_6d,_6e,dfd){try{var _6f=new esri.tasks.FeatureSet(_6c);this._successHandler([_6f],"onComplete",_6d,dfd);}catch(err){this._errorHandler(err,_6e,dfd);}},_relationshipQueryHandler:function(_70,io,_71,_72,dfd){try{var gt=_70.geometryType,sr=_70.spatialReference,_73={};dojo.forEach(_70.relatedRecordGroups,function(gr){var _74={};_74.geometryType=gt;_74.spatialReference=sr;_74.features=gr.relatedRecords;var _75=new esri.tasks.FeatureSet(_74);_73[gr.objectId]=_75;});this._successHandler([_73],"onExecuteRelationshipQueryComplete",_71,dfd);}catch(err){this._errorHandler(err,_72,dfd);}},_executeForIdsHandler:function(_76,io,_77,_78,dfd){try{this._successHandler([_76.objectIds],"onExecuteForIdsComplete",_77,dfd);}catch(err){this._errorHandler(err,_78,dfd);}},_countHandler:function(_79,io,_7a,_7b,dfd){try{var _7c,_7d=_79.features,ids=_79.objectIds;if(ids){_7c=ids.length;}else{if(_7d){throw new Error(esri.bundle.tasks.query.invalid);}else{_7c=_79.count;}}this._successHandler([_7c],"onExecuteForCountComplete",_7a,dfd);}catch(err){this._errorHandler(err,_7b,dfd);}}});esri._createWrappers("esri.tasks.QueryTask");dojo.declare("esri.tasks.Query",null,{constructor:function(){this.spatialRelationship=esri.tasks.Query.SPATIAL_REL_INTERSECTS;},text:null,where:"",geometry:null,groupByFieldsForStatistics:null,objectIds:null,returnGeometry:false,orderByFields:null,outSpatialReference:null,outFields:null,outStatistics:null,timeExtent:null,relationParam:null,toJson:function(_7e){var _7f={text:this.text,where:this.where,returnGeometry:this.returnGeometry,spatialRel:this.spatialRelationship,maxAllowableOffset:this.maxAllowableOffset},g=_7e&&_7e["geometry"]||this.geometry,ids=this.objectIds,_80=this.outFields,_81=this.outSpatialReference,_82=this.groupByFieldsForStatistics,_83=this.orderByFields,_84=this.outStatistics;if(g){_7f.geometry=g;_7f.geometryType=esri.geometry.getJsonType(g);_7f.inSR=g.spatialReference.wkid||dojo.toJson(g.spatialReference.toJson());}if(ids){_7f.objectIds=ids.join(",");}if(_80){_7f.outFields=_80.join(",");}if(_82){_7f.groupByFieldsForStatistics=_82.join(",");}if(_83){_7f.orderByFields=_83.join(",");}if(_84){var _85=[];dojo.forEach(_84,function(_86,idx){_85.push(_86.toJson());});_7f.outStatistics=dojo.toJson(_85);}if(_81!==null){_7f.outSR=_81.wkid||dojo.toJson(_81.toJson());}else{if(g){_7f.outSR=g.spatialReference.wkid||dojo.toJson(g.spatialReference.toJson());}}var _87=this.timeExtent;_7f.time=_87?_87.toJson().join(","):null;var _88=this.relationParam;if(_88&&this.spatialRelationship===esri.tasks.Query.SPATIAL_REL_RELATION){_7f.relationParam=_88;}_7f._ts=this._ts;return _7f;}});dojo.mixin(esri.tasks.Query,esri.tasks._SpatialRelationship);dojo.declare("esri.tasks.RelationshipQuery",null,{definitionExpression:"",relationshipId:null,returnGeometry:false,objectIds:null,outSpatialReference:null,outFields:null,toJson:function(){var _89={definitionExpression:this.definitionExpression,relationshipId:this.relationshipId,returnGeometry:this.returnGeometry,maxAllowableOffset:this.maxAllowableOffset},_8a=this.objectIds,_8b=this.outFields,_8c=this.outSpatialReference;if(_8a){_89.objectIds=_8a.join(",");}if(_8b){_89.outFields=_8b.join(",");}if(_8c){_89.outSR=_8c.toJson();}_89._ts=this._ts;return _89;}});dojo.declare("esri.tasks.StatisticDefinition",null,{statisticType:null,onStatisticField:null,outStatisticFieldName:null,toJson:function(){var _8d={statisticType:this.statisticType,onStatisticField:this.onStatisticField};if(this.outStatisticFieldName){_8d.outStatisticFieldName=this.outStatisticFieldName;}return _8d;}});}if(!dojo._hasResource["dojo.io.iframe"]){dojo._hasResource["dojo.io.iframe"]=true;dojo.provide("dojo.io.iframe");dojo.getObject("io",true,dojo);dojo.io.iframe={create:function(_8e,_8f,uri){if(window[_8e]){return window[_8e];}if(window.frames[_8e]){return window.frames[_8e];}var _90=null;var _91=uri;if(!_91){if(dojo.config["useXDomain"]&&!dojo.config["dojoBlankHtmlUrl"]){console.warn("dojo.io.iframe.create: When using cross-domain Dojo builds,"+" please save dojo/resources/blank.html to your domain and set djConfig.dojoBlankHtmlUrl"+" to the path on your domain to blank.html");}_91=(dojo.config["dojoBlankHtmlUrl"]||dojo.moduleUrl("dojo","resources/blank.html"));}var _90=dojo.place("<iframe id=\""+_8e+"\" name=\""+_8e+"\" src=\""+_91+"\" onload=\""+_8f+"\" style=\"position: absolute; left: 1px; top: 1px; height: 1px; width: 1px; visibility: hidden\">",dojo.body());window[_8e]=_90;return _90;},setSrc:function(_92,src,_93){try{if(!_93){if(dojo.isWebKit){_92.location=src;}else{frames[_92.name].location=src;}}else{var _94;if(dojo.isIE||dojo.isWebKit){_94=_92.contentWindow.document;}else{_94=_92.contentWindow;}if(!_94){_92.location=src;return;}else{_94.location.replace(src);}}}catch(e){console.log("dojo.io.iframe.setSrc: ",e);}},doc:function(_95){var doc=_95.contentDocument||(((_95.name)&&(_95.document)&&(dojo.doc.getElementsByTagName("iframe")[_95.name].contentWindow)&&(dojo.doc.getElementsByTagName("iframe")[_95.name].contentWindow.document)))||((_95.name)&&(dojo.doc.frames[_95.name])&&(dojo.doc.frames[_95.name].document))||null;return doc;},send:function(_96){if(!this["_frame"]){this._frame=this.create(this._iframeName,dojo._scopeName+".io.iframe._iframeOnload();");}var dfd=dojo._ioSetArgs(_96,function(dfd){dfd.canceled=true;dfd.ioArgs._callNext();},function(dfd){var _97=null;try{var _98=dfd.ioArgs;var dii=dojo.io.iframe;var ifd=dii.doc(dii._frame);var _99=_98.handleAs;_97=ifd;if(_99!="html"){if(_99=="xml"){if(dojo.isIE<9||(dojo.isIE&&dojo.isQuirks)){dojo.query("a",dii._frame.contentWindow.document.documentElement).orphan();var _9a=(dii._frame.contentWindow.document).documentElement.innerText;_9a=_9a.replace(/>\s+</g,"><");_9a=dojo.trim(_9a);var _9b={responseText:_9a};_97=dojo._contentHandlers["xml"](_9b);}}else{_97=ifd.getElementsByTagName("textarea")[0].value;if(_99=="json"){_97=dojo.fromJson(_97);}else{if(_99=="javascript"){_97=dojo.eval(_97);}}}}}catch(e){_97=e;}finally{_98._callNext();}return _97;},function(_9c,dfd){dfd.ioArgs._hasError=true;dfd.ioArgs._callNext();return _9c;});dfd.ioArgs._callNext=function(){if(!this["_calledNext"]){this._calledNext=true;dojo.io.iframe._currentDfd=null;dojo.io.iframe._fireNextRequest();}};this._dfdQueue.push(dfd);this._fireNextRequest();dojo._ioWatch(dfd,function(dfd){return !dfd.ioArgs["_hasError"];},function(dfd){return (!!dfd.ioArgs["_finished"]);},function(dfd){if(dfd.ioArgs._finished){dfd.callback(dfd);}else{dfd.errback(new Error("Invalid dojo.io.iframe request state"));}});return dfd;},_currentDfd:null,_dfdQueue:[],_iframeName:dojo._scopeName+"IoIframe",_fireNextRequest:function(){try{if((this._currentDfd)||(this._dfdQueue.length==0)){return;}do{var dfd=this._currentDfd=this._dfdQueue.shift();}while(dfd&&dfd.canceled&&this._dfdQueue.length);if(!dfd||dfd.canceled){this._currentDfd=null;return;}var _9d=dfd.ioArgs;var _9e=_9d.args;_9d._contentToClean=[];var fn=dojo.byId(_9e["form"]);var _9f=_9e["content"]||{};if(fn){if(_9f){var _a0=function(_a1,_a2){dojo.create("input",{type:"hidden",name:_a1,value:_a2},fn);_9d._contentToClean.push(_a1);};for(var x in _9f){var val=_9f[x];if(dojo.isArray(val)&&val.length>1){var i;for(i=0;i<val.length;i++){_a0(x,val[i]);}}else{if(!fn[x]){_a0(x,val);}else{fn[x].value=val;}}}}var _a3=fn.getAttributeNode("action");var _a4=fn.getAttributeNode("method");var _a5=fn.getAttributeNode("target");if(_9e["url"]){_9d._originalAction=_a3?_a3.value:null;if(_a3){_a3.value=_9e.url;}else{fn.setAttribute("action",_9e.url);}}if(!_a4||!_a4.value){if(_a4){_a4.value=(_9e["method"])?_9e["method"]:"post";}else{fn.setAttribute("method",(_9e["method"])?_9e["method"]:"post");}}_9d._originalTarget=_a5?_a5.value:null;if(_a5){_a5.value=this._iframeName;}else{fn.setAttribute("target",this._iframeName);}fn.target=this._iframeName;dojo._ioNotifyStart(dfd);fn.submit();}else{var _a6=_9e.url+(_9e.url.indexOf("?")>-1?"&":"?")+_9d.query;dojo._ioNotifyStart(dfd);this.setSrc(this._frame,_a6,true);}}catch(e){dfd.errback(e);}},_iframeOnload:function(){var dfd=this._currentDfd;if(!dfd){this._fireNextRequest();return;}var _a7=dfd.ioArgs;var _a8=_a7.args;var _a9=dojo.byId(_a8.form);if(_a9){var _aa=_a7._contentToClean;for(var i=0;i<_aa.length;i++){var key=_aa[i];for(var j=0;j<_a9.childNodes.length;j++){var _ab=_a9.childNodes[j];if(_ab.name==key){dojo.destroy(_ab);break;}}}if(_a7["_originalAction"]){_a9.setAttribute("action",_a7._originalAction);}if(_a7["_originalTarget"]){_a9.setAttribute("target",_a7._originalTarget);_a9.target=_a7._originalTarget;}}_a7._finished=true;}};}if(!dojo._hasResource["dojo.cldr.supplemental"]){dojo._hasResource["dojo.cldr.supplemental"]=true;dojo.provide("dojo.cldr.supplemental");dojo.getObject("cldr.supplemental",true,dojo);dojo.cldr.supplemental.getFirstDayOfWeek=function(_ac){var _ad={mv:5,ae:6,af:6,bh:6,dj:6,dz:6,eg:6,er:6,et:6,iq:6,ir:6,jo:6,ke:6,kw:6,ly:6,ma:6,om:6,qa:6,sa:6,sd:6,so:6,sy:6,tn:6,ye:6,ar:0,as:0,az:0,bw:0,ca:0,cn:0,fo:0,ge:0,gl:0,gu:0,hk:0,il:0,"in":0,jm:0,jp:0,kg:0,kr:0,la:0,mh:0,mn:0,mo:0,mp:0,mt:0,nz:0,ph:0,pk:0,sg:0,th:0,tt:0,tw:0,um:0,us:0,uz:0,vi:0,zw:0};var _ae=dojo.cldr.supplemental._region(_ac);var dow=_ad[_ae];return (dow===undefined)?1:dow;};dojo.cldr.supplemental._region=function(_af){_af=dojo.i18n.normalizeLocale(_af);var _b0=_af.split("-");var _b1=_b0[1];if(!_b1){_b1={de:"de",en:"us",es:"es",fi:"fi",fr:"fr",he:"il",hu:"hu",it:"it",ja:"jp",ko:"kr",nl:"nl",pt:"br",sv:"se",zh:"cn"}[_b0[0]];}else{if(_b1.length==4){_b1=_b0[2];}}return _b1;};dojo.cldr.supplemental.getWeekend=function(_b2){var _b3={"in":0,af:4,dz:4,ir:4,om:4,sa:4,ye:4,ae:5,bh:5,eg:5,il:5,iq:5,jo:5,kw:5,ly:5,ma:5,qa:5,sd:5,sy:5,tn:5};var _b4={af:5,dz:5,ir:5,om:5,sa:5,ye:5,ae:6,bh:5,eg:6,il:6,iq:6,jo:6,kw:6,ly:6,ma:6,qa:6,sd:6,sy:6,tn:6};var _b5=dojo.cldr.supplemental._region(_b2);var _b6=_b3[_b5];var end=_b4[_b5];if(_b6===undefined){_b6=6;}if(end===undefined){end=0;}return {start:_b6,end:end};};}if(!dojo._hasResource["dojo.regexp"]){dojo._hasResource["dojo.regexp"]=true;dojo.provide("dojo.regexp");dojo.getObject("regexp",true,dojo);dojo.regexp.escapeString=function(str,_b7){return str.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(ch){if(_b7&&_b7.indexOf(ch)!=-1){return ch;}return "\\"+ch;});};dojo.regexp.buildGroupRE=function(arr,re,_b8){if(!(arr instanceof Array)){return re(arr);}var b=[];for(var i=0;i<arr.length;i++){b.push(re(arr[i]));}return dojo.regexp.group(b.join("|"),_b8);};dojo.regexp.group=function(_b9,_ba){return "("+(_ba?"?:":"")+_b9+")";};}if(!dojo._hasResource["dojo.string"]){dojo._hasResource["dojo.string"]=true;dojo.provide("dojo.string");dojo.getObject("string",true,dojo);dojo.string.rep=function(str,num){if(num<=0||!str){return "";}var buf=[];for(;;){if(num&1){buf.push(str);}if(!(num>>=1)){break;}str+=str;}return buf.join("");};dojo.string.pad=function(_bb,_bc,ch,end){if(!ch){ch="0";}var out=String(_bb),pad=dojo.string.rep(ch,Math.ceil((_bc-out.length)/ch.length));return end?out+pad:pad+out;};dojo.string.substitute=function(_bd,map,_be,_bf){_bf=_bf||dojo.global;_be=_be?dojo.hitch(_bf,_be):function(v){return v;};return _bd.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_c0,key,_c1){var _c2=dojo.getObject(key,false,map);if(_c1){_c2=dojo.getObject(_c1,false,_bf).call(_bf,_c2,key);}return _be(_c2,key).toString();});};dojo.string.trim=String.prototype.trim?dojo.trim:function(str){str=str.replace(/^\s+/,"");for(var i=str.length-1;i>=0;i--){if(/\S/.test(str.charAt(i))){str=str.substring(0,i+1);break;}}return str;};}if(!dojo._hasResource["dojo.date.locale"]){dojo._hasResource["dojo.date.locale"]=true;dojo.provide("dojo.date.locale");dojo.getObject("date.locale",true,dojo);(function(){function _c3(_c4,_c5,_c6,_c7){return _c7.replace(/([a-z])\1*/ig,function(_c8){var s,pad,c=_c8.charAt(0),l=_c8.length,_c9=["abbr","wide","narrow"];switch(c){case "G":s=_c5[(l<4)?"eraAbbr":"eraNames"][_c4.getFullYear()<0?0:1];break;case "y":s=_c4.getFullYear();switch(l){case 1:break;case 2:if(!_c6.fullYear){s=String(s);s=s.substr(s.length-2);break;}default:pad=true;}break;case "Q":case "q":s=Math.ceil((_c4.getMonth()+1)/3);pad=true;break;case "M":var m=_c4.getMonth();if(l<3){s=m+1;pad=true;}else{var _ca=["months","format",_c9[l-3]].join("-");s=_c5[_ca][m];}break;case "w":var _cb=0;s=dojo.date.locale._getWeekOfYear(_c4,_cb);pad=true;break;case "d":s=_c4.getDate();pad=true;break;case "D":s=dojo.date.locale._getDayOfYear(_c4);pad=true;break;case "E":var d=_c4.getDay();if(l<3){s=d+1;pad=true;}else{var _cc=["days","format",_c9[l-3]].join("-");s=_c5[_cc][d];}break;case "a":var _cd=(_c4.getHours()<12)?"am":"pm";s=_c6[_cd]||_c5["dayPeriods-format-wide-"+_cd];break;case "h":case "H":case "K":case "k":var h=_c4.getHours();switch(c){case "h":s=(h%12)||12;break;case "H":s=h;break;case "K":s=(h%12);break;case "k":s=h||24;break;}pad=true;break;case "m":s=_c4.getMinutes();pad=true;break;case "s":s=_c4.getSeconds();pad=true;break;case "S":s=Math.round(_c4.getMilliseconds()*Math.pow(10,l-3));pad=true;break;case "v":case "z":s=dojo.date.locale._getZone(_c4,true,_c6);if(s){break;}l=4;case "Z":var _ce=dojo.date.locale._getZone(_c4,false,_c6);var tz=[(_ce<=0?"+":"-"),dojo.string.pad(Math.floor(Math.abs(_ce)/60),2),dojo.string.pad(Math.abs(_ce)%60,2)];if(l==4){tz.splice(0,0,"GMT");tz.splice(3,0,":");}s=tz.join("");break;default:throw new Error("dojo.date.locale.format: invalid pattern char: "+_c7);}if(pad){s=dojo.string.pad(s,l);}return s;});};dojo.date.locale._getZone=function(_cf,_d0,_d1){if(_d0){return dojo.date.getTimezoneName(_cf);}else{return _cf.getTimezoneOffset();}};dojo.date.locale.format=function(_d2,_d3){_d3=_d3||{};var _d4=dojo.i18n.normalizeLocale(_d3.locale),_d5=_d3.formatLength||"short",_d6=dojo.date.locale._getGregorianBundle(_d4),str=[],_d7=dojo.hitch(this,_c3,_d2,_d6,_d3);if(_d3.selector=="year"){return _d8(_d6["dateFormatItem-yyyy"]||"yyyy",_d7);}var _d9;if(_d3.selector!="date"){_d9=_d3.timePattern||_d6["timeFormat-"+_d5];if(_d9){str.push(_d8(_d9,_d7));}}if(_d3.selector!="time"){_d9=_d3.datePattern||_d6["dateFormat-"+_d5];if(_d9){str.push(_d8(_d9,_d7));}}return str.length==1?str[0]:_d6["dateTimeFormat-"+_d5].replace(/\{(\d+)\}/g,function(_da,key){return str[key];});};dojo.date.locale.regexp=function(_db){return dojo.date.locale._parseInfo(_db).regexp;};dojo.date.locale._parseInfo=function(_dc){_dc=_dc||{};var _dd=dojo.i18n.normalizeLocale(_dc.locale),_de=dojo.date.locale._getGregorianBundle(_dd),_df=_dc.formatLength||"short",_e0=_dc.datePattern||_de["dateFormat-"+_df],_e1=_dc.timePattern||_de["timeFormat-"+_df],_e2;if(_dc.selector=="date"){_e2=_e0;}else{if(_dc.selector=="time"){_e2=_e1;}else{_e2=_de["dateTimeFormat-"+_df].replace(/\{(\d+)\}/g,function(_e3,key){return [_e1,_e0][key];});}}var _e4=[],re=_d8(_e2,dojo.hitch(this,_e5,_e4,_de,_dc));return {regexp:re,tokens:_e4,bundle:_de};};dojo.date.locale.parse=function(_e6,_e7){var _e8=/[\u200E\u200F\u202A\u202E]/g,_e9=dojo.date.locale._parseInfo(_e7),_ea=_e9.tokens,_eb=_e9.bundle,re=new RegExp("^"+_e9.regexp.replace(_e8,"")+"$",_e9.strict?"":"i"),_ec=re.exec(_e6&&_e6.replace(_e8,""));if(!_ec){return null;}var _ed=["abbr","wide","narrow"],_ee=[1970,0,1,0,0,0,0],_ef="",_f0=dojo.every(_ec,function(v,i){if(!i){return true;}var _f1=_ea[i-1];var l=_f1.length;switch(_f1.charAt(0)){case "y":if(l!=2&&_e7.strict){_ee[0]=v;}else{if(v<100){v=Number(v);var _f2=""+new Date().getFullYear(),_f3=_f2.substring(0,2)*100,_f4=Math.min(Number(_f2.substring(2,4))+20,99),num=(v<_f4)?_f3+v:_f3-100+v;_ee[0]=num;}else{if(_e7.strict){return false;}_ee[0]=v;}}break;case "M":if(l>2){var _f5=_eb["months-format-"+_ed[l-3]].concat();if(!_e7.strict){v=v.replace(".","").toLowerCase();_f5=dojo.map(_f5,function(s){return s.replace(".","").toLowerCase();});}v=dojo.indexOf(_f5,v);if(v==-1){return false;}}else{v--;}_ee[1]=v;break;case "E":case "e":var _f6=_eb["days-format-"+_ed[l-3]].concat();if(!_e7.strict){v=v.toLowerCase();_f6=dojo.map(_f6,function(d){return d.toLowerCase();});}v=dojo.indexOf(_f6,v);if(v==-1){return false;}break;case "D":_ee[1]=0;case "d":_ee[2]=v;break;case "a":var am=_e7.am||_eb["dayPeriods-format-wide-am"],pm=_e7.pm||_eb["dayPeriods-format-wide-pm"];if(!_e7.strict){var _f7=/\./g;v=v.replace(_f7,"").toLowerCase();am=am.replace(_f7,"").toLowerCase();pm=pm.replace(_f7,"").toLowerCase();}if(_e7.strict&&v!=am&&v!=pm){return false;}_ef=(v==pm)?"p":(v==am)?"a":"";break;case "K":if(v==24){v=0;}case "h":case "H":case "k":if(v>23){return false;}_ee[3]=v;break;case "m":_ee[4]=v;break;case "s":_ee[5]=v;break;case "S":_ee[6]=v;}return true;});var _f8=+_ee[3];if(_ef==="p"&&_f8<12){_ee[3]=_f8+12;}else{if(_ef==="a"&&_f8==12){_ee[3]=0;}}var _f9=new Date(_ee[0],_ee[1],_ee[2],_ee[3],_ee[4],_ee[5],_ee[6]);if(_e7.strict){_f9.setFullYear(_ee[0]);}var _fa=_ea.join(""),_fb=_fa.indexOf("d")!=-1,_fc=_fa.indexOf("M")!=-1;if(!_f0||(_fc&&_f9.getMonth()>_ee[1])||(_fb&&_f9.getDate()>_ee[2])){return null;}if((_fc&&_f9.getMonth()<_ee[1])||(_fb&&_f9.getDate()<_ee[2])){_f9=dojo.date.add(_f9,"hour",1);}return _f9;};function _d8(_fd,_fe,_ff,_100){var _101=function(x){return x;};_fe=_fe||_101;_ff=_ff||_101;_100=_100||_101;var _102=_fd.match(/(''|[^'])+/g),_103=_fd.charAt(0)=="'";dojo.forEach(_102,function(_104,i){if(!_104){_102[i]="";}else{_102[i]=(_103?_ff:_fe)(_104.replace(/''/g,"'"));_103=!_103;}});return _100(_102.join(""));};function _e5(_105,_106,_107,_108){_108=dojo.regexp.escapeString(_108);if(!_107.strict){_108=_108.replace(" a"," ?a");}return _108.replace(/([a-z])\1*/ig,function(_109){var s,c=_109.charAt(0),l=_109.length,p2="",p3="";if(_107.strict){if(l>1){p2="0"+"{"+(l-1)+"}";}if(l>2){p3="0"+"{"+(l-2)+"}";}}else{p2="0?";p3="0{0,2}";}switch(c){case "y":s="\\d{2,4}";break;case "M":s=(l>2)?"\\S+?":"1[0-2]|"+p2+"[1-9]";break;case "D":s="[12][0-9][0-9]|3[0-5][0-9]|36[0-6]|"+p3+"[1-9][0-9]|"+p2+"[1-9]";break;case "d":s="3[01]|[12]\\d|"+p2+"[1-9]";break;case "w":s="[1-4][0-9]|5[0-3]|"+p2+"[1-9]";break;case "E":s="\\S+";break;case "h":s="1[0-2]|"+p2+"[1-9]";break;case "k":s="1[01]|"+p2+"\\d";break;case "H":s="1\\d|2[0-3]|"+p2+"\\d";break;case "K":s="1\\d|2[0-4]|"+p2+"[1-9]";break;case "m":case "s":s="[0-5]\\d";break;case "S":s="\\d{"+l+"}";break;case "a":var am=_107.am||_106["dayPeriods-format-wide-am"],pm=_107.pm||_106["dayPeriods-format-wide-pm"];s=am+"|"+pm;if(!_107.strict){if(am!=am.toLowerCase()){s+="|"+am.toLowerCase();}if(pm!=pm.toLowerCase()){s+="|"+pm.toLowerCase();}if(s.indexOf(".")!=-1){s+="|"+s.replace(/\./g,"");}}s=s.replace(/\./g,"\\.");break;default:s=".*";}if(_105){_105.push(_109);}return "("+s+")";}).replace(/[\xa0 ]/g,"[\\s\\xa0]");};})();(function(){var _10a=[];dojo.date.locale.addCustomFormats=function(_10b,_10c){_10a.push({pkg:_10b,name:_10c});};dojo.date.locale._getGregorianBundle=function(_10d){var _10e={};dojo.forEach(_10a,function(desc){var _10f=dojo.i18n.getLocalization(desc.pkg,desc.name,_10d);_10e=dojo.mixin(_10e,_10f);},this);return _10e;};})();dojo.date.locale.addCustomFormats("dojo.cldr","gregorian");dojo.date.locale.getNames=function(item,type,_110,_111){var _112,_113=dojo.date.locale._getGregorianBundle(_111),_114=[item,_110,type];if(_110=="standAlone"){var key=_114.join("-");_112=_113[key];if(_112[0]==1){_112=undefined;}}_114[1]="format";return (_112||_113[_114.join("-")]).concat();};dojo.date.locale.isWeekend=function(_115,_116){var _117=dojo.cldr.supplemental.getWeekend(_116),day=(_115||new Date()).getDay();if(_117.end<_117.start){_117.end+=7;if(day<_117.start){day+=7;}}return day>=_117.start&&day<=_117.end;};dojo.date.locale._getDayOfYear=function(_118){return dojo.date.difference(new Date(_118.getFullYear(),0,1,_118.getHours()),_118)+1;};dojo.date.locale._getWeekOfYear=function(_119,_11a){if(arguments.length==1){_11a=0;}var _11b=new Date(_119.getFullYear(),0,1).getDay(),adj=(_11b-_11a+7)%7,week=Math.floor((dojo.date.locale._getDayOfYear(_119)+adj-1)/7);if(_11b==_11a){week++;}return week;};}if(!dojo._hasResource["esri.layers.FeatureLayer"]){dojo._hasResource["esri.layers.FeatureLayer"]=true;dojo.provide("esri.layers.FeatureLayer");dojo.declare("esri.layers.FeatureLayer",esri.layers.GraphicsLayer,{constructor:function(url,_11c){this._outFields=_11c&&_11c.outFields;this._loadCallback=_11c&&_11c.loadCallback;var _11d=_11c&&_11c._usePatch;this._usePatch=(_11d===null||_11d===undefined)?true:_11d;this._trackIdField=_11c&&_11c.trackIdField;this.objectIdField=_11c&&_11c.objectIdField;this._maxOffset=_11c&&_11c.maxAllowableOffset;this._optEditable=_11c&&_11c.editable;this._optAutoGen=_11c&&_11c.autoGeneralize;this.editSummaryCallback=_11c&&_11c.editSummaryCallback;this.userId=_11c&&_11c.userId;this.userIsAdmin=_11c&&_11c.userIsAdmin;this.useMapTime=(_11c&&_11c.hasOwnProperty("useMapTime"))?(!!_11c.useMapTime):true;this.source=_11c&&_11c.source;this.gdbVersion=_11c&&_11c.gdbVersion;this._selectedFeatures={};this._selectedFeaturesArr=[];this._newFeatures=[];this._deletedFeatures={};this._ulid=this._getUniqueId();var ctor=this.constructor,mode=this.mode=(esri._isDefined(_11c&&_11c.mode)?_11c.mode:ctor.MODE_ONDEMAND);switch(mode){case ctor.MODE_SNAPSHOT:this._mode=new esri.layers._SnapshotMode(this);this._isSnapshot=true;break;case ctor.MODE_ONDEMAND:this._tileWidth=(_11c&&_11c.tileWidth)||512;this._tileHeight=(_11c&&_11c.tileHeight)||512;this._mode=new esri.layers._OnDemandMode(this);var _11e=_11c&&_11c.latticeTiling;this.latticeTiling=_11e;break;case ctor.MODE_SELECTION:this._mode=new esri.layers._SelectionMode(this);this._isSelOnly=true;break;}this._initLayer=dojo.hitch(this,this._initLayer);this._selectHandler=dojo.hitch(this,this._selectHandler);this._editable=false;if(dojo.isObject(url)&&url.layerDefinition){var json=url;this._collection=true;this.mode=ctor.MODE_SNAPSHOT;this._initLayer(json);return this;}this._task=new esri.tasks.QueryTask(this.url,{source:this.source,gdbVersion:this.gdbVersion});var _11f=this._url.path;this._fserver=false;if(_11f.search(/\/FeatureServer\//i)!==-1){this._fserver=true;}var _120=_11c&&_11c.resourceInfo;if(_120){this._initLayer(_120);}else{if(this.source){var _121={source:this.source.toJson()};this._url.query=dojo.mixin(this._url.query,{layer:dojo.toJson(_121)});}if(this.gdbVersion){this._url.query=dojo.mixin(this._url.query,{gdbVersion:this.gdbVersion});}esri.request({url:_11f,content:dojo.mixin({f:"json"},this._url.query),callbackParamName:"callback",load:this._initLayer,error:this._errorHandler});}},_initLayer:function(_122,io){if(_122||io){this._json=_122;this._findCredential();if(this._collection){this._mode=new esri.layers._SnapshotMode(this);this._isSnapshot=true;this._featureSet=_122.featureSet;this._nextId=_122.nextObjectId;_122=_122.layerDefinition;}if(_122.hasOwnProperty("capabilities")){var _123=(this.capabilities=_122.capabilities);if(_123&&_123.toLowerCase().indexOf("editing")!==-1){this._editable=true;}else{this._editable=false;}}else{if(!this._collection){this._editable=this._fserver;}}if(esri._isDefined(this._optEditable)){this._editable=this._optEditable;delete this._optEditable;}this._json=dojo.toJson(this._json);if(this._editable){delete this._maxOffset;}else{if(this.mode!==this.constructor.MODE_SNAPSHOT&&((_122.geometryType==="esriGeometryPolyline")||(_122.geometryType==="esriGeometryPolygon"))){this._autoGeneralize=esri._isDefined(this._optAutoGen)?this._optAutoGen:(this.mode===this.constructor.MODE_ONDEMAND);delete this._optAutoGen;}}this.minScale=_122.minScale||0;this.maxScale=_122.maxScale||0;this.layerId=_122.id;this.name=_122.name;this.description=_122.description;this.copyright=_122.copyrightText;this.type=_122.type;this.geometryType=_122.geometryType;this.displayField=_122.displayField;this.defaultDefinitionExpression=_122.definitionExpression;this.fullExtent=new esri.geometry.Extent(_122.extent);if((this.geometryType==="esriGeometryPoint")||(this.geometryType==="esriGeometryMultipoint")){this.latticeTiling=false;}this.indexedFields=_122.indexedFields;this.maxRecordCount=_122.maxRecordCount;this.canModifyLayer=_122.canModifyLayer;this.supportsStatistics=_122.supportsStatistics;this.supportsAdvancedQueries=_122.supportsAdvancedQueries;this.hasLabels=_122.hasLabels;this.canScaleSymbols=_122.canScaleSymbols;this.supportsRollbackOnFailure=_122.supportsRollbackOnFailure;this.syncCanReturnChanges=_122.syncCanReturnChanges;this.isDataVersioned=_122.isDataVersioned;this.editFieldsInfo=_122.editFieldsInfo;this.ownershipBasedAccessControlForFeatures=_122.ownershipBasedAccessControlForFeatures;if(this.editFieldsInfo&&this.ownershipBasedAccessControlForFeatures){this.creatorField=this.editFieldsInfo.creatorField;}this.relationships=_122.relationships;this.allowGeometryUpdates=esri._isDefined(_122.allowGeometryUpdates)?_122.allowGeometryUpdates:true;this._isTable=(this.type==="Table");var _124=(this.fields=[]),_125=_122.fields,i;for(i=0;i<_125.length;i++){_124.push(new esri.layers.Field(_125[i]));}if(!this.objectIdField){this.objectIdField=_122.objectIdField;if(!this.objectIdField){_125=_122.fields;for(i=0;i<_125.length;i++){var _126=_125[i];if(_126.type==="esriFieldTypeOID"){this.objectIdField=_126.name;break;}}}if(!this.objectIdField){console.debug("esri.layers.FeatureLayer: "+esri.substitute({url:this.url},esri.bundle.layers.FeatureLayer.noOIDField));}}if(!esri._isDefined(this._nextId)){var _127=this.objectIdField,_128=-1;if(this._collection&&_127){var fset=this._featureSet,_129=fset&&fset.features,il=_129?_129.length:0,oid,attr;for(i=0;i<il;i++){attr=_129[i].attributes;oid=attr&&attr[_127];if(oid>_128){_128=oid;}}}this._nextId=(_128+1);}this.globalIdField=_122.globalIdField;this.typeIdField=_122.typeIdField;this.visibilityField=_122.visibilityField;var _12a=_122.defaultSymbol;if(_12a){this.defaultSymbol=esri.symbol.fromJson(_12a);}var _12b=this.types=[],_12c=_122.types,_12d,_12e,_12f,_130=this.editFieldsInfo,_131=_130&&_130.creatorField,_132=_130&&_130.editorField,fix=(_131||_132),_133=[];if(_12c){for(i=0;i<_12c.length;i++){_12d=new esri.layers.FeatureType(_12c[i]);_12e=_12d.templates;if(fix&&_12e&&_12e.length){_133=_133.concat(_12e);}_12b.push(_12d);}}var _134=_122.templates,_135,_136=this.templates=[];if(_134){for(i=0;i<_134.length;i++){_135=new esri.layers.FeatureTemplate(_134[i]);if(fix){_133.push(_135);}_136.push(_135);}}for(i=0;i<_133.length;i++){_12f=dojo.getObject("prototype.attributes",false,_133[i]);if(_12f){if(_131){delete _12f[_131];}if(_132){delete _12f[_132];}}}var _137=_122.timeInfo;if(_137){this.timeInfo=new esri.layers.TimeInfo(_137);this._startTimeField=_137.startTimeField;this._endTimeField=_137.endTimeField;if(this._startTimeField&&this._endTimeField){this._twoTimeFields=true;}if(this._trackIdField){_137.trackIdField=this._trackIdField;}else{this._trackIdField=_137.trackIdField;}}this.hasAttachments=(!this._collection&&_122.hasAttachments)?true:false;this.htmlPopupType=_122.htmlPopupType;var _138=_122.drawingInfo,_139;if(!this.renderer){if(_138&&_138.renderer){_139=_138.renderer;this.setRenderer(esri.renderer.fromJson(_139));if(_139.type==="classBreaks"){this.renderer._setMaxInclusiveness(true);}if(!this._collection){var _13a=_139.type,_13b=[];_139=this.renderer;switch(_13a){case "simple":_13b.push(_139.symbol);break;case "uniqueValue":case "classBreaks":_13b.push(_139.defaultSymbol);_13b=_13b.concat(dojo.map(_139.infos,function(info){return info.symbol;}));break;}_13b=dojo.filter(_13b,esri._isDefined);var _13c=this._url.path+"/images/",_13d=this._getToken();dojo.forEach(_13b,function(sym){var url=sym.url;if(url){if((url.search(/https?\:/)===-1)&&(url.indexOf("data:")===-1)){sym.url=_13c+url;}if(_13d&&sym.url.search(/https?\:/)!==-1){sym.url+=("?token="+_13d);}}});}}else{if(_12a){_12c=this.types;if(_12c.length>0){_139=new esri.renderer.UniqueValueRenderer(this.defaultSymbol,this.typeIdField);dojo.forEach(_12c,function(type){_139.addValue(type.id,type.symbol);});}else{_139=new esri.renderer.SimpleRenderer(this.defaultSymbol);}this.setRenderer(_139);}else{if(!this._isTable){var _13e;switch(this.geometryType){case "esriGeometryPoint":case "esriGeometryMultipoint":_13e=new esri.symbol.SimpleMarkerSymbol();break;case "esriGeometryPolyline":_13e=new esri.symbol.SimpleLineSymbol();break;case "esriGeometryPolygon":_13e=new esri.symbol.SimpleFillSymbol();break;}this.setRenderer(_13e?new esri.renderer.SimpleRenderer(_13e):null);}}}}var _13f=(_138&&_138.transparency)||0;if(!esri._isDefined(this.opacity)&&_13f>0){this.opacity=1-(_13f/100);}this.version=_122.currentVersion;if(!this.version){var ver;if("capabilities" in _122||"drawingInfo" in _122||"hasAttachments" in _122||"htmlPopupType" in _122||"relationships" in _122||"timeInfo" in _122||"typeIdField" in _122||"types" in _122){ver=10;}else{ver=9.3;}this.version=ver;}if((dojo.isIE||dojo.isSafari)&&this._editable&&this.version<10.02){this._ts=true;}this.loaded=true;this._fixRendererFields();this._checkFields();this._updateCaps();if(this._collection){this._fireUpdateStart();var _140=this._featureSet;delete this._featureSet;this._mode._drawFeatures(new esri.tasks.FeatureSet(_140));this._fcAdded=true;}this.onLoad(this);var _141=this._loadCallback;if(_141){delete this._loadCallback;_141(this);}}},setRenderer:function(ren){this.inherited("setRenderer",arguments);var _142=this.renderer;if(_142){this._ager=(_142.declaredClass.indexOf("TemporalRenderer")!==-1&&_142.observationAger&&_142.observationRenderer);var _143=dojo.filter([_142,_142.observationRenderer,_142.latestObservationRenderer,_142.trackRenderer],esri._isDefined);var _144=[];dojo.forEach(_143,function(rnd){_144.push(rnd.attributeField);_144.push(rnd.attributeField2);_144.push(rnd.attributeField3);},this);this._rendererFields=dojo.filter(_144,esri._isDefined);}else{this._ager=false;this._rendererFields=[];}if(this.loaded&&this._rendererFields.length>0){this._fixRendererFields();this._checkFields(this._rendererFields);}if(this.loaded&&this._collection){this._typesDirty=true;}},_setMap:function(map,_145){this._map=map;this._toggleTime(true);var div=this.inherited("_setMap",arguments);this.clearSelection();var _146=this.renderer;if(this.timeInfo){if(this._trackIdField||(_146&&(_146.latestObservationRenderer||_146.trackRenderer))){this._trackManager=new esri.layers._TrackManager(this);this._trackManager.initialize(map);}}this._zoomConnect=dojo.connect(map,"onZoomEnd",this,this._zoomHandler);this._zoomHandler();var mode=this._mode;if(mode){mode.initialize(map);}return div;},_unsetMap:function(map,_147){var mode=this._mode;if(mode){mode.destroy();this._mode=null;}if(this._trackManager){this._trackManager.destroy();this._trackManager=null;}dojo.disconnect(this._zoomConnect);this._zoomConnect=null;this._toggleTime(false);this.inherited("_unsetMap",arguments);},refresh:function(){var mode=this._mode;if(mode){mode.refresh();}},setEditable:function(_148){if(!this._collection){console.log("FeatureLayer:setEditCapabilities - this functionality is not yet supported for layer in a feature service");return this;}if(!this.loaded){this._optEditable=_148;return this;}var _149=this._editable;this._editable=_148;this._updateCaps();if(_149!==_148){this.onCapabilitiesChange();}return this;},getEditCapabilities:function(_14a){var _14b={"canCreate":false,"canUpdate":false,"canDelete":false};if(!this.loaded||!this._editable){return _14b;}var _14c=_14a&&_14a.feature,_14d=_14a&&_14a.userId,caps=dojo.map((this.capabilities?this.capabilities.toLowerCase().split(","):[]),dojo.trim),_14e=dojo.indexOf(caps,"editing")>-1,_14f=_14e&&(dojo.indexOf(caps,"create")>-1),_150=_14e&&(dojo.indexOf(caps,"update")>-1),_151=_14e&&(dojo.indexOf(caps,"delete")>-1),_152=this.ownershipBasedAccessControlForFeatures,_153=this.editFieldsInfo,_154=_153&&_153.creatorField,_155=_153&&_153.realm,_156=_14c&&_14c.attributes,_157=(_156&&_154)?_156[_154]:undefined,_158,_159=!!this.userIsAdmin,_15a=!_152||_159||!!(_152.allowOthersToUpdate||_152.allowUpdateToOthers),_15b=!_152||_159||!!(_152.allowOthersToDelete||_152.allowDeleteToOthers);if(_14e&&(!(_14f||_150||_151)||_159)){_14f=_150=_151=true;}_158={"canCreate":_14f,"canUpdate":_150,"canDelete":_151};if(_157===null){_158.canUpdate=_150&&_15a;_158.canDelete=_151&&_15b;}else{if(_157===""){return _158;}else{if(_157){_14d=_14d||this.getUserId();if(_14d&&_155){_14d=_14d+"@"+_155;}if(_14d.toLowerCase()===_157.toLowerCase()){return _158;}else{_158.canUpdate=_150&&_15a;_158.canDelete=_151&&_15b;}}}}return _158;},getUserId:function(){var _15c;if(this.loaded){_15c=(this.credential&&this.credential.userId)||this.userId||"";}return _15c;},setUserIsAdmin:function(_15d){this.userIsAdmin=_15d;},setEditSummaryCallback:function(_15e){this.editSummaryCallback=_15e;},getEditSummary:function(_15f,_160,_161){_161=esri._isDefined(_161)?_161:(new Date()).getTime();var _162="",info=this.getEditInfo(_15f,_160,_161),_163=(_160&&_160.callback)||this.editSummaryCallback;if(_163){info=_163(_15f,info)||"";}if(dojo.isString(info)){_162=info;}else{if(info){var _164=info.action,_165=info.userId,_166=info.timeValue,_167=0;if(_164){_167++;}if(_165){_167++;}if(esri._isDefined(_166)){_167++;}if(_167>1){_162=(_164==="edit"?"edit":"create")+(_165?"User":"")+(esri._isDefined(_166)?info.displayPattern:"");}}_162=_162&&esri.substitute(info,esri.bundle.layers.FeatureLayer[_162]);}return _162;},getEditInfo:function(_168,_169,_16a){if(!this.loaded){return;}_16a=esri._isDefined(_16a)?_16a:(new Date()).getTime();var _16b=(_169&&_169.action)||"last",_16c=this.editFieldsInfo,_16d=_16c&&_16c.creatorField,_16e=_16c&&_16c.creationDateField,_16f=_16c&&_16c.editorField,_170=_16c&&_16c.editDateField,_171=_16c&&_16c.realm,_172=_168&&_168.attributes,_173=(_172&&_16d)?_172[_16d]:undefined,_174=(_172&&_16e)?_172[_16e]:null,_175=(_172&&_16f)?_172[_16f]:undefined,_176=(_172&&_170)?_172[_170]:null,_177=this._getEditData(_173,_174,_16a),_178=this._getEditData(_175,_176,_16a),_179;switch(_16b){case "creation":_179=_177;break;case "edit":_179=_178;break;case "last":_179=_178||_177;break;}if(_179){_179.action=(_179===_178)?"edit":"creation";}return _179;},_getEditData:function(_17a,_17b,_17c){var data,_17d,_17e,_17f=60000,_180=3600000,_181=2*_180,_182=24*_180,_183=7*_182;if(esri._isDefined(_17b)){_17d=_17c-_17b;if(_17d<0){_17e="Full";}else{if(_17d<_17f){_17e="Seconds";}else{if(_17d<(2*_17f)){_17e="Minute";}else{if(_17d<_180){_17e="Minutes";}else{if(_17d<_181){_17e="Hour";}else{if(_17d<_182){_17e="Hours";}else{if(_17d<_183){_17e="WeekDay";}else{_17e="Full";}}}}}}}}if((_17a!==undefined)||_17e){data=data||{};data.userId=_17a;if(_17e){var _184=dojo.date.locale.format,_185=new Date(_17b);data.minutes=Math.floor(_17d/_17f);data.hours=Math.floor(_17d/_180);data.weekDay=_184(_185,{datePattern:"EEEE",selector:"date"});data.formattedDate=_184(_185,{selector:"date"});data.formattedTime=_184(_185,{selector:"time"});data.displayPattern=_17e;data.timeValue=_17b;}}return data;},isEditable:function(){return this._editable;},setMaxAllowableOffset:function(_186){if(!this._editable){this._maxOffset=_186;}return this;},getMaxAllowableOffset:function(){return this._maxOffset;},setAutoGeneralize:function(_187){if(!this.loaded){this._optAutoGen=_187;}else{if(!this._editable&&(this.mode!==this.constructor.MODE_SNAPSHOT)&&((this.geometryType==="esriGeometryPolyline")||(this.geometryType==="esriGeometryPolygon"))){this._autoGeneralize=_187;if(_187){var map=this._map;if(map&&map.loaded){this._maxOffset=Math.floor(map.extent.getWidth()/map.width);}}else{delete this._maxOffset;}}}return this;},setScaleRange:function(_188,_189){this.minScale=_188||0;this.maxScale=_189||0;if(this._map&&this._map.loaded){this._updateStatus();}},setGDBVersion:function(_18a){if(!this._collection&&(_18a!==this.gdbVersion)&&(_18a||this.gdbVersion)){this.gdbVersion=_18a;this._task.gdbVersion=_18a;this._url.query=dojo.mixin(this._url.query,{gdbVersion:_18a});if(this.loaded){this.clearSelection();if(this._map){this.refresh();}}this.onGDBVersionChange();}return this;},setDefinitionExpression:function(expr){this._defnExpr=expr;var mode=this._mode;if(mode){mode.propertyChangeHandler(1);}return this;},getDefinitionExpression:function(){return this._defnExpr;},setTimeDefinition:function(_18b){if(this._isSnapshot){this._timeDefn=_18b;var mode=this._mode;if(mode){mode.propertyChangeHandler(2);}}return this;},getTimeDefinition:function(){return this._timeDefn;},setTimeOffset:function(_18c,_18d){this._timeOffset=_18c;this._timeOffsetUnits=_18d;var mode=this._mode;if(mode){mode.propertyChangeHandler(0);}return this;},setUseMapTime:function(use){this.useMapTime=use;this._toggleTime(!this._suspended);var mode=this._mode;if(mode){mode.propertyChangeHandler(0);}},selectFeatures:function(_18e,_18f,_190,_191){_18f=_18f||this.constructor.SELECTION_NEW;var _192=this._getShallowClone(_18e),map=this._map,_193,dfd=esri._fixDfd(new dojo.Deferred(esri._dfdCanceller));_192.outFields=this._getOutFields();_192.returnGeometry=true;if(map){_192.outSpatialReference=new esri.SpatialReference(map.spatialReference.toJson());}if(!this._applyQueryFilters(_192)){_193={features:[]};this._selectHandler(_193,_18f,_190,_191,dfd);return dfd;}var _194=this._canDoClientSideQuery(_192);if(_194){_193={features:this._doQuery(_192,_194)};this._selectHandler(_193,_18f,_190,_191,dfd);return dfd;}else{if(this._collection){var err=new Error("FeatureLayer::selectFeatures - "+esri.bundle.layers.FeatureLayer.invalidParams);this._resolve([err],null,_191,dfd,true);return dfd;}var self=this;if(this._ts){_192._ts=(new Date()).getTime();}var temp=dfd._pendingDfd=this._task.execute(_192);temp.addCallbacks(function(_195){self._selectHandler(_195,_18f,_190,_191,dfd);},function(err){self._resolve([err],null,_191,dfd,true);});return dfd;}},getSelectedFeatures:function(){var _196=this._selectedFeatures,_197=[],item;for(item in _196){if(_196.hasOwnProperty(item)){_197.push(_196[item]);}}return _197;},clearSelection:function(_198){var _199=this._selectedFeatures,mode=this._mode,item;for(item in _199){if(_199.hasOwnProperty(item)){this._unSelectFeatureIIf(item,mode);mode._removeFeatureIIf(item);}}this._selectedFeatures={};if(this._isSelOnly){mode._applyTimeFilter(true);}if(!_198){this.onSelectionClear();}return this;},setSelectionSymbol:function(_19a){this._selectionSymbol=_19a;if(_19a){var _19b=this._selectedFeatures,item;for(item in _19b){if(_19b.hasOwnProperty(item)){_19b[item].setSymbol(_19a);}}}return this;},getSelectionSymbol:function(){return this._selectionSymbol;},__msigns:[{n:"applyEdits",c:5,a:[{i:0},{i:1}],e:4,f:1}],applyEdits:function(adds,_19c,_19d,_19e,_19f,_1a0){var _1a1=_1a0.assembly,dfd=_1a0.dfd;this._applyNormalized(adds,_1a1&&_1a1[0]);this._applyNormalized(_19c,_1a1&&_1a1[1]);this.onBeforeApplyEdits(adds,_19c,_19d);var i,_1a2={},_1a3=this.objectIdField,_1a4={f:"json"},_1a5=false;if(this._collection){var _1a6={};_1a6.addResults=adds?dojo.map(adds,function(){_1a5=true;return {objectId:this._nextId++,success:true};},this):null;_1a6.updateResults=_19c?dojo.map(_19c,function(_1a7){_1a5=true;var oid=_1a7.attributes[_1a3];_1a2[oid]=_1a7;return {objectId:oid,success:true};},this):null;_1a6.deleteResults=_19d?dojo.map(_19d,function(_1a8){_1a5=true;return {objectId:_1a8.attributes[_1a3],success:true};},this):null;if(_1a5){this._editHandler(_1a6,adds,_1a2,_19e,_19f,dfd);}return;}if(adds&&adds.length>0){_1a4.adds=this._convertFeaturesToJson(adds,0,1);_1a5=true;}if(_19c&&_19c.length>0){for(i=0;i<_19c.length;i++){var _1a9=_19c[i];_1a2[_1a9.attributes[_1a3]]=_1a9;}_1a4.updates=this._convertFeaturesToJson(_19c,0,0,1);_1a5=true;}if(_19d&&_19d.length>0){var ids=[];for(i=0;i<_19d.length;i++){ids.push(_19d[i].attributes[_1a3]);}_1a4.deletes=ids.join(",");_1a5=true;}if(_1a5){var self=this;return esri.request({url:this._url.path+"/applyEdits",content:dojo.mixin(_1a4,this._url.query),callbackParamName:"callback",load:function(_1aa){self._editHandler(_1aa,adds,_1a2,_19e,_19f,dfd);},error:function(err){self._resolve([err],null,_19f,dfd,true);}},{usePost:true});}},queryFeatures:function(_1ab,_1ac,_1ad){return this._query("execute","onQueryFeaturesComplete",_1ab,_1ac,_1ad);},queryRelatedFeatures:function(_1ae,_1af,_1b0){return this._query("executeRelationshipQuery","onQueryRelatedFeaturesComplete",_1ae,_1af,_1b0);},queryIds:function(_1b1,_1b2,_1b3){return this._query("executeForIds","onQueryIdsComplete",_1b1,_1b2,_1b3);},queryCount:function(_1b4,_1b5,_1b6){return this._query("executeForCount","onQueryCountComplete",_1b4,_1b5,_1b6);},queryAttachmentInfos:function(_1b7,_1b8,_1b9){var url=this._url.path+"/"+_1b7+"/attachments",dfd=new dojo.Deferred(esri._dfdCanceller),self=this;dfd._pendingDfd=esri.request({url:url,content:dojo.mixin({f:"json"},this._url.query),callbackParamName:"callback",load:function(_1ba){var _1bb=_1ba.attachmentInfos,_1bc;dojo.forEach(_1bb,function(info){_1bc=dojo.objectToQuery({gdbVersion:self._url.query&&self._url.query.gdbVersion,layer:self._url.query&&self._url.query.layer,token:self._getToken()});info.url=url+"/"+info.id+(_1bc?("?"+_1bc):"");info.objectId=_1b7;});self._resolve([_1bb],"onQueryAttachmentInfosComplete",_1b8,dfd);},error:function(err){self._resolve([err],null,_1b9,dfd,true);}});return dfd;},addAttachment:function(_1bd,_1be,_1bf,_1c0){return this._sendAttachment("add",_1bd,_1be,_1bf,_1c0);},updateAttachment:function(_1c1,_1c2,_1c3,_1c4,_1c5){_1c3.appendChild(dojo.create("input",{type:"hidden",name:"attachmentId",value:_1c2}));return this._sendAttachment("update",_1c1,_1c3,_1c4,_1c5);},deleteAttachments:function(_1c6,_1c7,_1c8,_1c9){var url=this._url.path+"/"+_1c6+"/deleteAttachments",dfd=new dojo.Deferred(esri._dfdCanceller),self=this,_1ca={f:"json",attachmentIds:_1c7.join(",")};dfd._pendingDfd=esri.request({url:url,content:dojo.mixin(_1ca,this._url.query),callbackParamName:"callback",load:dojo.hitch(this,function(_1cb){var _1cc=_1cb.deleteAttachmentResults;_1cc=dojo.map(_1cc,function(_1cd){var res=new esri.layers.FeatureEditResult(_1cd);res.attachmentId=res.objectId;res.objectId=_1c6;return res;});self._resolve([_1cc],"onDeleteAttachmentsComplete",_1c8,dfd);}),error:function(err){self._resolve([err],null,_1c9,dfd,true);}},{usePost:true});return dfd;},addType:function(_1ce){if(!this._collection){return false;}var _1cf=this.types;if(_1cf){var _1d0=dojo.some(_1cf,function(type){if(type.id==_1ce.id){return true;}return false;});if(_1d0){return false;}else{_1cf.push(_1ce);}}else{this.types=[_1ce];}this._typesDirty=true;return true;},deleteType:function(_1d1){if(!this._collection){return;}var _1d2=this.types;if(_1d2){var _1d3=-1;dojo.some(_1d2,function(type,_1d4){if(type.id==_1d1){_1d3=_1d4;return true;}return false;});if(_1d3>-1){this._typesDirty=true;return _1d2.splice(_1d3,1)[0];}}},toJson:function(){var _1d5=this._json,json=dojo.isString(_1d5)?dojo.fromJson(_1d5):dojo.clone(_1d5);if(!json){return;}json=json.layerDefinition?json:{layerDefinition:json};var _1d6=json.layerDefinition,_1d7=this._collection;if(_1d7&&this._typesDirty){_1d6.types=dojo.map(this.types||[],function(type){return type.toJson();});var _1d8=this.renderer,_1d9=_1d6.drawingInfo;if(_1d9&&_1d8&&_1d8.declaredClass.indexOf("TemporalRenderer")===-1){_1d9.renderer=_1d8.toJson();}}var _1da=null;if(!(_1d7&&!this._fcAdded)){_1da={geometryType:_1d6.geometryType,features:this._convertFeaturesToJson(this.graphics,true)};}json.featureSet=dojo.mixin({},json.featureSet||{},_1da);if(_1d7){json.nextObjectId=this._nextId;_1d6.capabilities=this.capabilities;}return json;},onSelectionComplete:function(){},onSelectionClear:function(){},onBeforeApplyEdits:function(){},onEditsComplete:function(){},onQueryFeaturesComplete:function(){},onQueryRelatedFeaturesComplete:function(){},onQueryIdsComplete:function(){},onQueryCountComplete:function(){},onQueryAttachmentInfosComplete:function(){},onAddAttachmentComplete:function(){},onUpdateAttachmentComplete:function(){},onDeleteAttachmentsComplete:function(){},onCapabilitiesChange:function(){},onGDBVersionChange:function(){},onQueryLimitExceeded:function(){},_updateCaps:function(){var _1db=this._editable,_1dc=dojo.trim(this.capabilities||""),_1dd=dojo.map((_1dc?_1dc.split(","):[]),dojo.trim),caps=dojo.map((_1dc?_1dc.toLowerCase().split(","):[]),dojo.trim),_1de=dojo.indexOf(caps,"editing"),cap,i,_1df,_1e0={"Create":dojo.indexOf(caps,"create"),"Update":dojo.indexOf(caps,"update"),"Delete":dojo.indexOf(caps,"delete")};if(_1db&&_1de===-1){_1dd.push("Editing");}else{if(!_1db&&_1de>-1){_1df=[_1de];for(cap in _1e0){if(_1e0[cap]>-1){_1df.push(_1e0[cap]);}}_1df.sort();for(i=_1df.length-1;i>=0;i--){_1dd.splice(_1df[i],1);}}}this.capabilities=_1dd.join(",");},_counter:{value:0},_getUniqueId:function(){return this._counter.value++;},_getDesiredStatus:function(){return this.visible&&this._isMapAtVisibleScale();},_isMapAtVisibleScale:function(){if(!this._map){return false;}var _1e1=esri.geometry.getScale(this._map);var _1e2=this.minScale,_1e3=this.maxScale,_1e4=!_1e2,_1e5=!_1e3;if(!_1e4&&_1e1<=_1e2){_1e4=true;}if(!_1e5&&_1e1>=_1e3){_1e5=true;}return (_1e4&&_1e5)?true:false;},_suspend:function(){this.inherited("_suspend",arguments);this._toggleTime(false);var mode=this._mode;if(mode){mode.suspend();}},_resume:function(){this.inherited("_resume",arguments);this._toggleTime(true);var mode=this._mode;if(mode){mode.resume();}},_zoomHandler:function(){var map=this._map;if(map&&map.loaded){if(this._autoGeneralize){this._maxOffset=Math.floor(map.extent.getWidth()/map.width);}this._updateStatus();}},_toggleTime:function(_1e6){var map=this._map;if(_1e6&&this.timeInfo&&this.useMapTime&&map){this._mapTimeExtent=map.timeExtent;if(!this._timeConnect){this._timeConnect=dojo.connect(map,"onTimeExtentChange",this,this._timeChangeHandler);}}else{this._mapTimeExtent=null;dojo.disconnect(this._timeConnect);this._timeConnect=null;}},_timeChangeHandler:function(_1e7){this._mapTimeExtent=_1e7;var mode=this._mode;if(mode){mode.propertyChangeHandler(0);}},_getOffsettedTE:function(_1e8){var _1e9=this._timeOffset,_1ea=this._timeOffsetUnits;return (_1e8&&_1e9&&_1ea)?_1e8.offset(-1*_1e9,_1ea):_1e8;},_getTimeOverlap:function(_1eb,_1ec){if(_1eb&&_1ec){return _1eb.intersection(_1ec);}else{return _1eb||_1ec;}},_getTimeFilter:function(_1ed){var _1ee=this.getTimeDefinition(),_1ef=null,_1f0;if(_1ee||_1ef){_1f0=this._getTimeOverlap(_1ee,_1ef);if(!_1f0){return [false];}}if(_1ed){_1ed=_1f0?this._getTimeOverlap(_1ed,_1f0):_1ed;if(!_1ed){return [false];}}else{_1ed=_1f0;}return [true,_1ed];},_getAttributeFilter:function(_1f1){var _1f2=this.getDefinitionExpression();if(_1f1){_1f1=_1f2?"("+_1f2+") AND ("+_1f1+")":_1f1;}else{_1f1=_1f2;}return _1f1;},_applyQueryFilters:function(_1f3){_1f3.where=this._getAttributeFilter(_1f3.where);_1f3.maxAllowableOffset=this._maxOffset;if(this.timeInfo){var _1f4=this._getTimeFilter(_1f3.timeExtent);if(!_1f4[0]){return false;}else{_1f3.timeExtent=_1f4[1];}}return true;},_add:function(_1f5){var _1f6=this._selectionSymbol,attr=_1f5.attributes,_1f7=this.visibilityField;if(_1f6&&this._isSelOnly){_1f5.setSymbol(_1f6);}if(_1f7&&attr&&attr.hasOwnProperty(_1f7)){_1f5[attr[_1f7]?"show":"hide"]();}return this.add.apply(this,arguments);},_remove:function(){return this.remove.apply(this,arguments);},_canDoClientSideQuery:function(_1f8){var _1f9=[],map=this._map;if(this._isTable||!map){return;}if(_1f8.text||(_1f8.where&&_1f8.where!==this.getDefinitionExpression())){return;}var _1fa=this._isSnapshot,_1fb=this._isSelOnly;var _1fc=_1f8.geometry;if(_1fc){if(!_1fb&&_1f8.spatialRelationship===esri.tasks.Query.SPATIAL_REL_INTERSECTS&&(_1fc.type==="extent"&&(_1fa||map.extent.contains(_1fc)))){_1f9.push(1);}else{return;}}var ids=_1f8.objectIds;if(ids){if(_1fa){_1f9.push(2);}else{var len=ids.length,mode=this._mode,_1fd=0,i;for(i=0;i<len;i++){if(mode._getFeature(ids[i])){_1fd++;}}if(_1fd===len){_1f9.push(2);}else{return;}}}if(this.timeInfo){var _1fe=_1f8.timeExtent,_1ff=this._mapTimeExtent;if(_1fa){if(_1fe){_1f9.push(3);}}else{if(_1fb){if(_1fe){return;}}else{if(_1ff){if(dojo.indexOf(_1f9,2)!==-1){if(_1fe){_1f9.push(3);}}else{return;}}else{if(_1f9.length>0){if(_1fe){_1f9.push(3);}}else{if(_1fe){return;}}}}}}return _1f9.length>0?_1f9:null;},_doQuery:function(_200,_201,_202){var _203=[],mode=this._mode,_204=this.objectIdField,i,len,_205;if(dojo.indexOf(_201,2)!==-1){_203=[];var ids=_200.objectIds;len=ids.length;for(i=0;i<len;i++){var obj=mode._getFeature(ids[i]);if(obj){_203.push(obj);}}if(_203.length===0){return [];}}if(dojo.indexOf(_201,1)!==-1){_205=_203.length>0?_203:this.graphics;len=_205.length;var _206=_200.geometry._normalize(null,true);_203=[];for(i=0;i<len;i++){var _207=_205[i],_208=_207.geometry;if(_208){if(this.normalization&&_206.length){if(_206[0].intersects(_208)||_206[1].intersects(_208)){_203.push(_207);}}else{if(_206.intersects(_208)){_203.push(_207);}}}}if(_203.length===0){return [];}}if(dojo.indexOf(_201,3)!==-1){if(this.timeInfo){_205=_203.length>0?_203:this.graphics;var time=_200.timeExtent,_209=this._filterByTime(_205,time.startTime,time.endTime);_203=_209.match;}}if(_202){return dojo.map(_203,function(obj){return obj.attributes[_204];},this);}else{return _203;}},_filterByTime:function(_20a,_20b,_20c){var _20d=this._startTimeField,_20e=this._endTimeField,_20f;if(!this._twoTimeFields){_20f=_20d||_20e;}var _210=esri._isDefined,yea=[],nay=[],i,len=_20a.length,_211,_212;_20b=_20b?_20b.getTime():-Infinity;_20c=_20c?_20c.getTime():Infinity;if(_20f){for(i=0;i<len;i++){_211=_20a[i];_212=_211.attributes;var time=_212[_20f];if(time>=_20b&&time<=_20c){yea.push(_211);}else{nay.push(_211);}}}else{for(i=0;i<len;i++){_211=_20a[i];_212=_211.attributes;var _213=_212[_20d],end=_212[_20e];_213=_210(_213)?_213:-Infinity;end=_210(end)?end:Infinity;if((_213>=_20b&&_213<=_20c)||(end>=_20b&&end<=_20c)||(_20b>=_213&&_20c<=end)){yea.push(_211);}else{nay.push(_211);}}}return {match:yea,noMatch:nay};},_resolve:function(args,_214,_215,dfd,_216){if(_214){this[_214].apply(this,args);}if(_215){_215.apply(null,args);}if(dfd){esri._resDfd(dfd,args,_216);}},_getShallowClone:function(_217){var _218=new esri.tasks.Query(),prop;for(prop in _217){if(_217.hasOwnProperty(prop)){_218[prop]=_217[prop];}}return _218;},_query:function(type,_219,_21a,_21b,_21c){var that=this,dfd=new dojo.Deferred(esri._dfdCanceller);var _21d=function(_21e,_21f){if(!_21f&&type==="execute"&&!that._isTable){var _220=_21e.features,mode=that._mode,_221=that.objectIdField,il=_220.length,i;for(i=il-1;i>=0;i--){var oid=_220[i].attributes[_221];var _222=mode._getFeature(oid);if(_222){_220.splice(i,1,_222);}}}that._resolve([_21e],_219,_21b,dfd);};if(type!=="executeRelationshipQuery"){_21a=this._getShallowClone(_21a);_21a.outFields=this._getOutFields();_21a.returnGeometry=true;var map=this._map,_223;if(map){_21a.outSpatialReference=new esri.SpatialReference(map.spatialReference.toJson());}if(!this._applyQueryFilters(_21a)){switch(type){case "execute":_223=new esri.tasks.FeatureSet({features:[]});break;case "executeForIds":_223=[];break;case "executeForCount":_223=0;break;}_21d(_223,true);return dfd;}var _224=this._canDoClientSideQuery(_21a);if(_224){var _225=this._doQuery(_21a,_224,(type==="executeForIds"||type==="executeForCount"));switch(type){case "execute":_223=new esri.tasks.FeatureSet();_223.features=_225;break;case "executeForIds":_223=_225;break;case "executeForCount":_223=_225.length;break;}_21d(_223,true);return dfd;}}if(this._collection){var err=new Error("FeatureLayer::_query - "+esri.bundle.layers.FeatureLayer.invalidParams);this._resolve([err],null,_21c,dfd,true);return dfd;}if(this._ts){_21a._ts=(new Date()).getTime();}var temp=dfd._pendingDfd=this._task[type](_21a);temp.addCallbacks(_21d,function(err){that._resolve([err],null,_21c,dfd,true);});return dfd;},_convertFeaturesToJson:function(_226,_227,_228,_229){var json=[],_22a=this._selectionSymbol,_22b=this.visibilityField,i,_22c,_22d=this.objectIdField;if(_228||_229){_22c=dojo.filter(this.fields,function(_22e){return (_22e.editable===false)&&(!_229||(_22e.name!==_22d));});}for(i=0;i<_226.length;i++){var _22f=_226[i],_230={},_231=_22f.geometry,attr=_22f.attributes,_232=_22f.symbol;if(_231&&(!_229||this.allowGeometryUpdates)){_230.geometry=_231.toJson();}if(_22b){_230.attributes=attr=dojo.mixin({},attr);attr[_22b]=_22f.visible?1:0;}else{if(attr){_230.attributes=dojo.mixin({},attr);}}if(_230.attributes&&_22c&&_22c.length){dojo.forEach(_22c,function(_233){delete _230.attributes[_233.name];});}if(_232&&(_232!==_22a)){_230.symbol=_232.toJson();}json.push(_230);}return _227?json:dojo.toJson(json);},_selectHandler:function(_234,_235,_236,_237,dfd){var _238,ctor=this.constructor;switch(_235){case ctor.SELECTION_NEW:this.clearSelection(true);_238=true;break;case ctor.SELECTION_ADD:_238=true;break;case ctor.SELECTION_SUBTRACT:_238=false;break;}var i,_239=_234.features,mode=this._mode,_23a=[],_23b=this.objectIdField,_23c,oid;if(_238){for(i=0;i<_239.length;i++){_23c=_239[i];oid=_23c.attributes[_23b];var _23d=mode._addFeatureIIf(oid,_23c);_23a.push(_23d);this._selectFeatureIIf(oid,_23d,mode);}}else{for(i=0;i<_239.length;i++){_23c=_239[i];oid=_23c.attributes[_23b];this._unSelectFeatureIIf(oid,mode);var _23e=mode._removeFeatureIIf(oid);_23a.push(_23e||_23c);}}if(this._isSelOnly){mode._applyTimeFilter(true);}this._resolve([_23a,_235,_234.exceededTransferLimit?{queryLimitExceeded:true}:null],"onSelectionComplete",_236,dfd);if(_234.exceededTransferLimit){this.onQueryLimitExceeded();}},_selectFeatureIIf:function(oid,_23f,mode){var _240=this._selectedFeatures,_241=_240[oid];if(!_241){mode._incRefCount(oid);_240[oid]=_23f;if(!this._isTable){this._setSelectSymbol(_23f);}}return _241||_23f;},_unSelectFeatureIIf:function(oid,mode){var _242=this._selectedFeatures[oid];if(_242){mode._decRefCount(oid);delete this._selectedFeatures[oid];if(!this._isTable){this._setUnSelectSymbol(_242);}}return _242;},_isSelected:function(_243){},_setSelectSymbol:function(_244){var _245=this._selectionSymbol;if(_245&&!this._isSelOnly){_244.setSymbol(_245);}},_setUnSelectSymbol:function(_246){var _247=this._selectionSymbol;if(_247&&!this._isSelOnly){if(_247===_246.symbol){_246.setSymbol(null,true);}}},_getOutFields:function(){var _248=dojo.filter([this.objectIdField,this.typeIdField,this.creatorField,this._startTimeField,this._endTimeField,this._trackIdField].concat(this._rendererFields),function(_249,_24a,arr){return !!_249&&(dojo.indexOf(arr,_249)===_24a);});var _24b=dojo.clone(this._outFields);if(_24b){if(dojo.indexOf(_24b,"*")!==-1){return _24b;}dojo.forEach(_248,function(_24c){if(dojo.indexOf(_24b,_24c)===-1){_24b.push(_24c);}});return _24b;}else{return _248;}},_checkFields:function(_24d){var _24e=_24d||this._getOutFields();dojo.forEach(_24e,function(_24f){if(_24f==="*"){return;}if(!this._getField(_24f)){console.debug("esri.layers.FeatureLayer: "+esri.substitute({url:this.url,field:_24f},esri.bundle.layers.FeatureLayer.fieldNotFound));}},this);if(!_24d&&!this._isTable&&!this._fserver&&!this._collection){var _250=dojo.some(this.fields,function(_251){return (_251&&_251.type==="esriFieldTypeGeometry")?true:false;});if(!_250){console.debug("esri.layers.FeatureLayer: "+esri.substitute({url:this.url},esri.bundle.layers.FeatureLayer.noGeometryField));}}},_fixRendererFields:function(){var _252=this.renderer;if(_252&&this.fields.length>0){var _253=dojo.filter([_252,_252.observationRenderer,_252.latestObservationRenderer,_252.trackRenderer],esri._isDefined);var _254=[];dojo.forEach(_253,function(rnd){var _255,_256;_256=rnd.attributeField;if(_256){_255=!this._getField(_256)&&this._getField(_256,true);if(_255){rnd.attributeField=_255.name;}}_256=rnd.attributeField2;if(_256){_255=!this._getField(_256)&&this._getField(_256,true);if(_255){rnd.attributeField2=_255.name;}}_256=rnd.attributeField3;if(_256){_255=!this._getField(_256)&&this._getField(_256,true);if(_255){rnd.attributeField3=_255.name;}}_254.push(rnd.attributeField);_254.push(rnd.attributeField2);_254.push(rnd.attributeField3);},this);this._rendererFields=dojo.filter(_254,esri._isDefined);}},_getField:function(_257,_258){var _259=this.fields;if(_259.length===0){return null;}var _25a;if(_258){_257=_257.toLowerCase();}dojo.some(_259,function(_25b){var _25c=false;if(_258){_25c=(_25b&&_25b.name.toLowerCase()===_257)?true:false;}else{_25c=(_25b&&_25b.name===_257)?true:false;}if(_25c){_25a=_25b;}return _25c;});return _25a;},_getDateOpts:function(){if(!this._dtOpts){var _25d=dojo.map(dojo.filter(this.fields,function(_25e){return !!(_25e&&_25e.type==="esriFieldTypeDate");}),function(_25f){return _25f.name;});this._dtOpts={properties:_25d};}return this._dtOpts;},_applyNormalized:function(_260,_261){if(_260&&_261){dojo.forEach(_260,function(_262,_263){if(_262&&_261[_263]){_262.setGeometry(_261[_263]);}});}},_editHandler:function(_264,adds,_265,_266,_267,dfd){var _268=_264.addResults,_269=_264.updateResults,_26a=_264.deleteResults,i,_26b,oid,_26c,attr,_26d=this.objectIdField,mode=this._mode,_26e=this._isTable;var _26f=this.editFieldsInfo,_270=this._getOutFields()||[],_271=_26f&&_26f.creatorField,_272=_26f&&_26f.creationDateField,_273=_26f&&_26f.editorField,_274=_26f&&_26f.editDateField,_275=_26f&&_26f.realm;if(dojo.indexOf(_270,"*")===-1){if(_271&&dojo.indexOf(_270,_271)===-1){_271=null;}if(_272&&dojo.indexOf(_270,_272)===-1){_272=null;}if(_273&&dojo.indexOf(_270,_273)===-1){_273=null;}if(_274&&dojo.indexOf(_270,_274)===-1){_274=null;}}var _276=(_272||_274)?(new Date()).getTime():null,_277=(_271||_273)?this.getUserId():undefined;if(_277&&_275){_277=_277+"@"+_275;}if(_268){for(i=0;i<_268.length;i++){_268[i]=new esri.layers.FeatureEditResult(_268[i]);if(_26e){continue;}_26b=_268[i];if(_26b.success){oid=_26b.objectId;_26c=adds[i];var gl=_26c._graphicsLayer;if(gl&&gl!==this){gl.remove(_26c);}attr=_26c.attributes||{};attr[_26d]=oid;if(_271){attr[_271]=_277;}if(_273){attr[_273]=_277;}if(_272){attr[_272]=_276;}if(_274){attr[_274]=_276;}_26c.setAttributes(attr);mode.drawFeature(_26c);}}}if(_269){for(i=0;i<_269.length;i++){_269[i]=new esri.layers.FeatureEditResult(_269[i]);if(_26e){continue;}_26b=_269[i];if(_26b.success){oid=_26b.objectId;_26c=_265[oid];var _278=mode._getFeature(oid);if(_278){if(_278.geometry!==_26c.geometry){_278.setGeometry(esri.geometry.fromJson(_26c.geometry.toJson()));}this._repaint(_278,oid);}_26c=_278||_26c;attr=_26c.attributes||{};if(_273){attr[_273]=_277;}if(_274){attr[_274]=_276;}_26c.setAttributes(attr);}}}if(_26a){var _279=[];for(i=0;i<_26a.length;i++){_26a[i]=new esri.layers.FeatureEditResult(_26a[i]);if(_26e){continue;}_26b=_26a[i];if(_26b.success){oid=_26b.objectId;_26c=mode._getFeature(oid);if(_26c){if(this._unSelectFeatureIIf(oid,mode)){_279.push(_26c);}_26c._count=0;mode._removeFeatureIIf(oid);}}}if(_279.length>0){this.onSelectionComplete(_279,this.constructor.SELECTION_SUBTRACT);}}this._resolve([_268,_269,_26a],"onEditsComplete",_266,dfd);},_sendAttachment:function(type,_27a,_27b,_27c,_27d){var _27e=(type==="add")?"addAttachment":"updateAttachment",url=this._url.path+"/"+_27a+"/"+_27e,self=this;var dfd=esri.request({url:url,form:_27b,content:dojo.mixin(this._url.query,{f:"json",token:this._getToken()||undefined}),callbackParamName:"callback.html",handleAs:"json"}).addCallback(function(_27f){var _280=(type==="add")?"addAttachmentResult":"updateAttachmentResult",_281=(type==="add")?"onAddAttachmentComplete":"onUpdateAttachmentComplete",_282=new esri.layers.FeatureEditResult(_27f[_280]);_282.attachmentId=_282.objectId;_282.objectId=_27a;self._resolve([_282],_281,_27c);return _282;}).addErrback(function(_283){self._resolve([_283],null,_27d,null,true);});return dfd;},_repaint:function(_284,oid,_285){oid=esri._isDefined(oid)?oid:_284.attributes[this.objectIdField];if(!(oid in this._selectedFeatures)||!this._selectionSymbol){_284.setSymbol(_284.symbol,_285);}},_getKind:function(_286){var _287=this._trackManager;if(_287){return _287.isLatestObservation(_286)?1:0;}return 0;}});dojo.mixin(esri.layers.FeatureLayer,{MODE_SNAPSHOT:0,MODE_ONDEMAND:1,MODE_SELECTION:2,SELECTION_NEW:3,SELECTION_ADD:4,SELECTION_SUBTRACT:5,POPUP_NONE:"esriServerHTMLPopupTypeNone",POPUP_HTML_TEXT:"esriServerHTMLPopupTypeAsHTMLText",POPUP_URL:"esriServerHTMLPopupTypeAsURL"});esri._createWrappers("esri.layers.FeatureLayer");dojo.declare("esri.layers.FeatureType",null,{constructor:function(json){if(json&&dojo.isObject(json)){this.id=json.id;this.name=json.name;var _288=json.symbol;if(_288){this.symbol=esri.symbol.fromJson(_288);}var _289=json.domains,_28a,i;var _28b=this.domains={};for(_28a in _289){if(_289.hasOwnProperty(_28a)){var _28c=_289[_28a];switch(_28c.type){case "range":_28b[_28a]=new esri.layers.RangeDomain(_28c);break;case "codedValue":_28b[_28a]=new esri.layers.CodedValueDomain(_28c);break;case "inherited":_28b[_28a]=new esri.layers.InheritedDomain(_28c);break;}}}var _28d=json.templates;if(_28d){var _28e=this.templates=[];for(i=0;i<_28d.length;i++){_28e.push(new esri.layers.FeatureTemplate(_28d[i]));}}}},toJson:function(){var json={id:this.id,name:this.name,symbol:this.symbol&&this.symbol.toJson()};var _28f,_290=this.domains,_291=this.templates,_292=esri._sanitize;if(_290){var _293=json.domains={};for(_28f in _290){if(_290.hasOwnProperty(_28f)){_293[_28f]=_290[_28f]&&_290[_28f].toJson();}}_292(_293);}if(_291){json.templates=dojo.map(_291,function(_294){return _294.toJson();});}return _292(json);}});dojo.declare("esri.layers.FeatureTemplate",null,{constructor:function(json){if(json&&dojo.isObject(json)){this.name=json.name;this.description=json.description;this.drawingTool=json.drawingTool;var _295=json.prototype;this.prototype=new esri.Graphic(_295.geometry,null,_295.attributes);}},toJson:function(){return esri._sanitize({name:this.name,description:this.description,drawingTool:this.drawingTool,prototype:this.prototype&&this.prototype.toJson()});}});dojo.mixin(esri.layers.FeatureTemplate,{TOOL_AUTO_COMPLETE_POLYGON:"esriFeatureEditToolAutoCompletePolygon",TOOL_CIRCLE:"esriFeatureEditToolCircle",TOOL_ELLIPSE:"esriFeatureEditToolEllipse",TOOL_FREEHAND:"esriFeatureEditToolFreehand",TOOL_LINE:"esriFeatureEditToolLine",TOOL_NONE:"esriFeatureEditToolNone",TOOL_POINT:"esriFeatureEditToolPoint",TOOL_POLYGON:"esriFeatureEditToolPolygon",TOOL_RECTANGLE:"esriFeatureEditToolRectangle",TOOL_ARROW:"esriFeatureEditToolArrow",TOOL_TRIANGLE:"esriFeatureEditToolTriangle",TOOL_LEFT_ARROW:"esriFeatureEditToolLeftArrow",TOOL_RIGHT_ARROW:"esriFeatureEditToolRightArrow",TOOL_UP_ARROW:"esriFeatureEditToolUpArrow",TOOL_DOWN_ARROW:"esriFeatureEditToolDownArrow"});dojo.declare("esri.layers.FeatureEditResult",null,{constructor:function(json){if(json&&dojo.isObject(json)){this.objectId=json.objectId;this.success=json.success;if(!json.success){var err=json.error;this.error=new Error();this.error.code=err.code;this.error.message=err.description;}}}});dojo.declare("esri.layers._RenderMode",null,{constructor:function(){this._prefix="jsonp_"+(dojo._scopeName||"dojo")+"IoScript";},initialize:function(map){},propertyChangeHandler:function(type){},destroy:function(){},drawFeature:function(_296){},suspend:function(){},resume:function(){},refresh:function(){},_incRefCount:function(oid){var _297=this._featureMap[oid];if(_297){_297._count++;}},_decRefCount:function(oid){var _298=this._featureMap[oid];if(_298){_298._count--;}},_getFeature:function(oid){return this._featureMap[oid];},_addFeatureIIf:function(oid,_299){var fmap=this._featureMap,_29a=fmap[oid],_29b=this.featureLayer;if(!_29a){fmap[oid]=_299;_29b._add(_299);_299._count=0;}return _29a||_299;},_removeFeatureIIf:function(oid){var _29c=this._featureMap[oid],_29d=this.featureLayer;if(_29c){if(_29c._count){return;}delete this._featureMap[oid];_29d._remove(_29c);}return _29c;},_clearIIf:function(){var i,_29e=this.featureLayer,_29f=_29e.graphics,_2a0=_29e._selectedFeatures,_2a1=_29e.objectIdField;for(i=_29f.length-1;i>=0;i--){var _2a2=_29f[i];var oid=_2a2.attributes[_2a1];if(oid in _2a0){_2a2._count=1;continue;}_2a2._count=0;this._removeFeatureIIf(oid);}},_isPending:function(id){var dfd=dojo.io.script[this._prefix+id];return dfd?true:false;},_cancelPendingRequest:function(dfd,id){dfd=dfd||dojo.io.script[this._prefix+id];if(dfd){try{dfd.cancel();dojo.io.script._validCheck(dfd);}catch(e){}}},_purgeRequests:function(){dojo.io.script._validCheck(null);},_toggleVisibility:function(show){var _2a3=this.featureLayer,_2a4=_2a3.graphics,_2a5=show?"show":"hide",i,len=_2a4.length;show=show&&_2a3._ager;for(i=0;i<len;i++){var _2a6=_2a4[i];_2a6[_2a5]();if(show){_2a3._repaint(_2a6);}}},_applyTimeFilter:function(_2a7){var _2a8=this.featureLayer;if(!_2a8.timeInfo||_2a8._suspended){return;}if(!_2a7){_2a8._fireUpdateStart();}var _2a9=_2a8._trackManager;if(_2a9){_2a9.clearTracks();}var defn=_2a8.getTimeDefinition(),_2aa=_2a8._getOffsettedTE(_2a8._mapTimeExtent);if(_2aa){_2aa=_2a8._getTimeOverlap(defn,_2aa);if(_2aa){var _2ab=_2a8._filterByTime(_2a8.graphics,_2aa.startTime,_2aa.endTime);if(_2a9){_2a9.addFeatures(_2ab.match);}dojo.forEach(_2ab.match,function(_2ac){var _2ad=_2ac._shape;if(!_2ac.visible){_2ac.show();_2ad=_2ac._shape;_2ad&&_2ad._moveToFront();}if(_2a8._ager&&_2ad){_2a8._repaint(_2ac);}});dojo.forEach(_2ab.noMatch,function(_2ae){if(_2ae.visible){_2ae.hide();}});}else{this._toggleVisibility(false);}}else{if(_2a9){_2a9.addFeatures(_2a8.graphics);}this._toggleVisibility(true);}if(_2a9){_2a9.moveLatestToFront();_2a9.drawTracks();}if(!_2a7){_2a8._fireUpdateEnd();}}});dojo.declare("esri.layers._SelectionMode",[esri.layers._RenderMode],{constructor:function(_2af){this.featureLayer=_2af;this._featureMap={};},initialize:function(map){this.map=map;this._init=true;},propertyChangeHandler:function(type){if(this._init&&type===0){this._applyTimeFilter();}},destroy:function(){this._init=false;},resume:function(){this.propertyChangeHandler(0);}});dojo.declare("esri.layers._SnapshotMode",[esri.layers._RenderMode],{constructor:function(_2b0){this.featureLayer=_2b0;this._featureMap={};this._drawFeatures=dojo.hitch(this,this._drawFeatures);this._queryErrorHandler=dojo.hitch(this,this._queryErrorHandler);},initialize:function(map){this.map=map;var _2b1=this.featureLayer;if(_2b1._collection){this._applyTimeFilter();}else{this._fetchAll();}this._init=true;},propertyChangeHandler:function(type){if(this._init){if(type){this._fetchAll();}else{this._applyTimeFilter();}}},destroy:function(){this._init=false;},drawFeature:function(_2b2){var _2b3=this.featureLayer,_2b4=_2b3.objectIdField,oid=_2b2.attributes[_2b4];this._addFeatureIIf(oid,_2b2);this._incRefCount(oid);},resume:function(){this.propertyChangeHandler(0);},refresh:function(){var _2b5=this.featureLayer;if(_2b5._collection){_2b5._fireUpdateStart();_2b5._refresh(true);_2b5._fireUpdateEnd();}else{this._fetchAll();}},_getRequestId:function(_2b6){var id="_"+_2b6.name+_2b6.layerId+_2b6._ulid;return id.replace(/[^a-zA-Z0-9\_]+/g,"_");},_fetchAll:function(){var _2b7=this.featureLayer;if(_2b7._collection){return;}_2b7._fireUpdateStart();this._clearIIf();this._sendRequest();},_sendRequest:function(){var map=this.map,_2b8=this.featureLayer,_2b9=_2b8.getDefinitionExpression();var _2ba=new esri.tasks.Query();_2ba.outFields=_2b8._getOutFields();_2ba.where=_2b9||"1=1";_2ba.returnGeometry=true;_2ba.outSpatialReference=new esri.SpatialReference(map.spatialReference.toJson());_2ba.timeExtent=_2b8.getTimeDefinition();_2ba.maxAllowableOffset=_2b8._maxOffset;if(_2b8._ts){_2ba._ts=(new Date()).getTime();}var _2bb;if(_2b8._usePatch){_2bb=this._getRequestId(_2b8);this._cancelPendingRequest(null,_2bb);}_2b8._task.execute(_2ba,this._drawFeatures,this._queryErrorHandler,_2bb);},_drawFeatures:function(_2bc){this._purgeRequests();var _2bd=_2bc.features,_2be=this.featureLayer,_2bf=_2be.objectIdField,i,len=_2bd.length,_2c0,oid;for(i=0;i<len;i++){_2c0=_2bd[i];oid=_2c0.attributes[_2bf];this._addFeatureIIf(oid,_2c0);this._incRefCount(oid);}this._applyTimeFilter(true);_2be._fireUpdateEnd(null,_2bc.exceededTransferLimit?{queryLimitExceeded:true}:null);if(_2bc.exceededTransferLimit){_2be.onQueryLimitExceeded();}},_queryErrorHandler:function(err){this._purgeRequests();var _2c1=this.featureLayer;_2c1._errorHandler(err);_2c1._fireUpdateEnd(err);}});dojo.declare("esri.layers._OnDemandMode",[esri.layers._RenderMode],{constructor:function(_2c2){this.featureLayer=_2c2;this._featureMap={};this._queryErrorHandler=dojo.hitch(this,this._queryErrorHandler);},initialize:function(map){this.map=map;this._initialize();this._init=true;},propertyChangeHandler:function(type){if(this._init){if(type<2){this._zoomHandler();}}},destroy:function(){this._disableConnectors();this._init=false;},drawFeature:function(_2c3){var _2c4=this._gridLayer,geom=_2c3.geometry,_2c5=[];if(!geom){return;}_2c5=_2c4.getCellsInExtent((geom.type==="point")?{xmin:geom.x,ymin:geom.y,xmax:geom.x,ymax:geom.y}:geom.getExtent(),false).cells;var _2c6=this._cellMap,i,cell,oid=_2c3.attributes[this.featureLayer.objectIdField],_2c7,row,col;for(i=0;i<_2c5.length;i++){cell=_2c5[i];_2c7=cell.latticeID;row=cell.row;col=cell.col;if(_2c7){cell=(_2c6[_2c7]=(_2c6[_2c7]||cell));}else{_2c6[row]=_2c6[row]||{};cell=(_2c6[row][col]=(_2c6[row][col]||cell));}cell.features=cell.features||[];cell.features.push(_2c3);this._addFeatureIIf(oid,_2c3);this._incRefCount(oid);}},suspend:function(){if(!this._init){return;}this._disableConnectors();},resume:function(){if(!this._init){return;}this._enableConnectors();this._zoomHandler();},refresh:function(){this._zoomHandler();},_initialize:function(){var map=this.map,_2c8=this.featureLayer;var _2c9=_2c8._srInfo;this._gridLayer=new esri.layers._GridLayout(new esri.geometry.Point(_2c9?_2c9.valid[0]:map.extent.xmin,map.extent.ymax,map.spatialReference),{width:_2c8._tileWidth,height:_2c8._tileHeight},{width:map.width,height:map.height},_2c9);this._ioQueue=[];if(!_2c8._suspended){this._zoomHandler();this._enableConnectors();}},_enableConnectors:function(){var map=this.map;this._zoomConnect=dojo.connect(map,"onZoomEnd",this,this._zoomHandler);this._panConnect=dojo.connect(map,"onPanEnd",this,this._panHandler);this._resizeConnect=dojo.connect(map,"onResize",this,this._panHandler);},_disableConnectors:function(){dojo.disconnect(this._zoomConnect);dojo.disconnect(this._panConnect);dojo.disconnect(this._resizeConnect);},_zoomHandler:function(){this._processIOQueue(true);var _2ca=this.featureLayer,map=this.map;if(_2ca._suspended){return;}_2ca._fireUpdateStart();this._clearIIf();var _2cb=_2ca._trackManager;if(_2cb){_2cb.clearTracks();}this._cellMap={};this._gridLayer.setResolution(map.extent);this._sendRequest();},_panHandler:function(){this.featureLayer._fireUpdateStart();this._sendRequest(this.featureLayer._resized&&arguments[0]);},_getRequestId:function(_2cc,cell){var id="_"+_2cc.name+_2cc.layerId+_2cc._ulid+"_"+cell.resolution+"_"+(cell.latticeID||(cell.row+"_"+cell.col));return id.replace(/[^a-zA-Z0-9\_]+/g,"_");},_sendRequest:function(_2cd){this._exceeds=false;var _2ce=this.featureLayer,map=this.map,_2cf=_2cd||map.extent,_2d0=this._gridLayer.getCellsInExtent(_2cf,_2ce.latticeTiling),_2d1=_2d0.cells;if(!_2ce._editable){var _2d2=this._cellMap;_2d1=dojo.filter(_2d1,function(cell){if(cell.lattice){if(_2d2[cell.latticeID]){return false;}}else{if(_2d2[cell.row]&&_2d2[cell.row][cell.col]){return false;}}return true;});}var _2d3=_2ce._getOutFields(),_2d4=_2ce.getDefinitionExpression(),time=_2ce._getOffsettedTE(_2ce._mapTimeExtent),_2d5=_2ce._usePatch,_2d6=this._ioQueue,i,self=this,func=this._drawFeatures,cell,_2d7,_2d8;this._pending=this._pending||0;for(i=0;i<_2d1.length;i++){cell=_2d1[i];_2d7=new esri.tasks.Query();_2d7.geometry=cell.extent||cell.lattice;_2d7.outFields=_2d3;_2d7.where=_2d4;if(_2ce.latticeTiling&&cell.extent){_2d7.spatialRelationship=esri.tasks.Query.SPATIAL_REL_CONTAINS;}_2d7.returnGeometry=true;_2d7.timeExtent=time;_2d7.maxAllowableOffset=_2ce._maxOffset;if(_2ce._ts){_2d7._ts=(new Date()).getTime();}_2d8=null;if(_2d5){_2d8=this._getRequestId(_2ce,cell);if(this._isPending(_2d8)){continue;}}this._pending++;_2d6.push(_2ce._task.execute(_2d7,function(){var _2d9=cell;return function(_2da){func.apply(self,[_2da,_2d9]);};}.call(this),this._queryErrorHandler,_2d8));}this._removeOldCells(_2cf);this._endCheck();},_drawFeatures:function(_2db,cell){this._exceeds=this._exceeds||_2db.exceededTransferLimit;this._finalizeIO();var _2dc=this.featureLayer,map=this.map,_2dd=map.extent,_2de=cell.extent,row=cell.row,col=cell.col,_2df=_2dc.objectIdField,_2e0=_2db.features,_2e1=this._gridLayer,_2e2=this._cellMap,i,len,_2e3=cell.latticeID,_2e4=_2e3?_2e2[_2e3]:(_2e2[row]&&_2e2[row][col]);if((cell.resolution!=_2e1._resolution)||(_2e3?(_2e3!==_2e1.getLatticeID(_2dd)):(!_2e1.intersects(_2de,_2dd)))){if(_2e4){this._removeCell(row,col,_2e3);}}else{if(_2e4){this._updateCell(_2e4,_2e0);}else{cell.features=_2e0;if(_2e3){_2e2[_2e3]=cell;}else{_2e2[row]=_2e2[row]||{};_2e2[row][col]=cell;}len=_2e0.length;for(i=0;i<len;i++){var _2e5=_2e0[i];var oid=_2e5.attributes[_2df];this._addFeatureIIf(oid,_2e5);this._incRefCount(oid);}}}this._endCheck();},_queryErrorHandler:function(err){this._finalizeIO();this.featureLayer._errorHandler(err);this._endCheck(true);},_finalizeIO:function(){this._purgeRequests();this._pending--;},_endCheck:function(_2e6){if(this._pending===0){this._processIOQueue();var _2e7=this.featureLayer,_2e8=_2e7._trackManager;if(_2e8){_2e8.clearTracks();_2e8.addFeatures(_2e7.graphics);if(_2e7._ager){dojo.forEach(_2e7.graphics,function(_2e9){if(_2e9._shape){_2e7._repaint(_2e9);}});}_2e8.moveLatestToFront();_2e8.drawTracks();}this.featureLayer._fireUpdateEnd(_2e6&&new Error("FeatureLayer: "+esri.bundle.layers.FeatureLayer.updateError),this._exceeds?{queryLimitExceeded:true}:null);if(this._exceeds){_2e7.onQueryLimitExceeded();}}},_processIOQueue:function(_2ea){this._ioQueue=dojo.filter(this._ioQueue,function(dfd){var keep=dfd.fired>-1?false:true;return keep;});if(_2ea){dojo.forEach(this._ioQueue,this._cancelPendingRequest);}},_removeOldCells:function(_2eb){var _2ec=this._cellMap,_2ed=this._gridLayer,_2ee,_2ef;for(_2ee in _2ec){if(_2ec[_2ee]){var row=_2ec[_2ee],_2f0=row.latticeID,_2f1=0,_2f2=0;if(_2f0){_2f1++;if(_2f0!==_2ed.getLatticeID(_2eb)){this._removeCell(null,null,_2f0);_2f2++;}}else{for(_2ef in row){if(row[_2ef]){_2f1++;var _2f3=row[_2ef].extent;if(!_2ed.intersects(_2f3,_2eb)){this._removeCell(_2ee,_2ef);_2f2++;}}}}if(_2f2===_2f1){delete _2ec[_2ee];}}}},_updateCell:function(cell,_2f4){var _2f5=this.featureLayer,_2f6=_2f5.objectIdField,_2f7=_2f5._selectedFeatures,i,len=_2f4.length;cell.features=cell.features||[];for(i=0;i<len;i++){var _2f8=_2f4[i];var oid=_2f8.attributes[_2f6];var _2f9=this._addFeatureIIf(oid,_2f8);if(_2f9===_2f8){this._incRefCount(oid);cell.features.push(_2f9);}else{if(!(oid in _2f7)){_2f9.setGeometry(_2f8.geometry);_2f9.setAttributes(_2f8.attributes);}}}},_removeCell:function(row,col,_2fa){var _2fb=this._cellMap,_2fc=this.featureLayer,_2fd=_2fc.objectIdField;var cell=_2fa?_2fb[_2fa]:(_2fb[row]&&_2fb[row][col]);if(cell){if(_2fa){delete _2fb[_2fa];}else{delete _2fb[row][col];}var _2fe=cell.features,i;for(i=0;i<_2fe.length;i++){var _2ff=_2fe[i];var oid=_2ff.attributes[_2fd];this._decRefCount(oid);if(oid in _2fc._selectedFeatures){continue;}this._removeFeatureIIf(oid);}}}});dojo.declare("esri.layers._GridLayout",null,{constructor:function(_300,_301,_302,_303){this.origin=_300;this.cellWidth=_301.width;this.cellHeight=_301.height;this.mapWidth=_302.width;this.mapHeight=_302.height;this.srInfo=_303;},setResolution:function(_304){this._resolution=(_304.xmax-_304.xmin)/this.mapWidth;if(this.srInfo){var _305=Math.round((2*this.srInfo.valid[1])/this._resolution),_306=Math.round(_305/this.cellWidth);this._frameStats=[_306,0,_306-1];}},getCellCoordinates:function(_307){var res=this._resolution,_308=this.origin;return {row:Math.floor((_308.y-_307.y)/(this.cellHeight*res)),col:Math.floor((_307.x-_308.x)/(this.cellWidth*res))};},normalize:function(col){var _309=this._frameStats;if(_309){var _30a=_309[0],m180=_309[1],p180=_309[2];if(col<m180){col=col%_30a;col=col<m180?col+_30a:col;}else{if(col>p180){col=col%_30a;}}}return col;},intersects:function(_30b,_30c){var _30d=this.srInfo;if(_30d){return dojo.some(_30c._getParts(_30d),function(_30e){return _30b.intersects(_30e.extent);});}else{return _30b.intersects(_30c);}},getCellExtent:function(row,col){var res=this._resolution,_30f=this.origin,_310=this.cellWidth,_311=this.cellHeight;return new esri.geometry.Extent((col*_310*res)+_30f.x,_30f.y-((row+1)*_311*res),((col+1)*_310*res)+_30f.x,_30f.y-(row*_311*res),new esri.SpatialReference(_30f.spatialReference.toJson()));},getLatticeID:function(_312){var _313=this.getCellCoordinates({x:_312.xmin,y:_312.ymax}),_314=this.getCellCoordinates({x:_312.xmax,y:_312.ymin}),_315=_313.row,_316=_314.row,_317=this.normalize(_313.col),_318=this.normalize(_314.col);return _315+"_"+_316+"_"+_317+"_"+_318;},sorter:function(a,b){return (a<b)?-1:1;},getCellsInExtent:function(_319,_31a){var _31b=this.getCellCoordinates({x:_319.xmin,y:_319.ymax}),_31c=this.getCellCoordinates({x:_319.xmax,y:_319.ymin}),_31d=_31b.row,_31e=_31c.row,_31f=_31b.col,_320=_31c.col,_321=[],i,j,nj,_322=[],_323=[],len,xmin,xmax,ymin,ymax,_324=[],_325,_326;for(i=_31d;i<=_31e;i++){for(j=_31f;j<=_320;j++){nj=this.normalize(j);_319=this.getCellExtent(i,nj);_321.push({row:i,col:nj,extent:_319,resolution:this._resolution});if(_31a){_322.push(_319.xmin,_319.xmax);_323.push(_319.ymin,_319.ymax);}}}_31f=this.normalize(_31f);_320=this.normalize(_320);_322.sort(this.sorter);_323.sort(this.sorter);len=_322.length;for(i=len-1;i>=0;i--){if(i<(len-1)){if(_322[i]===_322[i+1]){_322.splice(i,1);}}}len=_323.length;for(i=len-1;i>=0;i--){if(i<(len-1)){if(_323[i]===_323[i+1]){_323.splice(i,1);}}}if(_322.length&&_323.length){xmin=_322[0];xmax=_322[_322.length-1];ymin=_323[0];ymax=_323[_323.length-1];len=_322.length;for(i=0;i<len;i++){_324.push([[_322[i],ymax],[_322[i],ymin]]);}len=_323.length;for(i=0;i<len;i++){_324.push([[xmin,_323[i]],[xmax,_323[i]]]);}_325=new esri.geometry.Polyline({paths:_324,spatialReference:this.origin.spatialReference.toJson()});_326=_31d+"_"+_31e+"_"+_31f+"_"+_320;_321.push({latticeID:_326,lattice:_325,resolution:this._resolution});}return {minRow:_31d,maxRow:_31e,minCol:_31f,maxCol:_320,cells:_321};}});dojo.declare("esri.layers._TrackManager",null,{constructor:function(_327){this.layer=_327;this.trackMap={};},initialize:function(map){this.map=map;var _328=this.layer,_329=_328.renderer.trackRenderer;if(_329&&(_328.geometryType==="esriGeometryPoint")){var _32a=(this.container=new esri.layers._GraphicsLayer({id:_328.id+"_tracks",_child:true}));_32a._setMap(map,_328._div);_32a.setRenderer(_329);}},addFeatures:function(_32b){var tkid,_32c=this.trackMap,_32d=this.layer,_32e=_32d._trackIdField;dojo.forEach(_32b,function(_32f){var _330=_32f.attributes;tkid=_330[_32e];var ary=(_32c[tkid]=(_32c[tkid]||[]));ary.push(_32f);});var _331=_32d._startTimeField,_332=_32d.objectIdField;var _333=function(a,b){var _334=a.attributes[_331],_335=b.attributes[_331];if(_334===_335){return (a.attributes[_332]<b.attributes[_332])?-1:1;}else{return (_334<_335)?-1:1;}};for(tkid in _32c){_32c[tkid].sort(_333);}},drawTracks:function(){var _336=this.container;if(!_336){return;}var _337=this.trackMap,sr=this.map.spatialReference,tkid,ary,path,i,_338;for(tkid in _337){ary=_337[tkid];path=[];for(i=ary.length-1;i>=0;i--){_338=ary[i].geometry;if(_338){path.push([_338.x,_338.y]);}}if(path.length>0){_336.add(new esri.Graphic(new esri.geometry.Polyline({paths:[path],spatialReference:sr})));}}},moveLatestToFront:function(){dojo.forEach(this.getLatestObservations(),function(_339){var _33a=_339._shape;_33a&&_33a._moveToFront();this._repaint(_339,null,true);},this.layer);},getLatestObservations:function(){var _33b=[];if(!this.layer.renderer.latestObservationRenderer){return _33b;}var _33c=this.trackMap,tkid;for(tkid in _33c){var ary=_33c[tkid];_33b.push(ary[ary.length-1]);}return _33b;},clearTracks:function(){var _33d=this.getLatestObservations();this.trackMap={};var _33e=this.container;if(_33e){_33e.clear();}dojo.forEach(_33d,function(_33f){this._repaint(_33f,null,true);},this.layer);},isLatestObservation:function(_340){var _341=this.layer._trackIdField;var _342=this.trackMap[_340.attributes[_341]];if(_342){return (_342[_342.length-1]===_340);}return false;},destroy:function(){var _343=this.container;if(_343){_343.clear();_343._unsetMap(this.map,this.layer._div);this.container=null;}this.map=null;this.layer=null;this.trackMap=null;}});}if(!dojo._hasResource["esri.layers.MapImageLayer"]){dojo._hasResource["esri.layers.MapImageLayer"]=true;dojo.provide("esri.layers.MapImageLayer");dojo.declare("esri.layers.MapImageLayer",[esri.layers.Layer],{"-chains-":{constructor:"manual"},constructor:function(_344){this.inherited(arguments,[null,_344]);this._mapImages=[];var _345=dojo.hitch;this._panStart=_345(this,this._panStart);this._pan=_345(this,this._pan);this._extentChange=_345(this,this._extentChange);this._zoom=_345(this,this._zoom);this._zoomStart=_345(this,this._zoomStart);this._scale=_345(this,this._scale);this._resize=_345(this,this._resize);this.loaded=true;this.onLoad(this);},opacity:1,_transform:esri._getDOMAccessor("transform"),addImage:function(_346){var _347=this._mapImages.push(_346);_347=_347-1;_346._idx=_347;_346._layer=this;if(this._div){this._createImage(_346,_347);}},removeImage:function(_348){if(_348){var idx=_348._idx,_349=this._mapImages;if(_349[idx]===_348){delete _349[idx];var node=_348._node;if(node){this._clearEvents(node);node.e_idx=node.e_bl=node.e_tr=node.e_l=node.e_t=node.e_w=node.e_h=null;if(node.parentNode){node.parentNode.removeChild(node);dojo.destroy(node);}}_348._node=_348._idx=_348._layer=null;}}},removeAllImages:function(){var _34a=this._mapImages,i,len=_34a.length;for(i=0;i<len;i++){var _34b=_34a[i];if(_34b){this.removeImage(_34b);}}this._mapImages=[];},getImages:function(){var _34c=this._mapImages,_34d=[],i,len=_34c.length;for(i=0;i<len;i++){if(_34c[i]){_34d.push(_34c[i]);}}return _34d;},setOpacity:function(_34e){if(this.opacity!=_34e){this.onOpacityChange(this.opacity=_34e);}},onOpacityChange:function(_34f){var div=this._div,i,len,_350;if(div){if(!dojo.isIE||dojo.isIE>8){dojo.style(div,"opacity",_34f);}else{_350=div.childNodes;len=_350.length;for(i=0;i<len;i++){dojo.style(_350[i],"opacity",_34f);}}}},_createImage:function(_351,idx){var node=dojo.create("img");dojo.style(node,{position:"absolute"});if(dojo.isIE<=8){dojo.style(node,"opacity",this.opacity);}if(_351.rotation){var _352="rotate("+(360-_351.rotation)+"deg)";if(dojo.isIE<9){}else{dojo.style(node,this._transform,_352);dojo.style(node,"transform",_352);}}_351._node=node;node.e_idx=idx;node.e_layer=this;node.e_load=dojo.connect(node,"onload",esri.layers.MapImageLayer.prototype._imageLoaded);node.e_error=dojo.connect(node,"onerror",esri.layers.MapImageLayer.prototype._imageError);node.e_abort=dojo.connect(node,"onabort",esri.layers.MapImageLayer.prototype._imageError);node.src=_351.href;},_imageLoaded:function(evt,img){var node=img||evt.target||evt.currentTarget,self=node.e_layer,_353=self._mapImages[node.e_idx];if(self._map&&(self._map.__zooming||self._map.__panning)){self._standby.push(node);return;}self._clearEvents(node);if(!_353||_353._node!==node){return;}if(self._map){self._attach(_353);}},_imageError:function(evt){var node=evt.target||evt.currentTarget,self=node.e_layer,_354=self._mapImages[node.e_idx];self._clearEvents(node);if(_354){_354._node=null;}},_clearEvents:function(node){var _355=dojo.disconnect;_355(node.e_load);_355(node.e_error);_355(node.e_abort);node.e_load=node.e_error=node.e_abort=node.e_layer=null;},_attach:function(_356){var _357=_356.extent,_358,_359=_357.spatialReference,_35a=this._sr,div=this._div,node=_356._node,_35b=new esri.geometry.Point({x:_357.xmin,y:_357.ymin}),_35c=new esri.geometry.Point({x:_357.xmax,y:_357.ymax});if(_35a.wkid){_358=(_35a._isWebMercator()&&_359._isWebMercator())||(_35a.wkid===_359.wkid);}else{if(_35a.wkt){_358=(_35a.wkt===_359.wkt);}}if(!_358){if(_35a._isWebMercator()&&_359.wkid===4326){_35b=esri.geometry.geographicToWebMercator(_35b);_35c=esri.geometry.geographicToWebMercator(_35c);}else{if(_359._isWebMercator()&&_35a.wkid===4326){_35b=esri.geometry.webMercatorToGeographic(_35b);_35c=esri.geometry.webMercatorToGeographic(_35c);}}}node.e_bl=_35b;node.e_tr=_35c;if(_356.visible){this._setPos(node,div._left,div._top);(this._active||div).appendChild(node);}},_setPos:function(node,_35d,_35e){var _35f=node.e_bl,_360=node.e_tr,map=this._map;_35f=map.toScreen(_35f);_360=map.toScreen(_360);var left=_35f.x-_35d,top=_360.y-_35e,_361=Math.abs(_360.x-_35f.x),_362=Math.abs(_35f.y-_360.y),css={width:_361+"px",height:_362+"px"},_363=this._mapImages[node.e_idx];if(map.navigationMode==="css-transforms"){css[esri._css.names.transform]=esri._css.translate(left,top)+(_363.rotation?(" "+esri._css.rotate(360-_363.rotation)):"");}else{css.left=left+"px";css.top=top+"px";}dojo.style(node,css);node.e_l=left;node.e_t=top;node.e_w=_361;node.e_h=_362;},_setMap:function(map,_364){this._map=map;this._sr=map.spatialReference;var div=this._div=dojo.create("div",null,_364),_365=esri._css.names,css={position:"absolute"},vd=map.__visibleDelta;if(!dojo.isIE||dojo.isIE>8){css.opacity=this.opacity;}if(map.navigationMode==="css-transforms"){css[_365.transform]=esri._css.translate(vd.x,vd.y);dojo.style(div,css);div._left=vd.x;div._top=vd.y;css={position:"absolute",width:map.width+"px",height:map.height+"px",overflow:"visible"};this._active=dojo.create("div",null,div);dojo.style(this._active,css);this._passive=dojo.create("div",null,div);dojo.style(this._passive,css);}else{div._left=0;div._top=0;dojo.style(div,css);}this._standby=[];var _366=this._mapImages,i,len=_366.length;for(i=0;i<len;i++){var _367=_366[i],node=_367._node;if(!node){this._createImage(_367,_367._idx);}}this.onVisibilityChange(this.visible);return div;},_unsetMap:function(map,_368){this._disconnect();var div=this._div;if(div){var _369=this._mapImages,i,len=_369.length;for(i=0;i<len;i++){var _36a=_369[i];if(_36a){var node=_36a._node;if(node){this._clearEvents(node);node.e_idx=node.e_bl=node.e_tr=node.e_l=node.e_t=node.e_w=node.e_h=null;}_36a._node=null;}}_368.removeChild(div);dojo.destroy(div);}this._map=this._div=this._sr=this._active=this._passive=this._standby=null;},onVisibilityChange:function(_36b){var div=this._div;if(div){if(_36b){this._redraw();this._connect(this._map);esri.show(div);}else{this._disconnect();esri.hide(div);}}},_connect:function(map){if(!this._connections){var _36c=dojo.connect,_36d=(map.navigationMode==="css-transforms");this._connections=[_36c(map,"onPanStart",this._panStart),_36c(map,"onPan",this._pan),_36c(map,"onExtentChange",this._extentChange),_36d&&_36c(map,"onZoomStart",this._zoomStart),_36d?_36c(map,"onScale",this._scale):_36c(map,"onZoom",this._zoom),_36d&&_36c(map,"onResize",this._resize)];}},_disconnect:function(){if(this._connections){dojo.forEach(this._connections,dojo.disconnect);this._connections=null;}},_panStart:function(){this._panL=this._div._left;this._panT=this._div._top;},_pan:function(_36e,_36f){var div=this._div;div._left=this._panL+_36f.x;div._top=this._panT+_36f.y;if(this._map.navigationMode==="css-transforms"){dojo.style(div,esri._css.names.transform,esri._css.translate(div._left,div._top));}else{dojo.style(div,{left:div._left+"px",top:div._top+"px"});}},_extentChange:function(_370,_371,_372){if(_372){this._redraw(this._map.navigationMode==="css-transforms");}else{if(_371){this._pan(_370,_371);}}var i,_373=this._standby;if(_373&&_373.length){for(i=_373.length-1;i>=0;i--){this._imageLoaded(null,_373[i]);_373.splice(i,1);}}},_redraw:function(_374){if(_374){var _375=this._passive,_376=esri._css.names;dojo.style(_375,_376.transition,"none");this._moveImages(_375,this._active);dojo.style(_375,_376.transform,"none");}var div=this._active||this._div,_377=this._div._left,_378=this._div._top,i,len=div.childNodes.length,node;for(i=0;i<len;i++){node=div.childNodes[i];this._setPos(node,_377,_378);}},_zoom:function(_379,_37a,_37b){var div=this._div,_37c=div._left,_37d=div._top,i,len=div.childNodes.length,node;for(i=0;i<len;i++){node=div.childNodes[i];var _37e=node.e_w*_37a,_37f=node.e_h*_37a,_380=(_37b.x-_37c-node.e_l)*(_37e-node.e_w)/node.e_w,_381=(_37b.y-_37d-node.e_t)*(_37f-node.e_h)/node.e_h;_380=isNaN(_380)?0:_380;_381=isNaN(_381)?0:_381;dojo.style(node,{left:(node.e_l-_380)+"px",top:(node.e_t-_381)+"px",width:_37e+"px",height:_37f+"px"});}},_zoomStart:function(){this._moveImages(this._active,this._passive);},_moveImages:function(_382,dest){var _383=_382.childNodes,i,len=_383.length;if(len>0){for(i=len-1;i>=0;i--){dest.appendChild(_383[i]);}}},_scale:function(mtx,_384){var css={},_385=esri._css.names,_386=this._passive;dojo.style(_386,_385.transition,_384?"none":(_385.transformName+" "+esri.config.defaults.map.zoomDuration+"ms ease"));css[_385.transform]=esri._css.matrix(mtx);dojo.style(_386,_385.transform,esri._css.matrix(mtx));},_resize:function(_387,_388,_389){dojo.style(this._active,{width:_388+"px",height:_389+"px"});dojo.style(this._passive,{width:_388+"px",height:_389+"px"});}});dojo.extend(esri.layers.MapImage,{visible:true,getLayer:function(){return this._layer;},getNode:function(){return this._node;},show:function(){if(!this.visible){this.visible=true;var node=this._node,_38a=this._layer,div;if(node){div=_38a&&_38a._div;if(div){_38a._setPos(node,div._left,div._top);(_38a._active||div).appendChild(node);}esri.show(node);}}},hide:function(){if(this.visible){this.visible=false;var node=this._node;if(node){esri.hide(node);if(node.parentNode){node.parentNode.removeChild(node);}}}}});}if(!dojo._hasResource["esri.PopupBase"]){dojo._hasResource["esri.PopupBase"]=true;dojo.provide("esri.PopupBase");dojo.declare("esri.PopupBase",null,{onSetFeatures:function(){},onClearFeatures:function(){},onSelectionChange:function(){},onDfdComplete:function(){},initialize:function(){this.count=0;this.selectedIndex=-1;},cleanup:function(){this.features=this.deferreds=null;},setFeatures:function(arg){if(!arg||!arg.length){return;}this.clearFeatures();var _38b,_38c;if(arg[0] instanceof dojo.Deferred){_38c=arg;}else{_38b=arg;}if(_38b){this._updateFeatures(null,_38b);}else{this.deferreds=_38c;_38c=_38c.slice(0);dojo.forEach(_38c,function(dfd){dfd.addBoth(dojo.hitch(this,this._updateFeatures,dfd));},this);}},clearFeatures:function(){this.features=this.deferreds=null;this.count=0;var _38d=this.selectedIndex;this.selectedIndex=-1;if(_38d>-1){this.onSelectionChange();}this.onClearFeatures();},getSelectedFeature:function(){var _38e=this.features;if(_38e){return _38e[this.selectedIndex];}},select:function(_38f){if(_38f<0||_38f>=this.count){return;}this.selectedIndex=_38f;this.onSelectionChange();},enableHighlight:function(map){this._highlighted=map.graphics.add(new esri.Graphic(new esri.geometry.Point(0,0,map.spatialReference)));this._highlighted.hide();var ESYM=esri.symbol;if(!this.markerSymbol){var _390=(this.markerSymbol=new ESYM.SimpleMarkerSymbol());_390.setStyle(ESYM.SimpleMarkerSymbol.STYLE_TARGET);_390._setDim(16,16,7);_390.setOutline(new ESYM.CartographicLineSymbol(ESYM.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([0,255,255]),2,ESYM.CartographicLineSymbol.CAP_ROUND,ESYM.CartographicLineSymbol.JOIN_ROUND));_390.setColor(new dojo.Color([0,0,0,0]));}if(!this.lineSymbol){this.lineSymbol=new ESYM.SimpleLineSymbol(ESYM.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([0,255,255]),2);}if(!this.fillSymbol){this.fillSymbol=new ESYM.SimpleFillSymbol(ESYM.SimpleFillSymbol.STYLE_NULL,new ESYM.SimpleLineSymbol(ESYM.SimpleLineSymbol.STYLE_SOLID,new dojo.Color([0,255,255]),2),new dojo.Color([0,0,0,0]));}},disableHighlight:function(map){var _391=this._highlighted;if(_391){_391.hide();map.graphics.remove(_391);delete this._highlighted;}this.markerSymbol=this.lineSymbol=this.fillSymbol=null;},showHighlight:function(){if(this._highlighted&&this.features&&this.features[this.selectedIndex]){this._highlighted.show();}},hideHighlight:function(){if(this._highlighted){this._highlighted.hide();}},updateHighlight:function(map,_392){var _393=_392.geometry,_394=this._highlighted;if(!_393||!_394){return;}_394.hide();if(!_394.getLayer()&&map){map.graphics.add(_394);}_394.setGeometry(esri.geometry.fromJson(_393.toJson()));var _395;switch(_393.type){case "point":case "multipoint":_395=this.markerSymbol;_395.setOffset(0,0);_395.setAngle(0);var lyr=_392.getLayer();if(lyr){var _396=lyr._getSymbol(_392),_397,_398,xoff=0,yoff=0,_399=0;if(_396){switch(_396.type){case "simplemarkersymbol":_397=_398=(_396.size||0);break;case "picturemarkersymbol":_397=(_396.width||0);_398=(_396.height||0);break;}xoff=_396.xoffset||0;yoff=_396.yoffset||0;_399=_396.angle||0;}if(_397&&_398){_395._setDim(_397+1,_398+1,7);}_395.setOffset(xoff,yoff);_395.setAngle(_399);}break;case "polyline":_395=this.lineSymbol;break;case "polygon":_395=this.fillSymbol;break;}_394.setSymbol(_395);},_unbind:function(dfd){var _39a=dojo.indexOf(this.deferreds,dfd);if(_39a===-1){return;}this.deferreds.splice(_39a,1);if(!this.deferreds.length){this.deferreds=null;return 2;}return 1;},_updateFeatures:function(dfd,_39b){if(dfd){if(this.deferreds){var res=this._unbind(dfd);if(!res){return;}if(_39b&&_39b instanceof Error){this.onDfdComplete(_39b);if(res===2){this.onSetFeatures();}return;}if(_39b&&_39b.length){if(!this.features){this.features=_39b;this.count=_39b.length;this.selectedIndex=0;this.onDfdComplete();if(res===2){this.onSetFeatures();}this.select(0);}else{var _39c=dojo.filter(_39b,function(_39d){return dojo.indexOf(this.features,_39d)===-1;},this);this.features=this.features.concat(_39c);this.count=this.features.length;this.onDfdComplete();if(res===2){this.onSetFeatures();}}}else{this.onDfdComplete();if(res===2){this.onSetFeatures();}}}}else{this.features=_39b;this.count=_39b.length;this.selectedIndex=0;this.onSetFeatures();this.select(0);}}});dojo.declare("esri.PopupInfoTemplate",[esri.InfoTemplate],{"-chains-":{constructor:"manual"},initialize:function(json){if(!json){return;}this.info=json;this.title=this.getTitle;this.content=this.getContent;var _39e=(this._fieldLabels={}),_39f=(this._fieldsMap={});if(json.fieldInfos){dojo.forEach(json.fieldInfos,function(_3a0){_39e[_3a0.fieldName]=_3a0.label;_39f[_3a0.fieldName]=_3a0;});}},toJson:function(){return dojo.fromJson(dojo.toJson(this.info));},getTitle:function(){},getContent:function(){},getComponents:function(_3a1){var _3a2=this.info,_3a3=_3a1.getLayer(),_3a4=dojo.clone(_3a1.attributes)||{},_3a5=dojo.clone(_3a4),_3a6=_3a2.fieldInfos,_3a7="",_3a8="",_3a9,_3aa,_3ab,_3ac=_3a3&&_3a3._getDateOpts&&_3a3._getDateOpts().properties,_3ad={dateFormat:{properties:_3ac,formatter:"DateFormat"+this._dateFormats["shortDateShortTime"]}};if(_3a6){dojo.forEach(_3a6,function(_3ae){var _3af=_3ae.fieldName,val=_3a5[_3af];_3a5[_3af]=this._formatValue(val,_3af,_3ad);if(_3ac&&_3ae.format&&_3ae.format.dateFormat){var pos=dojo.indexOf(_3ac,_3af);if(pos>-1){_3ac.splice(pos,1);}}},this);}if(_3a3){var _3b0=_3a3.types,_3b1=_3a3.typeIdField,_3b2=_3b1&&_3a4[_3b1];for(_3aa in _3a4){_3ab=_3a4[_3aa];if(esri._isDefined(_3ab)){var _3b3=this._getDomainName(_3a3,_3b0,_3b2,_3aa,_3ab);if(esri._isDefined(_3b3)){_3a5[_3aa]=_3b3;}else{if(_3aa===_3b1){var _3b4=this._getTypeName(_3a3,_3ab);if(esri._isDefined(_3b4)){_3a5[_3aa]=_3b4;}}}}}}if(_3a2.title){_3a7=dojo.trim(esri.substitute(_3a5,this._fixTokens(_3a2.title),_3ad)||"");}if(_3a2.description){_3a8=dojo.trim(esri.substitute(_3a5,this._fixTokens(_3a2.description),_3ad)||"");}if(_3a6){_3a9=[];dojo.forEach(_3a6,function(_3b5){_3aa=_3b5.fieldName;if(_3aa&&_3b5.visible){_3a9.push([_3b5.label||_3aa,esri.substitute(_3a5,"${"+_3aa+"}",_3ad)||""]);}});}var _3b6,_3b7;if(_3a2.mediaInfos){_3b6=[];dojo.forEach(_3a2.mediaInfos,function(_3b8){_3b7=0;_3ab=_3b8.value;switch(_3b8.type){case "image":var url=_3ab.sourceURL;url=url&&dojo.trim(esri.substitute(_3a4,this._fixTokens(url)));_3b7=!!url;break;case "piechart":case "linechart":case "columnchart":case "barchart":_3b7=dojo.some(_3ab.fields,function(_3b9){return esri._isDefined(_3a4[_3b9]);});break;default:return;}if(_3b7){_3b8=dojo.clone(_3b8);_3ab=_3b8.value;_3b8.title=_3b8.title?dojo.trim(esri.substitute(_3a5,this._fixTokens(_3b8.title),_3ad)||""):"";_3b8.caption=_3b8.caption?dojo.trim(esri.substitute(_3a5,this._fixTokens(_3b8.caption),_3ad)||""):"";if(_3b8.type==="image"){_3ab.sourceURL=esri.substitute(_3a4,this._fixTokens(_3ab.sourceURL));if(_3ab.linkURL){_3ab.linkURL=dojo.trim(esri.substitute(_3a4,this._fixTokens(_3ab.linkURL))||"");}}else{var _3ba=_3a4[_3ab.normalizeField]||0;_3ab.fields=dojo.map(_3ab.fields,function(_3bb){var data=_3a4[_3bb];data=(data===undefined)?null:data;if(data&&_3ba){data=data/_3ba;}return {y:data,tooltip:(this._fieldLabels[_3bb]||_3bb)+":<br/>"+this._formatValue(data,_3bb,_3ad)};},this);}_3b6.push(_3b8);}},this);}return {title:_3a7,description:_3a8,fields:(_3a9&&_3a9.length)?_3a9:null,mediaInfos:(_3b6&&_3b6.length)?_3b6:null,formatted:_3a5,editSummary:(_3a3&&_3a3.getEditSummary)?_3a3.getEditSummary(_3a1):""};},getAttachments:function(_3bc){var _3bd=_3bc.getLayer(),_3be=_3bc.attributes;if(this.info.showAttachments&&_3bd&&_3bd.hasAttachments&&_3bd.objectIdField){var oid=_3be&&_3be[_3bd.objectIdField];if(oid){return _3bd.queryAttachmentInfos(oid);}}},_dateFormats:{"shortDate":"(datePattern: 'M/d/y', selector: 'date')","longMonthDayYear":"(datePattern: 'MMMM d, y', selector: 'date')","dayShortMonthYear":"(datePattern: 'd MMM y', selector: 'date')","longDate":"(datePattern: 'EEEE, MMMM d, y', selector: 'date')","shortDateShortTime":"(datePattern: 'M/d/y', timePattern: 'h:mm a', selector: 'date and time')","shortDateShortTime24":"(datePattern: 'M/d/y', timePattern: 'H:mm', selector: 'date and time')","longMonthYear":"(datePattern: 'MMMM y', selector: 'date')","shortMonthYear":"(datePattern: 'MMM y', selector: 'date')","year":"(datePattern: 'y', selector: 'date')"},_fixTokens:function(_3bf){return _3bf.replace(/(\{[^\{\r\n]+\})/g,"$$$1");},_formatValue:function(val,_3c0,_3c1){var _3c2=this._fieldsMap[_3c0],fmt=_3c2&&_3c2.format;if(!esri._isDefined(val)||!_3c2||!esri._isDefined(fmt)){return val;}var _3c3="",_3c4=[],_3c5=fmt.hasOwnProperty("places")||fmt.hasOwnProperty("digitSeparator"),_3c6=fmt.hasOwnProperty("digitSeparator")?fmt.digitSeparator:true;if(_3c5){_3c3="NumberFormat";_3c4.push("places: "+(esri._isDefined(fmt.places)?Number(fmt.places):"Infinity"));if(_3c4.length){_3c3+=("("+_3c4.join(",")+")");}}else{if(fmt.dateFormat){_3c3="DateFormat"+(this._dateFormats[fmt.dateFormat]||this._dateFormats["shortDateShortTime"]);}else{return val;}}var _3c7=esri.substitute({"myKey":val},"${myKey:"+_3c3+"}",_3c1)||"";if(_3c5&&!_3c6){var _3c8=dojo.i18n.getLocalization("dojo.cldr","number");if(_3c8.group){_3c7=_3c7.replace(new RegExp("\\"+_3c8.group,"g"),"");}}return _3c7;},_getDomainName:function(_3c9,_3ca,_3cb,_3cc,_3cd){var _3ce,stop;if(_3ca&&esri._isDefined(_3cb)){dojo.some(_3ca,function(_3cf){if(_3cf.id==_3cb){_3ce=_3cf.domains&&_3cf.domains[_3cc];if(_3ce&&_3ce.type==="inherited"){_3ce=this._getLayerDomain(_3c9,_3cc);stop=true;}return true;}return false;},this);}if(!stop&&!_3ce){_3ce=this._getLayerDomain(_3c9,_3cc);}if(_3ce&&_3ce.codedValues){var _3d0;dojo.some(_3ce.codedValues,function(_3d1){if(_3d1.code==_3cd){_3d0=_3d1.name;return true;}return false;});return _3d0;}},_getLayerDomain:function(_3d2,_3d3){var _3d4=_3d2.fields;if(_3d4){var _3d5;dojo.some(_3d4,function(_3d6){if(_3d6.name===_3d3){_3d5=_3d6.domain;return true;}return false;});return _3d5;}},_getTypeName:function(_3d7,id){var _3d8=_3d7.types;if(_3d8){var _3d9;dojo.some(_3d8,function(_3da){if(_3da.id==id){_3d9=_3da.name;return true;}return false;});return _3d9;}}});}if(!dojo._hasResource["dojo.Stateful"]){dojo._hasResource["dojo.Stateful"]=true;dojo.provide("dojo.Stateful");dojo.declare("dojo.Stateful",null,{postscript:function(_3db){if(_3db){dojo.mixin(this,_3db);}},get:function(name){return this[name];},set:function(name,_3dc){if(typeof name==="object"){for(var x in name){this.set(x,name[x]);}return this;}var _3dd=this[name];this[name]=_3dc;if(this._watchCallbacks){this._watchCallbacks(name,_3dd,_3dc);}return this;},watch:function(name,_3de){var _3df=this._watchCallbacks;if(!_3df){var self=this;_3df=this._watchCallbacks=function(name,_3e0,_3e1,_3e2){var _3e3=function(_3e4){if(_3e4){_3e4=_3e4.slice();for(var i=0,l=_3e4.length;i<l;i++){try{_3e4[i].call(self,name,_3e0,_3e1);}catch(e){console.error(e);}}}};_3e3(_3df["_"+name]);if(!_3e2){_3e3(_3df["*"]);}};}if(!_3de&&typeof name==="function"){_3de=name;name="*";}else{name="_"+name;}var _3e5=_3df[name];if(typeof _3e5!=="object"){_3e5=_3df[name]=[];}_3e5.push(_3de);return {unwatch:function(){_3e5.splice(dojo.indexOf(_3e5,_3de),1);}};}});}if(!dojo._hasResource["dijit._WidgetBase"]){dojo._hasResource["dijit._WidgetBase"]=true;dojo.provide("dijit._WidgetBase");(function(){dojo.declare("dijit._WidgetBase",dojo.Stateful,{id:"",lang:"",dir:"","class":"",style:"",title:"",tooltip:"",baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_blankGif:(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif")).toString(),postscript:function(_3e6,_3e7){this.create(_3e6,_3e7);},create:function(_3e8,_3e9){this.srcNodeRef=dojo.byId(_3e9);this._connects=[];this._subscribes=[];if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){this.id=this.srcNodeRef.id;}if(_3e8){this.params=_3e8;dojo._mixin(this,_3e8);}this.postMixInProperties();if(!this.id){this.id=dijit.getUniqueId(this.declaredClass.replace(/\./g,"_"));}dijit.registry.add(this);this.buildRendering();if(this.domNode){this._applyAttributes();var _3ea=this.srcNodeRef;if(_3ea&&_3ea.parentNode&&this.domNode!==_3ea){_3ea.parentNode.replaceChild(this.domNode,_3ea);}}if(this.domNode){this.domNode.setAttribute("widgetId",this.id);}this.postCreate();if(this.srcNodeRef&&!this.srcNodeRef.parentNode){delete this.srcNodeRef;}this._created=true;},_applyAttributes:function(){var _3eb=function(attr,_3ec){if((_3ec.params&&attr in _3ec.params)||_3ec[attr]){_3ec.set(attr,_3ec[attr]);}};for(var attr in this.attributeMap){_3eb(attr,this);}dojo.forEach(this._getSetterAttributes(),function(a){if(!(a in this.attributeMap)){_3eb(a,this);}},this);},_getSetterAttributes:function(){var ctor=this.constructor;if(!ctor._setterAttrs){var r=(ctor._setterAttrs=[]),_3ed,_3ee=ctor.prototype;for(var _3ef in _3ee){if(dojo.isFunction(_3ee[_3ef])&&(_3ed=_3ef.match(/^_set([a-zA-Z]*)Attr$/))&&_3ed[1]){r.push(_3ed[1].charAt(0).toLowerCase()+_3ed[1].substr(1));}}}return ctor._setterAttrs;},postMixInProperties:function(){},buildRendering:function(){if(!this.domNode){this.domNode=this.srcNodeRef||dojo.create("div");}if(this.baseClass){var _3f0=this.baseClass.split(" ");if(!this.isLeftToRight()){_3f0=_3f0.concat(dojo.map(_3f0,function(name){return name+"Rtl";}));}dojo.addClass(this.domNode,_3f0);}},postCreate:function(){},startup:function(){this._started=true;},destroyRecursive:function(_3f1){this._beingDestroyed=true;this.destroyDescendants(_3f1);this.destroy(_3f1);},destroy:function(_3f2){this._beingDestroyed=true;this.uninitialize();var d=dojo,dfe=d.forEach,dun=d.unsubscribe;dfe(this._connects,function(_3f3){dfe(_3f3,d.disconnect);});dfe(this._subscribes,function(_3f4){dun(_3f4);});dfe(this._supportingWidgets||[],function(w){if(w.destroyRecursive){w.destroyRecursive();}else{if(w.destroy){w.destroy();}}});this.destroyRendering(_3f2);dijit.registry.remove(this.id);this._destroyed=true;},destroyRendering:function(_3f5){if(this.bgIframe){this.bgIframe.destroy(_3f5);delete this.bgIframe;}if(this.domNode){if(_3f5){dojo.removeAttr(this.domNode,"widgetId");}else{dojo.destroy(this.domNode);}delete this.domNode;}if(this.srcNodeRef){if(!_3f5){dojo.destroy(this.srcNodeRef);}delete this.srcNodeRef;}},destroyDescendants:function(_3f6){dojo.forEach(this.getChildren(),function(_3f7){if(_3f7.destroyRecursive){_3f7.destroyRecursive(_3f6);}});},uninitialize:function(){return false;},_setClassAttr:function(_3f8){var _3f9=this[this.attributeMap["class"]||"domNode"];dojo.replaceClass(_3f9,_3f8,this["class"]);this._set("class",_3f8);},_setStyleAttr:function(_3fa){var _3fb=this[this.attributeMap.style||"domNode"];if(dojo.isObject(_3fa)){dojo.style(_3fb,_3fa);}else{if(_3fb.style.cssText){_3fb.style.cssText+="; "+_3fa;}else{_3fb.style.cssText=_3fa;}}this._set("style",_3fa);},_attrToDom:function(attr,_3fc){var _3fd=this.attributeMap[attr];dojo.forEach(dojo.isArray(_3fd)?_3fd:[_3fd],function(_3fe){var _3ff=this[_3fe.node||_3fe||"domNode"];var type=_3fe.type||"attribute";switch(type){case "attribute":if(dojo.isFunction(_3fc)){_3fc=dojo.hitch(this,_3fc);}var _400=_3fe.attribute?_3fe.attribute:(/^on[A-Z][a-zA-Z]*$/.test(attr)?attr.toLowerCase():attr);dojo.attr(_3ff,_400,_3fc);break;case "innerText":_3ff.innerHTML="";_3ff.appendChild(dojo.doc.createTextNode(_3fc));break;case "innerHTML":_3ff.innerHTML=_3fc;break;case "class":dojo.replaceClass(_3ff,_3fc,this[attr]);break;}},this);},get:function(name){var _401=this._getAttrNames(name);return this[_401.g]?this[_401.g]():this[name];},set:function(name,_402){if(typeof name==="object"){for(var x in name){this.set(x,name[x]);}return this;}var _403=this._getAttrNames(name);if(this[_403.s]){var _404=this[_403.s].apply(this,Array.prototype.slice.call(arguments,1));}else{if(name in this.attributeMap){this._attrToDom(name,_402);}this._set(name,_402);}return _404||this;},_attrPairNames:{},_getAttrNames:function(name){var apn=this._attrPairNames;if(apn[name]){return apn[name];}var uc=name.charAt(0).toUpperCase()+name.substr(1);return (apn[name]={n:name+"Node",s:"_set"+uc+"Attr",g:"_get"+uc+"Attr"});},_set:function(name,_405){var _406=this[name];this[name]=_405;if(this._watchCallbacks&&this._created&&_405!==_406){this._watchCallbacks(name,_406,_405);}},toString:function(){return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";},getDescendants:function(){return this.containerNode?dojo.query("[widgetId]",this.containerNode).map(dijit.byNode):[];},getChildren:function(){return this.containerNode?dijit.findWidgets(this.containerNode):[];},connect:function(obj,_407,_408){var _409=[dojo._connect(obj,_407,this,_408)];this._connects.push(_409);return _409;},disconnect:function(_40a){for(var i=0;i<this._connects.length;i++){if(this._connects[i]==_40a){dojo.forEach(_40a,dojo.disconnect);this._connects.splice(i,1);return;}}},subscribe:function(_40b,_40c){var _40d=dojo.subscribe(_40b,this,_40c);this._subscribes.push(_40d);return _40d;},unsubscribe:function(_40e){for(var i=0;i<this._subscribes.length;i++){if(this._subscribes[i]==_40e){dojo.unsubscribe(_40e);this._subscribes.splice(i,1);return;}}},isLeftToRight:function(){return this.dir?(this.dir=="ltr"):dojo._isBodyLtr();},placeAt:function(_40f,_410){if(_40f.declaredClass&&_40f.addChild){_40f.addChild(this,_410);}else{dojo.place(this.domNode,_40f,_410);}return this;}});})();}if(!dojo._hasResource["dojo.window"]){dojo._hasResource["dojo.window"]=true;dojo.provide("dojo.window");dojo.getObject("window",true,dojo);dojo.window.getBox=function(){var _411=(dojo.doc.compatMode=="BackCompat")?dojo.body():dojo.doc.documentElement;var _412=dojo._docScroll();return {w:_411.clientWidth,h:_411.clientHeight,l:_412.x,t:_412.y};};dojo.window.get=function(doc){if(dojo.isIE&&window!==document.parentWindow){doc.parentWindow.execScript("document._parentWindow = window;","Javascript");var win=doc._parentWindow;doc._parentWindow=null;return win;}return doc.parentWindow||doc.defaultView;};dojo.window.scrollIntoView=function(node,pos){try{node=dojo.byId(node);var doc=node.ownerDocument||dojo.doc,body=doc.body||dojo.body(),html=doc.documentElement||body.parentNode,isIE=dojo.isIE,isWK=dojo.isWebKit;if((!(dojo.isMoz||isIE||isWK||dojo.isOpera)||node==body||node==html)&&(typeof node.scrollIntoView!="undefined")){node.scrollIntoView(false);return;}var _413=doc.compatMode=="BackCompat",_414=(isIE>=9&&node.ownerDocument.parentWindow.frameElement)?((html.clientHeight>0&&html.clientWidth>0&&(body.clientHeight==0||body.clientWidth==0||body.clientHeight>html.clientHeight||body.clientWidth>html.clientWidth))?html:body):(_413?body:html),_415=isWK?body:_414,_416=_414.clientWidth,_417=_414.clientHeight,rtl=!dojo._isBodyLtr(),_418=pos||dojo.position(node),el=node.parentNode,_419=function(el){return ((isIE<=6||(isIE&&_413))?false:(dojo.style(el,"position").toLowerCase()=="fixed"));};if(_419(node)){return;}while(el){if(el==body){el=_415;}var _41a=dojo.position(el),_41b=_419(el);if(el==_415){_41a.w=_416;_41a.h=_417;if(_415==html&&isIE&&rtl){_41a.x+=_415.offsetWidth-_41a.w;}if(_41a.x<0||!isIE){_41a.x=0;}if(_41a.y<0||!isIE){_41a.y=0;}}else{var pb=dojo._getPadBorderExtents(el);_41a.w-=pb.w;_41a.h-=pb.h;_41a.x+=pb.l;_41a.y+=pb.t;var _41c=el.clientWidth,_41d=_41a.w-_41c;if(_41c>0&&_41d>0){_41a.w=_41c;_41a.x+=(rtl&&(isIE||el.clientLeft>pb.l))?_41d:0;}_41c=el.clientHeight;_41d=_41a.h-_41c;if(_41c>0&&_41d>0){_41a.h=_41c;}}if(_41b){if(_41a.y<0){_41a.h+=_41a.y;_41a.y=0;}if(_41a.x<0){_41a.w+=_41a.x;_41a.x=0;}if(_41a.y+_41a.h>_417){_41a.h=_417-_41a.y;}if(_41a.x+_41a.w>_416){_41a.w=_416-_41a.x;}}var l=_418.x-_41a.x,t=_418.y-Math.max(_41a.y,0),r=l+_418.w-_41a.w,bot=t+_418.h-_41a.h;if(r*l>0){var s=Math[l<0?"max":"min"](l,r);if(rtl&&((isIE==8&&!_413)||isIE>=9)){s=-s;}_418.x+=el.scrollLeft;el.scrollLeft+=s;_418.x-=el.scrollLeft;}if(bot*t>0){_418.y+=el.scrollTop;el.scrollTop+=Math[t<0?"max":"min"](t,bot);_418.y-=el.scrollTop;}el=(el!=_415)&&!_41b&&el.parentNode;}}catch(error){console.error("scrollIntoView: "+error);node.scrollIntoView(false);}};}if(!dojo._hasResource["dijit._base.focus"]){dojo._hasResource["dijit._base.focus"]=true;dojo.provide("dijit._base.focus");dojo.mixin(dijit,{_curFocus:null,_prevFocus:null,isCollapsed:function(){return dijit.getBookmark().isCollapsed;},getBookmark:function(){var bm,rg,tg,sel=dojo.doc.selection,cf=dijit._curFocus;if(dojo.global.getSelection){sel=dojo.global.getSelection();if(sel){if(sel.isCollapsed){tg=cf?cf.tagName:"";if(tg){tg=tg.toLowerCase();if(tg=="textarea"||(tg=="input"&&(!cf.type||cf.type.toLowerCase()=="text"))){sel={start:cf.selectionStart,end:cf.selectionEnd,node:cf,pRange:true};return {isCollapsed:(sel.end<=sel.start),mark:sel};}}bm={isCollapsed:true};if(sel.rangeCount){bm.mark=sel.getRangeAt(0).cloneRange();}}else{rg=sel.getRangeAt(0);bm={isCollapsed:false,mark:rg.cloneRange()};}}}else{if(sel){tg=cf?cf.tagName:"";tg=tg.toLowerCase();if(cf&&tg&&(tg=="button"||tg=="textarea"||tg=="input")){if(sel.type&&sel.type.toLowerCase()=="none"){return {isCollapsed:true,mark:null};}else{rg=sel.createRange();return {isCollapsed:rg.text&&rg.text.length?false:true,mark:{range:rg,pRange:true}};}}bm={};try{rg=sel.createRange();bm.isCollapsed=!(sel.type=="Text"?rg.htmlText.length:rg.length);}catch(e){bm.isCollapsed=true;return bm;}if(sel.type.toUpperCase()=="CONTROL"){if(rg.length){bm.mark=[];var i=0,len=rg.length;while(i<len){bm.mark.push(rg.item(i++));}}else{bm.isCollapsed=true;bm.mark=null;}}else{bm.mark=rg.getBookmark();}}else{console.warn("No idea how to store the current selection for this browser!");}}return bm;},moveToBookmark:function(_41e){var _41f=dojo.doc,mark=_41e.mark;if(mark){if(dojo.global.getSelection){var sel=dojo.global.getSelection();if(sel&&sel.removeAllRanges){if(mark.pRange){var r=mark;var n=r.node;n.selectionStart=r.start;n.selectionEnd=r.end;}else{sel.removeAllRanges();sel.addRange(mark);}}else{console.warn("No idea how to restore selection for this browser!");}}else{if(_41f.selection&&mark){var rg;if(mark.pRange){rg=mark.range;}else{if(dojo.isArray(mark)){rg=_41f.body.createControlRange();dojo.forEach(mark,function(n){rg.addElement(n);});}else{rg=_41f.body.createTextRange();rg.moveToBookmark(mark);}}rg.select();}}}},getFocus:function(menu,_420){var node=!dijit._curFocus||(menu&&dojo.isDescendant(dijit._curFocus,menu.domNode))?dijit._prevFocus:dijit._curFocus;return {node:node,bookmark:(node==dijit._curFocus)&&dojo.withGlobal(_420||dojo.global,dijit.getBookmark),openedForWindow:_420};},focus:function(_421){if(!_421){return;}var node="node" in _421?_421.node:_421,_422=_421.bookmark,_423=_421.openedForWindow,_424=_422?_422.isCollapsed:false;if(node){var _425=(node.tagName.toLowerCase()=="iframe")?node.contentWindow:node;if(_425&&_425.focus){try{_425.focus();}catch(e){}}dijit._onFocusNode(node);}if(_422&&dojo.withGlobal(_423||dojo.global,dijit.isCollapsed)&&!_424){if(_423){_423.focus();}try{dojo.withGlobal(_423||dojo.global,dijit.moveToBookmark,null,[_422]);}catch(e2){}}},_activeStack:[],registerIframe:function(_426){return dijit.registerWin(_426.contentWindow,_426);},unregisterIframe:function(_427){dijit.unregisterWin(_427);},registerWin:function(_428,_429){var _42a=function(evt){dijit._justMouseDowned=true;setTimeout(function(){dijit._justMouseDowned=false;},0);if(dojo.isIE&&evt&&evt.srcElement&&evt.srcElement.parentNode==null){return;}dijit._onTouchNode(_429||evt.target||evt.srcElement,"mouse");};var doc=dojo.isIE?_428.document.documentElement:_428.document;if(doc){if(dojo.isIE){_428.document.body.attachEvent("onmousedown",_42a);var _42b=function(evt){if(evt.srcElement.tagName.toLowerCase()!="#document"&&dijit.isTabNavigable(evt.srcElement)){dijit._onFocusNode(_429||evt.srcElement);}else{dijit._onTouchNode(_429||evt.srcElement);}};doc.attachEvent("onactivate",_42b);var _42c=function(evt){dijit._onBlurNode(_429||evt.srcElement);};doc.attachEvent("ondeactivate",_42c);return function(){_428.document.detachEvent("onmousedown",_42a);doc.detachEvent("onactivate",_42b);doc.detachEvent("ondeactivate",_42c);doc=null;};}else{doc.body.addEventListener("mousedown",_42a,true);var _42d=function(evt){dijit._onFocusNode(_429||evt.target);};doc.addEventListener("focus",_42d,true);var _42e=function(evt){dijit._onBlurNode(_429||evt.target);};doc.addEventListener("blur",_42e,true);return function(){doc.body.removeEventListener("mousedown",_42a,true);doc.removeEventListener("focus",_42d,true);doc.removeEventListener("blur",_42e,true);doc=null;};}}},unregisterWin:function(_42f){_42f&&_42f();},_onBlurNode:function(node){dijit._prevFocus=dijit._curFocus;dijit._curFocus=null;if(dijit._justMouseDowned){return;}if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer);}dijit._clearActiveWidgetsTimer=setTimeout(function(){delete dijit._clearActiveWidgetsTimer;dijit._setStack([]);dijit._prevFocus=null;},100);},_onTouchNode:function(node,by){if(dijit._clearActiveWidgetsTimer){clearTimeout(dijit._clearActiveWidgetsTimer);delete dijit._clearActiveWidgetsTimer;}var _430=[];try{while(node){var _431=dojo.attr(node,"dijitPopupParent");if(_431){node=dijit.byId(_431).domNode;}else{if(node.tagName&&node.tagName.toLowerCase()=="body"){if(node===dojo.body()){break;}node=dojo.window.get(node.ownerDocument).frameElement;}else{var id=node.getAttribute&&node.getAttribute("widgetId"),_432=id&&dijit.byId(id);if(_432&&!(by=="mouse"&&_432.get("disabled"))){_430.unshift(id);}node=node.parentNode;}}}}catch(e){}dijit._setStack(_430,by);},_onFocusNode:function(node){if(!node){return;}if(node.nodeType==9){return;}dijit._onTouchNode(node);if(node==dijit._curFocus){return;}if(dijit._curFocus){dijit._prevFocus=dijit._curFocus;}dijit._curFocus=node;dojo.publish("focusNode",[node]);},_setStack:function(_433,by){var _434=dijit._activeStack;dijit._activeStack=_433;for(var _435=0;_435<Math.min(_434.length,_433.length);_435++){if(_434[_435]!=_433[_435]){break;}}var _436;for(var i=_434.length-1;i>=_435;i--){_436=dijit.byId(_434[i]);if(_436){_436._focused=false;_436.set("focused",false);_436._hasBeenBlurred=true;if(_436._onBlur){_436._onBlur(by);}dojo.publish("widgetBlur",[_436,by]);}}for(i=_435;i<_433.length;i++){_436=dijit.byId(_433[i]);if(_436){_436._focused=true;_436.set("focused",true);if(_436._onFocus){_436._onFocus(by);}dojo.publish("widgetFocus",[_436,by]);}}}});dojo.addOnLoad(function(){var _437=dijit.registerWin(window);if(dojo.isIE){dojo.addOnWindowUnload(function(){dijit.unregisterWin(_437);_437=null;});}});}if(!dojo._hasResource["dojo.AdapterRegistry"]){dojo._hasResource["dojo.AdapterRegistry"]=true;dojo.provide("dojo.AdapterRegistry");dojo.AdapterRegistry=function(_438){this.pairs=[];this.returnWrappers=_438||false;};dojo.extend(dojo.AdapterRegistry,{register:function(name,_439,wrap,_43a,_43b){this.pairs[((_43b)?"unshift":"push")]([name,_439,wrap,_43a]);},match:function(){for(var i=0;i<this.pairs.length;i++){var pair=this.pairs[i];if(pair[1].apply(this,arguments)){if((pair[3])||(this.returnWrappers)){return pair[2];}else{return pair[2].apply(this,arguments);}}}throw new Error("No match found");},unregister:function(name){for(var i=0;i<this.pairs.length;i++){var pair=this.pairs[i];if(pair[0]==name){this.pairs.splice(i,1);return true;}}return false;}});}if(!dojo._hasResource["dijit._base.place"]){dojo._hasResource["dijit._base.place"]=true;dojo.provide("dijit._base.place");dijit.getViewport=function(){return dojo.window.getBox();};dijit.placeOnScreen=function(node,pos,_43c,_43d){var _43e=dojo.map(_43c,function(_43f){var c={corner:_43f,pos:{x:pos.x,y:pos.y}};if(_43d){c.pos.x+=_43f.charAt(1)=="L"?_43d.x:-_43d.x;c.pos.y+=_43f.charAt(0)=="T"?_43d.y:-_43d.y;}return c;});return dijit._place(node,_43e);};dijit._place=function(node,_440,_441,_442){var view=dojo.window.getBox();if(!node.parentNode||String(node.parentNode.tagName).toLowerCase()!="body"){dojo.body().appendChild(node);}var best=null;dojo.some(_440,function(_443){var _444=_443.corner;var pos=_443.pos;var _445=0;var _446={w:_444.charAt(1)=="L"?(view.l+view.w)-pos.x:pos.x-view.l,h:_444.charAt(1)=="T"?(view.t+view.h)-pos.y:pos.y-view.t};if(_441){var res=_441(node,_443.aroundCorner,_444,_446,_442);_445=typeof res=="undefined"?0:res;}var _447=node.style;var _448=_447.display;var _449=_447.visibility;_447.visibility="hidden";_447.display="";var mb=dojo.marginBox(node);_447.display=_448;_447.visibility=_449;var _44a=Math.max(view.l,_444.charAt(1)=="L"?pos.x:(pos.x-mb.w)),_44b=Math.max(view.t,_444.charAt(0)=="T"?pos.y:(pos.y-mb.h)),endX=Math.min(view.l+view.w,_444.charAt(1)=="L"?(_44a+mb.w):pos.x),endY=Math.min(view.t+view.h,_444.charAt(0)=="T"?(_44b+mb.h):pos.y),_44c=endX-_44a,_44d=endY-_44b;_445+=(mb.w-_44c)+(mb.h-_44d);if(best==null||_445<best.overflow){best={corner:_444,aroundCorner:_443.aroundCorner,x:_44a,y:_44b,w:_44c,h:_44d,overflow:_445,spaceAvailable:_446};}return !_445;});if(best.overflow&&_441){_441(node,best.aroundCorner,best.corner,best.spaceAvailable,_442);}var l=dojo._isBodyLtr(),s=node.style;s.top=best.y+"px";s[l?"left":"right"]=(l?best.x:view.w-best.x-best.w)+"px";return best;};dijit.placeOnScreenAroundNode=function(node,_44e,_44f,_450){_44e=dojo.byId(_44e);var _451=dojo.position(_44e,true);return dijit._placeOnScreenAroundRect(node,_451.x,_451.y,_451.w,_451.h,_44f,_450);};dijit.placeOnScreenAroundRectangle=function(node,_452,_453,_454){return dijit._placeOnScreenAroundRect(node,_452.x,_452.y,_452.width,_452.height,_453,_454);};dijit._placeOnScreenAroundRect=function(node,x,y,_455,_456,_457,_458){var _459=[];for(var _45a in _457){_459.push({aroundCorner:_45a,corner:_457[_45a],pos:{x:x+(_45a.charAt(1)=="L"?0:_455),y:y+(_45a.charAt(0)=="T"?0:_456)}});}return dijit._place(node,_459,_458,{w:_455,h:_456});};dijit.placementRegistry=new dojo.AdapterRegistry();dijit.placementRegistry.register("node",function(n,x){return typeof x=="object"&&typeof x.offsetWidth!="undefined"&&typeof x.offsetHeight!="undefined";},dijit.placeOnScreenAroundNode);dijit.placementRegistry.register("rect",function(n,x){return typeof x=="object"&&"x" in x&&"y" in x&&"width" in x&&"height" in x;},dijit.placeOnScreenAroundRectangle);dijit.placeOnScreenAroundElement=function(node,_45b,_45c,_45d){return dijit.placementRegistry.match.apply(dijit.placementRegistry,arguments);};dijit.getPopupAroundAlignment=function(_45e,_45f){var _460={};dojo.forEach(_45e,function(pos){switch(pos){case "after":_460[_45f?"BR":"BL"]=_45f?"BL":"BR";break;case "before":_460[_45f?"BL":"BR"]=_45f?"BR":"BL";break;case "below-alt":_45f=!_45f;case "below":_460[_45f?"BL":"BR"]=_45f?"TL":"TR";_460[_45f?"BR":"BL"]=_45f?"TR":"TL";break;case "above-alt":_45f=!_45f;case "above":default:_460[_45f?"TL":"TR"]=_45f?"BL":"BR";_460[_45f?"TR":"TL"]=_45f?"BR":"BL";break;}});return _460;};}if(!dojo._hasResource["dijit._base.window"]){dojo._hasResource["dijit._base.window"]=true;dojo.provide("dijit._base.window");dijit.getDocumentWindow=function(doc){return dojo.window.get(doc);};}if(!dojo._hasResource["dijit._base.popup"]){dojo._hasResource["dijit._base.popup"]=true;dojo.provide("dijit._base.popup");dijit.popup={_stack:[],_beginZIndex:1000,_idGen:1,_createWrapper:function(_461){var _462=_461.declaredClass?_461._popupWrapper:(_461.parentNode&&dojo.hasClass(_461.parentNode,"dijitPopup")),node=_461.domNode||_461;if(!_462){_462=dojo.create("div",{"class":"dijitPopup",style:{display:"none"},role:"presentation"},dojo.body());_462.appendChild(node);var s=node.style;s.display="";s.visibility="";s.position="";s.top="0px";if(_461.declaredClass){_461._popupWrapper=_462;dojo.connect(_461,"destroy",function(){dojo.destroy(_462);delete _461._popupWrapper;});}}return _462;},moveOffScreen:function(_463){var _464=this._createWrapper(_463);dojo.style(_464,{visibility:"hidden",top:"-9999px",display:""});},hide:function(_465){var _466=this._createWrapper(_465);dojo.style(_466,"display","none");},getTopPopup:function(){var _467=this._stack;for(var pi=_467.length-1;pi>0&&_467[pi].parent===_467[pi-1].widget;pi--){}return _467[pi];},open:function(args){var _468=this._stack,_469=args.popup,_46a=args.orient||((args.parent?args.parent.isLeftToRight():dojo._isBodyLtr())?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"}),_46b=args.around,id=(args.around&&args.around.id)?(args.around.id+"_dropdown"):("popup_"+this._idGen++);while(_468.length&&(!args.parent||!dojo.isDescendant(args.parent.domNode,_468[_468.length-1].widget.domNode))){dijit.popup.close(_468[_468.length-1].widget);}var _46c=this._createWrapper(_469);dojo.attr(_46c,{id:id,style:{zIndex:this._beginZIndex+_468.length},"class":"dijitPopup "+(_469.baseClass||_469["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:args.parent?args.parent.id:""});if(dojo.isIE||dojo.isMoz){if(!_469.bgIframe){_469.bgIframe=new dijit.BackgroundIframe(_46c);}}var best=_46b?dijit.placeOnScreenAroundElement(_46c,_46b,_46a,_469.orient?dojo.hitch(_469,"orient"):null):dijit.placeOnScreen(_46c,args,_46a=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],args.padding);_46c.style.display="";_46c.style.visibility="visible";_469.domNode.style.visibility="visible";var _46d=[];_46d.push(dojo.connect(_46c,"onkeypress",this,function(evt){if(evt.charOrCode==dojo.keys.ESCAPE&&args.onCancel){dojo.stopEvent(evt);args.onCancel();}else{if(evt.charOrCode===dojo.keys.TAB){dojo.stopEvent(evt);var _46e=this.getTopPopup();if(_46e&&_46e.onCancel){_46e.onCancel();}}}}));if(_469.onCancel){_46d.push(dojo.connect(_469,"onCancel",args.onCancel));}_46d.push(dojo.connect(_469,_469.onExecute?"onExecute":"onChange",this,function(){var _46f=this.getTopPopup();if(_46f&&_46f.onExecute){_46f.onExecute();}}));_468.push({widget:_469,parent:args.parent,onExecute:args.onExecute,onCancel:args.onCancel,onClose:args.onClose,handlers:_46d});if(_469.onOpen){_469.onOpen(best);}return best;},close:function(_470){var _471=this._stack;while((_470&&dojo.some(_471,function(elem){return elem.widget==_470;}))||(!_470&&_471.length)){var top=_471.pop(),_472=top.widget,_473=top.onClose;if(_472.onClose){_472.onClose();}dojo.forEach(top.handlers,dojo.disconnect);if(_472&&_472.domNode){this.hide(_472);}if(_473){_473();}}}};dijit._frames=new function(){var _474=[];this.pop=function(){var _475;if(_474.length){_475=_474.pop();_475.style.display="";}else{if(dojo.isIE<9){var burl=dojo.config["dojoBlankHtmlUrl"]||(dojo.moduleUrl("dojo","resources/blank.html")+"")||"javascript:\"\"";var html="<iframe src='"+burl+"'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";_475=dojo.doc.createElement(html);}else{_475=dojo.create("iframe");_475.src="javascript:\"\"";_475.className="dijitBackgroundIframe";dojo.style(_475,"opacity",0.1);}_475.tabIndex=-1;dijit.setWaiRole(_475,"presentation");}return _475;};this.push=function(_476){_476.style.display="none";_474.push(_476);};}();dijit.BackgroundIframe=function(node){if(!node.id){throw new Error("no id");}if(dojo.isIE||dojo.isMoz){var _477=(this.iframe=dijit._frames.pop());node.appendChild(_477);if(dojo.isIE<7||dojo.isQuirks){this.resize(node);this._conn=dojo.connect(node,"onresize",this,function(){this.resize(node);});}else{dojo.style(_477,{width:"100%",height:"100%"});}}};dojo.extend(dijit.BackgroundIframe,{resize:function(node){if(this.iframe){dojo.style(this.iframe,{width:node.offsetWidth+"px",height:node.offsetHeight+"px"});}},destroy:function(){if(this._conn){dojo.disconnect(this._conn);this._conn=null;}if(this.iframe){dijit._frames.push(this.iframe);delete this.iframe;}}});}if(!dojo._hasResource["dijit._base.scroll"]){dojo._hasResource["dijit._base.scroll"]=true;dojo.provide("dijit._base.scroll");dijit.scrollIntoView=function(node,pos){dojo.window.scrollIntoView(node,pos);};}if(!dojo._hasResource["dojo.uacss"]){dojo._hasResource["dojo.uacss"]=true;dojo.provide("dojo.uacss");(function(){var d=dojo,html=d.doc.documentElement,ie=d.isIE,_478=d.isOpera,maj=Math.floor,ff=d.isFF,_479=d.boxModel.replace(/-/,""),_47a={dj_ie:ie,dj_ie6:maj(ie)==6,dj_ie7:maj(ie)==7,dj_ie8:maj(ie)==8,dj_ie9:maj(ie)==9,dj_quirks:d.isQuirks,dj_iequirks:ie&&d.isQuirks,dj_opera:_478,dj_khtml:d.isKhtml,dj_webkit:d.isWebKit,dj_safari:d.isSafari,dj_chrome:d.isChrome,dj_gecko:d.isMozilla,dj_ff3:maj(ff)==3};_47a["dj_"+_479]=true;var _47b="";for(var clz in _47a){if(_47a[clz]){_47b+=clz+" ";}}html.className=d.trim(html.className+" "+_47b);dojo._loaders.unshift(function(){if(!dojo._isBodyLtr()){var _47c="dj_rtl dijitRtl "+_47b.replace(/ /g,"-rtl ");html.className=d.trim(html.className+" "+_47c);}});})();}if(!dojo._hasResource["dijit._base.sniff"]){dojo._hasResource["dijit._base.sniff"]=true;dojo.provide("dijit._base.sniff");}if(!dojo._hasResource["dijit._base.typematic"]){dojo._hasResource["dijit._base.typematic"]=true;dojo.provide("dijit._base.typematic");dijit.typematic={_fireEventAndReload:function(){this._timer=null;this._callback(++this._count,this._node,this._evt);this._currentTimeout=Math.max(this._currentTimeout<0?this._initialDelay:(this._subsequentDelay>1?this._subsequentDelay:Math.round(this._currentTimeout*this._subsequentDelay)),this._minDelay);this._timer=setTimeout(dojo.hitch(this,"_fireEventAndReload"),this._currentTimeout);},trigger:function(evt,_47d,node,_47e,obj,_47f,_480,_481){if(obj!=this._obj){this.stop();this._initialDelay=_480||500;this._subsequentDelay=_47f||0.9;this._minDelay=_481||10;this._obj=obj;this._evt=evt;this._node=node;this._currentTimeout=-1;this._count=-1;this._callback=dojo.hitch(_47d,_47e);this._fireEventAndReload();this._evt=dojo.mixin({faux:true},evt);}},stop:function(){if(this._timer){clearTimeout(this._timer);this._timer=null;}if(this._obj){this._callback(-1,this._node,this._evt);this._obj=null;}},addKeyListener:function(node,_482,_483,_484,_485,_486,_487){if(_482.keyCode){_482.charOrCode=_482.keyCode;dojo.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}else{if(_482.charCode){_482.charOrCode=String.fromCharCode(_482.charCode);dojo.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}}return [dojo.connect(node,"onkeypress",this,function(evt){if(evt.charOrCode==_482.charOrCode&&(_482.ctrlKey===undefined||_482.ctrlKey==evt.ctrlKey)&&(_482.altKey===undefined||_482.altKey==evt.altKey)&&(_482.metaKey===undefined||_482.metaKey==(evt.metaKey||false))&&(_482.shiftKey===undefined||_482.shiftKey==evt.shiftKey)){dojo.stopEvent(evt);dijit.typematic.trigger(evt,_483,node,_484,_482,_485,_486,_487);}else{if(dijit.typematic._obj==_482){dijit.typematic.stop();}}}),dojo.connect(node,"onkeyup",this,function(evt){if(dijit.typematic._obj==_482){dijit.typematic.stop();}})];},addMouseListener:function(node,_488,_489,_48a,_48b,_48c){var dc=dojo.connect;return [dc(node,"mousedown",this,function(evt){dojo.stopEvent(evt);dijit.typematic.trigger(evt,_488,node,_489,node,_48a,_48b,_48c);}),dc(node,"mouseup",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(node,"mouseout",this,function(evt){dojo.stopEvent(evt);dijit.typematic.stop();}),dc(node,"mousemove",this,function(evt){evt.preventDefault();}),dc(node,"dblclick",this,function(evt){dojo.stopEvent(evt);if(dojo.isIE){dijit.typematic.trigger(evt,_488,node,_489,node,_48a,_48b,_48c);setTimeout(dojo.hitch(this,dijit.typematic.stop),50);}})];},addListener:function(_48d,_48e,_48f,_490,_491,_492,_493,_494){return this.addKeyListener(_48e,_48f,_490,_491,_492,_493,_494).concat(this.addMouseListener(_48d,_490,_491,_492,_493,_494));}};}if(!dojo._hasResource["dijit._base.wai"]){dojo._hasResource["dijit._base.wai"]=true;dojo.provide("dijit._base.wai");dijit.wai={onload:function(){var div=dojo.create("div",{id:"a11yTestNode",style:{cssText:"border: 1px solid;"+"border-color:red green;"+"position: absolute;"+"height: 5px;"+"top: -999px;"+"background-image: url(\""+(dojo.config.blankGif||dojo.moduleUrl("dojo","resources/blank.gif"))+"\");"}},dojo.body());var cs=dojo.getComputedStyle(div);if(cs){var _495=cs.backgroundImage;var _496=(cs.borderTopColor==cs.borderRightColor)||(_495!=null&&(_495=="none"||_495=="url(invalid-url:)"));dojo[_496?"addClass":"removeClass"](dojo.body(),"dijit_a11y");if(dojo.isIE){div.outerHTML="";}else{dojo.body().removeChild(div);}}}};if(dojo.isIE||dojo.isMoz){dojo._loaders.unshift(dijit.wai.onload);}dojo.mixin(dijit,{hasWaiRole:function(elem,role){var _497=this.getWaiRole(elem);return role?(_497.indexOf(role)>-1):(_497.length>0);},getWaiRole:function(elem){return dojo.trim((dojo.attr(elem,"role")||"").replace("wairole:",""));},setWaiRole:function(elem,role){dojo.attr(elem,"role",role);},removeWaiRole:function(elem,role){var _498=dojo.attr(elem,"role");if(!_498){return;}if(role){var t=dojo.trim((" "+_498+" ").replace(" "+role+" "," "));dojo.attr(elem,"role",t);}else{elem.removeAttribute("role");}},hasWaiState:function(elem,_499){return elem.hasAttribute?elem.hasAttribute("aria-"+_499):!!elem.getAttribute("aria-"+_499);},getWaiState:function(elem,_49a){return elem.getAttribute("aria-"+_49a)||"";},setWaiState:function(elem,_49b,_49c){elem.setAttribute("aria-"+_49b,_49c);},removeWaiState:function(elem,_49d){elem.removeAttribute("aria-"+_49d);}});}if(!dojo._hasResource["dijit._base"]){dojo._hasResource["dijit._base"]=true;dojo.provide("dijit._base");}if(!dojo._hasResource["dijit._Widget"]){dojo._hasResource["dijit._Widget"]=true;dojo.provide("dijit._Widget");dojo.connect(dojo,"_connect",function(_49e,_49f){if(_49e&&dojo.isFunction(_49e._onConnect)){_49e._onConnect(_49f);}});dijit._connectOnUseEventHandler=function(_4a0){};dijit._lastKeyDownNode=null;if(dojo.isIE){(function(){var _4a1=function(evt){dijit._lastKeyDownNode=evt.srcElement;};dojo.doc.attachEvent("onkeydown",_4a1);dojo.addOnWindowUnload(function(){dojo.doc.detachEvent("onkeydown",_4a1);});})();}else{dojo.doc.addEventListener("keydown",function(evt){dijit._lastKeyDownNode=evt.target;},true);}(function(){dojo.declare("dijit._Widget",dijit._WidgetBase,{_deferredConnects:{onClick:"",onDblClick:"",onKeyDown:"",onKeyPress:"",onKeyUp:"",onMouseMove:"",onMouseDown:"",onMouseOut:"",onMouseOver:"",onMouseLeave:"",onMouseEnter:"",onMouseUp:""},onClick:dijit._connectOnUseEventHandler,onDblClick:dijit._connectOnUseEventHandler,onKeyDown:dijit._connectOnUseEventHandler,onKeyPress:dijit._connectOnUseEventHandler,onKeyUp:dijit._connectOnUseEventHandler,onMouseDown:dijit._connectOnUseEventHandler,onMouseMove:dijit._connectOnUseEventHandler,onMouseOut:dijit._connectOnUseEventHandler,onMouseOver:dijit._connectOnUseEventHandler,onMouseLeave:dijit._connectOnUseEventHandler,onMouseEnter:dijit._connectOnUseEventHandler,onMouseUp:dijit._connectOnUseEventHandler,create:function(_4a2,_4a3){this._deferredConnects=dojo.clone(this._deferredConnects);for(var attr in this.attributeMap){delete this._deferredConnects[attr];}for(attr in this._deferredConnects){if(this[attr]!==dijit._connectOnUseEventHandler){delete this._deferredConnects[attr];}}this.inherited(arguments);if(this.domNode){for(attr in this.params){this._onConnect(attr);}}},_onConnect:function(_4a4){if(_4a4 in this._deferredConnects){var _4a5=this[this._deferredConnects[_4a4]||"domNode"];this.connect(_4a5,_4a4.toLowerCase(),_4a4);delete this._deferredConnects[_4a4];}},focused:false,isFocusable:function(){return this.focus&&(dojo.style(this.domNode,"display")!="none");},onFocus:function(){},onBlur:function(){},_onFocus:function(e){this.onFocus();},_onBlur:function(){this.onBlur();},setAttribute:function(attr,_4a6){dojo.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");this.set(attr,_4a6);},attr:function(name,_4a7){if(dojo.config.isDebug){var _4a8=arguments.callee._ach||(arguments.callee._ach={}),_4a9=(arguments.callee.caller||"unknown caller").toString();if(!_4a8[_4a9]){dojo.deprecated(this.declaredClass+"::attr() is deprecated. Use get() or set() instead, called from "+_4a9,"","2.0");_4a8[_4a9]=true;}}var args=arguments.length;if(args>=2||typeof name==="object"){return this.set.apply(this,arguments);}else{return this.get(name);}},nodesWithKeyClick:["input","button"],connect:function(obj,_4aa,_4ab){var d=dojo,dc=d._connect,_4ac=this.inherited(arguments,[obj,_4aa=="ondijitclick"?"onclick":_4aa,_4ab]);if(_4aa=="ondijitclick"){if(d.indexOf(this.nodesWithKeyClick,obj.nodeName.toLowerCase())==-1){var m=d.hitch(this,_4ab);_4ac.push(dc(obj,"onkeydown",this,function(e){if((e.keyCode==d.keys.ENTER||e.keyCode==d.keys.SPACE)&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){dijit._lastKeyDownNode=e.target;if(!("openDropDown" in this&&obj==this._buttonNode)){e.preventDefault();}}}),dc(obj,"onkeyup",this,function(e){if((e.keyCode==d.keys.ENTER||e.keyCode==d.keys.SPACE)&&e.target==dijit._lastKeyDownNode&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){dijit._lastKeyDownNode=null;return m(e);}}));}}return _4ac;},_onShow:function(){this.onShow();},onShow:function(){},onHide:function(){},onClose:function(){return true;}});})();}if(!dojo._hasResource["dojo.date.stamp"]){dojo._hasResource["dojo.date.stamp"]=true;dojo.provide("dojo.date.stamp");dojo.getObject("date.stamp",true,dojo);dojo.date.stamp.fromISOString=function(_4ad,_4ae){if(!dojo.date.stamp._isoRegExp){dojo.date.stamp._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;}var _4af=dojo.date.stamp._isoRegExp.exec(_4ad),_4b0=null;if(_4af){_4af.shift();if(_4af[1]){_4af[1]--;}if(_4af[6]){_4af[6]*=1000;}if(_4ae){_4ae=new Date(_4ae);dojo.forEach(dojo.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(prop){return _4ae["get"+prop]();}),function(_4b1,_4b2){_4af[_4b2]=_4af[_4b2]||_4b1;});}_4b0=new Date(_4af[0]||1970,_4af[1]||0,_4af[2]||1,_4af[3]||0,_4af[4]||0,_4af[5]||0,_4af[6]||0);if(_4af[0]<100){_4b0.setFullYear(_4af[0]||1970);}var _4b3=0,_4b4=_4af[7]&&_4af[7].charAt(0);if(_4b4!="Z"){_4b3=((_4af[8]||0)*60)+(Number(_4af[9])||0);if(_4b4!="-"){_4b3*=-1;}}if(_4b4){_4b3-=_4b0.getTimezoneOffset();}if(_4b3){_4b0.setTime(_4b0.getTime()+_4b3*60000);}}return _4b0;};dojo.date.stamp.toISOString=function(_4b5,_4b6){var _4b7=function(n){return (n<10)?"0"+n:n;};_4b6=_4b6||{};var _4b8=[],_4b9=_4b6.zulu?"getUTC":"get",date="";if(_4b6.selector!="time"){var year=_4b5[_4b9+"FullYear"]();date=["0000".substr((year+"").length)+year,_4b7(_4b5[_4b9+"Month"]()+1),_4b7(_4b5[_4b9+"Date"]())].join("-");}_4b8.push(date);if(_4b6.selector!="date"){var time=[_4b7(_4b5[_4b9+"Hours"]()),_4b7(_4b5[_4b9+"Minutes"]()),_4b7(_4b5[_4b9+"Seconds"]())].join(":");var _4ba=_4b5[_4b9+"Milliseconds"]();if(_4b6.milliseconds){time+="."+(_4ba<100?"0":"")+_4b7(_4ba);}if(_4b6.zulu){time+="Z";}else{if(_4b6.selector!="time"){var _4bb=_4b5.getTimezoneOffset();var _4bc=Math.abs(_4bb);time+=(_4bb>0?"-":"+")+_4b7(Math.floor(_4bc/60))+":"+_4b7(_4bc%60);}}_4b8.push(time);}return _4b8.join("T");};}if(!dojo._hasResource["dojo.parser"]){dojo._hasResource["dojo.parser"]=true;dojo.provide("dojo.parser");new Date("X");dojo.parser=new function(){var d=dojo;function _4bd(_4be){if(d.isString(_4be)){return "string";}if(typeof _4be=="number"){return "number";}if(typeof _4be=="boolean"){return "boolean";}if(d.isFunction(_4be)){return "function";}if(d.isArray(_4be)){return "array";}if(_4be instanceof Date){return "date";}if(_4be instanceof d._Url){return "url";}return "object";};function _4bf(_4c0,type){switch(type){case "string":return _4c0;case "number":return _4c0.length?Number(_4c0):NaN;case "boolean":return typeof _4c0=="boolean"?_4c0:!(_4c0.toLowerCase()=="false");case "function":if(d.isFunction(_4c0)){_4c0=_4c0.toString();_4c0=d.trim(_4c0.substring(_4c0.indexOf("{")+1,_4c0.length-1));}try{if(_4c0===""||_4c0.search(/[^\w\.]+/i)!=-1){return new Function(_4c0);}else{return d.getObject(_4c0,false)||new Function(_4c0);}}catch(e){return new Function();}case "array":return _4c0?_4c0.split(/\s*,\s*/):[];case "date":switch(_4c0){case "":return new Date("");case "now":return new Date();default:return d.date.stamp.fromISOString(_4c0);}case "url":return d.baseUrl+_4c0;default:return d.fromJson(_4c0);}};var _4c1={},_4c2={};d.connect(d,"extend",function(){_4c2={};});function _4c3(cls,_4c4){for(var name in cls){if(name.charAt(0)=="_"){continue;}if(name in _4c1){continue;}_4c4[name]=_4bd(cls[name]);}return _4c4;};function _4c5(_4c6,_4c7){var c=_4c2[_4c6];if(!c){var cls=d.getObject(_4c6),_4c8=null;if(!cls){return null;}if(!_4c7){_4c8=_4c3(cls.prototype,{});}c={cls:cls,params:_4c8};}else{if(!_4c7&&!c.params){c.params=_4c3(c.cls.prototype,{});}}return c;};this._functionFromScript=function(_4c9,_4ca){var _4cb="";var _4cc="";var _4cd=(_4c9.getAttribute(_4ca+"args")||_4c9.getAttribute("args"));if(_4cd){d.forEach(_4cd.split(/\s*,\s*/),function(part,idx){_4cb+="var "+part+" = arguments["+idx+"]; ";});}var _4ce=_4c9.getAttribute("with");if(_4ce&&_4ce.length){d.forEach(_4ce.split(/\s*,\s*/),function(part){_4cb+="with("+part+"){";_4cc+="}";});}return new Function(_4cb+_4c9.innerHTML+_4cc);};this.instantiate=function(_4cf,_4d0,args){var _4d1=[],_4d0=_4d0||{};args=args||{};var _4d2=(args.scope||d._scopeName)+"Type",_4d3="data-"+(args.scope||d._scopeName)+"-";d.forEach(_4cf,function(obj){if(!obj){return;}var node,type,_4d4,_4d5,_4d6,_4d7;if(obj.node){node=obj.node;type=obj.type;_4d7=obj.fastpath;_4d4=obj.clsInfo||(type&&_4c5(type,_4d7));_4d5=_4d4&&_4d4.cls;_4d6=obj.scripts;}else{node=obj;type=_4d2 in _4d0?_4d0[_4d2]:node.getAttribute(_4d2);_4d4=type&&_4c5(type);_4d5=_4d4&&_4d4.cls;_4d6=(_4d5&&(_4d5._noScript||_4d5.prototype._noScript)?[]:d.query("> script[type^='dojo/']",node));}if(!_4d4){throw new Error("Could not load class '"+type);}var _4d8={};if(args.defaults){d._mixin(_4d8,args.defaults);}if(obj.inherited){d._mixin(_4d8,obj.inherited);}if(_4d7){var _4d9=node.getAttribute(_4d3+"props");if(_4d9&&_4d9.length){try{_4d9=d.fromJson.call(args.propsThis,"{"+_4d9+"}");d._mixin(_4d8,_4d9);}catch(e){throw new Error(e.toString()+" in data-dojo-props='"+_4d9+"'");}}var _4da=node.getAttribute(_4d3+"attach-point");if(_4da){_4d8.dojoAttachPoint=_4da;}var _4db=node.getAttribute(_4d3+"attach-event");if(_4db){_4d8.dojoAttachEvent=_4db;}dojo.mixin(_4d8,_4d0);}else{var _4dc=node.attributes;for(var name in _4d4.params){var item=name in _4d0?{value:_4d0[name],specified:true}:_4dc.getNamedItem(name);if(!item||(!item.specified&&(!dojo.isIE||name.toLowerCase()!="value"))){continue;}var _4dd=item.value;switch(name){case "class":_4dd="className" in _4d0?_4d0.className:node.className;break;case "style":_4dd="style" in _4d0?_4d0.style:(node.style&&node.style.cssText);}var _4de=_4d4.params[name];if(typeof _4dd=="string"){_4d8[name]=_4bf(_4dd,_4de);}else{_4d8[name]=_4dd;}}}var _4df=[],_4e0=[];d.forEach(_4d6,function(_4e1){node.removeChild(_4e1);var _4e2=(_4e1.getAttribute(_4d3+"event")||_4e1.getAttribute("event")),type=_4e1.getAttribute("type"),nf=d.parser._functionFromScript(_4e1,_4d3);if(_4e2){if(type=="dojo/connect"){_4df.push({event:_4e2,func:nf});}else{_4d8[_4e2]=nf;}}else{_4e0.push(nf);}});var _4e3=_4d5.markupFactory||_4d5.prototype&&_4d5.prototype.markupFactory;var _4e4=_4e3?_4e3(_4d8,node,_4d5):new _4d5(_4d8,node);_4d1.push(_4e4);var _4e5=(node.getAttribute(_4d3+"id")||node.getAttribute("jsId"));if(_4e5){d.setObject(_4e5,_4e4);}d.forEach(_4df,function(_4e6){d.connect(_4e4,_4e6.event,null,_4e6.func);});d.forEach(_4e0,function(func){func.call(_4e4);});});if(!_4d0._started){d.forEach(_4d1,function(_4e7){if(!args.noStart&&_4e7&&dojo.isFunction(_4e7.startup)&&!_4e7._started&&(!_4e7.getParent||!_4e7.getParent())){_4e7.startup();}});}return _4d1;};this.parse=function(_4e8,args){var root;if(!args&&_4e8&&_4e8.rootNode){args=_4e8;root=args.rootNode;}else{root=_4e8;}root=root?dojo.byId(root):dojo.body();args=args||{};var _4e9=(args.scope||d._scopeName)+"Type",_4ea="data-"+(args.scope||d._scopeName)+"-";function scan(_4eb,list){var _4ec=dojo.clone(_4eb.inherited);dojo.forEach(["dir","lang"],function(name){var val=_4eb.node.getAttribute(name);if(val){_4ec[name]=val;}});var _4ed=_4eb.clsInfo&&!_4eb.clsInfo.cls.prototype._noScript?_4eb.scripts:null;var _4ee=(!_4eb.clsInfo||!_4eb.clsInfo.cls.prototype.stopParser)||(args&&args.template);for(var _4ef=_4eb.node.firstChild;_4ef;_4ef=_4ef.nextSibling){if(_4ef.nodeType==1){var type,_4f0=_4ee&&_4ef.getAttribute(_4ea+"type");if(_4f0){type=_4f0;}else{type=_4ee&&_4ef.getAttribute(_4e9);}var _4f1=_4f0==type;if(type){var _4f2={"type":type,fastpath:_4f1,clsInfo:_4c5(type,_4f1),node:_4ef,scripts:[],inherited:_4ec};list.push(_4f2);scan(_4f2,list);}else{if(_4ed&&_4ef.nodeName.toLowerCase()=="script"){type=_4ef.getAttribute("type");if(type&&/^dojo\/\w/i.test(type)){_4ed.push(_4ef);}}else{if(_4ee){scan({node:_4ef,inherited:_4ec},list);}}}}}};var _4f3={};if(args&&args.inherited){for(var key in args.inherited){if(args.inherited[key]){_4f3[key]=args.inherited[key];}}}var list=[];scan({node:root,inherited:_4f3},list);var _4f4=args&&args.template?{template:true}:null;return this.instantiate(list,_4f4,args);};}();(function(){var _4f5=function(){if(dojo.config.parseOnLoad){dojo.parser.parse();}};if(dojo.getObject("dijit.wai.onload")===dojo._loaders[0]){dojo._loaders.splice(1,0,_4f5);}else{dojo._loaders.unshift(_4f5);}})();}if(!dojo._hasResource["dojo.cache"]){dojo._hasResource["dojo.cache"]=true;dojo.provide("dojo.cache");var cache={};dojo.cache=function(_4f6,url,_4f7){if(typeof _4f6=="string"){var _4f8=dojo.moduleUrl(_4f6,url);}else{_4f8=_4f6;_4f7=url;}var key=_4f8.toString();var val=_4f7;if(_4f7!=undefined&&!dojo.isString(_4f7)){val=("value" in _4f7?_4f7.value:undefined);}var _4f9=_4f7&&_4f7.sanitize?true:false;if(typeof val=="string"){val=cache[key]=_4f9?dojo.cache._sanitize(val):val;}else{if(val===null){delete cache[key];}else{if(!(key in cache)){val=dojo._getText(key);cache[key]=_4f9?dojo.cache._sanitize(val):val;}val=cache[key];}}return val;};dojo.cache._sanitize=function(val){if(val){val=val.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var _4fa=val.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_4fa){val=_4fa[1];}}else{val="";}return val;};}if(!dojo._hasResource["dijit._Templated"]){dojo._hasResource["dijit._Templated"]=true;dojo.provide("dijit._Templated");dojo.declare("dijit._Templated",null,{templateString:null,templatePath:null,widgetsInTemplate:false,_skipNodeCache:false,_earlyTemplatedStartup:false,constructor:function(){this._attachPoints=[];this._attachEvents=[];},_stringRepl:function(tmpl){var _4fb=this.declaredClass,_4fc=this;return dojo.string.substitute(tmpl,this,function(_4fd,key){if(key.charAt(0)=="!"){_4fd=dojo.getObject(key.substr(1),false,_4fc);}if(typeof _4fd=="undefined"){throw new Error(_4fb+" template:"+key);}if(_4fd==null){return "";}return key.charAt(0)=="!"?_4fd:_4fd.toString().replace(/"/g,"&quot;");},this);},buildRendering:function(){var _4fe=dijit._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);var node;if(dojo.isString(_4fe)){node=dojo._toDom(this._stringRepl(_4fe));if(node.nodeType!=1){throw new Error("Invalid template: "+_4fe);}}else{node=_4fe.cloneNode(true);}this.domNode=node;this.inherited(arguments);this._attachTemplateNodes(node);if(this.widgetsInTemplate){var cw=(this._startupWidgets=dojo.parser.parse(node,{noStart:!this._earlyTemplatedStartup,template:true,inherited:{dir:this.dir,lang:this.lang},propsThis:this,scope:"dojo"}));this._supportingWidgets=dijit.findWidgets(node);this._attachTemplateNodes(cw,function(n,p){return n[p];});}this._fillContent(this.srcNodeRef);},_fillContent:function(_4ff){var dest=this.containerNode;if(_4ff&&dest){while(_4ff.hasChildNodes()){dest.appendChild(_4ff.firstChild);}}},_attachTemplateNodes:function(_500,_501){_501=_501||function(n,p){return n.getAttribute(p);};var _502=dojo.isArray(_500)?_500:(_500.all||_500.getElementsByTagName("*"));var x=dojo.isArray(_500)?0:-1;for(;x<_502.length;x++){var _503=(x==-1)?_500:_502[x];if(this.widgetsInTemplate&&(_501(_503,"dojoType")||_501(_503,"data-dojo-type"))){continue;}var _504=_501(_503,"dojoAttachPoint")||_501(_503,"data-dojo-attach-point");if(_504){var _505,_506=_504.split(/\s*,\s*/);while((_505=_506.shift())){if(dojo.isArray(this[_505])){this[_505].push(_503);}else{this[_505]=_503;}this._attachPoints.push(_505);}}var _507=_501(_503,"dojoAttachEvent")||_501(_503,"data-dojo-attach-event");if(_507){var _508,_509=_507.split(/\s*,\s*/);var trim=dojo.trim;while((_508=_509.shift())){if(_508){var _50a=null;if(_508.indexOf(":")!=-1){var _50b=_508.split(":");_508=trim(_50b[0]);_50a=trim(_50b[1]);}else{_508=trim(_508);}if(!_50a){_50a=_508;}this._attachEvents.push(this.connect(_503,_508,_50a));}}}var role=_501(_503,"waiRole");if(role){dijit.setWaiRole(_503,role);}var _50c=_501(_503,"waiState");if(_50c){dojo.forEach(_50c.split(/\s*,\s*/),function(_50d){if(_50d.indexOf("-")!=-1){var pair=_50d.split("-");dijit.setWaiState(_503,pair[0],pair[1]);}});}}},startup:function(){dojo.forEach(this._startupWidgets,function(w){if(w&&!w._started&&w.startup){w.startup();}});this.inherited(arguments);},destroyRendering:function(){dojo.forEach(this._attachPoints,function(_50e){delete this[_50e];},this);this._attachPoints=[];dojo.forEach(this._attachEvents,this.disconnect,this);this._attachEvents=[];this.inherited(arguments);}});dijit._Templated._templateCache={};dijit._Templated.getCachedTemplate=function(_50f,_510,_511){var _512=dijit._Templated._templateCache;var key=_510||_50f;var _513=_512[key];if(_513){try{if(!_513.ownerDocument||_513.ownerDocument==dojo.doc){return _513;}}catch(e){}dojo.destroy(_513);}if(!_510){_510=dojo.cache(_50f,{sanitize:true});}_510=dojo.string.trim(_510);if(_511||_510.match(/\$\{([^\}]+)\}/g)){return (_512[key]=_510);}else{var node=dojo._toDom(_510);if(node.nodeType!=1){throw new Error("Invalid template: "+_510);}return (_512[key]=node);}};if(dojo.isIE){dojo.addOnWindowUnload(function(){var _514=dijit._Templated._templateCache;for(var key in _514){var _515=_514[key];if(typeof _515=="object"){dojo.destroy(_515);}delete _514[key];}});}dojo.extend(dijit._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});}if(!dojo._hasResource["dojo.number"]){dojo._hasResource["dojo.number"]=true;dojo.provide("dojo.number");dojo.getObject("number",true,dojo);dojo.number.format=function(_516,_517){_517=dojo.mixin({},_517||{});var _518=dojo.i18n.normalizeLocale(_517.locale),_519=dojo.i18n.getLocalization("dojo.cldr","number",_518);_517.customs=_519;var _51a=_517.pattern||_519[(_517.type||"decimal")+"Format"];if(isNaN(_516)||Math.abs(_516)==Infinity){return null;}return dojo.number._applyPattern(_516,_51a,_517);};dojo.number._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;dojo.number._applyPattern=function(_51b,_51c,_51d){_51d=_51d||{};var _51e=_51d.customs.group,_51f=_51d.customs.decimal,_520=_51c.split(";"),_521=_520[0];_51c=_520[(_51b<0)?1:0]||("-"+_521);if(_51c.indexOf("%")!=-1){_51b*=100;}else{if(_51c.indexOf("‰")!=-1){_51b*=1000;}else{if(_51c.indexOf("¤")!=-1){_51e=_51d.customs.currencyGroup||_51e;_51f=_51d.customs.currencyDecimal||_51f;_51c=_51c.replace(/\u00a4{1,3}/,function(_522){var prop=["symbol","currency","displayName"][_522.length-1];return _51d[prop]||_51d.currency||"";});}else{if(_51c.indexOf("E")!=-1){throw new Error("exponential notation not supported");}}}}var _523=dojo.number._numberPatternRE;var _524=_521.match(_523);if(!_524){throw new Error("unable to find a number expression in pattern: "+_51c);}if(_51d.fractional===false){_51d.places=0;}return _51c.replace(_523,dojo.number._formatAbsolute(_51b,_524[0],{decimal:_51f,group:_51e,places:_51d.places,round:_51d.round}));};dojo.number.round=function(_525,_526,_527){var _528=10/(_527||10);return (_528*+_525).toFixed(_526)/_528;};if((0.9).toFixed()==0){(function(){var _529=dojo.number.round;dojo.number.round=function(v,p,m){var d=Math.pow(10,-p||0),a=Math.abs(v);if(!v||a>=d||a*Math.pow(10,p+1)<5){d=0;}return _529(v,p,m)+(v>0?d:-d);};})();}dojo.number._formatAbsolute=function(_52a,_52b,_52c){_52c=_52c||{};if(_52c.places===true){_52c.places=0;}if(_52c.places===Infinity){_52c.places=6;}var _52d=_52b.split("."),_52e=typeof _52c.places=="string"&&_52c.places.indexOf(","),_52f=_52c.places;if(_52e){_52f=_52c.places.substring(_52e+1);}else{if(!(_52f>=0)){_52f=(_52d[1]||[]).length;}}if(!(_52c.round<0)){_52a=dojo.number.round(_52a,_52f,_52c.round);}var _530=String(Math.abs(_52a)).split("."),_531=_530[1]||"";if(_52d[1]||_52c.places){if(_52e){_52c.places=_52c.places.substring(0,_52e);}var pad=_52c.places!==undefined?_52c.places:(_52d[1]&&_52d[1].lastIndexOf("0")+1);if(pad>_531.length){_530[1]=dojo.string.pad(_531,pad,"0",true);}if(_52f<_531.length){_530[1]=_531.substr(0,_52f);}}else{if(_530[1]){_530.pop();}}var _532=_52d[0].replace(",","");pad=_532.indexOf("0");if(pad!=-1){pad=_532.length-pad;if(pad>_530[0].length){_530[0]=dojo.string.pad(_530[0],pad);}if(_532.indexOf("#")==-1){_530[0]=_530[0].substr(_530[0].length-pad);}}var _533=_52d[0].lastIndexOf(","),_534,_535;if(_533!=-1){_534=_52d[0].length-_533-1;var _536=_52d[0].substr(0,_533);_533=_536.lastIndexOf(",");if(_533!=-1){_535=_536.length-_533-1;}}var _537=[];for(var _538=_530[0];_538;){var off=_538.length-_534;_537.push((off>0)?_538.substr(off):_538);_538=(off>0)?_538.slice(0,off):"";if(_535){_534=_535;delete _535;}}_530[0]=_537.reverse().join(_52c.group||",");return _530.join(_52c.decimal||".");};dojo.number.regexp=function(_539){return dojo.number._parseInfo(_539).regexp;};dojo.number._parseInfo=function(_53a){_53a=_53a||{};var _53b=dojo.i18n.normalizeLocale(_53a.locale),_53c=dojo.i18n.getLocalization("dojo.cldr","number",_53b),_53d=_53a.pattern||_53c[(_53a.type||"decimal")+"Format"],_53e=_53c.group,_53f=_53c.decimal,_540=1;if(_53d.indexOf("%")!=-1){_540/=100;}else{if(_53d.indexOf("‰")!=-1){_540/=1000;}else{var _541=_53d.indexOf("¤")!=-1;if(_541){_53e=_53c.currencyGroup||_53e;_53f=_53c.currencyDecimal||_53f;}}}var _542=_53d.split(";");if(_542.length==1){_542.push("-"+_542[0]);}var re=dojo.regexp.buildGroupRE(_542,function(_543){_543="(?:"+dojo.regexp.escapeString(_543,".")+")";return _543.replace(dojo.number._numberPatternRE,function(_544){var _545={signed:false,separator:_53a.strict?_53e:[_53e,""],fractional:_53a.fractional,decimal:_53f,exponent:false},_546=_544.split("."),_547=_53a.places;if(_546.length==1&&_540!=1){_546[1]="###";}if(_546.length==1||_547===0){_545.fractional=false;}else{if(_547===undefined){_547=_53a.pattern?_546[1].lastIndexOf("0")+1:Infinity;}if(_547&&_53a.fractional==undefined){_545.fractional=true;}if(!_53a.places&&(_547<_546[1].length)){_547+=","+_546[1].length;}_545.places=_547;}var _548=_546[0].split(",");if(_548.length>1){_545.groupSize=_548.pop().length;if(_548.length>1){_545.groupSize2=_548.pop().length;}}return "("+dojo.number._realNumberRegexp(_545)+")";});},true);if(_541){re=re.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g,function(_549,_54a,_54b,_54c){var prop=["symbol","currency","displayName"][_54b.length-1],_54d=dojo.regexp.escapeString(_53a[prop]||_53a.currency||"");_54a=_54a?"[\\s\\xa0]":"";_54c=_54c?"[\\s\\xa0]":"";if(!_53a.strict){if(_54a){_54a+="*";}if(_54c){_54c+="*";}return "(?:"+_54a+_54d+_54c+")?";}return _54a+_54d+_54c;});}return {regexp:re.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:_53e,decimal:_53f,factor:_540};};dojo.number.parse=function(_54e,_54f){var info=dojo.number._parseInfo(_54f),_550=(new RegExp("^"+info.regexp+"$")).exec(_54e);if(!_550){return NaN;}var _551=_550[1];if(!_550[1]){if(!_550[2]){return NaN;}_551=_550[2];info.factor*=-1;}_551=_551.replace(new RegExp("["+info.group+"\\s\\xa0"+"]","g"),"").replace(info.decimal,".");return _551*info.factor;};dojo.number._realNumberRegexp=function(_552){_552=_552||{};if(!("places" in _552)){_552.places=Infinity;}if(typeof _552.decimal!="string"){_552.decimal=".";}if(!("fractional" in _552)||/^0/.test(_552.places)){_552.fractional=[true,false];}if(!("exponent" in _552)){_552.exponent=[true,false];}if(!("eSigned" in _552)){_552.eSigned=[true,false];}var _553=dojo.number._integerRegexp(_552),_554=dojo.regexp.buildGroupRE(_552.fractional,function(q){var re="";if(q&&(_552.places!==0)){re="\\"+_552.decimal;if(_552.places==Infinity){re="(?:"+re+"\\d+)?";}else{re+="\\d{"+_552.places+"}";}}return re;},true);var _555=dojo.regexp.buildGroupRE(_552.exponent,function(q){if(q){return "([eE]"+dojo.number._integerRegexp({signed:_552.eSigned})+")";}return "";});var _556=_553+_554;if(_554){_556="(?:(?:"+_556+")|(?:"+_554+"))";}return _556+_555;};dojo.number._integerRegexp=function(_557){_557=_557||{};if(!("signed" in _557)){_557.signed=[true,false];}if(!("separator" in _557)){_557.separator="";}else{if(!("groupSize" in _557)){_557.groupSize=3;}}var _558=dojo.regexp.buildGroupRE(_557.signed,function(q){return q?"[-+]":"";},true);var _559=dojo.regexp.buildGroupRE(_557.separator,function(sep){if(!sep){return "(?:\\d+)";}sep=dojo.regexp.escapeString(sep);if(sep==" "){sep="\\s";}else{if(sep==" "){sep="\\s\\xa0";}}var grp=_557.groupSize,grp2=_557.groupSize2;if(grp2){var _55a="(?:0|[1-9]\\d{0,"+(grp2-1)+"}(?:["+sep+"]\\d{"+grp2+"})*["+sep+"]\\d{"+grp+"})";return ((grp-grp2)>0)?"(?:"+_55a+"|(?:0|[1-9]\\d{0,"+(grp-1)+"}))":_55a;}return "(?:0|[1-9]\\d{0,"+(grp-1)+"}(?:["+sep+"]\\d{"+grp+"})*)";},true);return _558+_559;};}if(!dojo._hasResource["dojox.charting.scaler.common"]){dojo._hasResource["dojox.charting.scaler.common"]=true;dojo.provide("dojox.charting.scaler.common");(function(){var eq=function(a,b){return Math.abs(a-b)<=0.000001*(Math.abs(a)+Math.abs(b));};dojo.mixin(dojox.charting.scaler.common,{findString:function(val,text){val=val.toLowerCase();for(var i=0;i<text.length;++i){if(val==text[i]){return true;}}return false;},getNumericLabel:function(_55b,_55c,_55d){var def="";if(dojo.number){def=(_55d.fixed?dojo.number.format(_55b,{places:_55c<0?-_55c:0}):dojo.number.format(_55b))||"";}else{def=_55d.fixed?_55b.toFixed(_55c<0?-_55c:0):_55b.toString();}if(_55d.labelFunc){var r=_55d.labelFunc(def,_55b,_55c);if(r){return r;}}if(_55d.labels){var l=_55d.labels,lo=0,hi=l.length;while(lo<hi){var mid=Math.floor((lo+hi)/2),val=l[mid].value;if(val<_55b){lo=mid+1;}else{hi=mid;}}if(lo<l.length&&eq(l[lo].value,_55b)){return l[lo].text;}--lo;if(lo>=0&&lo<l.length&&eq(l[lo].value,_55b)){return l[lo].text;}lo+=2;if(lo<l.length&&eq(l[lo].value,_55b)){return l[lo].text;}}return def;}});})();}if(!dojo._hasResource["dojox.charting.scaler.linear"]){dojo._hasResource["dojox.charting.scaler.linear"]=true;dojo.provide("dojox.charting.scaler.linear");(function(){var _55e=3,dc=dojox.charting,dcs=dc.scaler,dcsc=dcs.common,_55f=dcsc.findString,_560=dcsc.getNumericLabel;var _561=function(min,max,_562,_563,_564,_565,span){_562=dojo.delegate(_562);if(!_563){if(_562.fixUpper=="major"){_562.fixUpper="minor";}if(_562.fixLower=="major"){_562.fixLower="minor";}}if(!_564){if(_562.fixUpper=="minor"){_562.fixUpper="micro";}if(_562.fixLower=="minor"){_562.fixLower="micro";}}if(!_565){if(_562.fixUpper=="micro"){_562.fixUpper="none";}if(_562.fixLower=="micro"){_562.fixLower="none";}}var _566=_55f(_562.fixLower,["major"])?Math.floor(_562.min/_563)*_563:_55f(_562.fixLower,["minor"])?Math.floor(_562.min/_564)*_564:_55f(_562.fixLower,["micro"])?Math.floor(_562.min/_565)*_565:_562.min,_567=_55f(_562.fixUpper,["major"])?Math.ceil(_562.max/_563)*_563:_55f(_562.fixUpper,["minor"])?Math.ceil(_562.max/_564)*_564:_55f(_562.fixUpper,["micro"])?Math.ceil(_562.max/_565)*_565:_562.max;if(_562.useMin){min=_566;}if(_562.useMax){max=_567;}var _568=(!_563||_562.useMin&&_55f(_562.fixLower,["major"]))?min:Math.ceil(min/_563)*_563,_569=(!_564||_562.useMin&&_55f(_562.fixLower,["major","minor"]))?min:Math.ceil(min/_564)*_564,_56a=(!_565||_562.useMin&&_55f(_562.fixLower,["major","minor","micro"]))?min:Math.ceil(min/_565)*_565,_56b=!_563?0:(_562.useMax&&_55f(_562.fixUpper,["major"])?Math.round((max-_568)/_563):Math.floor((max-_568)/_563))+1,_56c=!_564?0:(_562.useMax&&_55f(_562.fixUpper,["major","minor"])?Math.round((max-_569)/_564):Math.floor((max-_569)/_564))+1,_56d=!_565?0:(_562.useMax&&_55f(_562.fixUpper,["major","minor","micro"])?Math.round((max-_56a)/_565):Math.floor((max-_56a)/_565))+1,_56e=_564?Math.round(_563/_564):0,_56f=_565?Math.round(_564/_565):0,_570=_563?Math.floor(Math.log(_563)/Math.LN10):0,_571=_564?Math.floor(Math.log(_564)/Math.LN10):0,_572=span/(max-min);if(!isFinite(_572)){_572=1;}return {bounds:{lower:_566,upper:_567,from:min,to:max,scale:_572,span:span},major:{tick:_563,start:_568,count:_56b,prec:_570},minor:{tick:_564,start:_569,count:_56c,prec:_571},micro:{tick:_565,start:_56a,count:_56d,prec:0},minorPerMajor:_56e,microPerMinor:_56f,scaler:dcs.linear};};dojo.mixin(dojox.charting.scaler.linear,{buildScaler:function(min,max,span,_573){var h={fixUpper:"none",fixLower:"none",natural:false};if(_573){if("fixUpper" in _573){h.fixUpper=String(_573.fixUpper);}if("fixLower" in _573){h.fixLower=String(_573.fixLower);}if("natural" in _573){h.natural=Boolean(_573.natural);}}if("min" in _573){min=_573.min;}if("max" in _573){max=_573.max;}if(_573.includeZero){if(min>0){min=0;}if(max<0){max=0;}}h.min=min;h.useMin=true;h.max=max;h.useMax=true;if("from" in _573){min=_573.from;h.useMin=false;}if("to" in _573){max=_573.to;h.useMax=false;}if(max<=min){return _561(min,max,h,0,0,0,span);}var mag=Math.floor(Math.log(max-min)/Math.LN10),_574=_573&&("majorTickStep" in _573)?_573.majorTickStep:Math.pow(10,mag),_575=0,_576=0,_577;if(_573&&("minorTickStep" in _573)){_575=_573.minorTickStep;}else{do{_575=_574/10;if(!h.natural||_575>0.9){_577=_561(min,max,h,_574,_575,0,span);if(_577.bounds.scale*_577.minor.tick>_55e){break;}}_575=_574/5;if(!h.natural||_575>0.9){_577=_561(min,max,h,_574,_575,0,span);if(_577.bounds.scale*_577.minor.tick>_55e){break;}}_575=_574/2;if(!h.natural||_575>0.9){_577=_561(min,max,h,_574,_575,0,span);if(_577.bounds.scale*_577.minor.tick>_55e){break;}}return _561(min,max,h,_574,0,0,span);}while(false);}if(_573&&("microTickStep" in _573)){_576=_573.microTickStep;_577=_561(min,max,h,_574,_575,_576,span);}else{do{_576=_575/10;if(!h.natural||_576>0.9){_577=_561(min,max,h,_574,_575,_576,span);if(_577.bounds.scale*_577.micro.tick>_55e){break;}}_576=_575/5;if(!h.natural||_576>0.9){_577=_561(min,max,h,_574,_575,_576,span);if(_577.bounds.scale*_577.micro.tick>_55e){break;}}_576=_575/2;if(!h.natural||_576>0.9){_577=_561(min,max,h,_574,_575,_576,span);if(_577.bounds.scale*_577.micro.tick>_55e){break;}}_576=0;}while(false);}return _576?_577:_561(min,max,h,_574,_575,0,span);},buildTicks:function(_578,_579){var step,next,tick,_57a=_578.major.start,_57b=_578.minor.start,_57c=_578.micro.start;if(_579.microTicks&&_578.micro.tick){step=_578.micro.tick,next=_57c;}else{if(_579.minorTicks&&_578.minor.tick){step=_578.minor.tick,next=_57b;}else{if(_578.major.tick){step=_578.major.tick,next=_57a;}else{return null;}}}var _57d=1/_578.bounds.scale;if(_578.bounds.to<=_578.bounds.from||isNaN(_57d)||!isFinite(_57d)||step<=0||isNaN(step)||!isFinite(step)){return null;}var _57e=[],_57f=[],_580=[];while(next<=_578.bounds.to+_57d){if(Math.abs(_57a-next)<step/2){tick={value:_57a};if(_579.majorLabels){tick.label=_560(_57a,_578.major.prec,_579);}_57e.push(tick);_57a+=_578.major.tick;_57b+=_578.minor.tick;_57c+=_578.micro.tick;}else{if(Math.abs(_57b-next)<step/2){if(_579.minorTicks){tick={value:_57b};if(_579.minorLabels&&(_578.minMinorStep<=_578.minor.tick*_578.bounds.scale)){tick.label=_560(_57b,_578.minor.prec,_579);}_57f.push(tick);}_57b+=_578.minor.tick;_57c+=_578.micro.tick;}else{if(_579.microTicks){_580.push({value:_57c});}_57c+=_578.micro.tick;}}next+=step;}return {major:_57e,minor:_57f,micro:_580};},getTransformerFromModel:function(_581){var _582=_581.bounds.from,_583=_581.bounds.scale;return function(x){return (x-_582)*_583;};},getTransformerFromPlot:function(_584){var _585=_584.bounds.from,_586=_584.bounds.scale;return function(x){return x/_586+_585;};}});})();}if(!dojo._hasResource["dojox.charting.axis2d.common"]){dojo._hasResource["dojox.charting.axis2d.common"]=true;dojo.provide("dojox.charting.axis2d.common");(function(){var g=dojox.gfx;var _587=function(s){s.marginLeft="0px";s.marginTop="0px";s.marginRight="0px";s.marginBottom="0px";s.paddingLeft="0px";s.paddingTop="0px";s.paddingRight="0px";s.paddingBottom="0px";s.borderLeftWidth="0px";s.borderTopWidth="0px";s.borderRightWidth="0px";s.borderBottomWidth="0px";};var _588=function(n){if(n["getBoundingClientRect"]){var bcr=n.getBoundingClientRect();return bcr.width||(bcr.right-bcr.left);}else{return dojo.marginBox(n).w;}};dojo.mixin(dojox.charting.axis2d.common,{createText:{gfx:function(_589,_58a,x,y,_58b,text,font,_58c){return _58a.createText({x:x,y:y,text:text,align:_58b}).setFont(font).setFill(_58c);},html:function(_58d,_58e,x,y,_58f,text,font,_590,_591){var p=dojo.doc.createElement("div"),s=p.style,_592;_587(s);s.font=font;p.innerHTML=String(text).replace(/\s/g,"&nbsp;");s.color=_590;s.position="absolute";s.left="-10000px";dojo.body().appendChild(p);var size=g.normalizedLength(g.splitFontString(font).size);if(!_591){_592=_588(p);}dojo.body().removeChild(p);s.position="relative";if(_591){s.width=_591+"px";switch(_58f){case "middle":s.textAlign="center";s.left=(x-_591/2)+"px";break;case "end":s.textAlign="right";s.left=(x-_591)+"px";break;default:s.left=x+"px";s.textAlign="left";break;}}else{switch(_58f){case "middle":s.left=Math.floor(x-_592/2)+"px";break;case "end":s.left=Math.floor(x-_592)+"px";break;default:s.left=Math.floor(x)+"px";break;}}s.top=Math.floor(y-size)+"px";s.whiteSpace="nowrap";var wrap=dojo.doc.createElement("div"),w=wrap.style;_587(w);w.width="0px";w.height="0px";wrap.appendChild(p);_58d.node.insertBefore(wrap,_58d.node.firstChild);return wrap;}}});})();}if(!dojo._hasResource["dojox.charting.Element"]){dojo._hasResource["dojox.charting.Element"]=true;dojo.provide("dojox.charting.Element");dojo.declare("dojox.charting.Element",null,{chart:null,group:null,htmlElements:null,dirty:true,constructor:function(_593){this.chart=_593;this.group=null;this.htmlElements=[];this.dirty=true;this.trailingSymbol="...";this._events=[];},createGroup:function(_594){if(!_594){_594=this.chart.surface;}if(!this.group){this.group=_594.createGroup();}return this;},purgeGroup:function(){this.destroyHtmlElements();if(this.group){this.group.clear();this.group.removeShape();this.group=null;}this.dirty=true;if(this._events.length){dojo.forEach(this._events,function(item){item.shape.disconnect(item.handle);});this._events=[];}return this;},cleanGroup:function(_595){this.destroyHtmlElements();if(!_595){_595=this.chart.surface;}if(this.group){this.group.clear();}else{this.group=_595.createGroup();}this.dirty=true;return this;},destroyHtmlElements:function(){if(this.htmlElements.length){dojo.forEach(this.htmlElements,dojo.destroy);this.htmlElements=[];}},destroy:function(){this.purgeGroup();},getTextWidth:function(s,font){return dojox.gfx._base._getTextBox(s,{font:font}).w||0;},getTextWithLimitLength:function(s,font,_596,_597){if(!s||s.length<=0){return {text:"",truncated:_597||false};}if(!_596||_596<=0){return {text:s,truncated:_597||false};}var _598=2,_599=0.618,_59a=s.substring(0,1)+this.trailingSymbol,_59b=this.getTextWidth(_59a,font);if(_596<=_59b){return {text:_59a,truncated:true};}var _59c=this.getTextWidth(s,font);if(_59c<=_596){return {text:s,truncated:_597||false};}else{var _59d=0,end=s.length;while(_59d<end){if(end-_59d<=_598){while(this.getTextWidth(s.substring(0,_59d)+this.trailingSymbol,font)>_596){_59d-=1;}return {text:(s.substring(0,_59d)+this.trailingSymbol),truncated:true};}var _59e=_59d+Math.round((end-_59d)*_599),_59f=this.getTextWidth(s.substring(0,_59e),font);if(_59f<_596){_59d=_59e;end=end;}else{_59d=_59d;end=_59e;}}}},getTextWithLimitCharCount:function(s,font,_5a0,_5a1){if(!s||s.length<=0){return {text:"",truncated:_5a1||false};}if(!_5a0||_5a0<=0||s.length<=_5a0){return {text:s,truncated:_5a1||false};}return {text:s.substring(0,_5a0)+this.trailingSymbol,truncated:true};},_plotFill:function(fill,dim,_5a2){if(!fill||!fill.type||!fill.space){return fill;}var _5a3=fill.space;switch(fill.type){case "linear":if(_5a3==="plot"||_5a3==="shapeX"||_5a3==="shapeY"){fill=dojox.gfx.makeParameters(dojox.gfx.defaultLinearGradient,fill);fill.space=_5a3;if(_5a3==="plot"||_5a3==="shapeX"){var span=dim.height-_5a2.t-_5a2.b;fill.y1=_5a2.t+span*fill.y1/100;fill.y2=_5a2.t+span*fill.y2/100;}if(_5a3==="plot"||_5a3==="shapeY"){var span=dim.width-_5a2.l-_5a2.r;fill.x1=_5a2.l+span*fill.x1/100;fill.x2=_5a2.l+span*fill.x2/100;}}break;case "radial":if(_5a3==="plot"){fill=dojox.gfx.makeParameters(dojox.gfx.defaultRadialGradient,fill);fill.space=_5a3;var _5a4=dim.width-_5a2.l-_5a2.r,_5a5=dim.height-_5a2.t-_5a2.b;fill.cx=_5a2.l+_5a4*fill.cx/100;fill.cy=_5a2.t+_5a5*fill.cy/100;fill.r=fill.r*Math.sqrt(_5a4*_5a4+_5a5*_5a5)/200;}break;case "pattern":if(_5a3==="plot"||_5a3==="shapeX"||_5a3==="shapeY"){fill=dojox.gfx.makeParameters(dojox.gfx.defaultPattern,fill);fill.space=_5a3;if(_5a3==="plot"||_5a3==="shapeX"){var span=dim.height-_5a2.t-_5a2.b;fill.y=_5a2.t+span*fill.y/100;fill.height=span*fill.height/100;}if(_5a3==="plot"||_5a3==="shapeY"){var span=dim.width-_5a2.l-_5a2.r;fill.x=_5a2.l+span*fill.x/100;fill.width=span*fill.width/100;}}break;}return fill;},_shapeFill:function(fill,bbox){if(!fill||!fill.space){return fill;}var _5a6=fill.space;switch(fill.type){case "linear":if(_5a6==="shape"||_5a6==="shapeX"||_5a6==="shapeY"){fill=dojox.gfx.makeParameters(dojox.gfx.defaultLinearGradient,fill);fill.space=_5a6;if(_5a6==="shape"||_5a6==="shapeX"){var span=bbox.width;fill.x1=bbox.x+span*fill.x1/100;fill.x2=bbox.x+span*fill.x2/100;}if(_5a6==="shape"||_5a6==="shapeY"){var span=bbox.height;fill.y1=bbox.y+span*fill.y1/100;fill.y2=bbox.y+span*fill.y2/100;}}break;case "radial":if(_5a6==="shape"){fill=dojox.gfx.makeParameters(dojox.gfx.defaultRadialGradient,fill);fill.space=_5a6;fill.cx=bbox.x+bbox.width/2;fill.cy=bbox.y+bbox.height/2;fill.r=fill.r*bbox.width/200;}break;case "pattern":if(_5a6==="shape"||_5a6==="shapeX"||_5a6==="shapeY"){fill=dojox.gfx.makeParameters(dojox.gfx.defaultPattern,fill);fill.space=_5a6;if(_5a6==="shape"||_5a6==="shapeX"){var span=bbox.width;fill.x=bbox.x+span*fill.x/100;fill.width=span*fill.width/100;}if(_5a6==="shape"||_5a6==="shapeY"){var span=bbox.height;fill.y=bbox.y+span*fill.y/100;fill.height=span*fill.height/100;}}break;}return fill;},_pseudoRadialFill:function(fill,_5a7,_5a8,_5a9,end){if(!fill||fill.type!=="radial"||fill.space!=="shape"){return fill;}var _5aa=fill.space;fill=dojox.gfx.makeParameters(dojox.gfx.defaultRadialGradient,fill);fill.space=_5aa;if(arguments.length<4){fill.cx=_5a7.x;fill.cy=_5a7.y;fill.r=fill.r*_5a8/100;return fill;}var _5ab=arguments.length<5?_5a9:(end+_5a9)/2;return {type:"linear",x1:_5a7.x,y1:_5a7.y,x2:_5a7.x+fill.r*_5a8*Math.cos(_5ab)/100,y2:_5a7.y+fill.r*_5a8*Math.sin(_5ab)/100,colors:fill.colors};return fill;}});}if(!dojo._hasResource["dojox.charting.axis2d.Base"]){dojo._hasResource["dojox.charting.axis2d.Base"]=true;dojo.provide("dojox.charting.axis2d.Base");dojo.declare("dojox.charting.axis2d.Base",dojox.charting.Element,{constructor:function(_5ac,_5ad){this.vertical=_5ad&&_5ad.vertical;},clear:function(){return this;},initialized:function(){return false;},calculate:function(min,max,span){return this;},getScaler:function(){return null;},getTicks:function(){return null;},getOffsets:function(){return {l:0,r:0,t:0,b:0};},render:function(dim,_5ae){this.dirty=false;return this;}});}if(!dojo._hasResource["dojox.lang.functional.lambda"]){dojo._hasResource["dojox.lang.functional.lambda"]=true;dojo.provide("dojox.lang.functional.lambda");(function(){var df=dojox.lang.functional,_5af={};var _5b0="ab".split(/a*/).length>1?String.prototype.split:function(sep){var r=this.split.call(this,sep),m=sep.exec(this);if(m&&m.index==0){r.unshift("");}return r;};var _5b1=function(s){var args=[],_5b2=_5b0.call(s,/\s*->\s*/m);if(_5b2.length>1){while(_5b2.length){s=_5b2.pop();args=_5b2.pop().split(/\s*,\s*|\s+/m);if(_5b2.length){_5b2.push("(function("+args+"){return ("+s+")})");}}}else{if(s.match(/\b_\b/)){args=["_"];}else{var l=s.match(/^\s*(?:[+*\/%&|\^\.=<>]|!=)/m),r=s.match(/[+\-*\/%&|\^\.=<>!]\s*$/m);if(l||r){if(l){args.push("$1");s="$1"+s;}if(r){args.push("$2");s=s+"$2";}}else{var vars=s.replace(/(?:\b[A-Z]|\.[a-zA-Z_$])[a-zA-Z_$\d]*|[a-zA-Z_$][a-zA-Z_$\d]*:|this|true|false|null|undefined|typeof|instanceof|in|delete|new|void|arguments|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval|isFinite|isNaN|parseFloat|parseInt|unescape|dojo|dijit|dojox|window|document|'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"/g,"").match(/([a-z_$][a-z_$\d]*)/gi)||[],t={};dojo.forEach(vars,function(v){if(!(v in t)){args.push(v);t[v]=1;}});}}}return {args:args,body:s};};var _5b3=function(a){return a.length?function(){var i=a.length-1,x=df.lambda(a[i]).apply(this,arguments);for(--i;i>=0;--i){x=df.lambda(a[i]).call(this,x);}return x;}:function(x){return x;};};dojo.mixin(df,{rawLambda:function(s){return _5b1(s);},buildLambda:function(s){s=_5b1(s);return "function("+s.args.join(",")+"){return ("+s.body+");}";},lambda:function(s){if(typeof s=="function"){return s;}if(s instanceof Array){return _5b3(s);}if(s in _5af){return _5af[s];}s=_5b1(s);return _5af[s]=new Function(s.args,"return ("+s.body+");");},clearLambdaCache:function(){_5af={};}});})();}if(!dojo._hasResource["dojox.lang.functional.array"]){dojo._hasResource["dojox.lang.functional.array"]=true;dojo.provide("dojox.lang.functional.array");(function(){var d=dojo,df=dojox.lang.functional,_5b4={};d.mixin(df,{filter:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var t=[],v,i,n;if(d.isArray(a)){for(i=0,n=a.length;i<n;++i){v=a[i];if(f.call(o,v,i,a)){t.push(v);}}}else{if(typeof a.hasNext=="function"&&typeof a.next=="function"){for(i=0;a.hasNext();){v=a.next();if(f.call(o,v,i++,a)){t.push(v);}}}else{for(i in a){if(!(i in _5b4)){v=a[i];if(f.call(o,v,i,a)){t.push(v);}}}}}return t;},forEach:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var i,n;if(d.isArray(a)){for(i=0,n=a.length;i<n;f.call(o,a[i],i,a),++i){}}else{if(typeof a.hasNext=="function"&&typeof a.next=="function"){for(i=0;a.hasNext();f.call(o,a.next(),i++,a)){}}else{for(i in a){if(!(i in _5b4)){f.call(o,a[i],i,a);}}}}return o;},map:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var t,n,i;if(d.isArray(a)){t=new Array(n=a.length);for(i=0;i<n;t[i]=f.call(o,a[i],i,a),++i){}}else{if(typeof a.hasNext=="function"&&typeof a.next=="function"){t=[];for(i=0;a.hasNext();t.push(f.call(o,a.next(),i++,a))){}}else{t=[];for(i in a){if(!(i in _5b4)){t.push(f.call(o,a[i],i,a));}}}}return t;},every:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var i,n;if(d.isArray(a)){for(i=0,n=a.length;i<n;++i){if(!f.call(o,a[i],i,a)){return false;}}}else{if(typeof a.hasNext=="function"&&typeof a.next=="function"){for(i=0;a.hasNext();){if(!f.call(o,a.next(),i++,a)){return false;}}}else{for(i in a){if(!(i in _5b4)){if(!f.call(o,a[i],i,a)){return false;}}}}}return true;},some:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var i,n;if(d.isArray(a)){for(i=0,n=a.length;i<n;++i){if(f.call(o,a[i],i,a)){return true;}}}else{if(typeof a.hasNext=="function"&&typeof a.next=="function"){for(i=0;a.hasNext();){if(f.call(o,a.next(),i++,a)){return true;}}}else{for(i in a){if(!(i in _5b4)){if(f.call(o,a[i],i,a)){return true;}}}}}return false;}});})();}if(!dojo._hasResource["dojox.lang.functional.object"]){dojo._hasResource["dojox.lang.functional.object"]=true;dojo.provide("dojox.lang.functional.object");(function(){var d=dojo,df=dojox.lang.functional,_5b5={};d.mixin(df,{keys:function(obj){var t=[];for(var i in obj){if(!(i in _5b5)){t.push(i);}}return t;},values:function(obj){var t=[];for(var i in obj){if(!(i in _5b5)){t.push(obj[i]);}}return t;},filterIn:function(obj,f,o){o=o||d.global;f=df.lambda(f);var t={},v,i;for(i in obj){if(!(i in _5b5)){v=obj[i];if(f.call(o,v,i,obj)){t[i]=v;}}}return t;},forIn:function(obj,f,o){o=o||d.global;f=df.lambda(f);for(var i in obj){if(!(i in _5b5)){f.call(o,obj[i],i,obj);}}return o;},mapIn:function(obj,f,o){o=o||d.global;f=df.lambda(f);var t={},i;for(i in obj){if(!(i in _5b5)){t[i]=f.call(o,obj[i],i,obj);}}return t;}});})();}if(!dojo._hasResource["dojox.lang.functional"]){dojo._hasResource["dojox.lang.functional"]=true;dojo.provide("dojox.lang.functional");}if(!dojo._hasResource["dojox.lang.utils"]){dojo._hasResource["dojox.lang.utils"]=true;dojo.provide("dojox.lang.utils");(function(){var _5b6={},du=dojox.lang.utils,opts=Object.prototype.toString;var _5b7=function(o){if(o){switch(opts.call(o)){case "[object Array]":return o.slice(0);case "[object Object]":return dojo.delegate(o);}}return o;};dojo.mixin(du,{coerceType:function(_5b8,_5b9){switch(typeof _5b8){case "number":return Number(eval("("+_5b9+")"));case "string":return String(_5b9);case "boolean":return Boolean(eval("("+_5b9+")"));}return eval("("+_5b9+")");},updateWithObject:function(_5ba,_5bb,conv){if(!_5bb){return _5ba;}for(var x in _5ba){if(x in _5bb&&!(x in _5b6)){var t=_5ba[x];if(t&&typeof t=="object"){du.updateWithObject(t,_5bb[x],conv);}else{_5ba[x]=conv?du.coerceType(t,_5bb[x]):_5b7(_5bb[x]);}}}return _5ba;},updateWithPattern:function(_5bc,_5bd,_5be,conv){if(!_5bd||!_5be){return _5bc;}for(var x in _5be){if(x in _5bd&&!(x in _5b6)){_5bc[x]=conv?du.coerceType(_5be[x],_5bd[x]):_5b7(_5bd[x]);}}return _5bc;},merge:function(_5bf,_5c0){if(_5c0){var _5c1=opts.call(_5bf),_5c2=opts.call(_5c0),t,i,l,m;switch(_5c2){case "[object Array]":if(_5c2==_5c1){t=new Array(Math.max(_5bf.length,_5c0.length));for(i=0,l=t.length;i<l;++i){t[i]=du.merge(_5bf[i],_5c0[i]);}return t;}return _5c0.slice(0);case "[object Object]":if(_5c2==_5c1&&_5bf){t=dojo.delegate(_5bf);for(i in _5c0){if(i in _5bf){l=_5bf[i];m=_5c0[i];if(m!==l){t[i]=du.merge(l,m);}}else{t[i]=dojo.clone(_5c0[i]);}}return t;}return dojo.clone(_5c0);}}return _5c0;}});})();}if(!dojo._hasResource["dojox.charting.axis2d.Invisible"]){dojo._hasResource["dojox.charting.axis2d.Invisible"]=true;dojo.provide("dojox.charting.axis2d.Invisible");(function(){var dc=dojox.charting,df=dojox.lang.functional,du=dojox.lang.utils,g=dojox.gfx,lin=dc.scaler.linear,_5c3=du.merge,_5c4=4,_5c5=45;dojo.declare("dojox.charting.axis2d.Invisible",dojox.charting.axis2d.Base,{defaultParams:{vertical:false,fixUpper:"none",fixLower:"none",natural:false,leftBottom:true,includeZero:false,fixed:true,majorLabels:true,minorTicks:true,minorLabels:true,microTicks:false,rotation:0},optionalParams:{min:0,max:1,from:0,to:1,majorTickStep:4,minorTickStep:2,microTickStep:1,labels:[],labelFunc:null,maxLabelSize:0,maxLabelCharCount:0,trailingSymbol:null},constructor:function(_5c6,_5c7){this.opt=dojo.clone(this.defaultParams);du.updateWithObject(this.opt,_5c7);du.updateWithPattern(this.opt,_5c7,this.optionalParams);},dependOnData:function(){return !("min" in this.opt)||!("max" in this.opt);},clear:function(){delete this.scaler;delete this.ticks;this.dirty=true;return this;},initialized:function(){return "scaler" in this&&!(this.dirty&&this.dependOnData());},setWindow:function(_5c8,_5c9){this.scale=_5c8;this.offset=_5c9;return this.clear();},getWindowScale:function(){return "scale" in this?this.scale:1;},getWindowOffset:function(){return "offset" in this?this.offset:0;},_groupLabelWidth:function(_5ca,font,_5cb){if(!_5ca.length){return 0;}if(dojo.isObject(_5ca[0])){_5ca=df.map(_5ca,function(_5cc){return _5cc.text;});}if(_5cb){_5ca=df.map(_5ca,function(_5cd){return dojo.trim(_5cd).length==0?"":_5cd.substring(0,_5cb)+this.trailingSymbol;},this);}var s=_5ca.join("<br>");return dojox.gfx._base._getTextBox(s,{font:font}).w||0;},calculate:function(min,max,span,_5ce){if(this.initialized()){return this;}var o=this.opt;this.labels="labels" in o?o.labels:_5ce;this.scaler=lin.buildScaler(min,max,span,o);var tsb=this.scaler.bounds;if("scale" in this){o.from=tsb.lower+this.offset;o.to=(tsb.upper-tsb.lower)/this.scale+o.from;if(!isFinite(o.from)||isNaN(o.from)||!isFinite(o.to)||isNaN(o.to)||o.to-o.from>=tsb.upper-tsb.lower){delete o.from;delete o.to;delete this.scale;delete this.offset;}else{if(o.from<tsb.lower){o.to+=tsb.lower-o.from;o.from=tsb.lower;}else{if(o.to>tsb.upper){o.from+=tsb.upper-o.to;o.to=tsb.upper;}}this.offset=o.from-tsb.lower;}this.scaler=lin.buildScaler(min,max,span,o);tsb=this.scaler.bounds;if(this.scale==1&&this.offset==0){delete this.scale;delete this.offset;}}var ta=this.chart.theme.axis,_5cf=0,_5d0=o.rotation%360,_5d1=o.font||(ta.majorTick&&ta.majorTick.font)||(ta.tick&&ta.tick.font),size=_5d1?g.normalizedLength(g.splitFontString(_5d1).size):0,cosr=Math.abs(Math.cos(_5d0*Math.PI/180)),sinr=Math.abs(Math.sin(_5d0*Math.PI/180));if(_5d0<0){_5d0+=360;}if(size){if(this.vertical?_5d0!=0&&_5d0!=180:_5d0!=90&&_5d0!=270){if(this.labels){_5cf=this._groupLabelWidth(this.labels,_5d1,o.maxLabelCharCount);}else{var _5d2=Math.ceil(Math.log(Math.max(Math.abs(tsb.from),Math.abs(tsb.to)))/Math.LN10),t=[];if(tsb.from<0||tsb.to<0){t.push("-");}t.push(dojo.string.rep("9",_5d2));var _5d3=Math.floor(Math.log(tsb.to-tsb.from)/Math.LN10);if(_5d3>0){t.push(".");t.push(dojo.string.rep("9",_5d3));}_5cf=dojox.gfx._base._getTextBox(t.join(""),{font:_5d1}).w;}_5cf=o.maxLabelSize?Math.min(o.maxLabelSize,_5cf):_5cf;}else{_5cf=size;}switch(_5d0){case 0:case 90:case 180:case 270:break;default:var gap1=Math.sqrt(_5cf*_5cf+size*size),gap2=this.vertical?size*cosr+_5cf*sinr:_5cf*cosr+size*sinr;_5cf=Math.min(gap1,gap2);break;}}this.scaler.minMinorStep=_5cf+_5c4;this.ticks=lin.buildTicks(this.scaler,o);return this;},getScaler:function(){return this.scaler;},getTicks:function(){return this.ticks;}});})();}if(!dojo._hasResource["dojo.colors"]){dojo._hasResource["dojo.colors"]=true;dojo.provide("dojo.colors");dojo.getObject("colors",true,dojo);(function(){var _5d4=function(m1,m2,h){if(h<0){++h;}if(h>1){--h;}var h6=6*h;if(h6<1){return m1+(m2-m1)*h6;}if(2*h<1){return m2;}if(3*h<2){return m1+(m2-m1)*(2/3-h)*6;}return m1;};dojo.colorFromRgb=function(_5d5,obj){var m=_5d5.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(m){var c=m[2].split(/\s*,\s*/),l=c.length,t=m[1],a;if((t=="rgb"&&l==3)||(t=="rgba"&&l==4)){var r=c[0];if(r.charAt(r.length-1)=="%"){a=dojo.map(c,function(x){return parseFloat(x)*2.56;});if(l==4){a[3]=c[3];}return dojo.colorFromArray(a,obj);}return dojo.colorFromArray(c,obj);}if((t=="hsl"&&l==3)||(t=="hsla"&&l==4)){var H=((parseFloat(c[0])%360)+360)%360/360,S=parseFloat(c[1])/100,L=parseFloat(c[2])/100,m2=L<=0.5?L*(S+1):L+S-L*S,m1=2*L-m2;a=[_5d4(m1,m2,H+1/3)*256,_5d4(m1,m2,H)*256,_5d4(m1,m2,H-1/3)*256,1];if(l==4){a[3]=c[3];}return dojo.colorFromArray(a,obj);}}return null;};var _5d6=function(c,low,high){c=Number(c);return isNaN(c)?high:c<low?low:c>high?high:c;};dojo.Color.prototype.sanitize=function(){var t=this;t.r=Math.round(_5d6(t.r,0,255));t.g=Math.round(_5d6(t.g,0,255));t.b=Math.round(_5d6(t.b,0,255));t.a=_5d6(t.a,0,1);return this;};})();dojo.colors.makeGrey=function(g,a){return dojo.colorFromArray([g,g,g,a]);};dojo.mixin(dojo.Color.named,{aliceblue:[240,248,255],antiquewhite:[250,235,215],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],blanchedalmond:[255,235,205],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],oldlace:[253,245,230],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],thistle:[216,191,216],tomato:[255,99,71],transparent:[0,0,0,0],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],whitesmoke:[245,245,245],yellowgreen:[154,205,50]});}if(!dojo._hasResource["dojox.charting.axis2d.Default"]){dojo._hasResource["dojox.charting.axis2d.Default"]=true;dojo.provide("dojox.charting.axis2d.Default");(function(){var dc=dojox.charting,du=dojox.lang.utils,g=dojox.gfx,lin=dc.scaler.linear,_5d7=4,_5d8=45;dojo.declare("dojox.charting.axis2d.Default",dojox.charting.axis2d.Invisible,{defaultParams:{vertical:false,fixUpper:"none",fixLower:"none",natural:false,leftBottom:true,includeZero:false,fixed:true,majorLabels:true,minorTicks:true,minorLabels:true,microTicks:false,rotation:0,htmlLabels:true},optionalParams:{min:0,max:1,from:0,to:1,majorTickStep:4,minorTickStep:2,microTickStep:1,labels:[],labelFunc:null,maxLabelSize:0,maxLabelCharCount:0,trailingSymbol:null,stroke:{},majorTick:{},minorTick:{},microTick:{},tick:{},font:"",fontColor:"",title:"",titleGap:0,titleFont:"",titleFontColor:"",titleOrientation:""},constructor:function(_5d9,_5da){this.opt=dojo.clone(this.defaultParams);du.updateWithObject(this.opt,_5da);du.updateWithPattern(this.opt,_5da,this.optionalParams);},getOffsets:function(){var s=this.scaler,_5db={l:0,r:0,t:0,b:0};if(!s){return _5db;}var o=this.opt,_5dc=0,a,b,c,d,gl=dc.scaler.common.getNumericLabel,_5dd=0,ma=s.major,mi=s.minor,ta=this.chart.theme.axis,_5de=o.font||(ta.majorTick&&ta.majorTick.font)||(ta.tick&&ta.tick.font),_5df=o.titleFont||(ta.tick&&ta.tick.titleFont),_5e0=(o.titleGap==0)?0:o.titleGap||(ta.tick&&ta.tick.titleGap)||15,_5e1=this.chart.theme.getTick("major",o),_5e2=this.chart.theme.getTick("minor",o),size=_5de?g.normalizedLength(g.splitFontString(_5de).size):0,_5e3=_5df?g.normalizedLength(g.splitFontString(_5df).size):0,_5e4=o.rotation%360,_5e5=o.leftBottom,cosr=Math.abs(Math.cos(_5e4*Math.PI/180)),sinr=Math.abs(Math.sin(_5e4*Math.PI/180));this.trailingSymbol=(o.trailingSymbol===undefined||o.trailingSymbol===null)?this.trailingSymbol:o.trailingSymbol;if(_5e4<0){_5e4+=360;}if(size){if(this.labels){_5dc=this._groupLabelWidth(this.labels,_5de,o.maxLabelCharCount);}else{_5dc=this._groupLabelWidth([gl(ma.start,ma.prec,o),gl(ma.start+ma.count*ma.tick,ma.prec,o),gl(mi.start,mi.prec,o),gl(mi.start+mi.count*mi.tick,mi.prec,o)],_5de,o.maxLabelCharCount);}_5dc=o.maxLabelSize?Math.min(o.maxLabelSize,_5dc):_5dc;if(this.vertical){var side=_5e5?"l":"r";switch(_5e4){case 0:case 180:_5db[side]=_5dc;_5db.t=_5db.b=size/2;break;case 90:case 270:_5db[side]=size;_5db.t=_5db.b=_5dc/2;break;default:if(_5e4<=_5d8||(180<_5e4&&_5e4<=(180+_5d8))){_5db[side]=size*sinr/2+_5dc*cosr;_5db[_5e5?"t":"b"]=size*cosr/2+_5dc*sinr;_5db[_5e5?"b":"t"]=size*cosr/2;}else{if(_5e4>(360-_5d8)||(180>_5e4&&_5e4>(180-_5d8))){_5db[side]=size*sinr/2+_5dc*cosr;_5db[_5e5?"b":"t"]=size*cosr/2+_5dc*sinr;_5db[_5e5?"t":"b"]=size*cosr/2;}else{if(_5e4<90||(180<_5e4&&_5e4<270)){_5db[side]=size*sinr+_5dc*cosr;_5db[_5e5?"t":"b"]=size*cosr+_5dc*sinr;}else{_5db[side]=size*sinr+_5dc*cosr;_5db[_5e5?"b":"t"]=size*cosr+_5dc*sinr;}}}break;}_5db[side]+=_5d7+Math.max(_5e1.length,_5e2.length)+(o.title?(_5e3+_5e0):0);}else{var side=_5e5?"b":"t";switch(_5e4){case 0:case 180:_5db[side]=size;_5db.l=_5db.r=_5dc/2;break;case 90:case 270:_5db[side]=_5dc;_5db.l=_5db.r=size/2;break;default:if((90-_5d8)<=_5e4&&_5e4<=90||(270-_5d8)<=_5e4&&_5e4<=270){_5db[side]=size*sinr/2+_5dc*cosr;_5db[_5e5?"r":"l"]=size*cosr/2+_5dc*sinr;_5db[_5e5?"l":"r"]=size*cosr/2;}else{if(90<=_5e4&&_5e4<=(90+_5d8)||270<=_5e4&&_5e4<=(270+_5d8)){_5db[side]=size*sinr/2+_5dc*cosr;_5db[_5e5?"l":"r"]=size*cosr/2+_5dc*sinr;_5db[_5e5?"r":"l"]=size*cosr/2;}else{if(_5e4<_5d8||(180<_5e4&&_5e4<(180-_5d8))){_5db[side]=size*sinr+_5dc*cosr;_5db[_5e5?"r":"l"]=size*cosr+_5dc*sinr;}else{_5db[side]=size*sinr+_5dc*cosr;_5db[_5e5?"l":"r"]=size*cosr+_5dc*sinr;}}}break;}_5db[side]+=_5d7+Math.max(_5e1.length,_5e2.length)+(o.title?(_5e3+_5e0):0);}}if(_5dc){this._cachedLabelWidth=_5dc;}return _5db;},render:function(dim,_5e6){if(!this.dirty){return this;}var o=this.opt,ta=this.chart.theme.axis,_5e7=o.leftBottom,_5e8=o.rotation%360,_5e9,stop,_5ea,_5eb=0,_5ec,_5ed,_5ee,_5ef,_5f0,_5f1,_5f2=o.font||(ta.majorTick&&ta.majorTick.font)||(ta.tick&&ta.tick.font),_5f3=o.titleFont||(ta.tick&&ta.tick.titleFont),_5f4=o.fontColor||(ta.majorTick&&ta.majorTick.fontColor)||(ta.tick&&ta.tick.fontColor)||"black",_5f5=o.titleFontColor||(ta.tick&&ta.tick.titleFontColor)||"black",_5f6=(o.titleGap==0)?0:o.titleGap||(ta.tick&&ta.tick.titleGap)||15,_5f7=o.titleOrientation||(ta.tick&&ta.tick.titleOrientation)||"axis",_5f8=this.chart.theme.getTick("major",o),_5f9=this.chart.theme.getTick("minor",o),_5fa=this.chart.theme.getTick("micro",o),_5fb=Math.max(_5f8.length,_5f9.length,_5fa.length),_5fc="stroke" in o?o.stroke:ta.stroke,size=_5f2?g.normalizedLength(g.splitFontString(_5f2).size):0,cosr=Math.abs(Math.cos(_5e8*Math.PI/180)),sinr=Math.abs(Math.sin(_5e8*Math.PI/180)),_5fd=_5f3?g.normalizedLength(g.splitFontString(_5f3).size):0;if(_5e8<0){_5e8+=360;}if(this.vertical){_5e9={y:dim.height-_5e6.b};stop={y:_5e6.t};_5ea={y:(dim.height-_5e6.b+_5e6.t)/2};_5ec=size*sinr+(this._cachedLabelWidth||0)*cosr+_5d7+Math.max(_5f8.length,_5f9.length)+_5fd+_5f6;_5ed={x:0,y:-1};_5f0={x:0,y:0};_5ee={x:1,y:0};_5ef={x:_5d7,y:0};switch(_5e8){case 0:_5f1="end";_5f0.y=size*0.4;break;case 90:_5f1="middle";_5f0.x=-size;break;case 180:_5f1="start";_5f0.y=-size*0.4;break;case 270:_5f1="middle";break;default:if(_5e8<_5d8){_5f1="end";_5f0.y=size*0.4;}else{if(_5e8<90){_5f1="end";_5f0.y=size*0.4;}else{if(_5e8<(180-_5d8)){_5f1="start";}else{if(_5e8<(180+_5d8)){_5f1="start";_5f0.y=-size*0.4;}else{if(_5e8<270){_5f1="start";_5f0.x=_5e7?0:size*0.4;}else{if(_5e8<(360-_5d8)){_5f1="end";_5f0.x=_5e7?0:size*0.4;}else{_5f1="end";_5f0.y=size*0.4;}}}}}}}if(_5e7){_5e9.x=stop.x=_5e6.l;_5eb=(_5f7&&_5f7=="away")?90:270;_5ea.x=_5e6.l-_5ec+(_5eb==270?_5fd:0);_5ee.x=-1;_5ef.x=-_5ef.x;}else{_5e9.x=stop.x=dim.width-_5e6.r;_5eb=(_5f7&&_5f7=="axis")?90:270;_5ea.x=dim.width-_5e6.r+_5ec-(_5eb==270?0:_5fd);switch(_5f1){case "start":_5f1="end";break;case "end":_5f1="start";break;case "middle":_5f0.x+=size;break;}}}else{_5e9={x:_5e6.l};stop={x:dim.width-_5e6.r};_5ea={x:(dim.width-_5e6.r+_5e6.l)/2};_5ec=size*cosr+(this._cachedLabelWidth||0)*sinr+_5d7+Math.max(_5f8.length,_5f9.length)+_5fd+_5f6;_5ed={x:1,y:0};_5f0={x:0,y:0};_5ee={x:0,y:1};_5ef={x:0,y:_5d7};switch(_5e8){case 0:_5f1="middle";_5f0.y=size;break;case 90:_5f1="start";_5f0.x=-size*0.4;break;case 180:_5f1="middle";break;case 270:_5f1="end";_5f0.x=size*0.4;break;default:if(_5e8<(90-_5d8)){_5f1="start";_5f0.y=_5e7?size:0;}else{if(_5e8<(90+_5d8)){_5f1="start";_5f0.x=-size*0.4;}else{if(_5e8<180){_5f1="start";_5f0.y=_5e7?0:-size;}else{if(_5e8<(270-_5d8)){_5f1="end";_5f0.y=_5e7?0:-size;}else{if(_5e8<(270+_5d8)){_5f1="end";_5f0.y=_5e7?size*0.4:0;}else{_5f1="end";_5f0.y=_5e7?size:0;}}}}}}if(_5e7){_5e9.y=stop.y=dim.height-_5e6.b;_5eb=(_5f7&&_5f7=="axis")?180:0;_5ea.y=dim.height-_5e6.b+_5ec-(_5eb?_5fd:0);}else{_5e9.y=stop.y=_5e6.t;_5eb=(_5f7&&_5f7=="away")?180:0;_5ea.y=_5e6.t-_5ec+(_5eb?0:_5fd);_5ee.y=-1;_5ef.y=-_5ef.y;switch(_5f1){case "start":_5f1="end";break;case "end":_5f1="start";break;case "middle":_5f0.y-=size;break;}}}this.cleanGroup();try{var s=this.group,c=this.scaler,t=this.ticks,_5fe,f=lin.getTransformerFromModel(this.scaler),_5ff=!_5eb&&!_5e8&&this.opt.htmlLabels&&!dojo.isIE&&!dojo.isOpera?"html":"gfx",dx=_5ee.x*_5f8.length,dy=_5ee.y*_5f8.length;s.createLine({x1:_5e9.x,y1:_5e9.y,x2:stop.x,y2:stop.y}).setStroke(_5fc);if(o.title){var _600=dc.axis2d.common.createText[_5ff](this.chart,s,_5ea.x,_5ea.y,"middle",o.title,_5f3,_5f5);if(_5ff=="html"){this.htmlElements.push(_600);}else{_600.setTransform(g.matrix.rotategAt(_5eb,_5ea.x,_5ea.y));}}dojo.forEach(t.major,function(tick){var _601=f(tick.value),elem,x=_5e9.x+_5ed.x*_601,y=_5e9.y+_5ed.y*_601;s.createLine({x1:x,y1:y,x2:x+dx,y2:y+dy}).setStroke(_5f8);if(tick.label){var _602=o.maxLabelCharCount?this.getTextWithLimitCharCount(tick.label,_5f2,o.maxLabelCharCount):{text:tick.label,truncated:false};_602=o.maxLabelSize?this.getTextWithLimitLength(_602.text,_5f2,o.maxLabelSize,_602.truncated):_602;elem=dc.axis2d.common.createText[_5ff](this.chart,s,x+dx+_5ef.x+(_5e8?0:_5f0.x),y+dy+_5ef.y+(_5e8?0:_5f0.y),_5f1,_602.text,_5f2,_5f4);_602.truncated&&this.labelTooltip(elem,this.chart,tick.label,_602.text,_5f2,_5ff);if(_5ff=="html"){this.htmlElements.push(elem);}else{if(_5e8){elem.setTransform([{dx:_5f0.x,dy:_5f0.y},g.matrix.rotategAt(_5e8,x+dx+_5ef.x,y+dy+_5ef.y)]);}}}},this);dx=_5ee.x*_5f9.length;dy=_5ee.y*_5f9.length;_5fe=c.minMinorStep<=c.minor.tick*c.bounds.scale;dojo.forEach(t.minor,function(tick){var _603=f(tick.value),elem,x=_5e9.x+_5ed.x*_603,y=_5e9.y+_5ed.y*_603;s.createLine({x1:x,y1:y,x2:x+dx,y2:y+dy}).setStroke(_5f9);if(_5fe&&tick.label){var _604=o.maxLabelCharCount?this.getTextWithLimitCharCount(tick.label,_5f2,o.maxLabelCharCount):{text:tick.label,truncated:false};_604=o.maxLabelSize?this.getTextWithLimitLength(_604.text,_5f2,o.maxLabelSize,_604.truncated):_604;elem=dc.axis2d.common.createText[_5ff](this.chart,s,x+dx+_5ef.x+(_5e8?0:_5f0.x),y+dy+_5ef.y+(_5e8?0:_5f0.y),_5f1,_604.text,_5f2,_5f4);_604.truncated&&this.labelTooltip(elem,this.chart,tick.label,_604.text,_5f2,_5ff);if(_5ff=="html"){this.htmlElements.push(elem);}else{if(_5e8){elem.setTransform([{dx:_5f0.x,dy:_5f0.y},g.matrix.rotategAt(_5e8,x+dx+_5ef.x,y+dy+_5ef.y)]);}}}},this);dx=_5ee.x*_5fa.length;dy=_5ee.y*_5fa.length;dojo.forEach(t.micro,function(tick){var _605=f(tick.value),elem,x=_5e9.x+_5ed.x*_605,y=_5e9.y+_5ed.y*_605;s.createLine({x1:x,y1:y,x2:x+dx,y2:y+dy}).setStroke(_5fa);},this);}catch(e){}this.dirty=false;return this;},labelTooltip:function(elem,_606,_607,_608,font,_609){if(!dijit||!dijit.Tooltip){return;}var _60a={type:"rect"},_60b=["above","below"],_60c=dojox.gfx._base._getTextBox(_608,{font:font}).w||0;fontHeight=font?g.normalizedLength(g.splitFontString(font).size):0;if(_609=="html"){dojo.mixin(_60a,dojo.coords(elem.firstChild,true));_60a.width=Math.ceil(_60c);_60a.height=Math.ceil(fontHeight);this._events.push({shape:dojo,handle:dojo.connect(elem.firstChild,"onmouseover",this,function(e){dijit.showTooltip(_607,_60a,_60b);})});this._events.push({shape:dojo,handle:dojo.connect(elem.firstChild,"onmouseout",this,function(e){dijit.hideTooltip(_60a);})});}else{var shp=elem.getShape(),lt=dojo.coords(_606.node,true);_60a=dojo.mixin(_60a,{x:shp.x-_60c/2,y:shp.y});_60a.x+=lt.x;_60a.y+=lt.y;_60a.x=Math.round(_60a.x);_60a.y=Math.round(_60a.y);_60a.width=Math.ceil(_60c);_60a.height=Math.ceil(fontHeight);this._events.push({shape:elem,handle:elem.connect("onmouseenter",this,function(e){dijit.showTooltip(_607,_60a,_60b);})});this._events.push({shape:elem,handle:elem.connect("onmouseleave",this,function(e){dijit.hideTooltip(_60a);})});}}});})();}if(!dojo._hasResource["dojox.charting.plot2d.common"]){dojo._hasResource["dojox.charting.plot2d.common"]=true;dojo.provide("dojox.charting.plot2d.common");(function(){var df=dojox.lang.functional,dc=dojox.charting.plot2d.common;dojo.mixin(dojox.charting.plot2d.common,{makeStroke:function(_60d){if(!_60d){return _60d;}if(typeof _60d=="string"||_60d instanceof dojo.Color){_60d={color:_60d};}return dojox.gfx.makeParameters(dojox.gfx.defaultStroke,_60d);},augmentColor:function(_60e,_60f){var t=new dojo.Color(_60e),c=new dojo.Color(_60f);c.a=t.a;return c;},augmentStroke:function(_610,_611){var s=dc.makeStroke(_610);if(s){s.color=dc.augmentColor(s.color,_611);}return s;},augmentFill:function(fill,_612){var fc,c=new dojo.Color(_612);if(typeof fill=="string"||fill instanceof dojo.Color){return dc.augmentColor(fill,_612);}return fill;},defaultStats:{vmin:Number.POSITIVE_INFINITY,vmax:Number.NEGATIVE_INFINITY,hmin:Number.POSITIVE_INFINITY,hmax:Number.NEGATIVE_INFINITY},collectSimpleStats:function(_613){var _614=dojo.delegate(dc.defaultStats);for(var i=0;i<_613.length;++i){var run=_613[i];for(var j=0;j<run.data.length;j++){if(run.data[j]!==null){if(typeof run.data[j]=="number"){var _615=_614.vmin,_616=_614.vmax;if(!("ymin" in run)||!("ymax" in run)){dojo.forEach(run.data,function(val,i){if(val!==null){var x=i+1,y=val;if(isNaN(y)){y=0;}_614.hmin=Math.min(_614.hmin,x);_614.hmax=Math.max(_614.hmax,x);_614.vmin=Math.min(_614.vmin,y);_614.vmax=Math.max(_614.vmax,y);}});}if("ymin" in run){_614.vmin=Math.min(_615,run.ymin);}if("ymax" in run){_614.vmax=Math.max(_616,run.ymax);}}else{var _617=_614.hmin,_618=_614.hmax,_615=_614.vmin,_616=_614.vmax;if(!("xmin" in run)||!("xmax" in run)||!("ymin" in run)||!("ymax" in run)){dojo.forEach(run.data,function(val,i){if(val!==null){var x="x" in val?val.x:i+1,y=val.y;if(isNaN(x)){x=0;}if(isNaN(y)){y=0;}_614.hmin=Math.min(_614.hmin,x);_614.hmax=Math.max(_614.hmax,x);_614.vmin=Math.min(_614.vmin,y);_614.vmax=Math.max(_614.vmax,y);}});}if("xmin" in run){_614.hmin=Math.min(_617,run.xmin);}if("xmax" in run){_614.hmax=Math.max(_618,run.xmax);}if("ymin" in run){_614.vmin=Math.min(_615,run.ymin);}if("ymax" in run){_614.vmax=Math.max(_616,run.ymax);}}break;}}}return _614;},calculateBarSize:function(_619,opt,_61a){if(!_61a){_61a=1;}var gap=opt.gap,size=(_619-2*gap)/_61a;if("minBarSize" in opt){size=Math.max(size,opt.minBarSize);}if("maxBarSize" in opt){size=Math.min(size,opt.maxBarSize);}size=Math.max(size,1);gap=(_619-size*_61a)/2;return {size:size,gap:gap};},collectStackedStats:function(_61b){var _61c=dojo.clone(dc.defaultStats);if(_61b.length){_61c.hmin=Math.min(_61c.hmin,1);_61c.hmax=df.foldl(_61b,"seed, run -> Math.max(seed, run.data.length)",_61c.hmax);for(var i=0;i<_61c.hmax;++i){var v=_61b[0].data[i];v=v&&(typeof v=="number"?v:v.y);if(isNaN(v)){v=0;}_61c.vmin=Math.min(_61c.vmin,v);for(var j=1;j<_61b.length;++j){var t=_61b[j].data[i];t=t&&(typeof t=="number"?t:t.y);if(isNaN(t)){t=0;}v+=t;}_61c.vmax=Math.max(_61c.vmax,v);}}return _61c;},curve:function(a,_61d){var arr=a.slice(0);if(_61d=="x"){arr[arr.length]=arr[0];}var p=dojo.map(arr,function(item,i){if(i==0){return "M"+item.x+","+item.y;}if(!isNaN(_61d)){var dx=item.x-arr[i-1].x,dy=arr[i-1].y;return "C"+(item.x-(_61d-1)*(dx/_61d))+","+dy+" "+(item.x-(dx/_61d))+","+item.y+" "+item.x+","+item.y;}else{if(_61d=="X"||_61d=="x"||_61d=="S"){var p0,p1=arr[i-1],p2=arr[i],p3;var bz1x,bz1y,bz2x,bz2y;var f=1/6;if(i==1){if(_61d=="x"){p0=arr[arr.length-2];}else{p0=p1;}f=1/3;}else{p0=arr[i-2];}if(i==(arr.length-1)){if(_61d=="x"){p3=arr[1];}else{p3=p2;}f=1/3;}else{p3=arr[i+1];}var p1p2=Math.sqrt((p2.x-p1.x)*(p2.x-p1.x)+(p2.y-p1.y)*(p2.y-p1.y));var p0p2=Math.sqrt((p2.x-p0.x)*(p2.x-p0.x)+(p2.y-p0.y)*(p2.y-p0.y));var p1p3=Math.sqrt((p3.x-p1.x)*(p3.x-p1.x)+(p3.y-p1.y)*(p3.y-p1.y));var _61e=p0p2*f;var _61f=p1p3*f;if(_61e>p1p2/2&&_61f>p1p2/2){_61e=p1p2/2;_61f=p1p2/2;}else{if(_61e>p1p2/2){_61e=p1p2/2;_61f=p1p2/2*p1p3/p0p2;}else{if(_61f>p1p2/2){_61f=p1p2/2;_61e=p1p2/2*p0p2/p1p3;}}}if(_61d=="S"){if(p0==p1){_61e=0;}if(p2==p3){_61f=0;}}bz1x=p1.x+_61e*(p2.x-p0.x)/p0p2;bz1y=p1.y+_61e*(p2.y-p0.y)/p0p2;bz2x=p2.x-_61f*(p3.x-p1.x)/p1p3;bz2y=p2.y-_61f*(p3.y-p1.y)/p1p3;}}return "C"+(bz1x+","+bz1y+" "+bz2x+","+bz2y+" "+p2.x+","+p2.y);});return p.join(" ");},getLabel:function(_620,_621,_622){if(dojo.number){return (_621?dojo.number.format(_620,{places:_622}):dojo.number.format(_620))||"";}return _621?_620.toFixed(_622):_620.toString();}});})();}if(!dojo._hasResource["dojox.charting.scaler.primitive"]){dojo._hasResource["dojox.charting.scaler.primitive"]=true;dojo.provide("dojox.charting.scaler.primitive");dojox.charting.scaler.primitive={buildScaler:function(min,max,span,_623){if(min==max){min-=0.5;max+=0.5;}return {bounds:{lower:min,upper:max,from:min,to:max,scale:span/(max-min),span:span},scaler:dojox.charting.scaler.primitive};},buildTicks:function(_624,_625){return {major:[],minor:[],micro:[]};},getTransformerFromModel:function(_626){var _627=_626.bounds.from,_628=_626.bounds.scale;return function(x){return (x-_627)*_628;};},getTransformerFromPlot:function(_629){var _62a=_629.bounds.from,_62b=_629.bounds.scale;return function(x){return x/_62b+_62a;};}};}if(!dojo._hasResource["dojox.charting.plot2d._PlotEvents"]){dojo._hasResource["dojox.charting.plot2d._PlotEvents"]=true;dojo.provide("dojox.charting.plot2d._PlotEvents");dojo.declare("dojox.charting.plot2d._PlotEvents",null,{constructor:function(){this._shapeEvents=[];this._eventSeries={};},destroy:function(){this.resetEvents();this.inherited(arguments);},plotEvent:function(o){},raiseEvent:function(o){this.plotEvent(o);var t=dojo.delegate(o);t.originalEvent=o.type;t.originalPlot=o.plot;t.type="onindirect";dojo.forEach(this.chart.stack,function(plot){if(plot!==this&&plot.plotEvent){t.plot=plot;plot.plotEvent(t);}},this);},connect:function(_62c,_62d){this.dirty=true;return dojo.connect(this,"plotEvent",_62c,_62d);},events:function(){var ls=this.plotEvent._listeners;if(!ls||!ls.length){return false;}for(var i in ls){if(!(i in Array.prototype)){return true;}}return false;},resetEvents:function(){if(this._shapeEvents.length){dojo.forEach(this._shapeEvents,function(item){item.shape.disconnect(item.handle);});this._shapeEvents=[];}this.raiseEvent({type:"onplotreset",plot:this});},_connectSingleEvent:function(o,_62e){this._shapeEvents.push({shape:o.eventMask,handle:o.eventMask.connect(_62e,this,function(e){o.type=_62e;o.event=e;this.raiseEvent(o);o.event=null;})});},_connectEvents:function(o){if(o){o.chart=this.chart;o.plot=this;o.hAxis=this.hAxis||null;o.vAxis=this.vAxis||null;o.eventMask=o.eventMask||o.shape;this._connectSingleEvent(o,"onmouseover");this._connectSingleEvent(o,"onmouseout");this._connectSingleEvent(o,"onclick");}},_reconnectEvents:function(_62f){var a=this._eventSeries[_62f];if(a){dojo.forEach(a,this._connectEvents,this);}},fireEvent:function(_630,_631,_632,_633){var s=this._eventSeries[_630];if(s&&s.length&&_632<s.length){var o=s[_632];o.type=_631;o.event=_633||null;this.raiseEvent(o);o.event=null;}}});}if(!dojo._hasResource["dojox.charting.plot2d.Base"]){dojo._hasResource["dojox.charting.plot2d.Base"]=true;dojo.provide("dojox.charting.plot2d.Base");dojo.declare("dojox.charting.plot2d.Base",[dojox.charting.Element,dojox.charting.plot2d._PlotEvents],{constructor:function(_634,_635){this.zoom=null,this.zoomQueue=[];this.lastWindow={vscale:1,hscale:1,xoffset:0,yoffset:0};},clear:function(){this.series=[];this._hAxis=null;this._vAxis=null;this.dirty=true;return this;},setAxis:function(axis){if(axis){this[axis.vertical?"_vAxis":"_hAxis"]=axis;}return this;},addSeries:function(run){this.series.push(run);return this;},getSeriesStats:function(){return dojox.charting.plot2d.common.collectSimpleStats(this.series);},calculateAxes:function(dim){this.initializeScalers(dim,this.getSeriesStats());return this;},isDirty:function(){return this.dirty||this._hAxis&&this._hAxis.dirty||this._vAxis&&this._vAxis.dirty;},isDataDirty:function(){return dojo.some(this.series,function(item){return item.dirty;});},performZoom:function(dim,_636){var vs=this._vAxis.scale||1,hs=this._hAxis.scale||1,_637=dim.height-_636.b,_638=this._hScaler.bounds,_639=(_638.from-_638.lower)*_638.scale,_63a=this._vScaler.bounds,_63b=(_63a.from-_63a.lower)*_63a.scale;rVScale=vs/this.lastWindow.vscale,rHScale=hs/this.lastWindow.hscale,rXOffset=(this.lastWindow.xoffset-_639)/((this.lastWindow.hscale==1)?hs:this.lastWindow.hscale),rYOffset=(_63b-this.lastWindow.yoffset)/((this.lastWindow.vscale==1)?vs:this.lastWindow.vscale),shape=this.group,anim=dojox.gfx.fx.animateTransform(dojo.delegate({shape:shape,duration:1200,transform:[{name:"translate",start:[0,0],end:[_636.l*(1-rHScale),_637*(1-rVScale)]},{name:"scale",start:[1,1],end:[rHScale,rVScale]},{name:"original"},{name:"translate",start:[0,0],end:[rXOffset,rYOffset]}]},this.zoom));dojo.mixin(this.lastWindow,{vscale:vs,hscale:hs,xoffset:_639,yoffset:_63b});this.zoomQueue.push(anim);dojo.connect(anim,"onEnd",this,function(){this.zoom=null;this.zoomQueue.shift();if(this.zoomQueue.length>0){this.zoomQueue[0].play();}});if(this.zoomQueue.length==1){this.zoomQueue[0].play();}return this;},render:function(dim,_63c){return this;},getRequiredColors:function(){return this.series.length;},initializeScalers:function(dim,_63d){if(this._hAxis){if(!this._hAxis.initialized()){this._hAxis.calculate(_63d.hmin,_63d.hmax,dim.width);}this._hScaler=this._hAxis.getScaler();}else{this._hScaler=dojox.charting.scaler.primitive.buildScaler(_63d.hmin,_63d.hmax,dim.width);}if(this._vAxis){if(!this._vAxis.initialized()){this._vAxis.calculate(_63d.vmin,_63d.vmax,dim.height);}this._vScaler=this._vAxis.getScaler();}else{this._vScaler=dojox.charting.scaler.primitive.buildScaler(_63d.vmin,_63d.vmax,dim.height);}return this;}});}if(!dojo._hasResource["dojox.lang.functional.reversed"]){dojo._hasResource["dojox.lang.functional.reversed"]=true;dojo.provide("dojox.lang.functional.reversed");(function(){var d=dojo,df=dojox.lang.functional;d.mixin(df,{filterRev:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var t=[],v,i=a.length-1;for(;i>=0;--i){v=a[i];if(f.call(o,v,i,a)){t.push(v);}}return t;},forEachRev:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);for(var i=a.length-1;i>=0;f.call(o,a[i],i,a),--i){}},mapRev:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var n=a.length,t=new Array(n),i=n-1,j=0;for(;i>=0;t[j++]=f.call(o,a[i],i,a),--i){}return t;},everyRev:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);for(var i=a.length-1;i>=0;--i){if(!f.call(o,a[i],i,a)){return false;}}return true;},someRev:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);for(var i=a.length-1;i>=0;--i){if(f.call(o,a[i],i,a)){return true;}}return false;}});})();}if(!dojo._hasResource["dojox.gfx.fx"]){dojo._hasResource["dojox.gfx.fx"]=true;dojo.provide("dojox.gfx.fx");(function(){var d=dojo,g=dojox.gfx,m=g.matrix;function _63e(_63f,end){this.start=_63f,this.end=end;};_63e.prototype.getValue=function(r){return (this.end-this.start)*r+this.start;};function _640(_641,end,_642){this.start=_641,this.end=end;this.units=_642;};_640.prototype.getValue=function(r){return (this.end-this.start)*r+this.start+this.units;};function _643(_644,end){this.start=_644,this.end=end;this.temp=new dojo.Color();};_643.prototype.getValue=function(r){return d.blendColors(this.start,this.end,r,this.temp);};function _645(_646){this.values=_646;this.length=_646.length;};_645.prototype.getValue=function(r){return this.values[Math.min(Math.floor(r*this.length),this.length-1)];};function _647(_648,def){this.values=_648;this.def=def?def:{};};_647.prototype.getValue=function(r){var ret=dojo.clone(this.def);for(var i in this.values){ret[i]=this.values[i].getValue(r);}return ret;};function _649(_64a,_64b){this.stack=_64a;this.original=_64b;};_649.prototype.getValue=function(r){var ret=[];dojo.forEach(this.stack,function(t){if(t instanceof m.Matrix2D){ret.push(t);return;}if(t.name=="original"&&this.original){ret.push(this.original);return;}if(!(t.name in m)){return;}var f=m[t.name];if(typeof f!="function"){ret.push(f);return;}var val=dojo.map(t.start,function(v,i){return (t.end[i]-v)*r+v;}),_64c=f.apply(m,val);if(_64c instanceof m.Matrix2D){ret.push(_64c);}},this);return ret;};var _64d=new d.Color(0,0,0,0);function _64e(prop,obj,name,def){if(prop.values){return new _645(prop.values);}var _64f,_650,end;if(prop.start){_650=g.normalizeColor(prop.start);}else{_650=_64f=obj?(name?obj[name]:obj):def;}if(prop.end){end=g.normalizeColor(prop.end);}else{if(!_64f){_64f=obj?(name?obj[name]:obj):def;}end=_64f;}return new _643(_650,end);};function _651(prop,obj,name,def){if(prop.values){return new _645(prop.values);}var _652,_653,end;if(prop.start){_653=prop.start;}else{_653=_652=obj?obj[name]:def;}if(prop.end){end=prop.end;}else{if(typeof _652!="number"){_652=obj?obj[name]:def;}end=_652;}return new _63e(_653,end);};g.fx.animateStroke=function(args){if(!args.easing){args.easing=d._defaultEasing;}var anim=new d.Animation(args),_654=args.shape,_655;d.connect(anim,"beforeBegin",anim,function(){_655=_654.getStroke();var prop=args.color,_656={},_657,_658,end;if(prop){_656.color=_64e(prop,_655,"color",_64d);}prop=args.style;if(prop&&prop.values){_656.style=new _645(prop.values);}prop=args.width;if(prop){_656.width=_651(prop,_655,"width",1);}prop=args.cap;if(prop&&prop.values){_656.cap=new _645(prop.values);}prop=args.join;if(prop){if(prop.values){_656.join=new _645(prop.values);}else{_658=prop.start?prop.start:(_655&&_655.join||0);end=prop.end?prop.end:(_655&&_655.join||0);if(typeof _658=="number"&&typeof end=="number"){_656.join=new _63e(_658,end);}}}this.curve=new _647(_656,_655);});d.connect(anim,"onAnimate",_654,"setStroke");return anim;};g.fx.animateFill=function(args){if(!args.easing){args.easing=d._defaultEasing;}var anim=new d.Animation(args),_659=args.shape,fill;d.connect(anim,"beforeBegin",anim,function(){fill=_659.getFill();var prop=args.color,_65a={};if(prop){this.curve=_64e(prop,fill,"",_64d);}});d.connect(anim,"onAnimate",_659,"setFill");return anim;};g.fx.animateFont=function(args){if(!args.easing){args.easing=d._defaultEasing;}var anim=new d.Animation(args),_65b=args.shape,font;d.connect(anim,"beforeBegin",anim,function(){font=_65b.getFont();var prop=args.style,_65c={},_65d,_65e,end;if(prop&&prop.values){_65c.style=new _645(prop.values);}prop=args.variant;if(prop&&prop.values){_65c.variant=new _645(prop.values);}prop=args.weight;if(prop&&prop.values){_65c.weight=new _645(prop.values);}prop=args.family;if(prop&&prop.values){_65c.family=new _645(prop.values);}prop=args.size;if(prop&&prop.units){_65e=parseFloat(prop.start?prop.start:(_65b.font&&_65b.font.size||"0"));end=parseFloat(prop.end?prop.end:(_65b.font&&_65b.font.size||"0"));_65c.size=new _640(_65e,end,prop.units);}this.curve=new _647(_65c,font);});d.connect(anim,"onAnimate",_65b,"setFont");return anim;};g.fx.animateTransform=function(args){if(!args.easing){args.easing=d._defaultEasing;}var anim=new d.Animation(args),_65f=args.shape,_660;d.connect(anim,"beforeBegin",anim,function(){_660=_65f.getTransform();this.curve=new _649(args.transform,_660);});d.connect(anim,"onAnimate",_65f,"setTransform");return anim;};})();}if(!dojo._hasResource["dojox.charting.plot2d.Default"]){dojo._hasResource["dojox.charting.plot2d.Default"]=true;dojo.provide("dojox.charting.plot2d.Default");(function(){var df=dojox.lang.functional,du=dojox.lang.utils,dc=dojox.charting.plot2d.common,_661=df.lambda("item.purgeGroup()");var _662=1200;dojo.declare("dojox.charting.plot2d.Default",dojox.charting.plot2d.Base,{defaultParams:{hAxis:"x",vAxis:"y",lines:true,areas:false,markers:false,tension:"",animate:false},optionalParams:{stroke:{},outline:{},shadow:{},fill:{},font:"",fontColor:"",markerStroke:{},markerOutline:{},markerShadow:{},markerFill:{},markerFont:"",markerFontColor:""},constructor:function(_663,_664){this.opt=dojo.clone(this.defaultParams);du.updateWithObject(this.opt,_664);du.updateWithPattern(this.opt,_664,this.optionalParams);this.series=[];this.hAxis=this.opt.hAxis;this.vAxis=this.opt.vAxis;this.animate=this.opt.animate;},render:function(dim,_665){if(this.zoom&&!this.isDataDirty()){return this.performZoom(dim,_665);}this.resetEvents();this.dirty=this.isDirty();if(this.dirty){dojo.forEach(this.series,_661);this._eventSeries={};this.cleanGroup();this.group.setTransform(null);var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,_666,_667,_668,_669=this.events();for(var i=this.series.length-1;i>=0;--i){var run=this.series[i];if(!this.dirty&&!run.dirty){t.skip();this._reconnectEvents(run.name);continue;}run.cleanGroup();if(!run.data.length){run.dirty=false;t.skip();continue;}var _66a=t.next(this.opt.areas?"area":"line",[this.opt,run],true),s=run.group,_66b=[],_66c=[],rseg=null,_66d,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_66e=this._eventSeries[run.name]=new Array(run.data.length);for(var j=0;j<run.data.length;j++){if(run.data[j]!=null){if(!rseg){rseg=[];_66c.push(j);_66b.push(rseg);}rseg.push(run.data[j]);}else{rseg=null;}}for(var seg=0;seg<_66b.length;seg++){if(typeof _66b[seg][0]=="number"){_66d=dojo.map(_66b[seg],function(v,i){return {x:ht(i+_66c[seg]+1)+_665.l,y:dim.height-_665.b-vt(v)};},this);}else{_66d=dojo.map(_66b[seg],function(v,i){return {x:ht(v.x)+_665.l,y:dim.height-_665.b-vt(v.y)};},this);}var _66f=this.opt.tension?dc.curve(_66d,this.opt.tension):"";if(this.opt.areas&&_66d.length>1){var fill=_66a.series.fill;var _670=dojo.clone(_66d);if(this.opt.tension){var _671="L"+_670[_670.length-1].x+","+(dim.height-_665.b)+" L"+_670[0].x+","+(dim.height-_665.b)+" L"+_670[0].x+","+_670[0].y;run.dyn.fill=s.createPath(_66f+" "+_671).setFill(fill).getFill();}else{_670.push({x:_66d[_66d.length-1].x,y:dim.height-_665.b});_670.push({x:_66d[0].x,y:dim.height-_665.b});_670.push(_66d[0]);run.dyn.fill=s.createPolyline(_670).setFill(fill).getFill();}}if(this.opt.lines||this.opt.markers){_666=_66a.series.stroke;if(_66a.series.outline){_667=run.dyn.outline=dc.makeStroke(_66a.series.outline);_667.width=2*_667.width+_666.width;}}if(this.opt.markers){run.dyn.marker=_66a.symbol;}var _672=null,_673=null,_674=null;if(_666&&_66a.series.shadow&&_66d.length>1){var _675=_66a.series.shadow,_676=dojo.map(_66d,function(c){return {x:c.x+_675.dx,y:c.y+_675.dy};});if(this.opt.lines){if(this.opt.tension){run.dyn.shadow=s.createPath(dc.curve(_676,this.opt.tension)).setStroke(_675).getStroke();}else{run.dyn.shadow=s.createPolyline(_676).setStroke(_675).getStroke();}}if(this.opt.markers&&_66a.marker.shadow){_675=_66a.marker.shadow;_674=dojo.map(_676,function(c){return s.createPath("M"+c.x+" "+c.y+" "+_66a.symbol).setStroke(_675).setFill(_675.color);},this);}}if(this.opt.lines&&_66d.length>1){if(_667){if(this.opt.tension){run.dyn.outline=s.createPath(_66f).setStroke(_667).getStroke();}else{run.dyn.outline=s.createPolyline(_66d).setStroke(_667).getStroke();}}if(this.opt.tension){run.dyn.stroke=s.createPath(_66f).setStroke(_666).getStroke();}else{run.dyn.stroke=s.createPolyline(_66d).setStroke(_666).getStroke();}}if(this.opt.markers){_672=new Array(_66d.length);_673=new Array(_66d.length);_667=null;if(_66a.marker.outline){_667=dc.makeStroke(_66a.marker.outline);_667.width=2*_667.width+(_66a.marker.stroke?_66a.marker.stroke.width:0);}dojo.forEach(_66d,function(c,i){var path="M"+c.x+" "+c.y+" "+_66a.symbol;if(_667){_673[i]=s.createPath(path).setStroke(_667);}_672[i]=s.createPath(path).setStroke(_66a.marker.stroke).setFill(_66a.marker.fill);},this);run.dyn.markerFill=_66a.marker.fill;run.dyn.markerStroke=_66a.marker.stroke;if(_669){dojo.forEach(_672,function(s,i){var o={element:"marker",index:i+_66c[seg],run:run,shape:s,outline:_673[i]||null,shadow:_674&&_674[i]||null,cx:_66d[i].x,cy:_66d[i].y};if(typeof _66b[seg][0]=="number"){o.x=i+_66c[seg]+1;o.y=_66b[seg][i];}else{o.x=_66b[seg][i].x;o.y=_66b[seg][i].y;}this._connectEvents(o);_66e[i+_66c[seg]]=o;},this);}else{delete this._eventSeries[run.name];}}}run.dirty=false;}if(this.animate){var _677=this.group;dojox.gfx.fx.animateTransform(dojo.delegate({shape:_677,duration:_662,transform:[{name:"translate",start:[0,dim.height-_665.b],end:[0,0]},{name:"scale",start:[1,0],end:[1,1]},{name:"original"}]},this.animate)).play();}this.dirty=false;return this;}});})();}if(!dojo._hasResource["dojox.charting.plot2d.Lines"]){dojo._hasResource["dojox.charting.plot2d.Lines"]=true;dojo.provide("dojox.charting.plot2d.Lines");dojo.declare("dojox.charting.plot2d.Lines",dojox.charting.plot2d.Default,{constructor:function(){this.opt.lines=true;}});}if(!dojo._hasResource["dojox.charting.plot2d.Areas"]){dojo._hasResource["dojox.charting.plot2d.Areas"]=true;dojo.provide("dojox.charting.plot2d.Areas");dojo.declare("dojox.charting.plot2d.Areas",dojox.charting.plot2d.Default,{constructor:function(){this.opt.lines=true;this.opt.areas=true;}});}if(!dojo._hasResource["dojox.charting.plot2d.Markers"]){dojo._hasResource["dojox.charting.plot2d.Markers"]=true;dojo.provide("dojox.charting.plot2d.Markers");dojo.declare("dojox.charting.plot2d.Markers",dojox.charting.plot2d.Default,{constructor:function(){this.opt.markers=true;}});}if(!dojo._hasResource["dojox.charting.plot2d.MarkersOnly"]){dojo._hasResource["dojox.charting.plot2d.MarkersOnly"]=true;dojo.provide("dojox.charting.plot2d.MarkersOnly");dojo.declare("dojox.charting.plot2d.MarkersOnly",dojox.charting.plot2d.Default,{constructor:function(){this.opt.lines=false;this.opt.markers=true;}});}if(!dojo._hasResource["dojox.gfx.gradutils"]){dojo._hasResource["dojox.gfx.gradutils"]=true;dojo.provide("dojox.gfx.gradutils");(function(){var d=dojo,m=dojox.gfx.matrix,C=d.Color;function _678(o,c){if(o<=0){return c[0].color;}var len=c.length;if(o>=1){return c[len-1].color;}for(var i=0;i<len;++i){var stop=c[i];if(stop.offset>=o){if(i){var prev=c[i-1];return d.blendColors(new C(prev.color),new C(stop.color),(o-prev.offset)/(stop.offset-prev.offset));}return stop.color;}}return c[len-1].color;};dojox.gfx.gradutils.getColor=function(fill,pt){var o;if(fill){switch(fill.type){case "linear":var _679=Math.atan2(fill.y2-fill.y1,fill.x2-fill.x1),_67a=m.rotate(-_679),_67b=m.project(fill.x2-fill.x1,fill.y2-fill.y1),p=m.multiplyPoint(_67b,pt),pf1=m.multiplyPoint(_67b,fill.x1,fill.y1),pf2=m.multiplyPoint(_67b,fill.x2,fill.y2),_67c=m.multiplyPoint(_67a,pf2.x-pf1.x,pf2.y-pf1.y).x,o=m.multiplyPoint(_67a,p.x-pf1.x,p.y-pf1.y).x/_67c;break;case "radial":var dx=pt.x-fill.cx,dy=pt.y-fill.cy,o=Math.sqrt(dx*dx+dy*dy)/fill.r;break;}return _678(o,fill.colors);}return new C(fill||[0,0,0,0]);};dojox.gfx.gradutils.reverse=function(fill){if(fill){switch(fill.type){case "linear":case "radial":fill=dojo.delegate(fill);if(fill.colors){var c=fill.colors,l=c.length,i=0,stop,n=fill.colors=new Array(c.length);for(;i<l;++i){stop=c[i];n[i]={offset:1-stop.offset,color:stop.color};}n.sort(function(a,b){return a.offset-b.offset;});}break;}}return fill;};})();}if(!dojo._hasResource["dojox.charting.plot2d.Scatter"]){dojo._hasResource["dojox.charting.plot2d.Scatter"]=true;dojo.provide("dojox.charting.plot2d.Scatter");(function(){var df=dojox.lang.functional,du=dojox.lang.utils,dc=dojox.charting.plot2d.common,_67d=df.lambda("item.purgeGroup()");dojo.declare("dojox.charting.plot2d.Scatter",dojox.charting.plot2d.Base,{defaultParams:{hAxis:"x",vAxis:"y",shadows:null,animate:null},optionalParams:{markerStroke:{},markerOutline:{},markerShadow:{},markerFill:{},markerFont:"",markerFontColor:""},constructor:function(_67e,_67f){this.opt=dojo.clone(this.defaultParams);du.updateWithObject(this.opt,_67f);du.updateWithPattern(this.opt,_67f,this.optionalParams);this.series=[];this.hAxis=this.opt.hAxis;this.vAxis=this.opt.vAxis;this.animate=this.opt.animate;},render:function(dim,_680){if(this.zoom&&!this.isDataDirty()){return this.performZoom(dim,_680);}this.resetEvents();this.dirty=this.isDirty();if(this.dirty){dojo.forEach(this.series,_67d);this._eventSeries={};this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,_681=this.events();for(var i=this.series.length-1;i>=0;--i){var run=this.series[i];if(!this.dirty&&!run.dirty){t.skip();this._reconnectEvents(run.name);continue;}run.cleanGroup();if(!run.data.length){run.dirty=false;t.skip();continue;}var _682=t.next("marker",[this.opt,run]),s=run.group,_683,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler);if(typeof run.data[0]=="number"){_683=dojo.map(run.data,function(v,i){return {x:ht(i+1)+_680.l,y:dim.height-_680.b-vt(v)};},this);}else{_683=dojo.map(run.data,function(v,i){return {x:ht(v.x)+_680.l,y:dim.height-_680.b-vt(v.y)};},this);}var _684=new Array(_683.length),_685=new Array(_683.length),_686=new Array(_683.length);dojo.forEach(_683,function(c,i){var _687=typeof run.data[i]=="number"?t.post(_682,"marker"):t.addMixin(_682,"marker",run.data[i],true),path="M"+c.x+" "+c.y+" "+_687.symbol;if(_687.marker.shadow){_684[i]=s.createPath("M"+(c.x+_687.marker.shadow.dx)+" "+(c.y+_687.marker.shadow.dy)+" "+_687.symbol).setStroke(_687.marker.shadow).setFill(_687.marker.shadow.color);if(this.animate){this._animateScatter(_684[i],dim.height-_680.b);}}if(_687.marker.outline){var _688=dc.makeStroke(_687.marker.outline);_688.width=2*_688.width+_687.marker.stroke.width;_686[i]=s.createPath(path).setStroke(_688);if(this.animate){this._animateScatter(_686[i],dim.height-_680.b);}}var _689=dc.makeStroke(_687.marker.stroke),fill=this._plotFill(_687.marker.fill,dim,_680);if(fill&&(fill.type==="linear"||fill.type=="radial")){var _68a=dojox.gfx.gradutils.getColor(fill,{x:c.x,y:c.y});if(_689){_689.color=_68a;}_685[i]=s.createPath(path).setStroke(_689).setFill(_68a);}else{_685[i]=s.createPath(path).setStroke(_689).setFill(fill);}if(this.animate){this._animateScatter(_685[i],dim.height-_680.b);}},this);if(_685.length){run.dyn.stroke=_685[_685.length-1].getStroke();run.dyn.fill=_685[_685.length-1].getFill();}if(_681){var _68b=new Array(_685.length);dojo.forEach(_685,function(s,i){var o={element:"marker",index:i,run:run,shape:s,outline:_686&&_686[i]||null,shadow:_684&&_684[i]||null,cx:_683[i].x,cy:_683[i].y};if(typeof run.data[0]=="number"){o.x=i+1;o.y=run.data[i];}else{o.x=run.data[i].x;o.y=run.data[i].y;}this._connectEvents(o);_68b[i]=o;},this);this._eventSeries[run.name]=_68b;}else{delete this._eventSeries[run.name];}run.dirty=false;}this.dirty=false;return this;},_animateScatter:function(_68c,_68d){dojox.gfx.fx.animateTransform(dojo.delegate({shape:_68c,duration:1200,transform:[{name:"translate",start:[0,_68d],end:[0,0]},{name:"scale",start:[0,0],end:[1,1]},{name:"original"}]},this.animate)).play();}});})();}if(!dojo._hasResource["dojox.lang.functional.sequence"]){dojo._hasResource["dojox.lang.functional.sequence"]=true;dojo.provide("dojox.lang.functional.sequence");(function(){var d=dojo,df=dojox.lang.functional;d.mixin(df,{repeat:function(n,f,z,o){o=o||d.global;f=df.lambda(f);var t=new Array(n),i=1;t[0]=z;for(;i<n;t[i]=z=f.call(o,z),++i){}return t;},until:function(pr,f,z,o){o=o||d.global;f=df.lambda(f);pr=df.lambda(pr);var t=[];for(;!pr.call(o,z);t.push(z),z=f.call(o,z)){}return t;}});})();}if(!dojo._hasResource["dojox.charting.plot2d.Stacked"]){dojo._hasResource["dojox.charting.plot2d.Stacked"]=true;dojo.provide("dojox.charting.plot2d.Stacked");(function(){var df=dojox.lang.functional,dc=dojox.charting.plot2d.common,_68e=df.lambda("item.purgeGroup()");dojo.declare("dojox.charting.plot2d.Stacked",dojox.charting.plot2d.Default,{getSeriesStats:function(){var _68f=dc.collectStackedStats(this.series);this._maxRunLength=_68f.hmax;return _68f;},render:function(dim,_690){if(this._maxRunLength<=0){return this;}var acc=df.repeat(this._maxRunLength,"-> 0",0);for(var i=0;i<this.series.length;++i){var run=this.series[i];for(var j=0;j<run.data.length;++j){var v=run.data[j];if(v!==null){if(isNaN(v)){v=0;}acc[j]+=v;}}}if(this.zoom&&!this.isDataDirty()){return this.performZoom(dim,_690);}this.resetEvents();this.dirty=this.isDirty();if(this.dirty){dojo.forEach(this.series,_68e);this._eventSeries={};this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,_691=this.events(),ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler);for(var i=this.series.length-1;i>=0;--i){var run=this.series[i];if(!this.dirty&&!run.dirty){t.skip();this._reconnectEvents(run.name);continue;}run.cleanGroup();var _692=t.next(this.opt.areas?"area":"line",[this.opt,run],true),s=run.group,_693,_694=dojo.map(acc,function(v,i){return {x:ht(i+1)+_690.l,y:dim.height-_690.b-vt(v)};},this);var _695=this.opt.tension?dc.curve(_694,this.opt.tension):"";if(this.opt.areas){var _696=dojo.clone(_694);if(this.opt.tension){var p=dc.curve(_696,this.opt.tension);p+=" L"+_694[_694.length-1].x+","+(dim.height-_690.b)+" L"+_694[0].x+","+(dim.height-_690.b)+" L"+_694[0].x+","+_694[0].y;run.dyn.fill=s.createPath(p).setFill(_692.series.fill).getFill();}else{_696.push({x:_694[_694.length-1].x,y:dim.height-_690.b});_696.push({x:_694[0].x,y:dim.height-_690.b});_696.push(_694[0]);run.dyn.fill=s.createPolyline(_696).setFill(_692.series.fill).getFill();}}if(this.opt.lines||this.opt.markers){if(_692.series.outline){_693=dc.makeStroke(_692.series.outline);_693.width=2*_693.width+_692.series.stroke.width;}}if(this.opt.markers){run.dyn.marker=_692.symbol;}var _697,_698,_699;if(_692.series.shadow&&_692.series.stroke){var _69a=_692.series.shadow,_69b=dojo.map(_694,function(c){return {x:c.x+_69a.dx,y:c.y+_69a.dy};});if(this.opt.lines){if(this.opt.tension){run.dyn.shadow=s.createPath(dc.curve(_69b,this.opt.tension)).setStroke(_69a).getStroke();}else{run.dyn.shadow=s.createPolyline(_69b).setStroke(_69a).getStroke();}}if(this.opt.markers){_69a=_692.marker.shadow;_699=dojo.map(_69b,function(c){return s.createPath("M"+c.x+" "+c.y+" "+_692.symbol).setStroke(_69a).setFill(_69a.color);},this);}}if(this.opt.lines){if(_693){if(this.opt.tension){run.dyn.outline=s.createPath(_695).setStroke(_693).getStroke();}else{run.dyn.outline=s.createPolyline(_694).setStroke(_693).getStroke();}}if(this.opt.tension){run.dyn.stroke=s.createPath(_695).setStroke(_692.series.stroke).getStroke();}else{run.dyn.stroke=s.createPolyline(_694).setStroke(_692.series.stroke).getStroke();}}if(this.opt.markers){_697=new Array(_694.length);_698=new Array(_694.length);_693=null;if(_692.marker.outline){_693=dc.makeStroke(_692.marker.outline);_693.width=2*_693.width+(_692.marker.stroke?_692.marker.stroke.width:0);}dojo.forEach(_694,function(c,i){var path="M"+c.x+" "+c.y+" "+_692.symbol;if(_693){_698[i]=s.createPath(path).setStroke(_693);}_697[i]=s.createPath(path).setStroke(_692.marker.stroke).setFill(_692.marker.fill);},this);if(_691){var _69c=new Array(_697.length);dojo.forEach(_697,function(s,i){var o={element:"marker",index:i,run:run,shape:s,outline:_698[i]||null,shadow:_699&&_699[i]||null,cx:_694[i].x,cy:_694[i].y,x:i+1,y:run.data[i]};this._connectEvents(o);_69c[i]=o;},this);this._eventSeries[run.name]=_69c;}else{delete this._eventSeries[run.name];}}run.dirty=false;for(var j=0;j<run.data.length;++j){var v=run.data[j];if(v!==null){if(isNaN(v)){v=0;}acc[j]-=v;}}}this.dirty=false;return this;}});})();}if(!dojo._hasResource["dojox.charting.plot2d.StackedLines"]){dojo._hasResource["dojox.charting.plot2d.StackedLines"]=true;dojo.provide("dojox.charting.plot2d.StackedLines");dojo.declare("dojox.charting.plot2d.StackedLines",dojox.charting.plot2d.Stacked,{constructor:function(){this.opt.lines=true;}});}if(!dojo._hasResource["dojox.charting.plot2d.StackedAreas"]){dojo._hasResource["dojox.charting.plot2d.StackedAreas"]=true;dojo.provide("dojox.charting.plot2d.StackedAreas");dojo.declare("dojox.charting.plot2d.StackedAreas",dojox.charting.plot2d.Stacked,{constructor:function(){this.opt.lines=true;this.opt.areas=true;}});}if(!dojo._hasResource["dojox.charting.plot2d.Columns"]){dojo._hasResource["dojox.charting.plot2d.Columns"]=true;dojo.provide("dojox.charting.plot2d.Columns");(function(){var df=dojox.lang.functional,du=dojox.lang.utils,dc=dojox.charting.plot2d.common,_69d=df.lambda("item.purgeGroup()");dojo.declare("dojox.charting.plot2d.Columns",dojox.charting.plot2d.Base,{defaultParams:{hAxis:"x",vAxis:"y",gap:0,animate:null},optionalParams:{minBarSize:1,maxBarSize:1,stroke:{},outline:{},shadow:{},fill:{},font:"",fontColor:""},constructor:function(_69e,_69f){this.opt=dojo.clone(this.defaultParams);du.updateWithObject(this.opt,_69f);du.updateWithPattern(this.opt,_69f,this.optionalParams);this.series=[];this.hAxis=this.opt.hAxis;this.vAxis=this.opt.vAxis;this.animate=this.opt.animate;},getSeriesStats:function(){var _6a0=dc.collectSimpleStats(this.series);_6a0.hmin-=0.5;_6a0.hmax+=0.5;return _6a0;},render:function(dim,_6a1){if(this.zoom&&!this.isDataDirty()){return this.performZoom(dim,_6a1);}this.resetEvents();this.dirty=this.isDirty();if(this.dirty){dojo.forEach(this.series,_69d);this._eventSeries={};this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,f,gap,_6a2,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_6a3=Math.max(0,this._vScaler.bounds.lower),_6a4=vt(_6a3),_6a5=this.events();f=dc.calculateBarSize(this._hScaler.bounds.scale,this.opt);gap=f.gap;_6a2=f.size;for(var i=this.series.length-1;i>=0;--i){var run=this.series[i];if(!this.dirty&&!run.dirty){t.skip();this._reconnectEvents(run.name);continue;}run.cleanGroup();var _6a6=t.next("column",[this.opt,run]),s=run.group,_6a7=new Array(run.data.length);for(var j=0;j<run.data.length;++j){var _6a8=run.data[j];if(_6a8!==null){var v=typeof _6a8=="number"?_6a8:_6a8.y,vv=vt(v),_6a9=vv-_6a4,h=Math.abs(_6a9),_6aa=typeof _6a8!="number"?t.addMixin(_6a6,"column",_6a8,true):t.post(_6a6,"column");if(_6a2>=1&&h>=1){var rect={x:_6a1.l+ht(j+0.5)+gap,y:dim.height-_6a1.b-(v>_6a3?vv:_6a4),width:_6a2,height:h};var _6ab=this._plotFill(_6aa.series.fill,dim,_6a1);_6ab=this._shapeFill(_6ab,rect);var _6ac=s.createRect(rect).setFill(_6ab).setStroke(_6aa.series.stroke);run.dyn.fill=_6ac.getFill();run.dyn.stroke=_6ac.getStroke();if(_6a5){var o={element:"column",index:j,run:run,shape:_6ac,x:j+0.5,y:v};this._connectEvents(o);_6a7[j]=o;}if(this.animate){this._animateColumn(_6ac,dim.height-_6a1.b-_6a4,h);}}}}this._eventSeries[run.name]=_6a7;run.dirty=false;}this.dirty=false;return this;},_animateColumn:function(_6ad,_6ae,_6af){dojox.gfx.fx.animateTransform(dojo.delegate({shape:_6ad,duration:1200,transform:[{name:"translate",start:[0,_6ae-(_6ae/_6af)],end:[0,0]},{name:"scale",start:[1,1/_6af],end:[1,1]},{name:"original"}]},this.animate)).play();}});})();}if(!dojo._hasResource["dojox.charting.plot2d.StackedColumns"]){dojo._hasResource["dojox.charting.plot2d.StackedColumns"]=true;dojo.provide("dojox.charting.plot2d.StackedColumns");(function(){var df=dojox.lang.functional,dc=dojox.charting.plot2d.common,_6b0=df.lambda("item.purgeGroup()");dojo.declare("dojox.charting.plot2d.StackedColumns",dojox.charting.plot2d.Columns,{getSeriesStats:function(){var _6b1=dc.collectStackedStats(this.series);this._maxRunLength=_6b1.hmax;_6b1.hmin-=0.5;_6b1.hmax+=0.5;return _6b1;},render:function(dim,_6b2){if(this._maxRunLength<=0){return this;}var acc=df.repeat(this._maxRunLength,"-> 0",0);for(var i=0;i<this.series.length;++i){var run=this.series[i];for(var j=0;j<run.data.length;++j){var _6b3=run.data[j];if(_6b3!==null){var v=typeof _6b3=="number"?_6b3:_6b3.y;if(isNaN(v)){v=0;}acc[j]+=v;}}}if(this.zoom&&!this.isDataDirty()){return this.performZoom(dim,_6b2);}this.resetEvents();this.dirty=this.isDirty();if(this.dirty){dojo.forEach(this.series,_6b0);this._eventSeries={};this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,f,gap,_6b4,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_6b5=this.events();f=dc.calculateBarSize(this._hScaler.bounds.scale,this.opt);gap=f.gap;_6b4=f.size;for(var i=this.series.length-1;i>=0;--i){var run=this.series[i];if(!this.dirty&&!run.dirty){t.skip();this._reconnectEvents(run.name);continue;}run.cleanGroup();var _6b6=t.next("column",[this.opt,run]),s=run.group,_6b7=new Array(acc.length);for(var j=0;j<acc.length;++j){var _6b3=run.data[j];if(_6b3!==null){var v=acc[j],_6b8=vt(v),_6b9=typeof _6b3!="number"?t.addMixin(_6b6,"column",_6b3,true):t.post(_6b6,"column");if(_6b4>=1&&_6b8>=1){var rect={x:_6b2.l+ht(j+0.5)+gap,y:dim.height-_6b2.b-vt(v),width:_6b4,height:_6b8};var _6ba=this._plotFill(_6b9.series.fill,dim,_6b2);_6ba=this._shapeFill(_6ba,rect);var _6bb=s.createRect(rect).setFill(_6ba).setStroke(_6b9.series.stroke);run.dyn.fill=_6bb.getFill();run.dyn.stroke=_6bb.getStroke();if(_6b5){var o={element:"column",index:j,run:run,shape:_6bb,x:j+0.5,y:v};this._connectEvents(o);_6b7[j]=o;}if(this.animate){this._animateColumn(_6bb,dim.height-_6b2.b,_6b8);}}}}this._eventSeries[run.name]=_6b7;run.dirty=false;for(var j=0;j<run.data.length;++j){var _6b3=run.data[j];if(_6b3!==null){var v=typeof _6b3=="number"?_6b3:_6b3.y;if(isNaN(v)){v=0;}acc[j]-=v;}}}this.dirty=false;return this;}});})();}if(!dojo._hasResource["dojox.charting.plot2d.ClusteredColumns"]){dojo._hasResource["dojox.charting.plot2d.ClusteredColumns"]=true;dojo.provide("dojox.charting.plot2d.ClusteredColumns");(function(){var df=dojox.lang.functional,dc=dojox.charting.plot2d.common,_6bc=df.lambda("item.purgeGroup()");dojo.declare("dojox.charting.plot2d.ClusteredColumns",dojox.charting.plot2d.Columns,{render:function(dim,_6bd){if(this.zoom&&!this.isDataDirty()){return this.performZoom(dim,_6bd);}this.resetEvents();this.dirty=this.isDirty();if(this.dirty){dojo.forEach(this.series,_6bc);this._eventSeries={};this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,f,gap,_6be,_6bf,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_6c0=Math.max(0,this._vScaler.bounds.lower),_6c1=vt(_6c0),_6c2=this.events();f=dc.calculateBarSize(this._hScaler.bounds.scale,this.opt,this.series.length);gap=f.gap;_6be=_6bf=f.size;for(var i=0;i<this.series.length;++i){var run=this.series[i],_6c3=_6bf*i;if(!this.dirty&&!run.dirty){t.skip();this._reconnectEvents(run.name);continue;}run.cleanGroup();var _6c4=t.next("column",[this.opt,run]),s=run.group,_6c5=new Array(run.data.length);for(var j=0;j<run.data.length;++j){var _6c6=run.data[j];if(_6c6!==null){var v=typeof _6c6=="number"?_6c6:_6c6.y,vv=vt(v),_6c7=vv-_6c1,h=Math.abs(_6c7),_6c8=typeof _6c6!="number"?t.addMixin(_6c4,"column",_6c6,true):t.post(_6c4,"column");if(_6be>=1&&h>=1){var rect={x:_6bd.l+ht(j+0.5)+gap+_6c3,y:dim.height-_6bd.b-(v>_6c0?vv:_6c1),width:_6be,height:h};var _6c9=this._plotFill(_6c8.series.fill,dim,_6bd);_6c9=this._shapeFill(_6c9,rect);var _6ca=s.createRect(rect).setFill(_6c9).setStroke(_6c8.series.stroke);run.dyn.fill=_6ca.getFill();run.dyn.stroke=_6ca.getStroke();if(_6c2){var o={element:"column",index:j,run:run,shape:_6ca,x:j+0.5,y:v};this._connectEvents(o);_6c5[j]=o;}if(this.animate){this._animateColumn(_6ca,dim.height-_6bd.b-_6c1,h);}}}}this._eventSeries[run.name]=_6c5;run.dirty=false;}this.dirty=false;return this;}});})();}if(!dojo._hasResource["dojox.charting.plot2d.Bars"]){dojo._hasResource["dojox.charting.plot2d.Bars"]=true;dojo.provide("dojox.charting.plot2d.Bars");(function(){var df=dojox.lang.functional,du=dojox.lang.utils,dc=dojox.charting.plot2d.common,_6cb=df.lambda("item.purgeGroup()");dojo.declare("dojox.charting.plot2d.Bars",dojox.charting.plot2d.Base,{defaultParams:{hAxis:"x",vAxis:"y",gap:0,animate:null},optionalParams:{minBarSize:1,maxBarSize:1,stroke:{},outline:{},shadow:{},fill:{},font:"",fontColor:""},constructor:function(_6cc,_6cd){this.opt=dojo.clone(this.defaultParams);du.updateWithObject(this.opt,_6cd);du.updateWithPattern(this.opt,_6cd,this.optionalParams);this.series=[];this.hAxis=this.opt.hAxis;this.vAxis=this.opt.vAxis;this.animate=this.opt.animate;},getSeriesStats:function(){var _6ce=dc.collectSimpleStats(this.series),t;_6ce.hmin-=0.5;_6ce.hmax+=0.5;t=_6ce.hmin,_6ce.hmin=_6ce.vmin,_6ce.vmin=t;t=_6ce.hmax,_6ce.hmax=_6ce.vmax,_6ce.vmax=t;return _6ce;},render:function(dim,_6cf){if(this.zoom&&!this.isDataDirty()){return this.performZoom(dim,_6cf);}this.dirty=this.isDirty();this.resetEvents();if(this.dirty){dojo.forEach(this.series,_6cb);this._eventSeries={};this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,f,gap,_6d0,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_6d1=Math.max(0,this._hScaler.bounds.lower),_6d2=ht(_6d1),_6d3=this.events();f=dc.calculateBarSize(this._vScaler.bounds.scale,this.opt);gap=f.gap;_6d0=f.size;for(var i=this.series.length-1;i>=0;--i){var run=this.series[i];if(!this.dirty&&!run.dirty){t.skip();this._reconnectEvents(run.name);continue;}run.cleanGroup();var _6d4=t.next("bar",[this.opt,run]),s=run.group,_6d5=new Array(run.data.length);for(var j=0;j<run.data.length;++j){var _6d6=run.data[j];if(_6d6!==null){var v=typeof _6d6=="number"?_6d6:_6d6.y,hv=ht(v),_6d7=hv-_6d2,w=Math.abs(_6d7),_6d8=typeof _6d6!="number"?t.addMixin(_6d4,"bar",_6d6,true):t.post(_6d4,"bar");if(w>=1&&_6d0>=1){var rect={x:_6cf.l+(v<_6d1?hv:_6d2),y:dim.height-_6cf.b-vt(j+1.5)+gap,width:w,height:_6d0};var _6d9=this._plotFill(_6d8.series.fill,dim,_6cf);_6d9=this._shapeFill(_6d9,rect);var _6da=s.createRect(rect).setFill(_6d9).setStroke(_6d8.series.stroke);run.dyn.fill=_6da.getFill();run.dyn.stroke=_6da.getStroke();if(_6d3){var o={element:"bar",index:j,run:run,shape:_6da,x:v,y:j+1.5};this._connectEvents(o);_6d5[j]=o;}if(this.animate){this._animateBar(_6da,_6cf.l+_6d2,-w);}}}}this._eventSeries[run.name]=_6d5;run.dirty=false;}this.dirty=false;return this;},_animateBar:function(_6db,_6dc,_6dd){dojox.gfx.fx.animateTransform(dojo.delegate({shape:_6db,duration:1200,transform:[{name:"translate",start:[_6dc-(_6dc/_6dd),0],end:[0,0]},{name:"scale",start:[1/_6dd,1],end:[1,1]},{name:"original"}]},this.animate)).play();}});})();}if(!dojo._hasResource["dojox.charting.plot2d.StackedBars"]){dojo._hasResource["dojox.charting.plot2d.StackedBars"]=true;dojo.provide("dojox.charting.plot2d.StackedBars");(function(){var df=dojox.lang.functional,dc=dojox.charting.plot2d.common,_6de=df.lambda("item.purgeGroup()");dojo.declare("dojox.charting.plot2d.StackedBars",dojox.charting.plot2d.Bars,{getSeriesStats:function(){var _6df=dc.collectStackedStats(this.series),t;this._maxRunLength=_6df.hmax;_6df.hmin-=0.5;_6df.hmax+=0.5;t=_6df.hmin,_6df.hmin=_6df.vmin,_6df.vmin=t;t=_6df.hmax,_6df.hmax=_6df.vmax,_6df.vmax=t;return _6df;},render:function(dim,_6e0){if(this._maxRunLength<=0){return this;}var acc=df.repeat(this._maxRunLength,"-> 0",0);for(var i=0;i<this.series.length;++i){var run=this.series[i];for(var j=0;j<run.data.length;++j){var _6e1=run.data[j];if(_6e1!==null){var v=typeof _6e1=="number"?_6e1:_6e1.y;if(isNaN(v)){v=0;}acc[j]+=v;}}}if(this.zoom&&!this.isDataDirty()){return this.performZoom(dim,_6e0);}this.resetEvents();this.dirty=this.isDirty();if(this.dirty){dojo.forEach(this.series,_6de);this._eventSeries={};this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,f,gap,_6e2,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_6e3=this.events();f=dc.calculateBarSize(this._vScaler.bounds.scale,this.opt);gap=f.gap;_6e2=f.size;for(var i=this.series.length-1;i>=0;--i){var run=this.series[i];if(!this.dirty&&!run.dirty){t.skip();this._reconnectEvents(run.name);continue;}run.cleanGroup();var _6e4=t.next("bar",[this.opt,run]),s=run.group,_6e5=new Array(acc.length);for(var j=0;j<acc.length;++j){var _6e1=run.data[j];if(_6e1!==null){var v=acc[j],_6e6=ht(v),_6e7=typeof _6e1!="number"?t.addMixin(_6e4,"bar",_6e1,true):t.post(_6e4,"bar");if(_6e6>=1&&_6e2>=1){var rect={x:_6e0.l,y:dim.height-_6e0.b-vt(j+1.5)+gap,width:_6e6,height:_6e2};var _6e8=this._plotFill(_6e7.series.fill,dim,_6e0);_6e8=this._shapeFill(_6e8,rect);var _6e9=s.createRect(rect).setFill(_6e8).setStroke(_6e7.series.stroke);run.dyn.fill=_6e9.getFill();run.dyn.stroke=_6e9.getStroke();if(_6e3){var o={element:"bar",index:j,run:run,shape:_6e9,x:v,y:j+1.5};this._connectEvents(o);_6e5[j]=o;}if(this.animate){this._animateBar(_6e9,_6e0.l,-_6e6);}}}}this._eventSeries[run.name]=_6e5;run.dirty=false;for(var j=0;j<run.data.length;++j){var _6e1=run.data[j];if(_6e1!==null){var v=typeof _6e1=="number"?_6e1:_6e1.y;if(isNaN(v)){v=0;}acc[j]-=v;}}}this.dirty=false;return this;}});})();}if(!dojo._hasResource["dojox.charting.plot2d.ClusteredBars"]){dojo._hasResource["dojox.charting.plot2d.ClusteredBars"]=true;dojo.provide("dojox.charting.plot2d.ClusteredBars");(function(){var df=dojox.lang.functional,dc=dojox.charting.plot2d.common,_6ea=df.lambda("item.purgeGroup()");dojo.declare("dojox.charting.plot2d.ClusteredBars",dojox.charting.plot2d.Bars,{render:function(dim,_6eb){if(this.zoom&&!this.isDataDirty()){return this.performZoom(dim,_6eb);}this.resetEvents();this.dirty=this.isDirty();if(this.dirty){dojo.forEach(this.series,_6ea);this._eventSeries={};this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,f,gap,_6ec,_6ed,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_6ee=Math.max(0,this._hScaler.bounds.lower),_6ef=ht(_6ee),_6f0=this.events();f=dc.calculateBarSize(this._vScaler.bounds.scale,this.opt,this.series.length);gap=f.gap;_6ec=_6ed=f.size;for(var i=this.series.length-1;i>=0;--i){var run=this.series[i],_6f1=_6ed*(this.series.length-i-1);if(!this.dirty&&!run.dirty){t.skip();this._reconnectEvents(run.name);continue;}run.cleanGroup();var _6f2=t.next("bar",[this.opt,run]),s=run.group,_6f3=new Array(run.data.length);for(var j=0;j<run.data.length;++j){var _6f4=run.data[j];if(_6f4!==null){var v=typeof _6f4=="number"?_6f4:_6f4.y,hv=ht(v),_6f5=hv-_6ef,w=Math.abs(_6f5),_6f6=typeof _6f4!="number"?t.addMixin(_6f2,"bar",_6f4,true):t.post(_6f2,"bar");if(w>=1&&_6ec>=1){var rect={x:_6eb.l+(v<_6ee?hv:_6ef),y:dim.height-_6eb.b-vt(j+1.5)+gap+_6f1,width:w,height:_6ec};var _6f7=this._plotFill(_6f6.series.fill,dim,_6eb);_6f7=this._shapeFill(_6f7,rect);var _6f8=s.createRect(rect).setFill(_6f7).setStroke(_6f6.series.stroke);run.dyn.fill=_6f8.getFill();run.dyn.stroke=_6f8.getStroke();if(_6f0){var o={element:"bar",index:j,run:run,shape:_6f8,x:v,y:j+1.5};this._connectEvents(o);_6f3[j]=o;}if(this.animate){this._animateBar(_6f8,_6eb.l+_6ef,-_6f5);}}}}this._eventSeries[run.name]=_6f3;run.dirty=false;}this.dirty=false;return this;}});})();}if(!dojo._hasResource["dojox.charting.plot2d.Grid"]){dojo._hasResource["dojox.charting.plot2d.Grid"]=true;dojo.provide("dojox.charting.plot2d.Grid");(function(){var du=dojox.lang.utils,dc=dojox.charting.plot2d.common;dojo.declare("dojox.charting.plot2d.Grid",dojox.charting.Element,{defaultParams:{hAxis:"x",vAxis:"y",hMajorLines:true,hMinorLines:false,vMajorLines:true,vMinorLines:false,hStripes:"none",vStripes:"none",animate:null},optionalParams:{},constructor:function(_6f9,_6fa){this.opt=dojo.clone(this.defaultParams);du.updateWithObject(this.opt,_6fa);this.hAxis=this.opt.hAxis;this.vAxis=this.opt.vAxis;this.dirty=true;this.animate=this.opt.animate;this.zoom=null,this.zoomQueue=[];this.lastWindow={vscale:1,hscale:1,xoffset:0,yoffset:0};},clear:function(){this._hAxis=null;this._vAxis=null;this.dirty=true;return this;},setAxis:function(axis){if(axis){this[axis.vertical?"_vAxis":"_hAxis"]=axis;}return this;},addSeries:function(run){return this;},getSeriesStats:function(){return dojo.delegate(dc.defaultStats);},initializeScalers:function(){return this;},isDirty:function(){return this.dirty||this._hAxis&&this._hAxis.dirty||this._vAxis&&this._vAxis.dirty;},performZoom:function(dim,_6fb){var vs=this._vAxis.scale||1,hs=this._hAxis.scale||1,_6fc=dim.height-_6fb.b,_6fd=this._hAxis.getScaler().bounds,_6fe=(_6fd.from-_6fd.lower)*_6fd.scale,_6ff=this._vAxis.getScaler().bounds,_700=(_6ff.from-_6ff.lower)*_6ff.scale;rVScale=vs/this.lastWindow.vscale,rHScale=hs/this.lastWindow.hscale,rXOffset=(this.lastWindow.xoffset-_6fe)/((this.lastWindow.hscale==1)?hs:this.lastWindow.hscale),rYOffset=(_700-this.lastWindow.yoffset)/((this.lastWindow.vscale==1)?vs:this.lastWindow.vscale),shape=this.group,anim=dojox.gfx.fx.animateTransform(dojo.delegate({shape:shape,duration:1200,transform:[{name:"translate",start:[0,0],end:[_6fb.l*(1-rHScale),_6fc*(1-rVScale)]},{name:"scale",start:[1,1],end:[rHScale,rVScale]},{name:"original"},{name:"translate",start:[0,0],end:[rXOffset,rYOffset]}]},this.zoom));dojo.mixin(this.lastWindow,{vscale:vs,hscale:hs,xoffset:_6fe,yoffset:_700});this.zoomQueue.push(anim);dojo.connect(anim,"onEnd",this,function(){this.zoom=null;this.zoomQueue.shift();if(this.zoomQueue.length>0){this.zoomQueue[0].play();}});if(this.zoomQueue.length==1){this.zoomQueue[0].play();}return this;},getRequiredColors:function(){return 0;},render:function(dim,_701){if(this.zoom){return this.performZoom(dim,_701);}this.dirty=this.isDirty();if(!this.dirty){return this;}this.cleanGroup();var s=this.group,ta=this.chart.theme.axis;try{var _702=this._vAxis.getScaler(),vt=_702.scaler.getTransformerFromModel(_702),_703=this._vAxis.getTicks();if(this.opt.hMinorLines){dojo.forEach(_703.minor,function(tick){var y=dim.height-_701.b-vt(tick.value);var _704=s.createLine({x1:_701.l,y1:y,x2:dim.width-_701.r,y2:y}).setStroke(ta.minorTick);if(this.animate){this._animateGrid(_704,"h",_701.l,_701.r+_701.l-dim.width);}},this);}if(this.opt.hMajorLines){dojo.forEach(_703.major,function(tick){var y=dim.height-_701.b-vt(tick.value);var _705=s.createLine({x1:_701.l,y1:y,x2:dim.width-_701.r,y2:y}).setStroke(ta.majorTick);if(this.animate){this._animateGrid(_705,"h",_701.l,_701.r+_701.l-dim.width);}},this);}}catch(e){}try{var _706=this._hAxis.getScaler(),ht=_706.scaler.getTransformerFromModel(_706),_703=this._hAxis.getTicks();if(_703&&this.opt.vMinorLines){dojo.forEach(_703.minor,function(tick){var x=_701.l+ht(tick.value);var _707=s.createLine({x1:x,y1:_701.t,x2:x,y2:dim.height-_701.b}).setStroke(ta.minorTick);if(this.animate){this._animateGrid(_707,"v",dim.height-_701.b,dim.height-_701.b-_701.t);}},this);}if(_703&&this.opt.vMajorLines){dojo.forEach(_703.major,function(tick){var x=_701.l+ht(tick.value);var _708=s.createLine({x1:x,y1:_701.t,x2:x,y2:dim.height-_701.b}).setStroke(ta.majorTick);if(this.animate){this._animateGrid(_708,"v",dim.height-_701.b,dim.height-_701.b-_701.t);}},this);}}catch(e){}this.dirty=false;return this;},_animateGrid:function(_709,type,_70a,size){var _70b=type=="h"?[_70a,0]:[0,_70a];var _70c=type=="h"?[1/size,1]:[1,1/size];dojox.gfx.fx.animateTransform(dojo.delegate({shape:_709,duration:1200,transform:[{name:"translate",start:_70b,end:[0,0]},{name:"scale",start:_70c,end:[1,1]},{name:"original"}]},this.animate)).play();}});})();}if(!dojo._hasResource["dojox.charting.plot2d.Pie"]){dojo._hasResource["dojox.charting.plot2d.Pie"]=true;dojo.provide("dojox.charting.plot2d.Pie");(function(){var df=dojox.lang.functional,du=dojox.lang.utils,dc=dojox.charting.plot2d.common,da=dojox.charting.axis2d.common,g=dojox.gfx,m=g.matrix,_70d=0.2;dojo.declare("dojox.charting.plot2d.Pie",[dojox.charting.Element,dojox.charting.plot2d._PlotEvents],{defaultParams:{labels:true,ticks:false,fixed:true,precision:1,labelOffset:20,labelStyle:"default",htmlLabels:true,radGrad:"native",fanSize:5,startAngle:0},optionalParams:{radius:0,stroke:{},outline:{},shadow:{},fill:{},font:"",fontColor:"",labelWiring:{}},constructor:function(_70e,_70f){this.opt=dojo.clone(this.defaultParams);du.updateWithObject(this.opt,_70f);du.updateWithPattern(this.opt,_70f,this.optionalParams);this.run=null;this.dyn=[];},clear:function(){this.dirty=true;this.dyn=[];this.run=null;return this;},setAxis:function(axis){return this;},addSeries:function(run){this.run=run;return this;},getSeriesStats:function(){return dojo.delegate(dc.defaultStats);},initializeScalers:function(){return this;},getRequiredColors:function(){return this.run?this.run.data.length:0;},render:function(dim,_710){if(!this.dirty){return this;}this.resetEvents();this.dirty=false;this._eventSeries={};this.cleanGroup();var s=this.group,t=this.chart.theme;if(!this.run||!this.run.data.length){return this;}var rx=(dim.width-_710.l-_710.r)/2,ry=(dim.height-_710.t-_710.b)/2,r=Math.min(rx,ry),_711="font" in this.opt?this.opt.font:t.axis.font,size=_711?g.normalizedLength(g.splitFontString(_711).size):0,_712="fontColor" in this.opt?this.opt.fontColor:t.axis.fontColor,_713=m._degToRad(this.opt.startAngle),_714=_713,step,_715,_716,_717,_718,_719,run=this.run.data,_71a=this.events();if(typeof run[0]=="number"){_715=df.map(run,"x ? Math.max(x, 0) : 0");if(df.every(_715,"<= 0")){return this;}_716=df.map(_715,"/this",df.foldl(_715,"+",0));if(this.opt.labels){_717=dojo.map(_716,function(x){return x>0?this._getLabel(x*100)+"%":"";},this);}}else{_715=df.map(run,"x ? Math.max(x.y, 0) : 0");if(df.every(_715,"<= 0")){return this;}_716=df.map(_715,"/this",df.foldl(_715,"+",0));if(this.opt.labels){_717=dojo.map(_716,function(x,i){if(x<=0){return "";}var v=run[i];return "text" in v?v.text:this._getLabel(x*100)+"%";},this);}}var _71b=df.map(run,function(v,i){if(v===null||typeof v=="number"){return t.next("slice",[this.opt,this.run],true);}return t.next("slice",[this.opt,this.run,v],true);},this);if(this.opt.labels){_718=df.foldl1(df.map(_717,function(_71c,i){var font=_71b[i].series.font;return dojox.gfx._base._getTextBox(_71c,{font:font}).w;},this),"Math.max(a, b)")/2;if(this.opt.labelOffset<0){r=Math.min(rx-2*_718,ry-size)+this.opt.labelOffset;}_719=r-this.opt.labelOffset;}if("radius" in this.opt){r=this.opt.radius;_719=r-this.opt.labelOffset;}var _71d={cx:_710.l+rx,cy:_710.t+ry,r:r};this.dyn=[];var _71e=new Array(_716.length);dojo.some(_716,function(_71f,i){if(_71f<0){return false;}if(_71f==0){this.dyn.push({fill:null,stroke:null});return false;}var v=run[i],_720=_71b[i],_721;if(_71f>=1){_721=this._plotFill(_720.series.fill,dim,_710);_721=this._shapeFill(_721,{x:_71d.cx-_71d.r,y:_71d.cy-_71d.r,width:2*_71d.r,height:2*_71d.r});_721=this._pseudoRadialFill(_721,{x:_71d.cx,y:_71d.cy},_71d.r);var _722=s.createCircle(_71d).setFill(_721).setStroke(_720.series.stroke);this.dyn.push({fill:_721,stroke:_720.series.stroke});if(_71a){var o={element:"slice",index:i,run:this.run,shape:_722,x:i,y:typeof v=="number"?v:v.y,cx:_71d.cx,cy:_71d.cy,cr:r};this._connectEvents(o);_71e[i]=o;}return true;}var end=_714+_71f*2*Math.PI;if(i+1==_716.length){end=_713+2*Math.PI;}var step=end-_714,x1=_71d.cx+r*Math.cos(_714),y1=_71d.cy+r*Math.sin(_714),x2=_71d.cx+r*Math.cos(end),y2=_71d.cy+r*Math.sin(end);var _723=m._degToRad(this.opt.fanSize);if(_720.series.fill&&_720.series.fill.type==="radial"&&this.opt.radGrad==="fan"&&step>_723){var _724=s.createGroup(),_725=Math.ceil(step/_723),_726=step/_725;_721=this._shapeFill(_720.series.fill,{x:_71d.cx-_71d.r,y:_71d.cy-_71d.r,width:2*_71d.r,height:2*_71d.r});for(var j=0;j<_725;++j){var _727=j==0?x1:_71d.cx+r*Math.cos(_714+(j-_70d)*_726),_728=j==0?y1:_71d.cy+r*Math.sin(_714+(j-_70d)*_726),_729=j==_725-1?x2:_71d.cx+r*Math.cos(_714+(j+1+_70d)*_726),_72a=j==_725-1?y2:_71d.cy+r*Math.sin(_714+(j+1+_70d)*_726),fan=_724.createPath({}).moveTo(_71d.cx,_71d.cy).lineTo(_727,_728).arcTo(r,r,0,_726>Math.PI,true,_729,_72a).lineTo(_71d.cx,_71d.cy).closePath().setFill(this._pseudoRadialFill(_721,{x:_71d.cx,y:_71d.cy},r,_714+(j+0.5)*_726,_714+(j+0.5)*_726));}_724.createPath({}).moveTo(_71d.cx,_71d.cy).lineTo(x1,y1).arcTo(r,r,0,step>Math.PI,true,x2,y2).lineTo(_71d.cx,_71d.cy).closePath().setStroke(_720.series.stroke);_722=_724;}else{_722=s.createPath({}).moveTo(_71d.cx,_71d.cy).lineTo(x1,y1).arcTo(r,r,0,step>Math.PI,true,x2,y2).lineTo(_71d.cx,_71d.cy).closePath().setStroke(_720.series.stroke);var _721=_720.series.fill;if(_721&&_721.type==="radial"){_721=this._shapeFill(_721,{x:_71d.cx-_71d.r,y:_71d.cy-_71d.r,width:2*_71d.r,height:2*_71d.r});if(this.opt.radGrad==="linear"){_721=this._pseudoRadialFill(_721,{x:_71d.cx,y:_71d.cy},r,_714,end);}}else{if(_721&&_721.type==="linear"){_721=this._plotFill(_721,dim,_710);_721=this._shapeFill(_721,_722.getBoundingBox());}}_722.setFill(_721);}this.dyn.push({fill:_721,stroke:_720.series.stroke});if(_71a){var o={element:"slice",index:i,run:this.run,shape:_722,x:i,y:typeof v=="number"?v:v.y,cx:_71d.cx,cy:_71d.cy,cr:r};this._connectEvents(o);_71e[i]=o;}_714=end;return false;},this);if(this.opt.labels){if(this.opt.labelStyle=="default"){_714=_713;dojo.some(_716,function(_72b,i){if(_72b<=0){return false;}var _72c=_71b[i];if(_72b>=1){var v=run[i],elem=da.createText[this.opt.htmlLabels&&dojox.gfx.renderer!="vml"?"html":"gfx"](this.chart,s,_71d.cx,_71d.cy+size/2,"middle",_717[i],_72c.series.font,_72c.series.fontColor);if(this.opt.htmlLabels){this.htmlElements.push(elem);}return true;}var end=_714+_72b*2*Math.PI,v=run[i];if(i+1==_716.length){end=_713+2*Math.PI;}var _72d=(_714+end)/2,x=_71d.cx+_719*Math.cos(_72d),y=_71d.cy+_719*Math.sin(_72d)+size/2;var elem=da.createText[this.opt.htmlLabels&&dojox.gfx.renderer!="vml"?"html":"gfx"](this.chart,s,x,y,"middle",_717[i],_72c.series.font,_72c.series.fontColor);if(this.opt.htmlLabels){this.htmlElements.push(elem);}_714=end;return false;},this);}else{if(this.opt.labelStyle=="columns"){_714=_713;var _72e=[];dojo.forEach(_716,function(_72f,i){var end=_714+_72f*2*Math.PI;if(i+1==_716.length){end=_713+2*Math.PI;}var _730=(_714+end)/2;_72e.push({angle:_730,left:Math.cos(_730)<0,theme:_71b[i],index:i,omit:end-_714<0.001});_714=end;});var _731=dojox.gfx._base._getTextBox("a",{font:_711}).h;this._getProperLabelRadius(_72e,_731,_71d.r*1.1);dojo.forEach(_72e,function(_732,i){if(!_732.omit){var _733=_71d.cx-_71d.r*2,_734=_71d.cx+_71d.r*2,_735=dojox.gfx._base._getTextBox(_717[i],{font:_711}).w,x=_71d.cx+_732.labelR*Math.cos(_732.angle),y=_71d.cy+_732.labelR*Math.sin(_732.angle),_736=(_732.left)?(_733+_735):(_734-_735),_737=(_732.left)?_733:_736;var _738=s.createPath().moveTo(_71d.cx+_71d.r*Math.cos(_732.angle),_71d.cy+_71d.r*Math.sin(_732.angle));if(Math.abs(_732.labelR*Math.cos(_732.angle))<_71d.r*2-_735){_738.lineTo(x,y);}_738.lineTo(_736,y).setStroke(_732.theme.series.labelWiring);var elem=da.createText[this.opt.htmlLabels&&dojox.gfx.renderer!="vml"?"html":"gfx"](this.chart,s,_737,y,"left",_717[i],_732.theme.series.font,_732.theme.series.fontColor);if(this.opt.htmlLabels){this.htmlElements.push(elem);}}},this);}}}var esi=0;this._eventSeries[this.run.name]=df.map(run,function(v){return v<=0?null:_71e[esi++];});return this;},_getProperLabelRadius:function(_739,_73a,_73b){var _73c={},_73d={},_73e=1,_73f=1;if(_739.length==1){_739[0].labelR=_73b;return;}for(var i=0;i<_739.length;i++){var _740=Math.abs(Math.sin(_739[i].angle));if(_739[i].left){if(_73e>_740){_73e=_740;_73c=_739[i];}}else{if(_73f>_740){_73f=_740;_73d=_739[i];}}}_73c.labelR=_73d.labelR=_73b;this._caculateLabelR(_73c,_739,_73a);this._caculateLabelR(_73d,_739,_73a);},_caculateLabelR:function(_741,_742,_743){var i=_741.index,_744=_742.length,_745=_741.labelR;while(!(_742[i%_744].left^_742[(i+1)%_744].left)){if(!_742[(i+1)%_744].omit){var _746=(Math.sin(_742[i%_744].angle)*_745+((_742[i%_744].left)?(-_743):_743))/Math.sin(_742[(i+1)%_744].angle);_745=(_746<_741.labelR)?_741.labelR:_746;_742[(i+1)%_744].labelR=_745;}i++;}i=_741.index,j=(i==0)?_744-1:i-1;while(!(_742[i].left^_742[j].left)){if(!_742[j].omit){var _746=(Math.sin(_742[i].angle)*_745+((_742[i].left)?_743:(-_743)))/Math.sin(_742[j].angle);_745=(_746<_741.labelR)?_741.labelR:_746;_742[j].labelR=_745;}i--;j--;i=(i<0)?i+_742.length:i;j=(j<0)?j+_742.length:j;}},_getLabel:function(_747){return dc.getLabel(_747,this.opt.fixed,this.opt.precision);}});})();}if(!dojo._hasResource["dojox.charting.plot2d.Bubble"]){dojo._hasResource["dojox.charting.plot2d.Bubble"]=true;dojo.provide("dojox.charting.plot2d.Bubble");(function(){var df=dojox.lang.functional,du=dojox.lang.utils,dc=dojox.charting.plot2d.common,_748=df.lambda("item.purgeGroup()");dojo.declare("dojox.charting.plot2d.Bubble",dojox.charting.plot2d.Base,{defaultParams:{hAxis:"x",vAxis:"y",animate:null},optionalParams:{stroke:{},outline:{},shadow:{},fill:{},font:"",fontColor:""},constructor:function(_749,_74a){this.opt=dojo.clone(this.defaultParams);du.updateWithObject(this.opt,_74a);du.updateWithPattern(this.opt,_74a,this.optionalParams);this.series=[];this.hAxis=this.opt.hAxis;this.vAxis=this.opt.vAxis;this.animate=this.opt.animate;},render:function(dim,_74b){if(this.zoom&&!this.isDataDirty()){return this.performZoom(dim,_74b);}this.resetEvents();this.dirty=this.isDirty();if(this.dirty){dojo.forEach(this.series,_748);this._eventSeries={};this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_74c=this.events();for(var i=this.series.length-1;i>=0;--i){var run=this.series[i];if(!this.dirty&&!run.dirty){t.skip();this._reconnectEvents(run.name);continue;}run.cleanGroup();if(!run.data.length){run.dirty=false;t.skip();continue;}if(typeof run.data[0]=="number"){console.warn("dojox.charting.plot2d.Bubble: the data in the following series cannot be rendered as a bubble chart; ",run);continue;}var _74d=t.next("circle",[this.opt,run]),s=run.group,_74e=dojo.map(run.data,function(v,i){return v?{x:ht(v.x)+_74b.l,y:dim.height-_74b.b-vt(v.y),radius:this._vScaler.bounds.scale*(v.size/2)}:null;},this);var _74f=null,_750=null,_751=null;if(_74d.series.shadow){_751=dojo.map(_74e,function(item){if(item!==null){var _752=t.addMixin(_74d,"circle",item,true),_753=_752.series.shadow;var _754=s.createCircle({cx:item.x+_753.dx,cy:item.y+_753.dy,r:item.radius}).setStroke(_753).setFill(_753.color);if(this.animate){this._animateBubble(_754,dim.height-_74b.b,item.radius);}return _754;}return null;},this);if(_751.length){run.dyn.shadow=_751[_751.length-1].getStroke();}}if(_74d.series.outline){_750=dojo.map(_74e,function(item){if(item!==null){var _755=t.addMixin(_74d,"circle",item,true),_756=dc.makeStroke(_755.series.outline);_756.width=2*_756.width+_74d.series.stroke.width;var _757=s.createCircle({cx:item.x,cy:item.y,r:item.radius}).setStroke(_756);if(this.animate){this._animateBubble(_757,dim.height-_74b.b,item.radius);}return _757;}return null;},this);if(_750.length){run.dyn.outline=_750[_750.length-1].getStroke();}}_74f=dojo.map(_74e,function(item){if(item!==null){var _758=t.addMixin(_74d,"circle",item,true),rect={x:item.x-item.radius,y:item.y-item.radius,width:2*item.radius,height:2*item.radius};var _759=this._plotFill(_758.series.fill,dim,_74b);_759=this._shapeFill(_759,rect);var _75a=s.createCircle({cx:item.x,cy:item.y,r:item.radius}).setFill(_759).setStroke(_758.series.stroke);if(this.animate){this._animateBubble(_75a,dim.height-_74b.b,item.radius);}return _75a;}return null;},this);if(_74f.length){run.dyn.fill=_74f[_74f.length-1].getFill();run.dyn.stroke=_74f[_74f.length-1].getStroke();}if(_74c){var _75b=new Array(_74f.length);dojo.forEach(_74f,function(s,i){if(s!==null){var o={element:"circle",index:i,run:run,shape:s,outline:_750&&_750[i]||null,shadow:_751&&_751[i]||null,x:run.data[i].x,y:run.data[i].y,r:run.data[i].size/2,cx:_74e[i].x,cy:_74e[i].y,cr:_74e[i].radius};this._connectEvents(o);_75b[i]=o;}},this);this._eventSeries[run.name]=_75b;}else{delete this._eventSeries[run.name];}run.dirty=false;}this.dirty=false;return this;},_animateBubble:function(_75c,_75d,size){dojox.gfx.fx.animateTransform(dojo.delegate({shape:_75c,duration:1200,transform:[{name:"translate",start:[0,_75d],end:[0,0]},{name:"scale",start:[0,1/size],end:[1,1]},{name:"original"}]},this.animate)).play();}});})();}if(!dojo._hasResource["dojox.charting.plot2d.Candlesticks"]){dojo._hasResource["dojox.charting.plot2d.Candlesticks"]=true;dojo.provide("dojox.charting.plot2d.Candlesticks");(function(){var df=dojox.lang.functional,du=dojox.lang.utils,dc=dojox.charting.plot2d.common,_75e=df.lambda("item.purgeGroup()");dojo.declare("dojox.charting.plot2d.Candlesticks",dojox.charting.plot2d.Base,{defaultParams:{hAxis:"x",vAxis:"y",gap:2,animate:null},optionalParams:{minBarSize:1,maxBarSize:1,stroke:{},outline:{},shadow:{},fill:{},font:"",fontColor:""},constructor:function(_75f,_760){this.opt=dojo.clone(this.defaultParams);du.updateWithObject(this.opt,_760);du.updateWithPattern(this.opt,_760,this.optionalParams);this.series=[];this.hAxis=this.opt.hAxis;this.vAxis=this.opt.vAxis;this.animate=this.opt.animate;},collectStats:function(_761){var _762=dojo.delegate(dc.defaultStats);for(var i=0;i<_761.length;i++){var run=_761[i];if(!run.data.length){continue;}var _763=_762.vmin,_764=_762.vmax;if(!("ymin" in run)||!("ymax" in run)){dojo.forEach(run.data,function(val,idx){if(val!==null){var x=val.x||idx+1;_762.hmin=Math.min(_762.hmin,x);_762.hmax=Math.max(_762.hmax,x);_762.vmin=Math.min(_762.vmin,val.open,val.close,val.high,val.low);_762.vmax=Math.max(_762.vmax,val.open,val.close,val.high,val.low);}});}if("ymin" in run){_762.vmin=Math.min(_763,run.ymin);}if("ymax" in run){_762.vmax=Math.max(_764,run.ymax);}}return _762;},getSeriesStats:function(){var _765=this.collectStats(this.series);_765.hmin-=0.5;_765.hmax+=0.5;return _765;},render:function(dim,_766){if(this.zoom&&!this.isDataDirty()){return this.performZoom(dim,_766);}this.resetEvents();this.dirty=this.isDirty();if(this.dirty){dojo.forEach(this.series,_75e);this._eventSeries={};this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,f,gap,_767,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_768=Math.max(0,this._vScaler.bounds.lower),_769=vt(_768),_76a=this.events();f=dc.calculateBarSize(this._hScaler.bounds.scale,this.opt);gap=f.gap;_767=f.size;for(var i=this.series.length-1;i>=0;--i){var run=this.series[i];if(!this.dirty&&!run.dirty){t.skip();this._reconnectEvents(run.name);continue;}run.cleanGroup();var _76b=t.next("candlestick",[this.opt,run]),s=run.group,_76c=new Array(run.data.length);for(var j=0;j<run.data.length;++j){var v=run.data[j];if(v!==null){var _76d=t.addMixin(_76b,"candlestick",v,true);var x=ht(v.x||(j+0.5))+_766.l+gap,y=dim.height-_766.b,open=vt(v.open),_76e=vt(v.close),high=vt(v.high),low=vt(v.low);if("mid" in v){var mid=vt(v.mid);}if(low>high){var tmp=high;high=low;low=tmp;}if(_767>=1){var _76f=open>_76e;var line={x1:_767/2,x2:_767/2,y1:y-high,y2:y-low},rect={x:0,y:y-Math.max(open,_76e),width:_767,height:Math.max(_76f?open-_76e:_76e-open,1)};shape=s.createGroup();shape.setTransform({dx:x,dy:0});var _770=shape.createGroup();_770.createLine(line).setStroke(_76d.series.stroke);_770.createRect(rect).setStroke(_76d.series.stroke).setFill(_76f?_76d.series.fill:"white");if("mid" in v){_770.createLine({x1:(_76d.series.stroke.width||1),x2:_767-(_76d.series.stroke.width||1),y1:y-mid,y2:y-mid}).setStroke(_76f?"white":_76d.series.stroke);}run.dyn.fill=_76d.series.fill;run.dyn.stroke=_76d.series.stroke;if(_76a){var o={element:"candlestick",index:j,run:run,shape:_770,x:x,y:y-Math.max(open,_76e),cx:_767/2,cy:(y-Math.max(open,_76e))+(Math.max(_76f?open-_76e:_76e-open,1)/2),width:_767,height:Math.max(_76f?open-_76e:_76e-open,1),data:v};this._connectEvents(o);_76c[j]=o;}}if(this.animate){this._animateCandlesticks(shape,y-low,high-low);}}}this._eventSeries[run.name]=_76c;run.dirty=false;}this.dirty=false;return this;},_animateCandlesticks:function(_771,_772,_773){dojox.gfx.fx.animateTransform(dojo.delegate({shape:_771,duration:1200,transform:[{name:"translate",start:[0,_772-(_772/_773)],end:[0,0]},{name:"scale",start:[1,1/_773],end:[1,1]},{name:"original"}]},this.animate)).play();}});})();}if(!dojo._hasResource["dojox.charting.plot2d.OHLC"]){dojo._hasResource["dojox.charting.plot2d.OHLC"]=true;dojo.provide("dojox.charting.plot2d.OHLC");(function(){var df=dojox.lang.functional,du=dojox.lang.utils,dc=dojox.charting.plot2d.common,_774=df.lambda("item.purgeGroup()");dojo.declare("dojox.charting.plot2d.OHLC",dojox.charting.plot2d.Base,{defaultParams:{hAxis:"x",vAxis:"y",gap:2,animate:null},optionalParams:{minBarSize:1,maxBarSize:1,stroke:{},outline:{},shadow:{},fill:{},font:"",fontColor:""},constructor:function(_775,_776){this.opt=dojo.clone(this.defaultParams);du.updateWithObject(this.opt,_776);du.updateWithPattern(this.opt,_776,this.optionalParams);this.series=[];this.hAxis=this.opt.hAxis;this.vAxis=this.opt.vAxis;this.animate=this.opt.animate;},collectStats:function(_777){var _778=dojo.delegate(dc.defaultStats);for(var i=0;i<_777.length;i++){var run=_777[i];if(!run.data.length){continue;}var _779=_778.vmin,_77a=_778.vmax;if(!("ymin" in run)||!("ymax" in run)){dojo.forEach(run.data,function(val,idx){if(val!==null){var x=val.x||idx+1;_778.hmin=Math.min(_778.hmin,x);_778.hmax=Math.max(_778.hmax,x);_778.vmin=Math.min(_778.vmin,val.open,val.close,val.high,val.low);_778.vmax=Math.max(_778.vmax,val.open,val.close,val.high,val.low);}});}if("ymin" in run){_778.vmin=Math.min(_779,run.ymin);}if("ymax" in run){_778.vmax=Math.max(_77a,run.ymax);}}return _778;},getSeriesStats:function(){var _77b=this.collectStats(this.series);_77b.hmin-=0.5;_77b.hmax+=0.5;return _77b;},render:function(dim,_77c){if(this.zoom&&!this.isDataDirty()){return this.performZoom(dim,_77c);}this.resetEvents();this.dirty=this.isDirty();if(this.dirty){dojo.forEach(this.series,_774);this._eventSeries={};this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,f,gap,_77d,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_77e=Math.max(0,this._vScaler.bounds.lower),_77f=vt(_77e),_780=this.events();f=dc.calculateBarSize(this._hScaler.bounds.scale,this.opt);gap=f.gap;_77d=f.size;for(var i=this.series.length-1;i>=0;--i){var run=this.series[i];if(!this.dirty&&!run.dirty){t.skip();this._reconnectEvents(run.name);continue;}run.cleanGroup();var _781=t.next("candlestick",[this.opt,run]),s=run.group,_782=new Array(run.data.length);for(var j=0;j<run.data.length;++j){var v=run.data[j];if(v!==null){var _783=t.addMixin(_781,"candlestick",v,true);var x=ht(v.x||(j+0.5))+_77c.l+gap,y=dim.height-_77c.b,open=vt(v.open),_784=vt(v.close),high=vt(v.high),low=vt(v.low);if(low>high){var tmp=high;high=low;low=tmp;}if(_77d>=1){var hl={x1:_77d/2,x2:_77d/2,y1:y-high,y2:y-low},op={x1:0,x2:((_77d/2)+((_783.series.stroke.width||1)/2)),y1:y-open,y2:y-open},cl={x1:((_77d/2)-((_783.series.stroke.width||1)/2)),x2:_77d,y1:y-_784,y2:y-_784};shape=s.createGroup();shape.setTransform({dx:x,dy:0});var _785=shape.createGroup();_785.createLine(hl).setStroke(_783.series.stroke);_785.createLine(op).setStroke(_783.series.stroke);_785.createLine(cl).setStroke(_783.series.stroke);run.dyn.stroke=_783.series.stroke;if(_780){var o={element:"candlestick",index:j,run:run,shape:_785,x:x,y:y-Math.max(open,_784),cx:_77d/2,cy:(y-Math.max(open,_784))+(Math.max(open>_784?open-_784:_784-open,1)/2),width:_77d,height:Math.max(open>_784?open-_784:_784-open,1),data:v};this._connectEvents(o);_782[j]=o;}}if(this.animate){this._animateOHLC(shape,y-low,high-low);}}}this._eventSeries[run.name]=_782;run.dirty=false;}this.dirty=false;return this;},_animateOHLC:function(_786,_787,_788){dojox.gfx.fx.animateTransform(dojo.delegate({shape:_786,duration:1200,transform:[{name:"translate",start:[0,_787-(_787/_788)],end:[0,0]},{name:"scale",start:[1,1/_788],end:[1,1]},{name:"original"}]},this.animate)).play();}});})();}if(!dojo._hasResource["dojo.fx.easing"]){dojo._hasResource["dojo.fx.easing"]=true;dojo.provide("dojo.fx.easing");dojo.getObject("fx.easing",true,dojo);dojo.fx.easing={linear:function(n){return n;},quadIn:function(n){return Math.pow(n,2);},quadOut:function(n){return n*(n-2)*-1;},quadInOut:function(n){n=n*2;if(n<1){return Math.pow(n,2)/2;}return -1*((--n)*(n-2)-1)/2;},cubicIn:function(n){return Math.pow(n,3);},cubicOut:function(n){return Math.pow(n-1,3)+1;},cubicInOut:function(n){n=n*2;if(n<1){return Math.pow(n,3)/2;}n-=2;return (Math.pow(n,3)+2)/2;},quartIn:function(n){return Math.pow(n,4);},quartOut:function(n){return -1*(Math.pow(n-1,4)-1);},quartInOut:function(n){n=n*2;if(n<1){return Math.pow(n,4)/2;}n-=2;return -1/2*(Math.pow(n,4)-2);},quintIn:function(n){return Math.pow(n,5);},quintOut:function(n){return Math.pow(n-1,5)+1;},quintInOut:function(n){n=n*2;if(n<1){return Math.pow(n,5)/2;}n-=2;return (Math.pow(n,5)+2)/2;},sineIn:function(n){return -1*Math.cos(n*(Math.PI/2))+1;},sineOut:function(n){return Math.sin(n*(Math.PI/2));},sineInOut:function(n){return -1*(Math.cos(Math.PI*n)-1)/2;},expoIn:function(n){return (n==0)?0:Math.pow(2,10*(n-1));},expoOut:function(n){return (n==1)?1:(-1*Math.pow(2,-10*n)+1);},expoInOut:function(n){if(n==0){return 0;}if(n==1){return 1;}n=n*2;if(n<1){return Math.pow(2,10*(n-1))/2;}--n;return (-1*Math.pow(2,-10*n)+2)/2;},circIn:function(n){return -1*(Math.sqrt(1-Math.pow(n,2))-1);},circOut:function(n){n=n-1;return Math.sqrt(1-Math.pow(n,2));},circInOut:function(n){n=n*2;if(n<1){return -1/2*(Math.sqrt(1-Math.pow(n,2))-1);}n-=2;return 1/2*(Math.sqrt(1-Math.pow(n,2))+1);},backIn:function(n){var s=1.70158;return Math.pow(n,2)*((s+1)*n-s);},backOut:function(n){n=n-1;var s=1.70158;return Math.pow(n,2)*((s+1)*n+s)+1;},backInOut:function(n){var s=1.70158*1.525;n=n*2;if(n<1){return (Math.pow(n,2)*((s+1)*n-s))/2;}n-=2;return (Math.pow(n,2)*((s+1)*n+s)+2)/2;},elasticIn:function(n){if(n==0||n==1){return n;}var p=0.3;var s=p/4;n=n-1;return -1*Math.pow(2,10*n)*Math.sin((n-s)*(2*Math.PI)/p);},elasticOut:function(n){if(n==0||n==1){return n;}var p=0.3;var s=p/4;return Math.pow(2,-10*n)*Math.sin((n-s)*(2*Math.PI)/p)+1;},elasticInOut:function(n){if(n==0){return 0;}n=n*2;if(n==2){return 1;}var p=0.3*1.5;var s=p/4;if(n<1){n-=1;return -0.5*(Math.pow(2,10*n)*Math.sin((n-s)*(2*Math.PI)/p));}n-=1;return 0.5*(Math.pow(2,-10*n)*Math.sin((n-s)*(2*Math.PI)/p))+1;},bounceIn:function(n){return (1-dojo.fx.easing.bounceOut(1-n));},bounceOut:function(n){var s=7.5625;var p=2.75;var l;if(n<(1/p)){l=s*Math.pow(n,2);}else{if(n<(2/p)){n-=(1.5/p);l=s*Math.pow(n,2)+0.75;}else{if(n<(2.5/p)){n-=(2.25/p);l=s*Math.pow(n,2)+0.9375;}else{n-=(2.625/p);l=s*Math.pow(n,2)+0.984375;}}}return l;},bounceInOut:function(n){if(n<0.5){return dojo.fx.easing.bounceIn(n*2)/2;}return (dojo.fx.easing.bounceOut(n*2-1)/2)+0.5;}};}if(!dojo._hasResource["dojox.charting.plot2d.Spider"]){dojo._hasResource["dojox.charting.plot2d.Spider"]=true;dojo.provide("dojox.charting.plot2d.Spider");dojo.experimental("dojox.charting.plot2d.Spider");(function(){var df=dojox.lang.functional,du=dojox.lang.utils,dc=dojox.charting.plot2d.common,da=dojox.charting.axis2d.common,g=dojox.gfx,m=g.matrix,_789=0.2;dojo.declare("dojox.charting.plot2d.Spider",[dojox.charting.Element,dojox.charting.plot2d._PlotEvents],{defaultParams:{labels:true,ticks:false,fixed:true,precision:1,labelOffset:-10,labelStyle:"default",htmlLabels:true,startAngle:-90,divisions:3,axisColor:"",axisWidth:0,spiderColor:"",spiderWidth:0,seriesWidth:0,seriesFillAlpha:0.2,spiderOrigin:0.16,markerSize:3,spiderType:"polygon",animationType:dojo.fx.easing.backOut,axisTickFont:"",axisTickFontColor:"",axisFont:"",axisFontColor:""},optionalParams:{radius:0,font:"",fontColor:""},constructor:function(_78a,_78b){this.opt=dojo.clone(this.defaultParams);du.updateWithObject(this.opt,_78b);du.updateWithPattern(this.opt,_78b,this.optionalParams);this.series=[];this.dyn=[];this.datas={};this.labelKey=[];this.oldSeriePoints={};this.animations={};},clear:function(){this.dirty=true;this.dyn=[];this.series=[];this.datas={};this.labelKey=[];this.oldSeriePoints={};this.animations={};return this;},setAxis:function(axis){return this;},addSeries:function(run){var _78c=false;this.series.push(run);for(var key in run.data){var val=run.data[key],data=this.datas[key];if(data){data.vlist.push(val);data.min=Math.min(data.min,val);data.max=Math.max(data.max,val);}else{this.datas[key]={min:val,max:val,vlist:[val]};}}if(this.labelKey.length<=0){for(var key in run.data){this.labelKey.push(key);}}return this;},getSeriesStats:function(){return dojox.charting.plot2d.common.collectSimpleStats(this.series);},calculateAxes:function(dim){this.initializeScalers(dim,this.getSeriesStats());return this;},getRequiredColors:function(){return this.series.length;},initializeScalers:function(dim,_78d){if(this._hAxis){if(!this._hAxis.initialized()){this._hAxis.calculate(_78d.hmin,_78d.hmax,dim.width);}this._hScaler=this._hAxis.getScaler();}else{this._hScaler=dojox.charting.scaler.primitive.buildScaler(_78d.hmin,_78d.hmax,dim.width);}if(this._vAxis){if(!this._vAxis.initialized()){this._vAxis.calculate(_78d.vmin,_78d.vmax,dim.height);}this._vScaler=this._vAxis.getScaler();}else{this._vScaler=dojox.charting.scaler.primitive.buildScaler(_78d.vmin,_78d.vmax,dim.height);}return this;},render:function(dim,_78e){if(!this.dirty){return this;}this.dirty=false;this.cleanGroup();var s=this.group,t=this.chart.theme;this.resetEvents();if(!this.series||!this.series.length){return this;}var o=this.opt,ta=t.axis,rx=(dim.width-_78e.l-_78e.r)/2,ry=(dim.height-_78e.t-_78e.b)/2,r=Math.min(rx,ry),_78f=o.font||(ta.majorTick&&ta.majorTick.font)||(ta.tick&&ta.tick.font)||"normal normal normal 7pt Tahoma",_790=o.axisFont||(ta.tick&&ta.tick.titleFont)||"normal normal normal 11pt Tahoma",_791=o.axisTickFontColor||(ta.majorTick&&ta.majorTick.fontColor)||(ta.tick&&ta.tick.fontColor)||"silver",_792=o.axisFontColor||(ta.tick&&ta.tick.titleFontColor)||"black",_793=o.axisColor||(ta.tick&&ta.tick.axisColor)||"silver",_794=o.spiderColor||(ta.tick&&ta.tick.spiderColor)||"silver",_795=o.axisWidth||(ta.stroke&&ta.stroke.width)||2,_796=o.spiderWidth||(ta.stroke&&ta.stroke.width)||2,_797=o.seriesWidth||(ta.stroke&&ta.stroke.width)||2,_798=g.normalizedLength(g.splitFontString(_790).size),_799=m._degToRad(o.startAngle),_79a=_799,step,_79b,_79c,_79d,_79e,_79f,_7a0,_7a1,_7a2,_7a3,_7a4,ro=o.spiderOrigin,dv=o.divisions>=3?o.divisions:3,ms=o.markerSize,spt=o.spiderType,at=o.animationType,_7a5=o.labelOffset<-10?o.labelOffset:-10,_7a6=0.2;if(o.labels){_79d=dojo.map(this.series,function(s){return s.name;},this);_79e=df.foldl1(df.map(_79d,function(_7a7,i){var font=t.series.font;return dojox.gfx._base._getTextBox(_7a7,{font:font}).w;},this),"Math.max(a, b)")/2;r=Math.min(rx-2*_79e,ry-_798)+_7a5;_79f=r-_7a5;}if("radius" in o){r=o.radius;_79f=r-_7a5;}r/=(1+_7a6);var _7a8={cx:_78e.l+rx,cy:_78e.t+ry,r:r};for(var i=this.series.length-1;i>=0;i--){var _7a9=this.series[i];if(!this.dirty&&!_7a9.dirty){t.skip();continue;}_7a9.cleanGroup();var run=_7a9.data;if(run!==null){var len=this._getObjectLength(run);if(!_7a0||_7a0.length<=0){_7a0=[],_7a1=[],_7a4=[];this._buildPoints(_7a0,len,_7a8,r,_79a,true);this._buildPoints(_7a1,len,_7a8,r*ro,_79a,true);this._buildPoints(_7a4,len,_7a8,_79f,_79a);if(dv>2){_7a2=[],_7a3=[];for(var j=0;j<dv-2;j++){_7a2[j]=[];this._buildPoints(_7a2[j],len,_7a8,r*(ro+(1-ro)*(j+1)/(dv-1)),_79a,true);_7a3[j]=r*(ro+(1-ro)*(j+1)/(dv-1));}}}}}var _7aa=s.createGroup(),_7ab={color:_793,width:_795},_7ac={color:_794,width:_796};for(var j=_7a0.length-1;j>=0;--j){var _7ad=_7a0[j],st={x:_7ad.x+(_7ad.x-_7a8.cx)*_7a6,y:_7ad.y+(_7ad.y-_7a8.cy)*_7a6},nd={x:_7ad.x+(_7ad.x-_7a8.cx)*_7a6/2,y:_7ad.y+(_7ad.y-_7a8.cy)*_7a6/2};_7aa.createLine({x1:_7a8.cx,y1:_7a8.cy,x2:st.x,y2:st.y}).setStroke(_7ab);this._drawArrow(_7aa,st,nd,_7ab);}var _7ae=s.createGroup();for(var j=_7a4.length-1;j>=0;--j){var _7ad=_7a4[j],_7af=dojox.gfx._base._getTextBox(this.labelKey[j],{font:_790}).w||0,_7b0=this.opt.htmlLabels&&dojox.gfx.renderer!="vml"?"html":"gfx";elem=da.createText[_7b0](this.chart,_7ae,(!dojo._isBodyLtr()&&_7b0=="html")?(_7ad.x+_7af-dim.width):_7ad.x,_7ad.y,"middle",this.labelKey[j],_790,_792);if(this.opt.htmlLabels){this.htmlElements.push(elem);}}var _7b1=s.createGroup();if(spt=="polygon"){_7b1.createPolyline(_7a0).setStroke(_7ac);_7b1.createPolyline(_7a1).setStroke(_7ac);if(_7a2.length>0){for(var j=_7a2.length-1;j>=0;--j){_7b1.createPolyline(_7a2[j]).setStroke(_7ac);}}}else{var _7b2=this._getObjectLength(this.datas);_7b1.createCircle({cx:_7a8.cx,cy:_7a8.cy,r:r}).setStroke(_7ac);_7b1.createCircle({cx:_7a8.cx,cy:_7a8.cy,r:r*ro}).setStroke(_7ac);if(_7a3.length>0){for(var j=_7a3.length-1;j>=0;--j){_7b1.createCircle({cx:_7a8.cx,cy:_7a8.cy,r:_7a3[j]}).setStroke(_7ac);}}}var _7b3=s.createGroup(),len=this._getObjectLength(this.datas),k=0;for(var key in this.datas){var data=this.datas[key],min=data.min,max=data.max,_7b4=max-min,end=_79a+2*Math.PI*k/len;for(var i=0;i<dv;i++){var text=min+_7b4*i/(dv-1),_7ad=this._getCoordinate(_7a8,r*(ro+(1-ro)*i/(dv-1)),end);text=this._getLabel(text);var _7af=dojox.gfx._base._getTextBox(text,{font:_78f}).w||0,_7b0=this.opt.htmlLabels&&dojox.gfx.renderer!="vml"?"html":"gfx";if(this.opt.htmlLabels){this.htmlElements.push(da.createText[_7b0](this.chart,_7b3,(!dojo._isBodyLtr()&&_7b0=="html")?(_7ad.x+_7af-dim.width):_7ad.x,_7ad.y,"start",text,_78f,_791));}}k++;}this.chart.seriesShapes={};var _7b5=[];for(var i=this.series.length-1;i>=0;i--){var _7a9=this.series[i],run=_7a9.data;if(run!==null){var _7b6=[],k=0,_7b7=[];for(var key in run){var data=this.datas[key],min=data.min,max=data.max,_7b4=max-min,_7b8=run[key],end=_79a+2*Math.PI*k/len,_7ad=this._getCoordinate(_7a8,r*(ro+(1-ro)*(_7b8-min)/_7b4),end);_7b6.push(_7ad);_7b7.push({sname:_7a9.name,key:key,data:_7b8});k++;}_7b6[_7b6.length]=_7b6[0];_7b7[_7b7.length]=_7b7[0];var _7b9=this._getBoundary(_7b6),_7ba=t.next("spider",[o,_7a9]),ts=_7a9.group,f=g.normalizeColor(_7ba.series.fill),sk={color:_7ba.series.fill,width:_797};f.a=o.seriesFillAlpha;_7a9.dyn={fill:f,stroke:sk};var osps=this.oldSeriePoints[_7a9.name];var cs=this._createSeriesEntry(ts,(osps||_7a1),_7b6,f,sk,r,ro,ms,at);this.chart.seriesShapes[_7a9.name]=cs;this.oldSeriePoints[_7a9.name]=_7b6;var po={element:"spider_poly",index:i,id:"spider_poly_"+_7a9.name,run:_7a9,plot:this,shape:cs.poly,parent:ts,brect:_7b9,cx:_7a8.cx,cy:_7a8.cy,cr:r,f:f,s:s};this._connectEvents(po);var so={element:"spider_plot",index:i,id:"spider_plot_"+_7a9.name,run:_7a9,plot:this,shape:_7a9.group};this._connectEvents(so);dojo.forEach(cs.circles,function(c,i){var _7bb=c.getShape(),co={element:"spider_circle",index:i,id:"spider_circle_"+_7a9.name+i,run:_7a9,plot:this,shape:c,parent:ts,tdata:_7b7[i],cx:_7b6[i].x,cy:_7b6[i].y,f:f,s:s};this._connectEvents(co);},this);}}return this;},_createSeriesEntry:function(ts,osps,sps,f,sk,r,ro,ms,at){var _7bc=ts.createPolyline(osps).setFill(f).setStroke(sk),_7bd=[];for(var j=0;j<osps.length;j++){var _7be=osps[j],cr=ms;var _7bf=ts.createCircle({cx:_7be.x,cy:_7be.y,r:cr}).setFill(f).setStroke(sk);_7bd.push(_7bf);}var _7c0=dojo.map(sps,function(np,j){var sp=osps[j],anim=new dojo._Animation({duration:1000,easing:at,curve:[sp.y,np.y]});var spl=_7bc,sc=_7bd[j];dojo.connect(anim,"onAnimate",function(y){var _7c1=spl.getShape();_7c1.points[j].y=y;spl.setShape(_7c1);var _7c2=sc.getShape();_7c2.cy=y;sc.setShape(_7c2);});return anim;});var _7c3=dojo.map(sps,function(np,j){var sp=osps[j],anim=new dojo._Animation({duration:1000,easing:at,curve:[sp.x,np.x]});var spl=_7bc,sc=_7bd[j];dojo.connect(anim,"onAnimate",function(x){var _7c4=spl.getShape();_7c4.points[j].x=x;spl.setShape(_7c4);var _7c5=sc.getShape();_7c5.cx=x;sc.setShape(_7c5);});return anim;});var _7c6=dojo.fx.combine(_7c0.concat(_7c3));_7c6.play();return {group:ts,poly:_7bc,circles:_7bd};},plotEvent:function(o){var _7c7=o.id?o.id:"default",a;if(_7c7 in this.animations){a=this.animations[_7c7];a.anim&&a.anim.stop(true);}else{a=this.animations[_7c7]={};}if(o.element=="spider_poly"){if(!a.color){var _7c8=o.shape.getFill();if(!_7c8||!(_7c8 instanceof dojo.Color)){return;}a.color={start:_7c8,end:_7c9(_7c8)};}var _7ca=a.color.start,end=a.color.end;if(o.type=="onmouseout"){var t=_7ca;_7ca=end;end=t;}a.anim=dojox.gfx.fx.animateFill({shape:o.shape,duration:800,easing:dojo.fx.easing.backOut,color:{start:_7ca,end:end}});a.anim.play();}else{if(o.element=="spider_circle"){var init,_7cb,_7cc=1.5;if(o.type=="onmouseover"){init=dojox.gfx.matrix.identity;_7cb=_7cc;var _7cd={type:"rect"};_7cd.x=o.cx;_7cd.y=o.cy;_7cd.width=_7cd.height=1;var lt=dojo.coords(this.chart.node,true);_7cd.x+=lt.x;_7cd.y+=lt.y;_7cd.x=Math.round(_7cd.x);_7cd.y=Math.round(_7cd.y);_7cd.width=Math.ceil(_7cd.width);_7cd.height=Math.ceil(_7cd.height);this.aroundRect=_7cd;var _7ce=["after","before"];if(dijit&&dijit.Tooltip){dijit.showTooltip(o.tdata.sname+"<br/>"+o.tdata.key+"<br/>"+o.tdata.data,this.aroundRect,_7ce);}}else{init=dojox.gfx.matrix.scaleAt(_7cc,o.cx,o.cy);_7cb=1/_7cc;if(dijit&&dijit.Tooltip){this.aroundRect&&dijit.hideTooltip(this.aroundRect);}}var cs=o.shape.getShape(),init=m.scaleAt(_7cc,cs.cx,cs.cy),_7cf={shape:o.shape,duration:200,easing:dojo.fx.easing.backOut,transform:[{name:"scaleAt",start:[1,cs.cx,cs.cy],end:[_7cb,cs.cx,cs.cy]},init]};a.anim=dojox.gfx.fx.animateTransform(_7cf);a.anim.play();}else{if(o.element=="spider_plot"){if(o.type=="onmouseover"&&!dojo.isIE){o.shape.moveToFront();}}}}},_getBoundary:function(_7d0){var xmax=_7d0[0].x,xmin=_7d0[0].x,ymax=_7d0[0].y,ymin=_7d0[0].y;for(var i=0;i<_7d0.length;i++){var _7d1=_7d0[i];xmax=Math.max(_7d1.x,xmax);ymax=Math.max(_7d1.y,ymax);xmin=Math.min(_7d1.x,xmin);ymin=Math.min(_7d1.y,ymin);}return {x:xmin,y:ymin,width:xmax-xmin,height:ymax-ymin};},_drawArrow:function(s,_7d2,end,_7d3){var len=Math.sqrt(Math.pow(end.x-_7d2.x,2)+Math.pow(end.y-_7d2.y,2)),sin=(end.y-_7d2.y)/len,cos=(end.x-_7d2.x)/len,_7d4={x:end.x+(len/3)*(-sin),y:end.y+(len/3)*cos},_7d5={x:end.x+(len/3)*sin,y:end.y+(len/3)*(-cos)};s.createPolyline([_7d2,_7d4,_7d5]).setFill(_7d3.color).setStroke(_7d3);},_buildPoints:function(_7d6,_7d7,_7d8,_7d9,_7da,_7db){for(var i=0;i<_7d7;i++){var end=_7da+2*Math.PI*i/_7d7;_7d6.push(this._getCoordinate(_7d8,_7d9,end));}if(_7db){_7d6.push(this._getCoordinate(_7d8,_7d9,_7da+2*Math.PI));}},_getCoordinate:function(_7dc,_7dd,_7de){return {x:_7dc.cx+_7dd*Math.cos(_7de),y:_7dc.cy+_7dd*Math.sin(_7de)};},_getObjectLength:function(obj){var _7df=0;if(dojo.isObject(obj)){for(var key in obj){_7df++;}}return _7df;},_getLabel:function(_7e0){return dc.getLabel(_7e0,this.opt.fixed,this.opt.precision);}});function _7c9(_7e1){var a=new dojox.color.Color(_7e1),x=a.toHsl();if(x.s==0){x.l=x.l<50?100:0;}else{x.s=100;if(x.l<50){x.l=75;}else{if(x.l>75){x.l=50;}else{x.l=x.l-50>75-x.l?50:75;}}}var _7e1=dojox.color.fromHsl(x);_7e1.a=0.7;return _7e1;};})();}if(!dojo._hasResource["dojox.lang.functional.fold"]){dojo._hasResource["dojox.lang.functional.fold"]=true;dojo.provide("dojox.lang.functional.fold");(function(){var d=dojo,df=dojox.lang.functional,_7e2={};d.mixin(df,{foldl:function(a,f,z,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var i,n;if(d.isArray(a)){for(i=0,n=a.length;i<n;z=f.call(o,z,a[i],i,a),++i){}}else{if(typeof a.hasNext=="function"&&typeof a.next=="function"){for(i=0;a.hasNext();z=f.call(o,z,a.next(),i++,a)){}}else{for(i in a){if(!(i in _7e2)){z=f.call(o,z,a[i],i,a);}}}}return z;},foldl1:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var z,i,n;if(d.isArray(a)){z=a[0];for(i=1,n=a.length;i<n;z=f.call(o,z,a[i],i,a),++i){}}else{if(typeof a.hasNext=="function"&&typeof a.next=="function"){if(a.hasNext()){z=a.next();for(i=1;a.hasNext();z=f.call(o,z,a.next(),i++,a)){}}}else{var _7e3=true;for(i in a){if(!(i in _7e2)){if(_7e3){z=a[i];_7e3=false;}else{z=f.call(o,z,a[i],i,a);}}}}}return z;},foldr:function(a,f,z,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);for(var i=a.length;i>0;--i,z=f.call(o,z,a[i],i,a)){}return z;},foldr1:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var n=a.length,z=a[n-1],i=n-1;for(;i>0;--i,z=f.call(o,z,a[i],i,a)){}return z;},reduce:function(a,f,z){return arguments.length<3?df.foldl1(a,f):df.foldl(a,f,z);},reduceRight:function(a,f,z){return arguments.length<3?df.foldr1(a,f):df.foldr(a,f,z);},unfold:function(pr,f,g,z,o){o=o||d.global;f=df.lambda(f);g=df.lambda(g);pr=df.lambda(pr);var t=[];for(;!pr.call(o,z);t.push(f.call(o,z)),z=g.call(o,z)){}return t;}});})();}if(!dojo._hasResource["dojox.color._base"]){dojo._hasResource["dojox.color._base"]=true;dojo.provide("dojox.color._base");dojox.color.Color=dojo.Color;dojox.color.blend=dojo.blendColors;dojox.color.fromRgb=dojo.colorFromRgb;dojox.color.fromHex=dojo.colorFromHex;dojox.color.fromArray=dojo.colorFromArray;dojox.color.fromString=dojo.colorFromString;dojox.color.greyscale=dojo.colors.makeGrey;dojo.mixin(dojox.color,{fromCmy:function(cyan,_7e4,_7e5){if(dojo.isArray(cyan)){_7e4=cyan[1],_7e5=cyan[2],cyan=cyan[0];}else{if(dojo.isObject(cyan)){_7e4=cyan.m,_7e5=cyan.y,cyan=cyan.c;}}cyan/=100,_7e4/=100,_7e5/=100;var r=1-cyan,g=1-_7e4,b=1-_7e5;return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});},fromCmyk:function(cyan,_7e6,_7e7,_7e8){if(dojo.isArray(cyan)){_7e6=cyan[1],_7e7=cyan[2],_7e8=cyan[3],cyan=cyan[0];}else{if(dojo.isObject(cyan)){_7e6=cyan.m,_7e7=cyan.y,_7e8=cyan.b,cyan=cyan.c;}}cyan/=100,_7e6/=100,_7e7/=100,_7e8/=100;var r,g,b;r=1-Math.min(1,cyan*(1-_7e8)+_7e8);g=1-Math.min(1,_7e6*(1-_7e8)+_7e8);b=1-Math.min(1,_7e7*(1-_7e8)+_7e8);return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});},fromHsl:function(hue,_7e9,_7ea){if(dojo.isArray(hue)){_7e9=hue[1],_7ea=hue[2],hue=hue[0];}else{if(dojo.isObject(hue)){_7e9=hue.s,_7ea=hue.l,hue=hue.h;}}_7e9/=100;_7ea/=100;while(hue<0){hue+=360;}while(hue>=360){hue-=360;}var r,g,b;if(hue<120){r=(120-hue)/60,g=hue/60,b=0;}else{if(hue<240){r=0,g=(240-hue)/60,b=(hue-120)/60;}else{r=(hue-240)/60,g=0,b=(360-hue)/60;}}r=2*_7e9*Math.min(r,1)+(1-_7e9);g=2*_7e9*Math.min(g,1)+(1-_7e9);b=2*_7e9*Math.min(b,1)+(1-_7e9);if(_7ea<0.5){r*=_7ea,g*=_7ea,b*=_7ea;}else{r=(1-_7ea)*r+2*_7ea-1;g=(1-_7ea)*g+2*_7ea-1;b=(1-_7ea)*b+2*_7ea-1;}return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});},fromHsv:function(hue,_7eb,_7ec){if(dojo.isArray(hue)){_7eb=hue[1],_7ec=hue[2],hue=hue[0];}else{if(dojo.isObject(hue)){_7eb=hue.s,_7ec=hue.v,hue=hue.h;}}if(hue==360){hue=0;}_7eb/=100;_7ec/=100;var r,g,b;if(_7eb==0){r=_7ec,b=_7ec,g=_7ec;}else{var _7ed=hue/60,i=Math.floor(_7ed),f=_7ed-i;var p=_7ec*(1-_7eb);var q=_7ec*(1-(_7eb*f));var t=_7ec*(1-(_7eb*(1-f)));switch(i){case 0:r=_7ec,g=t,b=p;break;case 1:r=q,g=_7ec,b=p;break;case 2:r=p,g=_7ec,b=t;break;case 3:r=p,g=q,b=_7ec;break;case 4:r=t,g=p,b=_7ec;break;case 5:r=_7ec,g=p,b=q;break;}}return new dojox.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});}});dojo.extend(dojox.color.Color,{toCmy:function(){var cyan=1-(this.r/255),_7ee=1-(this.g/255),_7ef=1-(this.b/255);return {c:Math.round(cyan*100),m:Math.round(_7ee*100),y:Math.round(_7ef*100)};},toCmyk:function(){var cyan,_7f0,_7f1,_7f2;var r=this.r/255,g=this.g/255,b=this.b/255;_7f2=Math.min(1-r,1-g,1-b);cyan=(1-r-_7f2)/(1-_7f2);_7f0=(1-g-_7f2)/(1-_7f2);_7f1=(1-b-_7f2)/(1-_7f2);return {c:Math.round(cyan*100),m:Math.round(_7f0*100),y:Math.round(_7f1*100),b:Math.round(_7f2*100)};},toHsl:function(){var r=this.r/255,g=this.g/255,b=this.b/255;var min=Math.min(r,b,g),max=Math.max(r,g,b);var _7f3=max-min;var h=0,s=0,l=(min+max)/2;if(l>0&&l<1){s=_7f3/((l<0.5)?(2*l):(2-2*l));}if(_7f3>0){if(max==r&&max!=g){h+=(g-b)/_7f3;}if(max==g&&max!=b){h+=(2+(b-r)/_7f3);}if(max==b&&max!=r){h+=(4+(r-g)/_7f3);}h*=60;}return {h:h,s:Math.round(s*100),l:Math.round(l*100)};},toHsv:function(){var r=this.r/255,g=this.g/255,b=this.b/255;var min=Math.min(r,b,g),max=Math.max(r,g,b);var _7f4=max-min;var h=null,s=(max==0)?0:(_7f4/max);if(s==0){h=0;}else{if(r==max){h=60*(g-b)/_7f4;}else{if(g==max){h=120+60*(b-r)/_7f4;}else{h=240+60*(r-g)/_7f4;}}if(h<0){h+=360;}}return {h:h,s:Math.round(s*100),v:Math.round(max*100)};}});}if(!dojo._hasResource["dojox.color"]){dojo._hasResource["dojox.color"]=true;dojo.provide("dojox.color");}if(!dojo._hasResource["dojox.color.Palette"]){dojo._hasResource["dojox.color.Palette"]=true;dojo.provide("dojox.color.Palette");(function(){var dxc=dojox.color;dxc.Palette=function(base){this.colors=[];if(base instanceof dojox.color.Palette){this.colors=base.colors.slice(0);}else{if(base instanceof dojox.color.Color){this.colors=[null,null,base,null,null];}else{if(dojo.isArray(base)){this.colors=dojo.map(base.slice(0),function(item){if(dojo.isString(item)){return new dojox.color.Color(item);}return item;});}else{if(dojo.isString(base)){this.colors=[null,null,new dojox.color.Color(base),null,null];}}}}};function _7f5(p,_7f6,val){var ret=new dojox.color.Palette();ret.colors=[];dojo.forEach(p.colors,function(item){var r=(_7f6=="dr")?item.r+val:item.r,g=(_7f6=="dg")?item.g+val:item.g,b=(_7f6=="db")?item.b+val:item.b,a=(_7f6=="da")?item.a+val:item.a;ret.colors.push(new dojox.color.Color({r:Math.min(255,Math.max(0,r)),g:Math.min(255,Math.max(0,g)),b:Math.min(255,Math.max(0,b)),a:Math.min(1,Math.max(0,a))}));});return ret;};function tCMY(p,_7f7,val){var ret=new dojox.color.Palette();ret.colors=[];dojo.forEach(p.colors,function(item){var o=item.toCmy(),c=(_7f7=="dc")?o.c+val:o.c,m=(_7f7=="dm")?o.m+val:o.m,y=(_7f7=="dy")?o.y+val:o.y;ret.colors.push(dojox.color.fromCmy(Math.min(100,Math.max(0,c)),Math.min(100,Math.max(0,m)),Math.min(100,Math.max(0,y))));});return ret;};function _7f8(p,_7f9,val){var ret=new dojox.color.Palette();ret.colors=[];dojo.forEach(p.colors,function(item){var o=item.toCmyk(),c=(_7f9=="dc")?o.c+val:o.c,m=(_7f9=="dm")?o.m+val:o.m,y=(_7f9=="dy")?o.y+val:o.y,k=(_7f9=="dk")?o.b+val:o.b;ret.colors.push(dojox.color.fromCmyk(Math.min(100,Math.max(0,c)),Math.min(100,Math.max(0,m)),Math.min(100,Math.max(0,y)),Math.min(100,Math.max(0,k))));});return ret;};function tHSL(p,_7fa,val){var ret=new dojox.color.Palette();ret.colors=[];dojo.forEach(p.colors,function(item){var o=item.toHsl(),h=(_7fa=="dh")?o.h+val:o.h,s=(_7fa=="ds")?o.s+val:o.s,l=(_7fa=="dl")?o.l+val:o.l;ret.colors.push(dojox.color.fromHsl(h%360,Math.min(100,Math.max(0,s)),Math.min(100,Math.max(0,l))));});return ret;};function tHSV(p,_7fb,val){var ret=new dojox.color.Palette();ret.colors=[];dojo.forEach(p.colors,function(item){var o=item.toHsv(),h=(_7fb=="dh")?o.h+val:o.h,s=(_7fb=="ds")?o.s+val:o.s,v=(_7fb=="dv")?o.v+val:o.v;ret.colors.push(dojox.color.fromHsv(h%360,Math.min(100,Math.max(0,s)),Math.min(100,Math.max(0,v))));});return ret;};function _7fc(val,low,high){return high-((high-val)*((high-low)/high));};dojo.extend(dxc.Palette,{transform:function(_7fd){var fn=_7f5;if(_7fd.use){var use=_7fd.use.toLowerCase();if(use.indexOf("hs")==0){if(use.charAt(2)=="l"){fn=tHSL;}else{fn=tHSV;}}else{if(use.indexOf("cmy")==0){if(use.charAt(3)=="k"){fn=_7f8;}else{fn=tCMY;}}}}else{if("dc" in _7fd||"dm" in _7fd||"dy" in _7fd){if("dk" in _7fd){fn=_7f8;}else{fn=tCMY;}}else{if("dh" in _7fd||"ds" in _7fd){if("dv" in _7fd){fn=tHSV;}else{fn=tHSL;}}}}var _7fe=this;for(var p in _7fd){if(p=="use"){continue;}_7fe=fn(_7fe,p,_7fd[p]);}return _7fe;},clone:function(){return new dxc.Palette(this);}});dojo.mixin(dxc.Palette,{generators:{analogous:function(args){var high=args.high||60,low=args.low||18,base=dojo.isString(args.base)?new dojox.color.Color(args.base):args.base,hsv=base.toHsv();var h=[(hsv.h+low+360)%360,(hsv.h+Math.round(low/2)+360)%360,hsv.h,(hsv.h-Math.round(high/2)+360)%360,(hsv.h-high+360)%360];var s1=Math.max(10,(hsv.s<=95)?hsv.s+5:(100-(hsv.s-95))),s2=(hsv.s>1)?hsv.s-1:21-hsv.s,v1=(hsv.v>=92)?hsv.v-9:Math.max(hsv.v+9,20),v2=(hsv.v<=90)?Math.max(hsv.v+5,20):(95+Math.ceil((hsv.v-90)/2)),s=[s1,s2,hsv.s,s1,s1],v=[v1,v2,hsv.v,v1,v2];return new dxc.Palette(dojo.map(h,function(hue,i){return dojox.color.fromHsv(hue,s[i],v[i]);}));},monochromatic:function(args){var base=dojo.isString(args.base)?new dojox.color.Color(args.base):args.base,hsv=base.toHsv();var s1=(hsv.s-30>9)?hsv.s-30:hsv.s+30,s2=hsv.s,v1=_7fc(hsv.v,20,100),v2=(hsv.v-20>20)?hsv.v-20:hsv.v+60,v3=(hsv.v-50>20)?hsv.v-50:hsv.v+30;return new dxc.Palette([dojox.color.fromHsv(hsv.h,s1,v1),dojox.color.fromHsv(hsv.h,s2,v3),base,dojox.color.fromHsv(hsv.h,s1,v3),dojox.color.fromHsv(hsv.h,s2,v2)]);},triadic:function(args){var base=dojo.isString(args.base)?new dojox.color.Color(args.base):args.base,hsv=base.toHsv();var h1=(hsv.h+57+360)%360,h2=(hsv.h-157+360)%360,s1=(hsv.s>20)?hsv.s-10:hsv.s+10,s2=(hsv.s>90)?hsv.s-10:hsv.s+10,s3=(hsv.s>95)?hsv.s-5:hsv.s+5,v1=(hsv.v-20>20)?hsv.v-20:hsv.v+20,v2=(hsv.v-30>20)?hsv.v-30:hsv.v+30,v3=(hsv.v-30>70)?hsv.v-30:hsv.v+30;return new dxc.Palette([dojox.color.fromHsv(h1,s1,hsv.v),dojox.color.fromHsv(hsv.h,s2,v2),base,dojox.color.fromHsv(h2,s2,v1),dojox.color.fromHsv(h2,s3,v3)]);},complementary:function(args){var base=dojo.isString(args.base)?new dojox.color.Color(args.base):args.base,hsv=base.toHsv();var h1=((hsv.h*2)+137<360)?(hsv.h*2)+137:Math.floor(hsv.h/2)-137,s1=Math.max(hsv.s-10,0),s2=_7fc(hsv.s,10,100),s3=Math.min(100,hsv.s+20),v1=Math.min(100,hsv.v+30),v2=(hsv.v>20)?hsv.v-30:hsv.v+30;return new dxc.Palette([dojox.color.fromHsv(hsv.h,s1,v1),dojox.color.fromHsv(hsv.h,s2,v2),base,dojox.color.fromHsv(h1,s3,v2),dojox.color.fromHsv(h1,hsv.s,hsv.v)]);},splitComplementary:function(args){var base=dojo.isString(args.base)?new dojox.color.Color(args.base):args.base,_7ff=args.da||30,hsv=base.toHsv();var _800=((hsv.h*2)+137<360)?(hsv.h*2)+137:Math.floor(hsv.h/2)-137,h1=(_800-_7ff+360)%360,h2=(_800+_7ff)%360,s1=Math.max(hsv.s-10,0),s2=_7fc(hsv.s,10,100),s3=Math.min(100,hsv.s+20),v1=Math.min(100,hsv.v+30),v2=(hsv.v>20)?hsv.v-30:hsv.v+30;return new dxc.Palette([dojox.color.fromHsv(h1,s1,v1),dojox.color.fromHsv(h1,s2,v2),base,dojox.color.fromHsv(h2,s3,v2),dojox.color.fromHsv(h2,hsv.s,hsv.v)]);},compound:function(args){var base=dojo.isString(args.base)?new dojox.color.Color(args.base):args.base,hsv=base.toHsv();var h1=((hsv.h*2)+18<360)?(hsv.h*2)+18:Math.floor(hsv.h/2)-18,h2=((hsv.h*2)+120<360)?(hsv.h*2)+120:Math.floor(hsv.h/2)-120,h3=((hsv.h*2)+99<360)?(hsv.h*2)+99:Math.floor(hsv.h/2)-99,s1=(hsv.s-40>10)?hsv.s-40:hsv.s+40,s2=(hsv.s-10>80)?hsv.s-10:hsv.s+10,s3=(hsv.s-25>10)?hsv.s-25:hsv.s+25,v1=(hsv.v-40>10)?hsv.v-40:hsv.v+40,v2=(hsv.v-20>80)?hsv.v-20:hsv.v+20,v3=Math.max(hsv.v,20);return new dxc.Palette([dojox.color.fromHsv(h1,s1,v1),dojox.color.fromHsv(h1,s2,v2),base,dojox.color.fromHsv(h2,s3,v3),dojox.color.fromHsv(h3,s2,v2)]);},shades:function(args){var base=dojo.isString(args.base)?new dojox.color.Color(args.base):args.base,hsv=base.toHsv();var s=(hsv.s==100&&hsv.v==0)?0:hsv.s,v1=(hsv.v-50>20)?hsv.v-50:hsv.v+30,v2=(hsv.v-25>=20)?hsv.v-25:hsv.v+55,v3=(hsv.v-75>=20)?hsv.v-75:hsv.v+5,v4=Math.max(hsv.v-10,20);return new dxc.Palette([new dojox.color.fromHsv(hsv.h,s,v1),new dojox.color.fromHsv(hsv.h,s,v2),base,new dojox.color.fromHsv(hsv.h,s,v3),new dojox.color.fromHsv(hsv.h,s,v4)]);}},generate:function(base,type){if(dojo.isFunction(type)){return type({base:base});}else{if(dxc.Palette.generators[type]){return dxc.Palette.generators[type]({base:base});}}throw new Error("dojox.color.Palette.generate: the specified generator ('"+type+"') does not exist.");}});})();}if(!dojo._hasResource["dojox.charting.Theme"]){dojo._hasResource["dojox.charting.Theme"]=true;dojo.provide("dojox.charting.Theme");dojo.declare("dojox.charting.Theme",null,{shapeSpaces:{shape:1,shapeX:1,shapeY:1},constructor:function(_801){_801=_801||{};var def=dojox.charting.Theme.defaultTheme;dojo.forEach(["chart","plotarea","axis","series","marker"],function(name){this[name]=dojo.delegate(def[name],_801[name]);},this);if(_801.seriesThemes&&_801.seriesThemes.length){this.colors=null;this.seriesThemes=_801.seriesThemes.slice(0);}else{this.seriesThemes=null;this.colors=(_801.colors||dojox.charting.Theme.defaultColors).slice(0);}this.markerThemes=null;if(_801.markerThemes&&_801.markerThemes.length){this.markerThemes=_801.markerThemes.slice(0);}this.markers=_801.markers?dojo.clone(_801.markers):dojo.delegate(dojox.charting.Theme.defaultMarkers);this.noGradConv=_801.noGradConv;this.noRadialConv=_801.noRadialConv;if(_801.reverseFills){this.reverseFills();}this._current=0;this._buildMarkerArray();},clone:function(){var _802=new dojox.charting.Theme({chart:this.chart,plotarea:this.plotarea,axis:this.axis,series:this.series,marker:this.marker,colors:this.colors,markers:this.markers,seriesThemes:this.seriesThemes,markerThemes:this.markerThemes,noGradConv:this.noGradConv,noRadialConv:this.noRadialConv});dojo.forEach(["clone","clear","next","skip","addMixin","post","getTick"],function(name){if(this.hasOwnProperty(name)){_802[name]=this[name];}},this);return _802;},clear:function(){this._current=0;},next:function(_803,_804,_805){var _806=dojox.lang.utils.merge,_807,_808;if(this.colors){_807=dojo.delegate(this.series);_808=dojo.delegate(this.marker);var _809=new dojo.Color(this.colors[this._current%this.colors.length]),old;if(_807.stroke&&_807.stroke.color){_807.stroke=dojo.delegate(_807.stroke);old=new dojo.Color(_807.stroke.color);_807.stroke.color=new dojo.Color(_809);_807.stroke.color.a=old.a;}else{_807.stroke={color:_809};}if(_808.stroke&&_808.stroke.color){_808.stroke=dojo.delegate(_808.stroke);old=new dojo.Color(_808.stroke.color);_808.stroke.color=new dojo.Color(_809);_808.stroke.color.a=old.a;}else{_808.stroke={color:_809};}if(!_807.fill||_807.fill.type){_807.fill=_809;}else{old=new dojo.Color(_807.fill);_807.fill=new dojo.Color(_809);_807.fill.a=old.a;}if(!_808.fill||_808.fill.type){_808.fill=_809;}else{old=new dojo.Color(_808.fill);_808.fill=new dojo.Color(_809);_808.fill.a=old.a;}}else{_807=this.seriesThemes?_806(this.series,this.seriesThemes[this._current%this.seriesThemes.length]):this.series;_808=this.markerThemes?_806(this.marker,this.markerThemes[this._current%this.markerThemes.length]):_807;}var _80a=_808&&_808.symbol||this._markers[this._current%this._markers.length];var _80b={series:_807,marker:_808,symbol:_80a};++this._current;if(_804){_80b=this.addMixin(_80b,_803,_804);}if(_805){_80b=this.post(_80b,_803);}return _80b;},skip:function(){++this._current;},addMixin:function(_80c,_80d,_80e,_80f){if(dojo.isArray(_80e)){dojo.forEach(_80e,function(m){_80c=this.addMixin(_80c,_80d,m);},this);}else{var t={};if("color" in _80e){if(_80d=="line"||_80d=="area"){dojo.setObject("series.stroke.color",_80e.color,t);dojo.setObject("marker.stroke.color",_80e.color,t);}else{dojo.setObject("series.fill",_80e.color,t);}}dojo.forEach(["stroke","outline","shadow","fill","font","fontColor","labelWiring"],function(name){var _810="marker"+name.charAt(0).toUpperCase()+name.substr(1),b=_810 in _80e;if(name in _80e){dojo.setObject("series."+name,_80e[name],t);if(!b){dojo.setObject("marker."+name,_80e[name],t);}}if(b){dojo.setObject("marker."+name,_80e[_810],t);}});if("marker" in _80e){t.symbol=_80e.marker;}_80c=dojox.lang.utils.merge(_80c,t);}if(_80f){_80c=this.post(_80c,_80d);}return _80c;},post:function(_811,_812){var fill=_811.series.fill,t;if(!this.noGradConv&&this.shapeSpaces[fill.space]&&fill.type=="linear"){if(_812=="bar"){t={x1:fill.y1,y1:fill.x1,x2:fill.y2,y2:fill.x2};}else{if(!this.noRadialConv&&fill.space=="shape"&&(_812=="slice"||_812=="circle")){t={type:"radial",cx:0,cy:0,r:100};}}if(t){return dojox.lang.utils.merge(_811,{series:{fill:t}});}}return _811;},getTick:function(name,_813){var tick=this.axis.tick,_814=name+"Tick";merge=dojox.lang.utils.merge;if(tick){if(this.axis[_814]){tick=merge(tick,this.axis[_814]);}}else{tick=this.axis[_814];}if(_813){if(tick){if(_813[_814]){tick=merge(tick,_813[_814]);}}else{tick=_813[_814];}}return tick;},inspectObjects:function(f){dojo.forEach(["chart","plotarea","axis","series","marker"],function(name){f(this[name]);},this);if(this.seriesThemes){dojo.forEach(this.seriesThemes,f);}if(this.markerThemes){dojo.forEach(this.markerThemes,f);}},reverseFills:function(){this.inspectObjects(function(o){if(o&&o.fill){o.fill=dojox.gfx.gradutils.reverse(o.fill);}});},addMarker:function(name,_815){this.markers[name]=_815;this._buildMarkerArray();},setMarkers:function(obj){this.markers=obj;this._buildMarkerArray();},_buildMarkerArray:function(){this._markers=[];for(var p in this.markers){this._markers.push(this.markers[p]);}}});dojo.mixin(dojox.charting.Theme,{defaultMarkers:{CIRCLE:"m-3,0 c0,-4 6,-4 6,0 m-6,0 c0,4 6,4 6,0",SQUARE:"m-3,-3 l0,6 6,0 0,-6 z",DIAMOND:"m0,-3 l3,3 -3,3 -3,-3 z",CROSS:"m0,-3 l0,6 m-3,-3 l6,0",X:"m-3,-3 l6,6 m0,-6 l-6,6",TRIANGLE:"m-3,3 l3,-6 3,6 z",TRIANGLE_INVERTED:"m-3,-3 l3,6 3,-6 z"},defaultColors:["#54544c","#858e94","#6e767a","#948585","#474747"],defaultTheme:{chart:{stroke:null,fill:"white",pageStyle:null,titleGap:20,titlePos:"top",titleFont:"normal normal bold 14pt Tahoma",titleFontColor:"#333"},plotarea:{stroke:null,fill:"white"},axis:{stroke:{color:"#333",width:1},tick:{color:"#666",position:"center",font:"normal normal normal 7pt Tahoma",fontColor:"#333",titleGap:15,titleFont:"normal normal normal 11pt Tahoma",titleFontColor:"#333",titleOrientation:"axis"},majorTick:{width:1,length:6},minorTick:{width:0.8,length:3},microTick:{width:0.5,length:1}},series:{stroke:{width:1.5,color:"#333"},outline:{width:0.1,color:"#ccc"},shadow:null,fill:"#ccc",font:"normal normal normal 8pt Tahoma",fontColor:"#000",labelWiring:{width:1,color:"#ccc"}},marker:{stroke:{width:1.5,color:"#333"},outline:{width:0.1,color:"#ccc"},shadow:null,fill:"#ccc",font:"normal normal normal 8pt Tahoma",fontColor:"#000"}},defineColors:function(_816){_816=_816||{};var c=[],n=_816.num||5;if(_816.colors){var l=_816.colors.length;for(var i=0;i<n;i++){c.push(_816.colors[i%l]);}return c;}if(_816.hue){var s=_816.saturation||100;var st=_816.low||30;var end=_816.high||90;var l=(end+st)/2;return dojox.color.Palette.generate(dojox.color.fromHsv(_816.hue,s,l),"monochromatic").colors;}if(_816.generator){return dojox.color.Palette.generate(_816.base,_816.generator).colors;}return c;},generateGradient:function(_817,_818,_819){var fill=dojo.delegate(_817);fill.colors=[{offset:0,color:_818},{offset:1,color:_819}];return fill;},generateHslColor:function(_81a,_81b){_81a=new dojox.color.Color(_81a);var hsl=_81a.toHsl(),_81c=dojox.color.fromHsl(hsl.h,hsl.s,_81b);_81c.a=_81a.a;return _81c;},generateHslGradient:function(_81d,_81e,_81f,_820){_81d=new dojox.color.Color(_81d);var hsl=_81d.toHsl(),_821=dojox.color.fromHsl(hsl.h,hsl.s,_81f),_822=dojox.color.fromHsl(hsl.h,hsl.s,_820);_821.a=_822.a=_81d.a;return dojox.charting.Theme.generateGradient(_81e,_821,_822);}});}if(!dojo._hasResource["dojox.charting.Series"]){dojo._hasResource["dojox.charting.Series"]=true;dojo.provide("dojox.charting.Series");dojo.declare("dojox.charting.Series",dojox.charting.Element,{constructor:function(_823,data,_824){dojo.mixin(this,_824);if(typeof this.plot!="string"){this.plot="default";}this.update(data);},clear:function(){this.dyn={};},update:function(data){if(dojo.isArray(data)){this.data=data;}else{this.source=data;this.data=this.source.data;if(this.source.setSeriesObject){this.source.setSeriesObject(this);}}this.dirty=true;this.clear();}});}if(!dojo._hasResource["dojox.charting.Chart"]){dojo._hasResource["dojox.charting.Chart"]=true;dojo.provide("dojox.charting.Chart");(function(){var df=dojox.lang.functional,dc=dojox.charting,g=dojox.gfx,_825=df.lambda("item.clear()"),_826=df.lambda("item.purgeGroup()"),_827=df.lambda("item.destroy()"),_828=df.lambda("item.dirty = false"),_829=df.lambda("item.dirty = true"),_82a=df.lambda("item.name");dojo.declare("dojox.charting.Chart",null,{constructor:function(node,_82b){if(!_82b){_82b={};}this.margins=_82b.margins?_82b.margins:{l:10,t:10,r:10,b:10};this.stroke=_82b.stroke;this.fill=_82b.fill;this.delayInMs=_82b.delayInMs||200;this.title=_82b.title;this.titleGap=_82b.titleGap;this.titlePos=_82b.titlePos;this.titleFont=_82b.titleFont;this.titleFontColor=_82b.titleFontColor;this.chartTitle=null;this.theme=null;this.axes={};this.stack=[];this.plots={};this.series=[];this.runs={};this.dirty=true;this.coords=null;this.node=dojo.byId(node);var box=dojo.marginBox(node);this.surface=g.createSurface(this.node,box.w||400,box.h||300);},destroy:function(){dojo.forEach(this.series,_827);dojo.forEach(this.stack,_827);df.forIn(this.axes,_827);if(this.chartTitle&&this.chartTitle.tagName){dojo.destroy(this.chartTitle);}this.surface.destroy();},getCoords:function(){if(!this.coords){this.coords=dojo.coords(this.node,true);}return this.coords;},setTheme:function(_82c){this.theme=_82c.clone();this.dirty=true;return this;},addAxis:function(name,_82d){var axis,_82e=_82d&&_82d.type||"Default";if(typeof _82e=="string"){if(!dc.axis2d||!dc.axis2d[_82e]){throw Error("Can't find axis: "+_82e+" - didn't you forget to dojo"+".require() it?");}axis=new dc.axis2d[_82e](this,_82d);}else{axis=new _82e(this,_82d);}axis.name=name;axis.dirty=true;if(name in this.axes){this.axes[name].destroy();}this.axes[name]=axis;this.dirty=true;return this;},getAxis:function(name){return this.axes[name];},removeAxis:function(name){if(name in this.axes){this.axes[name].destroy();delete this.axes[name];this.dirty=true;}return this;},addPlot:function(name,_82f){var plot,_830=_82f&&_82f.type||"Default";if(typeof _830=="string"){if(!dc.plot2d||!dc.plot2d[_830]){throw Error("Can't find plot: "+_830+" - didn't you forget to dojo"+".require() it?");}plot=new dc.plot2d[_830](this,_82f);}else{plot=new _830(this,_82f);}plot.name=name;plot.dirty=true;if(name in this.plots){this.stack[this.plots[name]].destroy();this.stack[this.plots[name]]=plot;}else{this.plots[name]=this.stack.length;this.stack.push(plot);}this.dirty=true;return this;},removePlot:function(name){if(name in this.plots){var _831=this.plots[name];delete this.plots[name];this.stack[_831].destroy();this.stack.splice(_831,1);df.forIn(this.plots,function(idx,name,_832){if(idx>_831){_832[name]=idx-1;}});var ns=dojo.filter(this.series,function(run){return run.plot!=name;});if(ns.length<this.series.length){dojo.forEach(this.series,function(run){if(run.plot==name){run.destroy();}});this.runs={};dojo.forEach(ns,function(run,_833){this.runs[run.plot]=_833;},this);this.series=ns;}this.dirty=true;}return this;},getPlotOrder:function(){return df.map(this.stack,_82a);},setPlotOrder:function(_834){var _835={},_836=df.filter(_834,function(name){if(!(name in this.plots)||(name in _835)){return false;}_835[name]=1;return true;},this);if(_836.length<this.stack.length){df.forEach(this.stack,function(plot){var name=plot.name;if(!(name in _835)){_836.push(name);}});}var _837=df.map(_836,function(name){return this.stack[this.plots[name]];},this);df.forEach(_837,function(plot,i){this.plots[plot.name]=i;},this);this.stack=_837;this.dirty=true;return this;},movePlotToFront:function(name){if(name in this.plots){var _838=this.plots[name];if(_838){var _839=this.getPlotOrder();_839.splice(_838,1);_839.unshift(name);return this.setPlotOrder(_839);}}return this;},movePlotToBack:function(name){if(name in this.plots){var _83a=this.plots[name];if(_83a<this.stack.length-1){var _83b=this.getPlotOrder();_83b.splice(_83a,1);_83b.push(name);return this.setPlotOrder(_83b);}}return this;},addSeries:function(name,data,_83c){var run=new dc.Series(this,data,_83c);run.name=name;if(name in this.runs){this.series[this.runs[name]].destroy();this.series[this.runs[name]]=run;}else{this.runs[name]=this.series.length;this.series.push(run);}this.dirty=true;if(!("ymin" in run)&&"min" in run){run.ymin=run.min;}if(!("ymax" in run)&&"max" in run){run.ymax=run.max;}return this;},removeSeries:function(name){if(name in this.runs){var _83d=this.runs[name];delete this.runs[name];this.series[_83d].destroy();this.series.splice(_83d,1);df.forIn(this.runs,function(idx,name,runs){if(idx>_83d){runs[name]=idx-1;}});this.dirty=true;}return this;},updateSeries:function(name,data){if(name in this.runs){var run=this.series[this.runs[name]];run.update(data);this._invalidateDependentPlots(run.plot,false);this._invalidateDependentPlots(run.plot,true);}return this;},getSeriesOrder:function(_83e){return df.map(df.filter(this.series,function(run){return run.plot==_83e;}),_82a);},setSeriesOrder:function(_83f){var _840,_841={},_842=df.filter(_83f,function(name){if(!(name in this.runs)||(name in _841)){return false;}var run=this.series[this.runs[name]];if(_840){if(run.plot!=_840){return false;}}else{_840=run.plot;}_841[name]=1;return true;},this);df.forEach(this.series,function(run){var name=run.name;if(!(name in _841)&&run.plot==_840){_842.push(name);}});var _843=df.map(_842,function(name){return this.series[this.runs[name]];},this);this.series=_843.concat(df.filter(this.series,function(run){return run.plot!=_840;}));df.forEach(this.series,function(run,i){this.runs[run.name]=i;},this);this.dirty=true;return this;},moveSeriesToFront:function(name){if(name in this.runs){var _844=this.runs[name],_845=this.getSeriesOrder(this.series[_844].plot);if(name!=_845[0]){_845.splice(_844,1);_845.unshift(name);return this.setSeriesOrder(_845);}}return this;},moveSeriesToBack:function(name){if(name in this.runs){var _846=this.runs[name],_847=this.getSeriesOrder(this.series[_846].plot);if(name!=_847[_847.length-1]){_847.splice(_846,1);_847.push(name);return this.setSeriesOrder(_847);}}return this;},resize:function(_848,_849){var box;switch(arguments.length){case 1:box=dojo.mixin({},_848);dojo.marginBox(this.node,box);break;case 2:box={w:_848,h:_849};dojo.marginBox(this.node,box);break;}box=dojo.marginBox(this.node);this.surface.setDimensions(box.w,box.h);this.dirty=true;this.coords=null;return this.render();},getGeometry:function(){var ret={};df.forIn(this.axes,function(axis){if(axis.initialized()){ret[axis.name]={name:axis.name,vertical:axis.vertical,scaler:axis.scaler,ticks:axis.ticks};}});return ret;},setAxisWindow:function(name,_84a,_84b,zoom){var axis=this.axes[name];if(axis){axis.setWindow(_84a,_84b);dojo.forEach(this.stack,function(plot){if(plot.hAxis==name||plot.vAxis==name){plot.zoom=zoom;}});}return this;},setWindow:function(sx,sy,dx,dy,zoom){if(!("plotArea" in this)){this.calculateGeometry();}df.forIn(this.axes,function(axis){var _84c,_84d,_84e=axis.getScaler().bounds,s=_84e.span/(_84e.upper-_84e.lower);if(axis.vertical){_84c=sy;_84d=dy/s/_84c;}else{_84c=sx;_84d=dx/s/_84c;}axis.setWindow(_84c,_84d);});dojo.forEach(this.stack,function(plot){plot.zoom=zoom;});return this;},zoomIn:function(name,_84f){var axis=this.axes[name];if(axis){var _850,_851,_852=axis.getScaler().bounds;var _853=Math.min(_84f[0],_84f[1]);var _854=Math.max(_84f[0],_84f[1]);_853=_84f[0]<_852.lower?_852.lower:_853;_854=_84f[1]>_852.upper?_852.upper:_854;_850=(_852.upper-_852.lower)/(_854-_853);_851=_853-_852.lower;this.setAxisWindow(name,_850,_851);this.render();}},calculateGeometry:function(){if(this.dirty){return this.fullGeometry();}var _855=dojo.filter(this.stack,function(plot){return plot.dirty||(plot.hAxis&&this.axes[plot.hAxis].dirty)||(plot.vAxis&&this.axes[plot.vAxis].dirty);},this);_856(_855,this.plotArea);return this;},fullGeometry:function(){this._makeDirty();dojo.forEach(this.stack,_825);if(!this.theme){this.setTheme(new dojox.charting.Theme(dojox.charting._def));}dojo.forEach(this.series,function(run){if(!(run.plot in this.plots)){if(!dc.plot2d||!dc.plot2d.Default){throw Error("Can't find plot: Default - didn't you forget to dojo"+".require() it?");}var plot=new dc.plot2d.Default(this,{});plot.name=run.plot;this.plots[run.plot]=this.stack.length;this.stack.push(plot);}this.stack[this.plots[run.plot]].addSeries(run);},this);dojo.forEach(this.stack,function(plot){if(plot.hAxis){plot.setAxis(this.axes[plot.hAxis]);}if(plot.vAxis){plot.setAxis(this.axes[plot.vAxis]);}},this);var dim=this.dim=this.surface.getDimensions();dim.width=g.normalizedLength(dim.width);dim.height=g.normalizedLength(dim.height);df.forIn(this.axes,_825);_856(this.stack,dim);var _857=this.offsets={l:0,r:0,t:0,b:0};df.forIn(this.axes,function(axis){df.forIn(axis.getOffsets(),function(o,i){_857[i]+=o;});});if(this.title){this.titleGap=(this.titleGap==0)?0:this.titleGap||this.theme.chart.titleGap||20;this.titlePos=this.titlePos||this.theme.chart.titlePos||"top";this.titleFont=this.titleFont||this.theme.chart.titleFont;this.titleFontColor=this.titleFontColor||this.theme.chart.titleFontColor||"black";var _858=g.normalizedLength(g.splitFontString(this.titleFont).size);_857[this.titlePos=="top"?"t":"b"]+=(_858+this.titleGap);}df.forIn(this.margins,function(o,i){_857[i]+=o;});this.plotArea={width:dim.width-_857.l-_857.r,height:dim.height-_857.t-_857.b};df.forIn(this.axes,_825);_856(this.stack,this.plotArea);return this;},render:function(){if(this.theme){this.theme.clear();}if(this.dirty){return this.fullRender();}this.calculateGeometry();df.forEachRev(this.stack,function(plot){plot.render(this.dim,this.offsets);},this);df.forIn(this.axes,function(axis){axis.render(this.dim,this.offsets);},this);this._makeClean();if(this.surface.render){this.surface.render();}return this;},fullRender:function(){this.fullGeometry();var _859=this.offsets,dim=this.dim,rect;dojo.forEach(this.series,_826);df.forIn(this.axes,_826);dojo.forEach(this.stack,_826);if(this.chartTitle&&this.chartTitle.tagName){dojo.destroy(this.chartTitle);}this.surface.clear();this.chartTitle=null;var t=this.theme,fill=t.plotarea&&t.plotarea.fill,_85a=t.plotarea&&t.plotarea.stroke,rect={x:_859.l-1,y:_859.t-1,width:dim.width-_859.l-_859.r+2,height:dim.height-_859.t-_859.b+2};if(fill){fill=dc.Element.prototype._shapeFill(dc.Element.prototype._plotFill(fill,dim,_859),rect);this.surface.createRect(rect).setFill(fill);}if(_85a){this.surface.createRect({x:_859.l,y:_859.t,width:dim.width-_859.l-_859.r+1,height:dim.height-_859.t-_859.b+1}).setStroke(_85a);}df.foldr(this.stack,function(z,plot){return plot.render(dim,_859),0;},0);fill=this.fill!==undefined?this.fill:(t.chart&&t.chart.fill);_85a=this.stroke!==undefined?this.stroke:(t.chart&&t.chart.stroke);if(fill=="inherit"){var node=this.node,fill=new dojo.Color(dojo.style(node,"backgroundColor"));while(fill.a==0&&node!=document.documentElement){fill=new dojo.Color(dojo.style(node,"backgroundColor"));node=node.parentNode;}}if(fill){fill=dc.Element.prototype._plotFill(fill,dim,_859);if(_859.l){rect={width:_859.l,height:dim.height+1};this.surface.createRect(rect).setFill(dc.Element.prototype._shapeFill(fill,rect));}if(_859.r){rect={x:dim.width-_859.r,width:_859.r+1,height:dim.height+2};this.surface.createRect(rect).setFill(dc.Element.prototype._shapeFill(fill,rect));}if(_859.t){rect={width:dim.width+1,height:_859.t};this.surface.createRect(rect).setFill(dc.Element.prototype._shapeFill(fill,rect));}if(_859.b){rect={y:dim.height-_859.b,width:dim.width+1,height:_859.b+2};this.surface.createRect(rect).setFill(dc.Element.prototype._shapeFill(fill,rect));}}if(_85a){this.surface.createRect({width:dim.width-1,height:dim.height-1}).setStroke(_85a);}if(this.title){var _85b=(g.renderer=="canvas"),_85c=_85b||!dojo.isIE&&!dojo.isOpera?"html":"gfx",_85d=g.normalizedLength(g.splitFontString(this.titleFont).size);this.chartTitle=dc.axis2d.common.createText[_85c](this,this.surface,dim.width/2,this.titlePos=="top"?_85d+this.margins.t:dim.height-this.margins.b,"middle",this.title,this.titleFont,this.titleFontColor);}df.forIn(this.axes,function(axis){axis.render(dim,_859);});this._makeClean();if(this.surface.render){this.surface.render();}return this;},delayedRender:function(){if(!this._delayedRenderHandle){this._delayedRenderHandle=setTimeout(dojo.hitch(this,function(){clearTimeout(this._delayedRenderHandle);this._delayedRenderHandle=null;this.render();}),this.delayInMs);}return this;},connectToPlot:function(name,_85e,_85f){return name in this.plots?this.stack[this.plots[name]].connect(_85e,_85f):null;},fireEvent:function(_860,_861,_862){if(_860 in this.runs){var _863=this.series[this.runs[_860]].plot;if(_863 in this.plots){var plot=this.stack[this.plots[_863]];if(plot){plot.fireEvent(_860,_861,_862);}}}return this;},_makeClean:function(){dojo.forEach(this.axes,_828);dojo.forEach(this.stack,_828);dojo.forEach(this.series,_828);this.dirty=false;},_makeDirty:function(){dojo.forEach(this.axes,_829);dojo.forEach(this.stack,_829);dojo.forEach(this.series,_829);this.dirty=true;},_invalidateDependentPlots:function(_864,_865){if(_864 in this.plots){var plot=this.stack[this.plots[_864]],axis,_866=_865?"vAxis":"hAxis";if(plot[_866]){axis=this.axes[plot[_866]];if(axis&&axis.dependOnData()){axis.dirty=true;dojo.forEach(this.stack,function(p){if(p[_866]&&p[_866]==plot[_866]){p.dirty=true;}});}}else{plot.dirty=true;}}}});function _867(_868){return {min:_868.hmin,max:_868.hmax};};function _869(_86a){return {min:_86a.vmin,max:_86a.vmax};};function _86b(_86c,h){_86c.hmin=h.min;_86c.hmax=h.max;};function _86d(_86e,v){_86e.vmin=v.min;_86e.vmax=v.max;};function _86f(_870,_871){if(_870&&_871){_870.min=Math.min(_870.min,_871.min);_870.max=Math.max(_870.max,_871.max);}return _870||_871;};function _856(_872,_873){var _874={},axes={};dojo.forEach(_872,function(plot){var _875=_874[plot.name]=plot.getSeriesStats();if(plot.hAxis){axes[plot.hAxis]=_86f(axes[plot.hAxis],_867(_875));}if(plot.vAxis){axes[plot.vAxis]=_86f(axes[plot.vAxis],_869(_875));}});dojo.forEach(_872,function(plot){var _876=_874[plot.name];if(plot.hAxis){_86b(_876,axes[plot.hAxis]);}if(plot.vAxis){_86d(_876,axes[plot.vAxis]);}plot.initializeScalers(_873,_876);});};})();}if(!dojo._hasResource["dojox.charting.Chart2D"]){dojo._hasResource["dojox.charting.Chart2D"]=true;dojo.provide("dojox.charting.Chart2D");dojo.deprecated("dojox.charting.Chart2D","Use dojo.charting.Chart instead and require all other components explicitly","2.0");dojox.charting.Chart2D=dojox.charting.Chart;}if(!dojo._hasResource["dojox.charting.themes.PlotKit.base"]){dojo._hasResource["dojox.charting.themes.PlotKit.base"]=true;dojo.provide("dojox.charting.themes.PlotKit.base");(function(){var dc=dojox.charting,pk=dc.themes.PlotKit;pk.base=new dc.Theme({chart:{stroke:null,fill:"yellow"},plotarea:{stroke:null,fill:"yellow"},axis:{stroke:{color:"#fff",width:1},line:{color:"#fff",width:0.5},majorTick:{color:"#fff",width:0.5,length:6},minorTick:{color:"#fff",width:0.5,length:3},tick:{font:"normal normal normal 7pt Helvetica,Arial,sans-serif",fontColor:"#999"}},series:{stroke:{width:2.5,color:"#fff"},fill:"#666",font:"normal normal normal 7.5pt Helvetica,Arial,sans-serif",fontColor:"#666"},marker:{stroke:{width:2},fill:"#333",font:"normal normal normal 7pt Helvetica,Arial,sans-serif",fontColor:"#666"},colors:["red","green","blue"]});pk.base.next=function(_877,_878,_879){var _87a=dc.Theme.prototype.next.apply(this,arguments);if(_877=="line"){_87a.marker.outline={width:2,color:"#fff"};_87a.series.stroke.width=3.5;_87a.marker.stroke.width=2;}else{if(_877=="candlestick"){_87a.series.stroke.width=1;}else{_87a.series.stroke.color="#fff";}}return _87a;};})();}if(!dojo._hasResource["dijit.Tooltip"]){dojo._hasResource["dijit.Tooltip"]=true;dojo.provide("dijit.Tooltip");dojo.declare("dijit._MasterTooltip",[dijit._Widget,dijit._Templated],{duration:dijit.defaultDuration,templateString:dojo.cache("dijit","templates/Tooltip.html","<div class=\"dijitTooltip dijitTooltipLeft\" id=\"dojoTooltip\"\r\n\t><div class=\"dijitTooltipContainer dijitTooltipContents\" dojoAttachPoint=\"containerNode\" role='alert'></div\r\n\t><div class=\"dijitTooltipConnector\" dojoAttachPoint=\"connectorNode\"></div\r\n></div>\r\n"),postCreate:function(){dojo.body().appendChild(this.domNode);this.bgIframe=new dijit.BackgroundIframe(this.domNode);this.fadeIn=dojo.fadeIn({node:this.domNode,duration:this.duration,onEnd:dojo.hitch(this,"_onShow")});this.fadeOut=dojo.fadeOut({node:this.domNode,duration:this.duration,onEnd:dojo.hitch(this,"_onHide")});},show:function(_87b,_87c,_87d,rtl){if(this.aroundNode&&this.aroundNode===_87c){return;}this.domNode.width="auto";if(this.fadeOut.status()=="playing"){this._onDeck=arguments;return;}this.containerNode.innerHTML=_87b;var pos=dijit.placeOnScreenAroundElement(this.domNode,_87c,dijit.getPopupAroundAlignment((_87d&&_87d.length)?_87d:dijit.Tooltip.defaultPosition,!rtl),dojo.hitch(this,"orient"));dojo.style(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=true;this.aroundNode=_87c;},orient:function(node,_87e,_87f,_880,_881){this.connectorNode.style.top="";var _882=_880.w-this.connectorNode.offsetWidth;node.className="dijitTooltip "+{"BL-TL":"dijitTooltipBelow dijitTooltipABLeft","TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft"}[_87e+"-"+_87f];this.domNode.style.width="auto";var size=dojo.contentBox(this.domNode);var _883=Math.min((Math.max(_882,1)),size.w);var _884=_883<size.w;this.domNode.style.width=_883+"px";if(_884){this.containerNode.style.overflow="auto";var _885=this.containerNode.scrollWidth;this.containerNode.style.overflow="visible";if(_885>_883){_885=_885+dojo.style(this.domNode,"paddingLeft")+dojo.style(this.domNode,"paddingRight");this.domNode.style.width=_885+"px";}}if(_87f.charAt(0)=="B"&&_87e.charAt(0)=="B"){var mb=dojo.marginBox(node);var _886=this.connectorNode.offsetHeight;if(mb.h>_880.h){var _887=_880.h-(_881.h/2)-(_886/2);this.connectorNode.style.top=_887+"px";this.connectorNode.style.bottom="";}else{this.connectorNode.style.bottom=Math.min(Math.max(_881.h/2-_886/2,0),mb.h-_886)+"px";this.connectorNode.style.top="";}}else{this.connectorNode.style.top="";this.connectorNode.style.bottom="";}return Math.max(0,size.w-_882);},_onShow:function(){if(dojo.isIE){this.domNode.style.filter="";}},hide:function(_888){if(this._onDeck&&this._onDeck[1]==_888){this._onDeck=null;}else{if(this.aroundNode===_888){this.fadeIn.stop();this.isShowingNow=false;this.aroundNode=null;this.fadeOut.play();}else{}}},_onHide:function(){this.domNode.style.cssText="";this.containerNode.innerHTML="";if(this._onDeck){this.show.apply(this,this._onDeck);this._onDeck=null;}}});dijit.showTooltip=function(_889,_88a,_88b,rtl){if(!dijit._masterTT){dijit._masterTT=new dijit._MasterTooltip();}return dijit._masterTT.show(_889,_88a,_88b,rtl);};dijit.hideTooltip=function(_88c){if(!dijit._masterTT){dijit._masterTT=new dijit._MasterTooltip();}return dijit._masterTT.hide(_88c);};dojo.declare("dijit.Tooltip",dijit._Widget,{label:"",showDelay:400,connectId:[],position:[],_setConnectIdAttr:function(_88d){dojo.forEach(this._connections||[],function(_88e){dojo.forEach(_88e,dojo.hitch(this,"disconnect"));},this);var ary=dojo.isArrayLike(_88d)?_88d:(_88d?[_88d]:[]);this._connections=dojo.map(ary,function(id){var node=dojo.byId(id);return node?[this.connect(node,"onmouseenter","_onTargetMouseEnter"),this.connect(node,"onmouseleave","_onTargetMouseLeave"),this.connect(node,"onfocus","_onTargetFocus"),this.connect(node,"onblur","_onTargetBlur")]:[];},this);this._set("connectId",_88d);this._connectIds=ary;},addTarget:function(node){var id=node.id||node;if(dojo.indexOf(this._connectIds,id)==-1){this.set("connectId",this._connectIds.concat(id));}},removeTarget:function(node){var id=node.id||node,idx=dojo.indexOf(this._connectIds,id);if(idx>=0){this._connectIds.splice(idx,1);this.set("connectId",this._connectIds);}},buildRendering:function(){this.inherited(arguments);dojo.addClass(this.domNode,"dijitTooltipData");},startup:function(){this.inherited(arguments);var ids=this.connectId;dojo.forEach(dojo.isArrayLike(ids)?ids:[ids],this.addTarget,this);},_onTargetMouseEnter:function(e){this._onHover(e);},_onTargetMouseLeave:function(e){this._onUnHover(e);},_onTargetFocus:function(e){this._focus=true;this._onHover(e);},_onTargetBlur:function(e){this._focus=false;this._onUnHover(e);},_onHover:function(e){if(!this._showTimer){var _88f=e.target;this._showTimer=setTimeout(dojo.hitch(this,function(){this.open(_88f);}),this.showDelay);}},_onUnHover:function(e){if(this._focus){return;}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}this.close();},open:function(_890){if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}dijit.showTooltip(this.label||this.domNode.innerHTML,_890,this.position,!this.isLeftToRight());this._connectNode=_890;this.onShow(_890,this.position);},close:function(){if(this._connectNode){dijit.hideTooltip(this._connectNode);delete this._connectNode;this.onHide();}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}},onShow:function(_891,_892){},onHide:function(){},uninitialize:function(){this.close();this.inherited(arguments);}});dijit.Tooltip.defaultPosition=["after","before"];}if(!dojo._hasResource["dojox.charting.action2d.Base"]){dojo._hasResource["dojox.charting.action2d.Base"]=true;dojo.provide("dojox.charting.action2d.Base");(function(){var _893=400,_894=dojo.fx.easing.backOut,df=dojox.lang.functional;dojo.declare("dojox.charting.action2d.Base",null,{overOutEvents:{onmouseover:1,onmouseout:1},constructor:function(_895,plot,_896){this.chart=_895;this.plot=plot||"default";this.anim={};if(!_896){_896={};}this.duration=_896.duration?_896.duration:_893;this.easing=_896.easing?_896.easing:_894;},connect:function(){this.handle=this.chart.connectToPlot(this.plot,this,"process");},disconnect:function(){if(this.handle){dojo.disconnect(this.handle);this.handle=null;}},reset:function(){},destroy:function(){this.disconnect();df.forIn(this.anim,function(o){df.forIn(o,function(anim){anim.action.stop(true);});});this.anim={};}});})();}if(!dojo._hasResource["dojox.lang.functional.scan"]){dojo._hasResource["dojox.lang.functional.scan"]=true;dojo.provide("dojox.lang.functional.scan");(function(){var d=dojo,df=dojox.lang.functional,_897={};d.mixin(df,{scanl:function(a,f,z,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var t,n,i;if(d.isArray(a)){t=new Array((n=a.length)+1);t[0]=z;for(i=0;i<n;z=f.call(o,z,a[i],i,a),t[++i]=z){}}else{if(typeof a.hasNext=="function"&&typeof a.next=="function"){t=[z];for(i=0;a.hasNext();t.push(z=f.call(o,z,a.next(),i++,a))){}}else{t=[z];for(i in a){if(!(i in _897)){t.push(z=f.call(o,z,a[i],i,a));}}}}return t;},scanl1:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var t,n,z,_898=true;if(d.isArray(a)){t=new Array(n=a.length);t[0]=z=a[0];for(var i=1;i<n;t[i]=z=f.call(o,z,a[i],i,a),++i){}}else{if(typeof a.hasNext=="function"&&typeof a.next=="function"){if(a.hasNext()){t=[z=a.next()];for(var i=1;a.hasNext();t.push(z=f.call(o,z,a.next(),i++,a))){}}}else{for(var i in a){if(!(i in _897)){if(_898){t=[z=a[i]];_898=false;}else{t.push(z=f.call(o,z,a[i],i,a));}}}}}return t;},scanr:function(a,f,z,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var n=a.length,t=new Array(n+1),i=n;t[n]=z;for(;i>0;--i,z=f.call(o,z,a[i],i,a),t[i]=z){}return t;},scanr1:function(a,f,o){if(typeof a=="string"){a=a.split("");}o=o||d.global;f=df.lambda(f);var n=a.length,t=new Array(n),z=a[n-1],i=n-1;t[i]=z;for(;i>0;--i,z=f.call(o,z,a[i],i,a),t[i]=z){}return t;}});})();}if(!dojo._hasResource["dojox.charting.action2d.Tooltip"]){dojo._hasResource["dojox.charting.action2d.Tooltip"]=true;dojo.provide("dojox.charting.action2d.Tooltip");(function(){var _899=function(o){var t=o.run&&o.run.data&&o.run.data[o.index];if(t&&typeof t!="number"&&(t.tooltip||t.text)){return t.tooltip||t.text;}if(o.element=="candlestick"){return "<table cellpadding=\"1\" cellspacing=\"0\" border=\"0\" style=\"font-size:0.9em;\">"+"<tr><td>Open:</td><td align=\"right\"><strong>"+o.data.open+"</strong></td></tr>"+"<tr><td>High:</td><td align=\"right\"><strong>"+o.data.high+"</strong></td></tr>"+"<tr><td>Low:</td><td align=\"right\"><strong>"+o.data.low+"</strong></td></tr>"+"<tr><td>Close:</td><td align=\"right\"><strong>"+o.data.close+"</strong></td></tr>"+(o.data.mid!==undefined?"<tr><td>Mid:</td><td align=\"right\"><strong>"+o.data.mid+"</strong></td></tr>":"")+"</table>";}return o.element=="bar"?o.x:o.y;};var df=dojox.lang.functional,m=dojox.gfx.matrix,pi4=Math.PI/4,pi2=Math.PI/2;dojo.declare("dojox.charting.action2d.Tooltip",dojox.charting.action2d.Base,{defaultParams:{text:_899},optionalParams:{},constructor:function(_89a,plot,_89b){this.text=_89b&&_89b.text?_89b.text:_899;this.connect();},process:function(o){if(o.type==="onplotreset"||o.type==="onmouseout"){dijit.hideTooltip(this.aroundRect);this.aroundRect=null;if(o.type==="onplotreset"){delete this.angles;}return;}if(!o.shape||o.type!=="onmouseover"){return;}var _89c={type:"rect"},_89d=["after","before"];switch(o.element){case "marker":_89c.x=o.cx;_89c.y=o.cy;_89c.width=_89c.height=1;break;case "circle":_89c.x=o.cx-o.cr;_89c.y=o.cy-o.cr;_89c.width=_89c.height=2*o.cr;break;case "column":_89d=["above","below"];case "bar":_89c=dojo.clone(o.shape.getShape());break;case "candlestick":_89c.x=o.x;_89c.y=o.y;_89c.width=o.width;_89c.height=o.height;break;default:if(!this.angles){if(typeof o.run.data[0]=="number"){this.angles=df.map(df.scanl(o.run.data,"+",0),"* 2 * Math.PI / this",df.foldl(o.run.data,"+",0));}else{this.angles=df.map(df.scanl(o.run.data,"a + b.y",0),"* 2 * Math.PI / this",df.foldl(o.run.data,"a + b.y",0));}}var _89e=m._degToRad(o.plot.opt.startAngle),_89f=(this.angles[o.index]+this.angles[o.index+1])/2+_89e;_89c.x=o.cx+o.cr*Math.cos(_89f);_89c.y=o.cy+o.cr*Math.sin(_89f);_89c.width=_89c.height=1;if(_89f<pi4){}else{if(_89f<pi2+pi4){_89d=["below","above"];}else{if(_89f<Math.PI+pi4){_89d=["before","after"];}else{if(_89f<2*Math.PI-pi4){_89d=["above","below"];}}}}break;}var lt=dojo.coords(this.chart.node,true);_89c.x+=lt.x;_89c.y+=lt.y;_89c.x=Math.round(_89c.x);_89c.y=Math.round(_89c.y);_89c.width=Math.ceil(_89c.width);_89c.height=Math.ceil(_89c.height);this.aroundRect=_89c;var _8a0=this.text(o);if(_8a0){dijit.showTooltip(_8a0,this.aroundRect,_89d);}}});})();}if(!dojo._hasResource["esri.dijit.Popup"]){dojo._hasResource["esri.dijit.Popup"]=true;dojo.provide("esri.dijit.Popup");(function(){var dc=dojox.charting,pk=dc.themes.PlotKit;pk.popup=pk.base.clone();pk.popup.chart.fill=pk.popup.plotarea.fill="#e7eef6";pk.popup.colors=["#284B70","#702828","#5F7143","#F6BC0C","#382C6C","#50224F","#1D7554","#4C4C4C","#0271AE","#706E41","#446A73","#0C3E69","#757575","#B7B7B7","#A3A3A3"];pk.popup.series.stroke.width=1;pk.popup.marker.stroke.width=1;}());dojo.declare("esri.dijit.Popup",[esri.InfoWindowBase,esri.PopupBase],{offsetX:3,offsetY:3,zoomFactor:4,marginLeft:10,marginTop:10,highlight:true,constructor:function(_8a1,_8a2){this.initialize();dojo.mixin(this,_8a1);this.domNode=dojo.byId(_8a2);var nls=this._nls=dojo.mixin({},esri.bundle.widgets.popup);var _8a3=this.domNode;dojo.addClass(_8a3,"esriPopup");var _8a4="<div class='esriPopupWrapper' style='position: absolute;'>"+"<div class='sizer'>"+"<div class='titlePane'>"+"<div class='spinner hidden' title='"+nls.NLS_searching+"...'></div>"+"<div class='title'></div>"+"<div class='titleButton prev hidden' title='"+nls.NLS_prevFeature+"'></div>"+"<div class='titleButton next hidden' title='"+nls.NLS_nextFeature+"'></div>"+"<div class='titleButton maximize' title='"+nls.NLS_maximize+"'></div>"+"<div class='titleButton close' title='"+nls.NLS_close+"'></div>"+"</div>"+"</div>"+"<div class='sizer content'>"+"<div class='contentPane'>"+"</div>"+"</div>"+"<div class='sizer'>"+"<div class='actionsPane'>"+"<div class='actionList hidden'>"+"<a class='action zoomTo' href='javascript:void(0);'>"+nls.NLS_zoomTo+"</a>"+"</div>"+"</div>"+"</div>"+"<div class='pointer hidden'></div>"+"</div>"+"<div class='outerPointer hidden'></div>";dojo.attr(_8a3,"innerHTML",_8a4);this._sizers=dojo.query(".sizer",_8a3);var _8a5=dojo.query(".titlePane",_8a3)[0];dojo.setSelectable(_8a5,false);this._title=dojo.query(".title",_8a5)[0];this._prevFeatureButton=dojo.query(".prev",_8a5)[0];this._nextFeatureButton=dojo.query(".next",_8a5)[0];this._maxButton=dojo.query(".maximize",_8a5)[0];this._spinner=dojo.query(".spinner",_8a5)[0];this._contentPane=dojo.query(".contentPane",_8a3)[0];this._positioner=dojo.query(".esriPopupWrapper",_8a3)[0];this._pointer=dojo.query(".pointer",_8a3)[0];this._outerPointer=dojo.query(".outerPointer",_8a3)[0];this._actionList=dojo.query(".actionsPane .actionList",_8a3)[0];this._eventConnections=[dojo.connect(dojo.query(".close",_8a5)[0],"onclick",this,this.hide),dojo.connect(this._prevFeatureButton,"onclick",this,this.selectPrevious),dojo.connect(this._nextFeatureButton,"onclick",this,this.selectNext),dojo.connect(this._maxButton,"onclick",this,this._toggleSize),dojo.connect(dojo.query(".zoomTo",this._actionList)[0],"onclick",this,this._zoomToFeature)];if(esri.isTouchEnabled){var _8a6=esri.setScrollable(this._contentPane);this._eventConnections.push(_8a6[0],_8a6[1]);}this._setVisibility(false);this.isShowing=false;},setMap:function(map){this.inherited(arguments);dojo.place(this.domNode,map.root);if(this.highlight){this.enableHighlight(map);}this._maxHeight=dojo.style(this._contentPane,"maxHeight");},unsetMap:function(){this.disableHighlight(this.map);this.inherited(arguments);},setTitle:function(_8a7){if(!esri._isDefined(_8a7)||_8a7===""){_8a7="&nbsp;";}this.destroyDijits(this._title);this.place(_8a7,this._title);if(this.isShowing){this.startupDijits(this._title);this.reposition();}},setContent:function(_8a8){if(!esri._isDefined(_8a8)||_8a8===""){_8a8="&nbsp;";}this.destroyDijits(this._contentPane);this.place(_8a8,this._contentPane);if(this.isShowing){this.startupDijits(this._contentPane);this.reposition();}},show:function(_8a9){if(!_8a9){this._setVisibility(true);this.isShowing=true;return;}var map=this.map,_8aa;if(_8a9.spatialReference){this._location=_8a9;_8aa=map.toScreen(_8a9);}else{this._location=map.toMap(_8a9);_8aa=_8a9;}var _8ab=map._getFrameWidth();if(_8ab!==-1){_8aa.x=_8aa.x%_8ab;if(_8aa.x<0){_8aa.x+=_8ab;}if(map.width>_8ab){var _8ac=(map.width-_8ab)/2;while(_8aa.x<_8ac){_8aa.x+=_8ab;}}}if(this._maximized){this.restore();}else{this._setPosition(_8aa);}if(!this.isShowing){this._setVisibility(true);this.isShowing=true;this.onShow();}},hide:function(){if(this.isShowing){this._setVisibility(false);this.isShowing=false;this.onHide();}},resize:function(_8ad,_8ae){this._sizers.style({width:_8ad+"px"});dojo.style(this._contentPane,"maxHeight",_8ae+"px");this._maxHeight=_8ae;if(this.isShowing){this.reposition();}},reposition:function(){if(this.map&&this._location&&!this._maximized&&this.isShowing){this._setPosition(this.map.toScreen(this._location));}},onShow:function(){this._followMap();this.startupDijits(this._title);this.startupDijits(this._contentPane);this.reposition();this.showHighlight();},onHide:function(){this._unfollowMap();this.hideHighlight();},maximize:function(){var map=this.map;if(!map||this._maximized){return;}this._maximized=true;var max=this._maxButton;dojo.removeClass(max,"maximize");dojo.addClass(max,"restore");dojo.attr(max,"title",this._nls.NLS_restore);var _8af=this.marginLeft,_8b0=this.marginTop,_8b1=map.width-(2*_8af),_8b2=map.height-(2*_8b0),_8b3=this.domNode;dojo.style(_8b3,{left:_8af+"px",right:null,top:_8b0+"px",bottom:null});dojo.style(this._positioner,{left:null,right:null,top:null,bottom:null});this._savedWidth=dojo.style(this._sizers[0],"width");this._savedHeight=dojo.style(this._contentPane,"maxHeight");this._sizers.style({width:_8b1+"px"});dojo.style(this._contentPane,{maxHeight:(_8b2-65)+"px",height:(_8b2-65)+"px"});this._showPointer("");this._unfollowMap();dojo.addClass(this.domNode,"esriPopupMaximized");this.onMaximize();},restore:function(){var map=this.map;if(!map||!this._maximized){return;}this._maximized=false;var max=this._maxButton;dojo.removeClass(max,"restore");dojo.addClass(max,"maximize");dojo.attr(max,"title",this._nls.NLS_maximize);dojo.style(this._contentPane,"height",null);this.resize(this._savedWidth,this._savedHeight);this._savedWidth=this._savedHeight=null;this.show(this._location);this._followMap();dojo.removeClass(this.domNode,"esriPopupMaximized");this.onRestore();},destroy:function(){if(this.map){this.unsetMap();}this.cleanup();if(this.isShowing){this.hide();}this.destroyDijits(this._title);this.destroyDijits(this._content);dojo.forEach(this._eventConnections,dojo.disconnect);dojo.destroy(this.domNode);this._sizers=this._contentPane=this._actionList=this._positioner=this._pointer=this._outerPointer=this._title=this._prevFeatureButton=this._nextFeatureButton=this._spinner=this._eventConnections=this._pagerScope=this._targetLocation=this._nls=this._maxButton=null;},selectNext:function(){this.select(this.selectedIndex+1);},selectPrevious:function(){this.select(this.selectedIndex-1);},setFeatures:function(){this.inherited(arguments);this._updateUI();},onSetFeatures:function(){},onClearFeatures:function(){this.setTitle("&nbsp;");this.setContent("&nbsp;");this._setPagerCallbacks(this);this._updateUI();this.hideHighlight();},onSelectionChange:function(){var ptr=this.selectedIndex;this._updateUI();if(ptr>=0){this.setContent(this.features[ptr].getContent());this.updateHighlight(this.map,this.features[ptr]);if(this.isShowing){this.showHighlight();}}},onDfdComplete:function(){this._updateUI();},onMaximize:function(){},onRestore:function(){},_setVisibility:function(_8b4){dojo.style(this.domNode,"visibility",_8b4?"visible":"hidden");},_followMap:function(){this._unfollowMap();var map=this.map;this._handles=[dojo.connect(map,"onPanStart",this,this._onPanStart),dojo.connect(map,"onPan",this,this._onPan),dojo.connect(map,"onZoomStart",this,this._onZoomStart),dojo.connect(map,"onExtentChange",this,this._onExtentChange)];},_unfollowMap:function(){var _8b5=this._handles;if(_8b5){dojo.forEach(_8b5,dojo.disconnect,dojo);this._handles=null;}},_onPanStart:function(){var _8b6=this.domNode.style;this._panOrigin={left:_8b6.left,top:_8b6.top,right:_8b6.right,bottom:_8b6.bottom};},_onPan:function(_8b7,_8b8){var _8b9=this._panOrigin,dx=_8b8.x,dy=_8b8.y,left=_8b9.left,top=_8b9.top,_8ba=_8b9.right,_8bb=_8b9.bottom;if(left){left=(parseFloat(left)+dx)+"px";}if(top){top=(parseFloat(top)+dy)+"px";}if(_8ba){_8ba=(parseFloat(_8ba)-dx)+"px";}if(_8bb){_8bb=(parseFloat(_8bb)-dy)+"px";}dojo.style(this.domNode,{left:left,top:top,right:_8ba,bottom:_8bb});},_onZoomStart:function(){this._setVisibility(false);},_onExtentChange:function(_8bc,_8bd,_8be){if(_8be){this._setVisibility(true);this.show(this._targetLocation||this._location);}this._targetLocation=null;},_toggleSize:function(){if(this._maximized){this.restore();}else{this.maximize();}},_setPosition:function(_8bf){var posX=_8bf.x,posY=_8bf.y,offX=this.offsetX||0,offY=this.offsetY||0,_8c0=0,_8c1=0,_8c2=dojo.position(this.map.container,true),_8c3=_8c2.w,_8c4=_8c2.h,_8c5="Left",_8c6="bottom",_8c7=dojo.contentBox(this._positioner),_8c8=_8c7.w/2,_8c9=_8c7.h/2,maxH=dojo.style(this._sizers[0],"height")+this._maxHeight+dojo.style(this._sizers[2],"height"),_8ca=maxH/2,xmin=0,ymin=0,xmax=_8c3,ymax=_8c4,_8cb=posX,_8cc=posY;var _8cd=dojo.getObject("dojo.window.getBox");if(_8cd){_8cd=_8cd();xmin=Math.max(_8cd.l,_8c2.x);xmax=Math.min(_8cd.l+_8cd.w,_8c2.x+_8c2.w);ymin=Math.max(_8cd.t,_8c2.y);ymax=Math.min(_8cd.t+_8cd.h,_8c2.y+_8c2.h);_8cb+=_8c2.x;_8cc+=_8c2.y;}if(((_8cc-ymin)>_8ca)&&((ymax-_8cc)>=_8ca)){if((xmax-_8cb)>=_8c7.w){_8c6="";_8c5="Left";}else{if((_8cb-xmin)>=_8c7.w){_8c6="";_8c5="Right";}}}if(_8c5&&_8c6){if(((_8cb-xmin)>_8c8)&&((xmax-_8cb)>=_8c8)){if((_8cc-ymin)>=maxH){_8c5="";_8c6="bottom";}else{if((ymax-_8cc)>=maxH){_8c5="";_8c6="top";}}}}if(_8c5&&_8c6){if(_8cb<=xmax/2){_8c5="Left";}else{if(_8cb<=xmax){_8c5="Right";}}if(_8cc<=ymax/2){_8c6="top";}else{if(_8cc<=ymax){_8c6="bottom";}}}var _8ce=_8c6+_8c5;switch(_8ce){case "top":case "bottom":_8c1=14;break;case "Left":case "Right":_8c0=13;break;case "topLeft":case "topRight":case "bottomLeft":case "bottomRight":_8c1=45;break;}dojo.style(this.domNode,{left:posX+"px",top:posY+"px",right:null,bottom:null});var _8cf={left:null,right:null,top:null,bottom:null};if(_8c5){_8cf[_8c5.toLowerCase()]=(_8c0+offX)+"px";}else{_8cf.left=(-_8c8)+"px";}if(_8c6){_8cf[_8c6]=(_8c1+offY)+"px";}else{_8cf.top=(-_8c9)+"px";}dojo.style(this._positioner,_8cf);this._showPointer(_8ce);},_showPointer:function(_8d0){dojo.removeClass(this._pointer,["top","bottom","right","left","topLeft","topRight","bottomRight","bottomLeft","hidden"]);dojo.removeClass(this._outerPointer,["right","left","hidden"]);if(_8d0==="Right"||_8d0==="Left"){_8d0=_8d0.toLowerCase();dojo.addClass(this._outerPointer,_8d0);}else{dojo.addClass(this._pointer,_8d0);}},_setPagerCallbacks:function(_8d1,_8d2,_8d3){if(_8d1===this&&(!this._pagerScope||this._pagerScope===this)){return;}if(_8d1===this._pagerScope){return;}this._pagerScope=_8d1;if(_8d1===this){_8d2=this.selectPrevious;_8d3=this.selectNext;}var _8d4=this._eventConnections;dojo.disconnect(_8d4[1]);dojo.disconnect(_8d4[2]);if(_8d2){_8d4[1]=dojo.connect(this._prevFeatureButton,"onclick",_8d1,_8d2);}if(_8d3){_8d4[2]=dojo.connect(this._nextFeatureButton,"onclick",_8d1,_8d3);}},_zoomToFeature:function(){var _8d5=this.features,ptr=this.selectedIndex,map=this.map;if(_8d5){var _8d6=_8d5[ptr].geometry,_8d7,_8d8,_8d9=0,_8da;if(_8d6){switch(_8d6.type){case "point":_8d7=_8d6;break;case "multipoint":_8d7=_8d6.getPoint(0);_8d8=_8d6.getExtent();break;case "polyline":_8d7=_8d6.getPoint(0,0);_8d8=_8d6.getExtent();if(map._getFrameWidth()!==-1){dojo.forEach(_8d6.paths,function(path){var _8db={"paths":[path,map.spatialReference]},_8dc=new esri.geometry.Polyline(_8db),_8dd=_8dc.getExtent(),_8de=Math.abs(_8dd.ymax-_8dd.ymin),_8df=Math.abs(_8dd.xmax-_8dd.xmin),_8e0=(_8df>_8de)?_8df:_8de;if(_8e0>_8d9){_8d9=_8e0;_8da=_8dd;}});_8da.spatialReference=_8d8.spatialReference;_8d8=_8da;}break;case "polygon":_8d7=_8d6.getPoint(0,0);_8d8=_8d6.getExtent();if(map._getFrameWidth()!==-1){dojo.forEach(_8d6.rings,function(ring){var _8e1={"rings":[ring,map.spatialReference]},_8e2=new esri.geometry.Polygon(_8e1),_8e3=_8e2.getExtent(),_8e4=Math.abs(_8e3.ymax-_8e3.ymin),_8e5=Math.abs(_8e3.xmax-_8e3.xmin),_8e6=(_8e5>_8e4)?_8e5:_8e4;if(_8e6>_8d9){_8d9=_8e6;_8da=_8e3;}});_8da.spatialReference=_8d8.spatialReference;_8d8=_8da;}break;}}if(!_8d7){_8d7=this._location;}if(!_8d8||!_8d8.intersects(this._location)){this._location=_8d7;}if(_8d8){map.setExtent(_8d8,true);}else{var _8e7=map.getNumLevels(),_8e8=map.getLevel(),last=_8e7-1,_8e9=this.zoomFactor||1;if(_8e7>0){if(_8e8===last){return;}var _8ea=_8e8+_8e9;if(_8ea>last){_8ea=last;}map._scrollZoomHandler({value:(_8ea-_8e8),mapPoint:_8d7},true);}else{map._scrollZoomHandler({value:(1/Math.pow(2,_8e9))*2,mapPoint:_8d7},true);}}}},_updateUI:function(){var _8eb="&nbsp;",ptr=this.selectedIndex,_8ec=this.features,_8ed=this.deferreds,prev=this._prevFeatureButton,next=this._nextFeatureButton,_8ee=this._spinner,_8ef=this._actionList,nls=this._nls;if(_8ec&&_8ec.length>1){if(nls.NLS_pagingInfo){_8eb=esri.substitute({index:(ptr+1),total:_8ec.length},nls.NLS_pagingInfo);}if(ptr===0){dojo.addClass(prev,"hidden");}else{dojo.removeClass(prev,"hidden");}if(ptr===_8ec.length-1){dojo.addClass(next,"hidden");}else{dojo.removeClass(next,"hidden");}}else{dojo.addClass(prev,"hidden");dojo.addClass(next,"hidden");}this.setTitle(_8eb);if(_8ed&&_8ed.length){if(_8ec){dojo.removeClass(_8ee,"hidden");}else{this.setContent("<div style='text-align: center;'>"+nls.NLS_searching+"...</div>");}}else{dojo.addClass(_8ee,"hidden");if(!_8ec||!_8ec.length){this.setContent("<div style='text-align: center;'>"+nls.NLS_noInfo+".</div>");}}if(_8ec&&_8ec.length){dojo.removeClass(_8ef,"hidden");}else{dojo.addClass(_8ef,"hidden");}}});dojo.declare("esri.dijit.PopupTemplate",[esri.PopupInfoTemplate],{chartTheme:"dojox.charting.themes.PlotKit.popup",constructor:function(json,_8f0){dojo.mixin(this,_8f0);this.initialize(json);this._nls=dojo.mixin({},esri.bundle.widgets.popup);},getTitle:function(_8f1){return this.info?this.getComponents(_8f1).title:"";},getContent:function(_8f2){return this.info?new esri.dijit._PopupRenderer({template:this,graphic:_8f2,chartTheme:this.chartTheme,_nls:this._nls},dojo.create("div")).domNode:"";}});dojo.declare("esri.dijit._PopupRenderer",[dijit._Widget,dijit._Templated],{templateString:"<div class='esriViewPopup'>"+"<div class='mainSection'>"+"<div class='header' dojoAttachPoint='_title'></div>"+"<div class='hzLine'></div>"+"<div dojoAttachPoint='_description'></div>"+"<div class='break'></div>"+"</div>"+"<div class='attachmentsSection hidden'>"+"<div>${_nls.NLS_attach}:</div>"+"<ul dojoAttachPoint='_attachmentsList'>"+"</ul>"+"<div class='break'></div>"+"</div>"+"<div class='mediaSection hidden'>"+"<div class='header' dojoAttachPoint='_mediaTitle'></div>"+"<div class='hzLine'></div>"+"<div class='caption' dojoAttachPoint='_mediaCaption'></div>"+"<div class='gallery' dojoAttachPoint='_gallery'>"+"<div class='mediaHandle prev' dojoAttachPoint='_prevMedia' dojoAttachEvent='onclick: _goToPrevMedia'></div>"+"<div class='mediaHandle next' dojoAttachPoint='_nextMedia' dojoAttachEvent='onclick: _goToNextMedia'></div>"+"<ul class='summary'>"+"<li class='image mediaCount hidden' dojoAttachPoint='_imageCount'>0</li>"+"<li class='image mediaIcon hidden'></li>"+"<li class='chart mediaCount hidden' dojoAttachPoint='_chartCount'>0</li>"+"<li class='chart mediaIcon hidden'></li>"+"</ul>"+"<div class='frame' dojoAttachPoint='_mediaFrame'></div>"+"</div>"+"</div>"+"<div class='editSummarySection hidden' dojoAttachPoint='_editSummarySection'>"+"<div class='break'></div>"+"<div class='break hidden' dojoAttachPoint='_mediaBreak'></div>"+"<div class='editSummary' dojoAttachPoint='_editSummary'></div>"+"</div>"+"</div>",startup:function(){this.inherited(arguments);var _8f3=this.template,_8f4=this.graphic,_8f5=_8f3.getComponents(_8f4),_8f6=_8f5.title,_8f7=_8f5.description,_8f8=_8f5.fields,_8f9=_8f5.mediaInfos,_8fa=this.domNode,nls=this._nls;this._prevMedia.title=nls.NLS_prevMedia;this._nextMedia.title=nls.NLS_nextMedia;dojo.attr(this._title,"innerHTML",_8f6);if(!_8f6){dojo.addClass(this._title,"hidden");}if(!_8f7&&_8f8){_8f7="";dojo.forEach(_8f8,function(row){_8f7+=("<tr valign='top'>");_8f7+=("<td class='attrName'>"+row[0]+"</td>");_8f7+=("<td class='attrValue'>"+row[1].replace(/^\s*(https?:\/\/[^\s]+)\s*$/i,"<a target='_blank' href='$1' title='$1'>More info</a>")+"</td>");_8f7+=("</tr>");});if(_8f7){_8f7="<table class='attrTable' cellpadding='0px' cellspacing='0px'>"+_8f7+"</table>";}}dojo.attr(this._description,"innerHTML",_8f7);if(!_8f7){dojo.addClass(this._description,"hidden");}dojo.query("a",this._description).forEach(function(node){dojo.attr(node,"target","_blank");});if(_8f6&&_8f7){dojo.query(".mainSection .hzLine",_8fa).removeClass("hidden");}else{if(_8f6||_8f7){dojo.query(".mainSection .hzLine",_8fa).addClass("hidden");}else{dojo.query(".mainSection",_8fa).addClass("hidden");}}var dfd=(this._dfd=_8f3.getAttachments(_8f4));if(dfd){dfd.addBoth(dojo.hitch(this,this._attListHandler,dfd));dojo.attr(this._attachmentsList,"innerHTML","<li>"+nls.NLS_searching+"...</li>");dojo.query(".attachmentsSection",_8fa).removeClass("hidden");}if(_8f9&&_8f9.length){dojo.query(".mediaSection",_8fa).removeClass("hidden");dojo.setSelectable(this._mediaFrame,false);this._mediaInfos=_8f9;this._mediaPtr=0;this._updateUI();this._displayMedia();}if(_8f5.editSummary){dojo.attr(this._editSummary,"innerHTML",_8f5.editSummary);if(_8f9&&_8f9.length){dojo.removeClass(this._mediaBreak,"hidden");}dojo.removeClass(this._editSummarySection,"hidden");}},destroy:function(){if(this._dfd){this._dfd.cancel();}this._destroyFrame();this.template=this.graphic=this._nls=this._mediaInfos=this._mediaPtr=this._dfd=null;this.inherited(arguments);},_goToPrevMedia:function(){var ptr=this._mediaPtr-1;if(ptr<0){return;}this._mediaPtr--;this._updateUI();this._displayMedia();},_goToNextMedia:function(){var ptr=this._mediaPtr+1;if(ptr===this._mediaInfos.length){return;}this._mediaPtr++;this._updateUI();this._displayMedia();},_updateUI:function(){var _8fb=this._mediaInfos,_8fc=_8fb.length,_8fd=this.domNode,_8fe=this._prevMedia,_8ff=this._nextMedia;if(_8fc>1){var _900=0,_901=0;dojo.forEach(_8fb,function(info){if(info.type==="image"){_900++;}else{if(info.type.indexOf("chart")!==-1){_901++;}}});if(_900){dojo.attr(this._imageCount,"innerHTML",_900);dojo.query(".summary .image",_8fd).removeClass("hidden");}if(_901){dojo.attr(this._chartCount,"innerHTML",_901);dojo.query(".summary .chart",_8fd).removeClass("hidden");}}else{dojo.query(".summary",_8fd).addClass("hidden");dojo.addClass(_8fe,"hidden");dojo.addClass(_8ff,"hidden");}var ptr=this._mediaPtr;if(ptr===0){dojo.addClass(_8fe,"hidden");}else{dojo.removeClass(_8fe,"hidden");}if(ptr===_8fc-1){dojo.addClass(_8ff,"hidden");}else{dojo.removeClass(_8ff,"hidden");}this._destroyFrame();},_displayMedia:function(){var info=this._mediaInfos[this._mediaPtr],_902=info.title,_903=info.caption,_904=dojo.query(".mediaSection .hzLine",this.domNode)[0];dojo.attr(this._mediaTitle,"innerHTML",_902);dojo[_902?"removeClass":"addClass"](this._mediaTitle,"hidden");dojo.attr(this._mediaCaption,"innerHTML",_903);dojo[_903?"removeClass":"addClass"](this._mediaCaption,"hidden");dojo[(_902&&_903)?"removeClass":"addClass"](_904,"hidden");if(info.type==="image"){this._showImage(info.value);}else{this._showChart(info.type,info.value);}},_showImage:function(_905){dojo.addClass(this._mediaFrame,"image");var _906=dojo.style(this._gallery,"height"),html="<img src='"+_905.sourceURL+"' onload='esri.dijit._PopupRenderer.prototype._imageLoaded(this,"+_906+");' />";if(_905.linkURL){html="<a target='_blank' href='"+_905.linkURL+"'>"+html+"</a>";}dojo.attr(this._mediaFrame,"innerHTML",html);},_showChart:function(type,_907){dojo.removeClass(this._mediaFrame,"image");var _908=this._chart=new dojox.charting.Chart2D(dojo.create("div",{"class":"chart"},this._mediaFrame),{margins:{l:4,t:4,r:4,b:4}});var _909=_907.theme||this.chartTheme||"PlotKit.popup";_908.setTheme(dojo.getObject(_909)||dojo.getObject("dojox.charting.themes."+_909));switch(type){case "piechart":_908.addPlot("default",{type:"Pie",labels:false});_908.addSeries("Series A",_907.fields);break;case "linechart":_908.addPlot("default",{type:"Markers"});_908.addAxis("x",{min:0,majorTicks:false,minorTicks:false,majorLabels:false,minorLabels:false});_908.addAxis("y",{includeZero:true,vertical:true,fixUpper:"minor"});dojo.forEach(_907.fields,function(info,idx){info.x=idx+1;});_908.addSeries("Series A",_907.fields);break;case "columnchart":_908.addPlot("default",{type:"Columns",gap:3});_908.addAxis("y",{includeZero:true,vertical:true,fixUpper:"minor"});_908.addSeries("Series A",_907.fields);break;case "barchart":_908.addPlot("default",{type:"Bars",gap:3});_908.addAxis("x",{includeZero:true,fixUpper:"minor",minorLabels:false});_908.addAxis("y",{vertical:true,majorTicks:false,minorTicks:false,majorLabels:false,minorLabels:false});_908.addSeries("Series A",_907.fields);break;}this._action=new dojox.charting.action2d.Tooltip(_908);_908.render();},_destroyFrame:function(){if(this._chart){this._chart.destroy();this._chart=null;}if(this._action){this._action.destroy();this._action=null;}dojo.attr(this._mediaFrame,"innerHTML","");},_imageLoaded:function(img,_90a){var _90b=img.height;if(_90b<_90a){var diff=Math.round((_90a-_90b)/2);dojo.style(img,"marginTop",diff+"px");}},_attListHandler:function(dfd,_90c){if(dfd===this._dfd){this._dfd=null;var html="";if(!(_90c instanceof Error)&&_90c&&_90c.length){dojo.forEach(_90c,function(info){html+=("<li>");html+=("<a href='"+info.url+"' target='_blank'>"+(info.name||"[No name]")+"</a>");html+=("</li>");});}dojo.attr(this._attachmentsList,"innerHTML",html||"<li>"+this._nls.NLS_noAttach+"</li>");}}});}if(!dojo._hasResource["esri.layers.KMLLayer"]){dojo._hasResource["esri.layers.KMLLayer"]=true;dojo.provide("esri.layers.KMLLayer");dojo.declare("esri.layers.KMLLayer",[esri.layers.Layer],{serviceUrl:"http://utility.arcgis.com/sharing/kml",constructor:function(url,_90d){if(!url){console.log("KMLLayer:constructor - please provide url for the KML file");}this._outSR=(_90d&&_90d.outSR)||new esri.SpatialReference({wkid:4326});this._options=_90d;if(esri.config.defaults.kmlService){this.serviceUrl=esri.config.defaults.kmlService;}var link=(this.linkInfo=_90d&&_90d.linkInfo);if(link){this.visible=!!link.visibility;this._waitingForMap=!!link.viewFormat;}if(!link||(link&&link.visibility&&!this._waitingForMap)){this._parseKml();}this.refresh=dojo.hitch(this,this.refresh);},getFeature:function(_90e){if(!_90e){return;}var type=_90e.type,id=_90e.id,_90f,i,len;switch(type){case "esriGeometryPoint":case "esriGeometryPolyline":case "esriGeometryPolygon":var _910=this["_"+type];if(_910){_90f=dojo.getObject("_mode._featureMap."+id,false,_910);}break;case "GroundOverlay":var _911=this._groundLyr;if(_911){var _912=_911.getImages();len=_912.length;for(i=0;i<len;i++){if(_912[i].id===id){_90f=_912[i];break;}}}break;case "ScreenOverlay":break;case "NetworkLink":dojo.some(this._links,function(link){if(link.linkInfo&&link.linkInfo.id===id){_90f=link;return true;}else{return false;}});break;case "Folder":var _913=this.folders;len=_913?_913.length:0;for(i=0;i<len;i++){if(_913[i].id===id){_90f=_913[i];break;}}break;default:console.log("KMLLayer:getFeature - unknown feature type");break;}return _90f;},getLayers:function(){var _914=[];if(this._groundLyr){_914.push(this._groundLyr);}if(this._fLayers){_914=_914.concat(this._fLayers);}if(this._links){dojo.forEach(this._links,function(link){if(link.declaredClass){_914.push(link);}});}return _914;},setFolderVisibility:function(_915,_916){if(!_915){return;}this._fireUpdateStart();_915.visible=_916;if(_916){_916=this._areLocalAncestorsVisible(_915);}this._setState(_915,_916);this._fireUpdateEnd();},onRefresh:function(){},_parseKml:function(map){var self=this;this._fireUpdateStart();this._io=esri.request({url:this.serviceUrl,content:{url:this._url.path+this._getQueryParameters(map),model:"simple",folders:"",refresh:this.loaded?true:undefined,outSR:dojo.toJson(this._outSR.toJson())},callbackParamName:"callback",load:function(_917){self._io=null;self._initLayer(_917);},error:function(err){self._io=null;err=dojo.mixin(new Error(),err);err.message="Unable to load KML: "+self.url+" "+(err.message||"");self._fireUpdateEnd(err);self.onError(err);}});},_initLayer:function(json){if(this.loaded){this._removeInternalLayers();}this.name=json.name;this.description=json.description;this.snippet=json.snippet;this.visibility=json.visibility;this.featureInfos=json.featureInfos;var i,len;var _918=(this.folders=json.folders),_919=[],fldr;if(_918){len=_918.length;for(i=0;i<len;i++){fldr=(_918[i]=new esri.layers.KMLFolder(_918[i]));if(fldr.parentFolderId===-1){_919.push(fldr);}}}var _91a=(this._links=json.networkLinks),_91b;len=_91a?_91a.length:0;for(i=0;i<len;i++){if(_91a[i].viewRefreshMode&&_91a[i].viewRefreshMode.toLowerCase().indexOf("onregion")!==-1){continue;}_91b=dojo.mixin({},this._options);_91b.linkInfo=_91a[i];if(_91b.id){_91b.id=_91b.id+"_"+i;}_91a[i]=new esri.layers.KMLLayer(_91a[i].href,_91b);_91a[i]._parentLayer=this;_91a[i]._parentFolderId=this._getLinkParentId(_91a[i].linkInfo.id);}var _91c=json.groundOverlays;if(_91c&&_91c.length>0){_91b=dojo.mixin({},this._options);if(_91b.id){_91b.id=_91b.id+"_"+"mapImage";}var _91d=(this._groundLyr=new esri.layers.MapImageLayer(_91b));len=_91c.length;for(i=0;i<len;i++){_91d.addImage(new esri.layers.KMLGroundOverlay(_91c[i]));}}var _91e=dojo.getObject("featureCollection.layers",false,json);if(_91e&&_91e.length>0){this._fLayers=[];dojo.forEach(_91e,function(_91f,i){var _920=dojo.getObject("featureSet.features",false,_91f),_921;if(_920&&_920.length>0){_91b=dojo.mixin({outFields:["*"],infoTemplate:_91f.popupInfo?new esri.dijit.PopupTemplate(_91f.popupInfo):null,editable:false},this._options);if(_91b.id){_91b.id=_91b.id+"_"+i;}_91f.layerDefinition.capabilities="Query,Data";_921=new esri.layers.FeatureLayer(_91f,_91b);if(_921.geometryType){this["_"+_921.geometryType]=_921;}this._fLayers.push(_921);}},this);if(this._fLayers.length===0){delete this._fLayers;}}len=_919.length;for(i=0;i<len;i++){fldr=_919[i];this._setState(fldr,fldr.visible);}this._fireUpdateEnd();if(this.loaded){this._addInternalLayers();this.onRefresh();}else{this.loaded=true;this.onLoad(this);}},_addInternalLayers:function(){var map=this._map;this._fireUpdateStart();if(this._links){dojo.forEach(this._links,function(link){if(link.declaredClass){map.addLayer(link);if(link._waitingForMap){link._waitingForMap=null;if(link.visible){link._parseKml(map);}else{link._wMap=map;}}}});}var _922=map.spatialReference,_923=this._outSR,_924,_925;if(_922.wkid){_924=(_922._isWebMercator()&&_923._isWebMercator())||(_922.wkid===_923.wkid);}else{if(_922.wkt){_924=(_922.wkt===_923.wkt);}else{console.log("KMLLayer:_setMap - map has invalid spatial reference");return;}}if(!_924){if(_922._isWebMercator()&&_923.wkid===4326){_925=esri.geometry.geographicToWebMercator;}else{if(_923._isWebMercator()&&_922.wkid===4326){_925=esri.geometry.webMercatorToGeographic;}else{console.log("KMLLayer:_setMap - unsupported workflow. Spatial reference of the map and kml layer do not match, and the conversion cannot be done on the client.");return;}}}if(this._groundLyr){if(_925){dojo.forEach(this._groundLyr.getImages(),function(_926){_926.extent=_925(_926.extent);});}map.addLayer(this._groundLyr);}var _927=this._fLayers;if(_927&&_927.length>0){dojo.forEach(_927,function(_928){if(_925){var _929=_928.graphics,i,geom,len=_929?_929.length:0;for(i=0;i<len;i++){geom=_929[i].geometry;if(geom){_929[i].setGeometry(_925(geom));}}}map.addLayer(_928);});}this.onVisibilityChange(this.visible);},_removeInternalLayers:function(){var map=this._map;if(this._links){dojo.forEach(this._links,function(link){if(link.declaredClass&&link._io){link._io.cancel();}});}if(map){dojo.forEach(this.getLayers(),map.removeLayer,map);}},_setState:function(_92a,_92b){var _92c=_92a.featureInfos,info,_92d,i,len=_92c?_92c.length:0,_92e=_92b?"show":"hide";for(i=0;i<len;i++){info=_92c[i];_92d=this.getFeature(info);if(!_92d){continue;}if(info.type==="Folder"){this._setState(_92d,_92b&&_92d.visible);}else{if(info.type==="NetworkLink"){this._setInternalVisibility(_92d,_92b);}else{_92d[_92e]();}}}},_areLocalAncestorsVisible:function(_92f){var _930=_92f.parentFolderId,_931=_92f.visible;while(_931&&_930!==-1){var _932=this.getFeature({type:"Folder",id:_930});_931=_931&&_932.visible;_930=_932.parentFolderId;}return _931;},_setInternalVisibility:function(_933,_934){var _935=_933._parentLayer,_936=_933._parentFolderId;_934=_934&&_933.visible;while(_934&&_935){_934=_934&&_935.visible;if(_936>-1){_934=_934&&_935._areLocalAncestorsVisible(_935.getFeature({type:"Folder",id:_936}));}_936=_935._parentFolderId;_935=_935._parentLayer;}this._setIntState(_933,_934);},_setIntState:function(link,_937){if(!link){return;}dojo.forEach(link.getLayers(),function(_938){if(_938.linkInfo){link._setIntState(_938,_937&&_938.visible&&link._areLocalAncestorsVisible(link.getFeature({type:"Folder",id:_938._parentFolderId})));}else{_938.setVisibility(_937);}});},_getLinkParentId:function(id){var _939=-1;if(this.folders){dojo.some(this.folders,function(_93a){if(_93a.networkLinkIds&&dojo.indexOf(_93a.networkLinkIds,id)!==-1){_939=_93a.id;return true;}return false;});}return _939;},_checkAutoRefresh:function(){var _93b=this.linkInfo;if(_93b){if(this.visible){if(this.loaded&&this._map){var _93c=_93b.refreshMode,_93d=_93b.refreshInterval,_93e=_93b.viewRefreshMode,_93f=_93b.viewRefreshTime;if(_93c&&_93c.toLowerCase().indexOf("oninterval")!==-1&&_93d>0){this._stopAutoRefresh();this._timeoutHandle=setTimeout(this.refresh,_93d*1000);}if(_93e&&_93e.toLowerCase().indexOf("onstop")!==-1&&_93f>0){if(!this._extChgHandle){this._extChgHandle=dojo.connect(this._map,"onExtentChange",this,this._extentChanged);}}}}else{this._stopAutoRefresh();dojo.disconnect(this._extChgHandle);delete this._extChgHandle;}}},_stopAutoRefresh:function(){clearTimeout(this._timeoutHandle);this._timeoutHandle=null;},_getQueryParameters:function(map){map=map||this._map;var _940={},_941=this.linkInfo,_942=map&&map.extent;if(this._url.query){dojo.mixin(_940,this._url.query);}if(_941){var _943=_941.viewFormat,_944=_941.httpQuery,_945=_941.viewBoundScale;if(_942&&_943){var _946=_942,_947=_942,sr=_942.spatialReference;if(sr){if(sr._isWebMercator()){_946=esri.geometry.webMercatorToGeographic(_942);}else{if(sr.wkid===4326){_947=esri.geometry.geographicToWebMercator(_942);}}}var _948=_946.getCenter(),_949=Math.max(_947.getWidth(),_947.getHeight());if(_945){_946=_946.expand(_945);}_943=_943.replace(/\[bboxWest\]/ig,_946.xmin).replace(/\[bboxEast\]/ig,_946.xmax).replace(/\[bboxSouth\]/ig,_946.ymin).replace(/\[bboxNorth\]/ig,_946.ymax).replace(/\[lookatLon\]/ig,_948.x).replace(/\[lookatLat\]/ig,_948.y).replace(/\[lookatRange\]/ig,_949).replace(/\[lookatTilt\]/ig,0).replace(/\[lookatHeading\]/ig,0).replace(/\[lookatTerrainLon\]/ig,_948.x).replace(/\[lookatTerrainLat\]/ig,_948.y).replace(/\[lookatTerrainAlt\]/ig,0).replace(/\[cameraLon\]/ig,_948.x).replace(/\[cameraLat\]/ig,_948.y).replace(/\[cameraAlt\]/ig,_949).replace(/\[horizFov\]/ig,60).replace(/\[vertFov\]/ig,60).replace(/\[horizPixels\]/ig,map.width).replace(/\[vertPixels\]/ig,map.height).replace(/\[terrainEnabled\]/ig,0);dojo.mixin(_940,dojo.queryToObject(_943));}if(_944){_944=_944.replace(/\[clientVersion\]/ig,esri.version).replace(/\[kmlVersion\]/ig,2.2).replace(/\[clientName\]/ig,"ArcGIS API for JavaScript").replace(/\[language\]/ig,dojo.locale);dojo.mixin(_940,dojo.queryToObject(_944));}}var _94a=[],_94b;for(_94b in _940){if(esri._isDefined(_940[_94b])){_94a.push(_94b+"="+_940[_94b]);}}_94a=_94a.join("&");return _94a?("?"+_94a):"";},_setMap:function(map,_94c){this._map=map;var div=this._div=dojo.create("div",null,_94c);dojo.style(div,"position","absolute");this._addInternalLayers();return div;},_unsetMap:function(map,_94d){if(this._io){this._io.cancel();}this._stopAutoRefresh();dojo.disconnect(this._extChgHandle);delete this._extChgHandle;this._removeInternalLayers();var div=this._div;if(div){_94d.removeChild(div);dojo.destroy(div);}this._map=this._wMap=this._div=null;},onVisibilityChange:function(_94e){if(!this.loaded){if(this.linkInfo&&_94e){if(!this._waitingForMap){this._parseKml(this._wMap);}}return;}this._fireUpdateStart();this._setInternalVisibility(this,_94e);this._checkAutoRefresh();this._fireUpdateEnd();},refresh:function(){if(!this.loaded||!this._map||this._io){return;}this._parseKml();},_extentChanged:function(){this._stopAutoRefresh();this._timeoutHandle=setTimeout(this.refresh,this.linkInfo.viewRefreshTime*1000);}});dojo.declare("esri.layers.KMLGroundOverlay",[esri.layers.MapImage],{constructor:function(json){if(esri._isDefined(this.visibility)){this.visible=!!this.visibility;}}});dojo.declare("esri.layers.KMLFolder",null,{constructor:function(json){dojo.mixin(this,json);if(esri._isDefined(this.visibility)){this.visible=!!this.visibility;}}});}if(!dojo._hasResource["esri.layers.wms"]){dojo._hasResource["esri.layers.wms"]=true;dojo.provide("esri.layers.wms");dojo.declare("esri.layers.WMSLayer",[esri.layers.DynamicMapServiceLayer],{_CRS_TO_EPSG:{84:4326,83:4269,27:4267},_REVERSED_LAT_LONG_RANGES:[[4001,4999],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3416,3416],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]],_WEB_MERCATOR:[102100,3857,102113,900913],_WORLD_MERCATOR:[3395,54004],allExtents:[],constructor:function(url,_94f){url=this._stripParameters(url,["version","service","request","bbox","format","height","width","layers","srs","crs","styles","transparent","bgcolor","exceptions","time","elevation","sld","wfs"]);this.url=url;this._url=esri.urlToObject(url);this._getCapabilitiesURL=url;this._initLayer=dojo.hitch(this,this._initLayer);this._parseCapabilities=dojo.hitch(this,this._parseCapabilities);this._getCapabilitiesError=dojo.hitch(this,this._getCapabilitiesError);if(_94f){this.imageFormat=this._getImageFormat(_94f.format);this.imageTransparency=(_94f.transparent===false)?false:true;this.visibleLayers=_94f.visibleLayers?_94f.visibleLayers:[];if(_94f.resourceInfo){this._readResourceInfo(_94f.resourceInfo);}else{this._getCapabilities();}}else{this.imageFormat="image/png";this.imageTransparency=true;this.visibleLayers=[];this._getCapabilities();}this._blankImageURL=dojo.moduleUrl("esri","../../images/pixel.png").uri;},setVisibleLayers:function(_950){_950=this._checkVisibleLayersList(_950);this.visibleLayers=(_950)?_950:[];this.refresh(true);},setImageFormat:function(_951){this.imageFormat=this._getImageFormat(_951);this.refresh(true);},setImageTransparency:function(_952){this.imageTransparency=_952;this.refresh(true);},getImageUrl:function(_953,_954,_955,_956){if(!this.visibleLayers||this.visibleLayers.length===0){_956(this._blankImageURL);return;}var wkid=_953.spatialReference.wkid;if(dojo.some(this._WEB_MERCATOR,function(el){return el==wkid;})){var _957=dojo.filter(this.spatialReferences,function(el){return (dojo.some(this._WEB_MERCATOR,function(el2){return el2==el;}));},this);if(_957.length==0){_957=dojo.filter(this.spatialReferences,function(el){return (dojo.some(this._WORLD_MERCATOR,function(el2){return el2==el;}));},this);}if(_957.length>0){wkid=_957[0];}else{wkid=this._WEB_MERCATOR[0];}}var list=dojo.filter(this.spatialReferences,function(el){return el!==wkid;});this.spatialReferences=list;this.spatialReferences.unshift(wkid);var xmin=_953.xmin;var xmax=_953.xmax;var ymin=_953.ymin;var ymax=_953.ymax;var _958={};_958.SERVICE="WMS";_958.REQUEST="GetMap";_958.FORMAT=this.imageFormat;_958.TRANSPARENT=this.imageTransparency?"TRUE":"FALSE";_958.STYLES="";_958.VERSION=this.version;_958.LAYERS=this.visibleLayers?this.visibleLayers.toString():null;_958.WIDTH=_954;_958.HEIGHT=_955;if(this.maxWidth<_954){_958.WIDTH=this.maxWidth;}if(this.maxHeight<_955){_958.HEIGHT=this.maxHeight;}var _959=wkid?wkid:NaN;if(!isNaN(_959)){if(this.version=="1.3.0"){_958.CRS="EPSG:"+_959;}else{_958.SRS="EPSG:"+_959;}}if(this.version=="1.3.0"&&this._useLatLong(_959)){_958.BBOX=ymin+","+xmin+","+ymax+","+xmax;}else{_958.BBOX=xmin+","+ymin+","+xmax+","+ymax;}var _95a=this.getMapURL;_95a+=(_95a.indexOf("?")==-1)?"?":"";for(var key in _958){_95a+=(_95a.substring(_95a.length-1,_95a.length)=="?")?"":"&";_95a+=key+"="+_958[key];}_956(_95a);},_initLayer:function(_95b,io){this.spatialReference=new esri.SpatialReference(this.extent.spatialReference);this.initialExtent=new esri.geometry.Extent(this.extent);this.fullExtent=new esri.geometry.Extent(this.extent);this.visibleLayers=this._checkVisibleLayersList(this.visibleLayers);this.loaded=true;this.onLoad(this);var _95c=this._loadCallback;if(_95c){delete this._loadCallback;_95c(this);}},_readResourceInfo:function(_95d){if(!_95d.extent){console.error("esri.layers.WMSLayer: unable to find the 'extent' property in resourceInfo");return;}if(!_95d.layerInfos){console.error("esri.layers.WMSLayer: unable to find the 'layerInfos' property in resourceInfo");return;}this.extent=_95d.extent;this.allExtents[0]=_95d.extent;this.layerInfos=_95d.layerInfos;this.description=_95d.description?_95d.description:"";this.copyright=_95d.copyright?_95d.copyright:"";this.title=_95d.title?_95d.title:"";this.getMapURL=_95d.getMapURL?_95d.getMapURL:this._getCapabilitiesURL;this.version=_95d.version?_95d.version:"1.3.0";this.maxWidth=_95d.maxWidth?_95d.maxWidth:5000;this.maxHeight=_95d.maxHeight?_95d.maxHeight:5000;this.spatialReferences=_95d.spatialReferences?_95d.spatialReferences:[];this.imageFormat=this._getImageFormat(_95d.format);this._initLayer();},_getCapabilities:function(){var _95e=this._url.query?this._url.query:{};_95e.SERVICE="WMS";_95e.REQUEST="GetCapabilities";var uri=this._url.path+"?";for(var key in _95e){uri+=(uri.substring(uri.length-1,uri.length)=="?")?"":"&";uri+=key+"="+_95e[key];}var _95f=esri.request({url:uri,handleAs:"xml",load:this._parseCapabilities,error:this._getCapabilitiesError},{usePost:false});},_parseCapabilities:function(xml){if(!xml){this.onError("GetCapabilities request for "+this._getCapabilitiesURL+" failed. (Response is null.)");return;}this.version=this._getAttributeValue("WMS_Capabilities","version",xml,null);if(!this.version){this.version=this._getAttributeValue("WMT_MS_Capabilities","version",xml,"1.3.0");}var _960=this._getTag("Service",xml);this.title=this._getTagValue("Title",_960,"");if(!this.title||this.title.length==0){this.title=this._getTagValue("Name",_960,"");}this.copyright=this._getTagValue("AccessConstraints",_960,"");this.description=this._getTagValue("Abstract",_960,"");this.maxWidth=parseInt(this._getTagValue("MaxWidth",_960,5000));this.maxHeight=parseInt(this._getTagValue("MaxHeight",_960,5000));var _961=this._getTag("Layer",xml);if(!_961){this._getCapabilitiesError({"error":{"message":"Response does not contain any layers."}});return;}var _962=this._getLayerInfo(_961);if(_962){this.layerInfos=_962.subLayers;if(!this.layerInfos||this.layerInfos.length==0){this.layerInfos=[_962];}this.extent=_962.extent;this.allExtents=_962.allExtents;this.spatialReferences=_962.spatialReferences;if(this.spatialReferences.length==0&&this.layerInfos.length>0){this.spatialReferences=this.layerInfos[0].spatialReferences;}}this.getMapURL=this._getCapabilitiesURL;var _963=dojo.query("DCPType",this._getTag("GetMap",xml));if(_963&&_963.length>0){var _964=dojo.query("HTTP",_963[0]);if(_964&&_964.length>0){var _965=dojo.query("Get",_964[0]);if(_965&&_965.length>0){var _966=this._getAttributeValue("OnlineResource","xlink:href",_965[0],null);if(_966){if(_966.indexOf("&")==(_966.length-1)){_966=_966.substring(0,_966.length-1);}this.getMapURL=_966;}}}}this.getMapFormats=[];if(dojo.query("Operation",xml).length==0){dojo.forEach(dojo.query("Format",this._getTag("GetMap",xml)),function(_967){this.getMapFormats.push(_967.text?_967.text:_967.textContent);},this);}else{dojo.forEach(dojo.query("Operation",xml),function(_968){if(_968.getAttribute("name")=="GetMap"){dojo.forEach(dojo.query("Format",_968),function(_969){this.getMapFormats.push(_969.text?_969.text:_969.textContent);},this);}},this);}if(!dojo.some(this.getMapFormats,function(el){return el.indexOf(this.imageFormat)>-1;},this)){this.imageFormat=this.getMapFormats[0];}this._initLayer();},_getCapabilitiesError:function(_96a,io){this.onError("GetCapabilities request for "+this._getCapabilitiesURL+" failed. ("+dojo.toJson(_96a)+")");},_getLayerInfo:function(_96b){if(!_96b){return null;}var _96c=new esri.layers.WMSLayerInfo();_96c.name="";_96c.title="";_96c.description="";_96c.allExtents=[];_96c.spatialReferences=[];_96c.subLayers=[];var _96d=this._getTag("LatLonBoundingBox",_96b);if(_96d){_96c.allExtents[0]=this._getExtent(_96d,4326);}var _96e=this._getTag("EX_GeographicBoundingBox",_96b);if(_96e){var _96f=new esri.geometry.Extent(0,0,0,0,new esri.SpatialReference({wkid:4326}));_96f.xmin=parseFloat(this._getTagValue("westBoundLongitude",_96e,0));_96f.ymin=parseFloat(this._getTagValue("southBoundLatitude",_96e,0));_96f.xmax=parseFloat(this._getTagValue("eastBoundLongitude",_96e,0));_96f.ymax=parseFloat(this._getTagValue("northBoundLatitude",_96e,0));_96c.allExtents[0]=_96f;}_96c.extent=_96c.allExtents[0];var _970=(dojo.indexOf(["1.0.0","1.1.0","1.1.1"],this.version)>-1)?"SRS":"CRS";dojo.forEach(_96b.childNodes,function(_971){if(_971.nodeName=="Name"){_96c.name=(_971.text?_971.text:_971.textContent)||"";}else{if(_971.nodeName=="Title"){_96c.title=(_971.text?_971.text:_971.textContent)||"";}else{if(_971.nodeName=="Abstract"){_96c.description=(_971.text?_971.text:_971.textContent)||"";}else{if(_971.nodeName=="BoundingBox"){srAttr=_971.getAttribute(_970);if(srAttr&&srAttr.indexOf("EPSG:")===0){wkid=parseInt(srAttr.substring(5));if(wkid!==0&&!isNaN(wkid)){var _972;if(this.version=="1.3.0"){_972=this._getExtent(_971,wkid,this._useLatLong(wkid));}else{_972=this._getExtent(_971,wkid);}_96c.allExtents[wkid]=_972;if(!_96c.extent){_96c.extent=_972;}}}else{if(srAttr&&srAttr.indexOf("CRS:")===0){wkid=parseInt(srAttr.substring(4));if(wkid!==0&&!isNaN(wkid)){if(this._CRS_TO_EPSG[wkid]){wkid=this._CRS_TO_EPSG[wkid];}_96c.allExtents[wkid]=this._getExtent(_971,wkid);}}else{wkid=parseInt(srAttr);if(wkid!==0&&!isNaN(wkid)){_96c.allExtents[wkid]=this._getExtent(_971,wkid);}}}}else{if(_971.nodeName==_970){var _973=_971.text?_971.text:_971.textContent;var arr=_973.split(" ");dojo.forEach(arr,function(val){if(val.indexOf(":")>-1){val=parseInt(val.split(":")[1]);}else{val=parseInt(val);}if(val!==84&&val!==0&&!isNaN(val)){if(!dojo.some(_96c.spatialReferences,function(el){return (el==val);})){_96c.spatialReferences.push(val);}}},this);}else{if(_971.nodeName=="Style"){var _974=this._getTag("LegendURL",_971);if(_974){var _975=this._getTag("OnlineResource",_974);if(_975){_96c.legendURL=_975.getAttribute("xlink:href");}}}else{if(_971.nodeName==="Layer"){_96c.subLayers.push(this._getLayerInfo(_971));}}}}}}}},this);return _96c;},_getImageFormat:function(_976){var _977=_976?_976.toLowerCase():"";switch(_977){case "jpg":return "image/jpeg";case "bmp":return "image/bmp";case "gif":return "image/gif";case "svg":return "image/svg+xml";default:return "image/png";}},getImageFormat:function(){var _978=this.imageFormat?this.imageFormat.toLowerCase():"";switch(_978){case "image/jpeg":return "jpg";case "image/bmp":return "bmp";case "image/gif":return "gif";case "image/svg+xml":return "svg";default:return "png";}},_getExtent:function(_979,wkid,_97a){var _97b;if(_979){_97b=new esri.geometry.Extent();var minx=parseFloat(_979.getAttribute("minx"));var miny=parseFloat(_979.getAttribute("miny"));var maxx=parseFloat(_979.getAttribute("maxx"));var maxy=parseFloat(_979.getAttribute("maxy"));if(_97a){_97b.xmin=isNaN(miny)?((-1)*Number.MAX_VALUE):miny;_97b.ymin=isNaN(minx)?((-1)*Number.MAX_VALUE):minx;_97b.xmax=isNaN(maxy)?Number.MAX_VALUE:maxy;_97b.ymax=isNaN(maxx)?Number.MAX_VALUE:maxx;}else{_97b.xmin=isNaN(minx)?((-1)*Number.MAX_VALUE):minx;_97b.ymin=isNaN(miny)?((-1)*Number.MAX_VALUE):miny;_97b.xmax=isNaN(maxx)?Number.MAX_VALUE:maxx;_97b.ymax=isNaN(maxy)?Number.MAX_VALUE:maxy;}_97b.spatialReference=new esri.SpatialReference({wkid:wkid});}return _97b;},_useLatLong:function(wkid){var _97c;for(var i=0;i<this._REVERSED_LAT_LONG_RANGES.length;i++){var _97d=this._REVERSED_LAT_LONG_RANGES[i];if(wkid>=_97d[0]&&wkid<=_97d[1]){_97c=true;break;}}return _97c;},_getTag:function(_97e,xml){var tags=dojo.query(_97e,xml);if(tags&&tags.length>0){return tags[0];}else{return null;}},_getTagValue:function(_97f,xml,_980){var _981=dojo.query(_97f,xml);if(_981&&_981.length>0){if(_981[0].text){return _981[0].text;}else{return _981[0].textContent;}}else{return _980;}},_getAttributeValue:function(_982,_983,xml,_984){var _985=dojo.query(_982,xml);if(_985&&_985.length>0){return _985[0].getAttribute(_983);}else{return _984;}},_checkVisibleLayersList:function(_986){if(_986&&_986.length>0&&this.layerInfos&&this.layerInfos.length>0){if((typeof _986[0])=="number"){var list=[];dojo.forEach(_986,function(pos){if(pos<this.layerInfos.length){list.push(this.layerInfos[pos].name);}},this);_986=list;}}return _986;},_stripParameters:function(url,_987){var obj=esri.urlToObject(url);qs=[];for(var prop in obj.query){if(dojo.indexOf(_987,prop.toLowerCase())===-1){qs.push(prop+"="+obj.query[prop]);}}return obj.path+(qs.length?("?"+qs.join("&")):"");}});dojo.declare("esri.layers.WMSLayerInfo",null,{name:null,title:null,description:null,extent:null,legendURL:null,subLayers:[],allExtents:[],spatialReferences:[],constructor:function(_988){if(_988){this.name=_988.name;this.title=_988.title;this.description=_988.description;this.extent=_988.extent;this.legendURL=_988.legendURL;this.subLayers=_988.subLayers?_988.subLayers:[];this.allExtents=_988.allExtents?_988.allExtents:[];this.spatialReferences=_988.spatialReferences?_988.spatialReferences:[];}},clone:function(){var info={name:this.name,title:this.title,description:this.description,legendURL:this.legendURL};if(this.extent){info.extent=this.extent.getExtent();}info.subLayers=[];dojo.forEach(this.subLayers,function(_989){info.subLayers.push(_989.clone());});info.allExtents=[];for(var wkid in this.allExtents){wkid=parseInt(wkid);if(!isNaN(wkid)){info.allExtents[wkid]=this.allExtents[wkid].getExtent();}}info.spatialReferences=[];dojo.forEach(this.spatialReferences,function(wkid){info.spatialReferences.push(wkid);});return info;}});}if(!dojo._hasResource["esri.virtualearth.VETiledLayer"]){dojo._hasResource["esri.virtualearth.VETiledLayer"]=true;dojo.provide("esri.virtualearth.VETiledLayer");dojo.declare("esri.virtualearth.VETiledLayer",esri.layers.TiledMapServiceLayer,{constructor:function(_98a){try{_98a=dojo.mixin({bingMapsKey:null,culture:"en-US"},_98a||{});var _98b=window.location.protocol;if(_98b==="file:"){_98b="http:";}this.url=_98b+"//serverapi.arcgisonline.com/veadaptor/production/services/imagery/getmetadata";this._url=esri.urlToObject(this.url);this.spatialReference=new esri.SpatialReference({wkid:102100});this.tileInfo=new esri.layers.TileInfo({rows:256,cols:256,dpi:96,origin:{x:-20037508.342787,y:20037508.342787},spatialReference:{wkid:102100},lods:[{level:1,resolution:78271.5169639999,scale:295828763.795777},{level:2,resolution:39135.7584820001,scale:147914381.897889},{level:3,resolution:19567.8792409999,scale:73957190.948944},{level:4,resolution:9783.93962049996,scale:36978595.474472},{level:5,resolution:4891.96981024998,scale:18489297.737236},{level:6,resolution:2445.98490512499,scale:9244648.868618},{level:7,resolution:1222.99245256249,scale:4622324.434309},{level:8,resolution:611.49622628138,scale:2311162.217155},{level:9,resolution:305.748113140558,scale:1155581.108577},{level:10,resolution:152.874056570411,scale:577790.554289},{level:11,resolution:76.4370282850732,scale:288895.277144},{level:12,resolution:38.2185141425366,scale:144447.638572},{level:13,resolution:19.1092570712683,scale:72223.819286},{level:14,resolution:9.55462853563415,scale:36111.909643},{level:15,resolution:4.77731426794937,scale:18055.954822},{level:16,resolution:2.38865713397468,scale:9027.977411},{level:17,resolution:1.19432856685505,scale:4513.988705},{level:18,resolution:0.597164283559817,scale:2256.994353},{level:19,resolution:0.298582141647617,scale:1128.497176}]});this.initialExtent=(this.fullExtent=new esri.geometry.Extent(-20037508.342787,-20037508.34278,20037508.34278,20037508.342787,new esri.SpatialReference({wkid:102100})));dojo.mixin(this,_98a);this._initLayer=dojo.hitch(this,this._initLayer);this._errorHandler=dojo.hitch(this,this._errorHandler);this._getTileInfo=dojo.hitch(this,this._getTileInfo);if(this.bingMapsKey){this._getTileInfo();}else{throw new Error(esri.bundle.virtualearth.vetiledlayer.bingMapsKeyNotSpecified);}}catch(e){this.onError(e);throw e;}},_unsetMap:function(map,_98c){this.inherited("_unsetMap",arguments);},_getTileInfo:function(){if(this.bingMapsKey){var info=this.resourceInfo;if(!this.loaded&&info){this._initLayer(info);}else{esri.request({url:this._url.path,content:dojo.mixin({},this._url.query,{token:this.bingMapsKey,style:this.mapStyle,culture:this.culture}),callbackParamName:"callback",load:this._initLayer,error:this._errorHandler});}}},_initLayer:function(_98d,io){try{this.resourceInfo=dojo.toJson(_98d);var _98e=_98d.imageUri.replace("{","${");this.tileServers=dojo.map(_98d.subDomains,function(_98f){var _990=window.location.protocol;if(_990==="file:"){_990="http:";}return dojo.string.substitute(_98e,{subdomain:_98f}).replace("http:",_990);});this._tsLength=this.tileServers.length;if(!this.loaded){this.loaded=true;this.onLoad(this);var _991=this.loadCallback;if(_991){delete this.loadCallback;_991(this);}}else{this.refresh();}}catch(e){this.onError(e);}},getTileUrl:function(_992,row,col){var _993=this.tileServers[row%this._tsLength],_994=_993.replace(/\{/g,"${");return dojo.string.substitute(_994,{quadkey:this._getQuadKey(_992,row,col),culture:this.culture,token:this.bingMapsKey});},_getQuadKey:function(_995,row,col){var _996="",_997,mask,i;for(i=_995;i>0;i--){_997="0";mask=1<<(i-1);if((col&mask)!=0){_997++;}if((row&mask)!=0){_997++;_997++;}_996=_996+_997;}return _996;},setMapStyle:function(_998){this.mapStyle=_998;this._getTileInfo();},setCulture:function(_999){this.culture=_999;this._getTileInfo();},setBingMapsKey:function(_99a){this.bingMapsKey=_99a;}});dojo.mixin(esri.virtualearth.VETiledLayer,{MAP_STYLE_AERIAL:"aerial",MAP_STYLE_AERIAL_WITH_LABELS:"aerialWithLabels",MAP_STYLE_ROAD:"road"});}if(!dojo._hasResource["esri.tasks.geometry"]){dojo._hasResource["esri.tasks.geometry"]=true;dojo.provide("esri.tasks.geometry");dojo.declare("esri.tasks.GeometryService",esri.tasks._Task,{constructor:function(url){var _99b=dojo.hitch;this._projectHandler=_99b(this,this._projectHandler);this._simplifyHandler=_99b(this,this._simplifyHandler);this._bufferHandler=_99b(this,this._bufferHandler);this._areasAndLengthsHandler=_99b(this,this._areasAndLengthsHandler);this._lengthsHandler=_99b(this,this._lengthsHandler);this._labelPointsHandler=_99b(this,this._labelPointsHandler);this._relationHandler=_99b(this,this._relationHandler);this._convexHullHandler=_99b(this,this._convexHullHandler);this._unionHandler=_99b(this,this._unionHandler);this._autoCompleteHandler=_99b(this,this._autoCompleteHandler);this._reshapeHandler=_99b(this,this._reshapeHandler);this._cutHandler=_99b(this,this._cutHandler);this._intersectHandler=_99b(this,this._intersectHandler);this._differenceHandler=_99b(this,this._differenceHandler);this._trimExtendHandler=_99b(this,this._trimExtendHandler);this._densifyHandler=_99b(this,this._densifyHandler);this._generalizeHandler=_99b(this,this._densifyHandler);this._offsetHandler=_99b(this,this._offsetHandler);this._distanceHandler=_99b(this,this._distanceHandler);},_encodeGeometries:function(_99c){var gs=[];for(var i=0,il=_99c.length;i<il;i++){gs.push(_99c[i].toJson());}return {geometryType:esri.geometry.getJsonType(_99c[0]),geometries:gs};},_decodeGeometries:function(_99d,_99e,sr){var _99f=esri.geometry.getGeometryType(_99e),_9a0=_99d.geometries,fs=[],_9a1={spatialReference:sr.toJson()},_9a2=dojo.mixin;dojo.forEach(_9a0,function(g,i){fs[i]=new _99f(_9a2(g,_9a1));});return fs;},_toProjectGeometry:function(_9a3){var sr=_9a3.spatialReference.toJson();if(_9a3 instanceof esri.geometry.Extent){return new esri.geometry.Polygon({rings:[[[_9a3.xmin,_9a3.ymin],[_9a3.xmin,_9a3.ymax],[_9a3.xmax,_9a3.ymax],[_9a3.xmax,_9a3.ymin],[_9a3.xmin,_9a3.ymin]]],spatialReference:sr});}else{return new esri.geometry.Polyline({paths:[[].concat(_9a3.points)],spatialReference:sr});}},_fromProjectedGeometry:function(_9a4,_9a5,_9a6){if(_9a5==="esriGeometryEnvelope"){var ring=_9a4.rings[0];return new esri.geometry.Extent(ring[0][0],ring[0][1],ring[2][0],ring[2][1],_9a6);}else{return new esri.geometry.Multipoint({points:_9a4.paths[0],spatialReference:_9a6.toJson()});}},project:function(_9a7,_9a8,_9a9,_9aa){var _9ab=_9a7[0];var _9ac=dojo.mixin({},this._url.query,{f:"json",outSR:_9a8.wkid?_9a8.wkid:dojo.toJson(_9a8.toJson()),inSR:_9ab.spatialReference.wkid?_9ab.spatialReference.wkid:dojo.toJson(_9ab.spatialReference.toJson()),geometries:dojo.toJson(this._encodeGeometries(_9a7))}),_9ad=esri.geometry.getJsonType(_9a7[0]),_9ae=this._projectHandler,_9af=this._errorHandler,dfd=new dojo.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/project",content:_9ac,callbackParamName:"callback",load:(function(r,i){_9ae(r,i,_9ad,_9a8,_9a9,_9aa,dfd);}),error:(function(r){_9af(r,_9aa,dfd);})});return dfd;},_projectHandler:function(_9b0,io,_9b1,_9b2,_9b3,_9b4,dfd){try{var fs=this._decodeGeometries(_9b0,_9b1,_9b2);this._successHandler([fs],"onProjectComplete",_9b3,dfd);}catch(err){this._errorHandler(err,_9b4,dfd);}},onProjectComplete:function(){},simplify:function(_9b5,_9b6,_9b7){var _9b8=_9b5[0].spatialReference;var _9b9=dojo.mixin({},this._url.query,{f:"json",sr:_9b8.wkid?_9b8.wkid:dojo.toJson(_9b8.toJson()),geometries:dojo.toJson(this._encodeGeometries(_9b5))}),_9ba=esri.geometry.getJsonType(_9b5[0]),_9bb=this._simplifyHandler,_9bc=this._errorHandler,dfd=new dojo.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/simplify",content:_9b9,callbackParamName:"callback",load:(function(r,i){_9bb(r,i,_9ba,_9b8,_9b6,_9b7,dfd);}),error:(function(r){_9bc(r,_9b7,dfd);})});return dfd;},_simplifyHandler:function(_9bd,io,_9be,sr,_9bf,_9c0,dfd){try{var fs=this._decodeGeometries(_9bd,_9be,sr);this._successHandler([fs],"onSimplifyComplete",_9bf,dfd);}catch(err){this._errorHandler(err,_9c0,dfd);}},onSimplifyComplete:function(){},convexHull:function(_9c1,_9c2,_9c3){var _9c4=_9c1[0].spatialReference;var _9c5=dojo.mixin({},this._url.query,{f:"json",sr:dojo.toJson(_9c4.toJson()),geometries:dojo.toJson(this._encodeGeometries(_9c1))}),_9c6=this._convexHullHandler,_9c7=this._errorHandler,dfd=new dojo.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/convexHull",content:_9c5,callbackParamName:"callback",load:(function(r,i){_9c6(r,i,_9c4,_9c2,_9c3,dfd);}),error:(function(r){_9c7(r,_9c3,dfd);})});return dfd;},_convexHullHandler:function(_9c8,io,_9c9,_9ca,_9cb,dfd){try{var geom=esri.geometry.fromJson(_9c8.geometry).setSpatialReference(_9c9);this._successHandler([geom],"onConvexHullComplete",_9ca,dfd);}catch(err){this._errorHandler(err,_9cb,dfd);}},onConvexHullComplete:function(){},union:function(_9cc,_9cd,_9ce){var _9cf=_9cc[0].spatialReference;var _9d0=dojo.mixin({},this._url.query,{f:"json",sr:dojo.toJson(_9cf.toJson()),geometries:dojo.toJson(this._encodeGeometries(_9cc))}),_9d1=this._unionHandler,_9d2=this._errorHandler,dfd=new dojo.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/union",content:_9d0,callbackParamName:"callback",load:(function(r,i){_9d1(r,i,_9cf,_9cd,_9ce,dfd);}),error:(function(r){_9d2(r,_9ce,dfd);})});return dfd;},_unionHandler:function(_9d3,io,_9d4,_9d5,_9d6,dfd){try{var geom=esri.geometry.fromJson(_9d3.geometry).setSpatialReference(_9d4);this._successHandler([geom],"onUnionComplete",_9d5,dfd);}catch(err){this._errorHandler(err,_9d6,dfd);}},onUnionComplete:function(){},autoComplete:function(_9d7,_9d8,_9d9,_9da){var _9db=_9d7[0].spatialReference;var _9dc=dojo.mixin({},this._url.query,{f:"json",sr:dojo.toJson(_9db.toJson()),polygons:dojo.toJson(this._encodeGeometries(_9d7).geometries),polylines:dojo.toJson(this._encodeGeometries(_9d8).geometries)}),_9dd=this._autoCompleteHandler,_9de=this._errorHandler,dfd=new dojo.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/autoComplete",content:_9dc,callbackParamName:"callback",load:(function(r,i){_9dd(r,i,_9db,_9d9,_9da,dfd);}),error:(function(r){_9de(r,_9da,dfd);})});return dfd;},_autoCompleteHandler:function(_9df,io,_9e0,_9e1,_9e2,dfd){try{var Pgon=esri.geometry.Polygon,_9e3=_9df.geometries,_9e4=[];for(var i=0,il=_9e3.length;i<il;i++){_9e4[i]=new Pgon({spatialReference:_9e0,rings:_9e3[i].rings});}this._successHandler([_9e4],"onAutoCompleteComplete",_9e1,dfd);}catch(err){this._errorHandler(err,_9e2,dfd);}},onAutoCompleteComplete:function(){},reshape:function(_9e5,_9e6,_9e7,_9e8){var _9e9=_9e5.spatialReference;var _9ea=dojo.mixin({},this._url.query,{f:"json",sr:dojo.toJson(_9e9.toJson()),target:dojo.toJson({geometryType:esri.geometry.getJsonType(_9e5),geometry:_9e5.toJson()}),reshaper:dojo.toJson(_9e6.toJson())}),_9eb=this._reshapeHandler,_9ec=this._errorHandler,dfd=new dojo.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/reshape",content:_9ea,callbackParamName:"callback",load:(function(r,i){_9eb(r,i,_9e9,_9e7,_9e8,dfd);}),error:(function(r){_9ec(r,_9e8,dfd);})});return dfd;},_reshapeHandler:function(_9ed,io,_9ee,_9ef,_9f0,dfd){try{var geom=esri.geometry.fromJson(_9ed.geometry).setSpatialReference(_9ee);this._successHandler([geom],"onReshapeComplete",_9ef,dfd);}catch(err){this._errorHandler(err,_9f0,dfd);}},onReshapeComplete:function(){},cut:function(_9f1,_9f2,_9f3,_9f4){var _9f5=_9f1[0].spatialReference;var _9f6=dojo.map(_9f1,function(_9f7){return _9f7.toJson();});var _9f8=dojo.mixin({},this._url.query,{f:"json",sr:dojo.toJson(_9f5.toJson()),target:dojo.toJson({geometryType:esri.geometry.getJsonType(_9f1[0]),geometries:_9f6}),cutter:dojo.toJson(_9f2.toJson())}),_9f9=this._cutHandler,_9fa=this._errorHandler,dfd=new dojo.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/cut",content:_9f8,callbackParamName:"callback",load:(function(r,i){_9f9(r,i,_9f5,_9f3,_9f4,dfd);}),error:(function(r){_9fa(r,_9f4,dfd);})});return dfd;},_cutHandler:function(_9fb,io,_9fc,_9fd,_9fe,dfd){try{var _9ff=_9fb.geometries;var _a00={};_a00.cutIndexes=_9fb.cutIndexes;_a00.geometries=[];dojo.forEach(_9ff,function(geom){_a00.geometries.push(esri.geometry.fromJson(geom).setSpatialReference(_9fc));});this._successHandler([_a00],"onCutComplete",_9fd,dfd);}catch(err){this._errorHandler(err,_9fe,dfd);}},onCutComplete:function(){},intersect:function(_a01,_a02,_a03,_a04){var _a05=_a01[0].spatialReference;var _a06=dojo.mixin({},this._url.query,{f:"json",sr:dojo.toJson(_a05.toJson()),geometries:dojo.toJson(this._encodeGeometries(_a01)),geometry:dojo.toJson({geometryType:esri.geometry.getJsonType(_a02),geometry:_a02.toJson()})}),_a07=this._intersectHandler,_a08=this._errorHandler,dfd=new dojo.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/intersect",content:_a06,callbackParamName:"callback",load:(function(r,i){_a07(r,i,_a05,_a03,_a04,dfd);}),error:(function(r){_a08(r,_a04,dfd);})});return dfd;},_intersectHandler:function(_a09,io,_a0a,_a0b,_a0c,dfd){try{var _a0d=_a09.geometries,_a0e=[];dojo.forEach(_a0d,function(geom){_a0e.push(esri.geometry.fromJson(geom).setSpatialReference(_a0a));});this._successHandler([_a0e],"onIntersectComplete",_a0b,dfd);}catch(err){this._errorHandler(err,_a0c,dfd);}},onIntersectComplete:function(){},difference:function(_a0f,_a10,_a11,_a12){var _a13=_a0f[0].spatialReference;var _a14=dojo.mixin({},this._url.query,{f:"json",sr:dojo.toJson(_a13.toJson()),geometries:dojo.toJson(this._encodeGeometries(_a0f)),geometry:dojo.toJson({geometryType:esri.geometry.getJsonType(_a10),geometry:_a10.toJson()})}),_a15=this._differenceHandler,_a16=this._errorHandler,dfd=new dojo.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/difference",content:_a14,callbackParamName:"callback",load:(function(r,i){_a15(r,i,_a13,_a11,_a12,dfd);}),error:(function(r){_a16(r,_a12,dfd);})});return dfd;},_differenceHandler:function(_a17,io,_a18,_a19,_a1a,dfd){try{var _a1b=_a17.geometries,_a1c=[];dojo.forEach(_a1b,function(geom){_a1c.push(esri.geometry.fromJson(geom).setSpatialReference(_a18));});this._successHandler([_a1c],"onDifferenceComplete",_a19,dfd);}catch(err){this._errorHandler(err,_a1a,dfd);}},onDifferenceComplete:function(){},buffer:function(_a1d,_a1e,_a1f){var _a20=dojo.mixin({},this._url.query,{f:"json"},_a1d.toJson()),sr=_a1d.outSpatialReference||_a1d.geometries[0].spatialReference,_a21=this._bufferHandler,_a22=this._errorHandler,dfd=new dojo.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/buffer",content:_a20,callbackParamName:"callback",load:(function(r,i){_a21(r,i,sr,_a1e,_a1f,dfd);}),error:(function(r){_a22(r,_a1f,dfd);})});return dfd;},_bufferHandler:function(_a23,io,sr,_a24,_a25,dfd){try{var Pgon=esri.geometry.Polygon,_a26=_a23.geometries,_a27=[];for(var i=0,il=_a26.length;i<il;i++){_a27[i]=new Pgon({spatialReference:sr,rings:_a26[i].rings});}this._successHandler([_a27],"onBufferComplete",_a24,dfd);}catch(err){this._errorHandler(err,_a25,dfd);}},onBufferComplete:function(){},areasAndLengths:function(_a28,_a29,_a2a){var _a2b=dojo.mixin({},this._url.query,{f:"json"},_a28.toJson()),_a2c=this._areasAndLengthsHandler,_a2d=this._errorHandler,dfd=new dojo.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/areasAndLengths",content:_a2b,callbackParamName:"callback",load:(function(r,i){_a2c(r,i,_a29,_a2a,dfd);}),error:(function(r){_a2d(r,_a2a,dfd);})});return dfd;},_areasAndLengthsHandler:function(_a2e,io,_a2f,_a30,dfd){try{this._successHandler([_a2e],"onAreasAndLengthsComplete",_a2f,dfd);}catch(err){this._errorHandler(err,_a30,dfd);}},onAreasAndLengthsComplete:function(){},lengths:function(_a31,_a32,_a33){var _a34=dojo.mixin({},this._url.query,{f:"json"},_a31.toJson()),_a35=this._lengthsHandler,_a36=this._errorHandler,dfd=new dojo.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/lengths",content:_a34,callbackParamName:"callback",load:(function(r,i){_a35(r,i,_a32,_a33,dfd);}),error:(function(r){_a36(r,_a33,dfd);})});return dfd;},_lengthsHandler:function(_a37,io,_a38,_a39,dfd){try{this._successHandler([_a37],"onLengthsComplete",_a38,dfd);}catch(err){this._errorHandler(err,_a39,dfd);}},onLengthsComplete:function(){},labelPoints:function(_a3a,_a3b,_a3c){var _a3d=dojo.map(_a3a,function(geom){return geom.toJson();});var sr=_a3a[0].spatialReference,_a3e=dojo.mixin({},this._url.query,{f:"json",sr:sr.wkid?sr.wkid:dojo.toJson(sr.toJson()),polygons:dojo.toJson(_a3d)}),_a3f=this._labelPointsHandler,_a40=this._errorHandler,dfd=new dojo.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/labelPoints",content:_a3e,callbackParamName:"callback",load:(function(r,i){_a3f(r,i,_a3a,sr,_a3b,_a3c,dfd);}),error:(function(r){_a40(r,_a3c,dfd);})});return dfd;},_labelPointsHandler:function(_a41,io,_a42,sr,_a43,_a44,dfd){try{var _a45=_a41.labelPoints,_a46=[];dojo.forEach(_a45,function(geom){_a46.push(esri.geometry.fromJson(geom).setSpatialReference(sr));});this._successHandler([_a46],"onLabelPointsComplete",_a43,dfd);}catch(err){this._errorHandler(err,_a44,dfd);}},onLabelPointsComplete:function(){},relation:function(_a47,_a48,_a49){var _a4a=dojo.mixin({},this._url.query,{f:"json"},_a47.toJson()),_a4b=this._relationHandler,_a4c=this._errorHandler,dfd=new dojo.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/relation",content:_a4a,callbackParamName:"callback",load:(function(r,i){_a4b(r,i,_a48,_a49,dfd);}),error:(function(r){_a4c(r,_a49,dfd);})});return dfd;},_relationHandler:function(_a4d,io,_a4e,_a4f,dfd){try{var _a50=_a4d.relations;this._successHandler([_a50],"onRelationComplete",_a4e,dfd);}catch(err){this._errorHandler(err,_a4f,dfd);}},onRelationComplete:function(){},trimExtend:function(_a51,_a52,_a53){var _a54=dojo.mixin({},this._url.query,{f:"json"},_a51.toJson()),_a55=_a51.sr,_a56=this._trimExtendHandler,_a57=this._errorHandler,dfd=new dojo.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/trimExtend",content:_a54,callbackParamName:"callback",load:(function(r,i){_a56(r,i,_a55,_a52,_a53,dfd);}),error:(function(r){_a57(r,_a53,dfd);})});return dfd;},_trimExtendHandler:function(_a58,io,_a59,_a5a,_a5b,dfd){try{var _a5c=esri.geometry.Polyline,_a5d=_a58.geometries,_a5e=[];for(var i=0,il=_a5d.length;i<il;i++){_a5e[i]=new _a5c({spatialReference:_a59,paths:_a5d[i].paths});}this._successHandler([_a5e],"onTrimExtendComplete",_a5a,dfd);}catch(err){this._errorHandler(err,_a5b,dfd);}},onTrimExtendComplete:function(){},densify:function(_a5f,_a60,_a61){var _a62=dojo.mixin({},this._url.query,{f:"json"},_a5f.toJson()),_a63=_a5f.geometries[0].spatialReference,_a64=this._densifyHandler,_a65=this._errorHandler,dfd=new dojo.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/densify",content:_a62,callbackParamName:"callback",load:(function(r,i){_a64(r,i,_a63,_a60,_a61,dfd);}),error:(function(r){_a65(r,_a61,dfd);})});return dfd;},_densifyHandler:function(_a66,io,_a67,_a68,_a69,dfd){try{var _a6a=_a66.geometries,_a6b=[];dojo.forEach(_a6a,function(geom){_a6b.push(esri.geometry.fromJson(geom).setSpatialReference(_a67));});this._successHandler([_a6b],"onDensifyComplete",_a68,dfd);}catch(err){this._errorHandler(err,_a69,dfd);}},onDensifyComplete:function(){},generalize:function(_a6c,_a6d,_a6e){var _a6f=dojo.mixin({},this._url.query,{f:"json"},_a6c.toJson()),_a70=_a6c.geometries[0].spatialReference,_a71=this._generalizeHandler,_a72=this._errorHandler,dfd=new dojo.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/generalize",content:_a6f,callbackParamName:"callback",load:(function(r,i){_a71(r,i,_a70,_a6d,_a6e,dfd);}),error:(function(r){_a72(r,_a6e,dfd);})});return dfd;},_generalizeHandler:function(_a73,io,_a74,_a75,_a76,dfd){try{var _a77=_a73.geometries,_a78=[];dojo.forEach(_a77,function(geom){_a78.push(esri.geometry.fromJson(geom).setSpatialReference(_a74));});this._successHandler([_a78],"onGeneralizeComplete",_a75,dfd);}catch(err){this._errorHandler(err,_a76,dfd);}},onGeneralizeComplete:function(){},offset:function(_a79,_a7a,_a7b){var _a7c=dojo.mixin({},this._url.query,{f:"json"},_a79.toJson()),_a7d=_a79.geometries[0].spatialReference,_a7e=this._offsetHandler,_a7f=this._errorHandler,dfd=new dojo.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/offset",content:_a7c,callbackParamName:"callback",load:(function(r,i){_a7e(r,i,_a7d,_a7a,_a7b,dfd);}),error:(function(r){_a7f(r,_a7b,dfd);})});return dfd;},_offsetHandler:function(_a80,io,_a81,_a82,_a83,dfd){try{var _a84=_a80.geometries,_a85=[];dojo.forEach(_a84,function(geom){_a85.push(esri.geometry.fromJson(geom).setSpatialReference(_a81));});this._successHandler([_a85],"onOffsetComplete",_a82,dfd);}catch(err){this._errorHandler(err,_a83,dfd);}},onOffsetComplete:function(){},distance:function(_a86,_a87,_a88){var _a89=dojo.mixin({},this._url.query,{f:"json"},_a86.toJson()),_a8a=_a86.geometry1.spatialReference,_a8b=this._distanceHandler,_a8c=this._errorHandler,dfd=new dojo.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/distance",content:_a89,callbackParamName:"callback",load:(function(r,i){_a8b(r,i,_a8a,_a87,_a88,dfd);}),error:(function(r){_a8c(r,_a88,dfd);})});return dfd;},_distanceHandler:function(_a8d,io,_a8e,_a8f,_a90,dfd){try{_a8d=_a8d&&_a8d.distance;this._successHandler([_a8d],"onDistanceComplete",_a8f,dfd);}catch(err){this._errorHandler(err,_a90,dfd);}},onDistanceComplete:function(){}});dojo.declare("esri.tasks.TrimExtendParameters",null,{polylines:null,trimExtendTo:null,extendHow:null,toJson:function(){var _a91=dojo.map(this.polylines,function(geom){return geom.toJson();});var json={};json.polylines=dojo.toJson(_a91);json.trimExtendTo=dojo.toJson(this.trimExtendTo.toJson());json.sr=dojo.toJson(this.polylines[0].spatialReference.toJson());json.extendHow=this.extendHow||0;return json;}});dojo.mixin(esri.tasks.TrimExtendParameters,{DEFAULT_CURVE_EXTENSION:0,RELOCATE_ENDS:1,KEEP_END_ATTRIBUTES:2,NO_END_ATTRIBUTES:4,NO_EXTEND_AT_FROM:8,NO_EXTEND_AT_TO:16});dojo.declare("esri.tasks.BufferParameters",null,{geometries:null,outSpatialReference:null,bufferSpatialReference:null,distances:null,unit:null,unionResults:false,geodesic:false,toJson:function(){var json={unit:this.unit,unionResults:(""+this.unionResults),geodesic:(""+this.geodesic)},dt=this.distances,_a92=this.outSpatialReference,_a93=this.bufferSpatialReference;var _a94=dojo.map(this.geometries,function(geom){geom=(geom.type==="extent")?this._extentToPolygon(geom):geom;return geom.toJson();},this);var _a95=this.geometries;if(_a95&&_a95.length>0){var _a96=_a95[0].type==="extent"?"esriGeometryPolygon":esri.geometry.getJsonType(_a95[0]);json.geometries=dojo.toJson({geometryType:_a96,geometries:_a94});json.inSR=_a95[0].spatialReference.wkid?_a95[0].spatialReference.wkid:dojo.toJson(_a95[0].spatialReference.toJson());}if(dt){json.distances=dt.join(",");}if(_a92){json.outSR=_a92.wkid?_a92.wkid:dojo.toJson(_a92.toJson());}if(_a93){json.bufferSR=_a93.wkid?_a93.wkid:dojo.toJson(_a93.toJson());}return json;},_extentToPolygon:function(_a97){var xmin=_a97.xmin,ymin=_a97.ymin,xmax=_a97.xmax,ymax=_a97.ymax;return new esri.geometry.Polygon({"rings":[[[xmin,ymin],[xmin,ymax],[xmax,ymax],[xmax,ymin],[xmin,ymin]]],"spatialReference":_a97.spatialReference.toJson()});}});dojo.mixin(esri.tasks.GeometryService,{UNIT_METER:9001,UNIT_GERMAN_METER:9031,UNIT_FOOT:9002,UNIT_SURVEY_FOOT:9003,UNIT_CLARKE_FOOT:9005,UNIT_FATHOM:9014,UNIT_NAUTICAL_MILE:9030,UNIT_SURVEY_CHAIN:9033,UNIT_SURVEY_LINK:9034,UNIT_SURVEY_MILE:9035,UNIT_KILOMETER:9036,UNIT_CLARKE_YARD:9037,UNIT_CLARKE_CHAIN:9038,UNIT_CLARKE_LINK:9039,UNIT_SEARS_YARD:9040,UNIT_SEARS_FOOT:9041,UNIT_SEARS_CHAIN:9042,UNIT_SEARS_LINK:9043,UNIT_BENOIT_1895A_YARD:9050,UNIT_BENOIT_1895A_FOOT:9051,UNIT_BENOIT_1895A_CHAIN:9052,UNIT_BENOIT_1895A_LINK:9053,UNIT_BENOIT_1895B_YARD:9060,UNIT_BENOIT_1895B_FOOT:9061,UNIT_BENOIT_1895B_CHAIN:9062,UNIT_BENOIT_1895B_LINK:9063,UNIT_INDIAN_FOOT:9080,UNIT_INDIAN_1937_FOOT:9081,UNIT_INDIAN_1962_FOOT:9082,UNIT_INDIAN_1975_FOOT:9083,UNIT_INDIAN_YARD:9084,UNIT_INDIAN_1937_YARD:9085,UNIT_INDIAN_1962_YARD:9086,UNIT_INDIAN_1975_YARD:9087,UNIT_FOOT_1865:9070,UNIT_RADIAN:9101,UNIT_DEGREE:9102,UNIT_ARCMINUTE:9103,UNIT_ARCSECOND:9104,UNIT_GRAD:9105,UNIT_GON:9106,UNIT_MICRORADIAN:9109,UNIT_ARCMINUTE_CENTESIMAL:9112,UNIT_ARCSECOND_CENTESIMAL:9113,UNIT_MIL6400:9114,UNIT_BRITISH_1936_FOOT:9095,UNIT_GOLDCOAST_FOOT:9094,UNIT_INTERNATIONAL_CHAIN:109003,UNIT_INTERNATIONAL_LINK:109004,UNIT_INTERNATIONAL_YARD:109001,UNIT_STATUTE_MILE:9093,UNIT_SURVEY_YARD:109002,UNIT_50KILOMETER_LENGTH:109030,UNIT_150KILOMETER_LENGTH:109031,UNIT_DECIMETER:109005,UNIT_CENTIMETER:109006,UNIT_MILLIMETER:109007,UNIT_INTERNATIONAL_INCH:109008,UNIT_US_SURVEY_INCH:109009,UNIT_INTERNATIONAL_ROD:109010,UNIT_US_SURVEY_ROD:109011,UNIT_US_NAUTICAL_MILE:109012,UNIT_UK_NAUTICAL_MILE:109013,UNIT_SQUARE_INCHES:"esriSquareInches",UNIT_SQUARE_FEET:"esriSquareFeet",UNIT_SQUARE_YARDS:"esriSquareYards",UNIT_ACRES:"esriAcres",UNIT_SQUARE_MILES:"esriSquareMiles",UNIT_SQUARE_MILLIMETERS:"esriSquareMillimeters",UNIT_SQUARE_CENTIMETERS:"esriSquareCentimeters",UNIT_SQUARE_DECIMETERS:"esriSquareDecimeters",UNIT_SQUARE_METERS:"esriSquareMeters",UNIT_ARES:"esriAres",UNIT_HECTARES:"esriHectares",UNIT_SQUARE_KILOMETERS:"esriSquareKilometers"});dojo.declare("esri.tasks.AreasAndLengthsParameters",null,{polygons:null,lengthUnit:null,areaUnit:null,toJson:function(){var _a98=dojo.map(this.polygons,function(geom){return geom.toJson();});var json={};json.polygons=dojo.toJson(_a98);var _a99=this.polygons[0].spatialReference;json.sr=_a99.wkid?_a99.wkid:dojo.toJson(_a99.toJson());if(this.lengthUnit){json.lengthUnit=this.lengthUnit;}if(this.areaUnit){if(dojo.isString(this.areaUnit)){json.areaUnit=dojo.toJson({"areaUnit":this.areaUnit});}else{json.areaUnit=this.areaUnit;}}return json;}});dojo.declare("esri.tasks.LengthsParameters",null,{polylines:null,lengthUnit:null,geodesic:null,toJson:function(){var _a9a=dojo.map(this.polylines,function(geom){return geom.toJson();});var json={};json.polylines=dojo.toJson(_a9a);var _a9b=this.polylines[0].spatialReference;json.sr=_a9b.wkid?_a9b.wkid:dojo.toJson(_a9b.toJson());if(this.lengthUnit){json.lengthUnit=this.lengthUnit;}if(this.geodesic){json.geodesic=this.geodesic;}return json;}});dojo.declare("esri.tasks.RelationParameters",null,{geometries1:null,geometries2:null,relation:null,relationParam:null,toJson:function(){var _a9c=dojo.map(this.geometries1,function(geom){return geom.toJson();});var _a9d=dojo.map(this.geometries2,function(geom){return geom.toJson();});var json={};var _a9e=this.geometries1;if(_a9e&&_a9e.length>0){json.geometries1=dojo.toJson({geometryType:esri.geometry.getJsonType(_a9e[0]),geometries:_a9c});var _a9f=this.geometries1[0].spatialReference;json.sr=_a9f.wkid?_a9f.wkid:dojo.toJson(_a9f.toJson());}var _aa0=this.geometries2;if(_aa0&&_aa0.length>0){json.geometries2=dojo.toJson({geometryType:esri.geometry.getJsonType(_aa0[0]),geometries:_a9d});}if(this.relation){json.relation=this.relation;}if(this.relationParam){json.relationParam=dojo.toJson(this.relationParam);}return json;}});dojo.mixin(esri.tasks.RelationParameters,{SPATIAL_REL_CROSS:"esriGeometryRelationCross",SPATIAL_REL_DISJOINT:"esriGeometryRelationDisjoint",SPATIAL_REL_IN:"esriGeometryRelationIn",SPATIAL_REL_INTERIORINTERSECTION:"esriGeometryRelationInteriorIntersection",SPATIAL_REL_INTERSECTION:"esriGeometryRelationIntersection",SPATIAL_REL_COINCIDENCE:"esriGeometryRelationLineCoincidence",SPATIAL_REL_LINETOUCH:"esriGeometryRelationLineTouch",SPATIAL_REL_OVERLAP:"esriGeometryRelationOverlap",SPATIAL_REL_POINTTOUCH:"esriGeometryRelationPointTouch",SPATIAL_REL_TOUCH:"esriGeometryRelationTouch",SPATIAL_REL_WITHIN:"esriGeometryRelationWithin",SPATIAL_REL_RELATION:"esriGeometryRelationRelation"});dojo.declare("esri.tasks.DensifyParameters",null,{geometries:null,geodesic:null,lengthUnit:null,maxSegmentLength:null,toJson:function(){var _aa1=dojo.map(this.geometries,function(geom){return geom.toJson();});var json={};if(this.geometries&&this.geometries.length>0){json.geometries=dojo.toJson({geometryType:esri.geometry.getJsonType(this.geometries[0]),geometries:_aa1});json.sr=dojo.toJson(this.geometries[0].spatialReference.toJson());}if(this.geodesic){json.geodesic=this.geodesic;}if(this.lengthUnit){json.lengthUnit=this.lengthUnit;}if(this.maxSegmentLength){json.maxSegmentLength=this.maxSegmentLength;}return json;}});dojo.declare("esri.tasks.GeneralizeParameters",null,{geometries:null,deviationUnit:null,maxDeviation:null,toJson:function(){var _aa2=dojo.map(this.geometries,function(geom){return geom.toJson();});var json={};if(this.geometries&&this.geometries.length>0){json.geometries=dojo.toJson({geometryType:esri.geometry.getJsonType(this.geometries[0]),geometries:_aa2});json.sr=dojo.toJson(this.geometries[0].spatialReference.toJson());}if(this.deviationUnit){json.deviationUnit=this.deviationUnit;}if(this.maxDeviation){json.maxDeviation=this.maxDeviation;}return json;}});dojo.declare("esri.tasks.OffsetParameters",null,{geometries:null,bevelRatio:null,offsetDistance:null,offsetHow:null,offsetUnit:null,toJson:function(){var _aa3=dojo.map(this.geometries,function(geom){return geom.toJson();});var json={};if(this.geometries&&this.geometries.length>0){json.geometries=dojo.toJson({geometryType:esri.geometry.getJsonType(this.geometries[0]),geometries:_aa3});json.sr=dojo.toJson(this.geometries[0].spatialReference.toJson());}if(this.bevelRatio){json.bevelRatio=this.bevelRatio;}if(this.offsetDistance){json.offsetDistance=this.offsetDistance;}if(this.offsetHow){json.offsetHow=this.offsetHow;}if(this.offsetUnit){json.offsetUnit=this.offsetUnit;}return json;}});dojo.mixin(esri.tasks.OffsetParameters,{OFFSET_BEVELLED:"esriGeometryOffsetBevelled",OFFSET_MITERED:"esriGeometryOffsetMitered",OFFSET_ROUNDED:"esriGeometryOffsetRounded"});dojo.declare("esri.tasks.DistanceParameters",null,{geometry1:null,geometry2:null,distanceUnit:null,geodesic:null,toJson:function(){var json={};var _aa4=this.geometry1;if(_aa4){json.geometry1=dojo.toJson({geometryType:esri.geometry.getJsonType(_aa4),geometry:_aa4});}var _aa5=this.geometry2;if(_aa5){json.geometry2=dojo.toJson({geometryType:esri.geometry.getJsonType(_aa5),geometry:_aa5});}json.sr=dojo.toJson(this.geometry1.spatialReference.toJson());if(this.distanceUnit){json.distanceUnit=this.distanceUnit;}if(this.geodesic){json.geodesic=this.geodesic;}return json;}});}if(!dojo._hasResource["dojo.DeferredList"]){dojo._hasResource["dojo.DeferredList"]=true;dojo.provide("dojo.DeferredList");dojo.DeferredList=function(list,_aa6,_aa7,_aa8,_aa9){var _aaa=[];dojo.Deferred.call(this);var self=this;if(list.length===0&&!_aa6){this.resolve([0,[]]);}var _aab=0;dojo.forEach(list,function(item,i){item.then(function(_aac){if(_aa6){self.resolve([i,_aac]);}else{_aad(true,_aac);}},function(_aae){if(_aa7){self.reject(_aae);}else{_aad(false,_aae);}if(_aa8){return null;}throw _aae;});function _aad(_aaf,_ab0){_aaa[i]=[_aaf,_ab0];_aab++;if(_aab===list.length){self.resolve(_aaa);}};});};dojo.DeferredList.prototype=new dojo.Deferred();dojo.DeferredList.prototype.gatherResults=function(_ab1){var d=new dojo.DeferredList(_ab1,false,true,false);d.addCallback(function(_ab2){var ret=[];dojo.forEach(_ab2,function(_ab3){ret.push(_ab3[1]);});return ret;});return d;};}if(!dojo._hasResource["dojo.data.util.filter"]){dojo._hasResource["dojo.data.util.filter"]=true;dojo.provide("dojo.data.util.filter");dojo.getObject("data.util.filter",true,dojo);dojo.data.util.filter.patternToRegExp=function(_ab4,_ab5){var rxp="^";var c=null;for(var i=0;i<_ab4.length;i++){c=_ab4.charAt(i);switch(c){case "\\":rxp+=c;i++;rxp+=_ab4.charAt(i);break;case "*":rxp+=".*";break;case "?":rxp+=".";break;case "$":case "^":case "/":case "+":case ".":case "|":case "(":case ")":case "{":case "}":case "[":case "]":rxp+="\\";default:rxp+=c;}}rxp+="$";if(_ab5){return new RegExp(rxp,"mi");}else{return new RegExp(rxp,"m");}};}if(!dojo._hasResource["dojo.data.util.sorter"]){dojo._hasResource["dojo.data.util.sorter"]=true;dojo.provide("dojo.data.util.sorter");dojo.getObject("data.util.sorter",true,dojo);dojo.data.util.sorter.basicComparator=function(a,b){var r=-1;if(a===null){a=undefined;}if(b===null){b=undefined;}if(a==b){r=0;}else{if(a>b||a==null){r=1;}}return r;};dojo.data.util.sorter.createSortFunction=function(_ab6,_ab7){var _ab8=[];function _ab9(attr,dir,comp,s){return function(_aba,_abb){var a=s.getValue(_aba,attr);var b=s.getValue(_abb,attr);return dir*comp(a,b);};};var _abc;var map=_ab7.comparatorMap;var bc=dojo.data.util.sorter.basicComparator;for(var i=0;i<_ab6.length;i++){_abc=_ab6[i];var attr=_abc.attribute;if(attr){var dir=(_abc.descending)?-1:1;var comp=bc;if(map){if(typeof attr!=="string"&&("toString" in attr)){attr=attr.toString();}comp=map[attr]||bc;}_ab8.push(_ab9(attr,dir,comp,_ab7));}}return function(rowA,rowB){var i=0;while(i<_ab8.length){var ret=_ab8[i++](rowA,rowB);if(ret!==0){return ret;}}return 0;};};}if(!dojo._hasResource["dojo.data.util.simpleFetch"]){dojo._hasResource["dojo.data.util.simpleFetch"]=true;dojo.provide("dojo.data.util.simpleFetch");dojo.getObject("data.util.simpleFetch",true,dojo);dojo.data.util.simpleFetch.fetch=function(_abd){_abd=_abd||{};if(!_abd.store){_abd.store=this;}var self=this;var _abe=function(_abf,_ac0){if(_ac0.onError){var _ac1=_ac0.scope||dojo.global;_ac0.onError.call(_ac1,_abf,_ac0);}};var _ac2=function(_ac3,_ac4){var _ac5=_ac4.abort||null;var _ac6=false;var _ac7=_ac4.start?_ac4.start:0;var _ac8=(_ac4.count&&(_ac4.count!==Infinity))?(_ac7+_ac4.count):_ac3.length;_ac4.abort=function(){_ac6=true;if(_ac5){_ac5.call(_ac4);}};var _ac9=_ac4.scope||dojo.global;if(!_ac4.store){_ac4.store=self;}if(_ac4.onBegin){_ac4.onBegin.call(_ac9,_ac3.length,_ac4);}if(_ac4.sort){_ac3.sort(dojo.data.util.sorter.createSortFunction(_ac4.sort,self));}if(_ac4.onItem){for(var i=_ac7;(i<_ac3.length)&&(i<_ac8);++i){var item=_ac3[i];if(!_ac6){_ac4.onItem.call(_ac9,item,_ac4);}}}if(_ac4.onComplete&&!_ac6){var _aca=null;if(!_ac4.onItem){_aca=_ac3.slice(_ac7,_ac8);}_ac4.onComplete.call(_ac9,_aca,_ac4);}};this._fetchItems(_abd,_ac2,_abe);return _abd;};}if(!dojo._hasResource["dojox.data.CsvStore"]){dojo._hasResource["dojox.data.CsvStore"]=true;dojo.provide("dojox.data.CsvStore");dojo.declare("dojox.data.CsvStore",null,{constructor:function(_acb){this._attributes=[];this._attributeIndexes={};this._dataArray=[];this._arrayOfAllItems=[];this._loadFinished=false;if(_acb.url){this.url=_acb.url;}this._csvData=_acb.data;if(_acb.label){this.label=_acb.label;}else{if(this.label===""){this.label=undefined;}}this._storeProp="_csvStore";this._idProp="_csvId";this._features={"dojo.data.api.Read":true,"dojo.data.api.Identity":true};this._loadInProgress=false;this._queuedFetches=[];this.identifier=_acb.identifier;if(this.identifier===""){delete this.identifier;}else{this._idMap={};}if("separator" in _acb){this.separator=_acb.separator;}if("urlPreventCache" in _acb){this.urlPreventCache=_acb.urlPreventCache?true:false;}},url:"",label:"",identifier:"",separator:",",urlPreventCache:false,_assertIsItem:function(item){if(!this.isItem(item)){throw new Error(this.declaredClass+": a function was passed an item argument that was not an item");}},_getIndex:function(item){var idx=this.getIdentity(item);if(this.identifier){idx=this._idMap[idx];}return idx;},getValue:function(item,_acc,_acd){this._assertIsItem(item);var _ace=_acd;if(typeof _acc==="string"){var ai=this._attributeIndexes[_acc];if(ai!=null){var _acf=this._dataArray[this._getIndex(item)];_ace=_acf[ai]||_acd;}}else{throw new Error(this.declaredClass+": a function was passed an attribute argument that was not a string");}return _ace;},getValues:function(item,_ad0){var _ad1=this.getValue(item,_ad0);return (_ad1?[_ad1]:[]);},getAttributes:function(item){this._assertIsItem(item);var _ad2=[];var _ad3=this._dataArray[this._getIndex(item)];for(var i=0;i<_ad3.length;i++){if(_ad3[i]!==""){_ad2.push(this._attributes[i]);}}return _ad2;},hasAttribute:function(item,_ad4){this._assertIsItem(item);if(typeof _ad4==="string"){var _ad5=this._attributeIndexes[_ad4];var _ad6=this._dataArray[this._getIndex(item)];return (typeof _ad5!=="undefined"&&_ad5<_ad6.length&&_ad6[_ad5]!=="");}else{throw new Error(this.declaredClass+": a function was passed an attribute argument that was not a string");}},containsValue:function(item,_ad7,_ad8){var _ad9=undefined;if(typeof _ad8==="string"){_ad9=dojo.data.util.filter.patternToRegExp(_ad8,false);}return this._containsValue(item,_ad7,_ad8,_ad9);},_containsValue:function(item,_ada,_adb,_adc){var _add=this.getValues(item,_ada);for(var i=0;i<_add.length;++i){var _ade=_add[i];if(typeof _ade==="string"&&_adc){return (_ade.match(_adc)!==null);}else{if(_adb===_ade){return true;}}}return false;},isItem:function(_adf){if(_adf&&_adf[this._storeProp]===this){var _ae0=_adf[this._idProp];if(this.identifier){var data=this._dataArray[this._idMap[_ae0]];if(data){return true;}}else{if(_ae0>=0&&_ae0<this._dataArray.length){return true;}}}return false;},isItemLoaded:function(_ae1){return this.isItem(_ae1);},loadItem:function(item){},getFeatures:function(){return this._features;},getLabel:function(item){if(this.label&&this.isItem(item)){return this.getValue(item,this.label);}return undefined;},getLabelAttributes:function(item){if(this.label){return [this.label];}return null;},_fetchItems:function(_ae2,_ae3,_ae4){var self=this;var _ae5=function(_ae6,_ae7){var _ae8=null;if(_ae6.query){var key,_ae9;_ae8=[];var _aea=_ae6.queryOptions?_ae6.queryOptions.ignoreCase:false;var _aeb={};for(key in _ae6.query){_ae9=_ae6.query[key];if(typeof _ae9==="string"){_aeb[key]=dojo.data.util.filter.patternToRegExp(_ae9,_aea);}}for(var i=0;i<_ae7.length;++i){var _aec=true;var _aed=_ae7[i];for(key in _ae6.query){_ae9=_ae6.query[key];if(!self._containsValue(_aed,key,_ae9,_aeb[key])){_aec=false;}}if(_aec){_ae8.push(_aed);}}}else{_ae8=_ae7.slice(0,_ae7.length);}_ae3(_ae8,_ae6);};if(this._loadFinished){_ae5(_ae2,this._arrayOfAllItems);}else{if(this.url!==""){if(this._loadInProgress){this._queuedFetches.push({args:_ae2,filter:_ae5});}else{this._loadInProgress=true;var _aee={url:self.url,handleAs:"text",preventCache:self.urlPreventCache};var _aef=dojo.xhrGet(_aee);_aef.addCallback(function(data){try{self._processData(data);_ae5(_ae2,self._arrayOfAllItems);self._handleQueuedFetches();}catch(e){_ae4(e,_ae2);}});_aef.addErrback(function(_af0){self._loadInProgress=false;if(_ae4){_ae4(_af0,_ae2);}else{throw _af0;}});var _af1=null;if(_ae2.abort){_af1=_ae2.abort;}_ae2.abort=function(){var df=_aef;if(df&&df.fired===-1){df.cancel();df=null;}if(_af1){_af1.call(_ae2);}};}}else{if(this._csvData){try{this._processData(this._csvData);this._csvData=null;_ae5(_ae2,this._arrayOfAllItems);}catch(e){_ae4(e,_ae2);}}else{var _af2=new Error(this.declaredClass+": No CSV source data was provided as either URL or String data input.");if(_ae4){_ae4(_af2,_ae2);}else{throw _af2;}}}}},close:function(_af3){},_getArrayOfArraysFromCsvFileContents:function(_af4){if(dojo.isString(_af4)){var _af5=new RegExp("^\\s+","g");var _af6=new RegExp("\\s+$","g");var _af7=new RegExp("\"\"","g");var _af8=[];var i;var _af9=this._splitLines(_af4);for(i=0;i<_af9.length;++i){var _afa=_af9[i];if(_afa.length>0){var _afb=_afa.split(this.separator);var j=0;while(j<_afb.length){var _afc=_afb[j];var _afd=_afc.replace(_af5,"");var _afe=_afd.replace(_af6,"");var _aff=_afe.charAt(0);var _b00=_afe.charAt(_afe.length-1);var _b01=_afe.charAt(_afe.length-2);var _b02=_afe.charAt(_afe.length-3);if(_afe.length===2&&_afe=="\"\""){_afb[j]="";}else{if((_aff=="\"")&&((_b00!="\"")||((_b00=="\"")&&(_b01=="\"")&&(_b02!="\"")))){if(j+1===_afb.length){return;}var _b03=_afb[j+1];_afb[j]=_afd+this.separator+_b03;_afb.splice(j+1,1);}else{if((_aff=="\"")&&(_b00=="\"")){_afe=_afe.slice(1,(_afe.length-1));_afe=_afe.replace(_af7,"\"");}_afb[j]=_afe;j+=1;}}}_af8.push(_afb);}}this._attributes=_af8.shift();for(i=0;i<this._attributes.length;i++){this._attributeIndexes[this._attributes[i]]=i;}this._dataArray=_af8;}},_splitLines:function(_b04){var _b05=[];var i;var line="";var _b06=false;for(i=0;i<_b04.length;i++){var c=_b04.charAt(i);switch(c){case "\"":_b06=!_b06;line+=c;break;case "\r":if(_b06){line+=c;}else{_b05.push(line);line="";if(i<(_b04.length-1)&&_b04.charAt(i+1)=="\n"){i++;}}break;case "\n":if(_b06){line+=c;}else{_b05.push(line);line="";}break;default:line+=c;}}if(line!==""){_b05.push(line);}return _b05;},_processData:function(data){this._getArrayOfArraysFromCsvFileContents(data);this._arrayOfAllItems=[];if(this.identifier){if(this._attributeIndexes[this.identifier]===undefined){throw new Error(this.declaredClass+": Identity specified is not a column header in the data set.");}}for(var i=0;i<this._dataArray.length;i++){var id=i;if(this.identifier){var _b07=this._dataArray[i];id=_b07[this._attributeIndexes[this.identifier]];this._idMap[id]=i;}this._arrayOfAllItems.push(this._createItemFromIdentity(id));}this._loadFinished=true;this._loadInProgress=false;},_createItemFromIdentity:function(_b08){var item={};item[this._storeProp]=this;item[this._idProp]=_b08;return item;},getIdentity:function(item){if(this.isItem(item)){return item[this._idProp];}return null;},fetchItemByIdentity:function(_b09){var item;var _b0a=_b09.scope?_b09.scope:dojo.global;if(!this._loadFinished){var self=this;if(this.url!==""){if(this._loadInProgress){this._queuedFetches.push({args:_b09});}else{this._loadInProgress=true;var _b0b={url:self.url,handleAs:"text"};var _b0c=dojo.xhrGet(_b0b);_b0c.addCallback(function(data){try{self._processData(data);var item=self._createItemFromIdentity(_b09.identity);if(!self.isItem(item)){item=null;}if(_b09.onItem){_b09.onItem.call(_b0a,item);}self._handleQueuedFetches();}catch(error){if(_b09.onError){_b09.onError.call(_b0a,error);}}});_b0c.addErrback(function(_b0d){this._loadInProgress=false;if(_b09.onError){_b09.onError.call(_b0a,_b0d);}});}}else{if(this._csvData){try{self._processData(self._csvData);self._csvData=null;item=self._createItemFromIdentity(_b09.identity);if(!self.isItem(item)){item=null;}if(_b09.onItem){_b09.onItem.call(_b0a,item);}}catch(e){if(_b09.onError){_b09.onError.call(_b0a,e);}}}}}else{item=this._createItemFromIdentity(_b09.identity);if(!this.isItem(item)){item=null;}if(_b09.onItem){_b09.onItem.call(_b0a,item);}}},getIdentityAttributes:function(item){if(this.identifier){return [this.identifier];}else{return null;}},_handleQueuedFetches:function(){if(this._queuedFetches.length>0){for(var i=0;i<this._queuedFetches.length;i++){var _b0e=this._queuedFetches[i];var _b0f=_b0e.filter;var _b10=_b0e.args;if(_b0f){_b0f(_b10,this._arrayOfAllItems);}else{this.fetchItemByIdentity(_b0e.args);}}this._queuedFetches=[];}}});dojo.extend(dojox.data.CsvStore,dojo.data.util.simpleFetch);}if(!dojo._hasResource["esri.arcgis.csv"]){dojo._hasResource["esri.arcgis.csv"]=true;dojo.provide("esri.arcgis.csv");(function(){var EAC=esri.arcgis.csv;EAC.latFieldStrings=["lat","latitude","y","ycenter","latitude83","latdecdeg","POINT-Y"];EAC.longFieldStrings=["lon","lng","long","longitude","x","xcenter","longitude83","longdecdeg","POINT-X"];EAC.buildCSVFeatureCollection=function(_b11){var _b12=new dojo.Deferred();var _b13=function(_b14){_b12.callback(_b14);};var _b15=esri.request({url:_b11.url,handleAs:"text",load:function(_b16){EAC._processCsvData(_b16,_b11,dojo.hitch(this,_b13));},error:function(_b17){console.error("error: "+_b17);}},{usePost:false});return _b12;};EAC.projectFeatureCollection=function(_b18,_b19){var _b1a=new dojo.Deferred();var _b1b=function(_b1c){_b1a.callback(_b1c);};EAC._projectFeatureSet(_b18,new esri.SpatialReference({wkid:4326}),_b19,dojo.hitch(this,_b1b));return _b1a;};EAC.generateDefaultPopupInfo=function(_b1d){var _b1e=_b1d.layerDefinition.fields;var _b1f={"esriFieldTypeDouble":1,"esriFieldTypeSingle":1};var _b20={"esriFieldTypeInteger":1,"esriFieldTypeSmallInteger":1};var dt={"esriFieldTypeDate":1};var _b21=null;var _b22=dojo.map(_b1e,dojo.hitch(this,function(item){if(item.name.toUpperCase()==="NAME"){_b21=item.name;}var _b23=(item.type!=="esriFieldTypeOID"&&item.type!=="esriFieldTypeGlobalID"&&item.type!=="esriFieldTypeGeometry");var _b24=null;if(_b23){var f=item.name.toLowerCase();var _b25=",stretched value,fnode_,tnode_,lpoly_,rpoly_,poly_,subclass,subclass_,rings_ok,rings_nok,";if(_b25.indexOf(","+f+",")>-1||f.indexOf("area")>-1||f.indexOf("length")>-1||f.indexOf("shape")>-1||f.indexOf("perimeter")>-1||f.indexOf("objectid")>-1||f.indexOf("_")===f.length-1||(f.indexOf("_i")===f.length-2&&f.length>1)){_b23=false;}if(item.type in _b20){_b24={places:0,digitSeparator:true};}else{if(item.type in _b1f){_b24={places:2,digitSeparator:true};}else{if(item.type in dt){_b24={dateFormat:"shortDateShortTime"};}}}}return dojo.mixin({},{fieldName:item.name,label:item.alias,isEditable:true,tooltip:"",visible:_b23,format:_b24,stringFieldOption:"textbox"});}));var _b26={title:_b21?"{"+_b21+"}":"",fieldInfos:_b22,description:null,showAttachments:false,mediaInfos:[]};return _b26;};EAC._processCsvData=function(data,_b27,_b28){var _b29=data.indexOf("\n");var _b2a=dojo.trim(data.substr(0,_b29));var _b2b=_b27.columnDelimiter;if(!_b2b){_b2b=EAC._getSeparator(_b2a);}var _b2c=new dojox.data.CsvStore({data:data,separator:_b2b});var _b2d=(dojo.isIE<9)?750:1001;_b2c.fetch({start:0,count:_b2d,onComplete:function(_b2e,_b2f){var _b30=0;var _b31={"layerDefinition":_b27.layerDefinition,"featureSet":{"features":[],"geometryType":"esriGeometryPoint"}};var _b32=_b31.layerDefinition.objectIdField;if(!_b32){if(!dojo.some(_b31.layerDefinition.fields,function(_b33){if(_b33.type=="esriFieldTypeOID"){_b32=_b33.name;return true;}return false;})){_b31.layerDefinition.fields.push({"name":"__OBJECTID","alias":"__OBJECTID","type":"esriFieldTypeOID","editable":false,"domain":null});_b32="__OBJECTID";}}var _b34,_b35;var _b36=_b2c._attributes;var _b37=[];var _b38=[];dojo.forEach(_b31.layerDefinition.fields,function(_b39,_b3a){if(_b39.type==="esriFieldTypeDate"){_b37.push(_b39.name);}else{if(_b39.type==="esriFieldTypeDouble"||_b39.type==="esriFieldTypeInteger"){_b38.push(_b39.name);}}});if(_b27.locationInfo&&_b27.locationInfo.locationType==="coordinates"){_b34=_b27.locationInfo.latitudeFieldName;_b35=_b27.locationInfo.longitudeFieldName;}else{dojo.forEach(_b36,function(_b3b){var _b3c;_b3c=dojo.indexOf(EAC.latFieldStrings,_b3b.toLowerCase());if(_b3c!==-1){_b34=_b3b;}_b3c=dojo.indexOf(EAC.longFieldStrings,_b3b.toLowerCase());if(_b3c!==-1){_b35=_b3b;}},this);}if(!_b34||!_b35){setTimeout(function(){console.error("File does not seem to contain fields with point coordinates.");},1);return;}var i=0,il=_b2e.length;for(i;i<il;i++){if(_b31.featureSet.features.length>=1000){setTimeout(function(){console.error("1000 feature limit reached. Unable to load any more data.");},1);break;}var item=_b2e[i];var _b3d=_b2c.getAttributes(item),_b3e={};dojo.forEach(_b3d,function(attr,_b3f){if(dojo.some(_b37,function(a){return a===attr;})){var val=_b2c.getValue(item,attr),date=new Date(val);_b3e[attr]=EAC._isValidDate(date,val)?date.getTime():null;}else{if(dojo.some(_b38,function(a){return a===attr;})){var _b40=dojo.number.parse(_b2c.getValue(item,attr));if((attr==_b34||attr==_b35)&&(isNaN(_b40)||Math.abs(_b40)>181)){_b40=parseFloat(_b2c.getValue(item,attr));if(isNaN(_b40)){_b3e[attr]=null;}else{_b3e[attr]=_b40;}}else{if(isNaN(_b40)){_b3e[attr]=null;}else{_b3e[attr]=_b40;}}}else{_b3e[attr]=_b2c.getValue(item,attr);}}});_b3e[_b32]=_b30;_b30++;var _b41=_b3e[_b34];var _b42=_b3e[_b35];if(_b42==null||_b41==null||isNaN(_b41)||isNaN(_b42)){continue;}var _b43=new esri.geometry.Point(_b42,_b41,new esri.SpatialReference({wkid:4326}));var _b44={"geometry":_b43.toJson(),"attributes":_b3e};_b31.featureSet.features.push(_b44);}_b31.layerDefinition.name="csv";if(_b28){_b28(_b31);}},onError:function(_b45){console.error("Error fetching items from CSV store: ",_b45);}});return true;};EAC._getSeparator=function(_b46){var _b47=[","," ",";","|","\t"];var _b48=0;var _b49="";dojo.forEach(_b47,function(_b4a){var _b4b=_b46.split(_b4a).length;if(_b4b>_b48){_b48=_b4b;_b49=_b4a;}});return _b49;};EAC._isValidDate=function(d,_b4c){if(!d||Object.prototype.toString.call(d)!=="[object Date]"||isNaN(d.getTime())){return false;}var _b4d=true;if(dojo.isChrome&&/\d+\W*$/.test(_b4c)){var _b4e=_b4c.match(/[a-zA-Z]{2,}/);if(_b4e){var _b4f=false,i=0,len=_b4e.length,_b50=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i;while(!_b4f&&(i<=len)&&!(_b4f=!_b50.test(_b4e[i]))){i++;}_b4d=!_b4f;}}return _b4d;};EAC._projectFeatureSet=function(_b51,_b52,_b53,_b54){if(!_b51.featureSet||_b51.featureSet.length===0){return;}if(EAC._sameSpatialReference(_b53,_b52)){_b54(_b51);return;}var _b55=function(_b56){var _b57=[];dojo.forEach(_b51.featureSet.features,function(_b58,i){if(_b56[i]){_b58.geometry=_b56[i];_b57.push(_b58);}},this);_b54(_b51);};var _b59=function(_b5a,args){console.error("error projecting featureSet ("+_b51.layerDefinition.name+"). Try one more time.");EAC._projectGeometries(_b5b,_b51.featureSet.geometryType,_b52,_b53,dojo.hitch(this,_b55),dojo.hitch(this,_b5c));};var _b5c=function(_b5d,args){console.error("error projecting featureSet ("+_b51.layerDefinition.name+"). Final try.");_b54(_b51);};if(_b51.featureSet.features&&_b51.featureSet.features.length>0){var _b5b=[];dojo.forEach(_b51.featureSet.features,function(_b5e){_b5b.push(_b5e.geometry);});EAC._projectGeometries(_b5b,_b51.featureSet.geometryType,_b52,_b53,dojo.hitch(this,_b55),dojo.hitch(this,_b59));}else{_b54(_b51);}};EAC._projectGeometries=function(_b5f,_b60,inSR,_b61,_b62,_b63){if(_b5f.length===0){_b62(null);}var _b64=esri.geometry.getGeometryType(_b60);var _b65=[];dojo.forEach(_b5f,function(_b66){var _b67=new _b64(_b66);_b67.spatialReference=inSR;_b65.push(_b67);},this);var _b68=[102113,102100,3857];if(inSR.wkid&&inSR.wkid===4326&&_b61.wkid&&dojo.indexOf(_b68,_b61.wkid)>-1){dojo.forEach(_b65,function(_b69){if(_b69.xmin){_b69.xmin=Math.max(_b69.xmin,-180);_b69.xmax=Math.min(_b69.xmax,180);_b69.ymin=Math.max(_b69.ymin,-89.99);_b69.ymax=Math.min(_b69.ymax,89.99);}else{if(_b69.rings){dojo.forEach(_b69.rings,function(ring){dojo.forEach(ring,function(_b6a){_b6a[0]=Math.min(Math.max(_b6a[0],-180),180);_b6a[1]=Math.min(Math.max(_b6a[1],-89.99),89.99);},this);},this);}else{if(_b69.paths){dojo.forEach(_b69.paths,function(path){dojo.forEach(path,function(_b6b){_b6b[0]=Math.min(Math.max(_b6b[0],-180),180);_b6b[1]=Math.min(Math.max(_b6b[1],-89.99),89.99);},this);},this);}else{if(_b69.x){_b69.x=Math.min(Math.max(_b69.x,-180),180);_b69.y=Math.min(Math.max(_b69.y,-89.99),89.99);}}}}},this);_b5f=[];dojo.forEach(_b65,function(_b6c){var _b6d=esri.geometry.geographicToWebMercator(_b6c);if(_b61.wkid!==102100){_b6d.spatialReference=_b61;}_b5f.push(_b6d.toJson());},this);_b62(_b5f);}else{if(inSR.wkid!==null&&dojo.indexOf(_b68,inSR.wkid)>-1&&_b61.wkid!==null&&_b61.wkid===4326){_b5f=[];dojo.forEach(_b65,function(_b6e){_b5f.push(esri.geometry.webMercatorToGeographic(_b6e).toJson());},this);_b62(_b5f);}else{var _b6f=function(_b70,args){if(_b70&&_b70.length===_b5f.length){_b5f=[];dojo.forEach(_b70,function(_b71){if(_b71&&((_b71.rings&&_b71.rings.length>0&&_b71.rings[0].length>0&&_b71.rings[0][0].length>0&&!isNaN(_b71.rings[0][0][0])&&!isNaN(_b71.rings[0][0][1]))||(_b71.paths&&_b71.paths.length>0&&_b71.paths[0].length>0&&_b71.paths[0][0].length>0&&!isNaN(_b71.paths[0][0][0])&&!isNaN(_b71.paths[0][0][1]))||(_b71.xmin&&!isNaN(_b71.xmin)&&_b71.ymin&&!isNaN(_b71.ymin))||(_b71.x&&!isNaN(_b71.x)&&_b71.y&&!isNaN(_b71.y)))){_b5f.push(_b71.toJson());}else{_b5f.push(null);}},this);_b62(_b5f);}else{_b63(_b70,args);}};if(esri.config.defaults.geometryService){esri.config.defaults.geometryService.project(_b65,_b61,dojo.hitch(this,_b6f),_b63);}else{_b62(null);}}}};EAC._sameSpatialReference=function(sp1,sp2){var _b72=[102113,102100,3857];if(sp1&&sp2&&sp1.wkid===sp2.wkid&&sp1.wkt===sp2.wkt){return true;}else{if(sp1&&sp2&&sp1.wkid&&sp2.wkid&&dojo.indexOf(_b72,sp1.wkid)>-1&&dojo.indexOf(_b72,sp2.wkid)>-1){return true;}}return false;};}());}if(!dojo._hasResource["esri.arcgis.utils"]){dojo._hasResource["esri.arcgis.utils"]=true;dojo.provide("esri.arcgis.utils");(function(){var EAU=esri.arcgis.utils;EAU.arcgisUrl=location.protocol+"//www.arcgis.com/sharing/content/items";String.prototype.endsWith=function(str){return (this.match(str+"$")==str);};EAU.getItem=function(_b73){if(EAU._arcgisUrl&&EAU._arcgisUrl.length>0){EAU.arcgisUrl=EAU._arcgisUrl;}var url=EAU.arcgisUrl+"/"+_b73;var _b74={},_b75=new dojo.Deferred();esri.request({url:url,content:{f:"json"},callbackParamName:"callback",load:function(_b76){_b74.item=_b76;esri.request({url:url+"/data",content:{f:"json"},callbackParamName:"callback",load:function(_b77){_b74.itemData=_b77;_b75.callback(_b74);},error:function(_b78){_b75.errback(_b78);}});},error:function(_b79){_b75.errback(_b79);}});return _b75;};EAU.createMap=function(arg1,_b7a,_b7b){var _b7c=new dojo.Deferred();_b7b=_b7b||{};var _b7d=_b7b.infoTemplateClass;_b7b._clazz=(_b7d&&dojo.getObject(_b7d))||esri.dijit.PopupTemplate;if(dojo.isString(arg1)){EAU.getItem(arg1).addCallback(function(_b7e){EAU._getItemProps(_b7e,_b7b).addCallback(function(_b7f){EAU._getLayers(_b7f.itemData,_b7b).addCallback(dojo.hitch(null,EAU._preCreateMap,_b7f,_b7a,_b7b,_b7c));});}).addErrback(dojo.hitch(_b7c,_b7c.errback));}else{EAU._getItemProps(arg1,_b7b).addCallback(function(_b80){EAU._getLayers(_b80.itemData,_b7b).addCallback(dojo.hitch(null,EAU._preCreateMap,_b80,_b7a,_b7b,_b7c));});}return _b7c;};EAU._arcgisUrl=null;EAU._getItemProps=function(_b81,_b82){var _b83=new dojo.Deferred();var _b84=_b81.itemData;var _b85=[];var _b86=[];dojo.forEach(_b84.operationalLayers,function(_b87){if(_b87.itemId&&!_b87.type){if(_b87.url.indexOf("/FeatureServer")>-1){_b86.push(_b87);_b85.push(EAU._getItemData(_b87));}else{if(!_b87.layers&&_b87.url.indexOf("/MapServer")>-1&&_b87.url.indexOf("/MapServer/")===-1){_b86.push(_b87);_b85.push(EAU._getItemData(_b87));}}}});if(_b85.length>0){var _b88=new dojo.DeferredList(_b85);_b88.addCallback(function(_b89){dojo.forEach(_b86,function(_b8a,i){var _b8b=_b89[i][1];if(_b8b&&_b8b.layers){if(_b8a.url.indexOf("/FeatureServer")>-1){dojo.forEach(_b8b.layers,function(_b8c){if(_b8a.url.endsWith("/FeatureServer/"+_b8c.id)){_b8a.itemProperties=_b8c;EAU._processFSItemProperties(_b8a);}});}else{_b8a.layers=_b8b.layers;}}});_b83.callback(_b81);});}else{_b83.callback(_b81);}return _b83;};EAU._getItemData=function(_b8d){var url=EAU.arcgisUrl+"/"+_b8d.itemId+"/data";var _b8e=esri.request({url:url,content:{f:"json"},callbackParamName:"callback"});return _b8e;};EAU._processFSItemProperties=function(_b8f){if(_b8f.itemProperties.layerDefinition){if(_b8f.layerDefinition){if(!_b8f.layerDefinition.drawingInfo){_b8f.layerDefinition.drawingInfo=_b8f.itemProperties.layerDefinition.drawingInfo;}if(!_b8f.layerDefinition.definitionExpression){_b8f.layerDefinition.definitionExpression=_b8f.itemProperties.layerDefinition.definitionExpression;}if(_b8f.layerDefinition.minScale===null){_b8f.layerDefinition.minScale=_b8f.itemProperties.layerDefinition.minScale;}if(_b8f.layerDefinition.maxScale===null){_b8f.layerDefinition.maxScale=_b8f.itemProperties.layerDefinition.maxScale;}}else{_b8f.layerDefinition=_b8f.itemProperties.layerDefinition;}}if(_b8f.itemProperties.popupInfo&&!_b8f.popupInfo&&!_b8f.disablePopup){_b8f.popupInfo=_b8f.itemProperties.popupInfo;}};EAU._getLayers=function(_b90,_b91){var _b92=[];var _b93=[];var _b94=[];var _b95=new dojo.Deferred();dojo.forEach(_b90.operationalLayers,function(_b96,_b97){if(_b96.featureCollection){dojo.forEach(_b96.featureCollection.layers,function(_b98,idx){var _b99=true;if(_b96.visibleLayers){if(dojo.indexOf(_b96.visibleLayers,idx)==-1){_b99=false;}}_b98.visibility=(_b96.visibility&&_b99);_b98.opacity=_b96.opacity;_b98.id=(_b96.id||("operational"+_b97))+"_"+idx;_b94.push(_b98);},this);}else{_b94.push(_b96);}});dojo.forEach(_b90.baseMap.baseMapLayers,function(_b9a,_b9b){_b9a.baseMapLayer=true;_b9a.id=_b9a.id||("base"+_b9b);_b92.push(_b9a);});dojo.forEach(_b94,function(_b9c,_b9d){_b9c.id=_b9c.id||("operational"+_b9d);_b92.push(_b9c);});dojo.forEach(_b92,function(_b9e){if(_b9e.url&&!_b9e.type){_b9e.deferredsPos=_b93.length;_b9e.errors=[];_b93.push(EAU._getServiceInfo(_b9e.url,_b9e.errors));}else{if(_b9e.url&&_b9e.type=="CSV"){_b9e.deferredsPos=_b93.length;_b93.push(esri.arcgis.csv.buildCSVFeatureCollection(_b9e));}}});if(_b93.length==0){var _b9f=EAU._getMapSR(_b92);_b92=EAU._buildLayerObjects(_b92,_b91,_b9f);_b95.callback(_b92);}else{var _ba0=new dojo.DeferredList(_b93);_ba0.addCallback(function(_ba1){EAU._preBuildLayerObjects(_ba1,_b92,_b91,_b93,_b95);});}return _b95;};EAU._preBuildLayerObjects=function(_ba2,_ba3,_ba4,_ba5,_ba6){dojo.forEach(_ba3,function(_ba7,_ba8){if(_ba7.url&&!_ba7.type){_ba7.resourceInfo=_ba2[_ba7.deferredsPos][1];delete _ba7.deferredsPos;}else{if(_ba7.url&&_ba7.type=="CSV"){_ba7.featureCollection=_ba5[_ba7.deferredsPos].results[0];delete _ba7.deferredsPos;}}});var _ba9=EAU._getMapSR(_ba3);var _baa=[];var _bab=new dojo.Deferred();dojo.forEach(_ba3,function(_bac){if(_bac.url&&_bac.type=="CSV"){_bac.deferredsPos=_baa.length;_baa.push(esri.arcgis.csv.projectFeatureCollection(_bac.featureCollection,_ba9));}});if(_baa.length==0){_ba3=EAU._buildLayerObjects(_ba3,_ba4,_ba9);_ba6.callback(_ba3);}else{var _bad=new dojo.DeferredList(_baa);_bad.addCallback(function(){dojo.forEach(_ba3,function(_bae){if(_bae.url&&_bae.type=="CSV"){_bae.featureCollection=_baa[_bae.deferredsPos].results[0];delete _bae.deferredsPos;}});_ba3=EAU._buildLayerObjects(_ba3,_ba4,_ba9);_ba6.callback(_ba3);});}};EAU._buildLayerObjects=function(_baf,_bb0,_bb1){dojo.forEach(_baf,function(_bb2,_bb3){if(_bb2.url&&!_bb2.type){if(_bb3===0||_baf[0].layerObject){_bb2.layerObject=EAU._initLayer(_bb2,_baf,_bb0,_bb1);}}else{if(_bb2.url&&_bb2.type=="CSV"){_bb2.layerObject=EAU._initLayer(_bb2,_baf,_bb0,_bb1);}else{_bb2.layerObject=EAU._initLayer(_bb2,_baf,_bb0,_bb1);}}});var _bb4=dojo.filter(_baf,function(lyr){return !lyr.isReference;});var _bb5=dojo.filter(_baf,function(lyr){return !!lyr.isReference;});_baf=_bb4.concat(_bb5);return _baf;};EAU._preCreateMap=function(_bb6,_bb7,_bb8,_bb9,_bba){try{var _bbb=_bb8.mapOptions||{};_bb8.mapOptions=_bbb;var card=_bb6.item;var _bbc=[];dojo.forEach(_bba,function(_bbd){if(dojo.isArray(_bbd.layerObject)){dojo.forEach(_bbd.layerObject,function(l){_bbc.push(l);});}else{_bbc.push(_bbd.layerObject);}});if(!_bbc[0]){_bb9.errback(new Error(esri.bundle.arcgis.utils.baseLayerError));return;}_bbc=dojo.filter(_bbc,esri._isDefined);if(card){if(card.extent){if(!_bbb.extent){var _bbe=new esri.geometry.Extent(card.extent[0][0],card.extent[0][1],card.extent[1][0],card.extent[1][1],new esri.SpatialReference({wkid:4326}));var _bbf=_bbc[0].spatialReference;if(_bbf.wkid===4326){_bbb.extent=_bbe;EAU._createMap(_bbc,_bba,_bb6,_bb7,_bb8,_bb9);}else{if(_bbf.wkid===102100||_bbf.wkid===102113||_bbf.wkid===3857){_bbe.xmin=Math.max(_bbe.xmin,-180);_bbe.xmax=Math.min(_bbe.xmax,180);_bbe.ymin=Math.max(_bbe.ymin,-89.99);_bbe.ymax=Math.min(_bbe.ymax,89.99);_bbb.extent=esri.geometry.geographicToWebMercator(_bbe);EAU._createMap(_bbc,_bba,_bb6,_bb7,_bb8,_bb9);}else{if(_bb8.geometryServiceURL||esri.config.defaults.geometryService){var gs;if(_bb8.geometryServiceURL){gs=new esri.tasks.GeometryService(_bb8.geometryServiceURL);}else{gs=esri.config.defaults.geometryService;}gs.project([_bbe],_bbf,function(_bc0){var _bc1=_bc0[0];_bbb.extent=_bbb.extent||_bc1;EAU._createMap(_bbc,_bba,_bb6,_bb7,_bb8,_bb9);});}else{_bb9.errback(new Error(esri.bundle.arcgis.utils.geometryServiceError));}}}}else{EAU._createMap(_bbc,_bba,_bb6,_bb7,_bb8,_bb9);}}else{EAU._createMap(_bbc,_bba,_bb6,_bb7,_bb8,_bb9);}}else{EAU._createMap(_bbc,_bba,_bb6,_bb7,_bb8,_bb9);}}catch(err){_bb9.errback(err);}};EAU._getMapSR=function(_bc2){var _bc3=null;var _bc4=_bc2[0];if(_bc4.url&&!_bc4.type){if(_bc4.resourceInfo.spatialReference){_bc3=new esri.SpatialReference();if(_bc4.resourceInfo.spatialReference.wkid){_bc3.wkid=_bc4.resourceInfo.spatialReference.wkid;}if(_bc4.resourceInfo.spatialReference.wkt){_bc3.wkt=_bc4.resourceInfo.spatialReference.wkt;}}}else{if(_bc4.type.indexOf("BingMaps")>-1||_bc4.type=="OpenStreetMap"){_bc3=new esri.SpatialReference({wkid:102100});}else{if(_bc4.type=="WMS"){_bc3=new esri.SpatialReference({wkid:_bc4.spatialReferences[0]});}}}return _bc3;};EAU._createMap=function(_bc5,_bc6,_bc7,_bc8,_bc9,_bca){var _bcb=(_bc9.mapOptions||{}),_bcc,_bcd;if(!_bcb.infoWindow){_bcc=new esri.dijit.Popup(null,dojo.create("div"));_bcb.infoWindow=_bcc;}if(!esri._isDefined(_bcb.showInfoWindowOnClick)){_bcb.showInfoWindowOnClick=false;}var map=new esri.Map(_bc8,_bcb);if(_bc9.ignorePopups){dojo.forEach(_bc5,function(_bce){delete _bce.infoTemplate;});}if(!(_bc9.ignorePopups||_bc9.disableClickBehavior)){_bcd=dojo.connect(map,"onClick",EAU._showPopup);}dojo.connect(map,"onLayersAddResult",EAU._onLayersAddResult);map.addLayers(_bc5);if(!_bc9.ignorePopups){EAU._addSelectionLayers(_bc5,map,_bc9._clazz);}var _bcf=[];dojo.forEach(_bc6,function(_bd0){_bcf=_bcf.concat(_bd0.errors);},this);_bca.callback({map:map,itemInfo:_bc7,errors:_bcf,clickEventHandle:_bcd,clickEventListener:EAU._showPopup});};EAU._addSelectionLayers=function(_bd1,map,_bd2){var _bd3=[];dojo.forEach(_bd1,function(_bd4){var _bd5=_bd4.__popups;if(_bd5&&_bd5.length>1&&_bd4.version>=10){_bd4.__deferredsPos=_bd3.length;_bd3.push(EAU._getLayersInfo(_bd4));}});var _bd6=[];if(_bd3.length>0){var _bd7=new dojo.DeferredList(_bd3);_bd7.addCallback(function(_bd8){dojo.forEach(_bd1,function(_bd9){if(_bd9.__popups&&_bd9.__popups.length>0){if(_bd9.__deferredsPos||_bd9.__deferredsPos===0){var _bda=_bd8[_bd9.__deferredsPos][1];_bd6=_bd6.concat(EAU._createSelectionFeatureLayers(_bd9,_bda.layers,_bd2,map));delete _bd9.__deferredsPos;}else{_bd6=_bd6.concat(EAU._createSelectionFeatureLayers(_bd9,null,_bd2,map));}}});map.addLayers(_bd6);});}else{dojo.forEach(_bd1,function(_bdb){if(_bdb.__popups&&_bdb.__popups.length>0){_bd6=_bd6.concat(EAU._createSelectionFeatureLayers(_bdb,null,_bd2,map));}});map.addLayers(_bd6);}};EAU._createSelectionFeatureLayers=function(_bdc,_bdd,_bde,map){var url=_bdc.url;var _bdf=_bdc.__popups;var ids=_bdc.__popupIds;var _be0=_bdc.__resourceInfo;var _be1=[];dojo.forEach(_bdf,function(_be2,_be3){var i,_be4=null;if(_bdd){for(i=0;i<_bdd.length;i++){if(_bdd[i].id===ids[_be3]){_be4=_bdd[i];break;}}}var _be5=new esri.layers.FeatureLayer(EAU._checkUrl(url+"/"+ids[_be3]),{id:_bdc.id+"_"+ids[_be3],outFields:["*"],mode:esri.layers.FeatureLayer.MODE_SELECTION,infoTemplate:_be2&&new _bde(_be2),drawMode:false,visible:_bdc.visible,resourceInfo:_be4,autoGeneralize:true});if(_be5.loaded){EAU._updateLayerScaleInfo(_be0.layers,_be5);}else{dojo.connect(_be5,"onLoad",function(_be6){EAU._updateLayerScaleInfo(_be0.layers,_be6);});}_be1.push(_be5);});if(_be1.length>0){var _be7=function(_be8,_be9){dojo.forEach(_be8,function(_bea){if(_be9){_bea.show();}else{_bea.hide();}});};dojo.connect(_bdc,"onVisibilityChange",dojo.hitch(this,_be7,_be1));var _beb=function(_bec,_bed,_bee){if(_bec.id===_bee.id){dojo.forEach(_bed,function(_bef){map.removeLayer(_bef);});}};dojo.connect(map,"onLayerRemove",dojo.hitch(this,_beb,_bdc,_be1));}delete _bdc.__popups;delete _bdc.__popupIds;delete _bdc.__resourceInfo;return _be1;};EAU._getServiceInfo=function(url,_bf0){var url2=EAU._checkUrl(url);return esri.request({url:url2,content:{f:"json"},callbackParamName:"callback",error:function(_bf1,io){if(_bf1.message){_bf1.message+=" [url:"+url2+"]";}else{_bf1.message="[url:"+url2+"]";}_bf0.push(_bf1);esri.config.defaults.io.errorHandler(_bf1,io);}});};EAU._getLayersInfo=function(_bf2){return esri.request({url:EAU._checkUrl(_bf2.url+"/layers"),content:{f:"json"},callbackParamName:"callback",error:function(){}});};EAU._initLayer=function(_bf3,_bf4,_bf5,_bf6){var _bf7,_bf8=_bf5._clazz;if(_bf3.type==="OpenStreetMap"){_bf7=new esri.layers.OpenStreetMapLayer({id:_bf3.id});}else{if(_bf3.type==="WMS"){var _bf9=[];var _bfa=[];dojo.forEach(_bf3.layers,function(_bfb){_bfa.push(new esri.layers.WMSLayerInfo({name:_bfb.name,title:_bfb.title,legendURL:_bfb.legendURL}));_bf9.push(_bfb.name);},this);if(_bf3.visibleLayers){_bf9=_bf3.visibleLayers;}var _bfc=new esri.geometry.Extent(_bf3.extent[0][0],_bf3.extent[0][1],_bf3.extent[1][0],_bf3.extent[1][1],new esri.SpatialReference({wkid:4326}));var _bfd={extent:_bfc,layerInfos:_bfa,version:_bf3.version,maxWidth:_bf3.maxWidth,maxHeight:_bf3.maxHeight,getMapUrl:_bf3.mapUrl,spatialReferences:_bf3.spatialReferences,title:_bf3.title,copyright:_bf3.copyright};_bf7=new esri.layers.WMSLayer(_bf3.url,{id:_bf3.id,visibleLayers:_bf9,format:"png",transparent:_bf3.baseMapLayer?false:true,opacity:_bf3.opacity,resourceInfo:_bfd});_bf7.spatialReference.wkid=_bfd.spatialReferences[0];}else{if(_bf3.type==="KML"){_bf7=new esri.layers.KMLLayer(_bf3.url,{id:_bf3.id,outSR:_bf6});dojo.connect(_bf7,"onLoad",function(){var _bfe=function(_bff){dojo.forEach(_bff,function(_c00){if(_c00.declaredClass==="esri.layers.FeatureLayer"||_c00.declaredClass==="esri.layers.MapImageLayer"){_c00.setOpacity(_bf3.opacity);}else{if(_c00.declaredClass==="esri.layers.KMLLayer"){if(_c00.loaded){_bfe(_c00.getLayers());}else{dojo.connect(_c00,"onLoad",dojo.hitch(this,function(lyr){_bfe(lyr.getLayers());}));}}}});};if(_bf3.opacity!==null){_bfe(_bf7.getLayers());}if(_bf3.visibleFolders){dojo.forEach(_bf7.folders,function(_c01){if(dojo.indexOf(_bf3.visibleFolders,_c01.id)>-1){_bf7.setFolderVisibility(_c01,true);}else{_bf7.setFolderVisibility(_c01,false);}},this);}});}else{if(_bf3.type=="CSV"&&_bf3.url){_bf7=new esri.layers.FeatureLayer(_bf3.featureCollection,{infoTemplate:new esri.dijit.PopupTemplate(_bf3.popupInfo?_bf3.popupInfo:esri.arcgis.csv.generateDefaultPopupInfo(_bf3.featureCollection)),id:_bf3.id?_bf3.id:null,outFields:["*"],visible:(_bf3.visibility!==null)?_bf3.visibility:true,opacity:_bf3.opacity?_bf3.opacity:1,autoGeneralize:true});}else{if(_bf3.layerDefinition&&!_bf3.url){var _c02=dojo.fromJson(dojo.toJson(_bf3));delete _c02.id;delete _c02.opacity;delete _c02.visibility;_bf7=new esri.layers.FeatureLayer(_c02,{id:_bf3.id,opacity:_bf3.opacity,visible:_bf3.visibility,outFields:["*"],infoTemplate:_c02.popupInfo&&new _bf8(_c02.popupInfo),autoGeneralize:true});}else{if(_bf3.type==="BingMapsAerial"||_bf3.type==="BingMapsRoad"||_bf3.type==="BingMapsHybrid"){var _c03=esri.virtualearth.VETiledLayer.MAP_STYLE_AERIAL_WITH_LABELS;if(_bf3.type==="BingMapsAerial"){_c03=esri.virtualearth.VETiledLayer.MAP_STYLE_AERIAL;}else{if(_bf3.type==="BingMapsRoad"){_c03=esri.virtualearth.VETiledLayer.MAP_STYLE_ROAD;}}_bf7=new esri.virtualearth.VETiledLayer({bingMapsKey:_bf5.bingMapsKey,mapStyle:_c03,id:_bf3.id});}else{if(_bf3.resourceInfo&&_bf3.resourceInfo.mapName){if(_bf3.resourceInfo.singleFusedMapCache===true){if(!_bf3.baseMapLayer){if(EAU._sameSpatialReferenceAsBasemap(_bf3,_bf4)){if(EAU._sameTilingSchemeAsBasemap(_bf3,_bf4)){_bf7=EAU._loadAsCached(_bf3);}else{_bf7=EAU._loadAsDynamic(_bf3);}}else{_bf7=EAU._loadAsDynamic(_bf3);}}else{_bf7=EAU._loadAsCached(_bf3);}}else{_bf7=EAU._loadAsDynamic(_bf3);}}else{if(_bf3.resourceInfo&&_bf3.resourceInfo.pixelSizeX){var _c04=new esri.layers.ImageServiceParameters();_c04.bandIds=_bf3.bandIds;if(!_bf3.bandIds&&_bf3.resourceInfo.bandCount&&parseInt(_bf3.resourceInfo.bandCount,10)>3){_c04.bandIds=[0,1,2];}_bf7=new esri.layers.ArcGISImageServiceLayer(EAU._checkUrl(_bf3.url),{resourceInfo:_bf3.resourceInfo,opacity:_bf3.opacity,visible:_bf3.visibility,id:_bf3.id,imageServiceParameters:_c04});}else{if(_bf3.resourceInfo&&_bf3.resourceInfo.type==="Feature Layer"){_bf7=new esri.layers.FeatureLayer(EAU._checkUrl(_bf3.url),{resourceInfo:_bf3.resourceInfo,opacity:_bf3.opacity,visible:_bf3.visibility,id:_bf3.id,mode:esri._isDefined(_bf3.mode)?_bf3.mode:esri.layers.FeatureLayer.MODE_ONDEMAND,outFields:["*"],infoTemplate:_bf3.popupInfo&&new _bf8(_bf3.popupInfo),autoGeneralize:true});if(_bf3.layerDefinition){if(_bf3.layerDefinition.drawingInfo&&_bf3.layerDefinition.drawingInfo.renderer){var _c05=esri.renderer.fromJson(_bf3.layerDefinition.drawingInfo.renderer);_bf7.setRenderer(_c05);}if(_bf3.layerDefinition.definitionExpression){_bf7.setDefinitionExpression(_bf3.layerDefinition.definitionExpression);}if(esri._isDefined(_bf3.layerDefinition.minScale)){_bf7.minScale=_bf3.layerDefinition.minScale;}if(esri._isDefined(_bf3.layerDefinition.maxScale)){_bf7.maxScale=_bf3.layerDefinition.maxScale;}}}}}}}}}}}_bf7.arcgisProps={title:_bf3.title};return _bf7;};EAU._loadAsCached=function(_c06){var _c07=[];if(!_c06.displayLevels){_c07=dojo.map(_c06.resourceInfo.tileInfo.lods,function(lod){return lod.level;});}var _c08=new esri.layers.ArcGISTiledMapServiceLayer(EAU._checkUrl(_c06.url),{resourceInfo:_c06.resourceInfo,opacity:_c06.opacity,visible:_c06.visibility,displayLevels:_c06.displayLevels||_c07,id:_c06.id});EAU._processPopups(_c08,_c06);return _c08;};EAU._loadAsDynamic=function(_c09){var _c0a=new esri.layers.ImageParameters();_c0a.format="png24";if(_c09.resourceInfo&&_c09.resourceInfo.supportedImageFormatTypes&&_c09.resourceInfo.supportedImageFormatTypes.indexOf("PNG32")>-1){_c0a.format="png32";}var _c0b=new esri.layers.ArcGISDynamicMapServiceLayer(EAU._checkUrl(_c09.url),{resourceInfo:_c09.resourceInfo,opacity:_c09.opacity,visible:_c09.visibility,id:_c09.id,imageParameters:_c0a});if(!_c09.visibleLayers){var _c0c="";var _c0d=_c0b.layerInfos;dojo.forEach(_c0d,function(_c0e){if(_c0e.defaultVisibility){_c0c+=(_c0c.length>0?",":"")+_c0e.id;}});_c09.visibleLayers=_c0c;}var _c0f=EAU._getVisibleFeatureLayers(_c0b.layerInfos,_c09.visibleLayers);_c0b.setVisibleLayers(_c0f);if(_c09.layers&&_c09.layers.length>0){var _c10=[];dojo.forEach(_c09.layers,function(_c11){if(_c11.layerDefinition&&_c11.layerDefinition.definitionExpression){_c10[_c11.id]=_c11.layerDefinition.definitionExpression;}},this);if(_c10.length>0){_c0b.setLayerDefinitions(_c10);}}EAU._processPopups(_c0b,_c09);return _c0b;};EAU._processPopups=function(_c12,_c13){var _c14=_c12.layerInfos;var _c15=_c13.layers;if(_c15&&_c14){var _c16=[],ids=[];dojo.forEach(_c14,function(_c17){var id=_c17.id,i;if(!_c17.subLayerIds&&dojo.indexOf(_c12.visibleLayers,id)!==-1){for(i=0;i<_c15.length;i++){var _c18=_c15[i];if(_c18.id===id){ids.push(id);_c16.push(_c18.popupInfo);break;}}}});if(_c16.length){_c12.__popups=_c16;_c12.__popupIds=ids;_c12.__resourceInfo=_c13.resourceInfo;}}};EAU._onLayersAddResult=function(_c19){dojo.forEach(_c19,function(_c1a){var _c1b=_c1a.layer;if(_c1b.toJson){var json=_c1b.toJson();if(json.featureSet&&_c1b.name.indexOf("Text")>-1){dojo.forEach(json.featureSet.features,function(_c1c,idx){if(_c1c.attributes.TEXT){var _c1d=_c1b.graphics[idx];_c1d.symbol.setText(_c1c.attributes.TEXT);if(_c1c.symbol.horizontalAlignment){_c1d.symbol.align=_c1c.symbol.horizontalAlignment;}_c1d.setSymbol(_c1d.symbol);_c1d.setAttributes(_c1c.attributes);}},this);}}});};EAU._sameSpatialReferenceAsBasemap=function(_c1e,_c1f){var _c20=[102113,102100,3857];var sp1=_c1f[0].layerObject.fullExtent.spatialReference;var sp2=new esri.SpatialReference(_c1e.resourceInfo.fullExtent.spatialReference);if(dojo.toJson(sp1.toJson())===dojo.toJson(sp2.toJson())){return true;}else{if(dojo.some(_c20,function(wkid){return wkid===sp2.wkid;})&&dojo.some(_c20,function(wkid){return wkid===sp1.wkid;})){return true;}}return false;};EAU._sameTilingSchemeAsBasemap=function(_c21,_c22){if(!_c22[0].layerObject.tileInfo){return false;}var _c23=[];dojo.forEach(_c22,function(_c24){if(_c24.baseMapLayer){if(_c24.layerObject.tileInfo){_c23=_c23.concat(dojo.map(_c24.layerObject.tileInfo.lods,function(lod){return lod.scale;}));}}});var _c25=dojo.some(_c21.resourceInfo.tileInfo.lods,function(lod){return dojo.some(_c23,function(_c26){return _c26===lod.scale;});});return _c25;};EAU._showPopup=function(evt){var map=this,_c27=map.infoWindow,_c28=evt.graphic;if(!map.loaded){return;}_c27.hide();_c27.clearFeatures();var _c29=[];dojo.forEach(map.graphicsLayerIds,function(_c2a){var _c2b=map.getLayer(_c2a);if(_c2b&&_c2b.declaredClass.indexOf("FeatureLayer")!==-1&&_c2b.loaded&&_c2b.visible){_c2b.clearSelection();if(_c2b.infoTemplate&&!_c2b._suspended){_c29.push(_c2b);}}});_c28=(_c28&&_c28._getEffInfoTemplate())?_c28:null;if(!_c29.length&&!_c28){return;}var _c2c=EAU._calculateClickTolerance(_c29);var _c2d=evt.screenPoint,_c2e=map.toMap(new esri.geometry.Point(_c2d.x-_c2c,_c2d.y+_c2c)),_c2f=map.toMap(new esri.geometry.Point(_c2d.x+_c2c,_c2d.y-_c2c)),_c30=new esri.geometry.Extent(_c2e.x,_c2e.y,_c2f.x,_c2f.y,map.spatialReference);var _c31=new esri.tasks.Query();_c31.geometry=_c30;_c31.timeExtent=map.timeExtent;var _c32=dojo.map(_c29,function(_c33){var dfd=_c33.selectFeatures(_c31);dfd.addCallback(function(){var _c34=_c33.getSelectedFeatures();return _c34;});return dfd;});if(_c28){var dfd=new dojo.Deferred();dfd.callback([_c28]);_c32.splice(0,0,dfd);}var _c35=dojo.some(_c32,function(dfd){return dfd.fired===-1;});if(!_c35){var _c36=_c28?1:0;dojo.forEach(_c29,function(_c37){_c36=_c36+_c37.getSelectedFeatures().length;});if(!_c36){return;}}_c27.setFeatures(_c32);_c27.show(evt.mapPoint);};EAU._calculateClickTolerance=function(_c38){var _c39=6;dojo.forEach(_c38,function(_c3a){var _c3b=_c3a.renderer;if(_c3b.declaredClass==="esri.renderer.SimpleRenderer"){var _c3c=_c3b.symbol;if(_c3c&&_c3c.xoffset){_c39=Math.max(_c39,Math.abs(_c3c.xoffset));}if(_c3c&&_c3c.yoffset){_c39=Math.max(_c39,Math.abs(_c3c.yoffset));}}else{if(_c3b.declaredClass==="esri.renderer.UniqueValueRenderer"||_c3b.declaredClass==="esri.renderer.ClassBreaksRenderer"){dojo.forEach(_c3b.infos,function(info){var _c3d=info.symbol;if(_c3d&&_c3d.xoffset){_c39=Math.max(_c39,Math.abs(_c3d.xoffset));}if(_c3d&&_c3d.yoffset){_c39=Math.max(_c39,Math.abs(_c3d.yoffset));}});}}});return _c39;};EAU._getVisibleFeatureLayers=function(_c3e,_c3f){if(!_c3e||!_c3f||_c3f.length===0){return [];}var _c40=","+_c3f+",";var _c41=[];var _c42="";var k,_c43=",";for(k=0;k<_c3e.length;k++){if(_c3e[k].subLayerIds!==null){if(_c40.indexOf(","+_c3e[k].id+",")===-1||_c43.indexOf(","+_c3e[k].id+",")>-1){_c43+=_c3e[k].subLayerIds.toString()+",";}}else{if(_c40.indexOf(","+_c3e[k].id+",")>-1&&_c43.indexOf(","+_c3e[k].id+",")===-1){_c41.push(_c3e[k].id);_c42=",";}}}return _c41;};EAU._updateLayerScaleInfo=function(_c44,_c45){if(_c45.version<=10.1&&_c44){var i,id=parseInt(_c45.url.substring(_c45.url.lastIndexOf("/")+1,_c45.url.length));for(i=_c44.length-1;i>=0;i--){if(_c44[i].id==id){if(_c45.minScale==0&&_c44[i].minScale>0){_c45.minScale=_c44[i].minScale;}else{if(_c45.minScale>0&&_c44[i].minScale==0){_c45.minScale=_c45.minScale;}else{if(_c45.minScale>0&&_c44[i].minScale>0){_c45.minScale=Math.min(_c45.minScale,_c44[i].minScale);}}}_c45.maxScale=Math.max(_c45.maxScale||0,_c44[i].maxScale||0);if(_c44[i].parentLayerId>-1){id=_c44[i].parentLayerId;}else{break;}}}}};EAU._checkUrl=function(url){if(location.protocol==="https:"&&(EAU._isHostedService(url)||EAU._isAgolService(url))){url=url.replace("http:","https:");}return url;};EAU._isHostedService=function(url){if(!url){return false;}var _c46=".arcgis.com/";var _c47=(new dojo._Url(EAU.arcgisUrl)).authority;return (url.indexOf(_c46)!==-1||url.indexOf(_c47)!==-1);};EAU._isAgolService=function(url){if(!url){return false;}return (url.indexOf("/services.arcgisonline.com/")!==-1||url.indexOf("/server.arcgisonline.com/")!==-1);};}());}dojo.i18n._preloadLocalizations("esri.arcgis.nls.utils",["ROOT","ar","ca","cs","da","de","de-de","el","en","en-gb","en-us","es","es-es","fi","fi-fi","fr","fr-fr","he","he-il","hu","it","it-it","ja","ja-jp","ko","ko-kr","nb","nl","nl-nl","pl","pt","pt-br","pt-pt","ru","sk","sl","sv","th","tr","xx","zh","zh-cn","zh-tw"]);
