/*
	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
*/

window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","esri.layers.agsimageservice"],["provide","esri.layers.osm"],["provide","esri.tasks._task"],["provide","esri.tasks.query"],["provide","dojo.io.iframe"],["provide","dojo.cldr.supplemental"],["provide","dojo.regexp"],["provide","dojo.string"],["provide","dojo.date.locale"],["provide","esri.layers.FeatureLayer"],["provide","esri.layers.MapImageLayer"],["provide","esri.PopupBase"],["provide","dojo.Stateful"],["provide","dijit._WidgetBase"],["provide","dojo.window"],["provide","dijit._base.focus"],["provide","dojo.AdapterRegistry"],["provide","dijit._base.place"],["provide","dijit._base.window"],["provide","dijit._base.popup"],["provide","dijit._base.scroll"],["provide","dojo.uacss"],["provide","dijit._base.sniff"],["provide","dijit._base.typematic"],["provide","dijit._base.wai"],["provide","dijit._base"],["provide","dijit._Widget"],["provide","dojo.date.stamp"],["provide","dojo.parser"],["provide","dojo.cache"],["provide","dijit._Templated"],["provide","dojo.number"],["provide","dojox.charting.scaler.common"],["provide","dojox.charting.scaler.linear"],["provide","dojox.charting.axis2d.common"],["provide","dojox.charting.Element"],["provide","dojox.charting.axis2d.Base"],["provide","dojox.lang.functional.lambda"],["provide","dojox.lang.functional.array"],["provide","dojox.lang.functional.object"],["provide","dojox.lang.functional"],["provide","dojox.lang.utils"],["provide","dojox.charting.axis2d.Invisible"],["provide","dojo.colors"],["provide","dojox.charting.axis2d.Default"],["provide","dojox.charting.plot2d.common"],["provide","dojox.charting.scaler.primitive"],["provide","dojox.charting.plot2d._PlotEvents"],["provide","dojox.charting.plot2d.Base"],["provide","dojox.lang.functional.reversed"],["provide","dojox.gfx.fx"],["provide","dojox.charting.plot2d.Default"],["provide","dojox.charting.plot2d.Lines"],["provide","dojox.charting.plot2d.Areas"],["provide","dojox.charting.plot2d.Markers"],["provide","dojox.charting.plot2d.MarkersOnly"],["provide","dojox.gfx.gradutils"],["provide","dojox.charting.plot2d.Scatter"],["provide","dojox.lang.functional.sequence"],["provide","dojox.charting.plot2d.Stacked"],["provide","dojox.charting.plot2d.StackedLines"],["provide","dojox.charting.plot2d.StackedAreas"],["provide","dojox.charting.plot2d.Columns"],["provide","dojox.charting.plot2d.StackedColumns"],["provide","dojox.charting.plot2d.ClusteredColumns"],["provide","dojox.charting.plot2d.Bars"],["provide","dojox.charting.plot2d.StackedBars"],["provide","dojox.charting.plot2d.ClusteredBars"],["provide","dojox.charting.plot2d.Grid"],["provide","dojox.charting.plot2d.Pie"],["provide","dojox.charting.plot2d.Bubble"],["provide","dojox.charting.plot2d.Candlesticks"],["provide","dojox.charting.plot2d.OHLC"],["provide","dojo.fx.easing"],["provide","dojox.charting.plot2d.Spider"],["provide","dojox.lang.functional.fold"],["provide","dojox.color._base"],["provide","dojox.color"],["provide","dojox.color.Palette"],["provide","dojox.charting.Theme"],["provide","dojox.charting.Series"],["provide","dojox.charting.Chart"],["provide","dojox.charting.Chart2D"],["provide","dojox.charting.themes.PlotKit.base"],["provide","dijit.Tooltip"],["provide","dojox.charting.action2d.Base"],["provide","dojox.lang.functional.scan"],["provide","dojox.charting.action2d.Tooltip"],["provide","esri.dijit.Popup"],["provide","esri.layers.KMLLayer"],["provide","esri.layers.wms"],["provide","esri.virtualearth.VETiledLayer"],["provide","esri.tasks.geometry"],["provide","dojo.DeferredList"],["provide","dojo.data.util.filter"],["provide","dojo.data.util.sorter"],["provide","dojo.data.util.simpleFetch"],["provide","dojox.data.CsvStore"],["provide","esri.arcgis.csv"],["provide","esri.arcgis.utils"],["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"]]],defineResource:function(_4,_5,_6){if(!_4._hasResource["esri.layers.agsimageservice"]){_4._hasResource["esri.layers.agsimageservice"]=true;_4.provide("esri.layers.agsimageservice");_4.declare("esri.layers.ArcGISImageServiceLayer",esri.layers.DynamicMapServiceLayer,{constructor:function(_7,_8){this._url=esri.urlToObject(_7);var _9=_8&&_8.imageServiceParameters;this.format=_9&&_9.format;this.interpolation=_9?_9.interpolation:null;this.compressionQuality=_9?_9.compressionQuality:null;this.bandIds=_9?_9.bandIds:null;this.mosaicRule=_9?_9.mosaicRule:null;this.renderingRule=_9?_9.renderingRule:null;this._params=_4.mixin({},this._url.query,{f:"image",interpolation:this.interpolation,format:this.format,compressionQuality:this.compressionQuality,bandIds:this.bandIds?this.bandIds.join(","):null},_9?_9.toJson():{});this._initLayer=_4.hitch(this,this._initLayer);this.useMapImage=(_8&&_8.useMapImage)||false;this._loadCallback=_8&&_8.loadCallback;var _a=_8&&_8.resourceInfo;if(_a){this._initLayer(_a);}else{esri.request({url:this._url.path,content:_4.mixin({f:"json"},this._url.query),callbackParamName:"callback",load:this._initLayer,error:this._errorHandler});}},disableClientCaching:false,_initLayer:function(_b,io){this._findCredential();_4.mixin(this,_b);this.initialExtent=(this.fullExtent=this.extent=(new esri.geometry.Extent(_b.extent)));this.spatialReference=this.initialExtent.spatialReference;this.pixelSizeX=parseFloat(this.pixelSizeX);this.pixelSizeY=parseFloat(this.pixelSizeY);var i,il,_c=this.minValues,_d=this.maxValues,_e=this.meanValues,_f=this.stdvValues,bs=(this.bands=[]);for(i=0,il=this.bandCount;i<il;i++){bs[i]={min:_c[i],max:_d[i],mean:_e[i],stddev:_f[i]};}var _10=this.timeInfo;this.timeInfo=(_10&&_10.timeExtent)?new esri.layers.TimeInfo(_10):null;var _11=this.fields=[];var _12=_b.fields;if(_12){for(i=0;i<_12.length;i++){_11.push(new esri.layers.Field(_12[i]));}}this.version=_b.currentVersion;if(!this.version){var ver;if("fields" in _b||"objectIdField" in _b||"timeInfo" in _b){ver=10;}else{ver=9.3;}this.version=ver;}this.loaded=true;this.onLoad(this);var _13=this._loadCallback;if(_13){delete this._loadCallback;_13(this);}},getImageUrl:function(_14,_15,_16,_17){var sr=_14.spatialReference.wkid||_4.toJson(_14.spatialReference.toJson());delete this._params._ts;var _18=this._url.path+"/exportImage?";_4.mixin(this._params,{bbox:_14.xmin+","+_14.ymin+","+_14.xmax+","+_14.ymax,imageSR:sr,bboxSR:sr,size:_15+","+_16},this.disableClientCaching?{_ts:new Date().getTime()}:{});var _19=(this._params.token=this._getToken()),_1a=esri._getProxiedUrl(_18+_4.objectToQuery(_4.mixin(this._params,{f:"image"})));if((_1a.length>esri.config.defaults.io.postLength)||this.useMapImage){this._jsonRequest=esri.request({url:_18,content:_4.mixin(this._params,{f:"json"}),callbackParamName:"callback",load:function(_1b,io){var _1c=_1b.href;if(_19){_1c+=(_1c.indexOf("?")===-1?("?token="+_19):("&token="+_19));}_17(esri._getProxiedUrl(_1c));},error:this._errorHandler});}else{_17(_1a);}},setInterpolation:function(_1d,_1e){this.interpolation=(this._params.interpolation=_1d);if(!_1e){this.refresh(true);}},setCompressionQuality:function(_1f,_20){this.compressionQuality=(this._params.compressionQuality=_1f);if(!_20){this.refresh(true);}},setBandIds:function(ids,_21){this.bandIds=ids;this._params.bandIds=ids.join(",");if(!_21){this.refresh(true);}},setDefaultBandIds:function(_22){this.bandIds=(this._params.bandIds=null);if(!_22){this.refresh(true);}},setDisableClientCaching:function(_23){this.disableClientCaching=_23;},setMosaicRule:function(_24,_25){this.mosaicRule=_24;this._params.mosaicRule=_4.toJson(_24.toJson());if(!_25){this.refresh(true);}},setRenderingRule:function(_26,_27){this.renderingRule=_26;this._params.renderingRule=_4.toJson(_26.toJson());if(!_27){this.refresh(true);}},setImageFormat:function(_28,_29){this.format=(this._params.format=_28);if(!_29){this.refresh(true);}},refresh:function(_2a){if(_2a){this.inherited(arguments);}else{var dc=this.disableClientCaching;this.disableClientCaching=true;this.inherited(arguments);this.disableClientCaching=dc;}},exportMapImage:function(_2b,_2c){var m=esri.config.defaults.map,p=_4.mixin({size:m.width+","+m.height},this._params,_2b?_2b.toJson(this.normalization):{},{f:"json"});delete p._ts;this._exportMapImage(this._url.path+"/exportImage",p,_2c);}});_4.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(_2d){var ext=this.bbox||this.extent;ext=ext&&_2d&&ext._normalize(true);var _2e=ext?(ext.spatialReference.wkid||_4.toJson(ext.spatialReference.toJson())):null,_2f=this.imageSpatialReference,_30={bbox:ext?(ext.xmin+","+ext.ymin+","+ext.xmax+","+ext.ymax):null,bboxSR:_2e,size:(this.width!==null&&this.height!==null?this.width+","+this.height:null),imageSR:(_2f?(_2f.wkid||_4.toJson(_2f.toJson())):_2e),format:this.format,interpolation:this.interpolation,compressionQuality:this.compressionQuality,bandIds:this.bandIds?this.bandIds.join(","):null,mosaicRule:this.mosaicRule?_4.toJson(this.mosaicRule.toJson()):null,renderingRule:this.renderingRule?_4.toJson(this.renderingRule.toJson()):null,noData:this.noData};var _31=this.timeExtent;_30.time=_31?_31.toJson().join(","):null;return esri.filter(_30,function(_32){if(_32!==null){return true;}});}});_4.mixin(esri.layers.ImageServiceParameters,{INTERPOLATION_BILINEAR:"RSP_BilinearInterpolation",INTERPOLATION_CUBICCONVOLUTION:"RSP_CubicConvolution",INTERPOLATION_MAJORITY:"RSP_Majority",INTERPOLATION_NEARESTNEIGHBOR:"RSP_NearestNeighbor"});_4.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 _33={mosaicMethod:this.method,where:this.where,sortField:this.sortField,sortValue:this.sortValue?_4.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(_33,function(_34){if(_34!==null){return true;}});}});_4.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"});_4.declare("esri.layers.RasterFunction",null,{functionName:null,"arguments":null,variableName:null,toJson:function(){var _35={rasterFunction:this.functionName,rasterFunctionArguments:this["arguments"],variableName:this.variableName};return esri.filter(_35,function(_36){if(_36!==null){return true;}});}});}if(!_4._hasResource["esri.layers.osm"]){_4._hasResource["esri.layers.osm"]=true;_4.provide("esri.layers.osm");_4.declare("esri.layers.OpenStreetMapLayer",esri.layers.TiledMapServiceLayer,{constructor:function(_37){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=(_37&&_37.tileServers)||["http://a.tile.openstreetmap.org/","http://b.tile.openstreetmap.org/","http://c.tile.openstreetmap.org/"];this.serversLength=this.tileServers.length;this._displayLevels=_37?_37.displayLevels:null;this.loaded=true;this.onLoad(this);var _38=_37&&_37.loadCallback;if(_38){_38(this);}},getTileUrl:function(_39,row,col){return esri._getProxiedUrl(this.tileServers[row%this.serversLength]+"/"+_39+"/"+col+"/"+row+".png");}});}if(!_4._hasResource["esri.tasks._task"]){_4._hasResource["esri.tasks._task"]=true;_4.provide("esri.tasks._task");_4.declare("esri.tasks._Task",null,{constructor:function(url){if(url&&_4.isString(url)){this._url=esri.urlToObject(this.url=url);}this.normalization=true;this._errorHandler=_4.hitch(this,this._errorHandler);},_encode:function(_3a,_3b,_3c){var _3d,_3e,_3f={},i,p,pl;for(i in _3a){if(i==="declaredClass"){continue;}_3d=_3a[i];_3e=typeof (_3d);if(_3d!==null&&_3d!==undefined&&_3e!=="function"){if(_4.isArray(_3d)){_3f[i]=[];pl=_3d.length;for(p=0;p<pl;p++){_3f[i][p]=this._encode(_3d[p]);}}else{if(_3e==="object"){if(_3d.toJson){var _40=_3d.toJson(_3c&&_3c[i]);if(_3d instanceof esri.tasks.FeatureSet){if(_40.spatialReference){_40.sr=_40.spatialReference;delete _40.spatialReference;}}_3f[i]=_3b?_40:_4.toJson(_40);}}else{_3f[i]=_3d;}}}}return _3f;},_successHandler:function(_41,_42,_43,dfd){if(_42){this[_42].apply(this,_41);}if(_43){_43.apply(null,_41);}if(dfd){esri._resDfd(dfd,_41);}},_errorHandler:function(err,_44,dfd){this.onError(err);if(_44){_44(err);}if(dfd){dfd.errback(err);}},setNormalization:function(_45){this.normalization=_45;},onError:function(){}});_4.declare("esri.tasks.FeatureSet",null,{constructor:function(_46){if(_46){_4.mixin(this,_46);var _47=this.features,sr=_46.spatialReference,_48=esri.Graphic,_49=esri.geometry.getGeometryType(_46.geometryType);sr=(this.spatialReference=new esri.SpatialReference(sr));this.geometryType=_46.geometryType;if(_46.fields){this.fields=_46.fields;}_4.forEach(_47,function(_4a,i){var _4b=_4a.geometry&&_4a.geometry.spatialReference;_47[i]=new _48((_49&&_4a.geometry)?new _49(_4a.geometry):null,_4a.symbol&&esri.symbol.fromJson(_4a.symbol),_4a.attributes);if(_47[i].geometry&&!_4b){_47[i].geometry.setSpatialReference(sr);}});}else{this.features=[];}},displayFieldName:null,geometryType:null,spatialReference:null,fields:[],features:[],fieldAliases:null,toJson:function(_4c){var _4d={};if(this.displayFieldName){_4d.displayFieldName=this.displayFieldName;}if(this.fields){_4d.fields=this.fields;}if(this.spatialReference){_4d.spatialReference=this.spatialReference.toJson();}else{if(this.features[0]&&this.features[0].geometry){_4d.spatialReference=this.features[0].geometry.spatialReference.toJson();}}if(this.features[0]){if(this.features[0].geometry){_4d.geometryType=esri.geometry.getJsonType(this.features[0].geometry);}_4d.features=esri._encodeGraphics(this.features,_4c);}_4d.exceededTransferLimit=this.exceededTransferLimit;return esri._sanitize(_4d);}});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(!_4._hasResource["esri.tasks.query"]){_4._hasResource["esri.tasks.query"]=true;_4.provide("esri.tasks.query");_4.declare("esri.tasks.QueryTask",esri.tasks._Task,{constructor:function(url,_4e){this._handler=_4.hitch(this,this._handler);this._relationshipQueryHandler=_4.hitch(this,this._relationshipQueryHandler);this._executeForIdsHandler=_4.hitch(this,this._executeForIdsHandler);this._countHandler=_4.hitch(this,this._countHandler);this.source=_4e&&_4e.source;this.gdbVersion=_4e&&_4e.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(_4f,_50,_51,_52,_53){var _54=_53.assembly,_55=this._encode(_4.mixin({},this._url.query,{f:"json"},_4f.toJson(_54&&_54[0]))),_56=this._handler,_57=this._errorHandler;if(this.source){var _58={source:this.source.toJson()};_55.layer=_4.toJson(_58);}if(this.gdbVersion){_55.gdbVersion=this.gdbVersion;}return esri.request({url:this._url.path+"/query",content:_55,callbackParamName:"callback",load:function(r,i){_56(r,i,_50,_51,_53.dfd);},error:function(r){_57(r,_51,_53.dfd);},callbackSuffix:_52});},executeRelationshipQuery:function(_59,_5a,_5b){var _5c=this._encode(_4.mixin({},this._url.query,{f:"json"},_59.toJson())),_5d=this._relationshipQueryHandler,_5e=this._errorHandler;if(this.gdbVersion){_5c.gdbVersion=this.gdbVersion;}var dfd=new _4.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/queryRelatedRecords",content:_5c,callbackParamName:"callback",load:function(r,i){_5d(r,i,_5a,_5b,dfd);},error:function(r){_5e(r,_5b,dfd);}});return dfd;},executeForIds:function(_5f,_60,_61,_62){var _63=_62.assembly,_64=this._encode(_4.mixin({},this._url.query,{f:"json",returnIdsOnly:true},_5f.toJson(_63&&_63[0]))),_65=this._executeForIdsHandler,_66=this._errorHandler;if(this.source){var _67={source:this.source.toJson()};_64.layer=_4.toJson(_67);}if(this.gdbVersion){_64.gdbVersion=this.gdbVersion;}return esri.request({url:this._url.path+"/query",content:_64,callbackParamName:"callback",load:function(r,i){_65(r,i,_60,_61,_62.dfd);},error:function(r){_66(r,_61,_62.dfd);}});},executeForCount:function(_68,_69,_6a,_6b){var _6c=_6b.assembly,_6d=this._encode(_4.mixin({},this._url.query,{f:"json",returnIdsOnly:true,returnCountOnly:true},_68.toJson(_6c&&_6c[0]))),_6e=this._countHandler,_6f=this._errorHandler;if(this.source){var _70={source:this.source.toJson()};_6d.layer=_4.toJson(_70);}if(this.gdbVersion){_6d.gdbVersion=this.gdbVersion;}return esri.request({url:this._url.path+"/query",content:_6d,callbackParamName:"callback",load:function(r,i){_6e(r,i,_69,_6a,_6b.dfd);},error:function(r){_6f(r,_6a,_6b.dfd);}});},_handler:function(_71,io,_72,_73,dfd){try{var _74=new esri.tasks.FeatureSet(_71);this._successHandler([_74],"onComplete",_72,dfd);}catch(err){this._errorHandler(err,_73,dfd);}},_relationshipQueryHandler:function(_75,io,_76,_77,dfd){try{var gt=_75.geometryType,sr=_75.spatialReference,_78={};_4.forEach(_75.relatedRecordGroups,function(gr){var _79={};_79.geometryType=gt;_79.spatialReference=sr;_79.features=gr.relatedRecords;var _7a=new esri.tasks.FeatureSet(_79);_78[gr.objectId]=_7a;});this._successHandler([_78],"onExecuteRelationshipQueryComplete",_76,dfd);}catch(err){this._errorHandler(err,_77,dfd);}},_executeForIdsHandler:function(_7b,io,_7c,_7d,dfd){try{this._successHandler([_7b.objectIds],"onExecuteForIdsComplete",_7c,dfd);}catch(err){this._errorHandler(err,_7d,dfd);}},_countHandler:function(_7e,io,_7f,_80,dfd){try{var _81,_82=_7e.features,ids=_7e.objectIds;if(ids){_81=ids.length;}else{if(_82){throw new Error(esri.bundle.tasks.query.invalid);}else{_81=_7e.count;}}this._successHandler([_81],"onExecuteForCountComplete",_7f,dfd);}catch(err){this._errorHandler(err,_80,dfd);}}});esri._createWrappers("esri.tasks.QueryTask");_4.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(_83){var _84={text:this.text,where:this.where,returnGeometry:this.returnGeometry,spatialRel:this.spatialRelationship,maxAllowableOffset:this.maxAllowableOffset},g=_83&&_83["geometry"]||this.geometry,ids=this.objectIds,_85=this.outFields,_86=this.outSpatialReference,_87=this.groupByFieldsForStatistics,_88=this.orderByFields,_89=this.outStatistics;if(g){_84.geometry=g;_84.geometryType=esri.geometry.getJsonType(g);_84.inSR=g.spatialReference.wkid||_4.toJson(g.spatialReference.toJson());}if(ids){_84.objectIds=ids.join(",");}if(_85){_84.outFields=_85.join(",");}if(_87){_84.groupByFieldsForStatistics=_87.join(",");}if(_88){_84.orderByFields=_88.join(",");}if(_89){var _8a=[];_4.forEach(_89,function(_8b,idx){_8a.push(_8b.toJson());});_84.outStatistics=_4.toJson(_8a);}if(_86!==null){_84.outSR=_86.wkid||_4.toJson(_86.toJson());}else{if(g){_84.outSR=g.spatialReference.wkid||_4.toJson(g.spatialReference.toJson());}}var _8c=this.timeExtent;_84.time=_8c?_8c.toJson().join(","):null;var _8d=this.relationParam;if(_8d&&this.spatialRelationship===esri.tasks.Query.SPATIAL_REL_RELATION){_84.relationParam=_8d;}_84._ts=this._ts;return _84;}});_4.mixin(esri.tasks.Query,esri.tasks._SpatialRelationship);_4.declare("esri.tasks.RelationshipQuery",null,{definitionExpression:"",relationshipId:null,returnGeometry:false,objectIds:null,outSpatialReference:null,outFields:null,toJson:function(){var _8e={definitionExpression:this.definitionExpression,relationshipId:this.relationshipId,returnGeometry:this.returnGeometry,maxAllowableOffset:this.maxAllowableOffset},_8f=this.objectIds,_90=this.outFields,_91=this.outSpatialReference;if(_8f){_8e.objectIds=_8f.join(",");}if(_90){_8e.outFields=_90.join(",");}if(_91){_8e.outSR=_91.toJson();}_8e._ts=this._ts;return _8e;}});_4.declare("esri.tasks.StatisticDefinition",null,{statisticType:null,onStatisticField:null,outStatisticFieldName:null,toJson:function(){var _92={statisticType:this.statisticType,onStatisticField:this.onStatisticField};if(this.outStatisticFieldName){_92.outStatisticFieldName=this.outStatisticFieldName;}return _92;}});}if(!_4._hasResource["dojo.io.iframe"]){_4._hasResource["dojo.io.iframe"]=true;_4.provide("dojo.io.iframe");_4.getObject("io",true,_4);_4.io.iframe={create:function(_93,_94,uri){if(window[_93]){return window[_93];}if(window.frames[_93]){return window.frames[_93];}var _95=null;var _96=uri;if(!_96){if(_4.config["useXDomain"]&&!_4.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");}_96=(_4.config["dojoBlankHtmlUrl"]||_4.moduleUrl("dojo","resources/blank.html"));}var _95=_4.place("<iframe id=\""+_93+"\" name=\""+_93+"\" src=\""+_96+"\" onload=\""+_94+"\" style=\"position: absolute; left: 1px; top: 1px; height: 1px; width: 1px; visibility: hidden\">",_4.body());window[_93]=_95;return _95;},setSrc:function(_97,src,_98){try{if(!_98){if(_4.isWebKit){_97.location=src;}else{frames[_97.name].location=src;}}else{var _99;if(_4.isIE||_4.isWebKit){_99=_97.contentWindow.document;}else{_99=_97.contentWindow;}if(!_99){_97.location=src;return;}else{_99.location.replace(src);}}}catch(e){console.log("dojo.io.iframe.setSrc: ",e);}},doc:function(_9a){var doc=_9a.contentDocument||(((_9a.name)&&(_9a.document)&&(_4.doc.getElementsByTagName("iframe")[_9a.name].contentWindow)&&(_4.doc.getElementsByTagName("iframe")[_9a.name].contentWindow.document)))||((_9a.name)&&(_4.doc.frames[_9a.name])&&(_4.doc.frames[_9a.name].document))||null;return doc;},send:function(_9b){if(!this["_frame"]){this._frame=this.create(this._iframeName,_4._scopeName+".io.iframe._iframeOnload();");}var dfd=_4._ioSetArgs(_9b,function(dfd){dfd.canceled=true;dfd.ioArgs._callNext();},function(dfd){var _9c=null;try{var _9d=dfd.ioArgs;var dii=_4.io.iframe;var ifd=dii.doc(dii._frame);var _9e=_9d.handleAs;_9c=ifd;if(_9e!="html"){if(_9e=="xml"){if(_4.isIE<9||(_4.isIE&&_4.isQuirks)){_4.query("a",dii._frame.contentWindow.document.documentElement).orphan();var _9f=(dii._frame.contentWindow.document).documentElement.innerText;_9f=_9f.replace(/>\s+</g,"><");_9f=_4.trim(_9f);var _a0={responseText:_9f};_9c=_4._contentHandlers["xml"](_a0);}}else{_9c=ifd.getElementsByTagName("textarea")[0].value;if(_9e=="json"){_9c=_4.fromJson(_9c);}else{if(_9e=="javascript"){_9c=_4.eval(_9c);}}}}}catch(e){_9c=e;}finally{_9d._callNext();}return _9c;},function(_a1,dfd){dfd.ioArgs._hasError=true;dfd.ioArgs._callNext();return _a1;});dfd.ioArgs._callNext=function(){if(!this["_calledNext"]){this._calledNext=true;_4.io.iframe._currentDfd=null;_4.io.iframe._fireNextRequest();}};this._dfdQueue.push(dfd);this._fireNextRequest();_4._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:_4._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 _a2=dfd.ioArgs;var _a3=_a2.args;_a2._contentToClean=[];var fn=_4.byId(_a3["form"]);var _a4=_a3["content"]||{};if(fn){if(_a4){var _a5=function(_a6,_a7){_4.create("input",{type:"hidden",name:_a6,value:_a7},fn);_a2._contentToClean.push(_a6);};for(var x in _a4){var val=_a4[x];if(_4.isArray(val)&&val.length>1){var i;for(i=0;i<val.length;i++){_a5(x,val[i]);}}else{if(!fn[x]){_a5(x,val);}else{fn[x].value=val;}}}}var _a8=fn.getAttributeNode("action");var _a9=fn.getAttributeNode("method");var _aa=fn.getAttributeNode("target");if(_a3["url"]){_a2._originalAction=_a8?_a8.value:null;if(_a8){_a8.value=_a3.url;}else{fn.setAttribute("action",_a3.url);}}if(!_a9||!_a9.value){if(_a9){_a9.value=(_a3["method"])?_a3["method"]:"post";}else{fn.setAttribute("method",(_a3["method"])?_a3["method"]:"post");}}_a2._originalTarget=_aa?_aa.value:null;if(_aa){_aa.value=this._iframeName;}else{fn.setAttribute("target",this._iframeName);}fn.target=this._iframeName;_4._ioNotifyStart(dfd);fn.submit();}else{var _ab=_a3.url+(_a3.url.indexOf("?")>-1?"&":"?")+_a2.query;_4._ioNotifyStart(dfd);this.setSrc(this._frame,_ab,true);}}catch(e){dfd.errback(e);}},_iframeOnload:function(){var dfd=this._currentDfd;if(!dfd){this._fireNextRequest();return;}var _ac=dfd.ioArgs;var _ad=_ac.args;var _ae=_4.byId(_ad.form);if(_ae){var _af=_ac._contentToClean;for(var i=0;i<_af.length;i++){var key=_af[i];for(var j=0;j<_ae.childNodes.length;j++){var _b0=_ae.childNodes[j];if(_b0.name==key){_4.destroy(_b0);break;}}}if(_ac["_originalAction"]){_ae.setAttribute("action",_ac._originalAction);}if(_ac["_originalTarget"]){_ae.setAttribute("target",_ac._originalTarget);_ae.target=_ac._originalTarget;}}_ac._finished=true;}};}if(!_4._hasResource["dojo.cldr.supplemental"]){_4._hasResource["dojo.cldr.supplemental"]=true;_4.provide("dojo.cldr.supplemental");_4.getObject("cldr.supplemental",true,_4);_4.cldr.supplemental.getFirstDayOfWeek=function(_b1){var _b2={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 _b3=_4.cldr.supplemental._region(_b1);var dow=_b2[_b3];return (dow===undefined)?1:dow;};_4.cldr.supplemental._region=function(_b4){_b4=_4.i18n.normalizeLocale(_b4);var _b5=_b4.split("-");var _b6=_b5[1];if(!_b6){_b6={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"}[_b5[0]];}else{if(_b6.length==4){_b6=_b5[2];}}return _b6;};_4.cldr.supplemental.getWeekend=function(_b7){var _b8={"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 _b9={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 _ba=_4.cldr.supplemental._region(_b7);var _bb=_b8[_ba];var end=_b9[_ba];if(_bb===undefined){_bb=6;}if(end===undefined){end=0;}return {start:_bb,end:end};};}if(!_4._hasResource["dojo.regexp"]){_4._hasResource["dojo.regexp"]=true;_4.provide("dojo.regexp");_4.getObject("regexp",true,_4);_4.regexp.escapeString=function(str,_bc){return str.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,function(ch){if(_bc&&_bc.indexOf(ch)!=-1){return ch;}return "\\"+ch;});};_4.regexp.buildGroupRE=function(arr,re,_bd){if(!(arr instanceof Array)){return re(arr);}var b=[];for(var i=0;i<arr.length;i++){b.push(re(arr[i]));}return _4.regexp.group(b.join("|"),_bd);};_4.regexp.group=function(_be,_bf){return "("+(_bf?"?:":"")+_be+")";};}if(!_4._hasResource["dojo.string"]){_4._hasResource["dojo.string"]=true;_4.provide("dojo.string");_4.getObject("string",true,_4);_4.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("");};_4.string.pad=function(_c0,_c1,ch,end){if(!ch){ch="0";}var out=String(_c0),pad=_4.string.rep(ch,Math.ceil((_c1-out.length)/ch.length));return end?out+pad:pad+out;};_4.string.substitute=function(_c2,map,_c3,_c4){_c4=_c4||_4.global;_c3=_c3?_4.hitch(_c4,_c3):function(v){return v;};return _c2.replace(/\$\{([^\s\:\}]+)(?:\:([^\s\:\}]+))?\}/g,function(_c5,key,_c6){var _c7=_4.getObject(key,false,map);if(_c6){_c7=_4.getObject(_c6,false,_c4).call(_c4,_c7,key);}return _c3(_c7,key).toString();});};_4.string.trim=String.prototype.trim?_4.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(!_4._hasResource["dojo.date.locale"]){_4._hasResource["dojo.date.locale"]=true;_4.provide("dojo.date.locale");_4.getObject("date.locale",true,_4);(function(){function _c8(_c9,_ca,_cb,_cc){return _cc.replace(/([a-z])\1*/ig,function(_cd){var s,pad,c=_cd.charAt(0),l=_cd.length,_ce=["abbr","wide","narrow"];switch(c){case "G":s=_ca[(l<4)?"eraAbbr":"eraNames"][_c9.getFullYear()<0?0:1];break;case "y":s=_c9.getFullYear();switch(l){case 1:break;case 2:if(!_cb.fullYear){s=String(s);s=s.substr(s.length-2);break;}default:pad=true;}break;case "Q":case "q":s=Math.ceil((_c9.getMonth()+1)/3);pad=true;break;case "M":var m=_c9.getMonth();if(l<3){s=m+1;pad=true;}else{var _cf=["months","format",_ce[l-3]].join("-");s=_ca[_cf][m];}break;case "w":var _d0=0;s=_4.date.locale._getWeekOfYear(_c9,_d0);pad=true;break;case "d":s=_c9.getDate();pad=true;break;case "D":s=_4.date.locale._getDayOfYear(_c9);pad=true;break;case "E":var d=_c9.getDay();if(l<3){s=d+1;pad=true;}else{var _d1=["days","format",_ce[l-3]].join("-");s=_ca[_d1][d];}break;case "a":var _d2=(_c9.getHours()<12)?"am":"pm";s=_cb[_d2]||_ca["dayPeriods-format-wide-"+_d2];break;case "h":case "H":case "K":case "k":var h=_c9.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=_c9.getMinutes();pad=true;break;case "s":s=_c9.getSeconds();pad=true;break;case "S":s=Math.round(_c9.getMilliseconds()*Math.pow(10,l-3));pad=true;break;case "v":case "z":s=_4.date.locale._getZone(_c9,true,_cb);if(s){break;}l=4;case "Z":var _d3=_4.date.locale._getZone(_c9,false,_cb);var tz=[(_d3<=0?"+":"-"),_4.string.pad(Math.floor(Math.abs(_d3)/60),2),_4.string.pad(Math.abs(_d3)%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: "+_cc);}if(pad){s=_4.string.pad(s,l);}return s;});};_4.date.locale._getZone=function(_d4,_d5,_d6){if(_d5){return _4.date.getTimezoneName(_d4);}else{return _d4.getTimezoneOffset();}};_4.date.locale.format=function(_d7,_d8){_d8=_d8||{};var _d9=_4.i18n.normalizeLocale(_d8.locale),_da=_d8.formatLength||"short",_db=_4.date.locale._getGregorianBundle(_d9),str=[],_dc=_4.hitch(this,_c8,_d7,_db,_d8);if(_d8.selector=="year"){return _dd(_db["dateFormatItem-yyyy"]||"yyyy",_dc);}var _de;if(_d8.selector!="date"){_de=_d8.timePattern||_db["timeFormat-"+_da];if(_de){str.push(_dd(_de,_dc));}}if(_d8.selector!="time"){_de=_d8.datePattern||_db["dateFormat-"+_da];if(_de){str.push(_dd(_de,_dc));}}return str.length==1?str[0]:_db["dateTimeFormat-"+_da].replace(/\{(\d+)\}/g,function(_df,key){return str[key];});};_4.date.locale.regexp=function(_e0){return _4.date.locale._parseInfo(_e0).regexp;};_4.date.locale._parseInfo=function(_e1){_e1=_e1||{};var _e2=_4.i18n.normalizeLocale(_e1.locale),_e3=_4.date.locale._getGregorianBundle(_e2),_e4=_e1.formatLength||"short",_e5=_e1.datePattern||_e3["dateFormat-"+_e4],_e6=_e1.timePattern||_e3["timeFormat-"+_e4],_e7;if(_e1.selector=="date"){_e7=_e5;}else{if(_e1.selector=="time"){_e7=_e6;}else{_e7=_e3["dateTimeFormat-"+_e4].replace(/\{(\d+)\}/g,function(_e8,key){return [_e6,_e5][key];});}}var _e9=[],re=_dd(_e7,_4.hitch(this,_ea,_e9,_e3,_e1));return {regexp:re,tokens:_e9,bundle:_e3};};_4.date.locale.parse=function(_eb,_ec){var _ed=/[\u200E\u200F\u202A\u202E]/g,_ee=_4.date.locale._parseInfo(_ec),_ef=_ee.tokens,_f0=_ee.bundle,re=new RegExp("^"+_ee.regexp.replace(_ed,"")+"$",_ee.strict?"":"i"),_f1=re.exec(_eb&&_eb.replace(_ed,""));if(!_f1){return null;}var _f2=["abbr","wide","narrow"],_f3=[1970,0,1,0,0,0,0],_f4="",_f5=_4.every(_f1,function(v,i){if(!i){return true;}var _f6=_ef[i-1];var l=_f6.length;switch(_f6.charAt(0)){case "y":if(l!=2&&_ec.strict){_f3[0]=v;}else{if(v<100){v=Number(v);var _f7=""+new Date().getFullYear(),_f8=_f7.substring(0,2)*100,_f9=Math.min(Number(_f7.substring(2,4))+20,99),num=(v<_f9)?_f8+v:_f8-100+v;_f3[0]=num;}else{if(_ec.strict){return false;}_f3[0]=v;}}break;case "M":if(l>2){var _fa=_f0["months-format-"+_f2[l-3]].concat();if(!_ec.strict){v=v.replace(".","").toLowerCase();_fa=_4.map(_fa,function(s){return s.replace(".","").toLowerCase();});}v=_4.indexOf(_fa,v);if(v==-1){return false;}}else{v--;}_f3[1]=v;break;case "E":case "e":var _fb=_f0["days-format-"+_f2[l-3]].concat();if(!_ec.strict){v=v.toLowerCase();_fb=_4.map(_fb,function(d){return d.toLowerCase();});}v=_4.indexOf(_fb,v);if(v==-1){return false;}break;case "D":_f3[1]=0;case "d":_f3[2]=v;break;case "a":var am=_ec.am||_f0["dayPeriods-format-wide-am"],pm=_ec.pm||_f0["dayPeriods-format-wide-pm"];if(!_ec.strict){var _fc=/\./g;v=v.replace(_fc,"").toLowerCase();am=am.replace(_fc,"").toLowerCase();pm=pm.replace(_fc,"").toLowerCase();}if(_ec.strict&&v!=am&&v!=pm){return false;}_f4=(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;}_f3[3]=v;break;case "m":_f3[4]=v;break;case "s":_f3[5]=v;break;case "S":_f3[6]=v;}return true;});var _fd=+_f3[3];if(_f4==="p"&&_fd<12){_f3[3]=_fd+12;}else{if(_f4==="a"&&_fd==12){_f3[3]=0;}}var _fe=new Date(_f3[0],_f3[1],_f3[2],_f3[3],_f3[4],_f3[5],_f3[6]);if(_ec.strict){_fe.setFullYear(_f3[0]);}var _ff=_ef.join(""),_100=_ff.indexOf("d")!=-1,_101=_ff.indexOf("M")!=-1;if(!_f5||(_101&&_fe.getMonth()>_f3[1])||(_100&&_fe.getDate()>_f3[2])){return null;}if((_101&&_fe.getMonth()<_f3[1])||(_100&&_fe.getDate()<_f3[2])){_fe=_4.date.add(_fe,"hour",1);}return _fe;};function _dd(_102,_103,_104,_105){var _106=function(x){return x;};_103=_103||_106;_104=_104||_106;_105=_105||_106;var _107=_102.match(/(''|[^'])+/g),_108=_102.charAt(0)=="'";_4.forEach(_107,function(_109,i){if(!_109){_107[i]="";}else{_107[i]=(_108?_104:_103)(_109.replace(/''/g,"'"));_108=!_108;}});return _105(_107.join(""));};function _ea(_10a,_10b,_10c,_10d){_10d=_4.regexp.escapeString(_10d);if(!_10c.strict){_10d=_10d.replace(" a"," ?a");}return _10d.replace(/([a-z])\1*/ig,function(_10e){var s,c=_10e.charAt(0),l=_10e.length,p2="",p3="";if(_10c.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=_10c.am||_10b["dayPeriods-format-wide-am"],pm=_10c.pm||_10b["dayPeriods-format-wide-pm"];s=am+"|"+pm;if(!_10c.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(_10a){_10a.push(_10e);}return "("+s+")";}).replace(/[\xa0 ]/g,"[\\s\\xa0]");};})();(function(){var _10f=[];_4.date.locale.addCustomFormats=function(_110,_111){_10f.push({pkg:_110,name:_111});};_4.date.locale._getGregorianBundle=function(_112){var _113={};_4.forEach(_10f,function(desc){var _114=_4.i18n.getLocalization(desc.pkg,desc.name,_112);_113=_4.mixin(_113,_114);},this);return _113;};})();_4.date.locale.addCustomFormats("dojo.cldr","gregorian");_4.date.locale.getNames=function(item,type,_115,_116){var _117,_118=_4.date.locale._getGregorianBundle(_116),_119=[item,_115,type];if(_115=="standAlone"){var key=_119.join("-");_117=_118[key];if(_117[0]==1){_117=undefined;}}_119[1]="format";return (_117||_118[_119.join("-")]).concat();};_4.date.locale.isWeekend=function(_11a,_11b){var _11c=_4.cldr.supplemental.getWeekend(_11b),day=(_11a||new Date()).getDay();if(_11c.end<_11c.start){_11c.end+=7;if(day<_11c.start){day+=7;}}return day>=_11c.start&&day<=_11c.end;};_4.date.locale._getDayOfYear=function(_11d){return _4.date.difference(new Date(_11d.getFullYear(),0,1,_11d.getHours()),_11d)+1;};_4.date.locale._getWeekOfYear=function(_11e,_11f){if(arguments.length==1){_11f=0;}var _120=new Date(_11e.getFullYear(),0,1).getDay(),adj=(_120-_11f+7)%7,week=Math.floor((_4.date.locale._getDayOfYear(_11e)+adj-1)/7);if(_120==_11f){week++;}return week;};}if(!_4._hasResource["esri.layers.FeatureLayer"]){_4._hasResource["esri.layers.FeatureLayer"]=true;_4.provide("esri.layers.FeatureLayer");_4.declare("esri.layers.FeatureLayer",esri.layers.GraphicsLayer,{constructor:function(url,_121){this._outFields=_121&&_121.outFields;this._loadCallback=_121&&_121.loadCallback;var _122=_121&&_121._usePatch;this._usePatch=(_122===null||_122===undefined)?true:_122;this._trackIdField=_121&&_121.trackIdField;this.objectIdField=_121&&_121.objectIdField;this._maxOffset=_121&&_121.maxAllowableOffset;this._optEditable=_121&&_121.editable;this._optAutoGen=_121&&_121.autoGeneralize;this.editSummaryCallback=_121&&_121.editSummaryCallback;this.userId=_121&&_121.userId;this.userIsAdmin=_121&&_121.userIsAdmin;this.useMapTime=(_121&&_121.hasOwnProperty("useMapTime"))?(!!_121.useMapTime):true;this.source=_121&&_121.source;this.gdbVersion=_121&&_121.gdbVersion;this._selectedFeatures={};this._selectedFeaturesArr=[];this._newFeatures=[];this._deletedFeatures={};this._ulid=this._getUniqueId();var ctor=this.constructor,mode=this.mode=(esri._isDefined(_121&&_121.mode)?_121.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=(_121&&_121.tileWidth)||512;this._tileHeight=(_121&&_121.tileHeight)||512;this._mode=new esri.layers._OnDemandMode(this);var _123=_121&&_121.latticeTiling;this.latticeTiling=_123;break;case ctor.MODE_SELECTION:this._mode=new esri.layers._SelectionMode(this);this._isSelOnly=true;break;}this._initLayer=_4.hitch(this,this._initLayer);this._selectHandler=_4.hitch(this,this._selectHandler);this._editable=false;if(_4.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 _124=this._url.path;this._fserver=false;if(_124.search(/\/FeatureServer\//i)!==-1){this._fserver=true;}var _125=_121&&_121.resourceInfo;if(_125){this._initLayer(_125);}else{if(this.source){var _126={source:this.source.toJson()};this._url.query=_4.mixin(this._url.query,{layer:_4.toJson(_126)});}if(this.gdbVersion){this._url.query=_4.mixin(this._url.query,{gdbVersion:this.gdbVersion});}esri.request({url:_124,content:_4.mixin({f:"json"},this._url.query),callbackParamName:"callback",load:this._initLayer,error:this._errorHandler});}},_initLayer:function(_127,io){if(_127||io){this._json=_127;this._findCredential();if(this._collection){this._mode=new esri.layers._SnapshotMode(this);this._isSnapshot=true;this._featureSet=_127.featureSet;this._nextId=_127.nextObjectId;_127=_127.layerDefinition;}if(_127.hasOwnProperty("capabilities")){var _128=(this.capabilities=_127.capabilities);if(_128&&_128.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=_4.toJson(this._json);if(this._editable){delete this._maxOffset;}else{if(this.mode!==this.constructor.MODE_SNAPSHOT&&((_127.geometryType==="esriGeometryPolyline")||(_127.geometryType==="esriGeometryPolygon"))){this._autoGeneralize=esri._isDefined(this._optAutoGen)?this._optAutoGen:(this.mode===this.constructor.MODE_ONDEMAND);delete this._optAutoGen;}}this.minScale=_127.minScale||0;this.maxScale=_127.maxScale||0;this.layerId=_127.id;this.name=_127.name;this.description=_127.description;this.copyright=_127.copyrightText;this.type=_127.type;this.geometryType=_127.geometryType;this.displayField=_127.displayField;this.defaultDefinitionExpression=_127.definitionExpression;this.fullExtent=new esri.geometry.Extent(_127.extent);if((this.geometryType==="esriGeometryPoint")||(this.geometryType==="esriGeometryMultipoint")){this.latticeTiling=false;}this.indexedFields=_127.indexedFields;this.maxRecordCount=_127.maxRecordCount;this.canModifyLayer=_127.canModifyLayer;this.supportsStatistics=_127.supportsStatistics;this.supportsAdvancedQueries=_127.supportsAdvancedQueries;this.hasLabels=_127.hasLabels;this.canScaleSymbols=_127.canScaleSymbols;this.supportsRollbackOnFailure=_127.supportsRollbackOnFailure;this.syncCanReturnChanges=_127.syncCanReturnChanges;this.isDataVersioned=_127.isDataVersioned;this.editFieldsInfo=_127.editFieldsInfo;this.ownershipBasedAccessControlForFeatures=_127.ownershipBasedAccessControlForFeatures;if(this.editFieldsInfo&&this.ownershipBasedAccessControlForFeatures){this.creatorField=this.editFieldsInfo.creatorField;}this.relationships=_127.relationships;this.allowGeometryUpdates=esri._isDefined(_127.allowGeometryUpdates)?_127.allowGeometryUpdates:true;this._isTable=(this.type==="Table");var _129=(this.fields=[]),_12a=_127.fields,i;for(i=0;i<_12a.length;i++){_129.push(new esri.layers.Field(_12a[i]));}if(!this.objectIdField){this.objectIdField=_127.objectIdField;if(!this.objectIdField){_12a=_127.fields;for(i=0;i<_12a.length;i++){var _12b=_12a[i];if(_12b.type==="esriFieldTypeOID"){this.objectIdField=_12b.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 _12c=this.objectIdField,_12d=-1;if(this._collection&&_12c){var fset=this._featureSet,_12e=fset&&fset.features,il=_12e?_12e.length:0,oid,attr;for(i=0;i<il;i++){attr=_12e[i].attributes;oid=attr&&attr[_12c];if(oid>_12d){_12d=oid;}}}this._nextId=(_12d+1);}this.globalIdField=_127.globalIdField;this.typeIdField=_127.typeIdField;this.visibilityField=_127.visibilityField;var _12f=_127.defaultSymbol;if(_12f){this.defaultSymbol=esri.symbol.fromJson(_12f);}var _130=this.types=[],_131=_127.types,_132,_133,_134,_135=this.editFieldsInfo,_136=_135&&_135.creatorField,_137=_135&&_135.editorField,fix=(_136||_137),_138=[];if(_131){for(i=0;i<_131.length;i++){_132=new esri.layers.FeatureType(_131[i]);_133=_132.templates;if(fix&&_133&&_133.length){_138=_138.concat(_133);}_130.push(_132);}}var _139=_127.templates,_13a,_13b=this.templates=[];if(_139){for(i=0;i<_139.length;i++){_13a=new esri.layers.FeatureTemplate(_139[i]);if(fix){_138.push(_13a);}_13b.push(_13a);}}for(i=0;i<_138.length;i++){_134=_4.getObject("prototype.attributes",false,_138[i]);if(_134){if(_136){delete _134[_136];}if(_137){delete _134[_137];}}}var _13c=_127.timeInfo;if(_13c){this.timeInfo=new esri.layers.TimeInfo(_13c);this._startTimeField=_13c.startTimeField;this._endTimeField=_13c.endTimeField;if(this._startTimeField&&this._endTimeField){this._twoTimeFields=true;}if(this._trackIdField){_13c.trackIdField=this._trackIdField;}else{this._trackIdField=_13c.trackIdField;}}this.hasAttachments=(!this._collection&&_127.hasAttachments)?true:false;this.htmlPopupType=_127.htmlPopupType;var _13d=_127.drawingInfo,_13e;if(!this.renderer){if(_13d&&_13d.renderer){_13e=_13d.renderer;this.setRenderer(esri.renderer.fromJson(_13e));if(_13e.type==="classBreaks"){this.renderer._setMaxInclusiveness(true);}if(!this._collection){var _13f=_13e.type,_140=[];_13e=this.renderer;switch(_13f){case "simple":_140.push(_13e.symbol);break;case "uniqueValue":case "classBreaks":_140.push(_13e.defaultSymbol);_140=_140.concat(_4.map(_13e.infos,function(info){return info.symbol;}));break;}_140=_4.filter(_140,esri._isDefined);var _141=this._url.path+"/images/",_142=this._getToken();_4.forEach(_140,function(sym){var url=sym.url;if(url){if((url.search(/https?\:/)===-1)&&(url.indexOf("data:")===-1)){sym.url=_141+url;}if(_142&&sym.url.search(/https?\:/)!==-1){sym.url+=("?token="+_142);}}});}}else{if(_12f){_131=this.types;if(_131.length>0){_13e=new esri.renderer.UniqueValueRenderer(this.defaultSymbol,this.typeIdField);_4.forEach(_131,function(type){_13e.addValue(type.id,type.symbol);});}else{_13e=new esri.renderer.SimpleRenderer(this.defaultSymbol);}this.setRenderer(_13e);}else{if(!this._isTable){var _143;switch(this.geometryType){case "esriGeometryPoint":case "esriGeometryMultipoint":_143=new esri.symbol.SimpleMarkerSymbol();break;case "esriGeometryPolyline":_143=new esri.symbol.SimpleLineSymbol();break;case "esriGeometryPolygon":_143=new esri.symbol.SimpleFillSymbol();break;}this.setRenderer(_143?new esri.renderer.SimpleRenderer(_143):null);}}}}var _144=(_13d&&_13d.transparency)||0;if(!esri._isDefined(this.opacity)&&_144>0){this.opacity=1-(_144/100);}this.version=_127.currentVersion;if(!this.version){var ver;if("capabilities" in _127||"drawingInfo" in _127||"hasAttachments" in _127||"htmlPopupType" in _127||"relationships" in _127||"timeInfo" in _127||"typeIdField" in _127||"types" in _127){ver=10;}else{ver=9.3;}this.version=ver;}if((_4.isIE||_4.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 _145=this._featureSet;delete this._featureSet;this._mode._drawFeatures(new esri.tasks.FeatureSet(_145));this._fcAdded=true;}this.onLoad(this);var _146=this._loadCallback;if(_146){delete this._loadCallback;_146(this);}}},setRenderer:function(ren){this.inherited("setRenderer",arguments);var _147=this.renderer;if(_147){this._ager=(_147.declaredClass.indexOf("TemporalRenderer")!==-1&&_147.observationAger&&_147.observationRenderer);var _148=_4.filter([_147,_147.observationRenderer,_147.latestObservationRenderer,_147.trackRenderer],esri._isDefined);var _149=[];_4.forEach(_148,function(rnd){_149.push(rnd.attributeField);_149.push(rnd.attributeField2);_149.push(rnd.attributeField3);},this);this._rendererFields=_4.filter(_149,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,_14a){this._map=map;this._toggleTime(true);var div=this.inherited("_setMap",arguments);this.clearSelection();var _14b=this.renderer;if(this.timeInfo){if(this._trackIdField||(_14b&&(_14b.latestObservationRenderer||_14b.trackRenderer))){this._trackManager=new esri.layers._TrackManager(this);this._trackManager.initialize(map);}}this._zoomConnect=_4.connect(map,"onZoomEnd",this,this._zoomHandler);this._zoomHandler();var mode=this._mode;if(mode){mode.initialize(map);}return div;},_unsetMap:function(map,_14c){var mode=this._mode;if(mode){mode.destroy();this._mode=null;}if(this._trackManager){this._trackManager.destroy();this._trackManager=null;}_4.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(_14d){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=_14d;return this;}var _14e=this._editable;this._editable=_14d;this._updateCaps();if(_14e!==_14d){this.onCapabilitiesChange();}return this;},getEditCapabilities:function(_14f){var _150={"canCreate":false,"canUpdate":false,"canDelete":false};if(!this.loaded||!this._editable){return _150;}var _151=_14f&&_14f.feature,_152=_14f&&_14f.userId,caps=_4.map((this.capabilities?this.capabilities.toLowerCase().split(","):[]),_4.trim),_153=_4.indexOf(caps,"editing")>-1,_154=_153&&(_4.indexOf(caps,"create")>-1),_155=_153&&(_4.indexOf(caps,"update")>-1),_156=_153&&(_4.indexOf(caps,"delete")>-1),_157=this.ownershipBasedAccessControlForFeatures,_158=this.editFieldsInfo,_159=_158&&_158.creatorField,_15a=_158&&_158.realm,_15b=_151&&_151.attributes,_15c=(_15b&&_159)?_15b[_159]:undefined,_15d,_15e=!!this.userIsAdmin,_15f=!_157||_15e||!!(_157.allowOthersToUpdate||_157.allowUpdateToOthers),_160=!_157||_15e||!!(_157.allowOthersToDelete||_157.allowDeleteToOthers);if(_153&&(!(_154||_155||_156)||_15e)){_154=_155=_156=true;}_15d={"canCreate":_154,"canUpdate":_155,"canDelete":_156};if(_15c===null){_15d.canUpdate=_155&&_15f;_15d.canDelete=_156&&_160;}else{if(_15c===""){return _15d;}else{if(_15c){_152=_152||this.getUserId();if(_152&&_15a){_152=_152+"@"+_15a;}if(_152.toLowerCase()===_15c.toLowerCase()){return _15d;}else{_15d.canUpdate=_155&&_15f;_15d.canDelete=_156&&_160;}}}}return _15d;},getUserId:function(){var _161;if(this.loaded){_161=(this.credential&&this.credential.userId)||this.userId||"";}return _161;},setUserIsAdmin:function(_162){this.userIsAdmin=_162;},setEditSummaryCallback:function(_163){this.editSummaryCallback=_163;},getEditSummary:function(_164,_165,_166){_166=esri._isDefined(_166)?_166:(new Date()).getTime();var _167="",info=this.getEditInfo(_164,_165,_166),_168=(_165&&_165.callback)||this.editSummaryCallback;if(_168){info=_168(_164,info)||"";}if(_4.isString(info)){_167=info;}else{if(info){var _169=info.action,_16a=info.userId,_16b=info.timeValue,_16c=0;if(_169){_16c++;}if(_16a){_16c++;}if(esri._isDefined(_16b)){_16c++;}if(_16c>1){_167=(_169==="edit"?"edit":"create")+(_16a?"User":"")+(esri._isDefined(_16b)?info.displayPattern:"");}}_167=_167&&esri.substitute(info,esri.bundle.layers.FeatureLayer[_167]);}return _167;},getEditInfo:function(_16d,_16e,_16f){if(!this.loaded){return;}_16f=esri._isDefined(_16f)?_16f:(new Date()).getTime();var _170=(_16e&&_16e.action)||"last",_171=this.editFieldsInfo,_172=_171&&_171.creatorField,_173=_171&&_171.creationDateField,_174=_171&&_171.editorField,_175=_171&&_171.editDateField,_176=_171&&_171.realm,_177=_16d&&_16d.attributes,_178=(_177&&_172)?_177[_172]:undefined,_179=(_177&&_173)?_177[_173]:null,_17a=(_177&&_174)?_177[_174]:undefined,_17b=(_177&&_175)?_177[_175]:null,_17c=this._getEditData(_178,_179,_16f),_17d=this._getEditData(_17a,_17b,_16f),_17e;switch(_170){case "creation":_17e=_17c;break;case "edit":_17e=_17d;break;case "last":_17e=_17d||_17c;break;}if(_17e){_17e.action=(_17e===_17d)?"edit":"creation";}return _17e;},_getEditData:function(_17f,_180,_181){var data,_182,_183,_184=60000,_185=3600000,_186=2*_185,_187=24*_185,_188=7*_187;if(esri._isDefined(_180)){_182=_181-_180;if(_182<0){_183="Full";}else{if(_182<_184){_183="Seconds";}else{if(_182<(2*_184)){_183="Minute";}else{if(_182<_185){_183="Minutes";}else{if(_182<_186){_183="Hour";}else{if(_182<_187){_183="Hours";}else{if(_182<_188){_183="WeekDay";}else{_183="Full";}}}}}}}}if((_17f!==undefined)||_183){data=data||{};data.userId=_17f;if(_183){var _189=_4.date.locale.format,_18a=new Date(_180);data.minutes=Math.floor(_182/_184);data.hours=Math.floor(_182/_185);data.weekDay=_189(_18a,{datePattern:"EEEE",selector:"date"});data.formattedDate=_189(_18a,{selector:"date"});data.formattedTime=_189(_18a,{selector:"time"});data.displayPattern=_183;data.timeValue=_180;}}return data;},isEditable:function(){return this._editable;},setMaxAllowableOffset:function(_18b){if(!this._editable){this._maxOffset=_18b;}return this;},getMaxAllowableOffset:function(){return this._maxOffset;},setAutoGeneralize:function(_18c){if(!this.loaded){this._optAutoGen=_18c;}else{if(!this._editable&&(this.mode!==this.constructor.MODE_SNAPSHOT)&&((this.geometryType==="esriGeometryPolyline")||(this.geometryType==="esriGeometryPolygon"))){this._autoGeneralize=_18c;if(_18c){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(_18d,_18e){this.minScale=_18d||0;this.maxScale=_18e||0;if(this._map&&this._map.loaded){this._updateStatus();}},setGDBVersion:function(_18f){if(!this._collection&&(_18f!==this.gdbVersion)&&(_18f||this.gdbVersion)){this.gdbVersion=_18f;this._task.gdbVersion=_18f;this._url.query=_4.mixin(this._url.query,{gdbVersion:_18f});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(_190){if(this._isSnapshot){this._timeDefn=_190;var mode=this._mode;if(mode){mode.propertyChangeHandler(2);}}return this;},getTimeDefinition:function(){return this._timeDefn;},setTimeOffset:function(_191,_192){this._timeOffset=_191;this._timeOffsetUnits=_192;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(_193,_194,_195,_196){_194=_194||this.constructor.SELECTION_NEW;var _197=this._getShallowClone(_193),map=this._map,_198,dfd=esri._fixDfd(new _4.Deferred(esri._dfdCanceller));_197.outFields=this._getOutFields();_197.returnGeometry=true;if(map){_197.outSpatialReference=new esri.SpatialReference(map.spatialReference.toJson());}if(!this._applyQueryFilters(_197)){_198={features:[]};this._selectHandler(_198,_194,_195,_196,dfd);return dfd;}var _199=this._canDoClientSideQuery(_197);if(_199){_198={features:this._doQuery(_197,_199)};this._selectHandler(_198,_194,_195,_196,dfd);return dfd;}else{if(this._collection){var err=new Error("FeatureLayer::selectFeatures - "+esri.bundle.layers.FeatureLayer.invalidParams);this._resolve([err],null,_196,dfd,true);return dfd;}var self=this;if(this._ts){_197._ts=(new Date()).getTime();}var temp=dfd._pendingDfd=this._task.execute(_197);temp.addCallbacks(function(_19a){self._selectHandler(_19a,_194,_195,_196,dfd);},function(err){self._resolve([err],null,_196,dfd,true);});return dfd;}},getSelectedFeatures:function(){var _19b=this._selectedFeatures,_19c=[],item;for(item in _19b){if(_19b.hasOwnProperty(item)){_19c.push(_19b[item]);}}return _19c;},clearSelection:function(_19d){var _19e=this._selectedFeatures,mode=this._mode,item;for(item in _19e){if(_19e.hasOwnProperty(item)){this._unSelectFeatureIIf(item,mode);mode._removeFeatureIIf(item);}}this._selectedFeatures={};if(this._isSelOnly){mode._applyTimeFilter(true);}if(!_19d){this.onSelectionClear();}return this;},setSelectionSymbol:function(_19f){this._selectionSymbol=_19f;if(_19f){var _1a0=this._selectedFeatures,item;for(item in _1a0){if(_1a0.hasOwnProperty(item)){_1a0[item].setSymbol(_19f);}}}return this;},getSelectionSymbol:function(){return this._selectionSymbol;},__msigns:[{n:"applyEdits",c:5,a:[{i:0},{i:1}],e:4,f:1}],applyEdits:function(adds,_1a1,_1a2,_1a3,_1a4,_1a5){var _1a6=_1a5.assembly,dfd=_1a5.dfd;this._applyNormalized(adds,_1a6&&_1a6[0]);this._applyNormalized(_1a1,_1a6&&_1a6[1]);this.onBeforeApplyEdits(adds,_1a1,_1a2);var i,_1a7={},_1a8=this.objectIdField,_1a9={f:"json"},_1aa=false;if(this._collection){var _1ab={};_1ab.addResults=adds?_4.map(adds,function(){_1aa=true;return {objectId:this._nextId++,success:true};},this):null;_1ab.updateResults=_1a1?_4.map(_1a1,function(_1ac){_1aa=true;var oid=_1ac.attributes[_1a8];_1a7[oid]=_1ac;return {objectId:oid,success:true};},this):null;_1ab.deleteResults=_1a2?_4.map(_1a2,function(_1ad){_1aa=true;return {objectId:_1ad.attributes[_1a8],success:true};},this):null;if(_1aa){this._editHandler(_1ab,adds,_1a7,_1a3,_1a4,dfd);}return;}if(adds&&adds.length>0){_1a9.adds=this._convertFeaturesToJson(adds,0,1);_1aa=true;}if(_1a1&&_1a1.length>0){for(i=0;i<_1a1.length;i++){var _1ae=_1a1[i];_1a7[_1ae.attributes[_1a8]]=_1ae;}_1a9.updates=this._convertFeaturesToJson(_1a1,0,0,1);_1aa=true;}if(_1a2&&_1a2.length>0){var ids=[];for(i=0;i<_1a2.length;i++){ids.push(_1a2[i].attributes[_1a8]);}_1a9.deletes=ids.join(",");_1aa=true;}if(_1aa){var self=this;return esri.request({url:this._url.path+"/applyEdits",content:_4.mixin(_1a9,this._url.query),callbackParamName:"callback",load:function(_1af){self._editHandler(_1af,adds,_1a7,_1a3,_1a4,dfd);},error:function(err){self._resolve([err],null,_1a4,dfd,true);}},{usePost:true});}},queryFeatures:function(_1b0,_1b1,_1b2){return this._query("execute","onQueryFeaturesComplete",_1b0,_1b1,_1b2);},queryRelatedFeatures:function(_1b3,_1b4,_1b5){return this._query("executeRelationshipQuery","onQueryRelatedFeaturesComplete",_1b3,_1b4,_1b5);},queryIds:function(_1b6,_1b7,_1b8){return this._query("executeForIds","onQueryIdsComplete",_1b6,_1b7,_1b8);},queryCount:function(_1b9,_1ba,_1bb){return this._query("executeForCount","onQueryCountComplete",_1b9,_1ba,_1bb);},queryAttachmentInfos:function(_1bc,_1bd,_1be){var url=this._url.path+"/"+_1bc+"/attachments",dfd=new _4.Deferred(esri._dfdCanceller),self=this;dfd._pendingDfd=esri.request({url:url,content:_4.mixin({f:"json"},this._url.query),callbackParamName:"callback",load:function(_1bf){var _1c0=_1bf.attachmentInfos,_1c1;_4.forEach(_1c0,function(info){_1c1=_4.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+(_1c1?("?"+_1c1):"");info.objectId=_1bc;});self._resolve([_1c0],"onQueryAttachmentInfosComplete",_1bd,dfd);},error:function(err){self._resolve([err],null,_1be,dfd,true);}});return dfd;},addAttachment:function(_1c2,_1c3,_1c4,_1c5){return this._sendAttachment("add",_1c2,_1c3,_1c4,_1c5);},updateAttachment:function(_1c6,_1c7,_1c8,_1c9,_1ca){_1c8.appendChild(_4.create("input",{type:"hidden",name:"attachmentId",value:_1c7}));return this._sendAttachment("update",_1c6,_1c8,_1c9,_1ca);},deleteAttachments:function(_1cb,_1cc,_1cd,_1ce){var url=this._url.path+"/"+_1cb+"/deleteAttachments",dfd=new _4.Deferred(esri._dfdCanceller),self=this,_1cf={f:"json",attachmentIds:_1cc.join(",")};dfd._pendingDfd=esri.request({url:url,content:_4.mixin(_1cf,this._url.query),callbackParamName:"callback",load:_4.hitch(this,function(_1d0){var _1d1=_1d0.deleteAttachmentResults;_1d1=_4.map(_1d1,function(_1d2){var res=new esri.layers.FeatureEditResult(_1d2);res.attachmentId=res.objectId;res.objectId=_1cb;return res;});self._resolve([_1d1],"onDeleteAttachmentsComplete",_1cd,dfd);}),error:function(err){self._resolve([err],null,_1ce,dfd,true);}},{usePost:true});return dfd;},addType:function(_1d3){if(!this._collection){return false;}var _1d4=this.types;if(_1d4){var _1d5=_4.some(_1d4,function(type){if(type.id==_1d3.id){return true;}return false;});if(_1d5){return false;}else{_1d4.push(_1d3);}}else{this.types=[_1d3];}this._typesDirty=true;return true;},deleteType:function(_1d6){if(!this._collection){return;}var _1d7=this.types;if(_1d7){var _1d8=-1;_4.some(_1d7,function(type,_1d9){if(type.id==_1d6){_1d8=_1d9;return true;}return false;});if(_1d8>-1){this._typesDirty=true;return _1d7.splice(_1d8,1)[0];}}},toJson:function(){var _1da=this._json,json=_4.isString(_1da)?_4.fromJson(_1da):_4.clone(_1da);if(!json){return;}json=json.layerDefinition?json:{layerDefinition:json};var _1db=json.layerDefinition,_1dc=this._collection;if(_1dc&&this._typesDirty){_1db.types=_4.map(this.types||[],function(type){return type.toJson();});var _1dd=this.renderer,_1de=_1db.drawingInfo;if(_1de&&_1dd&&_1dd.declaredClass.indexOf("TemporalRenderer")===-1){_1de.renderer=_1dd.toJson();}}var _1df=null;if(!(_1dc&&!this._fcAdded)){_1df={geometryType:_1db.geometryType,features:this._convertFeaturesToJson(this.graphics,true)};}json.featureSet=_4.mixin({},json.featureSet||{},_1df);if(_1dc){json.nextObjectId=this._nextId;_1db.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 _1e0=this._editable,_1e1=_4.trim(this.capabilities||""),_1e2=_4.map((_1e1?_1e1.split(","):[]),_4.trim),caps=_4.map((_1e1?_1e1.toLowerCase().split(","):[]),_4.trim),_1e3=_4.indexOf(caps,"editing"),cap,i,_1e4,_1e5={"Create":_4.indexOf(caps,"create"),"Update":_4.indexOf(caps,"update"),"Delete":_4.indexOf(caps,"delete")};if(_1e0&&_1e3===-1){_1e2.push("Editing");}else{if(!_1e0&&_1e3>-1){_1e4=[_1e3];for(cap in _1e5){if(_1e5[cap]>-1){_1e4.push(_1e5[cap]);}}_1e4.sort();for(i=_1e4.length-1;i>=0;i--){_1e2.splice(_1e4[i],1);}}}this.capabilities=_1e2.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 _1e6=esri.geometry.getScale(this._map);var _1e7=this.minScale,_1e8=this.maxScale,_1e9=!_1e7,_1ea=!_1e8;if(!_1e9&&_1e6<=_1e7){_1e9=true;}if(!_1ea&&_1e6>=_1e8){_1ea=true;}return (_1e9&&_1ea)?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(_1eb){var map=this._map;if(_1eb&&this.timeInfo&&this.useMapTime&&map){this._mapTimeExtent=map.timeExtent;if(!this._timeConnect){this._timeConnect=_4.connect(map,"onTimeExtentChange",this,this._timeChangeHandler);}}else{this._mapTimeExtent=null;_4.disconnect(this._timeConnect);this._timeConnect=null;}},_timeChangeHandler:function(_1ec){this._mapTimeExtent=_1ec;var mode=this._mode;if(mode){mode.propertyChangeHandler(0);}},_getOffsettedTE:function(_1ed){var _1ee=this._timeOffset,_1ef=this._timeOffsetUnits;return (_1ed&&_1ee&&_1ef)?_1ed.offset(-1*_1ee,_1ef):_1ed;},_getTimeOverlap:function(_1f0,_1f1){if(_1f0&&_1f1){return _1f0.intersection(_1f1);}else{return _1f0||_1f1;}},_getTimeFilter:function(_1f2){var _1f3=this.getTimeDefinition(),_1f4=null,_1f5;if(_1f3||_1f4){_1f5=this._getTimeOverlap(_1f3,_1f4);if(!_1f5){return [false];}}if(_1f2){_1f2=_1f5?this._getTimeOverlap(_1f2,_1f5):_1f2;if(!_1f2){return [false];}}else{_1f2=_1f5;}return [true,_1f2];},_getAttributeFilter:function(_1f6){var _1f7=this.getDefinitionExpression();if(_1f6){_1f6=_1f7?"("+_1f7+") AND ("+_1f6+")":_1f6;}else{_1f6=_1f7;}return _1f6;},_applyQueryFilters:function(_1f8){_1f8.where=this._getAttributeFilter(_1f8.where);_1f8.maxAllowableOffset=this._maxOffset;if(this.timeInfo){var _1f9=this._getTimeFilter(_1f8.timeExtent);if(!_1f9[0]){return false;}else{_1f8.timeExtent=_1f9[1];}}return true;},_add:function(_1fa){var _1fb=this._selectionSymbol,attr=_1fa.attributes,_1fc=this.visibilityField;if(_1fb&&this._isSelOnly){_1fa.setSymbol(_1fb);}if(_1fc&&attr&&attr.hasOwnProperty(_1fc)){_1fa[attr[_1fc]?"show":"hide"]();}return this.add.apply(this,arguments);},_remove:function(){return this.remove.apply(this,arguments);},_canDoClientSideQuery:function(_1fd){var _1fe=[],map=this._map;if(this._isTable||!map){return;}if(_1fd.text||(_1fd.where&&_1fd.where!==this.getDefinitionExpression())){return;}var _1ff=this._isSnapshot,_200=this._isSelOnly;var _201=_1fd.geometry;if(_201){if(!_200&&_1fd.spatialRelationship===esri.tasks.Query.SPATIAL_REL_INTERSECTS&&(_201.type==="extent"&&(_1ff||map.extent.contains(_201)))){_1fe.push(1);}else{return;}}var ids=_1fd.objectIds;if(ids){if(_1ff){_1fe.push(2);}else{var len=ids.length,mode=this._mode,_202=0,i;for(i=0;i<len;i++){if(mode._getFeature(ids[i])){_202++;}}if(_202===len){_1fe.push(2);}else{return;}}}if(this.timeInfo){var _203=_1fd.timeExtent,_204=this._mapTimeExtent;if(_1ff){if(_203){_1fe.push(3);}}else{if(_200){if(_203){return;}}else{if(_204){if(_4.indexOf(_1fe,2)!==-1){if(_203){_1fe.push(3);}}else{return;}}else{if(_1fe.length>0){if(_203){_1fe.push(3);}}else{if(_203){return;}}}}}}return _1fe.length>0?_1fe:null;},_doQuery:function(_205,_206,_207){var _208=[],mode=this._mode,_209=this.objectIdField,i,len,_20a;if(_4.indexOf(_206,2)!==-1){_208=[];var ids=_205.objectIds;len=ids.length;for(i=0;i<len;i++){var obj=mode._getFeature(ids[i]);if(obj){_208.push(obj);}}if(_208.length===0){return [];}}if(_4.indexOf(_206,1)!==-1){_20a=_208.length>0?_208:this.graphics;len=_20a.length;var _20b=_205.geometry._normalize(null,true);_208=[];for(i=0;i<len;i++){var _20c=_20a[i],_20d=_20c.geometry;if(_20d){if(this.normalization&&_20b.length){if(_20b[0].intersects(_20d)||_20b[1].intersects(_20d)){_208.push(_20c);}}else{if(_20b.intersects(_20d)){_208.push(_20c);}}}}if(_208.length===0){return [];}}if(_4.indexOf(_206,3)!==-1){if(this.timeInfo){_20a=_208.length>0?_208:this.graphics;var time=_205.timeExtent,_20e=this._filterByTime(_20a,time.startTime,time.endTime);_208=_20e.match;}}if(_207){return _4.map(_208,function(obj){return obj.attributes[_209];},this);}else{return _208;}},_filterByTime:function(_20f,_210,_211){var _212=this._startTimeField,_213=this._endTimeField,_214;if(!this._twoTimeFields){_214=_212||_213;}var _215=esri._isDefined,yea=[],nay=[],i,len=_20f.length,_216,_217;_210=_210?_210.getTime():-Infinity;_211=_211?_211.getTime():Infinity;if(_214){for(i=0;i<len;i++){_216=_20f[i];_217=_216.attributes;var time=_217[_214];if(time>=_210&&time<=_211){yea.push(_216);}else{nay.push(_216);}}}else{for(i=0;i<len;i++){_216=_20f[i];_217=_216.attributes;var _218=_217[_212],end=_217[_213];_218=_215(_218)?_218:-Infinity;end=_215(end)?end:Infinity;if((_218>=_210&&_218<=_211)||(end>=_210&&end<=_211)||(_210>=_218&&_211<=end)){yea.push(_216);}else{nay.push(_216);}}}return {match:yea,noMatch:nay};},_resolve:function(args,_219,_21a,dfd,_21b){if(_219){this[_219].apply(this,args);}if(_21a){_21a.apply(null,args);}if(dfd){esri._resDfd(dfd,args,_21b);}},_getShallowClone:function(_21c){var _21d=new esri.tasks.Query(),prop;for(prop in _21c){if(_21c.hasOwnProperty(prop)){_21d[prop]=_21c[prop];}}return _21d;},_query:function(type,_21e,_21f,_220,_221){var that=this,dfd=new _4.Deferred(esri._dfdCanceller);var _222=function(_223,_224){if(!_224&&type==="execute"&&!that._isTable){var _225=_223.features,mode=that._mode,_226=that.objectIdField,il=_225.length,i;for(i=il-1;i>=0;i--){var oid=_225[i].attributes[_226];var _227=mode._getFeature(oid);if(_227){_225.splice(i,1,_227);}}}that._resolve([_223],_21e,_220,dfd);};if(type!=="executeRelationshipQuery"){_21f=this._getShallowClone(_21f);_21f.outFields=this._getOutFields();_21f.returnGeometry=true;var map=this._map,_228;if(map){_21f.outSpatialReference=new esri.SpatialReference(map.spatialReference.toJson());}if(!this._applyQueryFilters(_21f)){switch(type){case "execute":_228=new esri.tasks.FeatureSet({features:[]});break;case "executeForIds":_228=[];break;case "executeForCount":_228=0;break;}_222(_228,true);return dfd;}var _229=this._canDoClientSideQuery(_21f);if(_229){var _22a=this._doQuery(_21f,_229,(type==="executeForIds"||type==="executeForCount"));switch(type){case "execute":_228=new esri.tasks.FeatureSet();_228.features=_22a;break;case "executeForIds":_228=_22a;break;case "executeForCount":_228=_22a.length;break;}_222(_228,true);return dfd;}}if(this._collection){var err=new Error("FeatureLayer::_query - "+esri.bundle.layers.FeatureLayer.invalidParams);this._resolve([err],null,_221,dfd,true);return dfd;}if(this._ts){_21f._ts=(new Date()).getTime();}var temp=dfd._pendingDfd=this._task[type](_21f);temp.addCallbacks(_222,function(err){that._resolve([err],null,_221,dfd,true);});return dfd;},_convertFeaturesToJson:function(_22b,_22c,_22d,_22e){var json=[],_22f=this._selectionSymbol,_230=this.visibilityField,i,_231,_232=this.objectIdField;if(_22d||_22e){_231=_4.filter(this.fields,function(_233){return (_233.editable===false)&&(!_22e||(_233.name!==_232));});}for(i=0;i<_22b.length;i++){var _234=_22b[i],_235={},_236=_234.geometry,attr=_234.attributes,_237=_234.symbol;if(_236&&(!_22e||this.allowGeometryUpdates)){_235.geometry=_236.toJson();}if(_230){_235.attributes=attr=_4.mixin({},attr);attr[_230]=_234.visible?1:0;}else{if(attr){_235.attributes=_4.mixin({},attr);}}if(_235.attributes&&_231&&_231.length){_4.forEach(_231,function(_238){delete _235.attributes[_238.name];});}if(_237&&(_237!==_22f)){_235.symbol=_237.toJson();}json.push(_235);}return _22c?json:_4.toJson(json);},_selectHandler:function(_239,_23a,_23b,_23c,dfd){var _23d,ctor=this.constructor;switch(_23a){case ctor.SELECTION_NEW:this.clearSelection(true);_23d=true;break;case ctor.SELECTION_ADD:_23d=true;break;case ctor.SELECTION_SUBTRACT:_23d=false;break;}var i,_23e=_239.features,mode=this._mode,_23f=[],_240=this.objectIdField,_241,oid;if(_23d){for(i=0;i<_23e.length;i++){_241=_23e[i];oid=_241.attributes[_240];var _242=mode._addFeatureIIf(oid,_241);_23f.push(_242);this._selectFeatureIIf(oid,_242,mode);}}else{for(i=0;i<_23e.length;i++){_241=_23e[i];oid=_241.attributes[_240];this._unSelectFeatureIIf(oid,mode);var _243=mode._removeFeatureIIf(oid);_23f.push(_243||_241);}}if(this._isSelOnly){mode._applyTimeFilter(true);}this._resolve([_23f,_23a,_239.exceededTransferLimit?{queryLimitExceeded:true}:null],"onSelectionComplete",_23b,dfd);if(_239.exceededTransferLimit){this.onQueryLimitExceeded();}},_selectFeatureIIf:function(oid,_244,mode){var _245=this._selectedFeatures,_246=_245[oid];if(!_246){mode._incRefCount(oid);_245[oid]=_244;if(!this._isTable){this._setSelectSymbol(_244);}}return _246||_244;},_unSelectFeatureIIf:function(oid,mode){var _247=this._selectedFeatures[oid];if(_247){mode._decRefCount(oid);delete this._selectedFeatures[oid];if(!this._isTable){this._setUnSelectSymbol(_247);}}return _247;},_isSelected:function(_248){},_setSelectSymbol:function(_249){var _24a=this._selectionSymbol;if(_24a&&!this._isSelOnly){_249.setSymbol(_24a);}},_setUnSelectSymbol:function(_24b){var _24c=this._selectionSymbol;if(_24c&&!this._isSelOnly){if(_24c===_24b.symbol){_24b.setSymbol(null,true);}}},_getOutFields:function(){var _24d=_4.filter([this.objectIdField,this.typeIdField,this.creatorField,this._startTimeField,this._endTimeField,this._trackIdField].concat(this._rendererFields),function(_24e,_24f,arr){return !!_24e&&(_4.indexOf(arr,_24e)===_24f);});var _250=_4.clone(this._outFields);if(_250){if(_4.indexOf(_250,"*")!==-1){return _250;}_4.forEach(_24d,function(_251){if(_4.indexOf(_250,_251)===-1){_250.push(_251);}});return _250;}else{return _24d;}},_checkFields:function(_252){var _253=_252||this._getOutFields();_4.forEach(_253,function(_254){if(_254==="*"){return;}if(!this._getField(_254)){console.debug("esri.layers.FeatureLayer: "+esri.substitute({url:this.url,field:_254},esri.bundle.layers.FeatureLayer.fieldNotFound));}},this);if(!_252&&!this._isTable&&!this._fserver&&!this._collection){var _255=_4.some(this.fields,function(_256){return (_256&&_256.type==="esriFieldTypeGeometry")?true:false;});if(!_255){console.debug("esri.layers.FeatureLayer: "+esri.substitute({url:this.url},esri.bundle.layers.FeatureLayer.noGeometryField));}}},_fixRendererFields:function(){var _257=this.renderer;if(_257&&this.fields.length>0){var _258=_4.filter([_257,_257.observationRenderer,_257.latestObservationRenderer,_257.trackRenderer],esri._isDefined);var _259=[];_4.forEach(_258,function(rnd){var _25a,_25b;_25b=rnd.attributeField;if(_25b){_25a=!this._getField(_25b)&&this._getField(_25b,true);if(_25a){rnd.attributeField=_25a.name;}}_25b=rnd.attributeField2;if(_25b){_25a=!this._getField(_25b)&&this._getField(_25b,true);if(_25a){rnd.attributeField2=_25a.name;}}_25b=rnd.attributeField3;if(_25b){_25a=!this._getField(_25b)&&this._getField(_25b,true);if(_25a){rnd.attributeField3=_25a.name;}}_259.push(rnd.attributeField);_259.push(rnd.attributeField2);_259.push(rnd.attributeField3);},this);this._rendererFields=_4.filter(_259,esri._isDefined);}},_getField:function(_25c,_25d){var _25e=this.fields;if(_25e.length===0){return null;}var _25f;if(_25d){_25c=_25c.toLowerCase();}_4.some(_25e,function(_260){var _261=false;if(_25d){_261=(_260&&_260.name.toLowerCase()===_25c)?true:false;}else{_261=(_260&&_260.name===_25c)?true:false;}if(_261){_25f=_260;}return _261;});return _25f;},_getDateOpts:function(){if(!this._dtOpts){var _262=_4.map(_4.filter(this.fields,function(_263){return !!(_263&&_263.type==="esriFieldTypeDate");}),function(_264){return _264.name;});this._dtOpts={properties:_262};}return this._dtOpts;},_applyNormalized:function(_265,_266){if(_265&&_266){_4.forEach(_265,function(_267,_268){if(_267&&_266[_268]){_267.setGeometry(_266[_268]);}});}},_editHandler:function(_269,adds,_26a,_26b,_26c,dfd){var _26d=_269.addResults,_26e=_269.updateResults,_26f=_269.deleteResults,i,_270,oid,_271,attr,_272=this.objectIdField,mode=this._mode,_273=this._isTable;var _274=this.editFieldsInfo,_275=this._getOutFields()||[],_276=_274&&_274.creatorField,_277=_274&&_274.creationDateField,_278=_274&&_274.editorField,_279=_274&&_274.editDateField,_27a=_274&&_274.realm;if(_4.indexOf(_275,"*")===-1){if(_276&&_4.indexOf(_275,_276)===-1){_276=null;}if(_277&&_4.indexOf(_275,_277)===-1){_277=null;}if(_278&&_4.indexOf(_275,_278)===-1){_278=null;}if(_279&&_4.indexOf(_275,_279)===-1){_279=null;}}var _27b=(_277||_279)?(new Date()).getTime():null,_27c=(_276||_278)?this.getUserId():undefined;if(_27c&&_27a){_27c=_27c+"@"+_27a;}if(_26d){for(i=0;i<_26d.length;i++){_26d[i]=new esri.layers.FeatureEditResult(_26d[i]);if(_273){continue;}_270=_26d[i];if(_270.success){oid=_270.objectId;_271=adds[i];var gl=_271._graphicsLayer;if(gl&&gl!==this){gl.remove(_271);}attr=_271.attributes||{};attr[_272]=oid;if(_276){attr[_276]=_27c;}if(_278){attr[_278]=_27c;}if(_277){attr[_277]=_27b;}if(_279){attr[_279]=_27b;}_271.setAttributes(attr);mode.drawFeature(_271);}}}if(_26e){for(i=0;i<_26e.length;i++){_26e[i]=new esri.layers.FeatureEditResult(_26e[i]);if(_273){continue;}_270=_26e[i];if(_270.success){oid=_270.objectId;_271=_26a[oid];var _27d=mode._getFeature(oid);if(_27d){if(_27d.geometry!==_271.geometry){_27d.setGeometry(esri.geometry.fromJson(_271.geometry.toJson()));}this._repaint(_27d,oid);}_271=_27d||_271;attr=_271.attributes||{};if(_278){attr[_278]=_27c;}if(_279){attr[_279]=_27b;}_271.setAttributes(attr);}}}if(_26f){var _27e=[];for(i=0;i<_26f.length;i++){_26f[i]=new esri.layers.FeatureEditResult(_26f[i]);if(_273){continue;}_270=_26f[i];if(_270.success){oid=_270.objectId;_271=mode._getFeature(oid);if(_271){if(this._unSelectFeatureIIf(oid,mode)){_27e.push(_271);}_271._count=0;mode._removeFeatureIIf(oid);}}}if(_27e.length>0){this.onSelectionComplete(_27e,this.constructor.SELECTION_SUBTRACT);}}this._resolve([_26d,_26e,_26f],"onEditsComplete",_26b,dfd);},_sendAttachment:function(type,_27f,_280,_281,_282){var _283=(type==="add")?"addAttachment":"updateAttachment",url=this._url.path+"/"+_27f+"/"+_283,self=this;var dfd=esri.request({url:url,form:_280,content:_4.mixin(this._url.query,{f:"json",token:this._getToken()||undefined}),callbackParamName:"callback.html",handleAs:"json"}).addCallback(function(_284){var _285=(type==="add")?"addAttachmentResult":"updateAttachmentResult",_286=(type==="add")?"onAddAttachmentComplete":"onUpdateAttachmentComplete",_287=new esri.layers.FeatureEditResult(_284[_285]);_287.attachmentId=_287.objectId;_287.objectId=_27f;self._resolve([_287],_286,_281);return _287;}).addErrback(function(_288){self._resolve([_288],null,_282,null,true);});return dfd;},_repaint:function(_289,oid,_28a){oid=esri._isDefined(oid)?oid:_289.attributes[this.objectIdField];if(!(oid in this._selectedFeatures)||!this._selectionSymbol){_289.setSymbol(_289.symbol,_28a);}},_getKind:function(_28b){var _28c=this._trackManager;if(_28c){return _28c.isLatestObservation(_28b)?1:0;}return 0;}});_4.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");_4.declare("esri.layers.FeatureType",null,{constructor:function(json){if(json&&_4.isObject(json)){this.id=json.id;this.name=json.name;var _28d=json.symbol;if(_28d){this.symbol=esri.symbol.fromJson(_28d);}var _28e=json.domains,_28f,i;var _290=this.domains={};for(_28f in _28e){if(_28e.hasOwnProperty(_28f)){var _291=_28e[_28f];switch(_291.type){case "range":_290[_28f]=new esri.layers.RangeDomain(_291);break;case "codedValue":_290[_28f]=new esri.layers.CodedValueDomain(_291);break;case "inherited":_290[_28f]=new esri.layers.InheritedDomain(_291);break;}}}var _292=json.templates;if(_292){var _293=this.templates=[];for(i=0;i<_292.length;i++){_293.push(new esri.layers.FeatureTemplate(_292[i]));}}}},toJson:function(){var json={id:this.id,name:this.name,symbol:this.symbol&&this.symbol.toJson()};var _294,_295=this.domains,_296=this.templates,_297=esri._sanitize;if(_295){var _298=json.domains={};for(_294 in _295){if(_295.hasOwnProperty(_294)){_298[_294]=_295[_294]&&_295[_294].toJson();}}_297(_298);}if(_296){json.templates=_4.map(_296,function(_299){return _299.toJson();});}return _297(json);}});_4.declare("esri.layers.FeatureTemplate",null,{constructor:function(json){if(json&&_4.isObject(json)){this.name=json.name;this.description=json.description;this.drawingTool=json.drawingTool;var _29a=json.prototype;this.prototype=new esri.Graphic(_29a.geometry,null,_29a.attributes);}},toJson:function(){return esri._sanitize({name:this.name,description:this.description,drawingTool:this.drawingTool,prototype:this.prototype&&this.prototype.toJson()});}});_4.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"});_4.declare("esri.layers.FeatureEditResult",null,{constructor:function(json){if(json&&_4.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;}}}});_4.declare("esri.layers._RenderMode",null,{constructor:function(){this._prefix="jsonp_"+(_4._scopeName||"dojo")+"IoScript";},initialize:function(map){},propertyChangeHandler:function(type){},destroy:function(){},drawFeature:function(_29b){},suspend:function(){},resume:function(){},refresh:function(){},_incRefCount:function(oid){var _29c=this._featureMap[oid];if(_29c){_29c._count++;}},_decRefCount:function(oid){var _29d=this._featureMap[oid];if(_29d){_29d._count--;}},_getFeature:function(oid){return this._featureMap[oid];},_addFeatureIIf:function(oid,_29e){var fmap=this._featureMap,_29f=fmap[oid],_2a0=this.featureLayer;if(!_29f){fmap[oid]=_29e;_2a0._add(_29e);_29e._count=0;}return _29f||_29e;},_removeFeatureIIf:function(oid){var _2a1=this._featureMap[oid],_2a2=this.featureLayer;if(_2a1){if(_2a1._count){return;}delete this._featureMap[oid];_2a2._remove(_2a1);}return _2a1;},_clearIIf:function(){var i,_2a3=this.featureLayer,_2a4=_2a3.graphics,_2a5=_2a3._selectedFeatures,_2a6=_2a3.objectIdField;for(i=_2a4.length-1;i>=0;i--){var _2a7=_2a4[i];var oid=_2a7.attributes[_2a6];if(oid in _2a5){_2a7._count=1;continue;}_2a7._count=0;this._removeFeatureIIf(oid);}},_isPending:function(id){var dfd=_4.io.script[this._prefix+id];return dfd?true:false;},_cancelPendingRequest:function(dfd,id){dfd=dfd||_4.io.script[this._prefix+id];if(dfd){try{dfd.cancel();_4.io.script._validCheck(dfd);}catch(e){}}},_purgeRequests:function(){_4.io.script._validCheck(null);},_toggleVisibility:function(show){var _2a8=this.featureLayer,_2a9=_2a8.graphics,_2aa=show?"show":"hide",i,len=_2a9.length;show=show&&_2a8._ager;for(i=0;i<len;i++){var _2ab=_2a9[i];_2ab[_2aa]();if(show){_2a8._repaint(_2ab);}}},_applyTimeFilter:function(_2ac){var _2ad=this.featureLayer;if(!_2ad.timeInfo||_2ad._suspended){return;}if(!_2ac){_2ad._fireUpdateStart();}var _2ae=_2ad._trackManager;if(_2ae){_2ae.clearTracks();}var defn=_2ad.getTimeDefinition(),_2af=_2ad._getOffsettedTE(_2ad._mapTimeExtent);if(_2af){_2af=_2ad._getTimeOverlap(defn,_2af);if(_2af){var _2b0=_2ad._filterByTime(_2ad.graphics,_2af.startTime,_2af.endTime);if(_2ae){_2ae.addFeatures(_2b0.match);}_4.forEach(_2b0.match,function(_2b1){var _2b2=_2b1._shape;if(!_2b1.visible){_2b1.show();_2b2=_2b1._shape;_2b2&&_2b2._moveToFront();}if(_2ad._ager&&_2b2){_2ad._repaint(_2b1);}});_4.forEach(_2b0.noMatch,function(_2b3){if(_2b3.visible){_2b3.hide();}});}else{this._toggleVisibility(false);}}else{if(_2ae){_2ae.addFeatures(_2ad.graphics);}this._toggleVisibility(true);}if(_2ae){_2ae.moveLatestToFront();_2ae.drawTracks();}if(!_2ac){_2ad._fireUpdateEnd();}}});_4.declare("esri.layers._SelectionMode",[esri.layers._RenderMode],{constructor:function(_2b4){this.featureLayer=_2b4;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);}});_4.declare("esri.layers._SnapshotMode",[esri.layers._RenderMode],{constructor:function(_2b5){this.featureLayer=_2b5;this._featureMap={};this._drawFeatures=_4.hitch(this,this._drawFeatures);this._queryErrorHandler=_4.hitch(this,this._queryErrorHandler);},initialize:function(map){this.map=map;var _2b6=this.featureLayer;if(_2b6._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(_2b7){var _2b8=this.featureLayer,_2b9=_2b8.objectIdField,oid=_2b7.attributes[_2b9];this._addFeatureIIf(oid,_2b7);this._incRefCount(oid);},resume:function(){this.propertyChangeHandler(0);},refresh:function(){var _2ba=this.featureLayer;if(_2ba._collection){_2ba._fireUpdateStart();_2ba._refresh(true);_2ba._fireUpdateEnd();}else{this._fetchAll();}},_getRequestId:function(_2bb){var id="_"+_2bb.name+_2bb.layerId+_2bb._ulid;return id.replace(/[^a-zA-Z0-9\_]+/g,"_");},_fetchAll:function(){var _2bc=this.featureLayer;if(_2bc._collection){return;}_2bc._fireUpdateStart();this._clearIIf();this._sendRequest();},_sendRequest:function(){var map=this.map,_2bd=this.featureLayer,_2be=_2bd.getDefinitionExpression();var _2bf=new esri.tasks.Query();_2bf.outFields=_2bd._getOutFields();_2bf.where=_2be||"1=1";_2bf.returnGeometry=true;_2bf.outSpatialReference=new esri.SpatialReference(map.spatialReference.toJson());_2bf.timeExtent=_2bd.getTimeDefinition();_2bf.maxAllowableOffset=_2bd._maxOffset;if(_2bd._ts){_2bf._ts=(new Date()).getTime();}var _2c0;if(_2bd._usePatch){_2c0=this._getRequestId(_2bd);this._cancelPendingRequest(null,_2c0);}_2bd._task.execute(_2bf,this._drawFeatures,this._queryErrorHandler,_2c0);},_drawFeatures:function(_2c1){this._purgeRequests();var _2c2=_2c1.features,_2c3=this.featureLayer,_2c4=_2c3.objectIdField,i,len=_2c2.length,_2c5,oid;for(i=0;i<len;i++){_2c5=_2c2[i];oid=_2c5.attributes[_2c4];this._addFeatureIIf(oid,_2c5);this._incRefCount(oid);}this._applyTimeFilter(true);_2c3._fireUpdateEnd(null,_2c1.exceededTransferLimit?{queryLimitExceeded:true}:null);if(_2c1.exceededTransferLimit){_2c3.onQueryLimitExceeded();}},_queryErrorHandler:function(err){this._purgeRequests();var _2c6=this.featureLayer;_2c6._errorHandler(err);_2c6._fireUpdateEnd(err);}});_4.declare("esri.layers._OnDemandMode",[esri.layers._RenderMode],{constructor:function(_2c7){this.featureLayer=_2c7;this._featureMap={};this._queryErrorHandler=_4.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(_2c8){var _2c9=this._gridLayer,geom=_2c8.geometry,_2ca=[];if(!geom){return;}_2ca=_2c9.getCellsInExtent((geom.type==="point")?{xmin:geom.x,ymin:geom.y,xmax:geom.x,ymax:geom.y}:geom.getExtent(),false).cells;var _2cb=this._cellMap,i,cell,oid=_2c8.attributes[this.featureLayer.objectIdField],_2cc,row,col;for(i=0;i<_2ca.length;i++){cell=_2ca[i];_2cc=cell.latticeID;row=cell.row;col=cell.col;if(_2cc){cell=(_2cb[_2cc]=(_2cb[_2cc]||cell));}else{_2cb[row]=_2cb[row]||{};cell=(_2cb[row][col]=(_2cb[row][col]||cell));}cell.features=cell.features||[];cell.features.push(_2c8);this._addFeatureIIf(oid,_2c8);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,_2cd=this.featureLayer;var _2ce=_2cd._srInfo;this._gridLayer=new esri.layers._GridLayout(new esri.geometry.Point(_2ce?_2ce.valid[0]:map.extent.xmin,map.extent.ymax,map.spatialReference),{width:_2cd._tileWidth,height:_2cd._tileHeight},{width:map.width,height:map.height},_2ce);this._ioQueue=[];if(!_2cd._suspended){this._zoomHandler();this._enableConnectors();}},_enableConnectors:function(){var map=this.map;this._zoomConnect=_4.connect(map,"onZoomEnd",this,this._zoomHandler);this._panConnect=_4.connect(map,"onPanEnd",this,this._panHandler);this._resizeConnect=_4.connect(map,"onResize",this,this._panHandler);},_disableConnectors:function(){_4.disconnect(this._zoomConnect);_4.disconnect(this._panConnect);_4.disconnect(this._resizeConnect);},_zoomHandler:function(){this._processIOQueue(true);var _2cf=this.featureLayer,map=this.map;if(_2cf._suspended){return;}_2cf._fireUpdateStart();this._clearIIf();var _2d0=_2cf._trackManager;if(_2d0){_2d0.clearTracks();}this._cellMap={};this._gridLayer.setResolution(map.extent);this._sendRequest();},_panHandler:function(){this.featureLayer._fireUpdateStart();this._sendRequest(this.featureLayer._resized&&arguments[0]);},_getRequestId:function(_2d1,cell){var id="_"+_2d1.name+_2d1.layerId+_2d1._ulid+"_"+cell.resolution+"_"+(cell.latticeID||(cell.row+"_"+cell.col));return id.replace(/[^a-zA-Z0-9\_]+/g,"_");},_sendRequest:function(_2d2){this._exceeds=false;var _2d3=this.featureLayer,map=this.map,_2d4=_2d2||map.extent,_2d5=this._gridLayer.getCellsInExtent(_2d4,_2d3.latticeTiling),_2d6=_2d5.cells;if(!_2d3._editable){var _2d7=this._cellMap;_2d6=_4.filter(_2d6,function(cell){if(cell.lattice){if(_2d7[cell.latticeID]){return false;}}else{if(_2d7[cell.row]&&_2d7[cell.row][cell.col]){return false;}}return true;});}var _2d8=_2d3._getOutFields(),_2d9=_2d3.getDefinitionExpression(),time=_2d3._getOffsettedTE(_2d3._mapTimeExtent),_2da=_2d3._usePatch,_2db=this._ioQueue,i,self=this,func=this._drawFeatures,cell,_2dc,_2dd;this._pending=this._pending||0;for(i=0;i<_2d6.length;i++){cell=_2d6[i];_2dc=new esri.tasks.Query();_2dc.geometry=cell.extent||cell.lattice;_2dc.outFields=_2d8;_2dc.where=_2d9;if(_2d3.latticeTiling&&cell.extent){_2dc.spatialRelationship=esri.tasks.Query.SPATIAL_REL_CONTAINS;}_2dc.returnGeometry=true;_2dc.timeExtent=time;_2dc.maxAllowableOffset=_2d3._maxOffset;if(_2d3._ts){_2dc._ts=(new Date()).getTime();}_2dd=null;if(_2da){_2dd=this._getRequestId(_2d3,cell);if(this._isPending(_2dd)){continue;}}this._pending++;_2db.push(_2d3._task.execute(_2dc,function(){var _2de=cell;return function(_2df){func.apply(self,[_2df,_2de]);};}.call(this),this._queryErrorHandler,_2dd));}this._removeOldCells(_2d4);this._endCheck();},_drawFeatures:function(_2e0,cell){this._exceeds=this._exceeds||_2e0.exceededTransferLimit;this._finalizeIO();var _2e1=this.featureLayer,map=this.map,_2e2=map.extent,_2e3=cell.extent,row=cell.row,col=cell.col,_2e4=_2e1.objectIdField,_2e5=_2e0.features,_2e6=this._gridLayer,_2e7=this._cellMap,i,len,_2e8=cell.latticeID,_2e9=_2e8?_2e7[_2e8]:(_2e7[row]&&_2e7[row][col]);if((cell.resolution!=_2e6._resolution)||(_2e8?(_2e8!==_2e6.getLatticeID(_2e2)):(!_2e6.intersects(_2e3,_2e2)))){if(_2e9){this._removeCell(row,col,_2e8);}}else{if(_2e9){this._updateCell(_2e9,_2e5);}else{cell.features=_2e5;if(_2e8){_2e7[_2e8]=cell;}else{_2e7[row]=_2e7[row]||{};_2e7[row][col]=cell;}len=_2e5.length;for(i=0;i<len;i++){var _2ea=_2e5[i];var oid=_2ea.attributes[_2e4];this._addFeatureIIf(oid,_2ea);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(_2eb){if(this._pending===0){this._processIOQueue();var _2ec=this.featureLayer,_2ed=_2ec._trackManager;if(_2ed){_2ed.clearTracks();_2ed.addFeatures(_2ec.graphics);if(_2ec._ager){_4.forEach(_2ec.graphics,function(_2ee){if(_2ee._shape){_2ec._repaint(_2ee);}});}_2ed.moveLatestToFront();_2ed.drawTracks();}this.featureLayer._fireUpdateEnd(_2eb&&new Error("FeatureLayer: "+esri.bundle.layers.FeatureLayer.updateError),this._exceeds?{queryLimitExceeded:true}:null);if(this._exceeds){_2ec.onQueryLimitExceeded();}}},_processIOQueue:function(_2ef){this._ioQueue=_4.filter(this._ioQueue,function(dfd){var keep=dfd.fired>-1?false:true;return keep;});if(_2ef){_4.forEach(this._ioQueue,this._cancelPendingRequest);}},_removeOldCells:function(_2f0){var _2f1=this._cellMap,_2f2=this._gridLayer,_2f3,_2f4;for(_2f3 in _2f1){if(_2f1[_2f3]){var row=_2f1[_2f3],_2f5=row.latticeID,_2f6=0,_2f7=0;if(_2f5){_2f6++;if(_2f5!==_2f2.getLatticeID(_2f0)){this._removeCell(null,null,_2f5);_2f7++;}}else{for(_2f4 in row){if(row[_2f4]){_2f6++;var _2f8=row[_2f4].extent;if(!_2f2.intersects(_2f8,_2f0)){this._removeCell(_2f3,_2f4);_2f7++;}}}}if(_2f7===_2f6){delete _2f1[_2f3];}}}},_updateCell:function(cell,_2f9){var _2fa=this.featureLayer,_2fb=_2fa.objectIdField,_2fc=_2fa._selectedFeatures,i,len=_2f9.length;cell.features=cell.features||[];for(i=0;i<len;i++){var _2fd=_2f9[i];var oid=_2fd.attributes[_2fb];var _2fe=this._addFeatureIIf(oid,_2fd);if(_2fe===_2fd){this._incRefCount(oid);cell.features.push(_2fe);}else{if(!(oid in _2fc)){_2fe.setGeometry(_2fd.geometry);_2fe.setAttributes(_2fd.attributes);}}}},_removeCell:function(row,col,_2ff){var _300=this._cellMap,_301=this.featureLayer,_302=_301.objectIdField;var cell=_2ff?_300[_2ff]:(_300[row]&&_300[row][col]);if(cell){if(_2ff){delete _300[_2ff];}else{delete _300[row][col];}var _303=cell.features,i;for(i=0;i<_303.length;i++){var _304=_303[i];var oid=_304.attributes[_302];this._decRefCount(oid);if(oid in _301._selectedFeatures){continue;}this._removeFeatureIIf(oid);}}}});_4.declare("esri.layers._GridLayout",null,{constructor:function(_305,_306,_307,_308){this.origin=_305;this.cellWidth=_306.width;this.cellHeight=_306.height;this.mapWidth=_307.width;this.mapHeight=_307.height;this.srInfo=_308;},setResolution:function(_309){this._resolution=(_309.xmax-_309.xmin)/this.mapWidth;if(this.srInfo){var _30a=Math.round((2*this.srInfo.valid[1])/this._resolution),_30b=Math.round(_30a/this.cellWidth);this._frameStats=[_30b,0,_30b-1];}},getCellCoordinates:function(_30c){var res=this._resolution,_30d=this.origin;return {row:Math.floor((_30d.y-_30c.y)/(this.cellHeight*res)),col:Math.floor((_30c.x-_30d.x)/(this.cellWidth*res))};},normalize:function(col){var _30e=this._frameStats;if(_30e){var _30f=_30e[0],m180=_30e[1],p180=_30e[2];if(col<m180){col=col%_30f;col=col<m180?col+_30f:col;}else{if(col>p180){col=col%_30f;}}}return col;},intersects:function(_310,_311){var _312=this.srInfo;if(_312){return _4.some(_311._getParts(_312),function(_313){return _310.intersects(_313.extent);});}else{return _310.intersects(_311);}},getCellExtent:function(row,col){var res=this._resolution,_314=this.origin,_315=this.cellWidth,_316=this.cellHeight;return new esri.geometry.Extent((col*_315*res)+_314.x,_314.y-((row+1)*_316*res),((col+1)*_315*res)+_314.x,_314.y-(row*_316*res),new esri.SpatialReference(_314.spatialReference.toJson()));},getLatticeID:function(_317){var _318=this.getCellCoordinates({x:_317.xmin,y:_317.ymax}),_319=this.getCellCoordinates({x:_317.xmax,y:_317.ymin}),_31a=_318.row,_31b=_319.row,_31c=this.normalize(_318.col),_31d=this.normalize(_319.col);return _31a+"_"+_31b+"_"+_31c+"_"+_31d;},sorter:function(a,b){return (a<b)?-1:1;},getCellsInExtent:function(_31e,_31f){var _320=this.getCellCoordinates({x:_31e.xmin,y:_31e.ymax}),_321=this.getCellCoordinates({x:_31e.xmax,y:_31e.ymin}),_322=_320.row,_323=_321.row,_324=_320.col,_325=_321.col,_326=[],i,j,nj,_327=[],_328=[],len,xmin,xmax,ymin,ymax,_329=[],_32a,_32b;for(i=_322;i<=_323;i++){for(j=_324;j<=_325;j++){nj=this.normalize(j);_31e=this.getCellExtent(i,nj);_326.push({row:i,col:nj,extent:_31e,resolution:this._resolution});if(_31f){_327.push(_31e.xmin,_31e.xmax);_328.push(_31e.ymin,_31e.ymax);}}}_324=this.normalize(_324);_325=this.normalize(_325);_327.sort(this.sorter);_328.sort(this.sorter);len=_327.length;for(i=len-1;i>=0;i--){if(i<(len-1)){if(_327[i]===_327[i+1]){_327.splice(i,1);}}}len=_328.length;for(i=len-1;i>=0;i--){if(i<(len-1)){if(_328[i]===_328[i+1]){_328.splice(i,1);}}}if(_327.length&&_328.length){xmin=_327[0];xmax=_327[_327.length-1];ymin=_328[0];ymax=_328[_328.length-1];len=_327.length;for(i=0;i<len;i++){_329.push([[_327[i],ymax],[_327[i],ymin]]);}len=_328.length;for(i=0;i<len;i++){_329.push([[xmin,_328[i]],[xmax,_328[i]]]);}_32a=new esri.geometry.Polyline({paths:_329,spatialReference:this.origin.spatialReference.toJson()});_32b=_322+"_"+_323+"_"+_324+"_"+_325;_326.push({latticeID:_32b,lattice:_32a,resolution:this._resolution});}return {minRow:_322,maxRow:_323,minCol:_324,maxCol:_325,cells:_326};}});_4.declare("esri.layers._TrackManager",null,{constructor:function(_32c){this.layer=_32c;this.trackMap={};},initialize:function(map){this.map=map;var _32d=this.layer,_32e=_32d.renderer.trackRenderer;if(_32e&&(_32d.geometryType==="esriGeometryPoint")){var _32f=(this.container=new esri.layers._GraphicsLayer({id:_32d.id+"_tracks",_child:true}));_32f._setMap(map,_32d._div);_32f.setRenderer(_32e);}},addFeatures:function(_330){var tkid,_331=this.trackMap,_332=this.layer,_333=_332._trackIdField;_4.forEach(_330,function(_334){var _335=_334.attributes;tkid=_335[_333];var ary=(_331[tkid]=(_331[tkid]||[]));ary.push(_334);});var _336=_332._startTimeField,_337=_332.objectIdField;var _338=function(a,b){var _339=a.attributes[_336],_33a=b.attributes[_336];if(_339===_33a){return (a.attributes[_337]<b.attributes[_337])?-1:1;}else{return (_339<_33a)?-1:1;}};for(tkid in _331){_331[tkid].sort(_338);}},drawTracks:function(){var _33b=this.container;if(!_33b){return;}var _33c=this.trackMap,sr=this.map.spatialReference,tkid,ary,path,i,_33d;for(tkid in _33c){ary=_33c[tkid];path=[];for(i=ary.length-1;i>=0;i--){_33d=ary[i].geometry;if(_33d){path.push([_33d.x,_33d.y]);}}if(path.length>0){_33b.add(new esri.Graphic(new esri.geometry.Polyline({paths:[path],spatialReference:sr})));}}},moveLatestToFront:function(){_4.forEach(this.getLatestObservations(),function(_33e){var _33f=_33e._shape;_33f&&_33f._moveToFront();this._repaint(_33e,null,true);},this.layer);},getLatestObservations:function(){var _340=[];if(!this.layer.renderer.latestObservationRenderer){return _340;}var _341=this.trackMap,tkid;for(tkid in _341){var ary=_341[tkid];_340.push(ary[ary.length-1]);}return _340;},clearTracks:function(){var _342=this.getLatestObservations();this.trackMap={};var _343=this.container;if(_343){_343.clear();}_4.forEach(_342,function(_344){this._repaint(_344,null,true);},this.layer);},isLatestObservation:function(_345){var _346=this.layer._trackIdField;var _347=this.trackMap[_345.attributes[_346]];if(_347){return (_347[_347.length-1]===_345);}return false;},destroy:function(){var _348=this.container;if(_348){_348.clear();_348._unsetMap(this.map,this.layer._div);this.container=null;}this.map=null;this.layer=null;this.trackMap=null;}});}if(!_4._hasResource["esri.layers.MapImageLayer"]){_4._hasResource["esri.layers.MapImageLayer"]=true;_4.provide("esri.layers.MapImageLayer");_4.declare("esri.layers.MapImageLayer",[esri.layers.Layer],{"-chains-":{constructor:"manual"},constructor:function(_349){this.inherited(arguments,[null,_349]);this._mapImages=[];var _34a=_4.hitch;this._panStart=_34a(this,this._panStart);this._pan=_34a(this,this._pan);this._extentChange=_34a(this,this._extentChange);this._zoom=_34a(this,this._zoom);this._zoomStart=_34a(this,this._zoomStart);this._scale=_34a(this,this._scale);this._resize=_34a(this,this._resize);this.loaded=true;this.onLoad(this);},opacity:1,_transform:esri._getDOMAccessor("transform"),addImage:function(_34b){var _34c=this._mapImages.push(_34b);_34c=_34c-1;_34b._idx=_34c;_34b._layer=this;if(this._div){this._createImage(_34b,_34c);}},removeImage:function(_34d){if(_34d){var idx=_34d._idx,_34e=this._mapImages;if(_34e[idx]===_34d){delete _34e[idx];var node=_34d._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);_4.destroy(node);}}_34d._node=_34d._idx=_34d._layer=null;}}},removeAllImages:function(){var _34f=this._mapImages,i,len=_34f.length;for(i=0;i<len;i++){var _350=_34f[i];if(_350){this.removeImage(_350);}}this._mapImages=[];},getImages:function(){var _351=this._mapImages,_352=[],i,len=_351.length;for(i=0;i<len;i++){if(_351[i]){_352.push(_351[i]);}}return _352;},setOpacity:function(_353){if(this.opacity!=_353){this.onOpacityChange(this.opacity=_353);}},onOpacityChange:function(_354){var div=this._div,i,len,_355;if(div){if(!_4.isIE||_4.isIE>8){_4.style(div,"opacity",_354);}else{_355=div.childNodes;len=_355.length;for(i=0;i<len;i++){_4.style(_355[i],"opacity",_354);}}}},_createImage:function(_356,idx){var node=_4.create("img");_4.style(node,{position:"absolute"});if(_4.isIE<=8){_4.style(node,"opacity",this.opacity);}if(_356.rotation){var _357="rotate("+(360-_356.rotation)+"deg)";if(_4.isIE<9){}else{_4.style(node,this._transform,_357);_4.style(node,"transform",_357);}}_356._node=node;node.e_idx=idx;node.e_layer=this;node.e_load=_4.connect(node,"onload",esri.layers.MapImageLayer.prototype._imageLoaded);node.e_error=_4.connect(node,"onerror",esri.layers.MapImageLayer.prototype._imageError);node.e_abort=_4.connect(node,"onabort",esri.layers.MapImageLayer.prototype._imageError);node.src=_356.href;},_imageLoaded:function(evt,img){var node=img||evt.target||evt.currentTarget,self=node.e_layer,_358=self._mapImages[node.e_idx];if(self._map&&(self._map.__zooming||self._map.__panning)){self._standby.push(node);return;}self._clearEvents(node);if(!_358||_358._node!==node){return;}if(self._map){self._attach(_358);}},_imageError:function(evt){var node=evt.target||evt.currentTarget,self=node.e_layer,_359=self._mapImages[node.e_idx];self._clearEvents(node);if(_359){_359._node=null;}},_clearEvents:function(node){var _35a=_4.disconnect;_35a(node.e_load);_35a(node.e_error);_35a(node.e_abort);node.e_load=node.e_error=node.e_abort=node.e_layer=null;},_attach:function(_35b){var _35c=_35b.extent,_35d,_35e=_35c.spatialReference,_35f=this._sr,div=this._div,node=_35b._node,_360=new esri.geometry.Point({x:_35c.xmin,y:_35c.ymin}),_361=new esri.geometry.Point({x:_35c.xmax,y:_35c.ymax});if(_35f.wkid){_35d=(_35f._isWebMercator()&&_35e._isWebMercator())||(_35f.wkid===_35e.wkid);}else{if(_35f.wkt){_35d=(_35f.wkt===_35e.wkt);}}if(!_35d){if(_35f._isWebMercator()&&_35e.wkid===4326){_360=esri.geometry.geographicToWebMercator(_360);_361=esri.geometry.geographicToWebMercator(_361);}else{if(_35e._isWebMercator()&&_35f.wkid===4326){_360=esri.geometry.webMercatorToGeographic(_360);_361=esri.geometry.webMercatorToGeographic(_361);}}}node.e_bl=_360;node.e_tr=_361;if(_35b.visible){this._setPos(node,div._left,div._top);(this._active||div).appendChild(node);}},_setPos:function(node,_362,_363){var _364=node.e_bl,_365=node.e_tr,map=this._map;_364=map.toScreen(_364);_365=map.toScreen(_365);var left=_364.x-_362,top=_365.y-_363,_366=Math.abs(_365.x-_364.x),_367=Math.abs(_364.y-_365.y),css={width:_366+"px",height:_367+"px"},_368=this._mapImages[node.e_idx];if(map.navigationMode==="css-transforms"){css[esri._css.names.transform]=esri._css.translate(left,top)+(_368.rotation?(" "+esri._css.rotate(360-_368.rotation)):"");}else{css.left=left+"px";css.top=top+"px";}_4.style(node,css);node.e_l=left;node.e_t=top;node.e_w=_366;node.e_h=_367;},_setMap:function(map,_369){this._map=map;this._sr=map.spatialReference;var div=this._div=_4.create("div",null,_369),_36a=esri._css.names,css={position:"absolute"},vd=map.__visibleDelta;if(!_4.isIE||_4.isIE>8){css.opacity=this.opacity;}if(map.navigationMode==="css-transforms"){css[_36a.transform]=esri._css.translate(vd.x,vd.y);_4.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=_4.create("div",null,div);_4.style(this._active,css);this._passive=_4.create("div",null,div);_4.style(this._passive,css);}else{div._left=0;div._top=0;_4.style(div,css);}this._standby=[];var _36b=this._mapImages,i,len=_36b.length;for(i=0;i<len;i++){var _36c=_36b[i],node=_36c._node;if(!node){this._createImage(_36c,_36c._idx);}}this.onVisibilityChange(this.visible);return div;},_unsetMap:function(map,_36d){this._disconnect();var div=this._div;if(div){var _36e=this._mapImages,i,len=_36e.length;for(i=0;i<len;i++){var _36f=_36e[i];if(_36f){var node=_36f._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;}_36f._node=null;}}_36d.removeChild(div);_4.destroy(div);}this._map=this._div=this._sr=this._active=this._passive=this._standby=null;},onVisibilityChange:function(_370){var div=this._div;if(div){if(_370){this._redraw();this._connect(this._map);esri.show(div);}else{this._disconnect();esri.hide(div);}}},_connect:function(map){if(!this._connections){var _371=_4.connect,_372=(map.navigationMode==="css-transforms");this._connections=[_371(map,"onPanStart",this._panStart),_371(map,"onPan",this._pan),_371(map,"onExtentChange",this._extentChange),_372&&_371(map,"onZoomStart",this._zoomStart),_372?_371(map,"onScale",this._scale):_371(map,"onZoom",this._zoom),_372&&_371(map,"onResize",this._resize)];}},_disconnect:function(){if(this._connections){_4.forEach(this._connections,_4.disconnect);this._connections=null;}},_panStart:function(){this._panL=this._div._left;this._panT=this._div._top;},_pan:function(_373,_374){var div=this._div;div._left=this._panL+_374.x;div._top=this._panT+_374.y;if(this._map.navigationMode==="css-transforms"){_4.style(div,esri._css.names.transform,esri._css.translate(div._left,div._top));}else{_4.style(div,{left:div._left+"px",top:div._top+"px"});}},_extentChange:function(_375,_376,_377){if(_377){this._redraw(this._map.navigationMode==="css-transforms");}else{if(_376){this._pan(_375,_376);}}var i,_378=this._standby;if(_378&&_378.length){for(i=_378.length-1;i>=0;i--){this._imageLoaded(null,_378[i]);_378.splice(i,1);}}},_redraw:function(_379){if(_379){var _37a=this._passive,_37b=esri._css.names;_4.style(_37a,_37b.transition,"none");this._moveImages(_37a,this._active);_4.style(_37a,_37b.transform,"none");}var div=this._active||this._div,_37c=this._div._left,_37d=this._div._top,i,len=div.childNodes.length,node;for(i=0;i<len;i++){node=div.childNodes[i];this._setPos(node,_37c,_37d);}},_zoom:function(_37e,_37f,_380){var div=this._div,_381=div._left,_382=div._top,i,len=div.childNodes.length,node;for(i=0;i<len;i++){node=div.childNodes[i];var _383=node.e_w*_37f,_384=node.e_h*_37f,_385=(_380.x-_381-node.e_l)*(_383-node.e_w)/node.e_w,_386=(_380.y-_382-node.e_t)*(_384-node.e_h)/node.e_h;_385=isNaN(_385)?0:_385;_386=isNaN(_386)?0:_386;_4.style(node,{left:(node.e_l-_385)+"px",top:(node.e_t-_386)+"px",width:_383+"px",height:_384+"px"});}},_zoomStart:function(){this._moveImages(this._active,this._passive);},_moveImages:function(_387,dest){var _388=_387.childNodes,i,len=_388.length;if(len>0){for(i=len-1;i>=0;i--){dest.appendChild(_388[i]);}}},_scale:function(mtx,_389){var css={},_38a=esri._css.names,_38b=this._passive;_4.style(_38b,_38a.transition,_389?"none":(_38a.transformName+" "+esri.config.defaults.map.zoomDuration+"ms ease"));css[_38a.transform]=esri._css.matrix(mtx);_4.style(_38b,_38a.transform,esri._css.matrix(mtx));},_resize:function(_38c,_38d,_38e){_4.style(this._active,{width:_38d+"px",height:_38e+"px"});_4.style(this._passive,{width:_38d+"px",height:_38e+"px"});}});_4.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,_38f=this._layer,div;if(node){div=_38f&&_38f._div;if(div){_38f._setPos(node,div._left,div._top);(_38f._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(!_4._hasResource["esri.PopupBase"]){_4._hasResource["esri.PopupBase"]=true;_4.provide("esri.PopupBase");_4.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 _390,_391;if(arg[0] instanceof _4.Deferred){_391=arg;}else{_390=arg;}if(_390){this._updateFeatures(null,_390);}else{this.deferreds=_391;_391=_391.slice(0);_4.forEach(_391,function(dfd){dfd.addBoth(_4.hitch(this,this._updateFeatures,dfd));},this);}},clearFeatures:function(){this.features=this.deferreds=null;this.count=0;var _392=this.selectedIndex;this.selectedIndex=-1;if(_392>-1){this.onSelectionChange();}this.onClearFeatures();},getSelectedFeature:function(){var _393=this.features;if(_393){return _393[this.selectedIndex];}},select:function(_394){if(_394<0||_394>=this.count){return;}this.selectedIndex=_394;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 _395=(this.markerSymbol=new ESYM.SimpleMarkerSymbol());_395.setStyle(ESYM.SimpleMarkerSymbol.STYLE_TARGET);_395._setDim(16,16,7);_395.setOutline(new ESYM.CartographicLineSymbol(ESYM.SimpleLineSymbol.STYLE_SOLID,new _4.Color([0,255,255]),2,ESYM.CartographicLineSymbol.CAP_ROUND,ESYM.CartographicLineSymbol.JOIN_ROUND));_395.setColor(new _4.Color([0,0,0,0]));}if(!this.lineSymbol){this.lineSymbol=new ESYM.SimpleLineSymbol(ESYM.SimpleLineSymbol.STYLE_SOLID,new _4.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 _4.Color([0,255,255]),2),new _4.Color([0,0,0,0]));}},disableHighlight:function(map){var _396=this._highlighted;if(_396){_396.hide();map.graphics.remove(_396);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,_397){var _398=_397.geometry,_399=this._highlighted;if(!_398||!_399){return;}_399.hide();if(!_399.getLayer()&&map){map.graphics.add(_399);}_399.setGeometry(esri.geometry.fromJson(_398.toJson()));var _39a;switch(_398.type){case "point":case "multipoint":_39a=this.markerSymbol;_39a.setOffset(0,0);_39a.setAngle(0);var lyr=_397.getLayer();if(lyr){var _39b=lyr._getSymbol(_397),_39c,_39d,xoff=0,yoff=0,_39e=0;if(_39b){switch(_39b.type){case "simplemarkersymbol":_39c=_39d=(_39b.size||0);break;case "picturemarkersymbol":_39c=(_39b.width||0);_39d=(_39b.height||0);break;}xoff=_39b.xoffset||0;yoff=_39b.yoffset||0;_39e=_39b.angle||0;}if(_39c&&_39d){_39a._setDim(_39c+1,_39d+1,7);}_39a.setOffset(xoff,yoff);_39a.setAngle(_39e);}break;case "polyline":_39a=this.lineSymbol;break;case "polygon":_39a=this.fillSymbol;break;}_399.setSymbol(_39a);},_unbind:function(dfd){var _39f=_4.indexOf(this.deferreds,dfd);if(_39f===-1){return;}this.deferreds.splice(_39f,1);if(!this.deferreds.length){this.deferreds=null;return 2;}return 1;},_updateFeatures:function(dfd,_3a0){if(dfd){if(this.deferreds){var res=this._unbind(dfd);if(!res){return;}if(_3a0&&_3a0 instanceof Error){this.onDfdComplete(_3a0);if(res===2){this.onSetFeatures();}return;}if(_3a0&&_3a0.length){if(!this.features){this.features=_3a0;this.count=_3a0.length;this.selectedIndex=0;this.onDfdComplete();if(res===2){this.onSetFeatures();}this.select(0);}else{var _3a1=_4.filter(_3a0,function(_3a2){return _4.indexOf(this.features,_3a2)===-1;},this);this.features=this.features.concat(_3a1);this.count=this.features.length;this.onDfdComplete();if(res===2){this.onSetFeatures();}}}else{this.onDfdComplete();if(res===2){this.onSetFeatures();}}}}else{this.features=_3a0;this.count=_3a0.length;this.selectedIndex=0;this.onSetFeatures();this.select(0);}}});_4.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 _3a3=(this._fieldLabels={}),_3a4=(this._fieldsMap={});if(json.fieldInfos){_4.forEach(json.fieldInfos,function(_3a5){_3a3[_3a5.fieldName]=_3a5.label;_3a4[_3a5.fieldName]=_3a5;});}},toJson:function(){return _4.fromJson(_4.toJson(this.info));},getTitle:function(){},getContent:function(){},getComponents:function(_3a6){var _3a7=this.info,_3a8=_3a6.getLayer(),_3a9=_4.clone(_3a6.attributes)||{},_3aa=_4.clone(_3a9),_3ab=_3a7.fieldInfos,_3ac="",_3ad="",_3ae,_3af,_3b0,_3b1=_3a8&&_3a8._getDateOpts&&_3a8._getDateOpts().properties,_3b2={dateFormat:{properties:_3b1,formatter:"DateFormat"+this._dateFormats["shortDateShortTime"]}};if(_3ab){_4.forEach(_3ab,function(_3b3){var _3b4=_3b3.fieldName,val=_3aa[_3b4];_3aa[_3b4]=this._formatValue(val,_3b4,_3b2);if(_3b1&&_3b3.format&&_3b3.format.dateFormat){var pos=_4.indexOf(_3b1,_3b4);if(pos>-1){_3b1.splice(pos,1);}}},this);}if(_3a8){var _3b5=_3a8.types,_3b6=_3a8.typeIdField,_3b7=_3b6&&_3a9[_3b6];for(_3af in _3a9){_3b0=_3a9[_3af];if(esri._isDefined(_3b0)){var _3b8=this._getDomainName(_3a8,_3b5,_3b7,_3af,_3b0);if(esri._isDefined(_3b8)){_3aa[_3af]=_3b8;}else{if(_3af===_3b6){var _3b9=this._getTypeName(_3a8,_3b0);if(esri._isDefined(_3b9)){_3aa[_3af]=_3b9;}}}}}}if(_3a7.title){_3ac=_4.trim(esri.substitute(_3aa,this._fixTokens(_3a7.title),_3b2)||"");}if(_3a7.description){_3ad=_4.trim(esri.substitute(_3aa,this._fixTokens(_3a7.description),_3b2)||"");}if(_3ab){_3ae=[];_4.forEach(_3ab,function(_3ba){_3af=_3ba.fieldName;if(_3af&&_3ba.visible){_3ae.push([_3ba.label||_3af,esri.substitute(_3aa,"${"+_3af+"}",_3b2)||""]);}});}var _3bb,_3bc;if(_3a7.mediaInfos){_3bb=[];_4.forEach(_3a7.mediaInfos,function(_3bd){_3bc=0;_3b0=_3bd.value;switch(_3bd.type){case "image":var url=_3b0.sourceURL;url=url&&_4.trim(esri.substitute(_3a9,this._fixTokens(url)));_3bc=!!url;break;case "piechart":case "linechart":case "columnchart":case "barchart":_3bc=_4.some(_3b0.fields,function(_3be){return esri._isDefined(_3a9[_3be]);});break;default:return;}if(_3bc){_3bd=_4.clone(_3bd);_3b0=_3bd.value;_3bd.title=_3bd.title?_4.trim(esri.substitute(_3aa,this._fixTokens(_3bd.title),_3b2)||""):"";_3bd.caption=_3bd.caption?_4.trim(esri.substitute(_3aa,this._fixTokens(_3bd.caption),_3b2)||""):"";if(_3bd.type==="image"){_3b0.sourceURL=esri.substitute(_3a9,this._fixTokens(_3b0.sourceURL));if(_3b0.linkURL){_3b0.linkURL=_4.trim(esri.substitute(_3a9,this._fixTokens(_3b0.linkURL))||"");}}else{var _3bf=_3a9[_3b0.normalizeField]||0;_3b0.fields=_4.map(_3b0.fields,function(_3c0){var data=_3a9[_3c0];data=(data===undefined)?null:data;if(data&&_3bf){data=data/_3bf;}return {y:data,tooltip:(this._fieldLabels[_3c0]||_3c0)+":<br/>"+this._formatValue(data,_3c0,_3b2)};},this);}_3bb.push(_3bd);}},this);}return {title:_3ac,description:_3ad,fields:(_3ae&&_3ae.length)?_3ae:null,mediaInfos:(_3bb&&_3bb.length)?_3bb:null,formatted:_3aa,editSummary:(_3a8&&_3a8.getEditSummary)?_3a8.getEditSummary(_3a6):""};},getAttachments:function(_3c1){var _3c2=_3c1.getLayer(),_3c3=_3c1.attributes;if(this.info.showAttachments&&_3c2&&_3c2.hasAttachments&&_3c2.objectIdField){var oid=_3c3&&_3c3[_3c2.objectIdField];if(oid){return _3c2.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(_3c4){return _3c4.replace(/(\{[^\{\r\n]+\})/g,"$$$1");},_formatValue:function(val,_3c5,_3c6){var _3c7=this._fieldsMap[_3c5],fmt=_3c7&&_3c7.format;if(!esri._isDefined(val)||!_3c7||!esri._isDefined(fmt)){return val;}var _3c8="",_3c9=[],_3ca=fmt.hasOwnProperty("places")||fmt.hasOwnProperty("digitSeparator"),_3cb=fmt.hasOwnProperty("digitSeparator")?fmt.digitSeparator:true;if(_3ca){_3c8="NumberFormat";_3c9.push("places: "+(esri._isDefined(fmt.places)?Number(fmt.places):"Infinity"));if(_3c9.length){_3c8+=("("+_3c9.join(",")+")");}}else{if(fmt.dateFormat){_3c8="DateFormat"+(this._dateFormats[fmt.dateFormat]||this._dateFormats["shortDateShortTime"]);}else{return val;}}var _3cc=esri.substitute({"myKey":val},"${myKey:"+_3c8+"}",_3c6)||"";if(_3ca&&!_3cb){var _3cd=_4.i18n.getLocalization("dojo.cldr","number");if(_3cd.group){_3cc=_3cc.replace(new RegExp("\\"+_3cd.group,"g"),"");}}return _3cc;},_getDomainName:function(_3ce,_3cf,_3d0,_3d1,_3d2){var _3d3,stop;if(_3cf&&esri._isDefined(_3d0)){_4.some(_3cf,function(_3d4){if(_3d4.id==_3d0){_3d3=_3d4.domains&&_3d4.domains[_3d1];if(_3d3&&_3d3.type==="inherited"){_3d3=this._getLayerDomain(_3ce,_3d1);stop=true;}return true;}return false;},this);}if(!stop&&!_3d3){_3d3=this._getLayerDomain(_3ce,_3d1);}if(_3d3&&_3d3.codedValues){var _3d5;_4.some(_3d3.codedValues,function(_3d6){if(_3d6.code==_3d2){_3d5=_3d6.name;return true;}return false;});return _3d5;}},_getLayerDomain:function(_3d7,_3d8){var _3d9=_3d7.fields;if(_3d9){var _3da;_4.some(_3d9,function(_3db){if(_3db.name===_3d8){_3da=_3db.domain;return true;}return false;});return _3da;}},_getTypeName:function(_3dc,id){var _3dd=_3dc.types;if(_3dd){var _3de;_4.some(_3dd,function(_3df){if(_3df.id==id){_3de=_3df.name;return true;}return false;});return _3de;}}});}if(!_4._hasResource["dojo.Stateful"]){_4._hasResource["dojo.Stateful"]=true;_4.provide("dojo.Stateful");_4.declare("dojo.Stateful",null,{postscript:function(_3e0){if(_3e0){_4.mixin(this,_3e0);}},get:function(name){return this[name];},set:function(name,_3e1){if(typeof name==="object"){for(var x in name){this.set(x,name[x]);}return this;}var _3e2=this[name];this[name]=_3e1;if(this._watchCallbacks){this._watchCallbacks(name,_3e2,_3e1);}return this;},watch:function(name,_3e3){var _3e4=this._watchCallbacks;if(!_3e4){var self=this;_3e4=this._watchCallbacks=function(name,_3e5,_3e6,_3e7){var _3e8=function(_3e9){if(_3e9){_3e9=_3e9.slice();for(var i=0,l=_3e9.length;i<l;i++){try{_3e9[i].call(self,name,_3e5,_3e6);}catch(e){console.error(e);}}}};_3e8(_3e4["_"+name]);if(!_3e7){_3e8(_3e4["*"]);}};}if(!_3e3&&typeof name==="function"){_3e3=name;name="*";}else{name="_"+name;}var _3ea=_3e4[name];if(typeof _3ea!=="object"){_3ea=_3e4[name]=[];}_3ea.push(_3e3);return {unwatch:function(){_3ea.splice(_4.indexOf(_3ea,_3e3),1);}};}});}if(!_4._hasResource["dijit._WidgetBase"]){_4._hasResource["dijit._WidgetBase"]=true;_4.provide("dijit._WidgetBase");(function(){_4.declare("dijit._WidgetBase",_4.Stateful,{id:"",lang:"",dir:"","class":"",style:"",title:"",tooltip:"",baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_blankGif:(_4.config.blankGif||_4.moduleUrl("dojo","resources/blank.gif")).toString(),postscript:function(_3eb,_3ec){this.create(_3eb,_3ec);},create:function(_3ed,_3ee){this.srcNodeRef=_4.byId(_3ee);this._connects=[];this._subscribes=[];if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){this.id=this.srcNodeRef.id;}if(_3ed){this.params=_3ed;_4._mixin(this,_3ed);}this.postMixInProperties();if(!this.id){this.id=_5.getUniqueId(this.declaredClass.replace(/\./g,"_"));}_5.registry.add(this);this.buildRendering();if(this.domNode){this._applyAttributes();var _3ef=this.srcNodeRef;if(_3ef&&_3ef.parentNode&&this.domNode!==_3ef){_3ef.parentNode.replaceChild(this.domNode,_3ef);}}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 _3f0=function(attr,_3f1){if((_3f1.params&&attr in _3f1.params)||_3f1[attr]){_3f1.set(attr,_3f1[attr]);}};for(var attr in this.attributeMap){_3f0(attr,this);}_4.forEach(this._getSetterAttributes(),function(a){if(!(a in this.attributeMap)){_3f0(a,this);}},this);},_getSetterAttributes:function(){var ctor=this.constructor;if(!ctor._setterAttrs){var r=(ctor._setterAttrs=[]),_3f2,_3f3=ctor.prototype;for(var _3f4 in _3f3){if(_4.isFunction(_3f3[_3f4])&&(_3f2=_3f4.match(/^_set([a-zA-Z]*)Attr$/))&&_3f2[1]){r.push(_3f2[1].charAt(0).toLowerCase()+_3f2[1].substr(1));}}}return ctor._setterAttrs;},postMixInProperties:function(){},buildRendering:function(){if(!this.domNode){this.domNode=this.srcNodeRef||_4.create("div");}if(this.baseClass){var _3f5=this.baseClass.split(" ");if(!this.isLeftToRight()){_3f5=_3f5.concat(_4.map(_3f5,function(name){return name+"Rtl";}));}_4.addClass(this.domNode,_3f5);}},postCreate:function(){},startup:function(){this._started=true;},destroyRecursive:function(_3f6){this._beingDestroyed=true;this.destroyDescendants(_3f6);this.destroy(_3f6);},destroy:function(_3f7){this._beingDestroyed=true;this.uninitialize();var d=_4,dfe=d.forEach,dun=d.unsubscribe;dfe(this._connects,function(_3f8){dfe(_3f8,d.disconnect);});dfe(this._subscribes,function(_3f9){dun(_3f9);});dfe(this._supportingWidgets||[],function(w){if(w.destroyRecursive){w.destroyRecursive();}else{if(w.destroy){w.destroy();}}});this.destroyRendering(_3f7);_5.registry.remove(this.id);this._destroyed=true;},destroyRendering:function(_3fa){if(this.bgIframe){this.bgIframe.destroy(_3fa);delete this.bgIframe;}if(this.domNode){if(_3fa){_4.removeAttr(this.domNode,"widgetId");}else{_4.destroy(this.domNode);}delete this.domNode;}if(this.srcNodeRef){if(!_3fa){_4.destroy(this.srcNodeRef);}delete this.srcNodeRef;}},destroyDescendants:function(_3fb){_4.forEach(this.getChildren(),function(_3fc){if(_3fc.destroyRecursive){_3fc.destroyRecursive(_3fb);}});},uninitialize:function(){return false;},_setClassAttr:function(_3fd){var _3fe=this[this.attributeMap["class"]||"domNode"];_4.replaceClass(_3fe,_3fd,this["class"]);this._set("class",_3fd);},_setStyleAttr:function(_3ff){var _400=this[this.attributeMap.style||"domNode"];if(_4.isObject(_3ff)){_4.style(_400,_3ff);}else{if(_400.style.cssText){_400.style.cssText+="; "+_3ff;}else{_400.style.cssText=_3ff;}}this._set("style",_3ff);},_attrToDom:function(attr,_401){var _402=this.attributeMap[attr];_4.forEach(_4.isArray(_402)?_402:[_402],function(_403){var _404=this[_403.node||_403||"domNode"];var type=_403.type||"attribute";switch(type){case "attribute":if(_4.isFunction(_401)){_401=_4.hitch(this,_401);}var _405=_403.attribute?_403.attribute:(/^on[A-Z][a-zA-Z]*$/.test(attr)?attr.toLowerCase():attr);_4.attr(_404,_405,_401);break;case "innerText":_404.innerHTML="";_404.appendChild(_4.doc.createTextNode(_401));break;case "innerHTML":_404.innerHTML=_401;break;case "class":_4.replaceClass(_404,_401,this[attr]);break;}},this);},get:function(name){var _406=this._getAttrNames(name);return this[_406.g]?this[_406.g]():this[name];},set:function(name,_407){if(typeof name==="object"){for(var x in name){this.set(x,name[x]);}return this;}var _408=this._getAttrNames(name);if(this[_408.s]){var _409=this[_408.s].apply(this,Array.prototype.slice.call(arguments,1));}else{if(name in this.attributeMap){this._attrToDom(name,_407);}this._set(name,_407);}return _409||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,_40a){var _40b=this[name];this[name]=_40a;if(this._watchCallbacks&&this._created&&_40a!==_40b){this._watchCallbacks(name,_40b,_40a);}},toString:function(){return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";},getDescendants:function(){return this.containerNode?_4.query("[widgetId]",this.containerNode).map(_5.byNode):[];},getChildren:function(){return this.containerNode?_5.findWidgets(this.containerNode):[];},connect:function(obj,_40c,_40d){var _40e=[_4._connect(obj,_40c,this,_40d)];this._connects.push(_40e);return _40e;},disconnect:function(_40f){for(var i=0;i<this._connects.length;i++){if(this._connects[i]==_40f){_4.forEach(_40f,_4.disconnect);this._connects.splice(i,1);return;}}},subscribe:function(_410,_411){var _412=_4.subscribe(_410,this,_411);this._subscribes.push(_412);return _412;},unsubscribe:function(_413){for(var i=0;i<this._subscribes.length;i++){if(this._subscribes[i]==_413){_4.unsubscribe(_413);this._subscribes.splice(i,1);return;}}},isLeftToRight:function(){return this.dir?(this.dir=="ltr"):_4._isBodyLtr();},placeAt:function(_414,_415){if(_414.declaredClass&&_414.addChild){_414.addChild(this,_415);}else{_4.place(this.domNode,_414,_415);}return this;}});})();}if(!_4._hasResource["dojo.window"]){_4._hasResource["dojo.window"]=true;_4.provide("dojo.window");_4.getObject("window",true,_4);_4.window.getBox=function(){var _416=(_4.doc.compatMode=="BackCompat")?_4.body():_4.doc.documentElement;var _417=_4._docScroll();return {w:_416.clientWidth,h:_416.clientHeight,l:_417.x,t:_417.y};};_4.window.get=function(doc){if(_4.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;};_4.window.scrollIntoView=function(node,pos){try{node=_4.byId(node);var doc=node.ownerDocument||_4.doc,body=doc.body||_4.body(),html=doc.documentElement||body.parentNode,isIE=_4.isIE,isWK=_4.isWebKit;if((!(_4.isMoz||isIE||isWK||_4.isOpera)||node==body||node==html)&&(typeof node.scrollIntoView!="undefined")){node.scrollIntoView(false);return;}var _418=doc.compatMode=="BackCompat",_419=(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):(_418?body:html),_41a=isWK?body:_419,_41b=_419.clientWidth,_41c=_419.clientHeight,rtl=!_4._isBodyLtr(),_41d=pos||_4.position(node),el=node.parentNode,_41e=function(el){return ((isIE<=6||(isIE&&_418))?false:(_4.style(el,"position").toLowerCase()=="fixed"));};if(_41e(node)){return;}while(el){if(el==body){el=_41a;}var _41f=_4.position(el),_420=_41e(el);if(el==_41a){_41f.w=_41b;_41f.h=_41c;if(_41a==html&&isIE&&rtl){_41f.x+=_41a.offsetWidth-_41f.w;}if(_41f.x<0||!isIE){_41f.x=0;}if(_41f.y<0||!isIE){_41f.y=0;}}else{var pb=_4._getPadBorderExtents(el);_41f.w-=pb.w;_41f.h-=pb.h;_41f.x+=pb.l;_41f.y+=pb.t;var _421=el.clientWidth,_422=_41f.w-_421;if(_421>0&&_422>0){_41f.w=_421;_41f.x+=(rtl&&(isIE||el.clientLeft>pb.l))?_422:0;}_421=el.clientHeight;_422=_41f.h-_421;if(_421>0&&_422>0){_41f.h=_421;}}if(_420){if(_41f.y<0){_41f.h+=_41f.y;_41f.y=0;}if(_41f.x<0){_41f.w+=_41f.x;_41f.x=0;}if(_41f.y+_41f.h>_41c){_41f.h=_41c-_41f.y;}if(_41f.x+_41f.w>_41b){_41f.w=_41b-_41f.x;}}var l=_41d.x-_41f.x,t=_41d.y-Math.max(_41f.y,0),r=l+_41d.w-_41f.w,bot=t+_41d.h-_41f.h;if(r*l>0){var s=Math[l<0?"max":"min"](l,r);if(rtl&&((isIE==8&&!_418)||isIE>=9)){s=-s;}_41d.x+=el.scrollLeft;el.scrollLeft+=s;_41d.x-=el.scrollLeft;}if(bot*t>0){_41d.y+=el.scrollTop;el.scrollTop+=Math[t<0?"max":"min"](t,bot);_41d.y-=el.scrollTop;}el=(el!=_41a)&&!_420&&el.parentNode;}}catch(error){console.error("scrollIntoView: "+error);node.scrollIntoView(false);}};}if(!_4._hasResource["dijit._base.focus"]){_4._hasResource["dijit._base.focus"]=true;_4.provide("dijit._base.focus");_4.mixin(_5,{_curFocus:null,_prevFocus:null,isCollapsed:function(){return _5.getBookmark().isCollapsed;},getBookmark:function(){var bm,rg,tg,sel=_4.doc.selection,cf=_5._curFocus;if(_4.global.getSelection){sel=_4.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(_423){var _424=_4.doc,mark=_423.mark;if(mark){if(_4.global.getSelection){var sel=_4.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(_424.selection&&mark){var rg;if(mark.pRange){rg=mark.range;}else{if(_4.isArray(mark)){rg=_424.body.createControlRange();_4.forEach(mark,function(n){rg.addElement(n);});}else{rg=_424.body.createTextRange();rg.moveToBookmark(mark);}}rg.select();}}}},getFocus:function(menu,_425){var node=!_5._curFocus||(menu&&_4.isDescendant(_5._curFocus,menu.domNode))?_5._prevFocus:_5._curFocus;return {node:node,bookmark:(node==_5._curFocus)&&_4.withGlobal(_425||_4.global,_5.getBookmark),openedForWindow:_425};},focus:function(_426){if(!_426){return;}var node="node" in _426?_426.node:_426,_427=_426.bookmark,_428=_426.openedForWindow,_429=_427?_427.isCollapsed:false;if(node){var _42a=(node.tagName.toLowerCase()=="iframe")?node.contentWindow:node;if(_42a&&_42a.focus){try{_42a.focus();}catch(e){}}_5._onFocusNode(node);}if(_427&&_4.withGlobal(_428||_4.global,_5.isCollapsed)&&!_429){if(_428){_428.focus();}try{_4.withGlobal(_428||_4.global,_5.moveToBookmark,null,[_427]);}catch(e2){}}},_activeStack:[],registerIframe:function(_42b){return _5.registerWin(_42b.contentWindow,_42b);},unregisterIframe:function(_42c){_5.unregisterWin(_42c);},registerWin:function(_42d,_42e){var _42f=function(evt){_5._justMouseDowned=true;setTimeout(function(){_5._justMouseDowned=false;},0);if(_4.isIE&&evt&&evt.srcElement&&evt.srcElement.parentNode==null){return;}_5._onTouchNode(_42e||evt.target||evt.srcElement,"mouse");};var doc=_4.isIE?_42d.document.documentElement:_42d.document;if(doc){if(_4.isIE){_42d.document.body.attachEvent("onmousedown",_42f);var _430=function(evt){if(evt.srcElement.tagName.toLowerCase()!="#document"&&_5.isTabNavigable(evt.srcElement)){_5._onFocusNode(_42e||evt.srcElement);}else{_5._onTouchNode(_42e||evt.srcElement);}};doc.attachEvent("onactivate",_430);var _431=function(evt){_5._onBlurNode(_42e||evt.srcElement);};doc.attachEvent("ondeactivate",_431);return function(){_42d.document.detachEvent("onmousedown",_42f);doc.detachEvent("onactivate",_430);doc.detachEvent("ondeactivate",_431);doc=null;};}else{doc.body.addEventListener("mousedown",_42f,true);var _432=function(evt){_5._onFocusNode(_42e||evt.target);};doc.addEventListener("focus",_432,true);var _433=function(evt){_5._onBlurNode(_42e||evt.target);};doc.addEventListener("blur",_433,true);return function(){doc.body.removeEventListener("mousedown",_42f,true);doc.removeEventListener("focus",_432,true);doc.removeEventListener("blur",_433,true);doc=null;};}}},unregisterWin:function(_434){_434&&_434();},_onBlurNode:function(node){_5._prevFocus=_5._curFocus;_5._curFocus=null;if(_5._justMouseDowned){return;}if(_5._clearActiveWidgetsTimer){clearTimeout(_5._clearActiveWidgetsTimer);}_5._clearActiveWidgetsTimer=setTimeout(function(){delete _5._clearActiveWidgetsTimer;_5._setStack([]);_5._prevFocus=null;},100);},_onTouchNode:function(node,by){if(_5._clearActiveWidgetsTimer){clearTimeout(_5._clearActiveWidgetsTimer);delete _5._clearActiveWidgetsTimer;}var _435=[];try{while(node){var _436=_4.attr(node,"dijitPopupParent");if(_436){node=_5.byId(_436).domNode;}else{if(node.tagName&&node.tagName.toLowerCase()=="body"){if(node===_4.body()){break;}node=_4.window.get(node.ownerDocument).frameElement;}else{var id=node.getAttribute&&node.getAttribute("widgetId"),_437=id&&_5.byId(id);if(_437&&!(by=="mouse"&&_437.get("disabled"))){_435.unshift(id);}node=node.parentNode;}}}}catch(e){}_5._setStack(_435,by);},_onFocusNode:function(node){if(!node){return;}if(node.nodeType==9){return;}_5._onTouchNode(node);if(node==_5._curFocus){return;}if(_5._curFocus){_5._prevFocus=_5._curFocus;}_5._curFocus=node;_4.publish("focusNode",[node]);},_setStack:function(_438,by){var _439=_5._activeStack;_5._activeStack=_438;for(var _43a=0;_43a<Math.min(_439.length,_438.length);_43a++){if(_439[_43a]!=_438[_43a]){break;}}var _43b;for(var i=_439.length-1;i>=_43a;i--){_43b=_5.byId(_439[i]);if(_43b){_43b._focused=false;_43b.set("focused",false);_43b._hasBeenBlurred=true;if(_43b._onBlur){_43b._onBlur(by);}_4.publish("widgetBlur",[_43b,by]);}}for(i=_43a;i<_438.length;i++){_43b=_5.byId(_438[i]);if(_43b){_43b._focused=true;_43b.set("focused",true);if(_43b._onFocus){_43b._onFocus(by);}_4.publish("widgetFocus",[_43b,by]);}}}});_4.addOnLoad(function(){var _43c=_5.registerWin(window);if(_4.isIE){_4.addOnWindowUnload(function(){_5.unregisterWin(_43c);_43c=null;});}});}if(!_4._hasResource["dojo.AdapterRegistry"]){_4._hasResource["dojo.AdapterRegistry"]=true;_4.provide("dojo.AdapterRegistry");_4.AdapterRegistry=function(_43d){this.pairs=[];this.returnWrappers=_43d||false;};_4.extend(_4.AdapterRegistry,{register:function(name,_43e,wrap,_43f,_440){this.pairs[((_440)?"unshift":"push")]([name,_43e,wrap,_43f]);},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(!_4._hasResource["dijit._base.place"]){_4._hasResource["dijit._base.place"]=true;_4.provide("dijit._base.place");_5.getViewport=function(){return _4.window.getBox();};_5.placeOnScreen=function(node,pos,_441,_442){var _443=_4.map(_441,function(_444){var c={corner:_444,pos:{x:pos.x,y:pos.y}};if(_442){c.pos.x+=_444.charAt(1)=="L"?_442.x:-_442.x;c.pos.y+=_444.charAt(0)=="T"?_442.y:-_442.y;}return c;});return _5._place(node,_443);};_5._place=function(node,_445,_446,_447){var view=_4.window.getBox();if(!node.parentNode||String(node.parentNode.tagName).toLowerCase()!="body"){_4.body().appendChild(node);}var best=null;_4.some(_445,function(_448){var _449=_448.corner;var pos=_448.pos;var _44a=0;var _44b={w:_449.charAt(1)=="L"?(view.l+view.w)-pos.x:pos.x-view.l,h:_449.charAt(1)=="T"?(view.t+view.h)-pos.y:pos.y-view.t};if(_446){var res=_446(node,_448.aroundCorner,_449,_44b,_447);_44a=typeof res=="undefined"?0:res;}var _44c=node.style;var _44d=_44c.display;var _44e=_44c.visibility;_44c.visibility="hidden";_44c.display="";var mb=_4.marginBox(node);_44c.display=_44d;_44c.visibility=_44e;var _44f=Math.max(view.l,_449.charAt(1)=="L"?pos.x:(pos.x-mb.w)),_450=Math.max(view.t,_449.charAt(0)=="T"?pos.y:(pos.y-mb.h)),endX=Math.min(view.l+view.w,_449.charAt(1)=="L"?(_44f+mb.w):pos.x),endY=Math.min(view.t+view.h,_449.charAt(0)=="T"?(_450+mb.h):pos.y),_451=endX-_44f,_452=endY-_450;_44a+=(mb.w-_451)+(mb.h-_452);if(best==null||_44a<best.overflow){best={corner:_449,aroundCorner:_448.aroundCorner,x:_44f,y:_450,w:_451,h:_452,overflow:_44a,spaceAvailable:_44b};}return !_44a;});if(best.overflow&&_446){_446(node,best.aroundCorner,best.corner,best.spaceAvailable,_447);}var l=_4._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;};_5.placeOnScreenAroundNode=function(node,_453,_454,_455){_453=_4.byId(_453);var _456=_4.position(_453,true);return _5._placeOnScreenAroundRect(node,_456.x,_456.y,_456.w,_456.h,_454,_455);};_5.placeOnScreenAroundRectangle=function(node,_457,_458,_459){return _5._placeOnScreenAroundRect(node,_457.x,_457.y,_457.width,_457.height,_458,_459);};_5._placeOnScreenAroundRect=function(node,x,y,_45a,_45b,_45c,_45d){var _45e=[];for(var _45f in _45c){_45e.push({aroundCorner:_45f,corner:_45c[_45f],pos:{x:x+(_45f.charAt(1)=="L"?0:_45a),y:y+(_45f.charAt(0)=="T"?0:_45b)}});}return _5._place(node,_45e,_45d,{w:_45a,h:_45b});};_5.placementRegistry=new _4.AdapterRegistry();_5.placementRegistry.register("node",function(n,x){return typeof x=="object"&&typeof x.offsetWidth!="undefined"&&typeof x.offsetHeight!="undefined";},_5.placeOnScreenAroundNode);_5.placementRegistry.register("rect",function(n,x){return typeof x=="object"&&"x" in x&&"y" in x&&"width" in x&&"height" in x;},_5.placeOnScreenAroundRectangle);_5.placeOnScreenAroundElement=function(node,_460,_461,_462){return _5.placementRegistry.match.apply(_5.placementRegistry,arguments);};_5.getPopupAroundAlignment=function(_463,_464){var _465={};_4.forEach(_463,function(pos){switch(pos){case "after":_465[_464?"BR":"BL"]=_464?"BL":"BR";break;case "before":_465[_464?"BL":"BR"]=_464?"BR":"BL";break;case "below-alt":_464=!_464;case "below":_465[_464?"BL":"BR"]=_464?"TL":"TR";_465[_464?"BR":"BL"]=_464?"TR":"TL";break;case "above-alt":_464=!_464;case "above":default:_465[_464?"TL":"TR"]=_464?"BL":"BR";_465[_464?"TR":"TL"]=_464?"BR":"BL";break;}});return _465;};}if(!_4._hasResource["dijit._base.window"]){_4._hasResource["dijit._base.window"]=true;_4.provide("dijit._base.window");_5.getDocumentWindow=function(doc){return _4.window.get(doc);};}if(!_4._hasResource["dijit._base.popup"]){_4._hasResource["dijit._base.popup"]=true;_4.provide("dijit._base.popup");_5.popup={_stack:[],_beginZIndex:1000,_idGen:1,_createWrapper:function(_466){var _467=_466.declaredClass?_466._popupWrapper:(_466.parentNode&&_4.hasClass(_466.parentNode,"dijitPopup")),node=_466.domNode||_466;if(!_467){_467=_4.create("div",{"class":"dijitPopup",style:{display:"none"},role:"presentation"},_4.body());_467.appendChild(node);var s=node.style;s.display="";s.visibility="";s.position="";s.top="0px";if(_466.declaredClass){_466._popupWrapper=_467;_4.connect(_466,"destroy",function(){_4.destroy(_467);delete _466._popupWrapper;});}}return _467;},moveOffScreen:function(_468){var _469=this._createWrapper(_468);_4.style(_469,{visibility:"hidden",top:"-9999px",display:""});},hide:function(_46a){var _46b=this._createWrapper(_46a);_4.style(_46b,"display","none");},getTopPopup:function(){var _46c=this._stack;for(var pi=_46c.length-1;pi>0&&_46c[pi].parent===_46c[pi-1].widget;pi--){}return _46c[pi];},open:function(args){var _46d=this._stack,_46e=args.popup,_46f=args.orient||((args.parent?args.parent.isLeftToRight():_4._isBodyLtr())?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"}),_470=args.around,id=(args.around&&args.around.id)?(args.around.id+"_dropdown"):("popup_"+this._idGen++);while(_46d.length&&(!args.parent||!_4.isDescendant(args.parent.domNode,_46d[_46d.length-1].widget.domNode))){_5.popup.close(_46d[_46d.length-1].widget);}var _471=this._createWrapper(_46e);_4.attr(_471,{id:id,style:{zIndex:this._beginZIndex+_46d.length},"class":"dijitPopup "+(_46e.baseClass||_46e["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:args.parent?args.parent.id:""});if(_4.isIE||_4.isMoz){if(!_46e.bgIframe){_46e.bgIframe=new _5.BackgroundIframe(_471);}}var best=_470?_5.placeOnScreenAroundElement(_471,_470,_46f,_46e.orient?_4.hitch(_46e,"orient"):null):_5.placeOnScreen(_471,args,_46f=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],args.padding);_471.style.display="";_471.style.visibility="visible";_46e.domNode.style.visibility="visible";var _472=[];_472.push(_4.connect(_471,"onkeypress",this,function(evt){if(evt.charOrCode==_4.keys.ESCAPE&&args.onCancel){_4.stopEvent(evt);args.onCancel();}else{if(evt.charOrCode===_4.keys.TAB){_4.stopEvent(evt);var _473=this.getTopPopup();if(_473&&_473.onCancel){_473.onCancel();}}}}));if(_46e.onCancel){_472.push(_4.connect(_46e,"onCancel",args.onCancel));}_472.push(_4.connect(_46e,_46e.onExecute?"onExecute":"onChange",this,function(){var _474=this.getTopPopup();if(_474&&_474.onExecute){_474.onExecute();}}));_46d.push({widget:_46e,parent:args.parent,onExecute:args.onExecute,onCancel:args.onCancel,onClose:args.onClose,handlers:_472});if(_46e.onOpen){_46e.onOpen(best);}return best;},close:function(_475){var _476=this._stack;while((_475&&_4.some(_476,function(elem){return elem.widget==_475;}))||(!_475&&_476.length)){var top=_476.pop(),_477=top.widget,_478=top.onClose;if(_477.onClose){_477.onClose();}_4.forEach(top.handlers,_4.disconnect);if(_477&&_477.domNode){this.hide(_477);}if(_478){_478();}}}};_5._frames=new function(){var _479=[];this.pop=function(){var _47a;if(_479.length){_47a=_479.pop();_47a.style.display="";}else{if(_4.isIE<9){var burl=_4.config["dojoBlankHtmlUrl"]||(_4.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\");'>";_47a=_4.doc.createElement(html);}else{_47a=_4.create("iframe");_47a.src="javascript:\"\"";_47a.className="dijitBackgroundIframe";_4.style(_47a,"opacity",0.1);}_47a.tabIndex=-1;_5.setWaiRole(_47a,"presentation");}return _47a;};this.push=function(_47b){_47b.style.display="none";_479.push(_47b);};}();_5.BackgroundIframe=function(node){if(!node.id){throw new Error("no id");}if(_4.isIE||_4.isMoz){var _47c=(this.iframe=_5._frames.pop());node.appendChild(_47c);if(_4.isIE<7||_4.isQuirks){this.resize(node);this._conn=_4.connect(node,"onresize",this,function(){this.resize(node);});}else{_4.style(_47c,{width:"100%",height:"100%"});}}};_4.extend(_5.BackgroundIframe,{resize:function(node){if(this.iframe){_4.style(this.iframe,{width:node.offsetWidth+"px",height:node.offsetHeight+"px"});}},destroy:function(){if(this._conn){_4.disconnect(this._conn);this._conn=null;}if(this.iframe){_5._frames.push(this.iframe);delete this.iframe;}}});}if(!_4._hasResource["dijit._base.scroll"]){_4._hasResource["dijit._base.scroll"]=true;_4.provide("dijit._base.scroll");_5.scrollIntoView=function(node,pos){_4.window.scrollIntoView(node,pos);};}if(!_4._hasResource["dojo.uacss"]){_4._hasResource["dojo.uacss"]=true;_4.provide("dojo.uacss");(function(){var d=_4,html=d.doc.documentElement,ie=d.isIE,_47d=d.isOpera,maj=Math.floor,ff=d.isFF,_47e=d.boxModel.replace(/-/,""),_47f={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:_47d,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};_47f["dj_"+_47e]=true;var _480="";for(var clz in _47f){if(_47f[clz]){_480+=clz+" ";}}html.className=d.trim(html.className+" "+_480);_4._loaders.unshift(function(){if(!_4._isBodyLtr()){var _481="dj_rtl dijitRtl "+_480.replace(/ /g,"-rtl ");html.className=d.trim(html.className+" "+_481);}});})();}if(!_4._hasResource["dijit._base.sniff"]){_4._hasResource["dijit._base.sniff"]=true;_4.provide("dijit._base.sniff");}if(!_4._hasResource["dijit._base.typematic"]){_4._hasResource["dijit._base.typematic"]=true;_4.provide("dijit._base.typematic");_5.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(_4.hitch(this,"_fireEventAndReload"),this._currentTimeout);},trigger:function(evt,_482,node,_483,obj,_484,_485,_486){if(obj!=this._obj){this.stop();this._initialDelay=_485||500;this._subsequentDelay=_484||0.9;this._minDelay=_486||10;this._obj=obj;this._evt=evt;this._node=node;this._currentTimeout=-1;this._count=-1;this._callback=_4.hitch(_482,_483);this._fireEventAndReload();this._evt=_4.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,_487,_488,_489,_48a,_48b,_48c){if(_487.keyCode){_487.charOrCode=_487.keyCode;_4.deprecated("keyCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}else{if(_487.charCode){_487.charOrCode=String.fromCharCode(_487.charCode);_4.deprecated("charCode attribute parameter for dijit.typematic.addKeyListener is deprecated. Use charOrCode instead.","","2.0");}}return [_4.connect(node,"onkeypress",this,function(evt){if(evt.charOrCode==_487.charOrCode&&(_487.ctrlKey===undefined||_487.ctrlKey==evt.ctrlKey)&&(_487.altKey===undefined||_487.altKey==evt.altKey)&&(_487.metaKey===undefined||_487.metaKey==(evt.metaKey||false))&&(_487.shiftKey===undefined||_487.shiftKey==evt.shiftKey)){_4.stopEvent(evt);_5.typematic.trigger(evt,_488,node,_489,_487,_48a,_48b,_48c);}else{if(_5.typematic._obj==_487){_5.typematic.stop();}}}),_4.connect(node,"onkeyup",this,function(evt){if(_5.typematic._obj==_487){_5.typematic.stop();}})];},addMouseListener:function(node,_48d,_48e,_48f,_490,_491){var dc=_4.connect;return [dc(node,"mousedown",this,function(evt){_4.stopEvent(evt);_5.typematic.trigger(evt,_48d,node,_48e,node,_48f,_490,_491);}),dc(node,"mouseup",this,function(evt){_4.stopEvent(evt);_5.typematic.stop();}),dc(node,"mouseout",this,function(evt){_4.stopEvent(evt);_5.typematic.stop();}),dc(node,"mousemove",this,function(evt){evt.preventDefault();}),dc(node,"dblclick",this,function(evt){_4.stopEvent(evt);if(_4.isIE){_5.typematic.trigger(evt,_48d,node,_48e,node,_48f,_490,_491);setTimeout(_4.hitch(this,_5.typematic.stop),50);}})];},addListener:function(_492,_493,_494,_495,_496,_497,_498,_499){return this.addKeyListener(_493,_494,_495,_496,_497,_498,_499).concat(this.addMouseListener(_492,_495,_496,_497,_498,_499));}};}if(!_4._hasResource["dijit._base.wai"]){_4._hasResource["dijit._base.wai"]=true;_4.provide("dijit._base.wai");_5.wai={onload:function(){var div=_4.create("div",{id:"a11yTestNode",style:{cssText:"border: 1px solid;"+"border-color:red green;"+"position: absolute;"+"height: 5px;"+"top: -999px;"+"background-image: url(\""+(_4.config.blankGif||_4.moduleUrl("dojo","resources/blank.gif"))+"\");"}},_4.body());var cs=_4.getComputedStyle(div);if(cs){var _49a=cs.backgroundImage;var _49b=(cs.borderTopColor==cs.borderRightColor)||(_49a!=null&&(_49a=="none"||_49a=="url(invalid-url:)"));_4[_49b?"addClass":"removeClass"](_4.body(),"dijit_a11y");if(_4.isIE){div.outerHTML="";}else{_4.body().removeChild(div);}}}};if(_4.isIE||_4.isMoz){_4._loaders.unshift(_5.wai.onload);}_4.mixin(_5,{hasWaiRole:function(elem,role){var _49c=this.getWaiRole(elem);return role?(_49c.indexOf(role)>-1):(_49c.length>0);},getWaiRole:function(elem){return _4.trim((_4.attr(elem,"role")||"").replace("wairole:",""));},setWaiRole:function(elem,role){_4.attr(elem,"role",role);},removeWaiRole:function(elem,role){var _49d=_4.attr(elem,"role");if(!_49d){return;}if(role){var t=_4.trim((" "+_49d+" ").replace(" "+role+" "," "));_4.attr(elem,"role",t);}else{elem.removeAttribute("role");}},hasWaiState:function(elem,_49e){return elem.hasAttribute?elem.hasAttribute("aria-"+_49e):!!elem.getAttribute("aria-"+_49e);},getWaiState:function(elem,_49f){return elem.getAttribute("aria-"+_49f)||"";},setWaiState:function(elem,_4a0,_4a1){elem.setAttribute("aria-"+_4a0,_4a1);},removeWaiState:function(elem,_4a2){elem.removeAttribute("aria-"+_4a2);}});}if(!_4._hasResource["dijit._base"]){_4._hasResource["dijit._base"]=true;_4.provide("dijit._base");}if(!_4._hasResource["dijit._Widget"]){_4._hasResource["dijit._Widget"]=true;_4.provide("dijit._Widget");_4.connect(_4,"_connect",function(_4a3,_4a4){if(_4a3&&_4.isFunction(_4a3._onConnect)){_4a3._onConnect(_4a4);}});_5._connectOnUseEventHandler=function(_4a5){};_5._lastKeyDownNode=null;if(_4.isIE){(function(){var _4a6=function(evt){_5._lastKeyDownNode=evt.srcElement;};_4.doc.attachEvent("onkeydown",_4a6);_4.addOnWindowUnload(function(){_4.doc.detachEvent("onkeydown",_4a6);});})();}else{_4.doc.addEventListener("keydown",function(evt){_5._lastKeyDownNode=evt.target;},true);}(function(){_4.declare("dijit._Widget",_5._WidgetBase,{_deferredConnects:{onClick:"",onDblClick:"",onKeyDown:"",onKeyPress:"",onKeyUp:"",onMouseMove:"",onMouseDown:"",onMouseOut:"",onMouseOver:"",onMouseLeave:"",onMouseEnter:"",onMouseUp:""},onClick:_5._connectOnUseEventHandler,onDblClick:_5._connectOnUseEventHandler,onKeyDown:_5._connectOnUseEventHandler,onKeyPress:_5._connectOnUseEventHandler,onKeyUp:_5._connectOnUseEventHandler,onMouseDown:_5._connectOnUseEventHandler,onMouseMove:_5._connectOnUseEventHandler,onMouseOut:_5._connectOnUseEventHandler,onMouseOver:_5._connectOnUseEventHandler,onMouseLeave:_5._connectOnUseEventHandler,onMouseEnter:_5._connectOnUseEventHandler,onMouseUp:_5._connectOnUseEventHandler,create:function(_4a7,_4a8){this._deferredConnects=_4.clone(this._deferredConnects);for(var attr in this.attributeMap){delete this._deferredConnects[attr];}for(attr in this._deferredConnects){if(this[attr]!==_5._connectOnUseEventHandler){delete this._deferredConnects[attr];}}this.inherited(arguments);if(this.domNode){for(attr in this.params){this._onConnect(attr);}}},_onConnect:function(_4a9){if(_4a9 in this._deferredConnects){var _4aa=this[this._deferredConnects[_4a9]||"domNode"];this.connect(_4aa,_4a9.toLowerCase(),_4a9);delete this._deferredConnects[_4a9];}},focused:false,isFocusable:function(){return this.focus&&(_4.style(this.domNode,"display")!="none");},onFocus:function(){},onBlur:function(){},_onFocus:function(e){this.onFocus();},_onBlur:function(){this.onBlur();},setAttribute:function(attr,_4ab){_4.deprecated(this.declaredClass+"::setAttribute(attr, value) is deprecated. Use set() instead.","","2.0");this.set(attr,_4ab);},attr:function(name,_4ac){if(_4.config.isDebug){var _4ad=arguments.callee._ach||(arguments.callee._ach={}),_4ae=(arguments.callee.caller||"unknown caller").toString();if(!_4ad[_4ae]){_4.deprecated(this.declaredClass+"::attr() is deprecated. Use get() or set() instead, called from "+_4ae,"","2.0");_4ad[_4ae]=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,_4af,_4b0){var d=_4,dc=d._connect,_4b1=this.inherited(arguments,[obj,_4af=="ondijitclick"?"onclick":_4af,_4b0]);if(_4af=="ondijitclick"){if(d.indexOf(this.nodesWithKeyClick,obj.nodeName.toLowerCase())==-1){var m=d.hitch(this,_4b0);_4b1.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){_5._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==_5._lastKeyDownNode&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey){_5._lastKeyDownNode=null;return m(e);}}));}}return _4b1;},_onShow:function(){this.onShow();},onShow:function(){},onHide:function(){},onClose:function(){return true;}});})();}if(!_4._hasResource["dojo.date.stamp"]){_4._hasResource["dojo.date.stamp"]=true;_4.provide("dojo.date.stamp");_4.getObject("date.stamp",true,_4);_4.date.stamp.fromISOString=function(_4b2,_4b3){if(!_4.date.stamp._isoRegExp){_4.date.stamp._isoRegExp=/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(.\d+)?)?((?:[+-](\d{2}):(\d{2}))|Z)?)?$/;}var _4b4=_4.date.stamp._isoRegExp.exec(_4b2),_4b5=null;if(_4b4){_4b4.shift();if(_4b4[1]){_4b4[1]--;}if(_4b4[6]){_4b4[6]*=1000;}if(_4b3){_4b3=new Date(_4b3);_4.forEach(_4.map(["FullYear","Month","Date","Hours","Minutes","Seconds","Milliseconds"],function(prop){return _4b3["get"+prop]();}),function(_4b6,_4b7){_4b4[_4b7]=_4b4[_4b7]||_4b6;});}_4b5=new Date(_4b4[0]||1970,_4b4[1]||0,_4b4[2]||1,_4b4[3]||0,_4b4[4]||0,_4b4[5]||0,_4b4[6]||0);if(_4b4[0]<100){_4b5.setFullYear(_4b4[0]||1970);}var _4b8=0,_4b9=_4b4[7]&&_4b4[7].charAt(0);if(_4b9!="Z"){_4b8=((_4b4[8]||0)*60)+(Number(_4b4[9])||0);if(_4b9!="-"){_4b8*=-1;}}if(_4b9){_4b8-=_4b5.getTimezoneOffset();}if(_4b8){_4b5.setTime(_4b5.getTime()+_4b8*60000);}}return _4b5;};_4.date.stamp.toISOString=function(_4ba,_4bb){var _4bc=function(n){return (n<10)?"0"+n:n;};_4bb=_4bb||{};var _4bd=[],_4be=_4bb.zulu?"getUTC":"get",date="";if(_4bb.selector!="time"){var year=_4ba[_4be+"FullYear"]();date=["0000".substr((year+"").length)+year,_4bc(_4ba[_4be+"Month"]()+1),_4bc(_4ba[_4be+"Date"]())].join("-");}_4bd.push(date);if(_4bb.selector!="date"){var time=[_4bc(_4ba[_4be+"Hours"]()),_4bc(_4ba[_4be+"Minutes"]()),_4bc(_4ba[_4be+"Seconds"]())].join(":");var _4bf=_4ba[_4be+"Milliseconds"]();if(_4bb.milliseconds){time+="."+(_4bf<100?"0":"")+_4bc(_4bf);}if(_4bb.zulu){time+="Z";}else{if(_4bb.selector!="time"){var _4c0=_4ba.getTimezoneOffset();var _4c1=Math.abs(_4c0);time+=(_4c0>0?"-":"+")+_4bc(Math.floor(_4c1/60))+":"+_4bc(_4c1%60);}}_4bd.push(time);}return _4bd.join("T");};}if(!_4._hasResource["dojo.parser"]){_4._hasResource["dojo.parser"]=true;_4.provide("dojo.parser");new Date("X");_4.parser=new function(){var d=_4;function _4c2(_4c3){if(d.isString(_4c3)){return "string";}if(typeof _4c3=="number"){return "number";}if(typeof _4c3=="boolean"){return "boolean";}if(d.isFunction(_4c3)){return "function";}if(d.isArray(_4c3)){return "array";}if(_4c3 instanceof Date){return "date";}if(_4c3 instanceof d._Url){return "url";}return "object";};function _4c4(_4c5,type){switch(type){case "string":return _4c5;case "number":return _4c5.length?Number(_4c5):NaN;case "boolean":return typeof _4c5=="boolean"?_4c5:!(_4c5.toLowerCase()=="false");case "function":if(d.isFunction(_4c5)){_4c5=_4c5.toString();_4c5=d.trim(_4c5.substring(_4c5.indexOf("{")+1,_4c5.length-1));}try{if(_4c5===""||_4c5.search(/[^\w\.]+/i)!=-1){return new Function(_4c5);}else{return d.getObject(_4c5,false)||new Function(_4c5);}}catch(e){return new Function();}case "array":return _4c5?_4c5.split(/\s*,\s*/):[];case "date":switch(_4c5){case "":return new Date("");case "now":return new Date();default:return d.date.stamp.fromISOString(_4c5);}case "url":return d.baseUrl+_4c5;default:return d.fromJson(_4c5);}};var _4c6={},_4c7={};d.connect(d,"extend",function(){_4c7={};});function _4c8(cls,_4c9){for(var name in cls){if(name.charAt(0)=="_"){continue;}if(name in _4c6){continue;}_4c9[name]=_4c2(cls[name]);}return _4c9;};function _4ca(_4cb,_4cc){var c=_4c7[_4cb];if(!c){var cls=d.getObject(_4cb),_4cd=null;if(!cls){return null;}if(!_4cc){_4cd=_4c8(cls.prototype,{});}c={cls:cls,params:_4cd};}else{if(!_4cc&&!c.params){c.params=_4c8(c.cls.prototype,{});}}return c;};this._functionFromScript=function(_4ce,_4cf){var _4d0="";var _4d1="";var _4d2=(_4ce.getAttribute(_4cf+"args")||_4ce.getAttribute("args"));if(_4d2){d.forEach(_4d2.split(/\s*,\s*/),function(part,idx){_4d0+="var "+part+" = arguments["+idx+"]; ";});}var _4d3=_4ce.getAttribute("with");if(_4d3&&_4d3.length){d.forEach(_4d3.split(/\s*,\s*/),function(part){_4d0+="with("+part+"){";_4d1+="}";});}return new Function(_4d0+_4ce.innerHTML+_4d1);};this.instantiate=function(_4d4,_4d5,args){var _4d6=[],_4d5=_4d5||{};args=args||{};var _4d7=(args.scope||d._scopeName)+"Type",_4d8="data-"+(args.scope||d._scopeName)+"-";d.forEach(_4d4,function(obj){if(!obj){return;}var node,type,_4d9,_4da,_4db,_4dc;if(obj.node){node=obj.node;type=obj.type;_4dc=obj.fastpath;_4d9=obj.clsInfo||(type&&_4ca(type,_4dc));_4da=_4d9&&_4d9.cls;_4db=obj.scripts;}else{node=obj;type=_4d7 in _4d5?_4d5[_4d7]:node.getAttribute(_4d7);_4d9=type&&_4ca(type);_4da=_4d9&&_4d9.cls;_4db=(_4da&&(_4da._noScript||_4da.prototype._noScript)?[]:d.query("> script[type^='dojo/']",node));}if(!_4d9){throw new Error("Could not load class '"+type);}var _4dd={};if(args.defaults){d._mixin(_4dd,args.defaults);}if(obj.inherited){d._mixin(_4dd,obj.inherited);}if(_4dc){var _4de=node.getAttribute(_4d8+"props");if(_4de&&_4de.length){try{_4de=d.fromJson.call(args.propsThis,"{"+_4de+"}");d._mixin(_4dd,_4de);}catch(e){throw new Error(e.toString()+" in data-dojo-props='"+_4de+"'");}}var _4df=node.getAttribute(_4d8+"attach-point");if(_4df){_4dd.dojoAttachPoint=_4df;}var _4e0=node.getAttribute(_4d8+"attach-event");if(_4e0){_4dd.dojoAttachEvent=_4e0;}_4.mixin(_4dd,_4d5);}else{var _4e1=node.attributes;for(var name in _4d9.params){var item=name in _4d5?{value:_4d5[name],specified:true}:_4e1.getNamedItem(name);if(!item||(!item.specified&&(!_4.isIE||name.toLowerCase()!="value"))){continue;}var _4e2=item.value;switch(name){case "class":_4e2="className" in _4d5?_4d5.className:node.className;break;case "style":_4e2="style" in _4d5?_4d5.style:(node.style&&node.style.cssText);}var _4e3=_4d9.params[name];if(typeof _4e2=="string"){_4dd[name]=_4c4(_4e2,_4e3);}else{_4dd[name]=_4e2;}}}var _4e4=[],_4e5=[];d.forEach(_4db,function(_4e6){node.removeChild(_4e6);var _4e7=(_4e6.getAttribute(_4d8+"event")||_4e6.getAttribute("event")),type=_4e6.getAttribute("type"),nf=d.parser._functionFromScript(_4e6,_4d8);if(_4e7){if(type=="dojo/connect"){_4e4.push({event:_4e7,func:nf});}else{_4dd[_4e7]=nf;}}else{_4e5.push(nf);}});var _4e8=_4da.markupFactory||_4da.prototype&&_4da.prototype.markupFactory;var _4e9=_4e8?_4e8(_4dd,node,_4da):new _4da(_4dd,node);_4d6.push(_4e9);var _4ea=(node.getAttribute(_4d8+"id")||node.getAttribute("jsId"));if(_4ea){d.setObject(_4ea,_4e9);}d.forEach(_4e4,function(_4eb){d.connect(_4e9,_4eb.event,null,_4eb.func);});d.forEach(_4e5,function(func){func.call(_4e9);});});if(!_4d5._started){d.forEach(_4d6,function(_4ec){if(!args.noStart&&_4ec&&_4.isFunction(_4ec.startup)&&!_4ec._started&&(!_4ec.getParent||!_4ec.getParent())){_4ec.startup();}});}return _4d6;};this.parse=function(_4ed,args){var root;if(!args&&_4ed&&_4ed.rootNode){args=_4ed;root=args.rootNode;}else{root=_4ed;}root=root?_4.byId(root):_4.body();args=args||{};var _4ee=(args.scope||d._scopeName)+"Type",_4ef="data-"+(args.scope||d._scopeName)+"-";function scan(_4f0,list){var _4f1=_4.clone(_4f0.inherited);_4.forEach(["dir","lang"],function(name){var val=_4f0.node.getAttribute(name);if(val){_4f1[name]=val;}});var _4f2=_4f0.clsInfo&&!_4f0.clsInfo.cls.prototype._noScript?_4f0.scripts:null;var _4f3=(!_4f0.clsInfo||!_4f0.clsInfo.cls.prototype.stopParser)||(args&&args.template);for(var _4f4=_4f0.node.firstChild;_4f4;_4f4=_4f4.nextSibling){if(_4f4.nodeType==1){var type,_4f5=_4f3&&_4f4.getAttribute(_4ef+"type");if(_4f5){type=_4f5;}else{type=_4f3&&_4f4.getAttribute(_4ee);}var _4f6=_4f5==type;if(type){var _4f7={"type":type,fastpath:_4f6,clsInfo:_4ca(type,_4f6),node:_4f4,scripts:[],inherited:_4f1};list.push(_4f7);scan(_4f7,list);}else{if(_4f2&&_4f4.nodeName.toLowerCase()=="script"){type=_4f4.getAttribute("type");if(type&&/^dojo\/\w/i.test(type)){_4f2.push(_4f4);}}else{if(_4f3){scan({node:_4f4,inherited:_4f1},list);}}}}}};var _4f8={};if(args&&args.inherited){for(var key in args.inherited){if(args.inherited[key]){_4f8[key]=args.inherited[key];}}}var list=[];scan({node:root,inherited:_4f8},list);var _4f9=args&&args.template?{template:true}:null;return this.instantiate(list,_4f9,args);};}();(function(){var _4fa=function(){if(_4.config.parseOnLoad){_4.parser.parse();}};if(_4.getObject("dijit.wai.onload")===_4._loaders[0]){_4._loaders.splice(1,0,_4fa);}else{_4._loaders.unshift(_4fa);}})();}if(!_4._hasResource["dojo.cache"]){_4._hasResource["dojo.cache"]=true;_4.provide("dojo.cache");var _4fb={};_4.cache=function(_4fc,url,_4fd){if(typeof _4fc=="string"){var _4fe=_4.moduleUrl(_4fc,url);}else{_4fe=_4fc;_4fd=url;}var key=_4fe.toString();var val=_4fd;if(_4fd!=undefined&&!_4.isString(_4fd)){val=("value" in _4fd?_4fd.value:undefined);}var _4ff=_4fd&&_4fd.sanitize?true:false;if(typeof val=="string"){val=_4fb[key]=_4ff?_4.cache._sanitize(val):val;}else{if(val===null){delete _4fb[key];}else{if(!(key in _4fb)){val=_4._getText(key);_4fb[key]=_4ff?_4.cache._sanitize(val):val;}val=_4fb[key];}}return val;};_4.cache._sanitize=function(val){if(val){val=val.replace(/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,"");var _500=val.match(/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im);if(_500){val=_500[1];}}else{val="";}return val;};}if(!_4._hasResource["dijit._Templated"]){_4._hasResource["dijit._Templated"]=true;_4.provide("dijit._Templated");_4.declare("dijit._Templated",null,{templateString:null,templatePath:null,widgetsInTemplate:false,_skipNodeCache:false,_earlyTemplatedStartup:false,constructor:function(){this._attachPoints=[];this._attachEvents=[];},_stringRepl:function(tmpl){var _501=this.declaredClass,_502=this;return _4.string.substitute(tmpl,this,function(_503,key){if(key.charAt(0)=="!"){_503=_4.getObject(key.substr(1),false,_502);}if(typeof _503=="undefined"){throw new Error(_501+" template:"+key);}if(_503==null){return "";}return key.charAt(0)=="!"?_503:_503.toString().replace(/"/g,"&quot;");},this);},buildRendering:function(){var _504=_5._Templated.getCachedTemplate(this.templatePath,this.templateString,this._skipNodeCache);var node;if(_4.isString(_504)){node=_4._toDom(this._stringRepl(_504));if(node.nodeType!=1){throw new Error("Invalid template: "+_504);}}else{node=_504.cloneNode(true);}this.domNode=node;this.inherited(arguments);this._attachTemplateNodes(node);if(this.widgetsInTemplate){var cw=(this._startupWidgets=_4.parser.parse(node,{noStart:!this._earlyTemplatedStartup,template:true,inherited:{dir:this.dir,lang:this.lang},propsThis:this,scope:"dojo"}));this._supportingWidgets=_5.findWidgets(node);this._attachTemplateNodes(cw,function(n,p){return n[p];});}this._fillContent(this.srcNodeRef);},_fillContent:function(_505){var dest=this.containerNode;if(_505&&dest){while(_505.hasChildNodes()){dest.appendChild(_505.firstChild);}}},_attachTemplateNodes:function(_506,_507){_507=_507||function(n,p){return n.getAttribute(p);};var _508=_4.isArray(_506)?_506:(_506.all||_506.getElementsByTagName("*"));var x=_4.isArray(_506)?0:-1;for(;x<_508.length;x++){var _509=(x==-1)?_506:_508[x];if(this.widgetsInTemplate&&(_507(_509,"dojoType")||_507(_509,"data-dojo-type"))){continue;}var _50a=_507(_509,"dojoAttachPoint")||_507(_509,"data-dojo-attach-point");if(_50a){var _50b,_50c=_50a.split(/\s*,\s*/);while((_50b=_50c.shift())){if(_4.isArray(this[_50b])){this[_50b].push(_509);}else{this[_50b]=_509;}this._attachPoints.push(_50b);}}var _50d=_507(_509,"dojoAttachEvent")||_507(_509,"data-dojo-attach-event");if(_50d){var _50e,_50f=_50d.split(/\s*,\s*/);var trim=_4.trim;while((_50e=_50f.shift())){if(_50e){var _510=null;if(_50e.indexOf(":")!=-1){var _511=_50e.split(":");_50e=trim(_511[0]);_510=trim(_511[1]);}else{_50e=trim(_50e);}if(!_510){_510=_50e;}this._attachEvents.push(this.connect(_509,_50e,_510));}}}var role=_507(_509,"waiRole");if(role){_5.setWaiRole(_509,role);}var _512=_507(_509,"waiState");if(_512){_4.forEach(_512.split(/\s*,\s*/),function(_513){if(_513.indexOf("-")!=-1){var pair=_513.split("-");_5.setWaiState(_509,pair[0],pair[1]);}});}}},startup:function(){_4.forEach(this._startupWidgets,function(w){if(w&&!w._started&&w.startup){w.startup();}});this.inherited(arguments);},destroyRendering:function(){_4.forEach(this._attachPoints,function(_514){delete this[_514];},this);this._attachPoints=[];_4.forEach(this._attachEvents,this.disconnect,this);this._attachEvents=[];this.inherited(arguments);}});_5._Templated._templateCache={};_5._Templated.getCachedTemplate=function(_515,_516,_517){var _518=_5._Templated._templateCache;var key=_516||_515;var _519=_518[key];if(_519){try{if(!_519.ownerDocument||_519.ownerDocument==_4.doc){return _519;}}catch(e){}_4.destroy(_519);}if(!_516){_516=_4.cache(_515,{sanitize:true});}_516=_4.string.trim(_516);if(_517||_516.match(/\$\{([^\}]+)\}/g)){return (_518[key]=_516);}else{var node=_4._toDom(_516);if(node.nodeType!=1){throw new Error("Invalid template: "+_516);}return (_518[key]=node);}};if(_4.isIE){_4.addOnWindowUnload(function(){var _51a=_5._Templated._templateCache;for(var key in _51a){var _51b=_51a[key];if(typeof _51b=="object"){_4.destroy(_51b);}delete _51a[key];}});}_4.extend(_5._Widget,{dojoAttachEvent:"",dojoAttachPoint:"",waiRole:"",waiState:""});}if(!_4._hasResource["dojo.number"]){_4._hasResource["dojo.number"]=true;_4.provide("dojo.number");_4.getObject("number",true,_4);_4.number.format=function(_51c,_51d){_51d=_4.mixin({},_51d||{});var _51e=_4.i18n.normalizeLocale(_51d.locale),_51f=_4.i18n.getLocalization("dojo.cldr","number",_51e);_51d.customs=_51f;var _520=_51d.pattern||_51f[(_51d.type||"decimal")+"Format"];if(isNaN(_51c)||Math.abs(_51c)==Infinity){return null;}return _4.number._applyPattern(_51c,_520,_51d);};_4.number._numberPatternRE=/[#0,]*[#0](?:\.0*#*)?/;_4.number._applyPattern=function(_521,_522,_523){_523=_523||{};var _524=_523.customs.group,_525=_523.customs.decimal,_526=_522.split(";"),_527=_526[0];_522=_526[(_521<0)?1:0]||("-"+_527);if(_522.indexOf("%")!=-1){_521*=100;}else{if(_522.indexOf("‰")!=-1){_521*=1000;}else{if(_522.indexOf("¤")!=-1){_524=_523.customs.currencyGroup||_524;_525=_523.customs.currencyDecimal||_525;_522=_522.replace(/\u00a4{1,3}/,function(_528){var prop=["symbol","currency","displayName"][_528.length-1];return _523[prop]||_523.currency||"";});}else{if(_522.indexOf("E")!=-1){throw new Error("exponential notation not supported");}}}}var _529=_4.number._numberPatternRE;var _52a=_527.match(_529);if(!_52a){throw new Error("unable to find a number expression in pattern: "+_522);}if(_523.fractional===false){_523.places=0;}return _522.replace(_529,_4.number._formatAbsolute(_521,_52a[0],{decimal:_525,group:_524,places:_523.places,round:_523.round}));};_4.number.round=function(_52b,_52c,_52d){var _52e=10/(_52d||10);return (_52e*+_52b).toFixed(_52c)/_52e;};if((0.9).toFixed()==0){(function(){var _52f=_4.number.round;_4.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 _52f(v,p,m)+(v>0?d:-d);};})();}_4.number._formatAbsolute=function(_530,_531,_532){_532=_532||{};if(_532.places===true){_532.places=0;}if(_532.places===Infinity){_532.places=6;}var _533=_531.split("."),_534=typeof _532.places=="string"&&_532.places.indexOf(","),_535=_532.places;if(_534){_535=_532.places.substring(_534+1);}else{if(!(_535>=0)){_535=(_533[1]||[]).length;}}if(!(_532.round<0)){_530=_4.number.round(_530,_535,_532.round);}var _536=String(Math.abs(_530)).split("."),_537=_536[1]||"";if(_533[1]||_532.places){if(_534){_532.places=_532.places.substring(0,_534);}var pad=_532.places!==undefined?_532.places:(_533[1]&&_533[1].lastIndexOf("0")+1);if(pad>_537.length){_536[1]=_4.string.pad(_537,pad,"0",true);}if(_535<_537.length){_536[1]=_537.substr(0,_535);}}else{if(_536[1]){_536.pop();}}var _538=_533[0].replace(",","");pad=_538.indexOf("0");if(pad!=-1){pad=_538.length-pad;if(pad>_536[0].length){_536[0]=_4.string.pad(_536[0],pad);}if(_538.indexOf("#")==-1){_536[0]=_536[0].substr(_536[0].length-pad);}}var _539=_533[0].lastIndexOf(","),_53a,_53b;if(_539!=-1){_53a=_533[0].length-_539-1;var _53c=_533[0].substr(0,_539);_539=_53c.lastIndexOf(",");if(_539!=-1){_53b=_53c.length-_539-1;}}var _53d=[];for(var _53e=_536[0];_53e;){var off=_53e.length-_53a;_53d.push((off>0)?_53e.substr(off):_53e);_53e=(off>0)?_53e.slice(0,off):"";if(_53b){_53a=_53b;delete _53b;}}_536[0]=_53d.reverse().join(_532.group||",");return _536.join(_532.decimal||".");};_4.number.regexp=function(_53f){return _4.number._parseInfo(_53f).regexp;};_4.number._parseInfo=function(_540){_540=_540||{};var _541=_4.i18n.normalizeLocale(_540.locale),_542=_4.i18n.getLocalization("dojo.cldr","number",_541),_543=_540.pattern||_542[(_540.type||"decimal")+"Format"],_544=_542.group,_545=_542.decimal,_546=1;if(_543.indexOf("%")!=-1){_546/=100;}else{if(_543.indexOf("‰")!=-1){_546/=1000;}else{var _547=_543.indexOf("¤")!=-1;if(_547){_544=_542.currencyGroup||_544;_545=_542.currencyDecimal||_545;}}}var _548=_543.split(";");if(_548.length==1){_548.push("-"+_548[0]);}var re=_4.regexp.buildGroupRE(_548,function(_549){_549="(?:"+_4.regexp.escapeString(_549,".")+")";return _549.replace(_4.number._numberPatternRE,function(_54a){var _54b={signed:false,separator:_540.strict?_544:[_544,""],fractional:_540.fractional,decimal:_545,exponent:false},_54c=_54a.split("."),_54d=_540.places;if(_54c.length==1&&_546!=1){_54c[1]="###";}if(_54c.length==1||_54d===0){_54b.fractional=false;}else{if(_54d===undefined){_54d=_540.pattern?_54c[1].lastIndexOf("0")+1:Infinity;}if(_54d&&_540.fractional==undefined){_54b.fractional=true;}if(!_540.places&&(_54d<_54c[1].length)){_54d+=","+_54c[1].length;}_54b.places=_54d;}var _54e=_54c[0].split(",");if(_54e.length>1){_54b.groupSize=_54e.pop().length;if(_54e.length>1){_54b.groupSize2=_54e.pop().length;}}return "("+_4.number._realNumberRegexp(_54b)+")";});},true);if(_547){re=re.replace(/([\s\xa0]*)(\u00a4{1,3})([\s\xa0]*)/g,function(_54f,_550,_551,_552){var prop=["symbol","currency","displayName"][_551.length-1],_553=_4.regexp.escapeString(_540[prop]||_540.currency||"");_550=_550?"[\\s\\xa0]":"";_552=_552?"[\\s\\xa0]":"";if(!_540.strict){if(_550){_550+="*";}if(_552){_552+="*";}return "(?:"+_550+_553+_552+")?";}return _550+_553+_552;});}return {regexp:re.replace(/[\xa0 ]/g,"[\\s\\xa0]"),group:_544,decimal:_545,factor:_546};};_4.number.parse=function(_554,_555){var info=_4.number._parseInfo(_555),_556=(new RegExp("^"+info.regexp+"$")).exec(_554);if(!_556){return NaN;}var _557=_556[1];if(!_556[1]){if(!_556[2]){return NaN;}_557=_556[2];info.factor*=-1;}_557=_557.replace(new RegExp("["+info.group+"\\s\\xa0"+"]","g"),"").replace(info.decimal,".");return _557*info.factor;};_4.number._realNumberRegexp=function(_558){_558=_558||{};if(!("places" in _558)){_558.places=Infinity;}if(typeof _558.decimal!="string"){_558.decimal=".";}if(!("fractional" in _558)||/^0/.test(_558.places)){_558.fractional=[true,false];}if(!("exponent" in _558)){_558.exponent=[true,false];}if(!("eSigned" in _558)){_558.eSigned=[true,false];}var _559=_4.number._integerRegexp(_558),_55a=_4.regexp.buildGroupRE(_558.fractional,function(q){var re="";if(q&&(_558.places!==0)){re="\\"+_558.decimal;if(_558.places==Infinity){re="(?:"+re+"\\d+)?";}else{re+="\\d{"+_558.places+"}";}}return re;},true);var _55b=_4.regexp.buildGroupRE(_558.exponent,function(q){if(q){return "([eE]"+_4.number._integerRegexp({signed:_558.eSigned})+")";}return "";});var _55c=_559+_55a;if(_55a){_55c="(?:(?:"+_55c+")|(?:"+_55a+"))";}return _55c+_55b;};_4.number._integerRegexp=function(_55d){_55d=_55d||{};if(!("signed" in _55d)){_55d.signed=[true,false];}if(!("separator" in _55d)){_55d.separator="";}else{if(!("groupSize" in _55d)){_55d.groupSize=3;}}var _55e=_4.regexp.buildGroupRE(_55d.signed,function(q){return q?"[-+]":"";},true);var _55f=_4.regexp.buildGroupRE(_55d.separator,function(sep){if(!sep){return "(?:\\d+)";}sep=_4.regexp.escapeString(sep);if(sep==" "){sep="\\s";}else{if(sep==" "){sep="\\s\\xa0";}}var grp=_55d.groupSize,grp2=_55d.groupSize2;if(grp2){var _560="(?:0|[1-9]\\d{0,"+(grp2-1)+"}(?:["+sep+"]\\d{"+grp2+"})*["+sep+"]\\d{"+grp+"})";return ((grp-grp2)>0)?"(?:"+_560+"|(?:0|[1-9]\\d{0,"+(grp-1)+"}))":_560;}return "(?:0|[1-9]\\d{0,"+(grp-1)+"}(?:["+sep+"]\\d{"+grp+"})*)";},true);return _55e+_55f;};}if(!_4._hasResource["dojox.charting.scaler.common"]){_4._hasResource["dojox.charting.scaler.common"]=true;_4.provide("dojox.charting.scaler.common");(function(){var eq=function(a,b){return Math.abs(a-b)<=0.000001*(Math.abs(a)+Math.abs(b));};_4.mixin(_6.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(_561,_562,_563){var def="";if(_4.number){def=(_563.fixed?_4.number.format(_561,{places:_562<0?-_562:0}):_4.number.format(_561))||"";}else{def=_563.fixed?_561.toFixed(_562<0?-_562:0):_561.toString();}if(_563.labelFunc){var r=_563.labelFunc(def,_561,_562);if(r){return r;}}if(_563.labels){var l=_563.labels,lo=0,hi=l.length;while(lo<hi){var mid=Math.floor((lo+hi)/2),val=l[mid].value;if(val<_561){lo=mid+1;}else{hi=mid;}}if(lo<l.length&&eq(l[lo].value,_561)){return l[lo].text;}--lo;if(lo>=0&&lo<l.length&&eq(l[lo].value,_561)){return l[lo].text;}lo+=2;if(lo<l.length&&eq(l[lo].value,_561)){return l[lo].text;}}return def;}});})();}if(!_4._hasResource["dojox.charting.scaler.linear"]){_4._hasResource["dojox.charting.scaler.linear"]=true;_4.provide("dojox.charting.scaler.linear");(function(){var _564=3,dc=_6.charting,dcs=dc.scaler,dcsc=dcs.common,_565=dcsc.findString,_566=dcsc.getNumericLabel;var _567=function(min,max,_568,_569,_56a,_56b,span){_568=_4.delegate(_568);if(!_569){if(_568.fixUpper=="major"){_568.fixUpper="minor";}if(_568.fixLower=="major"){_568.fixLower="minor";}}if(!_56a){if(_568.fixUpper=="minor"){_568.fixUpper="micro";}if(_568.fixLower=="minor"){_568.fixLower="micro";}}if(!_56b){if(_568.fixUpper=="micro"){_568.fixUpper="none";}if(_568.fixLower=="micro"){_568.fixLower="none";}}var _56c=_565(_568.fixLower,["major"])?Math.floor(_568.min/_569)*_569:_565(_568.fixLower,["minor"])?Math.floor(_568.min/_56a)*_56a:_565(_568.fixLower,["micro"])?Math.floor(_568.min/_56b)*_56b:_568.min,_56d=_565(_568.fixUpper,["major"])?Math.ceil(_568.max/_569)*_569:_565(_568.fixUpper,["minor"])?Math.ceil(_568.max/_56a)*_56a:_565(_568.fixUpper,["micro"])?Math.ceil(_568.max/_56b)*_56b:_568.max;if(_568.useMin){min=_56c;}if(_568.useMax){max=_56d;}var _56e=(!_569||_568.useMin&&_565(_568.fixLower,["major"]))?min:Math.ceil(min/_569)*_569,_56f=(!_56a||_568.useMin&&_565(_568.fixLower,["major","minor"]))?min:Math.ceil(min/_56a)*_56a,_570=(!_56b||_568.useMin&&_565(_568.fixLower,["major","minor","micro"]))?min:Math.ceil(min/_56b)*_56b,_571=!_569?0:(_568.useMax&&_565(_568.fixUpper,["major"])?Math.round((max-_56e)/_569):Math.floor((max-_56e)/_569))+1,_572=!_56a?0:(_568.useMax&&_565(_568.fixUpper,["major","minor"])?Math.round((max-_56f)/_56a):Math.floor((max-_56f)/_56a))+1,_573=!_56b?0:(_568.useMax&&_565(_568.fixUpper,["major","minor","micro"])?Math.round((max-_570)/_56b):Math.floor((max-_570)/_56b))+1,_574=_56a?Math.round(_569/_56a):0,_575=_56b?Math.round(_56a/_56b):0,_576=_569?Math.floor(Math.log(_569)/Math.LN10):0,_577=_56a?Math.floor(Math.log(_56a)/Math.LN10):0,_578=span/(max-min);if(!isFinite(_578)){_578=1;}return {bounds:{lower:_56c,upper:_56d,from:min,to:max,scale:_578,span:span},major:{tick:_569,start:_56e,count:_571,prec:_576},minor:{tick:_56a,start:_56f,count:_572,prec:_577},micro:{tick:_56b,start:_570,count:_573,prec:0},minorPerMajor:_574,microPerMinor:_575,scaler:dcs.linear};};_4.mixin(_6.charting.scaler.linear,{buildScaler:function(min,max,span,_579){var h={fixUpper:"none",fixLower:"none",natural:false};if(_579){if("fixUpper" in _579){h.fixUpper=String(_579.fixUpper);}if("fixLower" in _579){h.fixLower=String(_579.fixLower);}if("natural" in _579){h.natural=Boolean(_579.natural);}}if("min" in _579){min=_579.min;}if("max" in _579){max=_579.max;}if(_579.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 _579){min=_579.from;h.useMin=false;}if("to" in _579){max=_579.to;h.useMax=false;}if(max<=min){return _567(min,max,h,0,0,0,span);}var mag=Math.floor(Math.log(max-min)/Math.LN10),_57a=_579&&("majorTickStep" in _579)?_579.majorTickStep:Math.pow(10,mag),_57b=0,_57c=0,_57d;if(_579&&("minorTickStep" in _579)){_57b=_579.minorTickStep;}else{do{_57b=_57a/10;if(!h.natural||_57b>0.9){_57d=_567(min,max,h,_57a,_57b,0,span);if(_57d.bounds.scale*_57d.minor.tick>_564){break;}}_57b=_57a/5;if(!h.natural||_57b>0.9){_57d=_567(min,max,h,_57a,_57b,0,span);if(_57d.bounds.scale*_57d.minor.tick>_564){break;}}_57b=_57a/2;if(!h.natural||_57b>0.9){_57d=_567(min,max,h,_57a,_57b,0,span);if(_57d.bounds.scale*_57d.minor.tick>_564){break;}}return _567(min,max,h,_57a,0,0,span);}while(false);}if(_579&&("microTickStep" in _579)){_57c=_579.microTickStep;_57d=_567(min,max,h,_57a,_57b,_57c,span);}else{do{_57c=_57b/10;if(!h.natural||_57c>0.9){_57d=_567(min,max,h,_57a,_57b,_57c,span);if(_57d.bounds.scale*_57d.micro.tick>_564){break;}}_57c=_57b/5;if(!h.natural||_57c>0.9){_57d=_567(min,max,h,_57a,_57b,_57c,span);if(_57d.bounds.scale*_57d.micro.tick>_564){break;}}_57c=_57b/2;if(!h.natural||_57c>0.9){_57d=_567(min,max,h,_57a,_57b,_57c,span);if(_57d.bounds.scale*_57d.micro.tick>_564){break;}}_57c=0;}while(false);}return _57c?_57d:_567(min,max,h,_57a,_57b,0,span);},buildTicks:function(_57e,_57f){var step,next,tick,_580=_57e.major.start,_581=_57e.minor.start,_582=_57e.micro.start;if(_57f.microTicks&&_57e.micro.tick){step=_57e.micro.tick,next=_582;}else{if(_57f.minorTicks&&_57e.minor.tick){step=_57e.minor.tick,next=_581;}else{if(_57e.major.tick){step=_57e.major.tick,next=_580;}else{return null;}}}var _583=1/_57e.bounds.scale;if(_57e.bounds.to<=_57e.bounds.from||isNaN(_583)||!isFinite(_583)||step<=0||isNaN(step)||!isFinite(step)){return null;}var _584=[],_585=[],_586=[];while(next<=_57e.bounds.to+_583){if(Math.abs(_580-next)<step/2){tick={value:_580};if(_57f.majorLabels){tick.label=_566(_580,_57e.major.prec,_57f);}_584.push(tick);_580+=_57e.major.tick;_581+=_57e.minor.tick;_582+=_57e.micro.tick;}else{if(Math.abs(_581-next)<step/2){if(_57f.minorTicks){tick={value:_581};if(_57f.minorLabels&&(_57e.minMinorStep<=_57e.minor.tick*_57e.bounds.scale)){tick.label=_566(_581,_57e.minor.prec,_57f);}_585.push(tick);}_581+=_57e.minor.tick;_582+=_57e.micro.tick;}else{if(_57f.microTicks){_586.push({value:_582});}_582+=_57e.micro.tick;}}next+=step;}return {major:_584,minor:_585,micro:_586};},getTransformerFromModel:function(_587){var _588=_587.bounds.from,_589=_587.bounds.scale;return function(x){return (x-_588)*_589;};},getTransformerFromPlot:function(_58a){var _58b=_58a.bounds.from,_58c=_58a.bounds.scale;return function(x){return x/_58c+_58b;};}});})();}if(!_4._hasResource["dojox.charting.axis2d.common"]){_4._hasResource["dojox.charting.axis2d.common"]=true;_4.provide("dojox.charting.axis2d.common");(function(){var g=_6.gfx;var _58d=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 _58e=function(n){if(n["getBoundingClientRect"]){var bcr=n.getBoundingClientRect();return bcr.width||(bcr.right-bcr.left);}else{return _4.marginBox(n).w;}};_4.mixin(_6.charting.axis2d.common,{createText:{gfx:function(_58f,_590,x,y,_591,text,font,_592){return _590.createText({x:x,y:y,text:text,align:_591}).setFont(font).setFill(_592);},html:function(_593,_594,x,y,_595,text,font,_596,_597){var p=_4.doc.createElement("div"),s=p.style,_598;_58d(s);s.font=font;p.innerHTML=String(text).replace(/\s/g,"&nbsp;");s.color=_596;s.position="absolute";s.left="-10000px";_4.body().appendChild(p);var size=g.normalizedLength(g.splitFontString(font).size);if(!_597){_598=_58e(p);}_4.body().removeChild(p);s.position="relative";if(_597){s.width=_597+"px";switch(_595){case "middle":s.textAlign="center";s.left=(x-_597/2)+"px";break;case "end":s.textAlign="right";s.left=(x-_597)+"px";break;default:s.left=x+"px";s.textAlign="left";break;}}else{switch(_595){case "middle":s.left=Math.floor(x-_598/2)+"px";break;case "end":s.left=Math.floor(x-_598)+"px";break;default:s.left=Math.floor(x)+"px";break;}}s.top=Math.floor(y-size)+"px";s.whiteSpace="nowrap";var wrap=_4.doc.createElement("div"),w=wrap.style;_58d(w);w.width="0px";w.height="0px";wrap.appendChild(p);_593.node.insertBefore(wrap,_593.node.firstChild);return wrap;}}});})();}if(!_4._hasResource["dojox.charting.Element"]){_4._hasResource["dojox.charting.Element"]=true;_4.provide("dojox.charting.Element");_4.declare("dojox.charting.Element",null,{chart:null,group:null,htmlElements:null,dirty:true,constructor:function(_599){this.chart=_599;this.group=null;this.htmlElements=[];this.dirty=true;this.trailingSymbol="...";this._events=[];},createGroup:function(_59a){if(!_59a){_59a=this.chart.surface;}if(!this.group){this.group=_59a.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){_4.forEach(this._events,function(item){item.shape.disconnect(item.handle);});this._events=[];}return this;},cleanGroup:function(_59b){this.destroyHtmlElements();if(!_59b){_59b=this.chart.surface;}if(this.group){this.group.clear();}else{this.group=_59b.createGroup();}this.dirty=true;return this;},destroyHtmlElements:function(){if(this.htmlElements.length){_4.forEach(this.htmlElements,_4.destroy);this.htmlElements=[];}},destroy:function(){this.purgeGroup();},getTextWidth:function(s,font){return _6.gfx._base._getTextBox(s,{font:font}).w||0;},getTextWithLimitLength:function(s,font,_59c,_59d){if(!s||s.length<=0){return {text:"",truncated:_59d||false};}if(!_59c||_59c<=0){return {text:s,truncated:_59d||false};}var _59e=2,_59f=0.618,_5a0=s.substring(0,1)+this.trailingSymbol,_5a1=this.getTextWidth(_5a0,font);if(_59c<=_5a1){return {text:_5a0,truncated:true};}var _5a2=this.getTextWidth(s,font);if(_5a2<=_59c){return {text:s,truncated:_59d||false};}else{var _5a3=0,end=s.length;while(_5a3<end){if(end-_5a3<=_59e){while(this.getTextWidth(s.substring(0,_5a3)+this.trailingSymbol,font)>_59c){_5a3-=1;}return {text:(s.substring(0,_5a3)+this.trailingSymbol),truncated:true};}var _5a4=_5a3+Math.round((end-_5a3)*_59f),_5a5=this.getTextWidth(s.substring(0,_5a4),font);if(_5a5<_59c){_5a3=_5a4;end=end;}else{_5a3=_5a3;end=_5a4;}}}},getTextWithLimitCharCount:function(s,font,_5a6,_5a7){if(!s||s.length<=0){return {text:"",truncated:_5a7||false};}if(!_5a6||_5a6<=0||s.length<=_5a6){return {text:s,truncated:_5a7||false};}return {text:s.substring(0,_5a6)+this.trailingSymbol,truncated:true};},_plotFill:function(fill,dim,_5a8){if(!fill||!fill.type||!fill.space){return fill;}var _5a9=fill.space;switch(fill.type){case "linear":if(_5a9==="plot"||_5a9==="shapeX"||_5a9==="shapeY"){fill=_6.gfx.makeParameters(_6.gfx.defaultLinearGradient,fill);fill.space=_5a9;if(_5a9==="plot"||_5a9==="shapeX"){var span=dim.height-_5a8.t-_5a8.b;fill.y1=_5a8.t+span*fill.y1/100;fill.y2=_5a8.t+span*fill.y2/100;}if(_5a9==="plot"||_5a9==="shapeY"){var span=dim.width-_5a8.l-_5a8.r;fill.x1=_5a8.l+span*fill.x1/100;fill.x2=_5a8.l+span*fill.x2/100;}}break;case "radial":if(_5a9==="plot"){fill=_6.gfx.makeParameters(_6.gfx.defaultRadialGradient,fill);fill.space=_5a9;var _5aa=dim.width-_5a8.l-_5a8.r,_5ab=dim.height-_5a8.t-_5a8.b;fill.cx=_5a8.l+_5aa*fill.cx/100;fill.cy=_5a8.t+_5ab*fill.cy/100;fill.r=fill.r*Math.sqrt(_5aa*_5aa+_5ab*_5ab)/200;}break;case "pattern":if(_5a9==="plot"||_5a9==="shapeX"||_5a9==="shapeY"){fill=_6.gfx.makeParameters(_6.gfx.defaultPattern,fill);fill.space=_5a9;if(_5a9==="plot"||_5a9==="shapeX"){var span=dim.height-_5a8.t-_5a8.b;fill.y=_5a8.t+span*fill.y/100;fill.height=span*fill.height/100;}if(_5a9==="plot"||_5a9==="shapeY"){var span=dim.width-_5a8.l-_5a8.r;fill.x=_5a8.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 _5ac=fill.space;switch(fill.type){case "linear":if(_5ac==="shape"||_5ac==="shapeX"||_5ac==="shapeY"){fill=_6.gfx.makeParameters(_6.gfx.defaultLinearGradient,fill);fill.space=_5ac;if(_5ac==="shape"||_5ac==="shapeX"){var span=bbox.width;fill.x1=bbox.x+span*fill.x1/100;fill.x2=bbox.x+span*fill.x2/100;}if(_5ac==="shape"||_5ac==="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(_5ac==="shape"){fill=_6.gfx.makeParameters(_6.gfx.defaultRadialGradient,fill);fill.space=_5ac;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(_5ac==="shape"||_5ac==="shapeX"||_5ac==="shapeY"){fill=_6.gfx.makeParameters(_6.gfx.defaultPattern,fill);fill.space=_5ac;if(_5ac==="shape"||_5ac==="shapeX"){var span=bbox.width;fill.x=bbox.x+span*fill.x/100;fill.width=span*fill.width/100;}if(_5ac==="shape"||_5ac==="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,_5ad,_5ae,_5af,end){if(!fill||fill.type!=="radial"||fill.space!=="shape"){return fill;}var _5b0=fill.space;fill=_6.gfx.makeParameters(_6.gfx.defaultRadialGradient,fill);fill.space=_5b0;if(arguments.length<4){fill.cx=_5ad.x;fill.cy=_5ad.y;fill.r=fill.r*_5ae/100;return fill;}var _5b1=arguments.length<5?_5af:(end+_5af)/2;return {type:"linear",x1:_5ad.x,y1:_5ad.y,x2:_5ad.x+fill.r*_5ae*Math.cos(_5b1)/100,y2:_5ad.y+fill.r*_5ae*Math.sin(_5b1)/100,colors:fill.colors};return fill;}});}if(!_4._hasResource["dojox.charting.axis2d.Base"]){_4._hasResource["dojox.charting.axis2d.Base"]=true;_4.provide("dojox.charting.axis2d.Base");_4.declare("dojox.charting.axis2d.Base",_6.charting.Element,{constructor:function(_5b2,_5b3){this.vertical=_5b3&&_5b3.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,_5b4){this.dirty=false;return this;}});}if(!_4._hasResource["dojox.lang.functional.lambda"]){_4._hasResource["dojox.lang.functional.lambda"]=true;_4.provide("dojox.lang.functional.lambda");(function(){var df=_6.lang.functional,_5b5={};var _5b6="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 _5b7=function(s){var args=[],_5b8=_5b6.call(s,/\s*->\s*/m);if(_5b8.length>1){while(_5b8.length){s=_5b8.pop();args=_5b8.pop().split(/\s*,\s*|\s+/m);if(_5b8.length){_5b8.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={};_4.forEach(vars,function(v){if(!(v in t)){args.push(v);t[v]=1;}});}}}return {args:args,body:s};};var _5b9=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;};};_4.mixin(df,{rawLambda:function(s){return _5b7(s);},buildLambda:function(s){s=_5b7(s);return "function("+s.args.join(",")+"){return ("+s.body+");}";},lambda:function(s){if(typeof s=="function"){return s;}if(s instanceof Array){return _5b9(s);}if(s in _5b5){return _5b5[s];}s=_5b7(s);return _5b5[s]=new Function(s.args,"return ("+s.body+");");},clearLambdaCache:function(){_5b5={};}});})();}if(!_4._hasResource["dojox.lang.functional.array"]){_4._hasResource["dojox.lang.functional.array"]=true;_4.provide("dojox.lang.functional.array");(function(){var d=_4,df=_6.lang.functional,_5ba={};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 _5ba)){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 _5ba)){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 _5ba)){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 _5ba)){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 _5ba)){if(f.call(o,a[i],i,a)){return true;}}}}}return false;}});})();}if(!_4._hasResource["dojox.lang.functional.object"]){_4._hasResource["dojox.lang.functional.object"]=true;_4.provide("dojox.lang.functional.object");(function(){var d=_4,df=_6.lang.functional,_5bb={};d.mixin(df,{keys:function(obj){var t=[];for(var i in obj){if(!(i in _5bb)){t.push(i);}}return t;},values:function(obj){var t=[];for(var i in obj){if(!(i in _5bb)){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 _5bb)){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 _5bb)){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 _5bb)){t[i]=f.call(o,obj[i],i,obj);}}return t;}});})();}if(!_4._hasResource["dojox.lang.functional"]){_4._hasResource["dojox.lang.functional"]=true;_4.provide("dojox.lang.functional");}if(!_4._hasResource["dojox.lang.utils"]){_4._hasResource["dojox.lang.utils"]=true;_4.provide("dojox.lang.utils");(function(){var _5bc={},du=_6.lang.utils,opts=Object.prototype.toString;var _5bd=function(o){if(o){switch(opts.call(o)){case "[object Array]":return o.slice(0);case "[object Object]":return _4.delegate(o);}}return o;};_4.mixin(du,{coerceType:function(_5be,_5bf){switch(typeof _5be){case "number":return Number(eval("("+_5bf+")"));case "string":return String(_5bf);case "boolean":return Boolean(eval("("+_5bf+")"));}return eval("("+_5bf+")");},updateWithObject:function(_5c0,_5c1,conv){if(!_5c1){return _5c0;}for(var x in _5c0){if(x in _5c1&&!(x in _5bc)){var t=_5c0[x];if(t&&typeof t=="object"){du.updateWithObject(t,_5c1[x],conv);}else{_5c0[x]=conv?du.coerceType(t,_5c1[x]):_5bd(_5c1[x]);}}}return _5c0;},updateWithPattern:function(_5c2,_5c3,_5c4,conv){if(!_5c3||!_5c4){return _5c2;}for(var x in _5c4){if(x in _5c3&&!(x in _5bc)){_5c2[x]=conv?du.coerceType(_5c4[x],_5c3[x]):_5bd(_5c3[x]);}}return _5c2;},merge:function(_5c5,_5c6){if(_5c6){var _5c7=opts.call(_5c5),_5c8=opts.call(_5c6),t,i,l,m;switch(_5c8){case "[object Array]":if(_5c8==_5c7){t=new Array(Math.max(_5c5.length,_5c6.length));for(i=0,l=t.length;i<l;++i){t[i]=du.merge(_5c5[i],_5c6[i]);}return t;}return _5c6.slice(0);case "[object Object]":if(_5c8==_5c7&&_5c5){t=_4.delegate(_5c5);for(i in _5c6){if(i in _5c5){l=_5c5[i];m=_5c6[i];if(m!==l){t[i]=du.merge(l,m);}}else{t[i]=_4.clone(_5c6[i]);}}return t;}return _4.clone(_5c6);}}return _5c6;}});})();}if(!_4._hasResource["dojox.charting.axis2d.Invisible"]){_4._hasResource["dojox.charting.axis2d.Invisible"]=true;_4.provide("dojox.charting.axis2d.Invisible");(function(){var dc=_6.charting,df=_6.lang.functional,du=_6.lang.utils,g=_6.gfx,lin=dc.scaler.linear,_5c9=du.merge,_5ca=4,_5cb=45;_4.declare("dojox.charting.axis2d.Invisible",_6.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(_5cc,_5cd){this.opt=_4.clone(this.defaultParams);du.updateWithObject(this.opt,_5cd);du.updateWithPattern(this.opt,_5cd,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(_5ce,_5cf){this.scale=_5ce;this.offset=_5cf;return this.clear();},getWindowScale:function(){return "scale" in this?this.scale:1;},getWindowOffset:function(){return "offset" in this?this.offset:0;},_groupLabelWidth:function(_5d0,font,_5d1){if(!_5d0.length){return 0;}if(_4.isObject(_5d0[0])){_5d0=df.map(_5d0,function(_5d2){return _5d2.text;});}if(_5d1){_5d0=df.map(_5d0,function(_5d3){return _4.trim(_5d3).length==0?"":_5d3.substring(0,_5d1)+this.trailingSymbol;},this);}var s=_5d0.join("<br>");return _6.gfx._base._getTextBox(s,{font:font}).w||0;},calculate:function(min,max,span,_5d4){if(this.initialized()){return this;}var o=this.opt;this.labels="labels" in o?o.labels:_5d4;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,_5d5=0,_5d6=o.rotation%360,_5d7=o.font||(ta.majorTick&&ta.majorTick.font)||(ta.tick&&ta.tick.font),size=_5d7?g.normalizedLength(g.splitFontString(_5d7).size):0,cosr=Math.abs(Math.cos(_5d6*Math.PI/180)),sinr=Math.abs(Math.sin(_5d6*Math.PI/180));if(_5d6<0){_5d6+=360;}if(size){if(this.vertical?_5d6!=0&&_5d6!=180:_5d6!=90&&_5d6!=270){if(this.labels){_5d5=this._groupLabelWidth(this.labels,_5d7,o.maxLabelCharCount);}else{var _5d8=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(_4.string.rep("9",_5d8));var _5d9=Math.floor(Math.log(tsb.to-tsb.from)/Math.LN10);if(_5d9>0){t.push(".");t.push(_4.string.rep("9",_5d9));}_5d5=_6.gfx._base._getTextBox(t.join(""),{font:_5d7}).w;}_5d5=o.maxLabelSize?Math.min(o.maxLabelSize,_5d5):_5d5;}else{_5d5=size;}switch(_5d6){case 0:case 90:case 180:case 270:break;default:var gap1=Math.sqrt(_5d5*_5d5+size*size),gap2=this.vertical?size*cosr+_5d5*sinr:_5d5*cosr+size*sinr;_5d5=Math.min(gap1,gap2);break;}}this.scaler.minMinorStep=_5d5+_5ca;this.ticks=lin.buildTicks(this.scaler,o);return this;},getScaler:function(){return this.scaler;},getTicks:function(){return this.ticks;}});})();}if(!_4._hasResource["dojo.colors"]){_4._hasResource["dojo.colors"]=true;_4.provide("dojo.colors");_4.getObject("colors",true,_4);(function(){var _5da=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;};_4.colorFromRgb=function(_5db,obj){var m=_5db.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=_4.map(c,function(x){return parseFloat(x)*2.56;});if(l==4){a[3]=c[3];}return _4.colorFromArray(a,obj);}return _4.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=[_5da(m1,m2,H+1/3)*256,_5da(m1,m2,H)*256,_5da(m1,m2,H-1/3)*256,1];if(l==4){a[3]=c[3];}return _4.colorFromArray(a,obj);}}return null;};var _5dc=function(c,low,high){c=Number(c);return isNaN(c)?high:c<low?low:c>high?high:c;};_4.Color.prototype.sanitize=function(){var t=this;t.r=Math.round(_5dc(t.r,0,255));t.g=Math.round(_5dc(t.g,0,255));t.b=Math.round(_5dc(t.b,0,255));t.a=_5dc(t.a,0,1);return this;};})();_4.colors.makeGrey=function(g,a){return _4.colorFromArray([g,g,g,a]);};_4.mixin(_4.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(!_4._hasResource["dojox.charting.axis2d.Default"]){_4._hasResource["dojox.charting.axis2d.Default"]=true;_4.provide("dojox.charting.axis2d.Default");(function(){var dc=_6.charting,du=_6.lang.utils,g=_6.gfx,lin=dc.scaler.linear,_5dd=4,_5de=45;_4.declare("dojox.charting.axis2d.Default",_6.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(_5df,_5e0){this.opt=_4.clone(this.defaultParams);du.updateWithObject(this.opt,_5e0);du.updateWithPattern(this.opt,_5e0,this.optionalParams);},getOffsets:function(){var s=this.scaler,_5e1={l:0,r:0,t:0,b:0};if(!s){return _5e1;}var o=this.opt,_5e2=0,a,b,c,d,gl=dc.scaler.common.getNumericLabel,_5e3=0,ma=s.major,mi=s.minor,ta=this.chart.theme.axis,_5e4=o.font||(ta.majorTick&&ta.majorTick.font)||(ta.tick&&ta.tick.font),_5e5=o.titleFont||(ta.tick&&ta.tick.titleFont),_5e6=(o.titleGap==0)?0:o.titleGap||(ta.tick&&ta.tick.titleGap)||15,_5e7=this.chart.theme.getTick("major",o),_5e8=this.chart.theme.getTick("minor",o),size=_5e4?g.normalizedLength(g.splitFontString(_5e4).size):0,_5e9=_5e5?g.normalizedLength(g.splitFontString(_5e5).size):0,_5ea=o.rotation%360,_5eb=o.leftBottom,cosr=Math.abs(Math.cos(_5ea*Math.PI/180)),sinr=Math.abs(Math.sin(_5ea*Math.PI/180));this.trailingSymbol=(o.trailingSymbol===undefined||o.trailingSymbol===null)?this.trailingSymbol:o.trailingSymbol;if(_5ea<0){_5ea+=360;}if(size){if(this.labels){_5e2=this._groupLabelWidth(this.labels,_5e4,o.maxLabelCharCount);}else{_5e2=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)],_5e4,o.maxLabelCharCount);}_5e2=o.maxLabelSize?Math.min(o.maxLabelSize,_5e2):_5e2;if(this.vertical){var side=_5eb?"l":"r";switch(_5ea){case 0:case 180:_5e1[side]=_5e2;_5e1.t=_5e1.b=size/2;break;case 90:case 270:_5e1[side]=size;_5e1.t=_5e1.b=_5e2/2;break;default:if(_5ea<=_5de||(180<_5ea&&_5ea<=(180+_5de))){_5e1[side]=size*sinr/2+_5e2*cosr;_5e1[_5eb?"t":"b"]=size*cosr/2+_5e2*sinr;_5e1[_5eb?"b":"t"]=size*cosr/2;}else{if(_5ea>(360-_5de)||(180>_5ea&&_5ea>(180-_5de))){_5e1[side]=size*sinr/2+_5e2*cosr;_5e1[_5eb?"b":"t"]=size*cosr/2+_5e2*sinr;_5e1[_5eb?"t":"b"]=size*cosr/2;}else{if(_5ea<90||(180<_5ea&&_5ea<270)){_5e1[side]=size*sinr+_5e2*cosr;_5e1[_5eb?"t":"b"]=size*cosr+_5e2*sinr;}else{_5e1[side]=size*sinr+_5e2*cosr;_5e1[_5eb?"b":"t"]=size*cosr+_5e2*sinr;}}}break;}_5e1[side]+=_5dd+Math.max(_5e7.length,_5e8.length)+(o.title?(_5e9+_5e6):0);}else{var side=_5eb?"b":"t";switch(_5ea){case 0:case 180:_5e1[side]=size;_5e1.l=_5e1.r=_5e2/2;break;case 90:case 270:_5e1[side]=_5e2;_5e1.l=_5e1.r=size/2;break;default:if((90-_5de)<=_5ea&&_5ea<=90||(270-_5de)<=_5ea&&_5ea<=270){_5e1[side]=size*sinr/2+_5e2*cosr;_5e1[_5eb?"r":"l"]=size*cosr/2+_5e2*sinr;_5e1[_5eb?"l":"r"]=size*cosr/2;}else{if(90<=_5ea&&_5ea<=(90+_5de)||270<=_5ea&&_5ea<=(270+_5de)){_5e1[side]=size*sinr/2+_5e2*cosr;_5e1[_5eb?"l":"r"]=size*cosr/2+_5e2*sinr;_5e1[_5eb?"r":"l"]=size*cosr/2;}else{if(_5ea<_5de||(180<_5ea&&_5ea<(180-_5de))){_5e1[side]=size*sinr+_5e2*cosr;_5e1[_5eb?"r":"l"]=size*cosr+_5e2*sinr;}else{_5e1[side]=size*sinr+_5e2*cosr;_5e1[_5eb?"l":"r"]=size*cosr+_5e2*sinr;}}}break;}_5e1[side]+=_5dd+Math.max(_5e7.length,_5e8.length)+(o.title?(_5e9+_5e6):0);}}if(_5e2){this._cachedLabelWidth=_5e2;}return _5e1;},render:function(dim,_5ec){if(!this.dirty){return this;}var o=this.opt,ta=this.chart.theme.axis,_5ed=o.leftBottom,_5ee=o.rotation%360,_5ef,stop,_5f0,_5f1=0,_5f2,_5f3,_5f4,_5f5,_5f6,_5f7,_5f8=o.font||(ta.majorTick&&ta.majorTick.font)||(ta.tick&&ta.tick.font),_5f9=o.titleFont||(ta.tick&&ta.tick.titleFont),_5fa=o.fontColor||(ta.majorTick&&ta.majorTick.fontColor)||(ta.tick&&ta.tick.fontColor)||"black",_5fb=o.titleFontColor||(ta.tick&&ta.tick.titleFontColor)||"black",_5fc=(o.titleGap==0)?0:o.titleGap||(ta.tick&&ta.tick.titleGap)||15,_5fd=o.titleOrientation||(ta.tick&&ta.tick.titleOrientation)||"axis",_5fe=this.chart.theme.getTick("major",o),_5ff=this.chart.theme.getTick("minor",o),_600=this.chart.theme.getTick("micro",o),_601=Math.max(_5fe.length,_5ff.length,_600.length),_602="stroke" in o?o.stroke:ta.stroke,size=_5f8?g.normalizedLength(g.splitFontString(_5f8).size):0,cosr=Math.abs(Math.cos(_5ee*Math.PI/180)),sinr=Math.abs(Math.sin(_5ee*Math.PI/180)),_603=_5f9?g.normalizedLength(g.splitFontString(_5f9).size):0;if(_5ee<0){_5ee+=360;}if(this.vertical){_5ef={y:dim.height-_5ec.b};stop={y:_5ec.t};_5f0={y:(dim.height-_5ec.b+_5ec.t)/2};_5f2=size*sinr+(this._cachedLabelWidth||0)*cosr+_5dd+Math.max(_5fe.length,_5ff.length)+_603+_5fc;_5f3={x:0,y:-1};_5f6={x:0,y:0};_5f4={x:1,y:0};_5f5={x:_5dd,y:0};switch(_5ee){case 0:_5f7="end";_5f6.y=size*0.4;break;case 90:_5f7="middle";_5f6.x=-size;break;case 180:_5f7="start";_5f6.y=-size*0.4;break;case 270:_5f7="middle";break;default:if(_5ee<_5de){_5f7="end";_5f6.y=size*0.4;}else{if(_5ee<90){_5f7="end";_5f6.y=size*0.4;}else{if(_5ee<(180-_5de)){_5f7="start";}else{if(_5ee<(180+_5de)){_5f7="start";_5f6.y=-size*0.4;}else{if(_5ee<270){_5f7="start";_5f6.x=_5ed?0:size*0.4;}else{if(_5ee<(360-_5de)){_5f7="end";_5f6.x=_5ed?0:size*0.4;}else{_5f7="end";_5f6.y=size*0.4;}}}}}}}if(_5ed){_5ef.x=stop.x=_5ec.l;_5f1=(_5fd&&_5fd=="away")?90:270;_5f0.x=_5ec.l-_5f2+(_5f1==270?_603:0);_5f4.x=-1;_5f5.x=-_5f5.x;}else{_5ef.x=stop.x=dim.width-_5ec.r;_5f1=(_5fd&&_5fd=="axis")?90:270;_5f0.x=dim.width-_5ec.r+_5f2-(_5f1==270?0:_603);switch(_5f7){case "start":_5f7="end";break;case "end":_5f7="start";break;case "middle":_5f6.x+=size;break;}}}else{_5ef={x:_5ec.l};stop={x:dim.width-_5ec.r};_5f0={x:(dim.width-_5ec.r+_5ec.l)/2};_5f2=size*cosr+(this._cachedLabelWidth||0)*sinr+_5dd+Math.max(_5fe.length,_5ff.length)+_603+_5fc;_5f3={x:1,y:0};_5f6={x:0,y:0};_5f4={x:0,y:1};_5f5={x:0,y:_5dd};switch(_5ee){case 0:_5f7="middle";_5f6.y=size;break;case 90:_5f7="start";_5f6.x=-size*0.4;break;case 180:_5f7="middle";break;case 270:_5f7="end";_5f6.x=size*0.4;break;default:if(_5ee<(90-_5de)){_5f7="start";_5f6.y=_5ed?size:0;}else{if(_5ee<(90+_5de)){_5f7="start";_5f6.x=-size*0.4;}else{if(_5ee<180){_5f7="start";_5f6.y=_5ed?0:-size;}else{if(_5ee<(270-_5de)){_5f7="end";_5f6.y=_5ed?0:-size;}else{if(_5ee<(270+_5de)){_5f7="end";_5f6.y=_5ed?size*0.4:0;}else{_5f7="end";_5f6.y=_5ed?size:0;}}}}}}if(_5ed){_5ef.y=stop.y=dim.height-_5ec.b;_5f1=(_5fd&&_5fd=="axis")?180:0;_5f0.y=dim.height-_5ec.b+_5f2-(_5f1?_603:0);}else{_5ef.y=stop.y=_5ec.t;_5f1=(_5fd&&_5fd=="away")?180:0;_5f0.y=_5ec.t-_5f2+(_5f1?0:_603);_5f4.y=-1;_5f5.y=-_5f5.y;switch(_5f7){case "start":_5f7="end";break;case "end":_5f7="start";break;case "middle":_5f6.y-=size;break;}}}this.cleanGroup();try{var s=this.group,c=this.scaler,t=this.ticks,_604,f=lin.getTransformerFromModel(this.scaler),_605=!_5f1&&!_5ee&&this.opt.htmlLabels&&!_4.isIE&&!_4.isOpera?"html":"gfx",dx=_5f4.x*_5fe.length,dy=_5f4.y*_5fe.length;s.createLine({x1:_5ef.x,y1:_5ef.y,x2:stop.x,y2:stop.y}).setStroke(_602);if(o.title){var _606=dc.axis2d.common.createText[_605](this.chart,s,_5f0.x,_5f0.y,"middle",o.title,_5f9,_5fb);if(_605=="html"){this.htmlElements.push(_606);}else{_606.setTransform(g.matrix.rotategAt(_5f1,_5f0.x,_5f0.y));}}_4.forEach(t.major,function(tick){var _607=f(tick.value),elem,x=_5ef.x+_5f3.x*_607,y=_5ef.y+_5f3.y*_607;s.createLine({x1:x,y1:y,x2:x+dx,y2:y+dy}).setStroke(_5fe);if(tick.label){var _608=o.maxLabelCharCount?this.getTextWithLimitCharCount(tick.label,_5f8,o.maxLabelCharCount):{text:tick.label,truncated:false};_608=o.maxLabelSize?this.getTextWithLimitLength(_608.text,_5f8,o.maxLabelSize,_608.truncated):_608;elem=dc.axis2d.common.createText[_605](this.chart,s,x+dx+_5f5.x+(_5ee?0:_5f6.x),y+dy+_5f5.y+(_5ee?0:_5f6.y),_5f7,_608.text,_5f8,_5fa);_608.truncated&&this.labelTooltip(elem,this.chart,tick.label,_608.text,_5f8,_605);if(_605=="html"){this.htmlElements.push(elem);}else{if(_5ee){elem.setTransform([{dx:_5f6.x,dy:_5f6.y},g.matrix.rotategAt(_5ee,x+dx+_5f5.x,y+dy+_5f5.y)]);}}}},this);dx=_5f4.x*_5ff.length;dy=_5f4.y*_5ff.length;_604=c.minMinorStep<=c.minor.tick*c.bounds.scale;_4.forEach(t.minor,function(tick){var _609=f(tick.value),elem,x=_5ef.x+_5f3.x*_609,y=_5ef.y+_5f3.y*_609;s.createLine({x1:x,y1:y,x2:x+dx,y2:y+dy}).setStroke(_5ff);if(_604&&tick.label){var _60a=o.maxLabelCharCount?this.getTextWithLimitCharCount(tick.label,_5f8,o.maxLabelCharCount):{text:tick.label,truncated:false};_60a=o.maxLabelSize?this.getTextWithLimitLength(_60a.text,_5f8,o.maxLabelSize,_60a.truncated):_60a;elem=dc.axis2d.common.createText[_605](this.chart,s,x+dx+_5f5.x+(_5ee?0:_5f6.x),y+dy+_5f5.y+(_5ee?0:_5f6.y),_5f7,_60a.text,_5f8,_5fa);_60a.truncated&&this.labelTooltip(elem,this.chart,tick.label,_60a.text,_5f8,_605);if(_605=="html"){this.htmlElements.push(elem);}else{if(_5ee){elem.setTransform([{dx:_5f6.x,dy:_5f6.y},g.matrix.rotategAt(_5ee,x+dx+_5f5.x,y+dy+_5f5.y)]);}}}},this);dx=_5f4.x*_600.length;dy=_5f4.y*_600.length;_4.forEach(t.micro,function(tick){var _60b=f(tick.value),elem,x=_5ef.x+_5f3.x*_60b,y=_5ef.y+_5f3.y*_60b;s.createLine({x1:x,y1:y,x2:x+dx,y2:y+dy}).setStroke(_600);},this);}catch(e){}this.dirty=false;return this;},labelTooltip:function(elem,_60c,_60d,_60e,font,_60f){if(!_5||!_5.Tooltip){return;}var _610={type:"rect"},_611=["above","below"],_612=_6.gfx._base._getTextBox(_60e,{font:font}).w||0;fontHeight=font?g.normalizedLength(g.splitFontString(font).size):0;if(_60f=="html"){_4.mixin(_610,_4.coords(elem.firstChild,true));_610.width=Math.ceil(_612);_610.height=Math.ceil(fontHeight);this._events.push({shape:_4,handle:_4.connect(elem.firstChild,"onmouseover",this,function(e){_5.showTooltip(_60d,_610,_611);})});this._events.push({shape:_4,handle:_4.connect(elem.firstChild,"onmouseout",this,function(e){_5.hideTooltip(_610);})});}else{var shp=elem.getShape(),lt=_4.coords(_60c.node,true);_610=_4.mixin(_610,{x:shp.x-_612/2,y:shp.y});_610.x+=lt.x;_610.y+=lt.y;_610.x=Math.round(_610.x);_610.y=Math.round(_610.y);_610.width=Math.ceil(_612);_610.height=Math.ceil(fontHeight);this._events.push({shape:elem,handle:elem.connect("onmouseenter",this,function(e){_5.showTooltip(_60d,_610,_611);})});this._events.push({shape:elem,handle:elem.connect("onmouseleave",this,function(e){_5.hideTooltip(_610);})});}}});})();}if(!_4._hasResource["dojox.charting.plot2d.common"]){_4._hasResource["dojox.charting.plot2d.common"]=true;_4.provide("dojox.charting.plot2d.common");(function(){var df=_6.lang.functional,dc=_6.charting.plot2d.common;_4.mixin(_6.charting.plot2d.common,{makeStroke:function(_613){if(!_613){return _613;}if(typeof _613=="string"||_613 instanceof _4.Color){_613={color:_613};}return _6.gfx.makeParameters(_6.gfx.defaultStroke,_613);},augmentColor:function(_614,_615){var t=new _4.Color(_614),c=new _4.Color(_615);c.a=t.a;return c;},augmentStroke:function(_616,_617){var s=dc.makeStroke(_616);if(s){s.color=dc.augmentColor(s.color,_617);}return s;},augmentFill:function(fill,_618){var fc,c=new _4.Color(_618);if(typeof fill=="string"||fill instanceof _4.Color){return dc.augmentColor(fill,_618);}return fill;},defaultStats:{vmin:Number.POSITIVE_INFINITY,vmax:Number.NEGATIVE_INFINITY,hmin:Number.POSITIVE_INFINITY,hmax:Number.NEGATIVE_INFINITY},collectSimpleStats:function(_619){var _61a=_4.delegate(dc.defaultStats);for(var i=0;i<_619.length;++i){var run=_619[i];for(var j=0;j<run.data.length;j++){if(run.data[j]!==null){if(typeof run.data[j]=="number"){var _61b=_61a.vmin,_61c=_61a.vmax;if(!("ymin" in run)||!("ymax" in run)){_4.forEach(run.data,function(val,i){if(val!==null){var x=i+1,y=val;if(isNaN(y)){y=0;}_61a.hmin=Math.min(_61a.hmin,x);_61a.hmax=Math.max(_61a.hmax,x);_61a.vmin=Math.min(_61a.vmin,y);_61a.vmax=Math.max(_61a.vmax,y);}});}if("ymin" in run){_61a.vmin=Math.min(_61b,run.ymin);}if("ymax" in run){_61a.vmax=Math.max(_61c,run.ymax);}}else{var _61d=_61a.hmin,_61e=_61a.hmax,_61b=_61a.vmin,_61c=_61a.vmax;if(!("xmin" in run)||!("xmax" in run)||!("ymin" in run)||!("ymax" in run)){_4.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;}_61a.hmin=Math.min(_61a.hmin,x);_61a.hmax=Math.max(_61a.hmax,x);_61a.vmin=Math.min(_61a.vmin,y);_61a.vmax=Math.max(_61a.vmax,y);}});}if("xmin" in run){_61a.hmin=Math.min(_61d,run.xmin);}if("xmax" in run){_61a.hmax=Math.max(_61e,run.xmax);}if("ymin" in run){_61a.vmin=Math.min(_61b,run.ymin);}if("ymax" in run){_61a.vmax=Math.max(_61c,run.ymax);}}break;}}}return _61a;},calculateBarSize:function(_61f,opt,_620){if(!_620){_620=1;}var gap=opt.gap,size=(_61f-2*gap)/_620;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=(_61f-size*_620)/2;return {size:size,gap:gap};},collectStackedStats:function(_621){var _622=_4.clone(dc.defaultStats);if(_621.length){_622.hmin=Math.min(_622.hmin,1);_622.hmax=df.foldl(_621,"seed, run -> Math.max(seed, run.data.length)",_622.hmax);for(var i=0;i<_622.hmax;++i){var v=_621[0].data[i];v=v&&(typeof v=="number"?v:v.y);if(isNaN(v)){v=0;}_622.vmin=Math.min(_622.vmin,v);for(var j=1;j<_621.length;++j){var t=_621[j].data[i];t=t&&(typeof t=="number"?t:t.y);if(isNaN(t)){t=0;}v+=t;}_622.vmax=Math.max(_622.vmax,v);}}return _622;},curve:function(a,_623){var arr=a.slice(0);if(_623=="x"){arr[arr.length]=arr[0];}var p=_4.map(arr,function(item,i){if(i==0){return "M"+item.x+","+item.y;}if(!isNaN(_623)){var dx=item.x-arr[i-1].x,dy=arr[i-1].y;return "C"+(item.x-(_623-1)*(dx/_623))+","+dy+" "+(item.x-(dx/_623))+","+item.y+" "+item.x+","+item.y;}else{if(_623=="X"||_623=="x"||_623=="S"){var p0,p1=arr[i-1],p2=arr[i],p3;var bz1x,bz1y,bz2x,bz2y;var f=1/6;if(i==1){if(_623=="x"){p0=arr[arr.length-2];}else{p0=p1;}f=1/3;}else{p0=arr[i-2];}if(i==(arr.length-1)){if(_623=="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 _624=p0p2*f;var _625=p1p3*f;if(_624>p1p2/2&&_625>p1p2/2){_624=p1p2/2;_625=p1p2/2;}else{if(_624>p1p2/2){_624=p1p2/2;_625=p1p2/2*p1p3/p0p2;}else{if(_625>p1p2/2){_625=p1p2/2;_624=p1p2/2*p0p2/p1p3;}}}if(_623=="S"){if(p0==p1){_624=0;}if(p2==p3){_625=0;}}bz1x=p1.x+_624*(p2.x-p0.x)/p0p2;bz1y=p1.y+_624*(p2.y-p0.y)/p0p2;bz2x=p2.x-_625*(p3.x-p1.x)/p1p3;bz2y=p2.y-_625*(p3.y-p1.y)/p1p3;}}return "C"+(bz1x+","+bz1y+" "+bz2x+","+bz2y+" "+p2.x+","+p2.y);});return p.join(" ");},getLabel:function(_626,_627,_628){if(_4.number){return (_627?_4.number.format(_626,{places:_628}):_4.number.format(_626))||"";}return _627?_626.toFixed(_628):_626.toString();}});})();}if(!_4._hasResource["dojox.charting.scaler.primitive"]){_4._hasResource["dojox.charting.scaler.primitive"]=true;_4.provide("dojox.charting.scaler.primitive");_6.charting.scaler.primitive={buildScaler:function(min,max,span,_629){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:_6.charting.scaler.primitive};},buildTicks:function(_62a,_62b){return {major:[],minor:[],micro:[]};},getTransformerFromModel:function(_62c){var _62d=_62c.bounds.from,_62e=_62c.bounds.scale;return function(x){return (x-_62d)*_62e;};},getTransformerFromPlot:function(_62f){var _630=_62f.bounds.from,_631=_62f.bounds.scale;return function(x){return x/_631+_630;};}};}if(!_4._hasResource["dojox.charting.plot2d._PlotEvents"]){_4._hasResource["dojox.charting.plot2d._PlotEvents"]=true;_4.provide("dojox.charting.plot2d._PlotEvents");_4.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=_4.delegate(o);t.originalEvent=o.type;t.originalPlot=o.plot;t.type="onindirect";_4.forEach(this.chart.stack,function(plot){if(plot!==this&&plot.plotEvent){t.plot=plot;plot.plotEvent(t);}},this);},connect:function(_632,_633){this.dirty=true;return _4.connect(this,"plotEvent",_632,_633);},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){_4.forEach(this._shapeEvents,function(item){item.shape.disconnect(item.handle);});this._shapeEvents=[];}this.raiseEvent({type:"onplotreset",plot:this});},_connectSingleEvent:function(o,_634){this._shapeEvents.push({shape:o.eventMask,handle:o.eventMask.connect(_634,this,function(e){o.type=_634;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(_635){var a=this._eventSeries[_635];if(a){_4.forEach(a,this._connectEvents,this);}},fireEvent:function(_636,_637,_638,_639){var s=this._eventSeries[_636];if(s&&s.length&&_638<s.length){var o=s[_638];o.type=_637;o.event=_639||null;this.raiseEvent(o);o.event=null;}}});}if(!_4._hasResource["dojox.charting.plot2d.Base"]){_4._hasResource["dojox.charting.plot2d.Base"]=true;_4.provide("dojox.charting.plot2d.Base");_4.declare("dojox.charting.plot2d.Base",[_6.charting.Element,_6.charting.plot2d._PlotEvents],{constructor:function(_63a,_63b){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 _6.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 _4.some(this.series,function(item){return item.dirty;});},performZoom:function(dim,_63c){var vs=this._vAxis.scale||1,hs=this._hAxis.scale||1,_63d=dim.height-_63c.b,_63e=this._hScaler.bounds,_63f=(_63e.from-_63e.lower)*_63e.scale,_640=this._vScaler.bounds,_641=(_640.from-_640.lower)*_640.scale;rVScale=vs/this.lastWindow.vscale,rHScale=hs/this.lastWindow.hscale,rXOffset=(this.lastWindow.xoffset-_63f)/((this.lastWindow.hscale==1)?hs:this.lastWindow.hscale),rYOffset=(_641-this.lastWindow.yoffset)/((this.lastWindow.vscale==1)?vs:this.lastWindow.vscale),shape=this.group,anim=_6.gfx.fx.animateTransform(_4.delegate({shape:shape,duration:1200,transform:[{name:"translate",start:[0,0],end:[_63c.l*(1-rHScale),_63d*(1-rVScale)]},{name:"scale",start:[1,1],end:[rHScale,rVScale]},{name:"original"},{name:"translate",start:[0,0],end:[rXOffset,rYOffset]}]},this.zoom));_4.mixin(this.lastWindow,{vscale:vs,hscale:hs,xoffset:_63f,yoffset:_641});this.zoomQueue.push(anim);_4.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,_642){return this;},getRequiredColors:function(){return this.series.length;},initializeScalers:function(dim,_643){if(this._hAxis){if(!this._hAxis.initialized()){this._hAxis.calculate(_643.hmin,_643.hmax,dim.width);}this._hScaler=this._hAxis.getScaler();}else{this._hScaler=_6.charting.scaler.primitive.buildScaler(_643.hmin,_643.hmax,dim.width);}if(this._vAxis){if(!this._vAxis.initialized()){this._vAxis.calculate(_643.vmin,_643.vmax,dim.height);}this._vScaler=this._vAxis.getScaler();}else{this._vScaler=_6.charting.scaler.primitive.buildScaler(_643.vmin,_643.vmax,dim.height);}return this;}});}if(!_4._hasResource["dojox.lang.functional.reversed"]){_4._hasResource["dojox.lang.functional.reversed"]=true;_4.provide("dojox.lang.functional.reversed");(function(){var d=_4,df=_6.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(!_4._hasResource["dojox.gfx.fx"]){_4._hasResource["dojox.gfx.fx"]=true;_4.provide("dojox.gfx.fx");(function(){var d=_4,g=_6.gfx,m=g.matrix;function _644(_645,end){this.start=_645,this.end=end;};_644.prototype.getValue=function(r){return (this.end-this.start)*r+this.start;};function _646(_647,end,_648){this.start=_647,this.end=end;this.units=_648;};_646.prototype.getValue=function(r){return (this.end-this.start)*r+this.start+this.units;};function _649(_64a,end){this.start=_64a,this.end=end;this.temp=new _4.Color();};_649.prototype.getValue=function(r){return d.blendColors(this.start,this.end,r,this.temp);};function _64b(_64c){this.values=_64c;this.length=_64c.length;};_64b.prototype.getValue=function(r){return this.values[Math.min(Math.floor(r*this.length),this.length-1)];};function _64d(_64e,def){this.values=_64e;this.def=def?def:{};};_64d.prototype.getValue=function(r){var ret=_4.clone(this.def);for(var i in this.values){ret[i]=this.values[i].getValue(r);}return ret;};function _64f(_650,_651){this.stack=_650;this.original=_651;};_64f.prototype.getValue=function(r){var ret=[];_4.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=_4.map(t.start,function(v,i){return (t.end[i]-v)*r+v;}),_652=f.apply(m,val);if(_652 instanceof m.Matrix2D){ret.push(_652);}},this);return ret;};var _653=new d.Color(0,0,0,0);function _654(prop,obj,name,def){if(prop.values){return new _64b(prop.values);}var _655,_656,end;if(prop.start){_656=g.normalizeColor(prop.start);}else{_656=_655=obj?(name?obj[name]:obj):def;}if(prop.end){end=g.normalizeColor(prop.end);}else{if(!_655){_655=obj?(name?obj[name]:obj):def;}end=_655;}return new _649(_656,end);};function _657(prop,obj,name,def){if(prop.values){return new _64b(prop.values);}var _658,_659,end;if(prop.start){_659=prop.start;}else{_659=_658=obj?obj[name]:def;}if(prop.end){end=prop.end;}else{if(typeof _658!="number"){_658=obj?obj[name]:def;}end=_658;}return new _644(_659,end);};g.fx.animateStroke=function(args){if(!args.easing){args.easing=d._defaultEasing;}var anim=new d.Animation(args),_65a=args.shape,_65b;d.connect(anim,"beforeBegin",anim,function(){_65b=_65a.getStroke();var prop=args.color,_65c={},_65d,_65e,end;if(prop){_65c.color=_654(prop,_65b,"color",_653);}prop=args.style;if(prop&&prop.values){_65c.style=new _64b(prop.values);}prop=args.width;if(prop){_65c.width=_657(prop,_65b,"width",1);}prop=args.cap;if(prop&&prop.values){_65c.cap=new _64b(prop.values);}prop=args.join;if(prop){if(prop.values){_65c.join=new _64b(prop.values);}else{_65e=prop.start?prop.start:(_65b&&_65b.join||0);end=prop.end?prop.end:(_65b&&_65b.join||0);if(typeof _65e=="number"&&typeof end=="number"){_65c.join=new _644(_65e,end);}}}this.curve=new _64d(_65c,_65b);});d.connect(anim,"onAnimate",_65a,"setStroke");return anim;};g.fx.animateFill=function(args){if(!args.easing){args.easing=d._defaultEasing;}var anim=new d.Animation(args),_65f=args.shape,fill;d.connect(anim,"beforeBegin",anim,function(){fill=_65f.getFill();var prop=args.color,_660={};if(prop){this.curve=_654(prop,fill,"",_653);}});d.connect(anim,"onAnimate",_65f,"setFill");return anim;};g.fx.animateFont=function(args){if(!args.easing){args.easing=d._defaultEasing;}var anim=new d.Animation(args),_661=args.shape,font;d.connect(anim,"beforeBegin",anim,function(){font=_661.getFont();var prop=args.style,_662={},_663,_664,end;if(prop&&prop.values){_662.style=new _64b(prop.values);}prop=args.variant;if(prop&&prop.values){_662.variant=new _64b(prop.values);}prop=args.weight;if(prop&&prop.values){_662.weight=new _64b(prop.values);}prop=args.family;if(prop&&prop.values){_662.family=new _64b(prop.values);}prop=args.size;if(prop&&prop.units){_664=parseFloat(prop.start?prop.start:(_661.font&&_661.font.size||"0"));end=parseFloat(prop.end?prop.end:(_661.font&&_661.font.size||"0"));_662.size=new _646(_664,end,prop.units);}this.curve=new _64d(_662,font);});d.connect(anim,"onAnimate",_661,"setFont");return anim;};g.fx.animateTransform=function(args){if(!args.easing){args.easing=d._defaultEasing;}var anim=new d.Animation(args),_665=args.shape,_666;d.connect(anim,"beforeBegin",anim,function(){_666=_665.getTransform();this.curve=new _64f(args.transform,_666);});d.connect(anim,"onAnimate",_665,"setTransform");return anim;};})();}if(!_4._hasResource["dojox.charting.plot2d.Default"]){_4._hasResource["dojox.charting.plot2d.Default"]=true;_4.provide("dojox.charting.plot2d.Default");(function(){var df=_6.lang.functional,du=_6.lang.utils,dc=_6.charting.plot2d.common,_667=df.lambda("item.purgeGroup()");var _668=1200;_4.declare("dojox.charting.plot2d.Default",_6.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(_669,_66a){this.opt=_4.clone(this.defaultParams);du.updateWithObject(this.opt,_66a);du.updateWithPattern(this.opt,_66a,this.optionalParams);this.series=[];this.hAxis=this.opt.hAxis;this.vAxis=this.opt.vAxis;this.animate=this.opt.animate;},render:function(dim,_66b){if(this.zoom&&!this.isDataDirty()){return this.performZoom(dim,_66b);}this.resetEvents();this.dirty=this.isDirty();if(this.dirty){_4.forEach(this.series,_667);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,_66c,_66d,_66e,_66f=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 _670=t.next(this.opt.areas?"area":"line",[this.opt,run],true),s=run.group,_671=[],_672=[],rseg=null,_673,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_674=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=[];_672.push(j);_671.push(rseg);}rseg.push(run.data[j]);}else{rseg=null;}}for(var seg=0;seg<_671.length;seg++){if(typeof _671[seg][0]=="number"){_673=_4.map(_671[seg],function(v,i){return {x:ht(i+_672[seg]+1)+_66b.l,y:dim.height-_66b.b-vt(v)};},this);}else{_673=_4.map(_671[seg],function(v,i){return {x:ht(v.x)+_66b.l,y:dim.height-_66b.b-vt(v.y)};},this);}var _675=this.opt.tension?dc.curve(_673,this.opt.tension):"";if(this.opt.areas&&_673.length>1){var fill=_670.series.fill;var _676=_4.clone(_673);if(this.opt.tension){var _677="L"+_676[_676.length-1].x+","+(dim.height-_66b.b)+" L"+_676[0].x+","+(dim.height-_66b.b)+" L"+_676[0].x+","+_676[0].y;run.dyn.fill=s.createPath(_675+" "+_677).setFill(fill).getFill();}else{_676.push({x:_673[_673.length-1].x,y:dim.height-_66b.b});_676.push({x:_673[0].x,y:dim.height-_66b.b});_676.push(_673[0]);run.dyn.fill=s.createPolyline(_676).setFill(fill).getFill();}}if(this.opt.lines||this.opt.markers){_66c=_670.series.stroke;if(_670.series.outline){_66d=run.dyn.outline=dc.makeStroke(_670.series.outline);_66d.width=2*_66d.width+_66c.width;}}if(this.opt.markers){run.dyn.marker=_670.symbol;}var _678=null,_679=null,_67a=null;if(_66c&&_670.series.shadow&&_673.length>1){var _67b=_670.series.shadow,_67c=_4.map(_673,function(c){return {x:c.x+_67b.dx,y:c.y+_67b.dy};});if(this.opt.lines){if(this.opt.tension){run.dyn.shadow=s.createPath(dc.curve(_67c,this.opt.tension)).setStroke(_67b).getStroke();}else{run.dyn.shadow=s.createPolyline(_67c).setStroke(_67b).getStroke();}}if(this.opt.markers&&_670.marker.shadow){_67b=_670.marker.shadow;_67a=_4.map(_67c,function(c){return s.createPath("M"+c.x+" "+c.y+" "+_670.symbol).setStroke(_67b).setFill(_67b.color);},this);}}if(this.opt.lines&&_673.length>1){if(_66d){if(this.opt.tension){run.dyn.outline=s.createPath(_675).setStroke(_66d).getStroke();}else{run.dyn.outline=s.createPolyline(_673).setStroke(_66d).getStroke();}}if(this.opt.tension){run.dyn.stroke=s.createPath(_675).setStroke(_66c).getStroke();}else{run.dyn.stroke=s.createPolyline(_673).setStroke(_66c).getStroke();}}if(this.opt.markers){_678=new Array(_673.length);_679=new Array(_673.length);_66d=null;if(_670.marker.outline){_66d=dc.makeStroke(_670.marker.outline);_66d.width=2*_66d.width+(_670.marker.stroke?_670.marker.stroke.width:0);}_4.forEach(_673,function(c,i){var path="M"+c.x+" "+c.y+" "+_670.symbol;if(_66d){_679[i]=s.createPath(path).setStroke(_66d);}_678[i]=s.createPath(path).setStroke(_670.marker.stroke).setFill(_670.marker.fill);},this);run.dyn.markerFill=_670.marker.fill;run.dyn.markerStroke=_670.marker.stroke;if(_66f){_4.forEach(_678,function(s,i){var o={element:"marker",index:i+_672[seg],run:run,shape:s,outline:_679[i]||null,shadow:_67a&&_67a[i]||null,cx:_673[i].x,cy:_673[i].y};if(typeof _671[seg][0]=="number"){o.x=i+_672[seg]+1;o.y=_671[seg][i];}else{o.x=_671[seg][i].x;o.y=_671[seg][i].y;}this._connectEvents(o);_674[i+_672[seg]]=o;},this);}else{delete this._eventSeries[run.name];}}}run.dirty=false;}if(this.animate){var _67d=this.group;_6.gfx.fx.animateTransform(_4.delegate({shape:_67d,duration:_668,transform:[{name:"translate",start:[0,dim.height-_66b.b],end:[0,0]},{name:"scale",start:[1,0],end:[1,1]},{name:"original"}]},this.animate)).play();}this.dirty=false;return this;}});})();}if(!_4._hasResource["dojox.charting.plot2d.Lines"]){_4._hasResource["dojox.charting.plot2d.Lines"]=true;_4.provide("dojox.charting.plot2d.Lines");_4.declare("dojox.charting.plot2d.Lines",_6.charting.plot2d.Default,{constructor:function(){this.opt.lines=true;}});}if(!_4._hasResource["dojox.charting.plot2d.Areas"]){_4._hasResource["dojox.charting.plot2d.Areas"]=true;_4.provide("dojox.charting.plot2d.Areas");_4.declare("dojox.charting.plot2d.Areas",_6.charting.plot2d.Default,{constructor:function(){this.opt.lines=true;this.opt.areas=true;}});}if(!_4._hasResource["dojox.charting.plot2d.Markers"]){_4._hasResource["dojox.charting.plot2d.Markers"]=true;_4.provide("dojox.charting.plot2d.Markers");_4.declare("dojox.charting.plot2d.Markers",_6.charting.plot2d.Default,{constructor:function(){this.opt.markers=true;}});}if(!_4._hasResource["dojox.charting.plot2d.MarkersOnly"]){_4._hasResource["dojox.charting.plot2d.MarkersOnly"]=true;_4.provide("dojox.charting.plot2d.MarkersOnly");_4.declare("dojox.charting.plot2d.MarkersOnly",_6.charting.plot2d.Default,{constructor:function(){this.opt.lines=false;this.opt.markers=true;}});}if(!_4._hasResource["dojox.gfx.gradutils"]){_4._hasResource["dojox.gfx.gradutils"]=true;_4.provide("dojox.gfx.gradutils");(function(){var d=_4,m=_6.gfx.matrix,C=d.Color;function _67e(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;};_6.gfx.gradutils.getColor=function(fill,pt){var o;if(fill){switch(fill.type){case "linear":var _67f=Math.atan2(fill.y2-fill.y1,fill.x2-fill.x1),_680=m.rotate(-_67f),_681=m.project(fill.x2-fill.x1,fill.y2-fill.y1),p=m.multiplyPoint(_681,pt),pf1=m.multiplyPoint(_681,fill.x1,fill.y1),pf2=m.multiplyPoint(_681,fill.x2,fill.y2),_682=m.multiplyPoint(_680,pf2.x-pf1.x,pf2.y-pf1.y).x,o=m.multiplyPoint(_680,p.x-pf1.x,p.y-pf1.y).x/_682;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 _67e(o,fill.colors);}return new C(fill||[0,0,0,0]);};_6.gfx.gradutils.reverse=function(fill){if(fill){switch(fill.type){case "linear":case "radial":fill=_4.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(!_4._hasResource["dojox.charting.plot2d.Scatter"]){_4._hasResource["dojox.charting.plot2d.Scatter"]=true;_4.provide("dojox.charting.plot2d.Scatter");(function(){var df=_6.lang.functional,du=_6.lang.utils,dc=_6.charting.plot2d.common,_683=df.lambda("item.purgeGroup()");_4.declare("dojox.charting.plot2d.Scatter",_6.charting.plot2d.Base,{defaultParams:{hAxis:"x",vAxis:"y",shadows:null,animate:null},optionalParams:{markerStroke:{},markerOutline:{},markerShadow:{},markerFill:{},markerFont:"",markerFontColor:""},constructor:function(_684,_685){this.opt=_4.clone(this.defaultParams);du.updateWithObject(this.opt,_685);du.updateWithPattern(this.opt,_685,this.optionalParams);this.series=[];this.hAxis=this.opt.hAxis;this.vAxis=this.opt.vAxis;this.animate=this.opt.animate;},render:function(dim,_686){if(this.zoom&&!this.isDataDirty()){return this.performZoom(dim,_686);}this.resetEvents();this.dirty=this.isDirty();if(this.dirty){_4.forEach(this.series,_683);this._eventSeries={};this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,_687=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 _688=t.next("marker",[this.opt,run]),s=run.group,_689,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler);if(typeof run.data[0]=="number"){_689=_4.map(run.data,function(v,i){return {x:ht(i+1)+_686.l,y:dim.height-_686.b-vt(v)};},this);}else{_689=_4.map(run.data,function(v,i){return {x:ht(v.x)+_686.l,y:dim.height-_686.b-vt(v.y)};},this);}var _68a=new Array(_689.length),_68b=new Array(_689.length),_68c=new Array(_689.length);_4.forEach(_689,function(c,i){var _68d=typeof run.data[i]=="number"?t.post(_688,"marker"):t.addMixin(_688,"marker",run.data[i],true),path="M"+c.x+" "+c.y+" "+_68d.symbol;if(_68d.marker.shadow){_68a[i]=s.createPath("M"+(c.x+_68d.marker.shadow.dx)+" "+(c.y+_68d.marker.shadow.dy)+" "+_68d.symbol).setStroke(_68d.marker.shadow).setFill(_68d.marker.shadow.color);if(this.animate){this._animateScatter(_68a[i],dim.height-_686.b);}}if(_68d.marker.outline){var _68e=dc.makeStroke(_68d.marker.outline);_68e.width=2*_68e.width+_68d.marker.stroke.width;_68c[i]=s.createPath(path).setStroke(_68e);if(this.animate){this._animateScatter(_68c[i],dim.height-_686.b);}}var _68f=dc.makeStroke(_68d.marker.stroke),fill=this._plotFill(_68d.marker.fill,dim,_686);if(fill&&(fill.type==="linear"||fill.type=="radial")){var _690=_6.gfx.gradutils.getColor(fill,{x:c.x,y:c.y});if(_68f){_68f.color=_690;}_68b[i]=s.createPath(path).setStroke(_68f).setFill(_690);}else{_68b[i]=s.createPath(path).setStroke(_68f).setFill(fill);}if(this.animate){this._animateScatter(_68b[i],dim.height-_686.b);}},this);if(_68b.length){run.dyn.stroke=_68b[_68b.length-1].getStroke();run.dyn.fill=_68b[_68b.length-1].getFill();}if(_687){var _691=new Array(_68b.length);_4.forEach(_68b,function(s,i){var o={element:"marker",index:i,run:run,shape:s,outline:_68c&&_68c[i]||null,shadow:_68a&&_68a[i]||null,cx:_689[i].x,cy:_689[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);_691[i]=o;},this);this._eventSeries[run.name]=_691;}else{delete this._eventSeries[run.name];}run.dirty=false;}this.dirty=false;return this;},_animateScatter:function(_692,_693){_6.gfx.fx.animateTransform(_4.delegate({shape:_692,duration:1200,transform:[{name:"translate",start:[0,_693],end:[0,0]},{name:"scale",start:[0,0],end:[1,1]},{name:"original"}]},this.animate)).play();}});})();}if(!_4._hasResource["dojox.lang.functional.sequence"]){_4._hasResource["dojox.lang.functional.sequence"]=true;_4.provide("dojox.lang.functional.sequence");(function(){var d=_4,df=_6.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(!_4._hasResource["dojox.charting.plot2d.Stacked"]){_4._hasResource["dojox.charting.plot2d.Stacked"]=true;_4.provide("dojox.charting.plot2d.Stacked");(function(){var df=_6.lang.functional,dc=_6.charting.plot2d.common,_694=df.lambda("item.purgeGroup()");_4.declare("dojox.charting.plot2d.Stacked",_6.charting.plot2d.Default,{getSeriesStats:function(){var _695=dc.collectStackedStats(this.series);this._maxRunLength=_695.hmax;return _695;},render:function(dim,_696){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,_696);}this.resetEvents();this.dirty=this.isDirty();if(this.dirty){_4.forEach(this.series,_694);this._eventSeries={};this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,_697=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 _698=t.next(this.opt.areas?"area":"line",[this.opt,run],true),s=run.group,_699,_69a=_4.map(acc,function(v,i){return {x:ht(i+1)+_696.l,y:dim.height-_696.b-vt(v)};},this);var _69b=this.opt.tension?dc.curve(_69a,this.opt.tension):"";if(this.opt.areas){var _69c=_4.clone(_69a);if(this.opt.tension){var p=dc.curve(_69c,this.opt.tension);p+=" L"+_69a[_69a.length-1].x+","+(dim.height-_696.b)+" L"+_69a[0].x+","+(dim.height-_696.b)+" L"+_69a[0].x+","+_69a[0].y;run.dyn.fill=s.createPath(p).setFill(_698.series.fill).getFill();}else{_69c.push({x:_69a[_69a.length-1].x,y:dim.height-_696.b});_69c.push({x:_69a[0].x,y:dim.height-_696.b});_69c.push(_69a[0]);run.dyn.fill=s.createPolyline(_69c).setFill(_698.series.fill).getFill();}}if(this.opt.lines||this.opt.markers){if(_698.series.outline){_699=dc.makeStroke(_698.series.outline);_699.width=2*_699.width+_698.series.stroke.width;}}if(this.opt.markers){run.dyn.marker=_698.symbol;}var _69d,_69e,_69f;if(_698.series.shadow&&_698.series.stroke){var _6a0=_698.series.shadow,_6a1=_4.map(_69a,function(c){return {x:c.x+_6a0.dx,y:c.y+_6a0.dy};});if(this.opt.lines){if(this.opt.tension){run.dyn.shadow=s.createPath(dc.curve(_6a1,this.opt.tension)).setStroke(_6a0).getStroke();}else{run.dyn.shadow=s.createPolyline(_6a1).setStroke(_6a0).getStroke();}}if(this.opt.markers){_6a0=_698.marker.shadow;_69f=_4.map(_6a1,function(c){return s.createPath("M"+c.x+" "+c.y+" "+_698.symbol).setStroke(_6a0).setFill(_6a0.color);},this);}}if(this.opt.lines){if(_699){if(this.opt.tension){run.dyn.outline=s.createPath(_69b).setStroke(_699).getStroke();}else{run.dyn.outline=s.createPolyline(_69a).setStroke(_699).getStroke();}}if(this.opt.tension){run.dyn.stroke=s.createPath(_69b).setStroke(_698.series.stroke).getStroke();}else{run.dyn.stroke=s.createPolyline(_69a).setStroke(_698.series.stroke).getStroke();}}if(this.opt.markers){_69d=new Array(_69a.length);_69e=new Array(_69a.length);_699=null;if(_698.marker.outline){_699=dc.makeStroke(_698.marker.outline);_699.width=2*_699.width+(_698.marker.stroke?_698.marker.stroke.width:0);}_4.forEach(_69a,function(c,i){var path="M"+c.x+" "+c.y+" "+_698.symbol;if(_699){_69e[i]=s.createPath(path).setStroke(_699);}_69d[i]=s.createPath(path).setStroke(_698.marker.stroke).setFill(_698.marker.fill);},this);if(_697){var _6a2=new Array(_69d.length);_4.forEach(_69d,function(s,i){var o={element:"marker",index:i,run:run,shape:s,outline:_69e[i]||null,shadow:_69f&&_69f[i]||null,cx:_69a[i].x,cy:_69a[i].y,x:i+1,y:run.data[i]};this._connectEvents(o);_6a2[i]=o;},this);this._eventSeries[run.name]=_6a2;}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(!_4._hasResource["dojox.charting.plot2d.StackedLines"]){_4._hasResource["dojox.charting.plot2d.StackedLines"]=true;_4.provide("dojox.charting.plot2d.StackedLines");_4.declare("dojox.charting.plot2d.StackedLines",_6.charting.plot2d.Stacked,{constructor:function(){this.opt.lines=true;}});}if(!_4._hasResource["dojox.charting.plot2d.StackedAreas"]){_4._hasResource["dojox.charting.plot2d.StackedAreas"]=true;_4.provide("dojox.charting.plot2d.StackedAreas");_4.declare("dojox.charting.plot2d.StackedAreas",_6.charting.plot2d.Stacked,{constructor:function(){this.opt.lines=true;this.opt.areas=true;}});}if(!_4._hasResource["dojox.charting.plot2d.Columns"]){_4._hasResource["dojox.charting.plot2d.Columns"]=true;_4.provide("dojox.charting.plot2d.Columns");(function(){var df=_6.lang.functional,du=_6.lang.utils,dc=_6.charting.plot2d.common,_6a3=df.lambda("item.purgeGroup()");_4.declare("dojox.charting.plot2d.Columns",_6.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(_6a4,_6a5){this.opt=_4.clone(this.defaultParams);du.updateWithObject(this.opt,_6a5);du.updateWithPattern(this.opt,_6a5,this.optionalParams);this.series=[];this.hAxis=this.opt.hAxis;this.vAxis=this.opt.vAxis;this.animate=this.opt.animate;},getSeriesStats:function(){var _6a6=dc.collectSimpleStats(this.series);_6a6.hmin-=0.5;_6a6.hmax+=0.5;return _6a6;},render:function(dim,_6a7){if(this.zoom&&!this.isDataDirty()){return this.performZoom(dim,_6a7);}this.resetEvents();this.dirty=this.isDirty();if(this.dirty){_4.forEach(this.series,_6a3);this._eventSeries={};this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,f,gap,_6a8,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_6a9=Math.max(0,this._vScaler.bounds.lower),_6aa=vt(_6a9),_6ab=this.events();f=dc.calculateBarSize(this._hScaler.bounds.scale,this.opt);gap=f.gap;_6a8=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 _6ac=t.next("column",[this.opt,run]),s=run.group,_6ad=new Array(run.data.length);for(var j=0;j<run.data.length;++j){var _6ae=run.data[j];if(_6ae!==null){var v=typeof _6ae=="number"?_6ae:_6ae.y,vv=vt(v),_6af=vv-_6aa,h=Math.abs(_6af),_6b0=typeof _6ae!="number"?t.addMixin(_6ac,"column",_6ae,true):t.post(_6ac,"column");if(_6a8>=1&&h>=1){var rect={x:_6a7.l+ht(j+0.5)+gap,y:dim.height-_6a7.b-(v>_6a9?vv:_6aa),width:_6a8,height:h};var _6b1=this._plotFill(_6b0.series.fill,dim,_6a7);_6b1=this._shapeFill(_6b1,rect);var _6b2=s.createRect(rect).setFill(_6b1).setStroke(_6b0.series.stroke);run.dyn.fill=_6b2.getFill();run.dyn.stroke=_6b2.getStroke();if(_6ab){var o={element:"column",index:j,run:run,shape:_6b2,x:j+0.5,y:v};this._connectEvents(o);_6ad[j]=o;}if(this.animate){this._animateColumn(_6b2,dim.height-_6a7.b-_6aa,h);}}}}this._eventSeries[run.name]=_6ad;run.dirty=false;}this.dirty=false;return this;},_animateColumn:function(_6b3,_6b4,_6b5){_6.gfx.fx.animateTransform(_4.delegate({shape:_6b3,duration:1200,transform:[{name:"translate",start:[0,_6b4-(_6b4/_6b5)],end:[0,0]},{name:"scale",start:[1,1/_6b5],end:[1,1]},{name:"original"}]},this.animate)).play();}});})();}if(!_4._hasResource["dojox.charting.plot2d.StackedColumns"]){_4._hasResource["dojox.charting.plot2d.StackedColumns"]=true;_4.provide("dojox.charting.plot2d.StackedColumns");(function(){var df=_6.lang.functional,dc=_6.charting.plot2d.common,_6b6=df.lambda("item.purgeGroup()");_4.declare("dojox.charting.plot2d.StackedColumns",_6.charting.plot2d.Columns,{getSeriesStats:function(){var _6b7=dc.collectStackedStats(this.series);this._maxRunLength=_6b7.hmax;_6b7.hmin-=0.5;_6b7.hmax+=0.5;return _6b7;},render:function(dim,_6b8){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 _6b9=run.data[j];if(_6b9!==null){var v=typeof _6b9=="number"?_6b9:_6b9.y;if(isNaN(v)){v=0;}acc[j]+=v;}}}if(this.zoom&&!this.isDataDirty()){return this.performZoom(dim,_6b8);}this.resetEvents();this.dirty=this.isDirty();if(this.dirty){_4.forEach(this.series,_6b6);this._eventSeries={};this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,f,gap,_6ba,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_6bb=this.events();f=dc.calculateBarSize(this._hScaler.bounds.scale,this.opt);gap=f.gap;_6ba=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 _6bc=t.next("column",[this.opt,run]),s=run.group,_6bd=new Array(acc.length);for(var j=0;j<acc.length;++j){var _6b9=run.data[j];if(_6b9!==null){var v=acc[j],_6be=vt(v),_6bf=typeof _6b9!="number"?t.addMixin(_6bc,"column",_6b9,true):t.post(_6bc,"column");if(_6ba>=1&&_6be>=1){var rect={x:_6b8.l+ht(j+0.5)+gap,y:dim.height-_6b8.b-vt(v),width:_6ba,height:_6be};var _6c0=this._plotFill(_6bf.series.fill,dim,_6b8);_6c0=this._shapeFill(_6c0,rect);var _6c1=s.createRect(rect).setFill(_6c0).setStroke(_6bf.series.stroke);run.dyn.fill=_6c1.getFill();run.dyn.stroke=_6c1.getStroke();if(_6bb){var o={element:"column",index:j,run:run,shape:_6c1,x:j+0.5,y:v};this._connectEvents(o);_6bd[j]=o;}if(this.animate){this._animateColumn(_6c1,dim.height-_6b8.b,_6be);}}}}this._eventSeries[run.name]=_6bd;run.dirty=false;for(var j=0;j<run.data.length;++j){var _6b9=run.data[j];if(_6b9!==null){var v=typeof _6b9=="number"?_6b9:_6b9.y;if(isNaN(v)){v=0;}acc[j]-=v;}}}this.dirty=false;return this;}});})();}if(!_4._hasResource["dojox.charting.plot2d.ClusteredColumns"]){_4._hasResource["dojox.charting.plot2d.ClusteredColumns"]=true;_4.provide("dojox.charting.plot2d.ClusteredColumns");(function(){var df=_6.lang.functional,dc=_6.charting.plot2d.common,_6c2=df.lambda("item.purgeGroup()");_4.declare("dojox.charting.plot2d.ClusteredColumns",_6.charting.plot2d.Columns,{render:function(dim,_6c3){if(this.zoom&&!this.isDataDirty()){return this.performZoom(dim,_6c3);}this.resetEvents();this.dirty=this.isDirty();if(this.dirty){_4.forEach(this.series,_6c2);this._eventSeries={};this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,f,gap,_6c4,_6c5,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_6c6=Math.max(0,this._vScaler.bounds.lower),_6c7=vt(_6c6),_6c8=this.events();f=dc.calculateBarSize(this._hScaler.bounds.scale,this.opt,this.series.length);gap=f.gap;_6c4=_6c5=f.size;for(var i=0;i<this.series.length;++i){var run=this.series[i],_6c9=_6c5*i;if(!this.dirty&&!run.dirty){t.skip();this._reconnectEvents(run.name);continue;}run.cleanGroup();var _6ca=t.next("column",[this.opt,run]),s=run.group,_6cb=new Array(run.data.length);for(var j=0;j<run.data.length;++j){var _6cc=run.data[j];if(_6cc!==null){var v=typeof _6cc=="number"?_6cc:_6cc.y,vv=vt(v),_6cd=vv-_6c7,h=Math.abs(_6cd),_6ce=typeof _6cc!="number"?t.addMixin(_6ca,"column",_6cc,true):t.post(_6ca,"column");if(_6c4>=1&&h>=1){var rect={x:_6c3.l+ht(j+0.5)+gap+_6c9,y:dim.height-_6c3.b-(v>_6c6?vv:_6c7),width:_6c4,height:h};var _6cf=this._plotFill(_6ce.series.fill,dim,_6c3);_6cf=this._shapeFill(_6cf,rect);var _6d0=s.createRect(rect).setFill(_6cf).setStroke(_6ce.series.stroke);run.dyn.fill=_6d0.getFill();run.dyn.stroke=_6d0.getStroke();if(_6c8){var o={element:"column",index:j,run:run,shape:_6d0,x:j+0.5,y:v};this._connectEvents(o);_6cb[j]=o;}if(this.animate){this._animateColumn(_6d0,dim.height-_6c3.b-_6c7,h);}}}}this._eventSeries[run.name]=_6cb;run.dirty=false;}this.dirty=false;return this;}});})();}if(!_4._hasResource["dojox.charting.plot2d.Bars"]){_4._hasResource["dojox.charting.plot2d.Bars"]=true;_4.provide("dojox.charting.plot2d.Bars");(function(){var df=_6.lang.functional,du=_6.lang.utils,dc=_6.charting.plot2d.common,_6d1=df.lambda("item.purgeGroup()");_4.declare("dojox.charting.plot2d.Bars",_6.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(_6d2,_6d3){this.opt=_4.clone(this.defaultParams);du.updateWithObject(this.opt,_6d3);du.updateWithPattern(this.opt,_6d3,this.optionalParams);this.series=[];this.hAxis=this.opt.hAxis;this.vAxis=this.opt.vAxis;this.animate=this.opt.animate;},getSeriesStats:function(){var _6d4=dc.collectSimpleStats(this.series),t;_6d4.hmin-=0.5;_6d4.hmax+=0.5;t=_6d4.hmin,_6d4.hmin=_6d4.vmin,_6d4.vmin=t;t=_6d4.hmax,_6d4.hmax=_6d4.vmax,_6d4.vmax=t;return _6d4;},render:function(dim,_6d5){if(this.zoom&&!this.isDataDirty()){return this.performZoom(dim,_6d5);}this.dirty=this.isDirty();this.resetEvents();if(this.dirty){_4.forEach(this.series,_6d1);this._eventSeries={};this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,f,gap,_6d6,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_6d7=Math.max(0,this._hScaler.bounds.lower),_6d8=ht(_6d7),_6d9=this.events();f=dc.calculateBarSize(this._vScaler.bounds.scale,this.opt);gap=f.gap;_6d6=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 _6da=t.next("bar",[this.opt,run]),s=run.group,_6db=new Array(run.data.length);for(var j=0;j<run.data.length;++j){var _6dc=run.data[j];if(_6dc!==null){var v=typeof _6dc=="number"?_6dc:_6dc.y,hv=ht(v),_6dd=hv-_6d8,w=Math.abs(_6dd),_6de=typeof _6dc!="number"?t.addMixin(_6da,"bar",_6dc,true):t.post(_6da,"bar");if(w>=1&&_6d6>=1){var rect={x:_6d5.l+(v<_6d7?hv:_6d8),y:dim.height-_6d5.b-vt(j+1.5)+gap,width:w,height:_6d6};var _6df=this._plotFill(_6de.series.fill,dim,_6d5);_6df=this._shapeFill(_6df,rect);var _6e0=s.createRect(rect).setFill(_6df).setStroke(_6de.series.stroke);run.dyn.fill=_6e0.getFill();run.dyn.stroke=_6e0.getStroke();if(_6d9){var o={element:"bar",index:j,run:run,shape:_6e0,x:v,y:j+1.5};this._connectEvents(o);_6db[j]=o;}if(this.animate){this._animateBar(_6e0,_6d5.l+_6d8,-w);}}}}this._eventSeries[run.name]=_6db;run.dirty=false;}this.dirty=false;return this;},_animateBar:function(_6e1,_6e2,_6e3){_6.gfx.fx.animateTransform(_4.delegate({shape:_6e1,duration:1200,transform:[{name:"translate",start:[_6e2-(_6e2/_6e3),0],end:[0,0]},{name:"scale",start:[1/_6e3,1],end:[1,1]},{name:"original"}]},this.animate)).play();}});})();}if(!_4._hasResource["dojox.charting.plot2d.StackedBars"]){_4._hasResource["dojox.charting.plot2d.StackedBars"]=true;_4.provide("dojox.charting.plot2d.StackedBars");(function(){var df=_6.lang.functional,dc=_6.charting.plot2d.common,_6e4=df.lambda("item.purgeGroup()");_4.declare("dojox.charting.plot2d.StackedBars",_6.charting.plot2d.Bars,{getSeriesStats:function(){var _6e5=dc.collectStackedStats(this.series),t;this._maxRunLength=_6e5.hmax;_6e5.hmin-=0.5;_6e5.hmax+=0.5;t=_6e5.hmin,_6e5.hmin=_6e5.vmin,_6e5.vmin=t;t=_6e5.hmax,_6e5.hmax=_6e5.vmax,_6e5.vmax=t;return _6e5;},render:function(dim,_6e6){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 _6e7=run.data[j];if(_6e7!==null){var v=typeof _6e7=="number"?_6e7:_6e7.y;if(isNaN(v)){v=0;}acc[j]+=v;}}}if(this.zoom&&!this.isDataDirty()){return this.performZoom(dim,_6e6);}this.resetEvents();this.dirty=this.isDirty();if(this.dirty){_4.forEach(this.series,_6e4);this._eventSeries={};this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,f,gap,_6e8,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_6e9=this.events();f=dc.calculateBarSize(this._vScaler.bounds.scale,this.opt);gap=f.gap;_6e8=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 _6ea=t.next("bar",[this.opt,run]),s=run.group,_6eb=new Array(acc.length);for(var j=0;j<acc.length;++j){var _6e7=run.data[j];if(_6e7!==null){var v=acc[j],_6ec=ht(v),_6ed=typeof _6e7!="number"?t.addMixin(_6ea,"bar",_6e7,true):t.post(_6ea,"bar");if(_6ec>=1&&_6e8>=1){var rect={x:_6e6.l,y:dim.height-_6e6.b-vt(j+1.5)+gap,width:_6ec,height:_6e8};var _6ee=this._plotFill(_6ed.series.fill,dim,_6e6);_6ee=this._shapeFill(_6ee,rect);var _6ef=s.createRect(rect).setFill(_6ee).setStroke(_6ed.series.stroke);run.dyn.fill=_6ef.getFill();run.dyn.stroke=_6ef.getStroke();if(_6e9){var o={element:"bar",index:j,run:run,shape:_6ef,x:v,y:j+1.5};this._connectEvents(o);_6eb[j]=o;}if(this.animate){this._animateBar(_6ef,_6e6.l,-_6ec);}}}}this._eventSeries[run.name]=_6eb;run.dirty=false;for(var j=0;j<run.data.length;++j){var _6e7=run.data[j];if(_6e7!==null){var v=typeof _6e7=="number"?_6e7:_6e7.y;if(isNaN(v)){v=0;}acc[j]-=v;}}}this.dirty=false;return this;}});})();}if(!_4._hasResource["dojox.charting.plot2d.ClusteredBars"]){_4._hasResource["dojox.charting.plot2d.ClusteredBars"]=true;_4.provide("dojox.charting.plot2d.ClusteredBars");(function(){var df=_6.lang.functional,dc=_6.charting.plot2d.common,_6f0=df.lambda("item.purgeGroup()");_4.declare("dojox.charting.plot2d.ClusteredBars",_6.charting.plot2d.Bars,{render:function(dim,_6f1){if(this.zoom&&!this.isDataDirty()){return this.performZoom(dim,_6f1);}this.resetEvents();this.dirty=this.isDirty();if(this.dirty){_4.forEach(this.series,_6f0);this._eventSeries={};this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,f,gap,_6f2,_6f3,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_6f4=Math.max(0,this._hScaler.bounds.lower),_6f5=ht(_6f4),_6f6=this.events();f=dc.calculateBarSize(this._vScaler.bounds.scale,this.opt,this.series.length);gap=f.gap;_6f2=_6f3=f.size;for(var i=this.series.length-1;i>=0;--i){var run=this.series[i],_6f7=_6f3*(this.series.length-i-1);if(!this.dirty&&!run.dirty){t.skip();this._reconnectEvents(run.name);continue;}run.cleanGroup();var _6f8=t.next("bar",[this.opt,run]),s=run.group,_6f9=new Array(run.data.length);for(var j=0;j<run.data.length;++j){var _6fa=run.data[j];if(_6fa!==null){var v=typeof _6fa=="number"?_6fa:_6fa.y,hv=ht(v),_6fb=hv-_6f5,w=Math.abs(_6fb),_6fc=typeof _6fa!="number"?t.addMixin(_6f8,"bar",_6fa,true):t.post(_6f8,"bar");if(w>=1&&_6f2>=1){var rect={x:_6f1.l+(v<_6f4?hv:_6f5),y:dim.height-_6f1.b-vt(j+1.5)+gap+_6f7,width:w,height:_6f2};var _6fd=this._plotFill(_6fc.series.fill,dim,_6f1);_6fd=this._shapeFill(_6fd,rect);var _6fe=s.createRect(rect).setFill(_6fd).setStroke(_6fc.series.stroke);run.dyn.fill=_6fe.getFill();run.dyn.stroke=_6fe.getStroke();if(_6f6){var o={element:"bar",index:j,run:run,shape:_6fe,x:v,y:j+1.5};this._connectEvents(o);_6f9[j]=o;}if(this.animate){this._animateBar(_6fe,_6f1.l+_6f5,-_6fb);}}}}this._eventSeries[run.name]=_6f9;run.dirty=false;}this.dirty=false;return this;}});})();}if(!_4._hasResource["dojox.charting.plot2d.Grid"]){_4._hasResource["dojox.charting.plot2d.Grid"]=true;_4.provide("dojox.charting.plot2d.Grid");(function(){var du=_6.lang.utils,dc=_6.charting.plot2d.common;_4.declare("dojox.charting.plot2d.Grid",_6.charting.Element,{defaultParams:{hAxis:"x",vAxis:"y",hMajorLines:true,hMinorLines:false,vMajorLines:true,vMinorLines:false,hStripes:"none",vStripes:"none",animate:null},optionalParams:{},constructor:function(_6ff,_700){this.opt=_4.clone(this.defaultParams);du.updateWithObject(this.opt,_700);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 _4.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,_701){var vs=this._vAxis.scale||1,hs=this._hAxis.scale||1,_702=dim.height-_701.b,_703=this._hAxis.getScaler().bounds,_704=(_703.from-_703.lower)*_703.scale,_705=this._vAxis.getScaler().bounds,_706=(_705.from-_705.lower)*_705.scale;rVScale=vs/this.lastWindow.vscale,rHScale=hs/this.lastWindow.hscale,rXOffset=(this.lastWindow.xoffset-_704)/((this.lastWindow.hscale==1)?hs:this.lastWindow.hscale),rYOffset=(_706-this.lastWindow.yoffset)/((this.lastWindow.vscale==1)?vs:this.lastWindow.vscale),shape=this.group,anim=_6.gfx.fx.animateTransform(_4.delegate({shape:shape,duration:1200,transform:[{name:"translate",start:[0,0],end:[_701.l*(1-rHScale),_702*(1-rVScale)]},{name:"scale",start:[1,1],end:[rHScale,rVScale]},{name:"original"},{name:"translate",start:[0,0],end:[rXOffset,rYOffset]}]},this.zoom));_4.mixin(this.lastWindow,{vscale:vs,hscale:hs,xoffset:_704,yoffset:_706});this.zoomQueue.push(anim);_4.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,_707){if(this.zoom){return this.performZoom(dim,_707);}this.dirty=this.isDirty();if(!this.dirty){return this;}this.cleanGroup();var s=this.group,ta=this.chart.theme.axis;try{var _708=this._vAxis.getScaler(),vt=_708.scaler.getTransformerFromModel(_708),_709=this._vAxis.getTicks();if(this.opt.hMinorLines){_4.forEach(_709.minor,function(tick){var y=dim.height-_707.b-vt(tick.value);var _70a=s.createLine({x1:_707.l,y1:y,x2:dim.width-_707.r,y2:y}).setStroke(ta.minorTick);if(this.animate){this._animateGrid(_70a,"h",_707.l,_707.r+_707.l-dim.width);}},this);}if(this.opt.hMajorLines){_4.forEach(_709.major,function(tick){var y=dim.height-_707.b-vt(tick.value);var _70b=s.createLine({x1:_707.l,y1:y,x2:dim.width-_707.r,y2:y}).setStroke(ta.majorTick);if(this.animate){this._animateGrid(_70b,"h",_707.l,_707.r+_707.l-dim.width);}},this);}}catch(e){}try{var _70c=this._hAxis.getScaler(),ht=_70c.scaler.getTransformerFromModel(_70c),_709=this._hAxis.getTicks();if(_709&&this.opt.vMinorLines){_4.forEach(_709.minor,function(tick){var x=_707.l+ht(tick.value);var _70d=s.createLine({x1:x,y1:_707.t,x2:x,y2:dim.height-_707.b}).setStroke(ta.minorTick);if(this.animate){this._animateGrid(_70d,"v",dim.height-_707.b,dim.height-_707.b-_707.t);}},this);}if(_709&&this.opt.vMajorLines){_4.forEach(_709.major,function(tick){var x=_707.l+ht(tick.value);var _70e=s.createLine({x1:x,y1:_707.t,x2:x,y2:dim.height-_707.b}).setStroke(ta.majorTick);if(this.animate){this._animateGrid(_70e,"v",dim.height-_707.b,dim.height-_707.b-_707.t);}},this);}}catch(e){}this.dirty=false;return this;},_animateGrid:function(_70f,type,_710,size){var _711=type=="h"?[_710,0]:[0,_710];var _712=type=="h"?[1/size,1]:[1,1/size];_6.gfx.fx.animateTransform(_4.delegate({shape:_70f,duration:1200,transform:[{name:"translate",start:_711,end:[0,0]},{name:"scale",start:_712,end:[1,1]},{name:"original"}]},this.animate)).play();}});})();}if(!_4._hasResource["dojox.charting.plot2d.Pie"]){_4._hasResource["dojox.charting.plot2d.Pie"]=true;_4.provide("dojox.charting.plot2d.Pie");(function(){var df=_6.lang.functional,du=_6.lang.utils,dc=_6.charting.plot2d.common,da=_6.charting.axis2d.common,g=_6.gfx,m=g.matrix,_713=0.2;_4.declare("dojox.charting.plot2d.Pie",[_6.charting.Element,_6.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(_714,_715){this.opt=_4.clone(this.defaultParams);du.updateWithObject(this.opt,_715);du.updateWithPattern(this.opt,_715,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 _4.delegate(dc.defaultStats);},initializeScalers:function(){return this;},getRequiredColors:function(){return this.run?this.run.data.length:0;},render:function(dim,_716){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-_716.l-_716.r)/2,ry=(dim.height-_716.t-_716.b)/2,r=Math.min(rx,ry),_717="font" in this.opt?this.opt.font:t.axis.font,size=_717?g.normalizedLength(g.splitFontString(_717).size):0,_718="fontColor" in this.opt?this.opt.fontColor:t.axis.fontColor,_719=m._degToRad(this.opt.startAngle),_71a=_719,step,_71b,_71c,_71d,_71e,_71f,run=this.run.data,_720=this.events();if(typeof run[0]=="number"){_71b=df.map(run,"x ? Math.max(x, 0) : 0");if(df.every(_71b,"<= 0")){return this;}_71c=df.map(_71b,"/this",df.foldl(_71b,"+",0));if(this.opt.labels){_71d=_4.map(_71c,function(x){return x>0?this._getLabel(x*100)+"%":"";},this);}}else{_71b=df.map(run,"x ? Math.max(x.y, 0) : 0");if(df.every(_71b,"<= 0")){return this;}_71c=df.map(_71b,"/this",df.foldl(_71b,"+",0));if(this.opt.labels){_71d=_4.map(_71c,function(x,i){if(x<=0){return "";}var v=run[i];return "text" in v?v.text:this._getLabel(x*100)+"%";},this);}}var _721=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){_71e=df.foldl1(df.map(_71d,function(_722,i){var font=_721[i].series.font;return _6.gfx._base._getTextBox(_722,{font:font}).w;},this),"Math.max(a, b)")/2;if(this.opt.labelOffset<0){r=Math.min(rx-2*_71e,ry-size)+this.opt.labelOffset;}_71f=r-this.opt.labelOffset;}if("radius" in this.opt){r=this.opt.radius;_71f=r-this.opt.labelOffset;}var _723={cx:_716.l+rx,cy:_716.t+ry,r:r};this.dyn=[];var _724=new Array(_71c.length);_4.some(_71c,function(_725,i){if(_725<0){return false;}if(_725==0){this.dyn.push({fill:null,stroke:null});return false;}var v=run[i],_726=_721[i],_727;if(_725>=1){_727=this._plotFill(_726.series.fill,dim,_716);_727=this._shapeFill(_727,{x:_723.cx-_723.r,y:_723.cy-_723.r,width:2*_723.r,height:2*_723.r});_727=this._pseudoRadialFill(_727,{x:_723.cx,y:_723.cy},_723.r);var _728=s.createCircle(_723).setFill(_727).setStroke(_726.series.stroke);this.dyn.push({fill:_727,stroke:_726.series.stroke});if(_720){var o={element:"slice",index:i,run:this.run,shape:_728,x:i,y:typeof v=="number"?v:v.y,cx:_723.cx,cy:_723.cy,cr:r};this._connectEvents(o);_724[i]=o;}return true;}var end=_71a+_725*2*Math.PI;if(i+1==_71c.length){end=_719+2*Math.PI;}var step=end-_71a,x1=_723.cx+r*Math.cos(_71a),y1=_723.cy+r*Math.sin(_71a),x2=_723.cx+r*Math.cos(end),y2=_723.cy+r*Math.sin(end);var _729=m._degToRad(this.opt.fanSize);if(_726.series.fill&&_726.series.fill.type==="radial"&&this.opt.radGrad==="fan"&&step>_729){var _72a=s.createGroup(),_72b=Math.ceil(step/_729),_72c=step/_72b;_727=this._shapeFill(_726.series.fill,{x:_723.cx-_723.r,y:_723.cy-_723.r,width:2*_723.r,height:2*_723.r});for(var j=0;j<_72b;++j){var _72d=j==0?x1:_723.cx+r*Math.cos(_71a+(j-_713)*_72c),_72e=j==0?y1:_723.cy+r*Math.sin(_71a+(j-_713)*_72c),_72f=j==_72b-1?x2:_723.cx+r*Math.cos(_71a+(j+1+_713)*_72c),_730=j==_72b-1?y2:_723.cy+r*Math.sin(_71a+(j+1+_713)*_72c),fan=_72a.createPath({}).moveTo(_723.cx,_723.cy).lineTo(_72d,_72e).arcTo(r,r,0,_72c>Math.PI,true,_72f,_730).lineTo(_723.cx,_723.cy).closePath().setFill(this._pseudoRadialFill(_727,{x:_723.cx,y:_723.cy},r,_71a+(j+0.5)*_72c,_71a+(j+0.5)*_72c));}_72a.createPath({}).moveTo(_723.cx,_723.cy).lineTo(x1,y1).arcTo(r,r,0,step>Math.PI,true,x2,y2).lineTo(_723.cx,_723.cy).closePath().setStroke(_726.series.stroke);_728=_72a;}else{_728=s.createPath({}).moveTo(_723.cx,_723.cy).lineTo(x1,y1).arcTo(r,r,0,step>Math.PI,true,x2,y2).lineTo(_723.cx,_723.cy).closePath().setStroke(_726.series.stroke);var _727=_726.series.fill;if(_727&&_727.type==="radial"){_727=this._shapeFill(_727,{x:_723.cx-_723.r,y:_723.cy-_723.r,width:2*_723.r,height:2*_723.r});if(this.opt.radGrad==="linear"){_727=this._pseudoRadialFill(_727,{x:_723.cx,y:_723.cy},r,_71a,end);}}else{if(_727&&_727.type==="linear"){_727=this._plotFill(_727,dim,_716);_727=this._shapeFill(_727,_728.getBoundingBox());}}_728.setFill(_727);}this.dyn.push({fill:_727,stroke:_726.series.stroke});if(_720){var o={element:"slice",index:i,run:this.run,shape:_728,x:i,y:typeof v=="number"?v:v.y,cx:_723.cx,cy:_723.cy,cr:r};this._connectEvents(o);_724[i]=o;}_71a=end;return false;},this);if(this.opt.labels){if(this.opt.labelStyle=="default"){_71a=_719;_4.some(_71c,function(_731,i){if(_731<=0){return false;}var _732=_721[i];if(_731>=1){var v=run[i],elem=da.createText[this.opt.htmlLabels&&_6.gfx.renderer!="vml"?"html":"gfx"](this.chart,s,_723.cx,_723.cy+size/2,"middle",_71d[i],_732.series.font,_732.series.fontColor);if(this.opt.htmlLabels){this.htmlElements.push(elem);}return true;}var end=_71a+_731*2*Math.PI,v=run[i];if(i+1==_71c.length){end=_719+2*Math.PI;}var _733=(_71a+end)/2,x=_723.cx+_71f*Math.cos(_733),y=_723.cy+_71f*Math.sin(_733)+size/2;var elem=da.createText[this.opt.htmlLabels&&_6.gfx.renderer!="vml"?"html":"gfx"](this.chart,s,x,y,"middle",_71d[i],_732.series.font,_732.series.fontColor);if(this.opt.htmlLabels){this.htmlElements.push(elem);}_71a=end;return false;},this);}else{if(this.opt.labelStyle=="columns"){_71a=_719;var _734=[];_4.forEach(_71c,function(_735,i){var end=_71a+_735*2*Math.PI;if(i+1==_71c.length){end=_719+2*Math.PI;}var _736=(_71a+end)/2;_734.push({angle:_736,left:Math.cos(_736)<0,theme:_721[i],index:i,omit:end-_71a<0.001});_71a=end;});var _737=_6.gfx._base._getTextBox("a",{font:_717}).h;this._getProperLabelRadius(_734,_737,_723.r*1.1);_4.forEach(_734,function(_738,i){if(!_738.omit){var _739=_723.cx-_723.r*2,_73a=_723.cx+_723.r*2,_73b=_6.gfx._base._getTextBox(_71d[i],{font:_717}).w,x=_723.cx+_738.labelR*Math.cos(_738.angle),y=_723.cy+_738.labelR*Math.sin(_738.angle),_73c=(_738.left)?(_739+_73b):(_73a-_73b),_73d=(_738.left)?_739:_73c;var _73e=s.createPath().moveTo(_723.cx+_723.r*Math.cos(_738.angle),_723.cy+_723.r*Math.sin(_738.angle));if(Math.abs(_738.labelR*Math.cos(_738.angle))<_723.r*2-_73b){_73e.lineTo(x,y);}_73e.lineTo(_73c,y).setStroke(_738.theme.series.labelWiring);var elem=da.createText[this.opt.htmlLabels&&_6.gfx.renderer!="vml"?"html":"gfx"](this.chart,s,_73d,y,"left",_71d[i],_738.theme.series.font,_738.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:_724[esi++];});return this;},_getProperLabelRadius:function(_73f,_740,_741){var _742={},_743={},_744=1,_745=1;if(_73f.length==1){_73f[0].labelR=_741;return;}for(var i=0;i<_73f.length;i++){var _746=Math.abs(Math.sin(_73f[i].angle));if(_73f[i].left){if(_744>_746){_744=_746;_742=_73f[i];}}else{if(_745>_746){_745=_746;_743=_73f[i];}}}_742.labelR=_743.labelR=_741;this._caculateLabelR(_742,_73f,_740);this._caculateLabelR(_743,_73f,_740);},_caculateLabelR:function(_747,_748,_749){var i=_747.index,_74a=_748.length,_74b=_747.labelR;while(!(_748[i%_74a].left^_748[(i+1)%_74a].left)){if(!_748[(i+1)%_74a].omit){var _74c=(Math.sin(_748[i%_74a].angle)*_74b+((_748[i%_74a].left)?(-_749):_749))/Math.sin(_748[(i+1)%_74a].angle);_74b=(_74c<_747.labelR)?_747.labelR:_74c;_748[(i+1)%_74a].labelR=_74b;}i++;}i=_747.index,j=(i==0)?_74a-1:i-1;while(!(_748[i].left^_748[j].left)){if(!_748[j].omit){var _74c=(Math.sin(_748[i].angle)*_74b+((_748[i].left)?_749:(-_749)))/Math.sin(_748[j].angle);_74b=(_74c<_747.labelR)?_747.labelR:_74c;_748[j].labelR=_74b;}i--;j--;i=(i<0)?i+_748.length:i;j=(j<0)?j+_748.length:j;}},_getLabel:function(_74d){return dc.getLabel(_74d,this.opt.fixed,this.opt.precision);}});})();}if(!_4._hasResource["dojox.charting.plot2d.Bubble"]){_4._hasResource["dojox.charting.plot2d.Bubble"]=true;_4.provide("dojox.charting.plot2d.Bubble");(function(){var df=_6.lang.functional,du=_6.lang.utils,dc=_6.charting.plot2d.common,_74e=df.lambda("item.purgeGroup()");_4.declare("dojox.charting.plot2d.Bubble",_6.charting.plot2d.Base,{defaultParams:{hAxis:"x",vAxis:"y",animate:null},optionalParams:{stroke:{},outline:{},shadow:{},fill:{},font:"",fontColor:""},constructor:function(_74f,_750){this.opt=_4.clone(this.defaultParams);du.updateWithObject(this.opt,_750);du.updateWithPattern(this.opt,_750,this.optionalParams);this.series=[];this.hAxis=this.opt.hAxis;this.vAxis=this.opt.vAxis;this.animate=this.opt.animate;},render:function(dim,_751){if(this.zoom&&!this.isDataDirty()){return this.performZoom(dim,_751);}this.resetEvents();this.dirty=this.isDirty();if(this.dirty){_4.forEach(this.series,_74e);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),_752=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 _753=t.next("circle",[this.opt,run]),s=run.group,_754=_4.map(run.data,function(v,i){return v?{x:ht(v.x)+_751.l,y:dim.height-_751.b-vt(v.y),radius:this._vScaler.bounds.scale*(v.size/2)}:null;},this);var _755=null,_756=null,_757=null;if(_753.series.shadow){_757=_4.map(_754,function(item){if(item!==null){var _758=t.addMixin(_753,"circle",item,true),_759=_758.series.shadow;var _75a=s.createCircle({cx:item.x+_759.dx,cy:item.y+_759.dy,r:item.radius}).setStroke(_759).setFill(_759.color);if(this.animate){this._animateBubble(_75a,dim.height-_751.b,item.radius);}return _75a;}return null;},this);if(_757.length){run.dyn.shadow=_757[_757.length-1].getStroke();}}if(_753.series.outline){_756=_4.map(_754,function(item){if(item!==null){var _75b=t.addMixin(_753,"circle",item,true),_75c=dc.makeStroke(_75b.series.outline);_75c.width=2*_75c.width+_753.series.stroke.width;var _75d=s.createCircle({cx:item.x,cy:item.y,r:item.radius}).setStroke(_75c);if(this.animate){this._animateBubble(_75d,dim.height-_751.b,item.radius);}return _75d;}return null;},this);if(_756.length){run.dyn.outline=_756[_756.length-1].getStroke();}}_755=_4.map(_754,function(item){if(item!==null){var _75e=t.addMixin(_753,"circle",item,true),rect={x:item.x-item.radius,y:item.y-item.radius,width:2*item.radius,height:2*item.radius};var _75f=this._plotFill(_75e.series.fill,dim,_751);_75f=this._shapeFill(_75f,rect);var _760=s.createCircle({cx:item.x,cy:item.y,r:item.radius}).setFill(_75f).setStroke(_75e.series.stroke);if(this.animate){this._animateBubble(_760,dim.height-_751.b,item.radius);}return _760;}return null;},this);if(_755.length){run.dyn.fill=_755[_755.length-1].getFill();run.dyn.stroke=_755[_755.length-1].getStroke();}if(_752){var _761=new Array(_755.length);_4.forEach(_755,function(s,i){if(s!==null){var o={element:"circle",index:i,run:run,shape:s,outline:_756&&_756[i]||null,shadow:_757&&_757[i]||null,x:run.data[i].x,y:run.data[i].y,r:run.data[i].size/2,cx:_754[i].x,cy:_754[i].y,cr:_754[i].radius};this._connectEvents(o);_761[i]=o;}},this);this._eventSeries[run.name]=_761;}else{delete this._eventSeries[run.name];}run.dirty=false;}this.dirty=false;return this;},_animateBubble:function(_762,_763,size){_6.gfx.fx.animateTransform(_4.delegate({shape:_762,duration:1200,transform:[{name:"translate",start:[0,_763],end:[0,0]},{name:"scale",start:[0,1/size],end:[1,1]},{name:"original"}]},this.animate)).play();}});})();}if(!_4._hasResource["dojox.charting.plot2d.Candlesticks"]){_4._hasResource["dojox.charting.plot2d.Candlesticks"]=true;_4.provide("dojox.charting.plot2d.Candlesticks");(function(){var df=_6.lang.functional,du=_6.lang.utils,dc=_6.charting.plot2d.common,_764=df.lambda("item.purgeGroup()");_4.declare("dojox.charting.plot2d.Candlesticks",_6.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(_765,_766){this.opt=_4.clone(this.defaultParams);du.updateWithObject(this.opt,_766);du.updateWithPattern(this.opt,_766,this.optionalParams);this.series=[];this.hAxis=this.opt.hAxis;this.vAxis=this.opt.vAxis;this.animate=this.opt.animate;},collectStats:function(_767){var _768=_4.delegate(dc.defaultStats);for(var i=0;i<_767.length;i++){var run=_767[i];if(!run.data.length){continue;}var _769=_768.vmin,_76a=_768.vmax;if(!("ymin" in run)||!("ymax" in run)){_4.forEach(run.data,function(val,idx){if(val!==null){var x=val.x||idx+1;_768.hmin=Math.min(_768.hmin,x);_768.hmax=Math.max(_768.hmax,x);_768.vmin=Math.min(_768.vmin,val.open,val.close,val.high,val.low);_768.vmax=Math.max(_768.vmax,val.open,val.close,val.high,val.low);}});}if("ymin" in run){_768.vmin=Math.min(_769,run.ymin);}if("ymax" in run){_768.vmax=Math.max(_76a,run.ymax);}}return _768;},getSeriesStats:function(){var _76b=this.collectStats(this.series);_76b.hmin-=0.5;_76b.hmax+=0.5;return _76b;},render:function(dim,_76c){if(this.zoom&&!this.isDataDirty()){return this.performZoom(dim,_76c);}this.resetEvents();this.dirty=this.isDirty();if(this.dirty){_4.forEach(this.series,_764);this._eventSeries={};this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,f,gap,_76d,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_76e=Math.max(0,this._vScaler.bounds.lower),_76f=vt(_76e),_770=this.events();f=dc.calculateBarSize(this._hScaler.bounds.scale,this.opt);gap=f.gap;_76d=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 _771=t.next("candlestick",[this.opt,run]),s=run.group,_772=new Array(run.data.length);for(var j=0;j<run.data.length;++j){var v=run.data[j];if(v!==null){var _773=t.addMixin(_771,"candlestick",v,true);var x=ht(v.x||(j+0.5))+_76c.l+gap,y=dim.height-_76c.b,open=vt(v.open),_774=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(_76d>=1){var _775=open>_774;var line={x1:_76d/2,x2:_76d/2,y1:y-high,y2:y-low},rect={x:0,y:y-Math.max(open,_774),width:_76d,height:Math.max(_775?open-_774:_774-open,1)};shape=s.createGroup();shape.setTransform({dx:x,dy:0});var _776=shape.createGroup();_776.createLine(line).setStroke(_773.series.stroke);_776.createRect(rect).setStroke(_773.series.stroke).setFill(_775?_773.series.fill:"white");if("mid" in v){_776.createLine({x1:(_773.series.stroke.width||1),x2:_76d-(_773.series.stroke.width||1),y1:y-mid,y2:y-mid}).setStroke(_775?"white":_773.series.stroke);}run.dyn.fill=_773.series.fill;run.dyn.stroke=_773.series.stroke;if(_770){var o={element:"candlestick",index:j,run:run,shape:_776,x:x,y:y-Math.max(open,_774),cx:_76d/2,cy:(y-Math.max(open,_774))+(Math.max(_775?open-_774:_774-open,1)/2),width:_76d,height:Math.max(_775?open-_774:_774-open,1),data:v};this._connectEvents(o);_772[j]=o;}}if(this.animate){this._animateCandlesticks(shape,y-low,high-low);}}}this._eventSeries[run.name]=_772;run.dirty=false;}this.dirty=false;return this;},_animateCandlesticks:function(_777,_778,_779){_6.gfx.fx.animateTransform(_4.delegate({shape:_777,duration:1200,transform:[{name:"translate",start:[0,_778-(_778/_779)],end:[0,0]},{name:"scale",start:[1,1/_779],end:[1,1]},{name:"original"}]},this.animate)).play();}});})();}if(!_4._hasResource["dojox.charting.plot2d.OHLC"]){_4._hasResource["dojox.charting.plot2d.OHLC"]=true;_4.provide("dojox.charting.plot2d.OHLC");(function(){var df=_6.lang.functional,du=_6.lang.utils,dc=_6.charting.plot2d.common,_77a=df.lambda("item.purgeGroup()");_4.declare("dojox.charting.plot2d.OHLC",_6.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(_77b,_77c){this.opt=_4.clone(this.defaultParams);du.updateWithObject(this.opt,_77c);du.updateWithPattern(this.opt,_77c,this.optionalParams);this.series=[];this.hAxis=this.opt.hAxis;this.vAxis=this.opt.vAxis;this.animate=this.opt.animate;},collectStats:function(_77d){var _77e=_4.delegate(dc.defaultStats);for(var i=0;i<_77d.length;i++){var run=_77d[i];if(!run.data.length){continue;}var _77f=_77e.vmin,_780=_77e.vmax;if(!("ymin" in run)||!("ymax" in run)){_4.forEach(run.data,function(val,idx){if(val!==null){var x=val.x||idx+1;_77e.hmin=Math.min(_77e.hmin,x);_77e.hmax=Math.max(_77e.hmax,x);_77e.vmin=Math.min(_77e.vmin,val.open,val.close,val.high,val.low);_77e.vmax=Math.max(_77e.vmax,val.open,val.close,val.high,val.low);}});}if("ymin" in run){_77e.vmin=Math.min(_77f,run.ymin);}if("ymax" in run){_77e.vmax=Math.max(_780,run.ymax);}}return _77e;},getSeriesStats:function(){var _781=this.collectStats(this.series);_781.hmin-=0.5;_781.hmax+=0.5;return _781;},render:function(dim,_782){if(this.zoom&&!this.isDataDirty()){return this.performZoom(dim,_782);}this.resetEvents();this.dirty=this.isDirty();if(this.dirty){_4.forEach(this.series,_77a);this._eventSeries={};this.cleanGroup();var s=this.group;df.forEachRev(this.series,function(item){item.cleanGroup(s);});}var t=this.chart.theme,f,gap,_783,ht=this._hScaler.scaler.getTransformerFromModel(this._hScaler),vt=this._vScaler.scaler.getTransformerFromModel(this._vScaler),_784=Math.max(0,this._vScaler.bounds.lower),_785=vt(_784),_786=this.events();f=dc.calculateBarSize(this._hScaler.bounds.scale,this.opt);gap=f.gap;_783=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 _787=t.next("candlestick",[this.opt,run]),s=run.group,_788=new Array(run.data.length);for(var j=0;j<run.data.length;++j){var v=run.data[j];if(v!==null){var _789=t.addMixin(_787,"candlestick",v,true);var x=ht(v.x||(j+0.5))+_782.l+gap,y=dim.height-_782.b,open=vt(v.open),_78a=vt(v.close),high=vt(v.high),low=vt(v.low);if(low>high){var tmp=high;high=low;low=tmp;}if(_783>=1){var hl={x1:_783/2,x2:_783/2,y1:y-high,y2:y-low},op={x1:0,x2:((_783/2)+((_789.series.stroke.width||1)/2)),y1:y-open,y2:y-open},cl={x1:((_783/2)-((_789.series.stroke.width||1)/2)),x2:_783,y1:y-_78a,y2:y-_78a};shape=s.createGroup();shape.setTransform({dx:x,dy:0});var _78b=shape.createGroup();_78b.createLine(hl).setStroke(_789.series.stroke);_78b.createLine(op).setStroke(_789.series.stroke);_78b.createLine(cl).setStroke(_789.series.stroke);run.dyn.stroke=_789.series.stroke;if(_786){var o={element:"candlestick",index:j,run:run,shape:_78b,x:x,y:y-Math.max(open,_78a),cx:_783/2,cy:(y-Math.max(open,_78a))+(Math.max(open>_78a?open-_78a:_78a-open,1)/2),width:_783,height:Math.max(open>_78a?open-_78a:_78a-open,1),data:v};this._connectEvents(o);_788[j]=o;}}if(this.animate){this._animateOHLC(shape,y-low,high-low);}}}this._eventSeries[run.name]=_788;run.dirty=false;}this.dirty=false;return this;},_animateOHLC:function(_78c,_78d,_78e){_6.gfx.fx.animateTransform(_4.delegate({shape:_78c,duration:1200,transform:[{name:"translate",start:[0,_78d-(_78d/_78e)],end:[0,0]},{name:"scale",start:[1,1/_78e],end:[1,1]},{name:"original"}]},this.animate)).play();}});})();}if(!_4._hasResource["dojo.fx.easing"]){_4._hasResource["dojo.fx.easing"]=true;_4.provide("dojo.fx.easing");_4.getObject("fx.easing",true,_4);_4.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-_4.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 _4.fx.easing.bounceIn(n*2)/2;}return (_4.fx.easing.bounceOut(n*2-1)/2)+0.5;}};}if(!_4._hasResource["dojox.charting.plot2d.Spider"]){_4._hasResource["dojox.charting.plot2d.Spider"]=true;_4.provide("dojox.charting.plot2d.Spider");_4.experimental("dojox.charting.plot2d.Spider");(function(){var df=_6.lang.functional,du=_6.lang.utils,dc=_6.charting.plot2d.common,da=_6.charting.axis2d.common,g=_6.gfx,m=g.matrix,_78f=0.2;_4.declare("dojox.charting.plot2d.Spider",[_6.charting.Element,_6.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:_4.fx.easing.backOut,axisTickFont:"",axisTickFontColor:"",axisFont:"",axisFontColor:""},optionalParams:{radius:0,font:"",fontColor:""},constructor:function(_790,_791){this.opt=_4.clone(this.defaultParams);du.updateWithObject(this.opt,_791);du.updateWithPattern(this.opt,_791,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 _792=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 _6.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,_793){if(this._hAxis){if(!this._hAxis.initialized()){this._hAxis.calculate(_793.hmin,_793.hmax,dim.width);}this._hScaler=this._hAxis.getScaler();}else{this._hScaler=_6.charting.scaler.primitive.buildScaler(_793.hmin,_793.hmax,dim.width);}if(this._vAxis){if(!this._vAxis.initialized()){this._vAxis.calculate(_793.vmin,_793.vmax,dim.height);}this._vScaler=this._vAxis.getScaler();}else{this._vScaler=_6.charting.scaler.primitive.buildScaler(_793.vmin,_793.vmax,dim.height);}return this;},render:function(dim,_794){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-_794.l-_794.r)/2,ry=(dim.height-_794.t-_794.b)/2,r=Math.min(rx,ry),_795=o.font||(ta.majorTick&&ta.majorTick.font)||(ta.tick&&ta.tick.font)||"normal normal normal 7pt Tahoma",_796=o.axisFont||(ta.tick&&ta.tick.titleFont)||"normal normal normal 11pt Tahoma",_797=o.axisTickFontColor||(ta.majorTick&&ta.majorTick.fontColor)||(ta.tick&&ta.tick.fontColor)||"silver",_798=o.axisFontColor||(ta.tick&&ta.tick.titleFontColor)||"black",_799=o.axisColor||(ta.tick&&ta.tick.axisColor)||"silver",_79a=o.spiderColor||(ta.tick&&ta.tick.spiderColor)||"silver",_79b=o.axisWidth||(ta.stroke&&ta.stroke.width)||2,_79c=o.spiderWidth||(ta.stroke&&ta.stroke.width)||2,_79d=o.seriesWidth||(ta.stroke&&ta.stroke.width)||2,_79e=g.normalizedLength(g.splitFontString(_796).size),_79f=m._degToRad(o.startAngle),_7a0=_79f,step,_7a1,_7a2,_7a3,_7a4,_7a5,_7a6,_7a7,_7a8,_7a9,_7aa,ro=o.spiderOrigin,dv=o.divisions>=3?o.divisions:3,ms=o.markerSize,spt=o.spiderType,at=o.animationType,_7ab=o.labelOffset<-10?o.labelOffset:-10,_7ac=0.2;if(o.labels){_7a3=_4.map(this.series,function(s){return s.name;},this);_7a4=df.foldl1(df.map(_7a3,function(_7ad,i){var font=t.series.font;return _6.gfx._base._getTextBox(_7ad,{font:font}).w;},this),"Math.max(a, b)")/2;r=Math.min(rx-2*_7a4,ry-_79e)+_7ab;_7a5=r-_7ab;}if("radius" in o){r=o.radius;_7a5=r-_7ab;}r/=(1+_7ac);var _7ae={cx:_794.l+rx,cy:_794.t+ry,r:r};for(var i=this.series.length-1;i>=0;i--){var _7af=this.series[i];if(!this.dirty&&!_7af.dirty){t.skip();continue;}_7af.cleanGroup();var run=_7af.data;if(run!==null){var len=this._getObjectLength(run);if(!_7a6||_7a6.length<=0){_7a6=[],_7a7=[],_7aa=[];this._buildPoints(_7a6,len,_7ae,r,_7a0,true);this._buildPoints(_7a7,len,_7ae,r*ro,_7a0,true);this._buildPoints(_7aa,len,_7ae,_7a5,_7a0);if(dv>2){_7a8=[],_7a9=[];for(var j=0;j<dv-2;j++){_7a8[j]=[];this._buildPoints(_7a8[j],len,_7ae,r*(ro+(1-ro)*(j+1)/(dv-1)),_7a0,true);_7a9[j]=r*(ro+(1-ro)*(j+1)/(dv-1));}}}}}var _7b0=s.createGroup(),_7b1={color:_799,width:_79b},_7b2={color:_79a,width:_79c};for(var j=_7a6.length-1;j>=0;--j){var _7b3=_7a6[j],st={x:_7b3.x+(_7b3.x-_7ae.cx)*_7ac,y:_7b3.y+(_7b3.y-_7ae.cy)*_7ac},nd={x:_7b3.x+(_7b3.x-_7ae.cx)*_7ac/2,y:_7b3.y+(_7b3.y-_7ae.cy)*_7ac/2};_7b0.createLine({x1:_7ae.cx,y1:_7ae.cy,x2:st.x,y2:st.y}).setStroke(_7b1);this._drawArrow(_7b0,st,nd,_7b1);}var _7b4=s.createGroup();for(var j=_7aa.length-1;j>=0;--j){var _7b3=_7aa[j],_7b5=_6.gfx._base._getTextBox(this.labelKey[j],{font:_796}).w||0,_7b6=this.opt.htmlLabels&&_6.gfx.renderer!="vml"?"html":"gfx";elem=da.createText[_7b6](this.chart,_7b4,(!_4._isBodyLtr()&&_7b6=="html")?(_7b3.x+_7b5-dim.width):_7b3.x,_7b3.y,"middle",this.labelKey[j],_796,_798);if(this.opt.htmlLabels){this.htmlElements.push(elem);}}var _7b7=s.createGroup();if(spt=="polygon"){_7b7.createPolyline(_7a6).setStroke(_7b2);_7b7.createPolyline(_7a7).setStroke(_7b2);if(_7a8.length>0){for(var j=_7a8.length-1;j>=0;--j){_7b7.createPolyline(_7a8[j]).setStroke(_7b2);}}}else{var _7b8=this._getObjectLength(this.datas);_7b7.createCircle({cx:_7ae.cx,cy:_7ae.cy,r:r}).setStroke(_7b2);_7b7.createCircle({cx:_7ae.cx,cy:_7ae.cy,r:r*ro}).setStroke(_7b2);if(_7a9.length>0){for(var j=_7a9.length-1;j>=0;--j){_7b7.createCircle({cx:_7ae.cx,cy:_7ae.cy,r:_7a9[j]}).setStroke(_7b2);}}}var _7b9=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,_7ba=max-min,end=_7a0+2*Math.PI*k/len;for(var i=0;i<dv;i++){var text=min+_7ba*i/(dv-1),_7b3=this._getCoordinate(_7ae,r*(ro+(1-ro)*i/(dv-1)),end);text=this._getLabel(text);var _7b5=_6.gfx._base._getTextBox(text,{font:_795}).w||0,_7b6=this.opt.htmlLabels&&_6.gfx.renderer!="vml"?"html":"gfx";if(this.opt.htmlLabels){this.htmlElements.push(da.createText[_7b6](this.chart,_7b9,(!_4._isBodyLtr()&&_7b6=="html")?(_7b3.x+_7b5-dim.width):_7b3.x,_7b3.y,"start",text,_795,_797));}}k++;}this.chart.seriesShapes={};var _7bb=[];for(var i=this.series.length-1;i>=0;i--){var _7af=this.series[i],run=_7af.data;if(run!==null){var _7bc=[],k=0,_7bd=[];for(var key in run){var data=this.datas[key],min=data.min,max=data.max,_7ba=max-min,_7be=run[key],end=_7a0+2*Math.PI*k/len,_7b3=this._getCoordinate(_7ae,r*(ro+(1-ro)*(_7be-min)/_7ba),end);_7bc.push(_7b3);_7bd.push({sname:_7af.name,key:key,data:_7be});k++;}_7bc[_7bc.length]=_7bc[0];_7bd[_7bd.length]=_7bd[0];var _7bf=this._getBoundary(_7bc),_7c0=t.next("spider",[o,_7af]),ts=_7af.group,f=g.normalizeColor(_7c0.series.fill),sk={color:_7c0.series.fill,width:_79d};f.a=o.seriesFillAlpha;_7af.dyn={fill:f,stroke:sk};var osps=this.oldSeriePoints[_7af.name];var cs=this._createSeriesEntry(ts,(osps||_7a7),_7bc,f,sk,r,ro,ms,at);this.chart.seriesShapes[_7af.name]=cs;this.oldSeriePoints[_7af.name]=_7bc;var po={element:"spider_poly",index:i,id:"spider_poly_"+_7af.name,run:_7af,plot:this,shape:cs.poly,parent:ts,brect:_7bf,cx:_7ae.cx,cy:_7ae.cy,cr:r,f:f,s:s};this._connectEvents(po);var so={element:"spider_plot",index:i,id:"spider_plot_"+_7af.name,run:_7af,plot:this,shape:_7af.group};this._connectEvents(so);_4.forEach(cs.circles,function(c,i){var _7c1=c.getShape(),co={element:"spider_circle",index:i,id:"spider_circle_"+_7af.name+i,run:_7af,plot:this,shape:c,parent:ts,tdata:_7bd[i],cx:_7bc[i].x,cy:_7bc[i].y,f:f,s:s};this._connectEvents(co);},this);}}return this;},_createSeriesEntry:function(ts,osps,sps,f,sk,r,ro,ms,at){var _7c2=ts.createPolyline(osps).setFill(f).setStroke(sk),_7c3=[];for(var j=0;j<osps.length;j++){var _7c4=osps[j],cr=ms;var _7c5=ts.createCircle({cx:_7c4.x,cy:_7c4.y,r:cr}).setFill(f).setStroke(sk);_7c3.push(_7c5);}var _7c6=_4.map(sps,function(np,j){var sp=osps[j],anim=new _4._Animation({duration:1000,easing:at,curve:[sp.y,np.y]});var spl=_7c2,sc=_7c3[j];_4.connect(anim,"onAnimate",function(y){var _7c7=spl.getShape();_7c7.points[j].y=y;spl.setShape(_7c7);var _7c8=sc.getShape();_7c8.cy=y;sc.setShape(_7c8);});return anim;});var _7c9=_4.map(sps,function(np,j){var sp=osps[j],anim=new _4._Animation({duration:1000,easing:at,curve:[sp.x,np.x]});var spl=_7c2,sc=_7c3[j];_4.connect(anim,"onAnimate",function(x){var _7ca=spl.getShape();_7ca.points[j].x=x;spl.setShape(_7ca);var _7cb=sc.getShape();_7cb.cx=x;sc.setShape(_7cb);});return anim;});var _7cc=_4.fx.combine(_7c6.concat(_7c9));_7cc.play();return {group:ts,poly:_7c2,circles:_7c3};},plotEvent:function(o){var _7cd=o.id?o.id:"default",a;if(_7cd in this.animations){a=this.animations[_7cd];a.anim&&a.anim.stop(true);}else{a=this.animations[_7cd]={};}if(o.element=="spider_poly"){if(!a.color){var _7ce=o.shape.getFill();if(!_7ce||!(_7ce instanceof _4.Color)){return;}a.color={start:_7ce,end:_7cf(_7ce)};}var _7d0=a.color.start,end=a.color.end;if(o.type=="onmouseout"){var t=_7d0;_7d0=end;end=t;}a.anim=_6.gfx.fx.animateFill({shape:o.shape,duration:800,easing:_4.fx.easing.backOut,color:{start:_7d0,end:end}});a.anim.play();}else{if(o.element=="spider_circle"){var init,_7d1,_7d2=1.5;if(o.type=="onmouseover"){init=_6.gfx.matrix.identity;_7d1=_7d2;var _7d3={type:"rect"};_7d3.x=o.cx;_7d3.y=o.cy;_7d3.width=_7d3.height=1;var lt=_4.coords(this.chart.node,true);_7d3.x+=lt.x;_7d3.y+=lt.y;_7d3.x=Math.round(_7d3.x);_7d3.y=Math.round(_7d3.y);_7d3.width=Math.ceil(_7d3.width);_7d3.height=Math.ceil(_7d3.height);this.aroundRect=_7d3;var _7d4=["after","before"];if(_5&&_5.Tooltip){_5.showTooltip(o.tdata.sname+"<br/>"+o.tdata.key+"<br/>"+o.tdata.data,this.aroundRect,_7d4);}}else{init=_6.gfx.matrix.scaleAt(_7d2,o.cx,o.cy);_7d1=1/_7d2;if(_5&&_5.Tooltip){this.aroundRect&&_5.hideTooltip(this.aroundRect);}}var cs=o.shape.getShape(),init=m.scaleAt(_7d2,cs.cx,cs.cy),_7d5={shape:o.shape,duration:200,easing:_4.fx.easing.backOut,transform:[{name:"scaleAt",start:[1,cs.cx,cs.cy],end:[_7d1,cs.cx,cs.cy]},init]};a.anim=_6.gfx.fx.animateTransform(_7d5);a.anim.play();}else{if(o.element=="spider_plot"){if(o.type=="onmouseover"&&!_4.isIE){o.shape.moveToFront();}}}}},_getBoundary:function(_7d6){var xmax=_7d6[0].x,xmin=_7d6[0].x,ymax=_7d6[0].y,ymin=_7d6[0].y;for(var i=0;i<_7d6.length;i++){var _7d7=_7d6[i];xmax=Math.max(_7d7.x,xmax);ymax=Math.max(_7d7.y,ymax);xmin=Math.min(_7d7.x,xmin);ymin=Math.min(_7d7.y,ymin);}return {x:xmin,y:ymin,width:xmax-xmin,height:ymax-ymin};},_drawArrow:function(s,_7d8,end,_7d9){var len=Math.sqrt(Math.pow(end.x-_7d8.x,2)+Math.pow(end.y-_7d8.y,2)),sin=(end.y-_7d8.y)/len,cos=(end.x-_7d8.x)/len,_7da={x:end.x+(len/3)*(-sin),y:end.y+(len/3)*cos},_7db={x:end.x+(len/3)*sin,y:end.y+(len/3)*(-cos)};s.createPolyline([_7d8,_7da,_7db]).setFill(_7d9.color).setStroke(_7d9);},_buildPoints:function(_7dc,_7dd,_7de,_7df,_7e0,_7e1){for(var i=0;i<_7dd;i++){var end=_7e0+2*Math.PI*i/_7dd;_7dc.push(this._getCoordinate(_7de,_7df,end));}if(_7e1){_7dc.push(this._getCoordinate(_7de,_7df,_7e0+2*Math.PI));}},_getCoordinate:function(_7e2,_7e3,_7e4){return {x:_7e2.cx+_7e3*Math.cos(_7e4),y:_7e2.cy+_7e3*Math.sin(_7e4)};},_getObjectLength:function(obj){var _7e5=0;if(_4.isObject(obj)){for(var key in obj){_7e5++;}}return _7e5;},_getLabel:function(_7e6){return dc.getLabel(_7e6,this.opt.fixed,this.opt.precision);}});function _7cf(_7e7){var a=new _6.color.Color(_7e7),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 _7e7=_6.color.fromHsl(x);_7e7.a=0.7;return _7e7;};})();}if(!_4._hasResource["dojox.lang.functional.fold"]){_4._hasResource["dojox.lang.functional.fold"]=true;_4.provide("dojox.lang.functional.fold");(function(){var d=_4,df=_6.lang.functional,_7e8={};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 _7e8)){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 _7e9=true;for(i in a){if(!(i in _7e8)){if(_7e9){z=a[i];_7e9=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(!_4._hasResource["dojox.color._base"]){_4._hasResource["dojox.color._base"]=true;_4.provide("dojox.color._base");_6.color.Color=_4.Color;_6.color.blend=_4.blendColors;_6.color.fromRgb=_4.colorFromRgb;_6.color.fromHex=_4.colorFromHex;_6.color.fromArray=_4.colorFromArray;_6.color.fromString=_4.colorFromString;_6.color.greyscale=_4.colors.makeGrey;_4.mixin(_6.color,{fromCmy:function(cyan,_7ea,_7eb){if(_4.isArray(cyan)){_7ea=cyan[1],_7eb=cyan[2],cyan=cyan[0];}else{if(_4.isObject(cyan)){_7ea=cyan.m,_7eb=cyan.y,cyan=cyan.c;}}cyan/=100,_7ea/=100,_7eb/=100;var r=1-cyan,g=1-_7ea,b=1-_7eb;return new _6.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});},fromCmyk:function(cyan,_7ec,_7ed,_7ee){if(_4.isArray(cyan)){_7ec=cyan[1],_7ed=cyan[2],_7ee=cyan[3],cyan=cyan[0];}else{if(_4.isObject(cyan)){_7ec=cyan.m,_7ed=cyan.y,_7ee=cyan.b,cyan=cyan.c;}}cyan/=100,_7ec/=100,_7ed/=100,_7ee/=100;var r,g,b;r=1-Math.min(1,cyan*(1-_7ee)+_7ee);g=1-Math.min(1,_7ec*(1-_7ee)+_7ee);b=1-Math.min(1,_7ed*(1-_7ee)+_7ee);return new _6.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});},fromHsl:function(hue,_7ef,_7f0){if(_4.isArray(hue)){_7ef=hue[1],_7f0=hue[2],hue=hue[0];}else{if(_4.isObject(hue)){_7ef=hue.s,_7f0=hue.l,hue=hue.h;}}_7ef/=100;_7f0/=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*_7ef*Math.min(r,1)+(1-_7ef);g=2*_7ef*Math.min(g,1)+(1-_7ef);b=2*_7ef*Math.min(b,1)+(1-_7ef);if(_7f0<0.5){r*=_7f0,g*=_7f0,b*=_7f0;}else{r=(1-_7f0)*r+2*_7f0-1;g=(1-_7f0)*g+2*_7f0-1;b=(1-_7f0)*b+2*_7f0-1;}return new _6.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});},fromHsv:function(hue,_7f1,_7f2){if(_4.isArray(hue)){_7f1=hue[1],_7f2=hue[2],hue=hue[0];}else{if(_4.isObject(hue)){_7f1=hue.s,_7f2=hue.v,hue=hue.h;}}if(hue==360){hue=0;}_7f1/=100;_7f2/=100;var r,g,b;if(_7f1==0){r=_7f2,b=_7f2,g=_7f2;}else{var _7f3=hue/60,i=Math.floor(_7f3),f=_7f3-i;var p=_7f2*(1-_7f1);var q=_7f2*(1-(_7f1*f));var t=_7f2*(1-(_7f1*(1-f)));switch(i){case 0:r=_7f2,g=t,b=p;break;case 1:r=q,g=_7f2,b=p;break;case 2:r=p,g=_7f2,b=t;break;case 3:r=p,g=q,b=_7f2;break;case 4:r=t,g=p,b=_7f2;break;case 5:r=_7f2,g=p,b=q;break;}}return new _6.color.Color({r:Math.round(r*255),g:Math.round(g*255),b:Math.round(b*255)});}});_4.extend(_6.color.Color,{toCmy:function(){var cyan=1-(this.r/255),_7f4=1-(this.g/255),_7f5=1-(this.b/255);return {c:Math.round(cyan*100),m:Math.round(_7f4*100),y:Math.round(_7f5*100)};},toCmyk:function(){var cyan,_7f6,_7f7,_7f8;var r=this.r/255,g=this.g/255,b=this.b/255;_7f8=Math.min(1-r,1-g,1-b);cyan=(1-r-_7f8)/(1-_7f8);_7f6=(1-g-_7f8)/(1-_7f8);_7f7=(1-b-_7f8)/(1-_7f8);return {c:Math.round(cyan*100),m:Math.round(_7f6*100),y:Math.round(_7f7*100),b:Math.round(_7f8*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 _7f9=max-min;var h=0,s=0,l=(min+max)/2;if(l>0&&l<1){s=_7f9/((l<0.5)?(2*l):(2-2*l));}if(_7f9>0){if(max==r&&max!=g){h+=(g-b)/_7f9;}if(max==g&&max!=b){h+=(2+(b-r)/_7f9);}if(max==b&&max!=r){h+=(4+(r-g)/_7f9);}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 _7fa=max-min;var h=null,s=(max==0)?0:(_7fa/max);if(s==0){h=0;}else{if(r==max){h=60*(g-b)/_7fa;}else{if(g==max){h=120+60*(b-r)/_7fa;}else{h=240+60*(r-g)/_7fa;}}if(h<0){h+=360;}}return {h:h,s:Math.round(s*100),v:Math.round(max*100)};}});}if(!_4._hasResource["dojox.color"]){_4._hasResource["dojox.color"]=true;_4.provide("dojox.color");}if(!_4._hasResource["dojox.color.Palette"]){_4._hasResource["dojox.color.Palette"]=true;_4.provide("dojox.color.Palette");(function(){var dxc=_6.color;dxc.Palette=function(base){this.colors=[];if(base instanceof _6.color.Palette){this.colors=base.colors.slice(0);}else{if(base instanceof _6.color.Color){this.colors=[null,null,base,null,null];}else{if(_4.isArray(base)){this.colors=_4.map(base.slice(0),function(item){if(_4.isString(item)){return new _6.color.Color(item);}return item;});}else{if(_4.isString(base)){this.colors=[null,null,new _6.color.Color(base),null,null];}}}}};function _7fb(p,_7fc,val){var ret=new _6.color.Palette();ret.colors=[];_4.forEach(p.colors,function(item){var r=(_7fc=="dr")?item.r+val:item.r,g=(_7fc=="dg")?item.g+val:item.g,b=(_7fc=="db")?item.b+val:item.b,a=(_7fc=="da")?item.a+val:item.a;ret.colors.push(new _6.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,_7fd,val){var ret=new _6.color.Palette();ret.colors=[];_4.forEach(p.colors,function(item){var o=item.toCmy(),c=(_7fd=="dc")?o.c+val:o.c,m=(_7fd=="dm")?o.m+val:o.m,y=(_7fd=="dy")?o.y+val:o.y;ret.colors.push(_6.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 _7fe(p,_7ff,val){var ret=new _6.color.Palette();ret.colors=[];_4.forEach(p.colors,function(item){var o=item.toCmyk(),c=(_7ff=="dc")?o.c+val:o.c,m=(_7ff=="dm")?o.m+val:o.m,y=(_7ff=="dy")?o.y+val:o.y,k=(_7ff=="dk")?o.b+val:o.b;ret.colors.push(_6.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,_800,val){var ret=new _6.color.Palette();ret.colors=[];_4.forEach(p.colors,function(item){var o=item.toHsl(),h=(_800=="dh")?o.h+val:o.h,s=(_800=="ds")?o.s+val:o.s,l=(_800=="dl")?o.l+val:o.l;ret.colors.push(_6.color.fromHsl(h%360,Math.min(100,Math.max(0,s)),Math.min(100,Math.max(0,l))));});return ret;};function tHSV(p,_801,val){var ret=new _6.color.Palette();ret.colors=[];_4.forEach(p.colors,function(item){var o=item.toHsv(),h=(_801=="dh")?o.h+val:o.h,s=(_801=="ds")?o.s+val:o.s,v=(_801=="dv")?o.v+val:o.v;ret.colors.push(_6.color.fromHsv(h%360,Math.min(100,Math.max(0,s)),Math.min(100,Math.max(0,v))));});return ret;};function _802(val,low,high){return high-((high-val)*((high-low)/high));};_4.extend(dxc.Palette,{transform:function(_803){var fn=_7fb;if(_803.use){var use=_803.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=_7fe;}else{fn=tCMY;}}}}else{if("dc" in _803||"dm" in _803||"dy" in _803){if("dk" in _803){fn=_7fe;}else{fn=tCMY;}}else{if("dh" in _803||"ds" in _803){if("dv" in _803){fn=tHSV;}else{fn=tHSL;}}}}var _804=this;for(var p in _803){if(p=="use"){continue;}_804=fn(_804,p,_803[p]);}return _804;},clone:function(){return new dxc.Palette(this);}});_4.mixin(dxc.Palette,{generators:{analogous:function(args){var high=args.high||60,low=args.low||18,base=_4.isString(args.base)?new _6.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(_4.map(h,function(hue,i){return _6.color.fromHsv(hue,s[i],v[i]);}));},monochromatic:function(args){var base=_4.isString(args.base)?new _6.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=_802(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([_6.color.fromHsv(hsv.h,s1,v1),_6.color.fromHsv(hsv.h,s2,v3),base,_6.color.fromHsv(hsv.h,s1,v3),_6.color.fromHsv(hsv.h,s2,v2)]);},triadic:function(args){var base=_4.isString(args.base)?new _6.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([_6.color.fromHsv(h1,s1,hsv.v),_6.color.fromHsv(hsv.h,s2,v2),base,_6.color.fromHsv(h2,s2,v1),_6.color.fromHsv(h2,s3,v3)]);},complementary:function(args){var base=_4.isString(args.base)?new _6.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=_802(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([_6.color.fromHsv(hsv.h,s1,v1),_6.color.fromHsv(hsv.h,s2,v2),base,_6.color.fromHsv(h1,s3,v2),_6.color.fromHsv(h1,hsv.s,hsv.v)]);},splitComplementary:function(args){var base=_4.isString(args.base)?new _6.color.Color(args.base):args.base,_805=args.da||30,hsv=base.toHsv();var _806=((hsv.h*2)+137<360)?(hsv.h*2)+137:Math.floor(hsv.h/2)-137,h1=(_806-_805+360)%360,h2=(_806+_805)%360,s1=Math.max(hsv.s-10,0),s2=_802(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([_6.color.fromHsv(h1,s1,v1),_6.color.fromHsv(h1,s2,v2),base,_6.color.fromHsv(h2,s3,v2),_6.color.fromHsv(h2,hsv.s,hsv.v)]);},compound:function(args){var base=_4.isString(args.base)?new _6.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([_6.color.fromHsv(h1,s1,v1),_6.color.fromHsv(h1,s2,v2),base,_6.color.fromHsv(h2,s3,v3),_6.color.fromHsv(h3,s2,v2)]);},shades:function(args){var base=_4.isString(args.base)?new _6.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 _6.color.fromHsv(hsv.h,s,v1),new _6.color.fromHsv(hsv.h,s,v2),base,new _6.color.fromHsv(hsv.h,s,v3),new _6.color.fromHsv(hsv.h,s,v4)]);}},generate:function(base,type){if(_4.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(!_4._hasResource["dojox.charting.Theme"]){_4._hasResource["dojox.charting.Theme"]=true;_4.provide("dojox.charting.Theme");_4.declare("dojox.charting.Theme",null,{shapeSpaces:{shape:1,shapeX:1,shapeY:1},constructor:function(_807){_807=_807||{};var def=_6.charting.Theme.defaultTheme;_4.forEach(["chart","plotarea","axis","series","marker"],function(name){this[name]=_4.delegate(def[name],_807[name]);},this);if(_807.seriesThemes&&_807.seriesThemes.length){this.colors=null;this.seriesThemes=_807.seriesThemes.slice(0);}else{this.seriesThemes=null;this.colors=(_807.colors||_6.charting.Theme.defaultColors).slice(0);}this.markerThemes=null;if(_807.markerThemes&&_807.markerThemes.length){this.markerThemes=_807.markerThemes.slice(0);}this.markers=_807.markers?_4.clone(_807.markers):_4.delegate(_6.charting.Theme.defaultMarkers);this.noGradConv=_807.noGradConv;this.noRadialConv=_807.noRadialConv;if(_807.reverseFills){this.reverseFills();}this._current=0;this._buildMarkerArray();},clone:function(){var _808=new _6.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});_4.forEach(["clone","clear","next","skip","addMixin","post","getTick"],function(name){if(this.hasOwnProperty(name)){_808[name]=this[name];}},this);return _808;},clear:function(){this._current=0;},next:function(_809,_80a,_80b){var _80c=_6.lang.utils.merge,_80d,_80e;if(this.colors){_80d=_4.delegate(this.series);_80e=_4.delegate(this.marker);var _80f=new _4.Color(this.colors[this._current%this.colors.length]),old;if(_80d.stroke&&_80d.stroke.color){_80d.stroke=_4.delegate(_80d.stroke);old=new _4.Color(_80d.stroke.color);_80d.stroke.color=new _4.Color(_80f);_80d.stroke.color.a=old.a;}else{_80d.stroke={color:_80f};}if(_80e.stroke&&_80e.stroke.color){_80e.stroke=_4.delegate(_80e.stroke);old=new _4.Color(_80e.stroke.color);_80e.stroke.color=new _4.Color(_80f);_80e.stroke.color.a=old.a;}else{_80e.stroke={color:_80f};}if(!_80d.fill||_80d.fill.type){_80d.fill=_80f;}else{old=new _4.Color(_80d.fill);_80d.fill=new _4.Color(_80f);_80d.fill.a=old.a;}if(!_80e.fill||_80e.fill.type){_80e.fill=_80f;}else{old=new _4.Color(_80e.fill);_80e.fill=new _4.Color(_80f);_80e.fill.a=old.a;}}else{_80d=this.seriesThemes?_80c(this.series,this.seriesThemes[this._current%this.seriesThemes.length]):this.series;_80e=this.markerThemes?_80c(this.marker,this.markerThemes[this._current%this.markerThemes.length]):_80d;}var _810=_80e&&_80e.symbol||this._markers[this._current%this._markers.length];var _811={series:_80d,marker:_80e,symbol:_810};++this._current;if(_80a){_811=this.addMixin(_811,_809,_80a);}if(_80b){_811=this.post(_811,_809);}return _811;},skip:function(){++this._current;},addMixin:function(_812,_813,_814,_815){if(_4.isArray(_814)){_4.forEach(_814,function(m){_812=this.addMixin(_812,_813,m);},this);}else{var t={};if("color" in _814){if(_813=="line"||_813=="area"){_4.setObject("series.stroke.color",_814.color,t);_4.setObject("marker.stroke.color",_814.color,t);}else{_4.setObject("series.fill",_814.color,t);}}_4.forEach(["stroke","outline","shadow","fill","font","fontColor","labelWiring"],function(name){var _816="marker"+name.charAt(0).toUpperCase()+name.substr(1),b=_816 in _814;if(name in _814){_4.setObject("series."+name,_814[name],t);if(!b){_4.setObject("marker."+name,_814[name],t);}}if(b){_4.setObject("marker."+name,_814[_816],t);}});if("marker" in _814){t.symbol=_814.marker;}_812=_6.lang.utils.merge(_812,t);}if(_815){_812=this.post(_812,_813);}return _812;},post:function(_817,_818){var fill=_817.series.fill,t;if(!this.noGradConv&&this.shapeSpaces[fill.space]&&fill.type=="linear"){if(_818=="bar"){t={x1:fill.y1,y1:fill.x1,x2:fill.y2,y2:fill.x2};}else{if(!this.noRadialConv&&fill.space=="shape"&&(_818=="slice"||_818=="circle")){t={type:"radial",cx:0,cy:0,r:100};}}if(t){return _6.lang.utils.merge(_817,{series:{fill:t}});}}return _817;},getTick:function(name,_819){var tick=this.axis.tick,_81a=name+"Tick";merge=_6.lang.utils.merge;if(tick){if(this.axis[_81a]){tick=merge(tick,this.axis[_81a]);}}else{tick=this.axis[_81a];}if(_819){if(tick){if(_819[_81a]){tick=merge(tick,_819[_81a]);}}else{tick=_819[_81a];}}return tick;},inspectObjects:function(f){_4.forEach(["chart","plotarea","axis","series","marker"],function(name){f(this[name]);},this);if(this.seriesThemes){_4.forEach(this.seriesThemes,f);}if(this.markerThemes){_4.forEach(this.markerThemes,f);}},reverseFills:function(){this.inspectObjects(function(o){if(o&&o.fill){o.fill=_6.gfx.gradutils.reverse(o.fill);}});},addMarker:function(name,_81b){this.markers[name]=_81b;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]);}}});_4.mixin(_6.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(_81c){_81c=_81c||{};var c=[],n=_81c.num||5;if(_81c.colors){var l=_81c.colors.length;for(var i=0;i<n;i++){c.push(_81c.colors[i%l]);}return c;}if(_81c.hue){var s=_81c.saturation||100;var st=_81c.low||30;var end=_81c.high||90;var l=(end+st)/2;return _6.color.Palette.generate(_6.color.fromHsv(_81c.hue,s,l),"monochromatic").colors;}if(_81c.generator){return _6.color.Palette.generate(_81c.base,_81c.generator).colors;}return c;},generateGradient:function(_81d,_81e,_81f){var fill=_4.delegate(_81d);fill.colors=[{offset:0,color:_81e},{offset:1,color:_81f}];return fill;},generateHslColor:function(_820,_821){_820=new _6.color.Color(_820);var hsl=_820.toHsl(),_822=_6.color.fromHsl(hsl.h,hsl.s,_821);_822.a=_820.a;return _822;},generateHslGradient:function(_823,_824,_825,_826){_823=new _6.color.Color(_823);var hsl=_823.toHsl(),_827=_6.color.fromHsl(hsl.h,hsl.s,_825),_828=_6.color.fromHsl(hsl.h,hsl.s,_826);_827.a=_828.a=_823.a;return _6.charting.Theme.generateGradient(_824,_827,_828);}});}if(!_4._hasResource["dojox.charting.Series"]){_4._hasResource["dojox.charting.Series"]=true;_4.provide("dojox.charting.Series");_4.declare("dojox.charting.Series",_6.charting.Element,{constructor:function(_829,data,_82a){_4.mixin(this,_82a);if(typeof this.plot!="string"){this.plot="default";}this.update(data);},clear:function(){this.dyn={};},update:function(data){if(_4.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(!_4._hasResource["dojox.charting.Chart"]){_4._hasResource["dojox.charting.Chart"]=true;_4.provide("dojox.charting.Chart");(function(){var df=_6.lang.functional,dc=_6.charting,g=_6.gfx,_82b=df.lambda("item.clear()"),_82c=df.lambda("item.purgeGroup()"),_82d=df.lambda("item.destroy()"),_82e=df.lambda("item.dirty = false"),_82f=df.lambda("item.dirty = true"),_830=df.lambda("item.name");_4.declare("dojox.charting.Chart",null,{constructor:function(node,_831){if(!_831){_831={};}this.margins=_831.margins?_831.margins:{l:10,t:10,r:10,b:10};this.stroke=_831.stroke;this.fill=_831.fill;this.delayInMs=_831.delayInMs||200;this.title=_831.title;this.titleGap=_831.titleGap;this.titlePos=_831.titlePos;this.titleFont=_831.titleFont;this.titleFontColor=_831.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=_4.byId(node);var box=_4.marginBox(node);this.surface=g.createSurface(this.node,box.w||400,box.h||300);},destroy:function(){_4.forEach(this.series,_82d);_4.forEach(this.stack,_82d);df.forIn(this.axes,_82d);if(this.chartTitle&&this.chartTitle.tagName){_4.destroy(this.chartTitle);}this.surface.destroy();},getCoords:function(){if(!this.coords){this.coords=_4.coords(this.node,true);}return this.coords;},setTheme:function(_832){this.theme=_832.clone();this.dirty=true;return this;},addAxis:function(name,_833){var axis,_834=_833&&_833.type||"Default";if(typeof _834=="string"){if(!dc.axis2d||!dc.axis2d[_834]){throw Error("Can't find axis: "+_834+" - didn't you forget to dojo"+".require() it?");}axis=new dc.axis2d[_834](this,_833);}else{axis=new _834(this,_833);}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,_835){var plot,_836=_835&&_835.type||"Default";if(typeof _836=="string"){if(!dc.plot2d||!dc.plot2d[_836]){throw Error("Can't find plot: "+_836+" - didn't you forget to dojo"+".require() it?");}plot=new dc.plot2d[_836](this,_835);}else{plot=new _836(this,_835);}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 _837=this.plots[name];delete this.plots[name];this.stack[_837].destroy();this.stack.splice(_837,1);df.forIn(this.plots,function(idx,name,_838){if(idx>_837){_838[name]=idx-1;}});var ns=_4.filter(this.series,function(run){return run.plot!=name;});if(ns.length<this.series.length){_4.forEach(this.series,function(run){if(run.plot==name){run.destroy();}});this.runs={};_4.forEach(ns,function(run,_839){this.runs[run.plot]=_839;},this);this.series=ns;}this.dirty=true;}return this;},getPlotOrder:function(){return df.map(this.stack,_830);},setPlotOrder:function(_83a){var _83b={},_83c=df.filter(_83a,function(name){if(!(name in this.plots)||(name in _83b)){return false;}_83b[name]=1;return true;},this);if(_83c.length<this.stack.length){df.forEach(this.stack,function(plot){var name=plot.name;if(!(name in _83b)){_83c.push(name);}});}var _83d=df.map(_83c,function(name){return this.stack[this.plots[name]];},this);df.forEach(_83d,function(plot,i){this.plots[plot.name]=i;},this);this.stack=_83d;this.dirty=true;return this;},movePlotToFront:function(name){if(name in this.plots){var _83e=this.plots[name];if(_83e){var _83f=this.getPlotOrder();_83f.splice(_83e,1);_83f.unshift(name);return this.setPlotOrder(_83f);}}return this;},movePlotToBack:function(name){if(name in this.plots){var _840=this.plots[name];if(_840<this.stack.length-1){var _841=this.getPlotOrder();_841.splice(_840,1);_841.push(name);return this.setPlotOrder(_841);}}return this;},addSeries:function(name,data,_842){var run=new dc.Series(this,data,_842);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 _843=this.runs[name];delete this.runs[name];this.series[_843].destroy();this.series.splice(_843,1);df.forIn(this.runs,function(idx,name,runs){if(idx>_843){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(_844){return df.map(df.filter(this.series,function(run){return run.plot==_844;}),_830);},setSeriesOrder:function(_845){var _846,_847={},_848=df.filter(_845,function(name){if(!(name in this.runs)||(name in _847)){return false;}var run=this.series[this.runs[name]];if(_846){if(run.plot!=_846){return false;}}else{_846=run.plot;}_847[name]=1;return true;},this);df.forEach(this.series,function(run){var name=run.name;if(!(name in _847)&&run.plot==_846){_848.push(name);}});var _849=df.map(_848,function(name){return this.series[this.runs[name]];},this);this.series=_849.concat(df.filter(this.series,function(run){return run.plot!=_846;}));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 _84a=this.runs[name],_84b=this.getSeriesOrder(this.series[_84a].plot);if(name!=_84b[0]){_84b.splice(_84a,1);_84b.unshift(name);return this.setSeriesOrder(_84b);}}return this;},moveSeriesToBack:function(name){if(name in this.runs){var _84c=this.runs[name],_84d=this.getSeriesOrder(this.series[_84c].plot);if(name!=_84d[_84d.length-1]){_84d.splice(_84c,1);_84d.push(name);return this.setSeriesOrder(_84d);}}return this;},resize:function(_84e,_84f){var box;switch(arguments.length){case 1:box=_4.mixin({},_84e);_4.marginBox(this.node,box);break;case 2:box={w:_84e,h:_84f};_4.marginBox(this.node,box);break;}box=_4.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,_850,_851,zoom){var axis=this.axes[name];if(axis){axis.setWindow(_850,_851);_4.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 _852,_853,_854=axis.getScaler().bounds,s=_854.span/(_854.upper-_854.lower);if(axis.vertical){_852=sy;_853=dy/s/_852;}else{_852=sx;_853=dx/s/_852;}axis.setWindow(_852,_853);});_4.forEach(this.stack,function(plot){plot.zoom=zoom;});return this;},zoomIn:function(name,_855){var axis=this.axes[name];if(axis){var _856,_857,_858=axis.getScaler().bounds;var _859=Math.min(_855[0],_855[1]);var _85a=Math.max(_855[0],_855[1]);_859=_855[0]<_858.lower?_858.lower:_859;_85a=_855[1]>_858.upper?_858.upper:_85a;_856=(_858.upper-_858.lower)/(_85a-_859);_857=_859-_858.lower;this.setAxisWindow(name,_856,_857);this.render();}},calculateGeometry:function(){if(this.dirty){return this.fullGeometry();}var _85b=_4.filter(this.stack,function(plot){return plot.dirty||(plot.hAxis&&this.axes[plot.hAxis].dirty)||(plot.vAxis&&this.axes[plot.vAxis].dirty);},this);_85c(_85b,this.plotArea);return this;},fullGeometry:function(){this._makeDirty();_4.forEach(this.stack,_82b);if(!this.theme){this.setTheme(new _6.charting.Theme(_6.charting._def));}_4.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);_4.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,_82b);_85c(this.stack,dim);var _85d=this.offsets={l:0,r:0,t:0,b:0};df.forIn(this.axes,function(axis){df.forIn(axis.getOffsets(),function(o,i){_85d[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 _85e=g.normalizedLength(g.splitFontString(this.titleFont).size);_85d[this.titlePos=="top"?"t":"b"]+=(_85e+this.titleGap);}df.forIn(this.margins,function(o,i){_85d[i]+=o;});this.plotArea={width:dim.width-_85d.l-_85d.r,height:dim.height-_85d.t-_85d.b};df.forIn(this.axes,_82b);_85c(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 _85f=this.offsets,dim=this.dim,rect;_4.forEach(this.series,_82c);df.forIn(this.axes,_82c);_4.forEach(this.stack,_82c);if(this.chartTitle&&this.chartTitle.tagName){_4.destroy(this.chartTitle);}this.surface.clear();this.chartTitle=null;var t=this.theme,fill=t.plotarea&&t.plotarea.fill,_860=t.plotarea&&t.plotarea.stroke,rect={x:_85f.l-1,y:_85f.t-1,width:dim.width-_85f.l-_85f.r+2,height:dim.height-_85f.t-_85f.b+2};if(fill){fill=dc.Element.prototype._shapeFill(dc.Element.prototype._plotFill(fill,dim,_85f),rect);this.surface.createRect(rect).setFill(fill);}if(_860){this.surface.createRect({x:_85f.l,y:_85f.t,width:dim.width-_85f.l-_85f.r+1,height:dim.height-_85f.t-_85f.b+1}).setStroke(_860);}df.foldr(this.stack,function(z,plot){return plot.render(dim,_85f),0;},0);fill=this.fill!==undefined?this.fill:(t.chart&&t.chart.fill);_860=this.stroke!==undefined?this.stroke:(t.chart&&t.chart.stroke);if(fill=="inherit"){var node=this.node,fill=new _4.Color(_4.style(node,"backgroundColor"));while(fill.a==0&&node!=document.documentElement){fill=new _4.Color(_4.style(node,"backgroundColor"));node=node.parentNode;}}if(fill){fill=dc.Element.prototype._plotFill(fill,dim,_85f);if(_85f.l){rect={width:_85f.l,height:dim.height+1};this.surface.createRect(rect).setFill(dc.Element.prototype._shapeFill(fill,rect));}if(_85f.r){rect={x:dim.width-_85f.r,width:_85f.r+1,height:dim.height+2};this.surface.createRect(rect).setFill(dc.Element.prototype._shapeFill(fill,rect));}if(_85f.t){rect={width:dim.width+1,height:_85f.t};this.surface.createRect(rect).setFill(dc.Element.prototype._shapeFill(fill,rect));}if(_85f.b){rect={y:dim.height-_85f.b,width:dim.width+1,height:_85f.b+2};this.surface.createRect(rect).setFill(dc.Element.prototype._shapeFill(fill,rect));}}if(_860){this.surface.createRect({width:dim.width-1,height:dim.height-1}).setStroke(_860);}if(this.title){var _861=(g.renderer=="canvas"),_862=_861||!_4.isIE&&!_4.isOpera?"html":"gfx",_863=g.normalizedLength(g.splitFontString(this.titleFont).size);this.chartTitle=dc.axis2d.common.createText[_862](this,this.surface,dim.width/2,this.titlePos=="top"?_863+this.margins.t:dim.height-this.margins.b,"middle",this.title,this.titleFont,this.titleFontColor);}df.forIn(this.axes,function(axis){axis.render(dim,_85f);});this._makeClean();if(this.surface.render){this.surface.render();}return this;},delayedRender:function(){if(!this._delayedRenderHandle){this._delayedRenderHandle=setTimeout(_4.hitch(this,function(){clearTimeout(this._delayedRenderHandle);this._delayedRenderHandle=null;this.render();}),this.delayInMs);}return this;},connectToPlot:function(name,_864,_865){return name in this.plots?this.stack[this.plots[name]].connect(_864,_865):null;},fireEvent:function(_866,_867,_868){if(_866 in this.runs){var _869=this.series[this.runs[_866]].plot;if(_869 in this.plots){var plot=this.stack[this.plots[_869]];if(plot){plot.fireEvent(_866,_867,_868);}}}return this;},_makeClean:function(){_4.forEach(this.axes,_82e);_4.forEach(this.stack,_82e);_4.forEach(this.series,_82e);this.dirty=false;},_makeDirty:function(){_4.forEach(this.axes,_82f);_4.forEach(this.stack,_82f);_4.forEach(this.series,_82f);this.dirty=true;},_invalidateDependentPlots:function(_86a,_86b){if(_86a in this.plots){var plot=this.stack[this.plots[_86a]],axis,_86c=_86b?"vAxis":"hAxis";if(plot[_86c]){axis=this.axes[plot[_86c]];if(axis&&axis.dependOnData()){axis.dirty=true;_4.forEach(this.stack,function(p){if(p[_86c]&&p[_86c]==plot[_86c]){p.dirty=true;}});}}else{plot.dirty=true;}}}});function _86d(_86e){return {min:_86e.hmin,max:_86e.hmax};};function _86f(_870){return {min:_870.vmin,max:_870.vmax};};function _871(_872,h){_872.hmin=h.min;_872.hmax=h.max;};function _873(_874,v){_874.vmin=v.min;_874.vmax=v.max;};function _875(_876,_877){if(_876&&_877){_876.min=Math.min(_876.min,_877.min);_876.max=Math.max(_876.max,_877.max);}return _876||_877;};function _85c(_878,_879){var _87a={},axes={};_4.forEach(_878,function(plot){var _87b=_87a[plot.name]=plot.getSeriesStats();if(plot.hAxis){axes[plot.hAxis]=_875(axes[plot.hAxis],_86d(_87b));}if(plot.vAxis){axes[plot.vAxis]=_875(axes[plot.vAxis],_86f(_87b));}});_4.forEach(_878,function(plot){var _87c=_87a[plot.name];if(plot.hAxis){_871(_87c,axes[plot.hAxis]);}if(plot.vAxis){_873(_87c,axes[plot.vAxis]);}plot.initializeScalers(_879,_87c);});};})();}if(!_4._hasResource["dojox.charting.Chart2D"]){_4._hasResource["dojox.charting.Chart2D"]=true;_4.provide("dojox.charting.Chart2D");_4.deprecated("dojox.charting.Chart2D","Use dojo.charting.Chart instead and require all other components explicitly","2.0");_6.charting.Chart2D=_6.charting.Chart;}if(!_4._hasResource["dojox.charting.themes.PlotKit.base"]){_4._hasResource["dojox.charting.themes.PlotKit.base"]=true;_4.provide("dojox.charting.themes.PlotKit.base");(function(){var dc=_6.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(_87d,_87e,_87f){var _880=dc.Theme.prototype.next.apply(this,arguments);if(_87d=="line"){_880.marker.outline={width:2,color:"#fff"};_880.series.stroke.width=3.5;_880.marker.stroke.width=2;}else{if(_87d=="candlestick"){_880.series.stroke.width=1;}else{_880.series.stroke.color="#fff";}}return _880;};})();}if(!_4._hasResource["dijit.Tooltip"]){_4._hasResource["dijit.Tooltip"]=true;_4.provide("dijit.Tooltip");_4.declare("dijit._MasterTooltip",[_5._Widget,_5._Templated],{duration:_5.defaultDuration,templateString:_4.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(){_4.body().appendChild(this.domNode);this.bgIframe=new _5.BackgroundIframe(this.domNode);this.fadeIn=_4.fadeIn({node:this.domNode,duration:this.duration,onEnd:_4.hitch(this,"_onShow")});this.fadeOut=_4.fadeOut({node:this.domNode,duration:this.duration,onEnd:_4.hitch(this,"_onHide")});},show:function(_881,_882,_883,rtl){if(this.aroundNode&&this.aroundNode===_882){return;}this.domNode.width="auto";if(this.fadeOut.status()=="playing"){this._onDeck=arguments;return;}this.containerNode.innerHTML=_881;var pos=_5.placeOnScreenAroundElement(this.domNode,_882,_5.getPopupAroundAlignment((_883&&_883.length)?_883:_5.Tooltip.defaultPosition,!rtl),_4.hitch(this,"orient"));_4.style(this.domNode,"opacity",0);this.fadeIn.play();this.isShowingNow=true;this.aroundNode=_882;},orient:function(node,_884,_885,_886,_887){this.connectorNode.style.top="";var _888=_886.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"}[_884+"-"+_885];this.domNode.style.width="auto";var size=_4.contentBox(this.domNode);var _889=Math.min((Math.max(_888,1)),size.w);var _88a=_889<size.w;this.domNode.style.width=_889+"px";if(_88a){this.containerNode.style.overflow="auto";var _88b=this.containerNode.scrollWidth;this.containerNode.style.overflow="visible";if(_88b>_889){_88b=_88b+_4.style(this.domNode,"paddingLeft")+_4.style(this.domNode,"paddingRight");this.domNode.style.width=_88b+"px";}}if(_885.charAt(0)=="B"&&_884.charAt(0)=="B"){var mb=_4.marginBox(node);var _88c=this.connectorNode.offsetHeight;if(mb.h>_886.h){var _88d=_886.h-(_887.h/2)-(_88c/2);this.connectorNode.style.top=_88d+"px";this.connectorNode.style.bottom="";}else{this.connectorNode.style.bottom=Math.min(Math.max(_887.h/2-_88c/2,0),mb.h-_88c)+"px";this.connectorNode.style.top="";}}else{this.connectorNode.style.top="";this.connectorNode.style.bottom="";}return Math.max(0,size.w-_888);},_onShow:function(){if(_4.isIE){this.domNode.style.filter="";}},hide:function(_88e){if(this._onDeck&&this._onDeck[1]==_88e){this._onDeck=null;}else{if(this.aroundNode===_88e){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;}}});_5.showTooltip=function(_88f,_890,_891,rtl){if(!_5._masterTT){_5._masterTT=new _5._MasterTooltip();}return _5._masterTT.show(_88f,_890,_891,rtl);};_5.hideTooltip=function(_892){if(!_5._masterTT){_5._masterTT=new _5._MasterTooltip();}return _5._masterTT.hide(_892);};_4.declare("dijit.Tooltip",_5._Widget,{label:"",showDelay:400,connectId:[],position:[],_setConnectIdAttr:function(_893){_4.forEach(this._connections||[],function(_894){_4.forEach(_894,_4.hitch(this,"disconnect"));},this);var ary=_4.isArrayLike(_893)?_893:(_893?[_893]:[]);this._connections=_4.map(ary,function(id){var node=_4.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",_893);this._connectIds=ary;},addTarget:function(node){var id=node.id||node;if(_4.indexOf(this._connectIds,id)==-1){this.set("connectId",this._connectIds.concat(id));}},removeTarget:function(node){var id=node.id||node,idx=_4.indexOf(this._connectIds,id);if(idx>=0){this._connectIds.splice(idx,1);this.set("connectId",this._connectIds);}},buildRendering:function(){this.inherited(arguments);_4.addClass(this.domNode,"dijitTooltipData");},startup:function(){this.inherited(arguments);var ids=this.connectId;_4.forEach(_4.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 _895=e.target;this._showTimer=setTimeout(_4.hitch(this,function(){this.open(_895);}),this.showDelay);}},_onUnHover:function(e){if(this._focus){return;}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}this.close();},open:function(_896){if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}_5.showTooltip(this.label||this.domNode.innerHTML,_896,this.position,!this.isLeftToRight());this._connectNode=_896;this.onShow(_896,this.position);},close:function(){if(this._connectNode){_5.hideTooltip(this._connectNode);delete this._connectNode;this.onHide();}if(this._showTimer){clearTimeout(this._showTimer);delete this._showTimer;}},onShow:function(_897,_898){},onHide:function(){},uninitialize:function(){this.close();this.inherited(arguments);}});_5.Tooltip.defaultPosition=["after","before"];}if(!_4._hasResource["dojox.charting.action2d.Base"]){_4._hasResource["dojox.charting.action2d.Base"]=true;_4.provide("dojox.charting.action2d.Base");(function(){var _899=400,_89a=_4.fx.easing.backOut,df=_6.lang.functional;_4.declare("dojox.charting.action2d.Base",null,{overOutEvents:{onmouseover:1,onmouseout:1},constructor:function(_89b,plot,_89c){this.chart=_89b;this.plot=plot||"default";this.anim={};if(!_89c){_89c={};}this.duration=_89c.duration?_89c.duration:_899;this.easing=_89c.easing?_89c.easing:_89a;},connect:function(){this.handle=this.chart.connectToPlot(this.plot,this,"process");},disconnect:function(){if(this.handle){_4.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(!_4._hasResource["dojox.lang.functional.scan"]){_4._hasResource["dojox.lang.functional.scan"]=true;_4.provide("dojox.lang.functional.scan");(function(){var d=_4,df=_6.lang.functional,_89d={};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 _89d)){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,_89e=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 _89d)){if(_89e){t=[z=a[i]];_89e=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(!_4._hasResource["dojox.charting.action2d.Tooltip"]){_4._hasResource["dojox.charting.action2d.Tooltip"]=true;_4.provide("dojox.charting.action2d.Tooltip");(function(){var _89f=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=_6.lang.functional,m=_6.gfx.matrix,pi4=Math.PI/4,pi2=Math.PI/2;_4.declare("dojox.charting.action2d.Tooltip",_6.charting.action2d.Base,{defaultParams:{text:_89f},optionalParams:{},constructor:function(_8a0,plot,_8a1){this.text=_8a1&&_8a1.text?_8a1.text:_89f;this.connect();},process:function(o){if(o.type==="onplotreset"||o.type==="onmouseout"){_5.hideTooltip(this.aroundRect);this.aroundRect=null;if(o.type==="onplotreset"){delete this.angles;}return;}if(!o.shape||o.type!=="onmouseover"){return;}var _8a2={type:"rect"},_8a3=["after","before"];switch(o.element){case "marker":_8a2.x=o.cx;_8a2.y=o.cy;_8a2.width=_8a2.height=1;break;case "circle":_8a2.x=o.cx-o.cr;_8a2.y=o.cy-o.cr;_8a2.width=_8a2.height=2*o.cr;break;case "column":_8a3=["above","below"];case "bar":_8a2=_4.clone(o.shape.getShape());break;case "candlestick":_8a2.x=o.x;_8a2.y=o.y;_8a2.width=o.width;_8a2.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 _8a4=m._degToRad(o.plot.opt.startAngle),_8a5=(this.angles[o.index]+this.angles[o.index+1])/2+_8a4;_8a2.x=o.cx+o.cr*Math.cos(_8a5);_8a2.y=o.cy+o.cr*Math.sin(_8a5);_8a2.width=_8a2.height=1;if(_8a5<pi4){}else{if(_8a5<pi2+pi4){_8a3=["below","above"];}else{if(_8a5<Math.PI+pi4){_8a3=["before","after"];}else{if(_8a5<2*Math.PI-pi4){_8a3=["above","below"];}}}}break;}var lt=_4.coords(this.chart.node,true);_8a2.x+=lt.x;_8a2.y+=lt.y;_8a2.x=Math.round(_8a2.x);_8a2.y=Math.round(_8a2.y);_8a2.width=Math.ceil(_8a2.width);_8a2.height=Math.ceil(_8a2.height);this.aroundRect=_8a2;var _8a6=this.text(o);if(_8a6){_5.showTooltip(_8a6,this.aroundRect,_8a3);}}});})();}if(!_4._hasResource["esri.dijit.Popup"]){_4._hasResource["esri.dijit.Popup"]=true;_4.provide("esri.dijit.Popup");(function(){var dc=_6.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;}());_4.declare("esri.dijit.Popup",[esri.InfoWindowBase,esri.PopupBase],{offsetX:3,offsetY:3,zoomFactor:4,marginLeft:10,marginTop:10,highlight:true,constructor:function(_8a7,_8a8){this.initialize();_4.mixin(this,_8a7);this.domNode=_4.byId(_8a8);var nls=this._nls=_4.mixin({},esri.bundle.widgets.popup);var _8a9=this.domNode;_4.addClass(_8a9,"esriPopup");var _8aa="<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>";_4.attr(_8a9,"innerHTML",_8aa);this._sizers=_4.query(".sizer",_8a9);var _8ab=_4.query(".titlePane",_8a9)[0];_4.setSelectable(_8ab,false);this._title=_4.query(".title",_8ab)[0];this._prevFeatureButton=_4.query(".prev",_8ab)[0];this._nextFeatureButton=_4.query(".next",_8ab)[0];this._maxButton=_4.query(".maximize",_8ab)[0];this._spinner=_4.query(".spinner",_8ab)[0];this._contentPane=_4.query(".contentPane",_8a9)[0];this._positioner=_4.query(".esriPopupWrapper",_8a9)[0];this._pointer=_4.query(".pointer",_8a9)[0];this._outerPointer=_4.query(".outerPointer",_8a9)[0];this._actionList=_4.query(".actionsPane .actionList",_8a9)[0];this._eventConnections=[_4.connect(_4.query(".close",_8ab)[0],"onclick",this,this.hide),_4.connect(this._prevFeatureButton,"onclick",this,this.selectPrevious),_4.connect(this._nextFeatureButton,"onclick",this,this.selectNext),_4.connect(this._maxButton,"onclick",this,this._toggleSize),_4.connect(_4.query(".zoomTo",this._actionList)[0],"onclick",this,this._zoomToFeature)];if(esri.isTouchEnabled){var _8ac=esri.setScrollable(this._contentPane);this._eventConnections.push(_8ac[0],_8ac[1]);}this._setVisibility(false);this.isShowing=false;},setMap:function(map){this.inherited(arguments);_4.place(this.domNode,map.root);if(this.highlight){this.enableHighlight(map);}this._maxHeight=_4.style(this._contentPane,"maxHeight");},unsetMap:function(){this.disableHighlight(this.map);this.inherited(arguments);},setTitle:function(_8ad){if(!esri._isDefined(_8ad)||_8ad===""){_8ad="&nbsp;";}this.destroyDijits(this._title);this.place(_8ad,this._title);if(this.isShowing){this.startupDijits(this._title);this.reposition();}},setContent:function(_8ae){if(!esri._isDefined(_8ae)||_8ae===""){_8ae="&nbsp;";}this.destroyDijits(this._contentPane);this.place(_8ae,this._contentPane);if(this.isShowing){this.startupDijits(this._contentPane);this.reposition();}},show:function(_8af){if(!_8af){this._setVisibility(true);this.isShowing=true;return;}var map=this.map,_8b0;if(_8af.spatialReference){this._location=_8af;_8b0=map.toScreen(_8af);}else{this._location=map.toMap(_8af);_8b0=_8af;}var _8b1=map._getFrameWidth();if(_8b1!==-1){_8b0.x=_8b0.x%_8b1;if(_8b0.x<0){_8b0.x+=_8b1;}if(map.width>_8b1){var _8b2=(map.width-_8b1)/2;while(_8b0.x<_8b2){_8b0.x+=_8b1;}}}if(this._maximized){this.restore();}else{this._setPosition(_8b0);}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(_8b3,_8b4){this._sizers.style({width:_8b3+"px"});_4.style(this._contentPane,"maxHeight",_8b4+"px");this._maxHeight=_8b4;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;_4.removeClass(max,"maximize");_4.addClass(max,"restore");_4.attr(max,"title",this._nls.NLS_restore);var _8b5=this.marginLeft,_8b6=this.marginTop,_8b7=map.width-(2*_8b5),_8b8=map.height-(2*_8b6),_8b9=this.domNode;_4.style(_8b9,{left:_8b5+"px",right:null,top:_8b6+"px",bottom:null});_4.style(this._positioner,{left:null,right:null,top:null,bottom:null});this._savedWidth=_4.style(this._sizers[0],"width");this._savedHeight=_4.style(this._contentPane,"maxHeight");this._sizers.style({width:_8b7+"px"});_4.style(this._contentPane,{maxHeight:(_8b8-65)+"px",height:(_8b8-65)+"px"});this._showPointer("");this._unfollowMap();_4.addClass(this.domNode,"esriPopupMaximized");this.onMaximize();},restore:function(){var map=this.map;if(!map||!this._maximized){return;}this._maximized=false;var max=this._maxButton;_4.removeClass(max,"restore");_4.addClass(max,"maximize");_4.attr(max,"title",this._nls.NLS_maximize);_4.style(this._contentPane,"height",null);this.resize(this._savedWidth,this._savedHeight);this._savedWidth=this._savedHeight=null;this.show(this._location);this._followMap();_4.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);_4.forEach(this._eventConnections,_4.disconnect);_4.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(_8ba){_4.style(this.domNode,"visibility",_8ba?"visible":"hidden");},_followMap:function(){this._unfollowMap();var map=this.map;this._handles=[_4.connect(map,"onPanStart",this,this._onPanStart),_4.connect(map,"onPan",this,this._onPan),_4.connect(map,"onZoomStart",this,this._onZoomStart),_4.connect(map,"onExtentChange",this,this._onExtentChange)];},_unfollowMap:function(){var _8bb=this._handles;if(_8bb){_4.forEach(_8bb,_4.disconnect,_4);this._handles=null;}},_onPanStart:function(){var _8bc=this.domNode.style;this._panOrigin={left:_8bc.left,top:_8bc.top,right:_8bc.right,bottom:_8bc.bottom};},_onPan:function(_8bd,_8be){var _8bf=this._panOrigin,dx=_8be.x,dy=_8be.y,left=_8bf.left,top=_8bf.top,_8c0=_8bf.right,_8c1=_8bf.bottom;if(left){left=(parseFloat(left)+dx)+"px";}if(top){top=(parseFloat(top)+dy)+"px";}if(_8c0){_8c0=(parseFloat(_8c0)-dx)+"px";}if(_8c1){_8c1=(parseFloat(_8c1)-dy)+"px";}_4.style(this.domNode,{left:left,top:top,right:_8c0,bottom:_8c1});},_onZoomStart:function(){this._setVisibility(false);},_onExtentChange:function(_8c2,_8c3,_8c4){if(_8c4){this._setVisibility(true);this.show(this._targetLocation||this._location);}this._targetLocation=null;},_toggleSize:function(){if(this._maximized){this.restore();}else{this.maximize();}},_setPosition:function(_8c5){var posX=_8c5.x,posY=_8c5.y,offX=this.offsetX||0,offY=this.offsetY||0,_8c6=0,_8c7=0,_8c8=_4.position(this.map.container,true),_8c9=_8c8.w,_8ca=_8c8.h,_8cb="Left",_8cc="bottom",_8cd=_4.contentBox(this._positioner),_8ce=_8cd.w/2,_8cf=_8cd.h/2,maxH=_4.style(this._sizers[0],"height")+this._maxHeight+_4.style(this._sizers[2],"height"),_8d0=maxH/2,xmin=0,ymin=0,xmax=_8c9,ymax=_8ca,_8d1=posX,_8d2=posY;var _8d3=_4.getObject("dojo.window.getBox");if(_8d3){_8d3=_8d3();xmin=Math.max(_8d3.l,_8c8.x);xmax=Math.min(_8d3.l+_8d3.w,_8c8.x+_8c8.w);ymin=Math.max(_8d3.t,_8c8.y);ymax=Math.min(_8d3.t+_8d3.h,_8c8.y+_8c8.h);_8d1+=_8c8.x;_8d2+=_8c8.y;}if(((_8d2-ymin)>_8d0)&&((ymax-_8d2)>=_8d0)){if((xmax-_8d1)>=_8cd.w){_8cc="";_8cb="Left";}else{if((_8d1-xmin)>=_8cd.w){_8cc="";_8cb="Right";}}}if(_8cb&&_8cc){if(((_8d1-xmin)>_8ce)&&((xmax-_8d1)>=_8ce)){if((_8d2-ymin)>=maxH){_8cb="";_8cc="bottom";}else{if((ymax-_8d2)>=maxH){_8cb="";_8cc="top";}}}}if(_8cb&&_8cc){if(_8d1<=xmax/2){_8cb="Left";}else{if(_8d1<=xmax){_8cb="Right";}}if(_8d2<=ymax/2){_8cc="top";}else{if(_8d2<=ymax){_8cc="bottom";}}}var _8d4=_8cc+_8cb;switch(_8d4){case "top":case "bottom":_8c7=14;break;case "Left":case "Right":_8c6=13;break;case "topLeft":case "topRight":case "bottomLeft":case "bottomRight":_8c7=45;break;}_4.style(this.domNode,{left:posX+"px",top:posY+"px",right:null,bottom:null});var _8d5={left:null,right:null,top:null,bottom:null};if(_8cb){_8d5[_8cb.toLowerCase()]=(_8c6+offX)+"px";}else{_8d5.left=(-_8ce)+"px";}if(_8cc){_8d5[_8cc]=(_8c7+offY)+"px";}else{_8d5.top=(-_8cf)+"px";}_4.style(this._positioner,_8d5);this._showPointer(_8d4);},_showPointer:function(_8d6){_4.removeClass(this._pointer,["top","bottom","right","left","topLeft","topRight","bottomRight","bottomLeft","hidden"]);_4.removeClass(this._outerPointer,["right","left","hidden"]);if(_8d6==="Right"||_8d6==="Left"){_8d6=_8d6.toLowerCase();_4.addClass(this._outerPointer,_8d6);}else{_4.addClass(this._pointer,_8d6);}},_setPagerCallbacks:function(_8d7,_8d8,_8d9){if(_8d7===this&&(!this._pagerScope||this._pagerScope===this)){return;}if(_8d7===this._pagerScope){return;}this._pagerScope=_8d7;if(_8d7===this){_8d8=this.selectPrevious;_8d9=this.selectNext;}var _8da=this._eventConnections;_4.disconnect(_8da[1]);_4.disconnect(_8da[2]);if(_8d8){_8da[1]=_4.connect(this._prevFeatureButton,"onclick",_8d7,_8d8);}if(_8d9){_8da[2]=_4.connect(this._nextFeatureButton,"onclick",_8d7,_8d9);}},_zoomToFeature:function(){var _8db=this.features,ptr=this.selectedIndex,map=this.map;if(_8db){var _8dc=_8db[ptr].geometry,_8dd,_8de,_8df=0,_8e0;if(_8dc){switch(_8dc.type){case "point":_8dd=_8dc;break;case "multipoint":_8dd=_8dc.getPoint(0);_8de=_8dc.getExtent();break;case "polyline":_8dd=_8dc.getPoint(0,0);_8de=_8dc.getExtent();if(map._getFrameWidth()!==-1){_4.forEach(_8dc.paths,function(path){var _8e1={"paths":[path,map.spatialReference]},_8e2=new esri.geometry.Polyline(_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>_8df){_8df=_8e6;_8e0=_8e3;}});_8e0.spatialReference=_8de.spatialReference;_8de=_8e0;}break;case "polygon":_8dd=_8dc.getPoint(0,0);_8de=_8dc.getExtent();if(map._getFrameWidth()!==-1){_4.forEach(_8dc.rings,function(ring){var _8e7={"rings":[ring,map.spatialReference]},_8e8=new esri.geometry.Polygon(_8e7),_8e9=_8e8.getExtent(),_8ea=Math.abs(_8e9.ymax-_8e9.ymin),_8eb=Math.abs(_8e9.xmax-_8e9.xmin),_8ec=(_8eb>_8ea)?_8eb:_8ea;if(_8ec>_8df){_8df=_8ec;_8e0=_8e9;}});_8e0.spatialReference=_8de.spatialReference;_8de=_8e0;}break;}}if(!_8dd){_8dd=this._location;}if(!_8de||!_8de.intersects(this._location)){this._location=_8dd;}if(_8de){map.setExtent(_8de,true);}else{var _8ed=map.getNumLevels(),_8ee=map.getLevel(),last=_8ed-1,_8ef=this.zoomFactor||1;if(_8ed>0){if(_8ee===last){return;}var _8f0=_8ee+_8ef;if(_8f0>last){_8f0=last;}map._scrollZoomHandler({value:(_8f0-_8ee),mapPoint:_8dd},true);}else{map._scrollZoomHandler({value:(1/Math.pow(2,_8ef))*2,mapPoint:_8dd},true);}}}},_updateUI:function(){var _8f1="&nbsp;",ptr=this.selectedIndex,_8f2=this.features,_8f3=this.deferreds,prev=this._prevFeatureButton,next=this._nextFeatureButton,_8f4=this._spinner,_8f5=this._actionList,nls=this._nls;if(_8f2&&_8f2.length>1){if(nls.NLS_pagingInfo){_8f1=esri.substitute({index:(ptr+1),total:_8f2.length},nls.NLS_pagingInfo);}if(ptr===0){_4.addClass(prev,"hidden");}else{_4.removeClass(prev,"hidden");}if(ptr===_8f2.length-1){_4.addClass(next,"hidden");}else{_4.removeClass(next,"hidden");}}else{_4.addClass(prev,"hidden");_4.addClass(next,"hidden");}this.setTitle(_8f1);if(_8f3&&_8f3.length){if(_8f2){_4.removeClass(_8f4,"hidden");}else{this.setContent("<div style='text-align: center;'>"+nls.NLS_searching+"...</div>");}}else{_4.addClass(_8f4,"hidden");if(!_8f2||!_8f2.length){this.setContent("<div style='text-align: center;'>"+nls.NLS_noInfo+".</div>");}}if(_8f2&&_8f2.length){_4.removeClass(_8f5,"hidden");}else{_4.addClass(_8f5,"hidden");}}});_4.declare("esri.dijit.PopupTemplate",[esri.PopupInfoTemplate],{chartTheme:"dojox.charting.themes.PlotKit.popup",constructor:function(json,_8f6){_4.mixin(this,_8f6);this.initialize(json);this._nls=_4.mixin({},esri.bundle.widgets.popup);},getTitle:function(_8f7){return this.info?this.getComponents(_8f7).title:"";},getContent:function(_8f8){return this.info?new esri.dijit._PopupRenderer({template:this,graphic:_8f8,chartTheme:this.chartTheme,_nls:this._nls},_4.create("div")).domNode:"";}});_4.declare("esri.dijit._PopupRenderer",[_5._Widget,_5._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 _8f9=this.template,_8fa=this.graphic,_8fb=_8f9.getComponents(_8fa),_8fc=_8fb.title,_8fd=_8fb.description,_8fe=_8fb.fields,_8ff=_8fb.mediaInfos,_900=this.domNode,nls=this._nls;this._prevMedia.title=nls.NLS_prevMedia;this._nextMedia.title=nls.NLS_nextMedia;_4.attr(this._title,"innerHTML",_8fc);if(!_8fc){_4.addClass(this._title,"hidden");}if(!_8fd&&_8fe){_8fd="";_4.forEach(_8fe,function(row){_8fd+=("<tr valign='top'>");_8fd+=("<td class='attrName'>"+row[0]+"</td>");_8fd+=("<td class='attrValue'>"+row[1].replace(/^\s*(https?:\/\/[^\s]+)\s*$/i,"<a target='_blank' href='$1' title='$1'>More info</a>")+"</td>");_8fd+=("</tr>");});if(_8fd){_8fd="<table class='attrTable' cellpadding='0px' cellspacing='0px'>"+_8fd+"</table>";}}_4.attr(this._description,"innerHTML",_8fd);if(!_8fd){_4.addClass(this._description,"hidden");}_4.query("a",this._description).forEach(function(node){_4.attr(node,"target","_blank");});if(_8fc&&_8fd){_4.query(".mainSection .hzLine",_900).removeClass("hidden");}else{if(_8fc||_8fd){_4.query(".mainSection .hzLine",_900).addClass("hidden");}else{_4.query(".mainSection",_900).addClass("hidden");}}var dfd=(this._dfd=_8f9.getAttachments(_8fa));if(dfd){dfd.addBoth(_4.hitch(this,this._attListHandler,dfd));_4.attr(this._attachmentsList,"innerHTML","<li>"+nls.NLS_searching+"...</li>");_4.query(".attachmentsSection",_900).removeClass("hidden");}if(_8ff&&_8ff.length){_4.query(".mediaSection",_900).removeClass("hidden");_4.setSelectable(this._mediaFrame,false);this._mediaInfos=_8ff;this._mediaPtr=0;this._updateUI();this._displayMedia();}if(_8fb.editSummary){_4.attr(this._editSummary,"innerHTML",_8fb.editSummary);if(_8ff&&_8ff.length){_4.removeClass(this._mediaBreak,"hidden");}_4.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 _901=this._mediaInfos,_902=_901.length,_903=this.domNode,_904=this._prevMedia,_905=this._nextMedia;if(_902>1){var _906=0,_907=0;_4.forEach(_901,function(info){if(info.type==="image"){_906++;}else{if(info.type.indexOf("chart")!==-1){_907++;}}});if(_906){_4.attr(this._imageCount,"innerHTML",_906);_4.query(".summary .image",_903).removeClass("hidden");}if(_907){_4.attr(this._chartCount,"innerHTML",_907);_4.query(".summary .chart",_903).removeClass("hidden");}}else{_4.query(".summary",_903).addClass("hidden");_4.addClass(_904,"hidden");_4.addClass(_905,"hidden");}var ptr=this._mediaPtr;if(ptr===0){_4.addClass(_904,"hidden");}else{_4.removeClass(_904,"hidden");}if(ptr===_902-1){_4.addClass(_905,"hidden");}else{_4.removeClass(_905,"hidden");}this._destroyFrame();},_displayMedia:function(){var info=this._mediaInfos[this._mediaPtr],_908=info.title,_909=info.caption,_90a=_4.query(".mediaSection .hzLine",this.domNode)[0];_4.attr(this._mediaTitle,"innerHTML",_908);_4[_908?"removeClass":"addClass"](this._mediaTitle,"hidden");_4.attr(this._mediaCaption,"innerHTML",_909);_4[_909?"removeClass":"addClass"](this._mediaCaption,"hidden");_4[(_908&&_909)?"removeClass":"addClass"](_90a,"hidden");if(info.type==="image"){this._showImage(info.value);}else{this._showChart(info.type,info.value);}},_showImage:function(_90b){_4.addClass(this._mediaFrame,"image");var _90c=_4.style(this._gallery,"height"),html="<img src='"+_90b.sourceURL+"' onload='esri.dijit._PopupRenderer.prototype._imageLoaded(this,"+_90c+");' />";if(_90b.linkURL){html="<a target='_blank' href='"+_90b.linkURL+"'>"+html+"</a>";}_4.attr(this._mediaFrame,"innerHTML",html);},_showChart:function(type,_90d){_4.removeClass(this._mediaFrame,"image");var _90e=this._chart=new _6.charting.Chart2D(_4.create("div",{"class":"chart"},this._mediaFrame),{margins:{l:4,t:4,r:4,b:4}});var _90f=_90d.theme||this.chartTheme||"PlotKit.popup";_90e.setTheme(_4.getObject(_90f)||_4.getObject("dojox.charting.themes."+_90f));switch(type){case "piechart":_90e.addPlot("default",{type:"Pie",labels:false});_90e.addSeries("Series A",_90d.fields);break;case "linechart":_90e.addPlot("default",{type:"Markers"});_90e.addAxis("x",{min:0,majorTicks:false,minorTicks:false,majorLabels:false,minorLabels:false});_90e.addAxis("y",{includeZero:true,vertical:true,fixUpper:"minor"});_4.forEach(_90d.fields,function(info,idx){info.x=idx+1;});_90e.addSeries("Series A",_90d.fields);break;case "columnchart":_90e.addPlot("default",{type:"Columns",gap:3});_90e.addAxis("y",{includeZero:true,vertical:true,fixUpper:"minor"});_90e.addSeries("Series A",_90d.fields);break;case "barchart":_90e.addPlot("default",{type:"Bars",gap:3});_90e.addAxis("x",{includeZero:true,fixUpper:"minor",minorLabels:false});_90e.addAxis("y",{vertical:true,majorTicks:false,minorTicks:false,majorLabels:false,minorLabels:false});_90e.addSeries("Series A",_90d.fields);break;}this._action=new _6.charting.action2d.Tooltip(_90e);_90e.render();},_destroyFrame:function(){if(this._chart){this._chart.destroy();this._chart=null;}if(this._action){this._action.destroy();this._action=null;}_4.attr(this._mediaFrame,"innerHTML","");},_imageLoaded:function(img,_910){var _911=img.height;if(_911<_910){var diff=Math.round((_910-_911)/2);_4.style(img,"marginTop",diff+"px");}},_attListHandler:function(dfd,_912){if(dfd===this._dfd){this._dfd=null;var html="";if(!(_912 instanceof Error)&&_912&&_912.length){_4.forEach(_912,function(info){html+=("<li>");html+=("<a href='"+info.url+"' target='_blank'>"+(info.name||"[No name]")+"</a>");html+=("</li>");});}_4.attr(this._attachmentsList,"innerHTML",html||"<li>"+this._nls.NLS_noAttach+"</li>");}}});}if(!_4._hasResource["esri.layers.KMLLayer"]){_4._hasResource["esri.layers.KMLLayer"]=true;_4.provide("esri.layers.KMLLayer");_4.declare("esri.layers.KMLLayer",[esri.layers.Layer],{serviceUrl:"http://utility.arcgis.com/sharing/kml",constructor:function(url,_913){if(!url){console.log("KMLLayer:constructor - please provide url for the KML file");}this._outSR=(_913&&_913.outSR)||new esri.SpatialReference({wkid:4326});this._options=_913;if(esri.config.defaults.kmlService){this.serviceUrl=esri.config.defaults.kmlService;}var link=(this.linkInfo=_913&&_913.linkInfo);if(link){this.visible=!!link.visibility;this._waitingForMap=!!link.viewFormat;}if(!link||(link&&link.visibility&&!this._waitingForMap)){this._parseKml();}this.refresh=_4.hitch(this,this.refresh);},getFeature:function(_914){if(!_914){return;}var type=_914.type,id=_914.id,_915,i,len;switch(type){case "esriGeometryPoint":case "esriGeometryPolyline":case "esriGeometryPolygon":var _916=this["_"+type];if(_916){_915=_4.getObject("_mode._featureMap."+id,false,_916);}break;case "GroundOverlay":var _917=this._groundLyr;if(_917){var _918=_917.getImages();len=_918.length;for(i=0;i<len;i++){if(_918[i].id===id){_915=_918[i];break;}}}break;case "ScreenOverlay":break;case "NetworkLink":_4.some(this._links,function(link){if(link.linkInfo&&link.linkInfo.id===id){_915=link;return true;}else{return false;}});break;case "Folder":var _919=this.folders;len=_919?_919.length:0;for(i=0;i<len;i++){if(_919[i].id===id){_915=_919[i];break;}}break;default:console.log("KMLLayer:getFeature - unknown feature type");break;}return _915;},getLayers:function(){var _91a=[];if(this._groundLyr){_91a.push(this._groundLyr);}if(this._fLayers){_91a=_91a.concat(this._fLayers);}if(this._links){_4.forEach(this._links,function(link){if(link.declaredClass){_91a.push(link);}});}return _91a;},setFolderVisibility:function(_91b,_91c){if(!_91b){return;}this._fireUpdateStart();_91b.visible=_91c;if(_91c){_91c=this._areLocalAncestorsVisible(_91b);}this._setState(_91b,_91c);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:_4.toJson(this._outSR.toJson())},callbackParamName:"callback",load:function(_91d){self._io=null;self._initLayer(_91d);},error:function(err){self._io=null;err=_4.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 _91e=(this.folders=json.folders),_91f=[],fldr;if(_91e){len=_91e.length;for(i=0;i<len;i++){fldr=(_91e[i]=new esri.layers.KMLFolder(_91e[i]));if(fldr.parentFolderId===-1){_91f.push(fldr);}}}var _920=(this._links=json.networkLinks),_921;len=_920?_920.length:0;for(i=0;i<len;i++){if(_920[i].viewRefreshMode&&_920[i].viewRefreshMode.toLowerCase().indexOf("onregion")!==-1){continue;}_921=_4.mixin({},this._options);_921.linkInfo=_920[i];if(_921.id){_921.id=_921.id+"_"+i;}_920[i]=new esri.layers.KMLLayer(_920[i].href,_921);_920[i]._parentLayer=this;_920[i]._parentFolderId=this._getLinkParentId(_920[i].linkInfo.id);}var _922=json.groundOverlays;if(_922&&_922.length>0){_921=_4.mixin({},this._options);if(_921.id){_921.id=_921.id+"_"+"mapImage";}var _923=(this._groundLyr=new esri.layers.MapImageLayer(_921));len=_922.length;for(i=0;i<len;i++){_923.addImage(new esri.layers.KMLGroundOverlay(_922[i]));}}var _924=_4.getObject("featureCollection.layers",false,json);if(_924&&_924.length>0){this._fLayers=[];_4.forEach(_924,function(_925,i){var _926=_4.getObject("featureSet.features",false,_925),_927;if(_926&&_926.length>0){_921=_4.mixin({outFields:["*"],infoTemplate:_925.popupInfo?new esri.dijit.PopupTemplate(_925.popupInfo):null,editable:false},this._options);if(_921.id){_921.id=_921.id+"_"+i;}_925.layerDefinition.capabilities="Query,Data";_927=new esri.layers.FeatureLayer(_925,_921);if(_927.geometryType){this["_"+_927.geometryType]=_927;}this._fLayers.push(_927);}},this);if(this._fLayers.length===0){delete this._fLayers;}}len=_91f.length;for(i=0;i<len;i++){fldr=_91f[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){_4.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 _928=map.spatialReference,_929=this._outSR,_92a,_92b;if(_928.wkid){_92a=(_928._isWebMercator()&&_929._isWebMercator())||(_928.wkid===_929.wkid);}else{if(_928.wkt){_92a=(_928.wkt===_929.wkt);}else{console.log("KMLLayer:_setMap - map has invalid spatial reference");return;}}if(!_92a){if(_928._isWebMercator()&&_929.wkid===4326){_92b=esri.geometry.geographicToWebMercator;}else{if(_929._isWebMercator()&&_928.wkid===4326){_92b=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(_92b){_4.forEach(this._groundLyr.getImages(),function(_92c){_92c.extent=_92b(_92c.extent);});}map.addLayer(this._groundLyr);}var _92d=this._fLayers;if(_92d&&_92d.length>0){_4.forEach(_92d,function(_92e){if(_92b){var _92f=_92e.graphics,i,geom,len=_92f?_92f.length:0;for(i=0;i<len;i++){geom=_92f[i].geometry;if(geom){_92f[i].setGeometry(_92b(geom));}}}map.addLayer(_92e);});}this.onVisibilityChange(this.visible);},_removeInternalLayers:function(){var map=this._map;if(this._links){_4.forEach(this._links,function(link){if(link.declaredClass&&link._io){link._io.cancel();}});}if(map){_4.forEach(this.getLayers(),map.removeLayer,map);}},_setState:function(_930,_931){var _932=_930.featureInfos,info,_933,i,len=_932?_932.length:0,_934=_931?"show":"hide";for(i=0;i<len;i++){info=_932[i];_933=this.getFeature(info);if(!_933){continue;}if(info.type==="Folder"){this._setState(_933,_931&&_933.visible);}else{if(info.type==="NetworkLink"){this._setInternalVisibility(_933,_931);}else{_933[_934]();}}}},_areLocalAncestorsVisible:function(_935){var _936=_935.parentFolderId,_937=_935.visible;while(_937&&_936!==-1){var _938=this.getFeature({type:"Folder",id:_936});_937=_937&&_938.visible;_936=_938.parentFolderId;}return _937;},_setInternalVisibility:function(_939,_93a){var _93b=_939._parentLayer,_93c=_939._parentFolderId;_93a=_93a&&_939.visible;while(_93a&&_93b){_93a=_93a&&_93b.visible;if(_93c>-1){_93a=_93a&&_93b._areLocalAncestorsVisible(_93b.getFeature({type:"Folder",id:_93c}));}_93c=_93b._parentFolderId;_93b=_93b._parentLayer;}this._setIntState(_939,_93a);},_setIntState:function(link,_93d){if(!link){return;}_4.forEach(link.getLayers(),function(_93e){if(_93e.linkInfo){link._setIntState(_93e,_93d&&_93e.visible&&link._areLocalAncestorsVisible(link.getFeature({type:"Folder",id:_93e._parentFolderId})));}else{_93e.setVisibility(_93d);}});},_getLinkParentId:function(id){var _93f=-1;if(this.folders){_4.some(this.folders,function(_940){if(_940.networkLinkIds&&_4.indexOf(_940.networkLinkIds,id)!==-1){_93f=_940.id;return true;}return false;});}return _93f;},_checkAutoRefresh:function(){var _941=this.linkInfo;if(_941){if(this.visible){if(this.loaded&&this._map){var _942=_941.refreshMode,_943=_941.refreshInterval,_944=_941.viewRefreshMode,_945=_941.viewRefreshTime;if(_942&&_942.toLowerCase().indexOf("oninterval")!==-1&&_943>0){this._stopAutoRefresh();this._timeoutHandle=setTimeout(this.refresh,_943*1000);}if(_944&&_944.toLowerCase().indexOf("onstop")!==-1&&_945>0){if(!this._extChgHandle){this._extChgHandle=_4.connect(this._map,"onExtentChange",this,this._extentChanged);}}}}else{this._stopAutoRefresh();_4.disconnect(this._extChgHandle);delete this._extChgHandle;}}},_stopAutoRefresh:function(){clearTimeout(this._timeoutHandle);this._timeoutHandle=null;},_getQueryParameters:function(map){map=map||this._map;var _946={},_947=this.linkInfo,_948=map&&map.extent;if(this._url.query){_4.mixin(_946,this._url.query);}if(_947){var _949=_947.viewFormat,_94a=_947.httpQuery,_94b=_947.viewBoundScale;if(_948&&_949){var _94c=_948,_94d=_948,sr=_948.spatialReference;if(sr){if(sr._isWebMercator()){_94c=esri.geometry.webMercatorToGeographic(_948);}else{if(sr.wkid===4326){_94d=esri.geometry.geographicToWebMercator(_948);}}}var _94e=_94c.getCenter(),_94f=Math.max(_94d.getWidth(),_94d.getHeight());if(_94b){_94c=_94c.expand(_94b);}_949=_949.replace(/\[bboxWest\]/ig,_94c.xmin).replace(/\[bboxEast\]/ig,_94c.xmax).replace(/\[bboxSouth\]/ig,_94c.ymin).replace(/\[bboxNorth\]/ig,_94c.ymax).replace(/\[lookatLon\]/ig,_94e.x).replace(/\[lookatLat\]/ig,_94e.y).replace(/\[lookatRange\]/ig,_94f).replace(/\[lookatTilt\]/ig,0).replace(/\[lookatHeading\]/ig,0).replace(/\[lookatTerrainLon\]/ig,_94e.x).replace(/\[lookatTerrainLat\]/ig,_94e.y).replace(/\[lookatTerrainAlt\]/ig,0).replace(/\[cameraLon\]/ig,_94e.x).replace(/\[cameraLat\]/ig,_94e.y).replace(/\[cameraAlt\]/ig,_94f).replace(/\[horizFov\]/ig,60).replace(/\[vertFov\]/ig,60).replace(/\[horizPixels\]/ig,map.width).replace(/\[vertPixels\]/ig,map.height).replace(/\[terrainEnabled\]/ig,0);_4.mixin(_946,_4.queryToObject(_949));}if(_94a){_94a=_94a.replace(/\[clientVersion\]/ig,esri.version).replace(/\[kmlVersion\]/ig,2.2).replace(/\[clientName\]/ig,"ArcGIS API for JavaScript").replace(/\[language\]/ig,_4.locale);_4.mixin(_946,_4.queryToObject(_94a));}}var _950=[],_951;for(_951 in _946){if(esri._isDefined(_946[_951])){_950.push(_951+"="+_946[_951]);}}_950=_950.join("&");return _950?("?"+_950):"";},_setMap:function(map,_952){this._map=map;var div=this._div=_4.create("div",null,_952);_4.style(div,"position","absolute");this._addInternalLayers();return div;},_unsetMap:function(map,_953){if(this._io){this._io.cancel();}this._stopAutoRefresh();_4.disconnect(this._extChgHandle);delete this._extChgHandle;this._removeInternalLayers();var div=this._div;if(div){_953.removeChild(div);_4.destroy(div);}this._map=this._wMap=this._div=null;},onVisibilityChange:function(_954){if(!this.loaded){if(this.linkInfo&&_954){if(!this._waitingForMap){this._parseKml(this._wMap);}}return;}this._fireUpdateStart();this._setInternalVisibility(this,_954);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);}});_4.declare("esri.layers.KMLGroundOverlay",[esri.layers.MapImage],{constructor:function(json){if(esri._isDefined(this.visibility)){this.visible=!!this.visibility;}}});_4.declare("esri.layers.KMLFolder",null,{constructor:function(json){_4.mixin(this,json);if(esri._isDefined(this.visibility)){this.visible=!!this.visibility;}}});}if(!_4._hasResource["esri.layers.wms"]){_4._hasResource["esri.layers.wms"]=true;_4.provide("esri.layers.wms");_4.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,_955){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=_4.hitch(this,this._initLayer);this._parseCapabilities=_4.hitch(this,this._parseCapabilities);this._getCapabilitiesError=_4.hitch(this,this._getCapabilitiesError);if(_955){this.imageFormat=this._getImageFormat(_955.format);this.imageTransparency=(_955.transparent===false)?false:true;this.visibleLayers=_955.visibleLayers?_955.visibleLayers:[];if(_955.resourceInfo){this._readResourceInfo(_955.resourceInfo);}else{this._getCapabilities();}}else{this.imageFormat="image/png";this.imageTransparency=true;this.visibleLayers=[];this._getCapabilities();}this._blankImageURL=_4.moduleUrl("esri","../../images/pixel.png").uri;},setVisibleLayers:function(_956){_956=this._checkVisibleLayersList(_956);this.visibleLayers=(_956)?_956:[];this.refresh(true);},setImageFormat:function(_957){this.imageFormat=this._getImageFormat(_957);this.refresh(true);},setImageTransparency:function(_958){this.imageTransparency=_958;this.refresh(true);},getImageUrl:function(_959,_95a,_95b,_95c){if(!this.visibleLayers||this.visibleLayers.length===0){_95c(this._blankImageURL);return;}var wkid=_959.spatialReference.wkid;if(_4.some(this._WEB_MERCATOR,function(el){return el==wkid;})){var _95d=_4.filter(this.spatialReferences,function(el){return (_4.some(this._WEB_MERCATOR,function(el2){return el2==el;}));},this);if(_95d.length==0){_95d=_4.filter(this.spatialReferences,function(el){return (_4.some(this._WORLD_MERCATOR,function(el2){return el2==el;}));},this);}if(_95d.length>0){wkid=_95d[0];}else{wkid=this._WEB_MERCATOR[0];}}var list=_4.filter(this.spatialReferences,function(el){return el!==wkid;});this.spatialReferences=list;this.spatialReferences.unshift(wkid);var xmin=_959.xmin;var xmax=_959.xmax;var ymin=_959.ymin;var ymax=_959.ymax;var _95e={};_95e.SERVICE="WMS";_95e.REQUEST="GetMap";_95e.FORMAT=this.imageFormat;_95e.TRANSPARENT=this.imageTransparency?"TRUE":"FALSE";_95e.STYLES="";_95e.VERSION=this.version;_95e.LAYERS=this.visibleLayers?this.visibleLayers.toString():null;_95e.WIDTH=_95a;_95e.HEIGHT=_95b;if(this.maxWidth<_95a){_95e.WIDTH=this.maxWidth;}if(this.maxHeight<_95b){_95e.HEIGHT=this.maxHeight;}var _95f=wkid?wkid:NaN;if(!isNaN(_95f)){if(this.version=="1.3.0"){_95e.CRS="EPSG:"+_95f;}else{_95e.SRS="EPSG:"+_95f;}}if(this.version=="1.3.0"&&this._useLatLong(_95f)){_95e.BBOX=ymin+","+xmin+","+ymax+","+xmax;}else{_95e.BBOX=xmin+","+ymin+","+xmax+","+ymax;}var _960=this.getMapURL;_960+=(_960.indexOf("?")==-1)?"?":"";for(var key in _95e){_960+=(_960.substring(_960.length-1,_960.length)=="?")?"":"&";_960+=key+"="+_95e[key];}_95c(_960);},_initLayer:function(_961,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 _962=this._loadCallback;if(_962){delete this._loadCallback;_962(this);}},_readResourceInfo:function(_963){if(!_963.extent){console.error("esri.layers.WMSLayer: unable to find the 'extent' property in resourceInfo");return;}if(!_963.layerInfos){console.error("esri.layers.WMSLayer: unable to find the 'layerInfos' property in resourceInfo");return;}this.extent=_963.extent;this.allExtents[0]=_963.extent;this.layerInfos=_963.layerInfos;this.description=_963.description?_963.description:"";this.copyright=_963.copyright?_963.copyright:"";this.title=_963.title?_963.title:"";this.getMapURL=_963.getMapURL?_963.getMapURL:this._getCapabilitiesURL;this.version=_963.version?_963.version:"1.3.0";this.maxWidth=_963.maxWidth?_963.maxWidth:5000;this.maxHeight=_963.maxHeight?_963.maxHeight:5000;this.spatialReferences=_963.spatialReferences?_963.spatialReferences:[];this.imageFormat=this._getImageFormat(_963.format);this._initLayer();},_getCapabilities:function(){var _964=this._url.query?this._url.query:{};_964.SERVICE="WMS";_964.REQUEST="GetCapabilities";var uri=this._url.path+"?";for(var key in _964){uri+=(uri.substring(uri.length-1,uri.length)=="?")?"":"&";uri+=key+"="+_964[key];}var _965=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 _966=this._getTag("Service",xml);this.title=this._getTagValue("Title",_966,"");if(!this.title||this.title.length==0){this.title=this._getTagValue("Name",_966,"");}this.copyright=this._getTagValue("AccessConstraints",_966,"");this.description=this._getTagValue("Abstract",_966,"");this.maxWidth=parseInt(this._getTagValue("MaxWidth",_966,5000));this.maxHeight=parseInt(this._getTagValue("MaxHeight",_966,5000));var _967=this._getTag("Layer",xml);if(!_967){this._getCapabilitiesError({"error":{"message":"Response does not contain any layers."}});return;}var _968=this._getLayerInfo(_967);if(_968){this.layerInfos=_968.subLayers;if(!this.layerInfos||this.layerInfos.length==0){this.layerInfos=[_968];}this.extent=_968.extent;this.allExtents=_968.allExtents;this.spatialReferences=_968.spatialReferences;if(this.spatialReferences.length==0&&this.layerInfos.length>0){this.spatialReferences=this.layerInfos[0].spatialReferences;}}this.getMapURL=this._getCapabilitiesURL;var _969=_4.query("DCPType",this._getTag("GetMap",xml));if(_969&&_969.length>0){var _96a=_4.query("HTTP",_969[0]);if(_96a&&_96a.length>0){var _96b=_4.query("Get",_96a[0]);if(_96b&&_96b.length>0){var _96c=this._getAttributeValue("OnlineResource","xlink:href",_96b[0],null);if(_96c){if(_96c.indexOf("&")==(_96c.length-1)){_96c=_96c.substring(0,_96c.length-1);}this.getMapURL=_96c;}}}}this.getMapFormats=[];if(_4.query("Operation",xml).length==0){_4.forEach(_4.query("Format",this._getTag("GetMap",xml)),function(_96d){this.getMapFormats.push(_96d.text?_96d.text:_96d.textContent);},this);}else{_4.forEach(_4.query("Operation",xml),function(_96e){if(_96e.getAttribute("name")=="GetMap"){_4.forEach(_4.query("Format",_96e),function(_96f){this.getMapFormats.push(_96f.text?_96f.text:_96f.textContent);},this);}},this);}if(!_4.some(this.getMapFormats,function(el){return el.indexOf(this.imageFormat)>-1;},this)){this.imageFormat=this.getMapFormats[0];}this._initLayer();},_getCapabilitiesError:function(_970,io){this.onError("GetCapabilities request for "+this._getCapabilitiesURL+" failed. ("+_4.toJson(_970)+")");},_getLayerInfo:function(_971){if(!_971){return null;}var _972=new esri.layers.WMSLayerInfo();_972.name="";_972.title="";_972.description="";_972.allExtents=[];_972.spatialReferences=[];_972.subLayers=[];var _973=this._getTag("LatLonBoundingBox",_971);if(_973){_972.allExtents[0]=this._getExtent(_973,4326);}var _974=this._getTag("EX_GeographicBoundingBox",_971);if(_974){var _975=new esri.geometry.Extent(0,0,0,0,new esri.SpatialReference({wkid:4326}));_975.xmin=parseFloat(this._getTagValue("westBoundLongitude",_974,0));_975.ymin=parseFloat(this._getTagValue("southBoundLatitude",_974,0));_975.xmax=parseFloat(this._getTagValue("eastBoundLongitude",_974,0));_975.ymax=parseFloat(this._getTagValue("northBoundLatitude",_974,0));_972.allExtents[0]=_975;}_972.extent=_972.allExtents[0];var _976=(_4.indexOf(["1.0.0","1.1.0","1.1.1"],this.version)>-1)?"SRS":"CRS";_4.forEach(_971.childNodes,function(_977){if(_977.nodeName=="Name"){_972.name=(_977.text?_977.text:_977.textContent)||"";}else{if(_977.nodeName=="Title"){_972.title=(_977.text?_977.text:_977.textContent)||"";}else{if(_977.nodeName=="Abstract"){_972.description=(_977.text?_977.text:_977.textContent)||"";}else{if(_977.nodeName=="BoundingBox"){srAttr=_977.getAttribute(_976);if(srAttr&&srAttr.indexOf("EPSG:")===0){wkid=parseInt(srAttr.substring(5));if(wkid!==0&&!isNaN(wkid)){var _978;if(this.version=="1.3.0"){_978=this._getExtent(_977,wkid,this._useLatLong(wkid));}else{_978=this._getExtent(_977,wkid);}_972.allExtents[wkid]=_978;if(!_972.extent){_972.extent=_978;}}}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];}_972.allExtents[wkid]=this._getExtent(_977,wkid);}}else{wkid=parseInt(srAttr);if(wkid!==0&&!isNaN(wkid)){_972.allExtents[wkid]=this._getExtent(_977,wkid);}}}}else{if(_977.nodeName==_976){var _979=_977.text?_977.text:_977.textContent;var arr=_979.split(" ");_4.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(!_4.some(_972.spatialReferences,function(el){return (el==val);})){_972.spatialReferences.push(val);}}},this);}else{if(_977.nodeName=="Style"){var _97a=this._getTag("LegendURL",_977);if(_97a){var _97b=this._getTag("OnlineResource",_97a);if(_97b){_972.legendURL=_97b.getAttribute("xlink:href");}}}else{if(_977.nodeName==="Layer"){_972.subLayers.push(this._getLayerInfo(_977));}}}}}}}},this);return _972;},_getImageFormat:function(_97c){var _97d=_97c?_97c.toLowerCase():"";switch(_97d){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 _97e=this.imageFormat?this.imageFormat.toLowerCase():"";switch(_97e){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(_97f,wkid,_980){var _981;if(_97f){_981=new esri.geometry.Extent();var minx=parseFloat(_97f.getAttribute("minx"));var miny=parseFloat(_97f.getAttribute("miny"));var maxx=parseFloat(_97f.getAttribute("maxx"));var maxy=parseFloat(_97f.getAttribute("maxy"));if(_980){_981.xmin=isNaN(miny)?((-1)*Number.MAX_VALUE):miny;_981.ymin=isNaN(minx)?((-1)*Number.MAX_VALUE):minx;_981.xmax=isNaN(maxy)?Number.MAX_VALUE:maxy;_981.ymax=isNaN(maxx)?Number.MAX_VALUE:maxx;}else{_981.xmin=isNaN(minx)?((-1)*Number.MAX_VALUE):minx;_981.ymin=isNaN(miny)?((-1)*Number.MAX_VALUE):miny;_981.xmax=isNaN(maxx)?Number.MAX_VALUE:maxx;_981.ymax=isNaN(maxy)?Number.MAX_VALUE:maxy;}_981.spatialReference=new esri.SpatialReference({wkid:wkid});}return _981;},_useLatLong:function(wkid){var _982;for(var i=0;i<this._REVERSED_LAT_LONG_RANGES.length;i++){var _983=this._REVERSED_LAT_LONG_RANGES[i];if(wkid>=_983[0]&&wkid<=_983[1]){_982=true;break;}}return _982;},_getTag:function(_984,xml){var tags=_4.query(_984,xml);if(tags&&tags.length>0){return tags[0];}else{return null;}},_getTagValue:function(_985,xml,_986){var _987=_4.query(_985,xml);if(_987&&_987.length>0){if(_987[0].text){return _987[0].text;}else{return _987[0].textContent;}}else{return _986;}},_getAttributeValue:function(_988,_989,xml,_98a){var _98b=_4.query(_988,xml);if(_98b&&_98b.length>0){return _98b[0].getAttribute(_989);}else{return _98a;}},_checkVisibleLayersList:function(_98c){if(_98c&&_98c.length>0&&this.layerInfos&&this.layerInfos.length>0){if((typeof _98c[0])=="number"){var list=[];_4.forEach(_98c,function(pos){if(pos<this.layerInfos.length){list.push(this.layerInfos[pos].name);}},this);_98c=list;}}return _98c;},_stripParameters:function(url,_98d){var obj=esri.urlToObject(url);qs=[];for(var prop in obj.query){if(_4.indexOf(_98d,prop.toLowerCase())===-1){qs.push(prop+"="+obj.query[prop]);}}return obj.path+(qs.length?("?"+qs.join("&")):"");}});_4.declare("esri.layers.WMSLayerInfo",null,{name:null,title:null,description:null,extent:null,legendURL:null,subLayers:[],allExtents:[],spatialReferences:[],constructor:function(_98e){if(_98e){this.name=_98e.name;this.title=_98e.title;this.description=_98e.description;this.extent=_98e.extent;this.legendURL=_98e.legendURL;this.subLayers=_98e.subLayers?_98e.subLayers:[];this.allExtents=_98e.allExtents?_98e.allExtents:[];this.spatialReferences=_98e.spatialReferences?_98e.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=[];_4.forEach(this.subLayers,function(_98f){info.subLayers.push(_98f.clone());});info.allExtents=[];for(var wkid in this.allExtents){wkid=parseInt(wkid);if(!isNaN(wkid)){info.allExtents[wkid]=this.allExtents[wkid].getExtent();}}info.spatialReferences=[];_4.forEach(this.spatialReferences,function(wkid){info.spatialReferences.push(wkid);});return info;}});}if(!_4._hasResource["esri.virtualearth.VETiledLayer"]){_4._hasResource["esri.virtualearth.VETiledLayer"]=true;_4.provide("esri.virtualearth.VETiledLayer");_4.declare("esri.virtualearth.VETiledLayer",esri.layers.TiledMapServiceLayer,{constructor:function(_990){try{_990=_4.mixin({bingMapsKey:null,culture:"en-US"},_990||{});var _991=window.location.protocol;if(_991==="file:"){_991="http:";}this.url=_991+"//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})));_4.mixin(this,_990);this._initLayer=_4.hitch(this,this._initLayer);this._errorHandler=_4.hitch(this,this._errorHandler);this._getTileInfo=_4.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,_992){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:_4.mixin({},this._url.query,{token:this.bingMapsKey,style:this.mapStyle,culture:this.culture}),callbackParamName:"callback",load:this._initLayer,error:this._errorHandler});}}},_initLayer:function(_993,io){try{this.resourceInfo=_4.toJson(_993);var _994=_993.imageUri.replace("{","${");this.tileServers=_4.map(_993.subDomains,function(_995){var _996=window.location.protocol;if(_996==="file:"){_996="http:";}return _4.string.substitute(_994,{subdomain:_995}).replace("http:",_996);});this._tsLength=this.tileServers.length;if(!this.loaded){this.loaded=true;this.onLoad(this);var _997=this.loadCallback;if(_997){delete this.loadCallback;_997(this);}}else{this.refresh();}}catch(e){this.onError(e);}},getTileUrl:function(_998,row,col){var _999=this.tileServers[row%this._tsLength],_99a=_999.replace(/\{/g,"${");return _4.string.substitute(_99a,{quadkey:this._getQuadKey(_998,row,col),culture:this.culture,token:this.bingMapsKey});},_getQuadKey:function(_99b,row,col){var _99c="",_99d,mask,i;for(i=_99b;i>0;i--){_99d="0";mask=1<<(i-1);if((col&mask)!=0){_99d++;}if((row&mask)!=0){_99d++;_99d++;}_99c=_99c+_99d;}return _99c;},setMapStyle:function(_99e){this.mapStyle=_99e;this._getTileInfo();},setCulture:function(_99f){this.culture=_99f;this._getTileInfo();},setBingMapsKey:function(_9a0){this.bingMapsKey=_9a0;}});_4.mixin(esri.virtualearth.VETiledLayer,{MAP_STYLE_AERIAL:"aerial",MAP_STYLE_AERIAL_WITH_LABELS:"aerialWithLabels",MAP_STYLE_ROAD:"road"});}if(!_4._hasResource["esri.tasks.geometry"]){_4._hasResource["esri.tasks.geometry"]=true;_4.provide("esri.tasks.geometry");_4.declare("esri.tasks.GeometryService",esri.tasks._Task,{constructor:function(url){var _9a1=_4.hitch;this._projectHandler=_9a1(this,this._projectHandler);this._simplifyHandler=_9a1(this,this._simplifyHandler);this._bufferHandler=_9a1(this,this._bufferHandler);this._areasAndLengthsHandler=_9a1(this,this._areasAndLengthsHandler);this._lengthsHandler=_9a1(this,this._lengthsHandler);this._labelPointsHandler=_9a1(this,this._labelPointsHandler);this._relationHandler=_9a1(this,this._relationHandler);this._convexHullHandler=_9a1(this,this._convexHullHandler);this._unionHandler=_9a1(this,this._unionHandler);this._autoCompleteHandler=_9a1(this,this._autoCompleteHandler);this._reshapeHandler=_9a1(this,this._reshapeHandler);this._cutHandler=_9a1(this,this._cutHandler);this._intersectHandler=_9a1(this,this._intersectHandler);this._differenceHandler=_9a1(this,this._differenceHandler);this._trimExtendHandler=_9a1(this,this._trimExtendHandler);this._densifyHandler=_9a1(this,this._densifyHandler);this._generalizeHandler=_9a1(this,this._densifyHandler);this._offsetHandler=_9a1(this,this._offsetHandler);this._distanceHandler=_9a1(this,this._distanceHandler);},_encodeGeometries:function(_9a2){var gs=[];for(var i=0,il=_9a2.length;i<il;i++){gs.push(_9a2[i].toJson());}return {geometryType:esri.geometry.getJsonType(_9a2[0]),geometries:gs};},_decodeGeometries:function(_9a3,_9a4,sr){var _9a5=esri.geometry.getGeometryType(_9a4),_9a6=_9a3.geometries,fs=[],_9a7={spatialReference:sr.toJson()},_9a8=_4.mixin;_4.forEach(_9a6,function(g,i){fs[i]=new _9a5(_9a8(g,_9a7));});return fs;},_toProjectGeometry:function(_9a9){var sr=_9a9.spatialReference.toJson();if(_9a9 instanceof esri.geometry.Extent){return new esri.geometry.Polygon({rings:[[[_9a9.xmin,_9a9.ymin],[_9a9.xmin,_9a9.ymax],[_9a9.xmax,_9a9.ymax],[_9a9.xmax,_9a9.ymin],[_9a9.xmin,_9a9.ymin]]],spatialReference:sr});}else{return new esri.geometry.Polyline({paths:[[].concat(_9a9.points)],spatialReference:sr});}},_fromProjectedGeometry:function(_9aa,_9ab,_9ac){if(_9ab==="esriGeometryEnvelope"){var ring=_9aa.rings[0];return new esri.geometry.Extent(ring[0][0],ring[0][1],ring[2][0],ring[2][1],_9ac);}else{return new esri.geometry.Multipoint({points:_9aa.paths[0],spatialReference:_9ac.toJson()});}},project:function(_9ad,_9ae,_9af,_9b0){var _9b1=_9ad[0];var _9b2=_4.mixin({},this._url.query,{f:"json",outSR:_9ae.wkid?_9ae.wkid:_4.toJson(_9ae.toJson()),inSR:_9b1.spatialReference.wkid?_9b1.spatialReference.wkid:_4.toJson(_9b1.spatialReference.toJson()),geometries:_4.toJson(this._encodeGeometries(_9ad))}),_9b3=esri.geometry.getJsonType(_9ad[0]),_9b4=this._projectHandler,_9b5=this._errorHandler,dfd=new _4.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/project",content:_9b2,callbackParamName:"callback",load:(function(r,i){_9b4(r,i,_9b3,_9ae,_9af,_9b0,dfd);}),error:(function(r){_9b5(r,_9b0,dfd);})});return dfd;},_projectHandler:function(_9b6,io,_9b7,_9b8,_9b9,_9ba,dfd){try{var fs=this._decodeGeometries(_9b6,_9b7,_9b8);this._successHandler([fs],"onProjectComplete",_9b9,dfd);}catch(err){this._errorHandler(err,_9ba,dfd);}},onProjectComplete:function(){},simplify:function(_9bb,_9bc,_9bd){var _9be=_9bb[0].spatialReference;var _9bf=_4.mixin({},this._url.query,{f:"json",sr:_9be.wkid?_9be.wkid:_4.toJson(_9be.toJson()),geometries:_4.toJson(this._encodeGeometries(_9bb))}),_9c0=esri.geometry.getJsonType(_9bb[0]),_9c1=this._simplifyHandler,_9c2=this._errorHandler,dfd=new _4.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/simplify",content:_9bf,callbackParamName:"callback",load:(function(r,i){_9c1(r,i,_9c0,_9be,_9bc,_9bd,dfd);}),error:(function(r){_9c2(r,_9bd,dfd);})});return dfd;},_simplifyHandler:function(_9c3,io,_9c4,sr,_9c5,_9c6,dfd){try{var fs=this._decodeGeometries(_9c3,_9c4,sr);this._successHandler([fs],"onSimplifyComplete",_9c5,dfd);}catch(err){this._errorHandler(err,_9c6,dfd);}},onSimplifyComplete:function(){},convexHull:function(_9c7,_9c8,_9c9){var _9ca=_9c7[0].spatialReference;var _9cb=_4.mixin({},this._url.query,{f:"json",sr:_4.toJson(_9ca.toJson()),geometries:_4.toJson(this._encodeGeometries(_9c7))}),_9cc=this._convexHullHandler,_9cd=this._errorHandler,dfd=new _4.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/convexHull",content:_9cb,callbackParamName:"callback",load:(function(r,i){_9cc(r,i,_9ca,_9c8,_9c9,dfd);}),error:(function(r){_9cd(r,_9c9,dfd);})});return dfd;},_convexHullHandler:function(_9ce,io,_9cf,_9d0,_9d1,dfd){try{var geom=esri.geometry.fromJson(_9ce.geometry).setSpatialReference(_9cf);this._successHandler([geom],"onConvexHullComplete",_9d0,dfd);}catch(err){this._errorHandler(err,_9d1,dfd);}},onConvexHullComplete:function(){},union:function(_9d2,_9d3,_9d4){var _9d5=_9d2[0].spatialReference;var _9d6=_4.mixin({},this._url.query,{f:"json",sr:_4.toJson(_9d5.toJson()),geometries:_4.toJson(this._encodeGeometries(_9d2))}),_9d7=this._unionHandler,_9d8=this._errorHandler,dfd=new _4.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/union",content:_9d6,callbackParamName:"callback",load:(function(r,i){_9d7(r,i,_9d5,_9d3,_9d4,dfd);}),error:(function(r){_9d8(r,_9d4,dfd);})});return dfd;},_unionHandler:function(_9d9,io,_9da,_9db,_9dc,dfd){try{var geom=esri.geometry.fromJson(_9d9.geometry).setSpatialReference(_9da);this._successHandler([geom],"onUnionComplete",_9db,dfd);}catch(err){this._errorHandler(err,_9dc,dfd);}},onUnionComplete:function(){},autoComplete:function(_9dd,_9de,_9df,_9e0){var _9e1=_9dd[0].spatialReference;var _9e2=_4.mixin({},this._url.query,{f:"json",sr:_4.toJson(_9e1.toJson()),polygons:_4.toJson(this._encodeGeometries(_9dd).geometries),polylines:_4.toJson(this._encodeGeometries(_9de).geometries)}),_9e3=this._autoCompleteHandler,_9e4=this._errorHandler,dfd=new _4.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/autoComplete",content:_9e2,callbackParamName:"callback",load:(function(r,i){_9e3(r,i,_9e1,_9df,_9e0,dfd);}),error:(function(r){_9e4(r,_9e0,dfd);})});return dfd;},_autoCompleteHandler:function(_9e5,io,_9e6,_9e7,_9e8,dfd){try{var Pgon=esri.geometry.Polygon,_9e9=_9e5.geometries,_9ea=[];for(var i=0,il=_9e9.length;i<il;i++){_9ea[i]=new Pgon({spatialReference:_9e6,rings:_9e9[i].rings});}this._successHandler([_9ea],"onAutoCompleteComplete",_9e7,dfd);}catch(err){this._errorHandler(err,_9e8,dfd);}},onAutoCompleteComplete:function(){},reshape:function(_9eb,_9ec,_9ed,_9ee){var _9ef=_9eb.spatialReference;var _9f0=_4.mixin({},this._url.query,{f:"json",sr:_4.toJson(_9ef.toJson()),target:_4.toJson({geometryType:esri.geometry.getJsonType(_9eb),geometry:_9eb.toJson()}),reshaper:_4.toJson(_9ec.toJson())}),_9f1=this._reshapeHandler,_9f2=this._errorHandler,dfd=new _4.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/reshape",content:_9f0,callbackParamName:"callback",load:(function(r,i){_9f1(r,i,_9ef,_9ed,_9ee,dfd);}),error:(function(r){_9f2(r,_9ee,dfd);})});return dfd;},_reshapeHandler:function(_9f3,io,_9f4,_9f5,_9f6,dfd){try{var geom=esri.geometry.fromJson(_9f3.geometry).setSpatialReference(_9f4);this._successHandler([geom],"onReshapeComplete",_9f5,dfd);}catch(err){this._errorHandler(err,_9f6,dfd);}},onReshapeComplete:function(){},cut:function(_9f7,_9f8,_9f9,_9fa){var _9fb=_9f7[0].spatialReference;var _9fc=_4.map(_9f7,function(_9fd){return _9fd.toJson();});var _9fe=_4.mixin({},this._url.query,{f:"json",sr:_4.toJson(_9fb.toJson()),target:_4.toJson({geometryType:esri.geometry.getJsonType(_9f7[0]),geometries:_9fc}),cutter:_4.toJson(_9f8.toJson())}),_9ff=this._cutHandler,_a00=this._errorHandler,dfd=new _4.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/cut",content:_9fe,callbackParamName:"callback",load:(function(r,i){_9ff(r,i,_9fb,_9f9,_9fa,dfd);}),error:(function(r){_a00(r,_9fa,dfd);})});return dfd;},_cutHandler:function(_a01,io,_a02,_a03,_a04,dfd){try{var _a05=_a01.geometries;var _a06={};_a06.cutIndexes=_a01.cutIndexes;_a06.geometries=[];_4.forEach(_a05,function(geom){_a06.geometries.push(esri.geometry.fromJson(geom).setSpatialReference(_a02));});this._successHandler([_a06],"onCutComplete",_a03,dfd);}catch(err){this._errorHandler(err,_a04,dfd);}},onCutComplete:function(){},intersect:function(_a07,_a08,_a09,_a0a){var _a0b=_a07[0].spatialReference;var _a0c=_4.mixin({},this._url.query,{f:"json",sr:_4.toJson(_a0b.toJson()),geometries:_4.toJson(this._encodeGeometries(_a07)),geometry:_4.toJson({geometryType:esri.geometry.getJsonType(_a08),geometry:_a08.toJson()})}),_a0d=this._intersectHandler,_a0e=this._errorHandler,dfd=new _4.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/intersect",content:_a0c,callbackParamName:"callback",load:(function(r,i){_a0d(r,i,_a0b,_a09,_a0a,dfd);}),error:(function(r){_a0e(r,_a0a,dfd);})});return dfd;},_intersectHandler:function(_a0f,io,_a10,_a11,_a12,dfd){try{var _a13=_a0f.geometries,_a14=[];_4.forEach(_a13,function(geom){_a14.push(esri.geometry.fromJson(geom).setSpatialReference(_a10));});this._successHandler([_a14],"onIntersectComplete",_a11,dfd);}catch(err){this._errorHandler(err,_a12,dfd);}},onIntersectComplete:function(){},difference:function(_a15,_a16,_a17,_a18){var _a19=_a15[0].spatialReference;var _a1a=_4.mixin({},this._url.query,{f:"json",sr:_4.toJson(_a19.toJson()),geometries:_4.toJson(this._encodeGeometries(_a15)),geometry:_4.toJson({geometryType:esri.geometry.getJsonType(_a16),geometry:_a16.toJson()})}),_a1b=this._differenceHandler,_a1c=this._errorHandler,dfd=new _4.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/difference",content:_a1a,callbackParamName:"callback",load:(function(r,i){_a1b(r,i,_a19,_a17,_a18,dfd);}),error:(function(r){_a1c(r,_a18,dfd);})});return dfd;},_differenceHandler:function(_a1d,io,_a1e,_a1f,_a20,dfd){try{var _a21=_a1d.geometries,_a22=[];_4.forEach(_a21,function(geom){_a22.push(esri.geometry.fromJson(geom).setSpatialReference(_a1e));});this._successHandler([_a22],"onDifferenceComplete",_a1f,dfd);}catch(err){this._errorHandler(err,_a20,dfd);}},onDifferenceComplete:function(){},buffer:function(_a23,_a24,_a25){var _a26=_4.mixin({},this._url.query,{f:"json"},_a23.toJson()),sr=_a23.outSpatialReference||_a23.geometries[0].spatialReference,_a27=this._bufferHandler,_a28=this._errorHandler,dfd=new _4.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/buffer",content:_a26,callbackParamName:"callback",load:(function(r,i){_a27(r,i,sr,_a24,_a25,dfd);}),error:(function(r){_a28(r,_a25,dfd);})});return dfd;},_bufferHandler:function(_a29,io,sr,_a2a,_a2b,dfd){try{var Pgon=esri.geometry.Polygon,_a2c=_a29.geometries,_a2d=[];for(var i=0,il=_a2c.length;i<il;i++){_a2d[i]=new Pgon({spatialReference:sr,rings:_a2c[i].rings});}this._successHandler([_a2d],"onBufferComplete",_a2a,dfd);}catch(err){this._errorHandler(err,_a2b,dfd);}},onBufferComplete:function(){},areasAndLengths:function(_a2e,_a2f,_a30){var _a31=_4.mixin({},this._url.query,{f:"json"},_a2e.toJson()),_a32=this._areasAndLengthsHandler,_a33=this._errorHandler,dfd=new _4.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/areasAndLengths",content:_a31,callbackParamName:"callback",load:(function(r,i){_a32(r,i,_a2f,_a30,dfd);}),error:(function(r){_a33(r,_a30,dfd);})});return dfd;},_areasAndLengthsHandler:function(_a34,io,_a35,_a36,dfd){try{this._successHandler([_a34],"onAreasAndLengthsComplete",_a35,dfd);}catch(err){this._errorHandler(err,_a36,dfd);}},onAreasAndLengthsComplete:function(){},lengths:function(_a37,_a38,_a39){var _a3a=_4.mixin({},this._url.query,{f:"json"},_a37.toJson()),_a3b=this._lengthsHandler,_a3c=this._errorHandler,dfd=new _4.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/lengths",content:_a3a,callbackParamName:"callback",load:(function(r,i){_a3b(r,i,_a38,_a39,dfd);}),error:(function(r){_a3c(r,_a39,dfd);})});return dfd;},_lengthsHandler:function(_a3d,io,_a3e,_a3f,dfd){try{this._successHandler([_a3d],"onLengthsComplete",_a3e,dfd);}catch(err){this._errorHandler(err,_a3f,dfd);}},onLengthsComplete:function(){},labelPoints:function(_a40,_a41,_a42){var _a43=_4.map(_a40,function(geom){return geom.toJson();});var sr=_a40[0].spatialReference,_a44=_4.mixin({},this._url.query,{f:"json",sr:sr.wkid?sr.wkid:_4.toJson(sr.toJson()),polygons:_4.toJson(_a43)}),_a45=this._labelPointsHandler,_a46=this._errorHandler,dfd=new _4.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/labelPoints",content:_a44,callbackParamName:"callback",load:(function(r,i){_a45(r,i,_a40,sr,_a41,_a42,dfd);}),error:(function(r){_a46(r,_a42,dfd);})});return dfd;},_labelPointsHandler:function(_a47,io,_a48,sr,_a49,_a4a,dfd){try{var _a4b=_a47.labelPoints,_a4c=[];_4.forEach(_a4b,function(geom){_a4c.push(esri.geometry.fromJson(geom).setSpatialReference(sr));});this._successHandler([_a4c],"onLabelPointsComplete",_a49,dfd);}catch(err){this._errorHandler(err,_a4a,dfd);}},onLabelPointsComplete:function(){},relation:function(_a4d,_a4e,_a4f){var _a50=_4.mixin({},this._url.query,{f:"json"},_a4d.toJson()),_a51=this._relationHandler,_a52=this._errorHandler,dfd=new _4.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/relation",content:_a50,callbackParamName:"callback",load:(function(r,i){_a51(r,i,_a4e,_a4f,dfd);}),error:(function(r){_a52(r,_a4f,dfd);})});return dfd;},_relationHandler:function(_a53,io,_a54,_a55,dfd){try{var _a56=_a53.relations;this._successHandler([_a56],"onRelationComplete",_a54,dfd);}catch(err){this._errorHandler(err,_a55,dfd);}},onRelationComplete:function(){},trimExtend:function(_a57,_a58,_a59){var _a5a=_4.mixin({},this._url.query,{f:"json"},_a57.toJson()),_a5b=_a57.sr,_a5c=this._trimExtendHandler,_a5d=this._errorHandler,dfd=new _4.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/trimExtend",content:_a5a,callbackParamName:"callback",load:(function(r,i){_a5c(r,i,_a5b,_a58,_a59,dfd);}),error:(function(r){_a5d(r,_a59,dfd);})});return dfd;},_trimExtendHandler:function(_a5e,io,_a5f,_a60,_a61,dfd){try{var _a62=esri.geometry.Polyline,_a63=_a5e.geometries,_a64=[];for(var i=0,il=_a63.length;i<il;i++){_a64[i]=new _a62({spatialReference:_a5f,paths:_a63[i].paths});}this._successHandler([_a64],"onTrimExtendComplete",_a60,dfd);}catch(err){this._errorHandler(err,_a61,dfd);}},onTrimExtendComplete:function(){},densify:function(_a65,_a66,_a67){var _a68=_4.mixin({},this._url.query,{f:"json"},_a65.toJson()),_a69=_a65.geometries[0].spatialReference,_a6a=this._densifyHandler,_a6b=this._errorHandler,dfd=new _4.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/densify",content:_a68,callbackParamName:"callback",load:(function(r,i){_a6a(r,i,_a69,_a66,_a67,dfd);}),error:(function(r){_a6b(r,_a67,dfd);})});return dfd;},_densifyHandler:function(_a6c,io,_a6d,_a6e,_a6f,dfd){try{var _a70=_a6c.geometries,_a71=[];_4.forEach(_a70,function(geom){_a71.push(esri.geometry.fromJson(geom).setSpatialReference(_a6d));});this._successHandler([_a71],"onDensifyComplete",_a6e,dfd);}catch(err){this._errorHandler(err,_a6f,dfd);}},onDensifyComplete:function(){},generalize:function(_a72,_a73,_a74){var _a75=_4.mixin({},this._url.query,{f:"json"},_a72.toJson()),_a76=_a72.geometries[0].spatialReference,_a77=this._generalizeHandler,_a78=this._errorHandler,dfd=new _4.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/generalize",content:_a75,callbackParamName:"callback",load:(function(r,i){_a77(r,i,_a76,_a73,_a74,dfd);}),error:(function(r){_a78(r,_a74,dfd);})});return dfd;},_generalizeHandler:function(_a79,io,_a7a,_a7b,_a7c,dfd){try{var _a7d=_a79.geometries,_a7e=[];_4.forEach(_a7d,function(geom){_a7e.push(esri.geometry.fromJson(geom).setSpatialReference(_a7a));});this._successHandler([_a7e],"onGeneralizeComplete",_a7b,dfd);}catch(err){this._errorHandler(err,_a7c,dfd);}},onGeneralizeComplete:function(){},offset:function(_a7f,_a80,_a81){var _a82=_4.mixin({},this._url.query,{f:"json"},_a7f.toJson()),_a83=_a7f.geometries[0].spatialReference,_a84=this._offsetHandler,_a85=this._errorHandler,dfd=new _4.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/offset",content:_a82,callbackParamName:"callback",load:(function(r,i){_a84(r,i,_a83,_a80,_a81,dfd);}),error:(function(r){_a85(r,_a81,dfd);})});return dfd;},_offsetHandler:function(_a86,io,_a87,_a88,_a89,dfd){try{var _a8a=_a86.geometries,_a8b=[];_4.forEach(_a8a,function(geom){_a8b.push(esri.geometry.fromJson(geom).setSpatialReference(_a87));});this._successHandler([_a8b],"onOffsetComplete",_a88,dfd);}catch(err){this._errorHandler(err,_a89,dfd);}},onOffsetComplete:function(){},distance:function(_a8c,_a8d,_a8e){var _a8f=_4.mixin({},this._url.query,{f:"json"},_a8c.toJson()),_a90=_a8c.geometry1.spatialReference,_a91=this._distanceHandler,_a92=this._errorHandler,dfd=new _4.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path+"/distance",content:_a8f,callbackParamName:"callback",load:(function(r,i){_a91(r,i,_a90,_a8d,_a8e,dfd);}),error:(function(r){_a92(r,_a8e,dfd);})});return dfd;},_distanceHandler:function(_a93,io,_a94,_a95,_a96,dfd){try{_a93=_a93&&_a93.distance;this._successHandler([_a93],"onDistanceComplete",_a95,dfd);}catch(err){this._errorHandler(err,_a96,dfd);}},onDistanceComplete:function(){}});_4.declare("esri.tasks.TrimExtendParameters",null,{polylines:null,trimExtendTo:null,extendHow:null,toJson:function(){var _a97=_4.map(this.polylines,function(geom){return geom.toJson();});var json={};json.polylines=_4.toJson(_a97);json.trimExtendTo=_4.toJson(this.trimExtendTo.toJson());json.sr=_4.toJson(this.polylines[0].spatialReference.toJson());json.extendHow=this.extendHow||0;return json;}});_4.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});_4.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,_a98=this.outSpatialReference,_a99=this.bufferSpatialReference;var _a9a=_4.map(this.geometries,function(geom){geom=(geom.type==="extent")?this._extentToPolygon(geom):geom;return geom.toJson();},this);var _a9b=this.geometries;if(_a9b&&_a9b.length>0){var _a9c=_a9b[0].type==="extent"?"esriGeometryPolygon":esri.geometry.getJsonType(_a9b[0]);json.geometries=_4.toJson({geometryType:_a9c,geometries:_a9a});json.inSR=_a9b[0].spatialReference.wkid?_a9b[0].spatialReference.wkid:_4.toJson(_a9b[0].spatialReference.toJson());}if(dt){json.distances=dt.join(",");}if(_a98){json.outSR=_a98.wkid?_a98.wkid:_4.toJson(_a98.toJson());}if(_a99){json.bufferSR=_a99.wkid?_a99.wkid:_4.toJson(_a99.toJson());}return json;},_extentToPolygon:function(_a9d){var xmin=_a9d.xmin,ymin=_a9d.ymin,xmax=_a9d.xmax,ymax=_a9d.ymax;return new esri.geometry.Polygon({"rings":[[[xmin,ymin],[xmin,ymax],[xmax,ymax],[xmax,ymin],[xmin,ymin]]],"spatialReference":_a9d.spatialReference.toJson()});}});_4.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"});_4.declare("esri.tasks.AreasAndLengthsParameters",null,{polygons:null,lengthUnit:null,areaUnit:null,toJson:function(){var _a9e=_4.map(this.polygons,function(geom){return geom.toJson();});var json={};json.polygons=_4.toJson(_a9e);var _a9f=this.polygons[0].spatialReference;json.sr=_a9f.wkid?_a9f.wkid:_4.toJson(_a9f.toJson());if(this.lengthUnit){json.lengthUnit=this.lengthUnit;}if(this.areaUnit){if(_4.isString(this.areaUnit)){json.areaUnit=_4.toJson({"areaUnit":this.areaUnit});}else{json.areaUnit=this.areaUnit;}}return json;}});_4.declare("esri.tasks.LengthsParameters",null,{polylines:null,lengthUnit:null,geodesic:null,toJson:function(){var _aa0=_4.map(this.polylines,function(geom){return geom.toJson();});var json={};json.polylines=_4.toJson(_aa0);var _aa1=this.polylines[0].spatialReference;json.sr=_aa1.wkid?_aa1.wkid:_4.toJson(_aa1.toJson());if(this.lengthUnit){json.lengthUnit=this.lengthUnit;}if(this.geodesic){json.geodesic=this.geodesic;}return json;}});_4.declare("esri.tasks.RelationParameters",null,{geometries1:null,geometries2:null,relation:null,relationParam:null,toJson:function(){var _aa2=_4.map(this.geometries1,function(geom){return geom.toJson();});var _aa3=_4.map(this.geometries2,function(geom){return geom.toJson();});var json={};var _aa4=this.geometries1;if(_aa4&&_aa4.length>0){json.geometries1=_4.toJson({geometryType:esri.geometry.getJsonType(_aa4[0]),geometries:_aa2});var _aa5=this.geometries1[0].spatialReference;json.sr=_aa5.wkid?_aa5.wkid:_4.toJson(_aa5.toJson());}var _aa6=this.geometries2;if(_aa6&&_aa6.length>0){json.geometries2=_4.toJson({geometryType:esri.geometry.getJsonType(_aa6[0]),geometries:_aa3});}if(this.relation){json.relation=this.relation;}if(this.relationParam){json.relationParam=_4.toJson(this.relationParam);}return json;}});_4.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"});_4.declare("esri.tasks.DensifyParameters",null,{geometries:null,geodesic:null,lengthUnit:null,maxSegmentLength:null,toJson:function(){var _aa7=_4.map(this.geometries,function(geom){return geom.toJson();});var json={};if(this.geometries&&this.geometries.length>0){json.geometries=_4.toJson({geometryType:esri.geometry.getJsonType(this.geometries[0]),geometries:_aa7});json.sr=_4.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;}});_4.declare("esri.tasks.GeneralizeParameters",null,{geometries:null,deviationUnit:null,maxDeviation:null,toJson:function(){var _aa8=_4.map(this.geometries,function(geom){return geom.toJson();});var json={};if(this.geometries&&this.geometries.length>0){json.geometries=_4.toJson({geometryType:esri.geometry.getJsonType(this.geometries[0]),geometries:_aa8});json.sr=_4.toJson(this.geometries[0].spatialReference.toJson());}if(this.deviationUnit){json.deviationUnit=this.deviationUnit;}if(this.maxDeviation){json.maxDeviation=this.maxDeviation;}return json;}});_4.declare("esri.tasks.OffsetParameters",null,{geometries:null,bevelRatio:null,offsetDistance:null,offsetHow:null,offsetUnit:null,toJson:function(){var _aa9=_4.map(this.geometries,function(geom){return geom.toJson();});var json={};if(this.geometries&&this.geometries.length>0){json.geometries=_4.toJson({geometryType:esri.geometry.getJsonType(this.geometries[0]),geometries:_aa9});json.sr=_4.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;}});_4.mixin(esri.tasks.OffsetParameters,{OFFSET_BEVELLED:"esriGeometryOffsetBevelled",OFFSET_MITERED:"esriGeometryOffsetMitered",OFFSET_ROUNDED:"esriGeometryOffsetRounded"});_4.declare("esri.tasks.DistanceParameters",null,{geometry1:null,geometry2:null,distanceUnit:null,geodesic:null,toJson:function(){var json={};var _aaa=this.geometry1;if(_aaa){json.geometry1=_4.toJson({geometryType:esri.geometry.getJsonType(_aaa),geometry:_aaa});}var _aab=this.geometry2;if(_aab){json.geometry2=_4.toJson({geometryType:esri.geometry.getJsonType(_aab),geometry:_aab});}json.sr=_4.toJson(this.geometry1.spatialReference.toJson());if(this.distanceUnit){json.distanceUnit=this.distanceUnit;}if(this.geodesic){json.geodesic=this.geodesic;}return json;}});}if(!_4._hasResource["dojo.DeferredList"]){_4._hasResource["dojo.DeferredList"]=true;_4.provide("dojo.DeferredList");_4.DeferredList=function(list,_aac,_aad,_aae,_aaf){var _ab0=[];_4.Deferred.call(this);var self=this;if(list.length===0&&!_aac){this.resolve([0,[]]);}var _ab1=0;_4.forEach(list,function(item,i){item.then(function(_ab2){if(_aac){self.resolve([i,_ab2]);}else{_ab3(true,_ab2);}},function(_ab4){if(_aad){self.reject(_ab4);}else{_ab3(false,_ab4);}if(_aae){return null;}throw _ab4;});function _ab3(_ab5,_ab6){_ab0[i]=[_ab5,_ab6];_ab1++;if(_ab1===list.length){self.resolve(_ab0);}};});};_4.DeferredList.prototype=new _4.Deferred();_4.DeferredList.prototype.gatherResults=function(_ab7){var d=new _4.DeferredList(_ab7,false,true,false);d.addCallback(function(_ab8){var ret=[];_4.forEach(_ab8,function(_ab9){ret.push(_ab9[1]);});return ret;});return d;};}if(!_4._hasResource["dojo.data.util.filter"]){_4._hasResource["dojo.data.util.filter"]=true;_4.provide("dojo.data.util.filter");_4.getObject("data.util.filter",true,_4);_4.data.util.filter.patternToRegExp=function(_aba,_abb){var rxp="^";var c=null;for(var i=0;i<_aba.length;i++){c=_aba.charAt(i);switch(c){case "\\":rxp+=c;i++;rxp+=_aba.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(_abb){return new RegExp(rxp,"mi");}else{return new RegExp(rxp,"m");}};}if(!_4._hasResource["dojo.data.util.sorter"]){_4._hasResource["dojo.data.util.sorter"]=true;_4.provide("dojo.data.util.sorter");_4.getObject("data.util.sorter",true,_4);_4.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;};_4.data.util.sorter.createSortFunction=function(_abc,_abd){var _abe=[];function _abf(attr,dir,comp,s){return function(_ac0,_ac1){var a=s.getValue(_ac0,attr);var b=s.getValue(_ac1,attr);return dir*comp(a,b);};};var _ac2;var map=_abd.comparatorMap;var bc=_4.data.util.sorter.basicComparator;for(var i=0;i<_abc.length;i++){_ac2=_abc[i];var attr=_ac2.attribute;if(attr){var dir=(_ac2.descending)?-1:1;var comp=bc;if(map){if(typeof attr!=="string"&&("toString" in attr)){attr=attr.toString();}comp=map[attr]||bc;}_abe.push(_abf(attr,dir,comp,_abd));}}return function(rowA,rowB){var i=0;while(i<_abe.length){var ret=_abe[i++](rowA,rowB);if(ret!==0){return ret;}}return 0;};};}if(!_4._hasResource["dojo.data.util.simpleFetch"]){_4._hasResource["dojo.data.util.simpleFetch"]=true;_4.provide("dojo.data.util.simpleFetch");_4.getObject("data.util.simpleFetch",true,_4);_4.data.util.simpleFetch.fetch=function(_ac3){_ac3=_ac3||{};if(!_ac3.store){_ac3.store=this;}var self=this;var _ac4=function(_ac5,_ac6){if(_ac6.onError){var _ac7=_ac6.scope||_4.global;_ac6.onError.call(_ac7,_ac5,_ac6);}};var _ac8=function(_ac9,_aca){var _acb=_aca.abort||null;var _acc=false;var _acd=_aca.start?_aca.start:0;var _ace=(_aca.count&&(_aca.count!==Infinity))?(_acd+_aca.count):_ac9.length;_aca.abort=function(){_acc=true;if(_acb){_acb.call(_aca);}};var _acf=_aca.scope||_4.global;if(!_aca.store){_aca.store=self;}if(_aca.onBegin){_aca.onBegin.call(_acf,_ac9.length,_aca);}if(_aca.sort){_ac9.sort(_4.data.util.sorter.createSortFunction(_aca.sort,self));}if(_aca.onItem){for(var i=_acd;(i<_ac9.length)&&(i<_ace);++i){var item=_ac9[i];if(!_acc){_aca.onItem.call(_acf,item,_aca);}}}if(_aca.onComplete&&!_acc){var _ad0=null;if(!_aca.onItem){_ad0=_ac9.slice(_acd,_ace);}_aca.onComplete.call(_acf,_ad0,_aca);}};this._fetchItems(_ac3,_ac8,_ac4);return _ac3;};}if(!_4._hasResource["dojox.data.CsvStore"]){_4._hasResource["dojox.data.CsvStore"]=true;_4.provide("dojox.data.CsvStore");_4.declare("dojox.data.CsvStore",null,{constructor:function(_ad1){this._attributes=[];this._attributeIndexes={};this._dataArray=[];this._arrayOfAllItems=[];this._loadFinished=false;if(_ad1.url){this.url=_ad1.url;}this._csvData=_ad1.data;if(_ad1.label){this.label=_ad1.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=_ad1.identifier;if(this.identifier===""){delete this.identifier;}else{this._idMap={};}if("separator" in _ad1){this.separator=_ad1.separator;}if("urlPreventCache" in _ad1){this.urlPreventCache=_ad1.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,_ad2,_ad3){this._assertIsItem(item);var _ad4=_ad3;if(typeof _ad2==="string"){var ai=this._attributeIndexes[_ad2];if(ai!=null){var _ad5=this._dataArray[this._getIndex(item)];_ad4=_ad5[ai]||_ad3;}}else{throw new Error(this.declaredClass+": a function was passed an attribute argument that was not a string");}return _ad4;},getValues:function(item,_ad6){var _ad7=this.getValue(item,_ad6);return (_ad7?[_ad7]:[]);},getAttributes:function(item){this._assertIsItem(item);var _ad8=[];var _ad9=this._dataArray[this._getIndex(item)];for(var i=0;i<_ad9.length;i++){if(_ad9[i]!==""){_ad8.push(this._attributes[i]);}}return _ad8;},hasAttribute:function(item,_ada){this._assertIsItem(item);if(typeof _ada==="string"){var _adb=this._attributeIndexes[_ada];var _adc=this._dataArray[this._getIndex(item)];return (typeof _adb!=="undefined"&&_adb<_adc.length&&_adc[_adb]!=="");}else{throw new Error(this.declaredClass+": a function was passed an attribute argument that was not a string");}},containsValue:function(item,_add,_ade){var _adf=undefined;if(typeof _ade==="string"){_adf=_4.data.util.filter.patternToRegExp(_ade,false);}return this._containsValue(item,_add,_ade,_adf);},_containsValue:function(item,_ae0,_ae1,_ae2){var _ae3=this.getValues(item,_ae0);for(var i=0;i<_ae3.length;++i){var _ae4=_ae3[i];if(typeof _ae4==="string"&&_ae2){return (_ae4.match(_ae2)!==null);}else{if(_ae1===_ae4){return true;}}}return false;},isItem:function(_ae5){if(_ae5&&_ae5[this._storeProp]===this){var _ae6=_ae5[this._idProp];if(this.identifier){var data=this._dataArray[this._idMap[_ae6]];if(data){return true;}}else{if(_ae6>=0&&_ae6<this._dataArray.length){return true;}}}return false;},isItemLoaded:function(_ae7){return this.isItem(_ae7);},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(_ae8,_ae9,_aea){var self=this;var _aeb=function(_aec,_aed){var _aee=null;if(_aec.query){var key,_aef;_aee=[];var _af0=_aec.queryOptions?_aec.queryOptions.ignoreCase:false;var _af1={};for(key in _aec.query){_aef=_aec.query[key];if(typeof _aef==="string"){_af1[key]=_4.data.util.filter.patternToRegExp(_aef,_af0);}}for(var i=0;i<_aed.length;++i){var _af2=true;var _af3=_aed[i];for(key in _aec.query){_aef=_aec.query[key];if(!self._containsValue(_af3,key,_aef,_af1[key])){_af2=false;}}if(_af2){_aee.push(_af3);}}}else{_aee=_aed.slice(0,_aed.length);}_ae9(_aee,_aec);};if(this._loadFinished){_aeb(_ae8,this._arrayOfAllItems);}else{if(this.url!==""){if(this._loadInProgress){this._queuedFetches.push({args:_ae8,filter:_aeb});}else{this._loadInProgress=true;var _af4={url:self.url,handleAs:"text",preventCache:self.urlPreventCache};var _af5=_4.xhrGet(_af4);_af5.addCallback(function(data){try{self._processData(data);_aeb(_ae8,self._arrayOfAllItems);self._handleQueuedFetches();}catch(e){_aea(e,_ae8);}});_af5.addErrback(function(_af6){self._loadInProgress=false;if(_aea){_aea(_af6,_ae8);}else{throw _af6;}});var _af7=null;if(_ae8.abort){_af7=_ae8.abort;}_ae8.abort=function(){var df=_af5;if(df&&df.fired===-1){df.cancel();df=null;}if(_af7){_af7.call(_ae8);}};}}else{if(this._csvData){try{this._processData(this._csvData);this._csvData=null;_aeb(_ae8,this._arrayOfAllItems);}catch(e){_aea(e,_ae8);}}else{var _af8=new Error(this.declaredClass+": No CSV source data was provided as either URL or String data input.");if(_aea){_aea(_af8,_ae8);}else{throw _af8;}}}}},close:function(_af9){},_getArrayOfArraysFromCsvFileContents:function(_afa){if(_4.isString(_afa)){var _afb=new RegExp("^\\s+","g");var _afc=new RegExp("\\s+$","g");var _afd=new RegExp("\"\"","g");var _afe=[];var i;var _aff=this._splitLines(_afa);for(i=0;i<_aff.length;++i){var _b00=_aff[i];if(_b00.length>0){var _b01=_b00.split(this.separator);var j=0;while(j<_b01.length){var _b02=_b01[j];var _b03=_b02.replace(_afb,"");var _b04=_b03.replace(_afc,"");var _b05=_b04.charAt(0);var _b06=_b04.charAt(_b04.length-1);var _b07=_b04.charAt(_b04.length-2);var _b08=_b04.charAt(_b04.length-3);if(_b04.length===2&&_b04=="\"\""){_b01[j]="";}else{if((_b05=="\"")&&((_b06!="\"")||((_b06=="\"")&&(_b07=="\"")&&(_b08!="\"")))){if(j+1===_b01.length){return;}var _b09=_b01[j+1];_b01[j]=_b03+this.separator+_b09;_b01.splice(j+1,1);}else{if((_b05=="\"")&&(_b06=="\"")){_b04=_b04.slice(1,(_b04.length-1));_b04=_b04.replace(_afd,"\"");}_b01[j]=_b04;j+=1;}}}_afe.push(_b01);}}this._attributes=_afe.shift();for(i=0;i<this._attributes.length;i++){this._attributeIndexes[this._attributes[i]]=i;}this._dataArray=_afe;}},_splitLines:function(_b0a){var _b0b=[];var i;var line="";var _b0c=false;for(i=0;i<_b0a.length;i++){var c=_b0a.charAt(i);switch(c){case "\"":_b0c=!_b0c;line+=c;break;case "\r":if(_b0c){line+=c;}else{_b0b.push(line);line="";if(i<(_b0a.length-1)&&_b0a.charAt(i+1)=="\n"){i++;}}break;case "\n":if(_b0c){line+=c;}else{_b0b.push(line);line="";}break;default:line+=c;}}if(line!==""){_b0b.push(line);}return _b0b;},_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 _b0d=this._dataArray[i];id=_b0d[this._attributeIndexes[this.identifier]];this._idMap[id]=i;}this._arrayOfAllItems.push(this._createItemFromIdentity(id));}this._loadFinished=true;this._loadInProgress=false;},_createItemFromIdentity:function(_b0e){var item={};item[this._storeProp]=this;item[this._idProp]=_b0e;return item;},getIdentity:function(item){if(this.isItem(item)){return item[this._idProp];}return null;},fetchItemByIdentity:function(_b0f){var item;var _b10=_b0f.scope?_b0f.scope:_4.global;if(!this._loadFinished){var self=this;if(this.url!==""){if(this._loadInProgress){this._queuedFetches.push({args:_b0f});}else{this._loadInProgress=true;var _b11={url:self.url,handleAs:"text"};var _b12=_4.xhrGet(_b11);_b12.addCallback(function(data){try{self._processData(data);var item=self._createItemFromIdentity(_b0f.identity);if(!self.isItem(item)){item=null;}if(_b0f.onItem){_b0f.onItem.call(_b10,item);}self._handleQueuedFetches();}catch(error){if(_b0f.onError){_b0f.onError.call(_b10,error);}}});_b12.addErrback(function(_b13){this._loadInProgress=false;if(_b0f.onError){_b0f.onError.call(_b10,_b13);}});}}else{if(this._csvData){try{self._processData(self._csvData);self._csvData=null;item=self._createItemFromIdentity(_b0f.identity);if(!self.isItem(item)){item=null;}if(_b0f.onItem){_b0f.onItem.call(_b10,item);}}catch(e){if(_b0f.onError){_b0f.onError.call(_b10,e);}}}}}else{item=this._createItemFromIdentity(_b0f.identity);if(!this.isItem(item)){item=null;}if(_b0f.onItem){_b0f.onItem.call(_b10,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 _b14=this._queuedFetches[i];var _b15=_b14.filter;var _b16=_b14.args;if(_b15){_b15(_b16,this._arrayOfAllItems);}else{this.fetchItemByIdentity(_b14.args);}}this._queuedFetches=[];}}});_4.extend(_6.data.CsvStore,_4.data.util.simpleFetch);}if(!_4._hasResource["esri.arcgis.csv"]){_4._hasResource["esri.arcgis.csv"]=true;_4.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(_b17){var _b18=new _4.Deferred();var _b19=function(_b1a){_b18.callback(_b1a);};var _b1b=esri.request({url:_b17.url,handleAs:"text",load:function(_b1c){EAC._processCsvData(_b1c,_b17,_4.hitch(this,_b19));},error:function(_b1d){console.error("error: "+_b1d);}},{usePost:false});return _b18;};EAC.projectFeatureCollection=function(_b1e,_b1f){var _b20=new _4.Deferred();var _b21=function(_b22){_b20.callback(_b22);};EAC._projectFeatureSet(_b1e,new esri.SpatialReference({wkid:4326}),_b1f,_4.hitch(this,_b21));return _b20;};EAC.generateDefaultPopupInfo=function(_b23){var _b24=_b23.layerDefinition.fields;var _b25={"esriFieldTypeDouble":1,"esriFieldTypeSingle":1};var _b26={"esriFieldTypeInteger":1,"esriFieldTypeSmallInteger":1};var dt={"esriFieldTypeDate":1};var _b27=null;var _b28=_4.map(_b24,_4.hitch(this,function(item){if(item.name.toUpperCase()==="NAME"){_b27=item.name;}var _b29=(item.type!=="esriFieldTypeOID"&&item.type!=="esriFieldTypeGlobalID"&&item.type!=="esriFieldTypeGeometry");var _b2a=null;if(_b29){var f=item.name.toLowerCase();var _b2b=",stretched value,fnode_,tnode_,lpoly_,rpoly_,poly_,subclass,subclass_,rings_ok,rings_nok,";if(_b2b.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)){_b29=false;}if(item.type in _b26){_b2a={places:0,digitSeparator:true};}else{if(item.type in _b25){_b2a={places:2,digitSeparator:true};}else{if(item.type in dt){_b2a={dateFormat:"shortDateShortTime"};}}}}return _4.mixin({},{fieldName:item.name,label:item.alias,isEditable:true,tooltip:"",visible:_b29,format:_b2a,stringFieldOption:"textbox"});}));var _b2c={title:_b27?"{"+_b27+"}":"",fieldInfos:_b28,description:null,showAttachments:false,mediaInfos:[]};return _b2c;};EAC._processCsvData=function(data,_b2d,_b2e){var _b2f=data.indexOf("\n");var _b30=_4.trim(data.substr(0,_b2f));var _b31=_b2d.columnDelimiter;if(!_b31){_b31=EAC._getSeparator(_b30);}var _b32=new _6.data.CsvStore({data:data,separator:_b31});var _b33=(_4.isIE<9)?750:1001;_b32.fetch({start:0,count:_b33,onComplete:function(_b34,_b35){var _b36=0;var _b37={"layerDefinition":_b2d.layerDefinition,"featureSet":{"features":[],"geometryType":"esriGeometryPoint"}};var _b38=_b37.layerDefinition.objectIdField;if(!_b38){if(!_4.some(_b37.layerDefinition.fields,function(_b39){if(_b39.type=="esriFieldTypeOID"){_b38=_b39.name;return true;}return false;})){_b37.layerDefinition.fields.push({"name":"__OBJECTID","alias":"__OBJECTID","type":"esriFieldTypeOID","editable":false,"domain":null});_b38="__OBJECTID";}}var _b3a,_b3b;var _b3c=_b32._attributes;var _b3d=[];var _b3e=[];_4.forEach(_b37.layerDefinition.fields,function(_b3f,_b40){if(_b3f.type==="esriFieldTypeDate"){_b3d.push(_b3f.name);}else{if(_b3f.type==="esriFieldTypeDouble"||_b3f.type==="esriFieldTypeInteger"){_b3e.push(_b3f.name);}}});if(_b2d.locationInfo&&_b2d.locationInfo.locationType==="coordinates"){_b3a=_b2d.locationInfo.latitudeFieldName;_b3b=_b2d.locationInfo.longitudeFieldName;}else{_4.forEach(_b3c,function(_b41){var _b42;_b42=_4.indexOf(EAC.latFieldStrings,_b41.toLowerCase());if(_b42!==-1){_b3a=_b41;}_b42=_4.indexOf(EAC.longFieldStrings,_b41.toLowerCase());if(_b42!==-1){_b3b=_b41;}},this);}if(!_b3a||!_b3b){setTimeout(function(){console.error("File does not seem to contain fields with point coordinates.");},1);return;}var i=0,il=_b34.length;for(i;i<il;i++){if(_b37.featureSet.features.length>=1000){setTimeout(function(){console.error("1000 feature limit reached. Unable to load any more data.");},1);break;}var item=_b34[i];var _b43=_b32.getAttributes(item),_b44={};_4.forEach(_b43,function(attr,_b45){if(_4.some(_b3d,function(a){return a===attr;})){var val=_b32.getValue(item,attr),date=new Date(val);_b44[attr]=EAC._isValidDate(date,val)?date.getTime():null;}else{if(_4.some(_b3e,function(a){return a===attr;})){var _b46=_4.number.parse(_b32.getValue(item,attr));if((attr==_b3a||attr==_b3b)&&(isNaN(_b46)||Math.abs(_b46)>181)){_b46=parseFloat(_b32.getValue(item,attr));if(isNaN(_b46)){_b44[attr]=null;}else{_b44[attr]=_b46;}}else{if(isNaN(_b46)){_b44[attr]=null;}else{_b44[attr]=_b46;}}}else{_b44[attr]=_b32.getValue(item,attr);}}});_b44[_b38]=_b36;_b36++;var _b47=_b44[_b3a];var _b48=_b44[_b3b];if(_b48==null||_b47==null||isNaN(_b47)||isNaN(_b48)){continue;}var _b49=new esri.geometry.Point(_b48,_b47,new esri.SpatialReference({wkid:4326}));var _b4a={"geometry":_b49.toJson(),"attributes":_b44};_b37.featureSet.features.push(_b4a);}_b37.layerDefinition.name="csv";if(_b2e){_b2e(_b37);}},onError:function(_b4b){console.error("Error fetching items from CSV store: ",_b4b);}});return true;};EAC._getSeparator=function(_b4c){var _b4d=[","," ",";","|","\t"];var _b4e=0;var _b4f="";_4.forEach(_b4d,function(_b50){var _b51=_b4c.split(_b50).length;if(_b51>_b4e){_b4e=_b51;_b4f=_b50;}});return _b4f;};EAC._isValidDate=function(d,_b52){if(!d||Object.prototype.toString.call(d)!=="[object Date]"||isNaN(d.getTime())){return false;}var _b53=true;if(_4.isChrome&&/\d+\W*$/.test(_b52)){var _b54=_b52.match(/[a-zA-Z]{2,}/);if(_b54){var _b55=false,i=0,len=_b54.length,_b56=/^((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(!_b55&&(i<=len)&&!(_b55=!_b56.test(_b54[i]))){i++;}_b53=!_b55;}}return _b53;};EAC._projectFeatureSet=function(_b57,_b58,_b59,_b5a){if(!_b57.featureSet||_b57.featureSet.length===0){return;}if(EAC._sameSpatialReference(_b59,_b58)){_b5a(_b57);return;}var _b5b=function(_b5c){var _b5d=[];_4.forEach(_b57.featureSet.features,function(_b5e,i){if(_b5c[i]){_b5e.geometry=_b5c[i];_b5d.push(_b5e);}},this);_b5a(_b57);};var _b5f=function(_b60,args){console.error("error projecting featureSet ("+_b57.layerDefinition.name+"). Try one more time.");EAC._projectGeometries(_b61,_b57.featureSet.geometryType,_b58,_b59,_4.hitch(this,_b5b),_4.hitch(this,_b62));};var _b62=function(_b63,args){console.error("error projecting featureSet ("+_b57.layerDefinition.name+"). Final try.");_b5a(_b57);};if(_b57.featureSet.features&&_b57.featureSet.features.length>0){var _b61=[];_4.forEach(_b57.featureSet.features,function(_b64){_b61.push(_b64.geometry);});EAC._projectGeometries(_b61,_b57.featureSet.geometryType,_b58,_b59,_4.hitch(this,_b5b),_4.hitch(this,_b5f));}else{_b5a(_b57);}};EAC._projectGeometries=function(_b65,_b66,inSR,_b67,_b68,_b69){if(_b65.length===0){_b68(null);}var _b6a=esri.geometry.getGeometryType(_b66);var _b6b=[];_4.forEach(_b65,function(_b6c){var _b6d=new _b6a(_b6c);_b6d.spatialReference=inSR;_b6b.push(_b6d);},this);var _b6e=[102113,102100,3857];if(inSR.wkid&&inSR.wkid===4326&&_b67.wkid&&_4.indexOf(_b6e,_b67.wkid)>-1){_4.forEach(_b6b,function(_b6f){if(_b6f.xmin){_b6f.xmin=Math.max(_b6f.xmin,-180);_b6f.xmax=Math.min(_b6f.xmax,180);_b6f.ymin=Math.max(_b6f.ymin,-89.99);_b6f.ymax=Math.min(_b6f.ymax,89.99);}else{if(_b6f.rings){_4.forEach(_b6f.rings,function(ring){_4.forEach(ring,function(_b70){_b70[0]=Math.min(Math.max(_b70[0],-180),180);_b70[1]=Math.min(Math.max(_b70[1],-89.99),89.99);},this);},this);}else{if(_b6f.paths){_4.forEach(_b6f.paths,function(path){_4.forEach(path,function(_b71){_b71[0]=Math.min(Math.max(_b71[0],-180),180);_b71[1]=Math.min(Math.max(_b71[1],-89.99),89.99);},this);},this);}else{if(_b6f.x){_b6f.x=Math.min(Math.max(_b6f.x,-180),180);_b6f.y=Math.min(Math.max(_b6f.y,-89.99),89.99);}}}}},this);_b65=[];_4.forEach(_b6b,function(_b72){var _b73=esri.geometry.geographicToWebMercator(_b72);if(_b67.wkid!==102100){_b73.spatialReference=_b67;}_b65.push(_b73.toJson());},this);_b68(_b65);}else{if(inSR.wkid!==null&&_4.indexOf(_b6e,inSR.wkid)>-1&&_b67.wkid!==null&&_b67.wkid===4326){_b65=[];_4.forEach(_b6b,function(_b74){_b65.push(esri.geometry.webMercatorToGeographic(_b74).toJson());},this);_b68(_b65);}else{var _b75=function(_b76,args){if(_b76&&_b76.length===_b65.length){_b65=[];_4.forEach(_b76,function(_b77){if(_b77&&((_b77.rings&&_b77.rings.length>0&&_b77.rings[0].length>0&&_b77.rings[0][0].length>0&&!isNaN(_b77.rings[0][0][0])&&!isNaN(_b77.rings[0][0][1]))||(_b77.paths&&_b77.paths.length>0&&_b77.paths[0].length>0&&_b77.paths[0][0].length>0&&!isNaN(_b77.paths[0][0][0])&&!isNaN(_b77.paths[0][0][1]))||(_b77.xmin&&!isNaN(_b77.xmin)&&_b77.ymin&&!isNaN(_b77.ymin))||(_b77.x&&!isNaN(_b77.x)&&_b77.y&&!isNaN(_b77.y)))){_b65.push(_b77.toJson());}else{_b65.push(null);}},this);_b68(_b65);}else{_b69(_b76,args);}};if(esri.config.defaults.geometryService){esri.config.defaults.geometryService.project(_b6b,_b67,_4.hitch(this,_b75),_b69);}else{_b68(null);}}}};EAC._sameSpatialReference=function(sp1,sp2){var _b78=[102113,102100,3857];if(sp1&&sp2&&sp1.wkid===sp2.wkid&&sp1.wkt===sp2.wkt){return true;}else{if(sp1&&sp2&&sp1.wkid&&sp2.wkid&&_4.indexOf(_b78,sp1.wkid)>-1&&_4.indexOf(_b78,sp2.wkid)>-1){return true;}}return false;};}());}if(!_4._hasResource["esri.arcgis.utils"]){_4._hasResource["esri.arcgis.utils"]=true;_4.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(_b79){if(EAU._arcgisUrl&&EAU._arcgisUrl.length>0){EAU.arcgisUrl=EAU._arcgisUrl;}var url=EAU.arcgisUrl+"/"+_b79;var _b7a={},_b7b=new _4.Deferred();esri.request({url:url,content:{f:"json"},callbackParamName:"callback",load:function(_b7c){_b7a.item=_b7c;esri.request({url:url+"/data",content:{f:"json"},callbackParamName:"callback",load:function(_b7d){_b7a.itemData=_b7d;_b7b.callback(_b7a);},error:function(_b7e){_b7b.errback(_b7e);}});},error:function(_b7f){_b7b.errback(_b7f);}});return _b7b;};EAU.createMap=function(arg1,_b80,_b81){var _b82=new _4.Deferred();_b81=_b81||{};var _b83=_b81.infoTemplateClass;_b81._clazz=(_b83&&_4.getObject(_b83))||esri.dijit.PopupTemplate;if(_4.isString(arg1)){EAU.getItem(arg1).addCallback(function(_b84){EAU._getItemProps(_b84,_b81).addCallback(function(_b85){EAU._getLayers(_b85.itemData,_b81).addCallback(_4.hitch(null,EAU._preCreateMap,_b85,_b80,_b81,_b82));});}).addErrback(_4.hitch(_b82,_b82.errback));}else{EAU._getItemProps(arg1,_b81).addCallback(function(_b86){EAU._getLayers(_b86.itemData,_b81).addCallback(_4.hitch(null,EAU._preCreateMap,_b86,_b80,_b81,_b82));});}return _b82;};EAU._arcgisUrl=null;EAU._getItemProps=function(_b87,_b88){var _b89=new _4.Deferred();var _b8a=_b87.itemData;var _b8b=[];var _b8c=[];_4.forEach(_b8a.operationalLayers,function(_b8d){if(_b8d.itemId&&!_b8d.type){if(_b8d.url.indexOf("/FeatureServer")>-1){_b8c.push(_b8d);_b8b.push(EAU._getItemData(_b8d));}else{if(!_b8d.layers&&_b8d.url.indexOf("/MapServer")>-1&&_b8d.url.indexOf("/MapServer/")===-1){_b8c.push(_b8d);_b8b.push(EAU._getItemData(_b8d));}}}});if(_b8b.length>0){var _b8e=new _4.DeferredList(_b8b);_b8e.addCallback(function(_b8f){_4.forEach(_b8c,function(_b90,i){var _b91=_b8f[i][1];if(_b91&&_b91.layers){if(_b90.url.indexOf("/FeatureServer")>-1){_4.forEach(_b91.layers,function(_b92){if(_b90.url.endsWith("/FeatureServer/"+_b92.id)){_b90.itemProperties=_b92;EAU._processFSItemProperties(_b90);}});}else{_b90.layers=_b91.layers;}}});_b89.callback(_b87);});}else{_b89.callback(_b87);}return _b89;};EAU._getItemData=function(_b93){var url=EAU.arcgisUrl+"/"+_b93.itemId+"/data";var _b94=esri.request({url:url,content:{f:"json"},callbackParamName:"callback"});return _b94;};EAU._processFSItemProperties=function(_b95){if(_b95.itemProperties.layerDefinition){if(_b95.layerDefinition){if(!_b95.layerDefinition.drawingInfo){_b95.layerDefinition.drawingInfo=_b95.itemProperties.layerDefinition.drawingInfo;}if(!_b95.layerDefinition.definitionExpression){_b95.layerDefinition.definitionExpression=_b95.itemProperties.layerDefinition.definitionExpression;}if(_b95.layerDefinition.minScale===null){_b95.layerDefinition.minScale=_b95.itemProperties.layerDefinition.minScale;}if(_b95.layerDefinition.maxScale===null){_b95.layerDefinition.maxScale=_b95.itemProperties.layerDefinition.maxScale;}}else{_b95.layerDefinition=_b95.itemProperties.layerDefinition;}}if(_b95.itemProperties.popupInfo&&!_b95.popupInfo&&!_b95.disablePopup){_b95.popupInfo=_b95.itemProperties.popupInfo;}};EAU._getLayers=function(_b96,_b97){var _b98=[];var _b99=[];var _b9a=[];var _b9b=new _4.Deferred();_4.forEach(_b96.operationalLayers,function(_b9c,_b9d){if(_b9c.featureCollection){_4.forEach(_b9c.featureCollection.layers,function(_b9e,idx){var _b9f=true;if(_b9c.visibleLayers){if(_4.indexOf(_b9c.visibleLayers,idx)==-1){_b9f=false;}}_b9e.visibility=(_b9c.visibility&&_b9f);_b9e.opacity=_b9c.opacity;_b9e.id=(_b9c.id||("operational"+_b9d))+"_"+idx;_b9a.push(_b9e);},this);}else{_b9a.push(_b9c);}});_4.forEach(_b96.baseMap.baseMapLayers,function(_ba0,_ba1){_ba0.baseMapLayer=true;_ba0.id=_ba0.id||("base"+_ba1);_b98.push(_ba0);});_4.forEach(_b9a,function(_ba2,_ba3){_ba2.id=_ba2.id||("operational"+_ba3);_b98.push(_ba2);});_4.forEach(_b98,function(_ba4){if(_ba4.url&&!_ba4.type){_ba4.deferredsPos=_b99.length;_ba4.errors=[];_b99.push(EAU._getServiceInfo(_ba4.url,_ba4.errors));}else{if(_ba4.url&&_ba4.type=="CSV"){_ba4.deferredsPos=_b99.length;_b99.push(esri.arcgis.csv.buildCSVFeatureCollection(_ba4));}}});if(_b99.length==0){var _ba5=EAU._getMapSR(_b98);_b98=EAU._buildLayerObjects(_b98,_b97,_ba5);_b9b.callback(_b98);}else{var _ba6=new _4.DeferredList(_b99);_ba6.addCallback(function(_ba7){EAU._preBuildLayerObjects(_ba7,_b98,_b97,_b99,_b9b);});}return _b9b;};EAU._preBuildLayerObjects=function(_ba8,_ba9,_baa,_bab,_bac){_4.forEach(_ba9,function(_bad,_bae){if(_bad.url&&!_bad.type){_bad.resourceInfo=_ba8[_bad.deferredsPos][1];delete _bad.deferredsPos;}else{if(_bad.url&&_bad.type=="CSV"){_bad.featureCollection=_bab[_bad.deferredsPos].results[0];delete _bad.deferredsPos;}}});var _baf=EAU._getMapSR(_ba9);var _bb0=[];var _bb1=new _4.Deferred();_4.forEach(_ba9,function(_bb2){if(_bb2.url&&_bb2.type=="CSV"){_bb2.deferredsPos=_bb0.length;_bb0.push(esri.arcgis.csv.projectFeatureCollection(_bb2.featureCollection,_baf));}});if(_bb0.length==0){_ba9=EAU._buildLayerObjects(_ba9,_baa,_baf);_bac.callback(_ba9);}else{var _bb3=new _4.DeferredList(_bb0);_bb3.addCallback(function(){_4.forEach(_ba9,function(_bb4){if(_bb4.url&&_bb4.type=="CSV"){_bb4.featureCollection=_bb0[_bb4.deferredsPos].results[0];delete _bb4.deferredsPos;}});_ba9=EAU._buildLayerObjects(_ba9,_baa,_baf);_bac.callback(_ba9);});}};EAU._buildLayerObjects=function(_bb5,_bb6,_bb7){_4.forEach(_bb5,function(_bb8,_bb9){if(_bb8.url&&!_bb8.type){if(_bb9===0||_bb5[0].layerObject){_bb8.layerObject=EAU._initLayer(_bb8,_bb5,_bb6,_bb7);}}else{if(_bb8.url&&_bb8.type=="CSV"){_bb8.layerObject=EAU._initLayer(_bb8,_bb5,_bb6,_bb7);}else{_bb8.layerObject=EAU._initLayer(_bb8,_bb5,_bb6,_bb7);}}});var _bba=_4.filter(_bb5,function(lyr){return !lyr.isReference;});var _bbb=_4.filter(_bb5,function(lyr){return !!lyr.isReference;});_bb5=_bba.concat(_bbb);return _bb5;};EAU._preCreateMap=function(_bbc,_bbd,_bbe,_bbf,_bc0){try{var _bc1=_bbe.mapOptions||{};_bbe.mapOptions=_bc1;var card=_bbc.item;var _bc2=[];_4.forEach(_bc0,function(_bc3){if(_4.isArray(_bc3.layerObject)){_4.forEach(_bc3.layerObject,function(l){_bc2.push(l);});}else{_bc2.push(_bc3.layerObject);}});if(!_bc2[0]){_bbf.errback(new Error(esri.bundle.arcgis.utils.baseLayerError));return;}_bc2=_4.filter(_bc2,esri._isDefined);if(card){if(card.extent){if(!_bc1.extent){var _bc4=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 _bc5=_bc2[0].spatialReference;if(_bc5.wkid===4326){_bc1.extent=_bc4;EAU._createMap(_bc2,_bc0,_bbc,_bbd,_bbe,_bbf);}else{if(_bc5.wkid===102100||_bc5.wkid===102113||_bc5.wkid===3857){_bc4.xmin=Math.max(_bc4.xmin,-180);_bc4.xmax=Math.min(_bc4.xmax,180);_bc4.ymin=Math.max(_bc4.ymin,-89.99);_bc4.ymax=Math.min(_bc4.ymax,89.99);_bc1.extent=esri.geometry.geographicToWebMercator(_bc4);EAU._createMap(_bc2,_bc0,_bbc,_bbd,_bbe,_bbf);}else{if(_bbe.geometryServiceURL||esri.config.defaults.geometryService){var gs;if(_bbe.geometryServiceURL){gs=new esri.tasks.GeometryService(_bbe.geometryServiceURL);}else{gs=esri.config.defaults.geometryService;}gs.project([_bc4],_bc5,function(_bc6){var _bc7=_bc6[0];_bc1.extent=_bc1.extent||_bc7;EAU._createMap(_bc2,_bc0,_bbc,_bbd,_bbe,_bbf);});}else{_bbf.errback(new Error(esri.bundle.arcgis.utils.geometryServiceError));}}}}else{EAU._createMap(_bc2,_bc0,_bbc,_bbd,_bbe,_bbf);}}else{EAU._createMap(_bc2,_bc0,_bbc,_bbd,_bbe,_bbf);}}else{EAU._createMap(_bc2,_bc0,_bbc,_bbd,_bbe,_bbf);}}catch(err){_bbf.errback(err);}};EAU._getMapSR=function(_bc8){var _bc9=null;var _bca=_bc8[0];if(_bca.url&&!_bca.type){if(_bca.resourceInfo.spatialReference){_bc9=new esri.SpatialReference();if(_bca.resourceInfo.spatialReference.wkid){_bc9.wkid=_bca.resourceInfo.spatialReference.wkid;}if(_bca.resourceInfo.spatialReference.wkt){_bc9.wkt=_bca.resourceInfo.spatialReference.wkt;}}}else{if(_bca.type.indexOf("BingMaps")>-1||_bca.type=="OpenStreetMap"){_bc9=new esri.SpatialReference({wkid:102100});}else{if(_bca.type=="WMS"){_bc9=new esri.SpatialReference({wkid:_bca.spatialReferences[0]});}}}return _bc9;};EAU._createMap=function(_bcb,_bcc,_bcd,_bce,_bcf,_bd0){var _bd1=(_bcf.mapOptions||{}),_bd2,_bd3;if(!_bd1.infoWindow){_bd2=new esri.dijit.Popup(null,_4.create("div"));_bd1.infoWindow=_bd2;}if(!esri._isDefined(_bd1.showInfoWindowOnClick)){_bd1.showInfoWindowOnClick=false;}var map=new esri.Map(_bce,_bd1);if(_bcf.ignorePopups){_4.forEach(_bcb,function(_bd4){delete _bd4.infoTemplate;});}if(!(_bcf.ignorePopups||_bcf.disableClickBehavior)){_bd3=_4.connect(map,"onClick",EAU._showPopup);}_4.connect(map,"onLayersAddResult",EAU._onLayersAddResult);map.addLayers(_bcb);if(!_bcf.ignorePopups){EAU._addSelectionLayers(_bcb,map,_bcf._clazz);}var _bd5=[];_4.forEach(_bcc,function(_bd6){_bd5=_bd5.concat(_bd6.errors);},this);_bd0.callback({map:map,itemInfo:_bcd,errors:_bd5,clickEventHandle:_bd3,clickEventListener:EAU._showPopup});};EAU._addSelectionLayers=function(_bd7,map,_bd8){var _bd9=[];_4.forEach(_bd7,function(_bda){var _bdb=_bda.__popups;if(_bdb&&_bdb.length>1&&_bda.version>=10){_bda.__deferredsPos=_bd9.length;_bd9.push(EAU._getLayersInfo(_bda));}});var _bdc=[];if(_bd9.length>0){var _bdd=new _4.DeferredList(_bd9);_bdd.addCallback(function(_bde){_4.forEach(_bd7,function(_bdf){if(_bdf.__popups&&_bdf.__popups.length>0){if(_bdf.__deferredsPos||_bdf.__deferredsPos===0){var _be0=_bde[_bdf.__deferredsPos][1];_bdc=_bdc.concat(EAU._createSelectionFeatureLayers(_bdf,_be0.layers,_bd8,map));delete _bdf.__deferredsPos;}else{_bdc=_bdc.concat(EAU._createSelectionFeatureLayers(_bdf,null,_bd8,map));}}});map.addLayers(_bdc);});}else{_4.forEach(_bd7,function(_be1){if(_be1.__popups&&_be1.__popups.length>0){_bdc=_bdc.concat(EAU._createSelectionFeatureLayers(_be1,null,_bd8,map));}});map.addLayers(_bdc);}};EAU._createSelectionFeatureLayers=function(_be2,_be3,_be4,map){var url=_be2.url;var _be5=_be2.__popups;var ids=_be2.__popupIds;var _be6=_be2.__resourceInfo;var _be7=[];_4.forEach(_be5,function(_be8,_be9){var i,_bea=null;if(_be3){for(i=0;i<_be3.length;i++){if(_be3[i].id===ids[_be9]){_bea=_be3[i];break;}}}var _beb=new esri.layers.FeatureLayer(EAU._checkUrl(url+"/"+ids[_be9]),{id:_be2.id+"_"+ids[_be9],outFields:["*"],mode:esri.layers.FeatureLayer.MODE_SELECTION,infoTemplate:_be8&&new _be4(_be8),drawMode:false,visible:_be2.visible,resourceInfo:_bea,autoGeneralize:true});if(_beb.loaded){EAU._updateLayerScaleInfo(_be6.layers,_beb);}else{_4.connect(_beb,"onLoad",function(_bec){EAU._updateLayerScaleInfo(_be6.layers,_bec);});}_be7.push(_beb);});if(_be7.length>0){var _bed=function(_bee,_bef){_4.forEach(_bee,function(_bf0){if(_bef){_bf0.show();}else{_bf0.hide();}});};_4.connect(_be2,"onVisibilityChange",_4.hitch(this,_bed,_be7));var _bf1=function(_bf2,_bf3,_bf4){if(_bf2.id===_bf4.id){_4.forEach(_bf3,function(_bf5){map.removeLayer(_bf5);});}};_4.connect(map,"onLayerRemove",_4.hitch(this,_bf1,_be2,_be7));}delete _be2.__popups;delete _be2.__popupIds;delete _be2.__resourceInfo;return _be7;};EAU._getServiceInfo=function(url,_bf6){var url2=EAU._checkUrl(url);return esri.request({url:url2,content:{f:"json"},callbackParamName:"callback",error:function(_bf7,io){if(_bf7.message){_bf7.message+=" [url:"+url2+"]";}else{_bf7.message="[url:"+url2+"]";}_bf6.push(_bf7);esri.config.defaults.io.errorHandler(_bf7,io);}});};EAU._getLayersInfo=function(_bf8){return esri.request({url:EAU._checkUrl(_bf8.url+"/layers"),content:{f:"json"},callbackParamName:"callback",error:function(){}});};EAU._initLayer=function(_bf9,_bfa,_bfb,_bfc){var _bfd,_bfe=_bfb._clazz;if(_bf9.type==="OpenStreetMap"){_bfd=new esri.layers.OpenStreetMapLayer({id:_bf9.id});}else{if(_bf9.type==="WMS"){var _bff=[];var _c00=[];_4.forEach(_bf9.layers,function(_c01){_c00.push(new esri.layers.WMSLayerInfo({name:_c01.name,title:_c01.title,legendURL:_c01.legendURL}));_bff.push(_c01.name);},this);if(_bf9.visibleLayers){_bff=_bf9.visibleLayers;}var _c02=new esri.geometry.Extent(_bf9.extent[0][0],_bf9.extent[0][1],_bf9.extent[1][0],_bf9.extent[1][1],new esri.SpatialReference({wkid:4326}));var _c03={extent:_c02,layerInfos:_c00,version:_bf9.version,maxWidth:_bf9.maxWidth,maxHeight:_bf9.maxHeight,getMapUrl:_bf9.mapUrl,spatialReferences:_bf9.spatialReferences,title:_bf9.title,copyright:_bf9.copyright};_bfd=new esri.layers.WMSLayer(_bf9.url,{id:_bf9.id,visibleLayers:_bff,format:"png",transparent:_bf9.baseMapLayer?false:true,opacity:_bf9.opacity,resourceInfo:_c03});_bfd.spatialReference.wkid=_c03.spatialReferences[0];}else{if(_bf9.type==="KML"){_bfd=new esri.layers.KMLLayer(_bf9.url,{id:_bf9.id,outSR:_bfc});_4.connect(_bfd,"onLoad",function(){var _c04=function(_c05){_4.forEach(_c05,function(_c06){if(_c06.declaredClass==="esri.layers.FeatureLayer"||_c06.declaredClass==="esri.layers.MapImageLayer"){_c06.setOpacity(_bf9.opacity);}else{if(_c06.declaredClass==="esri.layers.KMLLayer"){if(_c06.loaded){_c04(_c06.getLayers());}else{_4.connect(_c06,"onLoad",_4.hitch(this,function(lyr){_c04(lyr.getLayers());}));}}}});};if(_bf9.opacity!==null){_c04(_bfd.getLayers());}if(_bf9.visibleFolders){_4.forEach(_bfd.folders,function(_c07){if(_4.indexOf(_bf9.visibleFolders,_c07.id)>-1){_bfd.setFolderVisibility(_c07,true);}else{_bfd.setFolderVisibility(_c07,false);}},this);}});}else{if(_bf9.type=="CSV"&&_bf9.url){_bfd=new esri.layers.FeatureLayer(_bf9.featureCollection,{infoTemplate:new esri.dijit.PopupTemplate(_bf9.popupInfo?_bf9.popupInfo:esri.arcgis.csv.generateDefaultPopupInfo(_bf9.featureCollection)),id:_bf9.id?_bf9.id:null,outFields:["*"],visible:(_bf9.visibility!==null)?_bf9.visibility:true,opacity:_bf9.opacity?_bf9.opacity:1,autoGeneralize:true});}else{if(_bf9.layerDefinition&&!_bf9.url){var _c08=_4.fromJson(_4.toJson(_bf9));delete _c08.id;delete _c08.opacity;delete _c08.visibility;_bfd=new esri.layers.FeatureLayer(_c08,{id:_bf9.id,opacity:_bf9.opacity,visible:_bf9.visibility,outFields:["*"],infoTemplate:_c08.popupInfo&&new _bfe(_c08.popupInfo),autoGeneralize:true});}else{if(_bf9.type==="BingMapsAerial"||_bf9.type==="BingMapsRoad"||_bf9.type==="BingMapsHybrid"){var _c09=esri.virtualearth.VETiledLayer.MAP_STYLE_AERIAL_WITH_LABELS;if(_bf9.type==="BingMapsAerial"){_c09=esri.virtualearth.VETiledLayer.MAP_STYLE_AERIAL;}else{if(_bf9.type==="BingMapsRoad"){_c09=esri.virtualearth.VETiledLayer.MAP_STYLE_ROAD;}}_bfd=new esri.virtualearth.VETiledLayer({bingMapsKey:_bfb.bingMapsKey,mapStyle:_c09,id:_bf9.id});}else{if(_bf9.resourceInfo&&_bf9.resourceInfo.mapName){if(_bf9.resourceInfo.singleFusedMapCache===true){if(!_bf9.baseMapLayer){if(EAU._sameSpatialReferenceAsBasemap(_bf9,_bfa)){if(EAU._sameTilingSchemeAsBasemap(_bf9,_bfa)){_bfd=EAU._loadAsCached(_bf9);}else{_bfd=EAU._loadAsDynamic(_bf9);}}else{_bfd=EAU._loadAsDynamic(_bf9);}}else{_bfd=EAU._loadAsCached(_bf9);}}else{_bfd=EAU._loadAsDynamic(_bf9);}}else{if(_bf9.resourceInfo&&_bf9.resourceInfo.pixelSizeX){var _c0a=new esri.layers.ImageServiceParameters();_c0a.bandIds=_bf9.bandIds;if(!_bf9.bandIds&&_bf9.resourceInfo.bandCount&&parseInt(_bf9.resourceInfo.bandCount,10)>3){_c0a.bandIds=[0,1,2];}_bfd=new esri.layers.ArcGISImageServiceLayer(EAU._checkUrl(_bf9.url),{resourceInfo:_bf9.resourceInfo,opacity:_bf9.opacity,visible:_bf9.visibility,id:_bf9.id,imageServiceParameters:_c0a});}else{if(_bf9.resourceInfo&&_bf9.resourceInfo.type==="Feature Layer"){_bfd=new esri.layers.FeatureLayer(EAU._checkUrl(_bf9.url),{resourceInfo:_bf9.resourceInfo,opacity:_bf9.opacity,visible:_bf9.visibility,id:_bf9.id,mode:esri._isDefined(_bf9.mode)?_bf9.mode:esri.layers.FeatureLayer.MODE_ONDEMAND,outFields:["*"],infoTemplate:_bf9.popupInfo&&new _bfe(_bf9.popupInfo),autoGeneralize:true});if(_bf9.layerDefinition){if(_bf9.layerDefinition.drawingInfo&&_bf9.layerDefinition.drawingInfo.renderer){var _c0b=esri.renderer.fromJson(_bf9.layerDefinition.drawingInfo.renderer);_bfd.setRenderer(_c0b);}if(_bf9.layerDefinition.definitionExpression){_bfd.setDefinitionExpression(_bf9.layerDefinition.definitionExpression);}if(esri._isDefined(_bf9.layerDefinition.minScale)){_bfd.minScale=_bf9.layerDefinition.minScale;}if(esri._isDefined(_bf9.layerDefinition.maxScale)){_bfd.maxScale=_bf9.layerDefinition.maxScale;}}}}}}}}}}}_bfd.arcgisProps={title:_bf9.title};return _bfd;};EAU._loadAsCached=function(_c0c){var _c0d=[];if(!_c0c.displayLevels){_c0d=_4.map(_c0c.resourceInfo.tileInfo.lods,function(lod){return lod.level;});}var _c0e=new esri.layers.ArcGISTiledMapServiceLayer(EAU._checkUrl(_c0c.url),{resourceInfo:_c0c.resourceInfo,opacity:_c0c.opacity,visible:_c0c.visibility,displayLevels:_c0c.displayLevels||_c0d,id:_c0c.id});EAU._processPopups(_c0e,_c0c);return _c0e;};EAU._loadAsDynamic=function(_c0f){var _c10=new esri.layers.ImageParameters();_c10.format="png24";if(_c0f.resourceInfo&&_c0f.resourceInfo.supportedImageFormatTypes&&_c0f.resourceInfo.supportedImageFormatTypes.indexOf("PNG32")>-1){_c10.format="png32";}var _c11=new esri.layers.ArcGISDynamicMapServiceLayer(EAU._checkUrl(_c0f.url),{resourceInfo:_c0f.resourceInfo,opacity:_c0f.opacity,visible:_c0f.visibility,id:_c0f.id,imageParameters:_c10});if(!_c0f.visibleLayers){var _c12="";var _c13=_c11.layerInfos;_4.forEach(_c13,function(_c14){if(_c14.defaultVisibility){_c12+=(_c12.length>0?",":"")+_c14.id;}});_c0f.visibleLayers=_c12;}var _c15=EAU._getVisibleFeatureLayers(_c11.layerInfos,_c0f.visibleLayers);_c11.setVisibleLayers(_c15);if(_c0f.layers&&_c0f.layers.length>0){var _c16=[];_4.forEach(_c0f.layers,function(_c17){if(_c17.layerDefinition&&_c17.layerDefinition.definitionExpression){_c16[_c17.id]=_c17.layerDefinition.definitionExpression;}},this);if(_c16.length>0){_c11.setLayerDefinitions(_c16);}}EAU._processPopups(_c11,_c0f);return _c11;};EAU._processPopups=function(_c18,_c19){var _c1a=_c18.layerInfos;var _c1b=_c19.layers;if(_c1b&&_c1a){var _c1c=[],ids=[];_4.forEach(_c1a,function(_c1d){var id=_c1d.id,i;if(!_c1d.subLayerIds&&_4.indexOf(_c18.visibleLayers,id)!==-1){for(i=0;i<_c1b.length;i++){var _c1e=_c1b[i];if(_c1e.id===id){ids.push(id);_c1c.push(_c1e.popupInfo);break;}}}});if(_c1c.length){_c18.__popups=_c1c;_c18.__popupIds=ids;_c18.__resourceInfo=_c19.resourceInfo;}}};EAU._onLayersAddResult=function(_c1f){_4.forEach(_c1f,function(_c20){var _c21=_c20.layer;if(_c21.toJson){var json=_c21.toJson();if(json.featureSet&&_c21.name.indexOf("Text")>-1){_4.forEach(json.featureSet.features,function(_c22,idx){if(_c22.attributes.TEXT){var _c23=_c21.graphics[idx];_c23.symbol.setText(_c22.attributes.TEXT);if(_c22.symbol.horizontalAlignment){_c23.symbol.align=_c22.symbol.horizontalAlignment;}_c23.setSymbol(_c23.symbol);_c23.setAttributes(_c22.attributes);}},this);}}});};EAU._sameSpatialReferenceAsBasemap=function(_c24,_c25){var _c26=[102113,102100,3857];var sp1=_c25[0].layerObject.fullExtent.spatialReference;var sp2=new esri.SpatialReference(_c24.resourceInfo.fullExtent.spatialReference);if(_4.toJson(sp1.toJson())===_4.toJson(sp2.toJson())){return true;}else{if(_4.some(_c26,function(wkid){return wkid===sp2.wkid;})&&_4.some(_c26,function(wkid){return wkid===sp1.wkid;})){return true;}}return false;};EAU._sameTilingSchemeAsBasemap=function(_c27,_c28){if(!_c28[0].layerObject.tileInfo){return false;}var _c29=[];_4.forEach(_c28,function(_c2a){if(_c2a.baseMapLayer){if(_c2a.layerObject.tileInfo){_c29=_c29.concat(_4.map(_c2a.layerObject.tileInfo.lods,function(lod){return lod.scale;}));}}});var _c2b=_4.some(_c27.resourceInfo.tileInfo.lods,function(lod){return _4.some(_c29,function(_c2c){return _c2c===lod.scale;});});return _c2b;};EAU._showPopup=function(evt){var map=this,_c2d=map.infoWindow,_c2e=evt.graphic;if(!map.loaded){return;}_c2d.hide();_c2d.clearFeatures();var _c2f=[];_4.forEach(map.graphicsLayerIds,function(_c30){var _c31=map.getLayer(_c30);if(_c31&&_c31.declaredClass.indexOf("FeatureLayer")!==-1&&_c31.loaded&&_c31.visible){_c31.clearSelection();if(_c31.infoTemplate&&!_c31._suspended){_c2f.push(_c31);}}});_c2e=(_c2e&&_c2e._getEffInfoTemplate())?_c2e:null;if(!_c2f.length&&!_c2e){return;}var _c32=EAU._calculateClickTolerance(_c2f);var _c33=evt.screenPoint,_c34=map.toMap(new esri.geometry.Point(_c33.x-_c32,_c33.y+_c32)),_c35=map.toMap(new esri.geometry.Point(_c33.x+_c32,_c33.y-_c32)),_c36=new esri.geometry.Extent(_c34.x,_c34.y,_c35.x,_c35.y,map.spatialReference);var _c37=new esri.tasks.Query();_c37.geometry=_c36;_c37.timeExtent=map.timeExtent;var _c38=_4.map(_c2f,function(_c39){var dfd=_c39.selectFeatures(_c37);dfd.addCallback(function(){var _c3a=_c39.getSelectedFeatures();return _c3a;});return dfd;});if(_c2e){var dfd=new _4.Deferred();dfd.callback([_c2e]);_c38.splice(0,0,dfd);}var _c3b=_4.some(_c38,function(dfd){return dfd.fired===-1;});if(!_c3b){var _c3c=_c2e?1:0;_4.forEach(_c2f,function(_c3d){_c3c=_c3c+_c3d.getSelectedFeatures().length;});if(!_c3c){return;}}_c2d.setFeatures(_c38);_c2d.show(evt.mapPoint);};EAU._calculateClickTolerance=function(_c3e){var _c3f=6;_4.forEach(_c3e,function(_c40){var _c41=_c40.renderer;if(_c41.declaredClass==="esri.renderer.SimpleRenderer"){var _c42=_c41.symbol;if(_c42&&_c42.xoffset){_c3f=Math.max(_c3f,Math.abs(_c42.xoffset));}if(_c42&&_c42.yoffset){_c3f=Math.max(_c3f,Math.abs(_c42.yoffset));}}else{if(_c41.declaredClass==="esri.renderer.UniqueValueRenderer"||_c41.declaredClass==="esri.renderer.ClassBreaksRenderer"){_4.forEach(_c41.infos,function(info){var _c43=info.symbol;if(_c43&&_c43.xoffset){_c3f=Math.max(_c3f,Math.abs(_c43.xoffset));}if(_c43&&_c43.yoffset){_c3f=Math.max(_c3f,Math.abs(_c43.yoffset));}});}}});return _c3f;};EAU._getVisibleFeatureLayers=function(_c44,_c45){if(!_c44||!_c45||_c45.length===0){return [];}var _c46=","+_c45+",";var _c47=[];var _c48="";var k,_c49=",";for(k=0;k<_c44.length;k++){if(_c44[k].subLayerIds!==null){if(_c46.indexOf(","+_c44[k].id+",")===-1||_c49.indexOf(","+_c44[k].id+",")>-1){_c49+=_c44[k].subLayerIds.toString()+",";}}else{if(_c46.indexOf(","+_c44[k].id+",")>-1&&_c49.indexOf(","+_c44[k].id+",")===-1){_c47.push(_c44[k].id);_c48=",";}}}return _c47;};EAU._updateLayerScaleInfo=function(_c4a,_c4b){if(_c4b.version<=10.1&&_c4a){var i,id=parseInt(_c4b.url.substring(_c4b.url.lastIndexOf("/")+1,_c4b.url.length));for(i=_c4a.length-1;i>=0;i--){if(_c4a[i].id==id){if(_c4b.minScale==0&&_c4a[i].minScale>0){_c4b.minScale=_c4a[i].minScale;}else{if(_c4b.minScale>0&&_c4a[i].minScale==0){_c4b.minScale=_c4b.minScale;}else{if(_c4b.minScale>0&&_c4a[i].minScale>0){_c4b.minScale=Math.min(_c4b.minScale,_c4a[i].minScale);}}}_c4b.maxScale=Math.max(_c4b.maxScale||0,_c4a[i].maxScale||0);if(_c4a[i].parentLayerId>-1){id=_c4a[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 _c4c=".arcgis.com/";var _c4d=(new _4._Url(EAU.arcgisUrl)).authority;return (url.indexOf(_c4c)!==-1||url.indexOf(_c4d)!==-1);};EAU._isAgolService=function(url){if(!url){return false;}return (url.indexOf("/services.arcgisonline.com/")!==-1||url.indexOf("/server.arcgisonline.com/")!==-1);};}());}}};});
