/*
 COPYRIGHT 2009 ESRI

 TRADE SECRETS: ESRI PROPRIETARY AND CONFIDENTIAL
 Unpublished material - all rights reserved under the
 Copyright Laws of the United States and applicable international
 laws, treaties, and conventions.

 For additional information, contact:
 Environmental Systems Research Institute, Inc.
 Attn: Contracts and Legal Services Department
 380 New York Street
 Redlands, California, 92373
 USA

 email: contracts@esri.com
 */

window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","esri.tasks.GenerateRendererTask"],["require","esri.tasks._task"],["require","esri.symbol"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["esri.tasks.GenerateRendererTask"]){_4._hasResource["esri.tasks.GenerateRendererTask"]=true;_4.provide("esri.tasks.GenerateRendererTask");_4.require("esri.tasks._task");_4.require("esri.symbol");_4.declare("esri.tasks.GenerateRendererTask",esri.tasks._Task,{constructor:function(_7,_8){this.url=_7;var _9=_7.split("://")[1].split("/")[0].toLowerCase();if(_9.indexOf("arcgis.com")!==-1){this._url.path+="/generateRenderer";}else{this._url.path+="/generateDataClasses";}this._handler=_4.hitch(this,this._handler);this.source=_8&&_8.source;this.gdbVersion=_8&&_8.gdbVersion;},_handler:function(_a,io,_b,_c,_d){try{var _e=esri.renderer.fromJson(_a);if(_a.type==="classBreaks"){_e._setMaxInclusiveness(true);}this._successHandler([_e],"onComplete",_b,_d);}catch(err){this._errorHandler(err,_c,_d);}},execute:function(_f,_10,_11){var _12=_4.mixin(_f.toJson(),{f:"json"}),_13=this._handler,_14=this._errorHandler;if(this.source){var _15={source:this.source.toJson()};_12.layer=_4.toJson(_15);}if(this.gdbVersion){_12.gdbVersion=this.gdbVersion;}var dfd=new _4.Deferred(esri._dfdCanceller);dfd._pendingDfd=esri.request({url:this._url.path,content:_12,callbackParamName:"callback",load:function(r,i){_13(r,i,_10,_11,dfd);},error:function(r){_14(r,_11,dfd);}});return dfd;},onComplete:function(){}});_4.declare("esri.tasks.GenerateRendererParameters",null,{classificationDefinition:null,where:null,toJson:function(){var _16={classificationDef:_4.toJson(this.classificationDefinition.toJson()),where:this.where};return _16;}});_4.declare("esri.tasks.ClassificationDefinition",null,{type:null,baseSymbol:null,colorRamp:null,toJson:function(){var _17={};if(this.baseSymbol){_4.mixin(_17,{baseSymbol:this.baseSymbol.toJson()});}if(this.colorRamp){_4.mixin(_17,{colorRamp:this.colorRamp.toJson()});}return _17;}});_4.declare("esri.tasks.ClassBreaksDefinition",esri.tasks.ClassificationDefinition,{type:"classBreaksDef",classificationField:null,classificationMethod:null,breakCount:null,standardDeviationInterval:null,normalizationType:null,normalizationField:null,toJson:function(){var _18=this.inherited(arguments);var _19;switch(this.classificationMethod.toLowerCase()){case "natural-breaks":_19="esriClassifyNaturalBreaks";break;case "equal-interval":_19="esriClassifyEqualInterval";break;case "quantile":_19="esriClassifyQuantile";break;case "standard-deviation":_19="esriClassifyStandardDeviation";break;case "geometrical-interval":_19="esriClassifyGeometricalInterval";break;default:_19=this.classificationMethod;}_4.mixin(_18,{type:this.type,classificationField:this.classificationField,classificationMethod:_19,breakCount:this.breakCount});if(this.normalizationType){var _1a;switch(this.normalizationType.toLowerCase()){case "field":_1a="esriNormalizeByField";break;case "log":_1a="esriNormalizeByLog";break;case "percent-of-total":_1a="esriNormalizeByPercentOfTotal";break;default:_1a=this.normalizationType;}_4.mixin(_18,{normalizationType:_1a});}if(this.normalizationField){_4.mixin(_18,{normalizationField:this.normalizationField});}if(this.standardDeviationInterval){_4.mixin(_18,{standardDeviationInterval:this.standardDeviationInterval});}return _18;}});_4.declare("esri.tasks.UniqueValueDefinition",esri.tasks.ClassificationDefinition,{type:"uniqueValueDef",attributeField:null,attributeField2:null,attributeField3:null,fieldDelimiter:null,toJson:function(){var _1b=this.inherited(arguments);this.uniqueValueFields=[];if(this.attributeField){this.uniqueValueFields.push(this.attributeField);}if(this.attributeField2){this.uniqueValueFields.push(this.attributeField2);}if(this.attributeField3){this.uniqueValueFields.push(this.attributeField3);}_4.mixin(_1b,{type:this.type,uniqueValueFields:this.uniqueValueFields});if(this.fieldDelimiter){_4.mixin(_1b,{fieldDelimiter:this.fieldDelimiter});}return _1b;}});_4.declare("esri.tasks.ColorRamp",null,{type:null});_4.declare("esri.tasks.AlgorithmicColorRamp",esri.tasks.ColorRamp,{type:"algorithmic",fromColor:null,toColor:null,algorithm:null,toJson:function(){var _1c;switch(this.algorithm.toLowerCase()){case "cie-lab":_1c="esriCIELabAlgorithm";break;case "hsv":_1c="esriHSVAlgorithm";break;case "lab-lch":_1c="esriLabLChAlgorithm";break;default:}var _1d={type:"algorithmic",algorithm:_1c};_1d.fromColor=[];_1d.fromColor.push(this.fromColor.r);_1d.fromColor.push(this.fromColor.g);_1d.fromColor.push(this.fromColor.b);_1d.fromColor.push(this.fromColor.a);_1d.toColor=[];_1d.toColor.push(this.toColor.r);_1d.toColor.push(this.toColor.g);_1d.toColor.push(this.toColor.b);_1d.toColor.push(this.toColor.a);return _1d;}});_4.declare("esri.tasks.MultipartColorRamp",esri.tasks.ColorRamp,{type:"multipart",colorRamps:[],toJson:function(){var _1e=_4.map(this.colorRamps,function(_1f){return _1f.toJson();});var _20={type:"multipart",colorRamps:_1e};return _20;}});}}};});