// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://js.arcgis.com/3.23/esri/copyright.txt for details.
//>>built
require({cache:{"esri/arcgis/csv":function(){define("dojo/_base/lang dojo/_base/array dojo/_base/Deferred dojo/sniff dojo/number dojox/data/CsvStore ../kernel ../config ../request ../SpatialReference ../geometry/jsonUtils ../geometry/webMercatorUtils".split(" "),function(m,c,r,n,l,g,a,e,f,b,d,p){function h(a){var b=0,d="";c.forEach([","," ",";","|","\t"],function(e){var t=a.split(e).length;t>b&&(b=t,d=e)});return d}function D(a,b){if(!a||"[object Date]"!==Object.prototype.toString.call(a)||isNaN(a.getTime()))return!1;
var d=!0;if(n("chrome")&&/\d+\W*$/.test(b)){if(b.match(/[^0-9a-zA-Z\s]/))return!1;var e=b.match(/[a-zA-Z]{2,}/);if(e){for(var d=!1,f=0,t=e.length,c=/^((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;!d&&f<=t&&!(d=!c.test(e[f]));)f++;d=!d}}return d}function q(a,b,d){var e=a.indexOf("\n"),e=m.trim(a.substr(0,e)),f=b.columnDelimiter;f||(f=h(e));var t=new g({data:a,separator:f});t.fetch({onComplete:function(a,
e){var f=0,h={layerDefinition:b.layerDefinition,featureSet:{features:[],geometryType:"esriGeometryPoint"}},g=h.layerDefinition.objectIdField,p=h.layerDefinition.fields;g||c.some(p,function(a){return"esriFieldTypeOID"===a.type?(g=a.name,!0):!1})||(p.push({name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1}),g="__OBJECTID");var v,k,q=t._attributes,r=[],x=[];c.forEach(p,function(a){"esriFieldTypeDate"===a.type?r.push(a.name):"esriFieldTypeDouble"!==a.type&&"esriFieldTypeInteger"!==
a.type||x.push(a.name)});b.locationInfo&&"coordinates"===b.locationInfo.locationType?(v=b.locationInfo.latitudeFieldName,k=b.locationInfo.longitudeFieldName):c.forEach(q,function(a){var b;b=c.indexOf(A,a.toLowerCase());-1!==b&&(v=a);b=c.indexOf(B,a.toLowerCase());-1!==b&&(k=a)});if(v&&k){-1===c.indexOf(x,v)&&x.push(v);-1===c.indexOf(x,k)&&x.push(k);var w;m.isArray(b.outFields)&&-1===c.indexOf(b.outFields,"*")&&(w=b.outFields);c.forEach(q,function(a){c.some(p,function(b){return a===b.name})||p.push({name:a,
alias:a,type:a===v||a===k?"esriFieldTypeDouble":"esriFieldTypeString"})});var q=0,n=a.length;for(q;q<n;q++){var y=a[q],z=t.getAttributes(y),u={};c.forEach(z,function(a){if(a&&(a===v||a===k||!w||-1<c.indexOf(w,a))){var b=a;0===a.length&&c.forEach(p,function(b,d){b.name==="attribute_"+(d-1)&&(a="attribute_"+(d-1))});if(-1<c.indexOf(r,a)){var b=t.getValue(y,b),d=new Date(b);u[a]=D(d,b)?d.getTime():null}else-1<c.indexOf(x,a)?(d=l.parse(t.getValue(y,b)),a!==v&&a!==k||!(isNaN(d)||181<Math.abs(d))||(d=parseFloat(t.getValue(y,
b))),isNaN(d)?u[a]=null:u[a]=d):u[a]=t.getValue(y,b)}});u[g]=f;f++;var z=u[v],C=u[k];null==C||null==z||isNaN(z)||isNaN(C)||(w&&-1===c.indexOf(w,v)&&delete u[v],w&&-1===c.indexOf(w,k)&&delete u[k],h.featureSet.features.push({geometry:{x:C,y:z,spatialReference:{wkid:4326}},attributes:u}))}h.layerDefinition.name="csv";d&&d(h)}else setTimeout(function(){console.error("File does not seem to contain fields with point coordinates.")},1),d&&d(null,Error("File does not seem to contain fields with point coordinates."))},
onError:function(a){console.error("Error fetching items from CSV store: ",a);d&&d(null,a)}});return!0}function k(a,b,f,h,g,k){0===a.length&&g(null);var t=d.getGeometryType(b),q=[];c.forEach(a,function(a){a=new t(a);a.spatialReference=f;q.push(a)},this);b=[102113,102100,3857];f.wkid&&4326===f.wkid&&h.wkid&&-1<c.indexOf(b,h.wkid)?(c.forEach(q,function(a){a.xmin?(a.xmin=Math.max(a.xmin,-180),a.xmax=Math.min(a.xmax,180),a.ymin=Math.max(a.ymin,-89.99),a.ymax=Math.min(a.ymax,89.99)):a.rings?c.forEach(a.rings,
function(a){c.forEach(a,function(a){a[0]=Math.min(Math.max(a[0],-180),180);a[1]=Math.min(Math.max(a[1],-89.99),89.99)},this)},this):a.paths?c.forEach(a.paths,function(a){c.forEach(a,function(a){a[0]=Math.min(Math.max(a[0],-180),180);a[1]=Math.min(Math.max(a[1],-89.99),89.99)},this)},this):a.x&&(a.x=Math.min(Math.max(a.x,-180),180),a.y=Math.min(Math.max(a.y,-89.99),89.99))},this),a=[],c.forEach(q,function(b){b=p.geographicToWebMercator(b);102100!==h.wkid&&(b.spatialReference=h);a.push(b.toJson())},
this),g(a)):null!==f.wkid&&-1<c.indexOf(b,f.wkid)&&null!==h.wkid&&4326===h.wkid?(a=[],c.forEach(q,function(b){a.push(p.webMercatorToGeographic(b).toJson())},this),g(a)):(b=function(b,d){b&&b.length===a.length?(a=[],c.forEach(b,function(b){b&&(b.rings&&0<b.rings.length&&0<b.rings[0].length&&0<b.rings[0][0].length&&!isNaN(b.rings[0][0][0])&&!isNaN(b.rings[0][0][1])||b.paths&&0<b.paths.length&&0<b.paths[0].length&&0<b.paths[0][0].length&&!isNaN(b.paths[0][0][0])&&!isNaN(b.paths[0][0][1])||b.xmin&&!isNaN(b.xmin)&&
b.ymin&&!isNaN(b.ymin)||b.x&&!isNaN(b.x)&&b.y&&!isNaN(b.y))?a.push(b.toJson()):a.push(null)},this),g(a)):k(b,d)},e.defaults.geometryService?e.defaults.geometryService.project(q,h,m.hitch(this,b),k):g(null))}function E(a,b){var d=[102113,102100,3857];return a&&b&&a.wkid===b.wkid&&a.wkt===b.wkt||a&&b&&a.wkid&&b.wkid&&-1<c.indexOf(d,a.wkid)&&-1<c.indexOf(d,b.wkid)?!0:!1}function u(a,e,f,h){if(a.featureSet&&0!==a.featureSet.features.length)if(E(f,e))h(a);else{var g,p=function(b){var d=[];c.forEach(a.featureSet.features,
function(a,e){b[e]&&(a.geometry=b[e],d.push(a))},this);h(a)},q=function(b,d){console.error("error projecting featureSet ("+a.layerDefinition.name+"). Final try.");h(a)},l=function(b,d){console.error("error projecting featureSet ("+a.layerDefinition.name+"). Try one more time.");k(g,a.featureSet.geometryType,e,f,m.hitch(this,p),m.hitch(this,q))};a.featureSet.features&&0<a.featureSet.features.length?(g=[],c.forEach(a.featureSet.features,function(b){if(b.geometry.toJson)g.push(b.geometry);else{var e=
d.getGeometryType(a.featureSet.geometryType);g.push(new e(b.geometry))}}),e.toJson||(e=new b(e)),f.toJson||(f=new b(f)),k(g,a.featureSet.geometryType,e,f,m.hitch(this,p),m.hitch(this,l))):h(a)}}var A="lat latitude y ycenter latitude83 latdecdeg point-y lat_dd".split(" "),B="lon lng long longitude x xcenter longitude83 longdecdeg point-x long_dd".split(" "),F={latFieldStrings:A,longFieldStrings:B,buildCSVFeatureCollection:function(a){var b=new r,d=function(a,d){d?b.errback(d):b.callback(a)},e={url:a.url,
handleAs:"text",load:function(b){q(b,a,m.hitch(this,d))},error:function(a){b.errback(a);console.error("error: "+a)}};-1<a.url.indexOf("arcgis.com")&&-1<a.url.indexOf("/content/items")&&-1<a.url.indexOf("/data")&&(e.headers={"Content-Type":""});f(e,{usePost:!1});return b},projectFeatureCollection:function(a,d,e){var f=new r;e||(e=new b({wkid:4326}));u(a,e,d,m.hitch(this,function(a){f.callback(a)}));return f},generateDefaultPopupInfo:function(a){var b={esriFieldTypeDouble:1,esriFieldTypeSingle:1},d=
{esriFieldTypeInteger:1,esriFieldTypeSmallInteger:1},e={esriFieldTypeDate:1},f=null;a=c.map(a.layerDefinition.fields,m.hitch(this,function(a){"NAME"===a.name.toUpperCase()&&(f=a.name);var h="esriFieldTypeOID"!==a.type&&"esriFieldTypeGlobalID"!==a.type&&"esriFieldTypeGeometry"!==a.type,g=null;if(h){var c=a.name.toLowerCase();if(-1<",stretched value,fnode_,tnode_,lpoly_,rpoly_,poly_,subclass,subclass_,rings_ok,rings_nok,".indexOf(","+c+",")||-1<c.indexOf("area")||-1<c.indexOf("length")||-1<c.indexOf("shape")||
-1<c.indexOf("perimeter")||-1<c.indexOf("objectid")||c.indexOf("_")===c.length-1||c.indexOf("_i")===c.length-2&&1<c.length)h=!1;a.type in d?g={places:0,digitSeparator:!0}:a.type in b?g={places:2,digitSeparator:!0}:a.type in e&&(g={dateFormat:"shortDateShortTime"})}return m.mixin({},{fieldName:a.name,label:a.alias,isEditable:!0,tooltip:"",visible:h,format:g,stringFieldOption:"textbox"})}));return{title:f?"{"+f+"}":"",fieldInfos:a,description:null,showAttachments:!1,mediaInfos:[]}},_getSeparator:h,
_isValidDate:D,_processCsvData:q,_projectGeometries:k,_sameSpatialReference:E,_projectFeatureSet:u};n("extend-esri")&&m.setObject("arcgis.csv",F,a);return F})},"dojox/data/CsvStore":function(){define("dojo/_base/lang dojo/_base/declare dojo/_base/xhr dojo/_base/kernel dojo/data/util/filter dojo/data/util/simpleFetch".split(" "),function(m,c,r,n,l,g){c=c("dojox.data.CsvStore",null,{constructor:function(a){this._attributes=[];this._attributeIndexes={};this._dataArray=[];this._arrayOfAllItems=[];this._loadFinished=
!1;a.url&&(this.url=a.url);this._csvData=a.data;a.label?this.label=a.label:""===this.label&&(this.label=void 0);this._storeProp="_csvStore";this._idProp="_csvId";this._features={"dojo.data.api.Read":!0,"dojo.data.api.Identity":!0};this._loadInProgress=!1;this._queuedFetches=[];this.identifier=a.identifier;""===this.identifier?delete this.identifier:this._idMap={};"separator"in a&&(this.separator=a.separator);"urlPreventCache"in a&&(this.urlPreventCache=a.urlPreventCache?!0:!1)},url:"",label:"",identifier:"",
separator:",",urlPreventCache:!1,_assertIsItem:function(a){if(!this.isItem(a))throw Error(this.declaredClass+": a function was passed an item argument that was not an item");},_getIndex:function(a){a=this.getIdentity(a);this.identifier&&(a=this._idMap[a]);return a},getValue:function(a,e,f){this._assertIsItem(a);var b=f;if("string"===typeof e)e=this._attributeIndexes[e],null!=e&&(b=this._dataArray[this._getIndex(a)][e]||f);else throw Error(this.declaredClass+": a function was passed an attribute argument that was not a string");
return b},getValues:function(a,e){var f=this.getValue(a,e);return f?[f]:[]},getAttributes:function(a){this._assertIsItem(a);var e=[];a=this._dataArray[this._getIndex(a)];for(var f=0;f<a.length;f++)""!==a[f]&&e.push(this._attributes[f]);return e},hasAttribute:function(a,e){this._assertIsItem(a);if("string"===typeof e){var f=this._attributeIndexes[e],b=this._dataArray[this._getIndex(a)];return"undefined"!==typeof f&&f<b.length&&""!==b[f]}throw Error(this.declaredClass+": a function was passed an attribute argument that was not a string");
},containsValue:function(a,e,f){var b=void 0;"string"===typeof f&&(b=l.patternToRegExp(f,!1));return this._containsValue(a,e,f,b)},_containsValue:function(a,e,f,b){a=this.getValues(a,e);for(e=0;e<a.length;++e){var d=a[e];if("string"===typeof d&&b)return null!==d.match(b);if(f===d)return!0}return!1},isItem:function(a){if(a&&a[this._storeProp]===this)if(a=a[this._idProp],this.identifier){if(this._dataArray[this._idMap[a]])return!0}else if(0<=a&&a<this._dataArray.length)return!0;return!1},isItemLoaded:function(a){return this.isItem(a)},
loadItem:function(a){},getFeatures:function(){return this._features},getLabel:function(a){if(this.label&&this.isItem(a))return this.getValue(a,this.label)},getLabelAttributes:function(a){return this.label?[this.label]:null},_fetchItems:function(a,e,f){var b=this,d=function(a,d){var f=null;if(a.query){var c,h,f=[],g=a.queryOptions?a.queryOptions.ignoreCase:!1,p={};for(c in a.query)h=a.query[c],"string"===typeof h&&(p[c]=l.patternToRegExp(h,g));for(g=0;g<d.length;++g){var k=!0,q=d[g];for(c in a.query)h=
a.query[c],b._containsValue(q,c,h,p[c])||(k=!1);k&&f.push(q)}}else f=d.slice(0,d.length);e(f,a)};if(this._loadFinished)d(a,this._arrayOfAllItems);else if(""!==this.url)if(this._loadInProgress)this._queuedFetches.push({args:a,filter:d});else{this._loadInProgress=!0;var c=r.get({url:b.url,handleAs:"text",preventCache:b.urlPreventCache});c.addCallback(function(e){try{b._processData(e),d(a,b._arrayOfAllItems),b._handleQueuedFetches()}catch(k){f(k,a)}});c.addErrback(function(d){b._loadInProgress=!1;if(f)f(d,
a);else throw d;});var h=null;a.abort&&(h=a.abort);a.abort=function(){var b=c;b&&-1===b.fired&&(b.cancel(),b=null);h&&h.call(a)}}else if(this._csvData)try{this._processData(this._csvData),this._csvData=null,d(a,this._arrayOfAllItems)}catch(q){f(q,a)}else{var g=Error(this.declaredClass+": No CSV source data was provided as either URL or String data input.");if(f)f(g,a);else throw g;}},close:function(a){},_getArrayOfArraysFromCsvFileContents:function(a){if(m.isString(a)){var e=RegExp("^\\s+","g"),f=
RegExp("\\s+$","g"),b=RegExp('""',"g"),d=[],c=this._splitLines(a);for(a=0;a<c.length;++a){var h=c[a];if(0<h.length){for(var h=h.split(this.separator),g=0;g<h.length;){var l=h[g].replace(e,""),k=l.replace(f,""),r=k.charAt(0),n=k.charAt(k.length-1),A=k.charAt(k.length-2),B=k.charAt(k.length-3);if(2===k.length&&'""'==k)h[g]="";else if('"'==r&&('"'!=n||'"'==n&&'"'==A&&'"'!=B)){if(g+1===h.length)return;h[g]=l+this.separator+h[g+1];h.splice(g+1,1)}else'"'==r&&'"'==n&&(k=k.slice(1,k.length-1),k=k.replace(b,
'"')),h[g]=k,g+=1}d.push(h)}}this._attributes=d.shift();for(a=0;a<this._attributes.length;a++)this._attributeIndexes[this._attributes[a]]=a;this._dataArray=d}},_splitLines:function(a){var e=[],f,b="",d=!1;for(f=0;f<a.length;f++){var c=a.charAt(f);switch(c){case '"':d=!d;b+=c;break;case "\r":d?b+=c:(e.push(b),b="",f<a.length-1&&"\n"==a.charAt(f+1)&&f++);break;case "\n":d?b+=c:(e.push(b),b="");break;default:b+=c}}""!==b&&e.push(b);return e},_processData:function(a){this._getArrayOfArraysFromCsvFileContents(a);
this._arrayOfAllItems=[];if(this.identifier&&void 0===this._attributeIndexes[this.identifier])throw Error(this.declaredClass+": Identity specified is not a column header in the data set.");for(a=0;a<this._dataArray.length;a++){var e=a;this.identifier&&(e=this._dataArray[a][this._attributeIndexes[this.identifier]],this._idMap[e]=a);this._arrayOfAllItems.push(this._createItemFromIdentity(e))}this._loadFinished=!0;this._loadInProgress=!1},_createItemFromIdentity:function(a){var e={};e[this._storeProp]=
this;e[this._idProp]=a;return e},getIdentity:function(a){return this.isItem(a)?a[this._idProp]:null},fetchItemByIdentity:function(a){var e,f=a.scope?a.scope:n.global;if(this._loadFinished)e=this._createItemFromIdentity(a.identity),this.isItem(e)||(e=null),a.onItem&&a.onItem.call(f,e);else{var b=this;if(""!==this.url)this._loadInProgress?this._queuedFetches.push({args:a}):(this._loadInProgress=!0,e=r.get({url:b.url,handleAs:"text"}),e.addCallback(function(d){try{b._processData(d);var e=b._createItemFromIdentity(a.identity);
b.isItem(e)||(e=null);a.onItem&&a.onItem.call(f,e);b._handleQueuedFetches()}catch(h){a.onError&&a.onError.call(f,h)}}),e.addErrback(function(b){this._loadInProgress=!1;a.onError&&a.onError.call(f,b)}));else if(this._csvData)try{b._processData(b._csvData),b._csvData=null,e=b._createItemFromIdentity(a.identity),b.isItem(e)||(e=null),a.onItem&&a.onItem.call(f,e)}catch(d){a.onError&&a.onError.call(f,d)}}},getIdentityAttributes:function(a){return this.identifier?[this.identifier]:null},_handleQueuedFetches:function(){if(0<
this._queuedFetches.length){for(var a=0;a<this._queuedFetches.length;a++){var e=this._queuedFetches[a],f=e.filter,b=e.args;f?f(b,this._arrayOfAllItems):this.fetchItemByIdentity(e.args)}this._queuedFetches=[]}}});m.extend(c,g);return c})},"dojo/data/util/filter":function(){define(["../../_base/lang"],function(m){var c={};m.setObject("dojo.data.util.filter",c);c.patternToRegExp=function(c,n){for(var l="^",g=null,a=0;a<c.length;a++)switch(g=c.charAt(a),g){case "\\":l+=g;a++;l+=c.charAt(a);break;case "*":l+=
".*";break;case "?":l+=".";break;case "$":case "^":case "/":case "+":case ".":case "|":case "(":case ")":case "{":case "}":case "[":case "]":l+="\\";default:l+=g}l+="$";return n?new RegExp(l,"mi"):new RegExp(l,"m")};return c})},"dojo/data/util/simpleFetch":function(){define(["../../_base/lang","../../_base/kernel","./sorter"],function(m,c,r){var n={};m.setObject("dojo.data.util.simpleFetch",n);n.errorHandler=function(l,g){g.onError&&g.onError.call(g.scope||c.global,l,g)};n.fetchHandler=function(l,
g){var a=g.abort||null,e=!1,f=g.start?g.start:0,b=g.count&&Infinity!==g.count?f+g.count:l.length;g.abort=function(){e=!0;a&&a.call(g)};var d=g.scope||c.global;g.store||(g.store=this);g.onBegin&&g.onBegin.call(d,l.length,g);g.sort&&l.sort(r.createSortFunction(g.sort,this));if(g.onItem)for(var p=f;p<l.length&&p<b;++p){var h=l[p];e||g.onItem.call(d,h,g)}g.onComplete&&!e&&(p=null,g.onItem||(p=l.slice(f,b)),g.onComplete.call(d,p,g))};n.fetch=function(c){c=c||{};c.store||(c.store=this);this._fetchItems(c,
m.hitch(this,"fetchHandler"),m.hitch(this,"errorHandler"));return c};return n})},"dojo/data/util/sorter":function(){define(["../../_base/lang"],function(m){var c={};m.setObject("dojo.data.util.sorter",c);c.basicComparator=function(c,n){var l=-1;null===c&&(c=void 0);null===n&&(n=void 0);if(c==n)l=0;else if(c>n||null==c)l=1;return l};c.createSortFunction=function(m,n){function l(a,b,d,c){return function(e,f){var g=c.getValue(e,a),h=c.getValue(f,a);return b*d(g,h)}}for(var g=[],a,e=n.comparatorMap,f=
c.basicComparator,b=0;b<m.length;b++){a=m[b];var d=a.attribute;if(d){a=a.descending?-1:1;var p=f;e&&("string"!==typeof d&&"toString"in d&&(d=d.toString()),p=e[d]||f);g.push(l(d,a,p,n))}}return function(a,b){for(var d=0;d<g.length;){var c=g[d++](a,b);if(0!==c)return c}return 0}};return c})},"*noref":1}});
define("esri/layers/CSVLayer","dojo/_base/array dojo/_base/declare dojo/_base/lang dojo/has ../kernel ../arcgis/csv ./FeatureLayer ../geometry/Extent ../tasks/FeatureSet".split(" "),function(m,c,r,n,l,g,a,e,f){c=c(a,{declaredClass:"esri.layers.CSVLayer",_preventInit:!0,_fieldTypeMap:{Date:"esriFieldTypeDate",Number:"esriFieldTypeDouble",String:"esriFieldTypeString"},constructor:function(a,d){this.url=a;d=r.mixin({},d);this.columnDelimiter=d.columnDelimiter;this.latitudeFieldName=d.latitudeFieldName;
this.longitudeFieldName=d.longitudeFieldName;var b=d.layerDefinition;b||(b={fields:d.fields||[],geometryType:"esriGeometryPoint",copyrightText:d.copyright},d.fields&&m.forEach(d.fields,function(a){a.type=this._fieldTypeMap[a.type||"String"];a.alias||(a.alias=a.name)},this));this._buildCsvFcParam={url:this.url,columnDelimiter:this.columnDelimiter,layerDefinition:b,outFields:d.outFields};this.latitudeFieldName&&this.longitudeFieldName&&(this._buildCsvFcParam.locationInfo={locationType:"coordinates",
latitudeFieldName:this.latitudeFieldName,longitudeFieldName:this.longitudeFieldName});this._projectFeatures=r.hitch(this,this._projectFeatures);this._addFeatures=r.hitch(this,this._addFeatures);this._initCSVLayer(d)},refresh:function(){this._fireUpdateStart();this.applyEdits(null,null,this.graphics);this._loadFeatures()},_setMap:function(a){var b=this.inherited(arguments);this._fireUpdateStart();this._projectFeatures(this._csvFC).then(this._addFeatures).otherwise(this._errorHandler);this._csvFC=null;
return b},_initCSVLayer:function(a){var b=this;g.buildCSVFeatureCollection(this._buildCsvFcParam).then(function(d){b._csvFC=d;var c=d.layerDefinition;c.extent=b._getFCExtent(d);a.outFields||(a.outFields=["*"]);a.timeInfo&&(c.timeInfo=a.timeInfo);b._initFeatureLayer({layerDefinition:c},a)}).otherwise(this._errorHandler)},_loadFeatures:function(){g.buildCSVFeatureCollection(this._buildCsvFcParam).then(this._projectFeatures).then(this._addFeatures).otherwise(this._errorHandler)},_projectFeatures:function(a){return g.projectFeatureCollection(a,
this._map.spatialReference)},_addFeatures:function(a){a=new f(a.featureSet);this.applyEdits(a.features,null,null);this._fireUpdateEnd()},_getFCExtent:function(a){var b;if(a&&a.featureSet&&a.featureSet.features){a=a.featureSet.features;var c=a.length;if(1<c){var f=a[0].geometry;b=new e(f.x,f.y,f.x,f.y);for(--c;0<c;c--)f=a[c].geometry,b.xmin=Math.min(b.xmin,f.x),b.ymin=Math.min(b.ymin,f.y),b.xmax=Math.max(b.xmax,f.x),b.ymax=Math.max(b.ymax,f.y);0>=b.getWidth()&&0>=b.getHeight()&&(b=null)}}return b}});
n("extend-esri")&&r.setObject("layers.CSVLayer",c,l);return c});