text: // All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  // See https://js.arcgis.com/4.11/esri/copyright.txt for details.
  //>>built
  define(["../../core/Accessor","../../core/lang","../../layers/support/layerUtils","../../geometry/support/jsonUtils","../../geometry/support/scaleUtils"],function(d,f,g,l,m){var e={LAYER_OPTION_TOP:"top",LAYER_OPTION_VISIBLE:"visible",LAYER_OPTION_ALL:"all"};d=d.createSubclass({declaredClass:"esri.tasks.support.IdentifyParameters",properties:{geometry:null,dpi:96,dynamicLayerInfos:null,height:400,layerDefinitions:null,layerIds:null,layerOption:e.LAYER_OPTION_TOP,layerTimeOptions:null,mapExtent:null,
  geometryPrecision:null,maxAllowableOffset:null,returnGeometry:!1,returnFieldName:!1,returnM:!1,returnZ:!1,returnUnformattedValues:!1,spatialReference:null,timeExtent:null,tolerance:null,width:400},toJSON:function(b){var c=b&&b.geometry||this.geometry,a=this.mapExtent,d=this.spatialReference,e=this.layerIds;b={tolerance:this.tolerance,returnGeometry:this.returnGeometry,returnFieldName:this.returnFieldName,returnUnformattedValues:this.returnUnformattedValues,imageDisplay:this.width+","+this.height+
  ","+this.dpi,maxAllowableOffset:this.maxAllowableOffset,geometryPrecision:this.geometryPrecision};if(c){var h=c.toJSON();delete h.spatialReference;b.geometry=JSON.stringify(h);b.geometryType=l.getJsonType(c)}d?b.sr=d.wkid||JSON.stringify(d.toJSON()):c&&c.spatialReference?b.sr=c.spatialReference.wkid||JSON.stringify(c.spatialReference.toJSON()):a&&a.spatialReference&&(b.sr=a.spatialReference.wkid||JSON.stringify(a.spatialReference.toJSON()));a&&(b.mapExtent=a.xmin+","+a.ymin+","+a.xmax+","+a.ymax);
  b.layers=this.layerOption;e&&(b.layers+=":"+e.join(","));b.layerDefs=g.serializeLayerDefinitions(this.layerDefinitions);c=this.timeExtent;b.time=c?c.toJSON().join(","):null;b.layerTimeOptions=g.serializeTimeOptions(this.layerTimeOptions);if(this.dynamicLayerInfos&&0<this.dynamicLayerInfos.length){var a=m.getScale({extent:a,width:this.width,spatialReference:a.spatialReference}),f=g.getLayersForScale(a,this.dynamicLayerInfos),k=[];this.dynamicLayerInfos.forEach(function(b){if(!b.subLayerIds){var a=
  b.id;if((!this.layerIds||this.layerIds&&-1!==this.layerIds.indexOf(a))&&-1!==f.indexOf(a)){var c={id:a};c.source=b.source&&b.source.toJSON();var d;this.layerDefinitions&&this.layerDefinitions[a]&&(d=this.layerDefinitions[a]);d&&(c.definitionExpression=d);var e;this.layerTimeOptions&&this.layerTimeOptions[a]&&(e=this.layerTimeOptions[a]);e&&(c.layerTimeOptions=e.toJSON());k.push(c)}}},this);a=JSON.stringify(k);"[]"===a&&(a="[{}]");b.dynamicLayers=a}return b}});f.mixin(d,e);return d});