????

Your IP : 3.14.255.247


Current Path : C:/inetpub/vhost/bcvt.kontum.gov.vn/www/
Upload File :
Current File : C:/inetpub/vhost/bcvt.kontum.gov.vn/www/39-es2015.js.map

{"version":3,"sources":["./node_modules/arcgis-js-api/layers/support/ElevationQuery.js","./node_modules/arcgis-js-api/layers/support/ElevationSampler.js","./node_modules/arcgis-js-api/layers/support/ElevationTile.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAO,CAAC,kCAAS,CAAC,OAAS,CAAC,2HAAmC,CAAC,6HAAoC,CAAC,6HAAoC,CAAC,iIAAsC,CAAC,mGAAuB,CAAC,mGAAuB,CAAC,yFAAkB,CAAC,uGAAyB,CAAC,iGAAsB,CAAC,2GAA2B,CAAC,iGAAsB,CAAC,uGAAyB,CAAC,mIAAuC,CAAC,uIAAyC,CAAC,gHAAoB,CAAC,0GAAiB,CAAC,mCAAC,8CAA8C,gBAAgB,sBAAsB,QAAQ,qCAAqC,sBAAsB,EAAE,uBAAuB,SAAS,sCAAsC,SAAS,EAAE,iBAAiB,cAAc,4CAA4C,uCAAuC,cAAc,0BAA0B,gBAAgB,gEAAgE,iBAAiB,kFAAkF,yCAAyC,IAAI,yCAAyC,uKAAuK,2DAA2D,sFAAsF,EAAE,EAAE,mCAAmC,uCAAuC,MAAM,0BAA0B,gBAAgB,wGAAwG,qGAAqG,mTAAmT,oFAAoF,2DAA2D,4FAA4F,EAAE,EAAE,2CAA2C,uCAAuC,0BAA0B,oCAAoC,kFAAkF,gPAAgP,EAAE,EAAE,8CAA8C,uCAAuC,QAAQ,0BAA0B,gBAAgB,gEAAgE,iBAAiB,gDAAgD,yCAAyC,IAAI,yCAAyC,oQAAoQ,sEAAsE,EAAE,EAAE,8CAA8C,uCAAuC,UAAU,0BAA0B,gBAAgB,0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,KAAK,kBAAkB,kBAAkB,0BAA0B,sBAAsB,UAAU,kBAAkB,sCAAsC,8BAA8B,kBAAkB,KAAK,gCAAgC,kBAAkB,0BAA0B,sBAAsB,UAAU,sCAAsC,SAAS,EAAE,uEAAuE,cAAc,8CAA8C,yBAAyB,2BAA2B,SAAS,6CAA6C,cAAc,GAAG,GAAG,yBAAyB,kBAAkB,kBAAkB,yBAAyB,+EAA+E,uFAAuF,wBAAwB,YAAY,GAAG,oEAAoE,eAAe,oCAAoC,+BAA+B,mCAAmC,sDAAsD,4CAA4C,qCAAqC,sDAAsD,kBAAkB,sBAAsB,+DAA+D,sHAAsH,iCAAiC,GAAG,IAAI,yBAAyB,kBAAkB,kBAAkB,2BAA2B,iGAAiG,gCAAgC,IAAI,oBAAoB,MAAM,0BAA0B,sCAAsC,iBAAiB,aAAa,YAAY,oBAAoB,KAAK,oBAAoB,sKAAsK,yEAAyE,aAAa,SAAS,oEAAoE,eAAe,oCAAoC,+BAA+B,sCAAsC,sDAAsD,kBAAkB,4BAA4B,WAAW,KAAK,WAAW,yCAAyC,mHAAmH,GAAG,IAAI,0DAA0D,qBAAqB,qBAAqB;AAAA,oGAAC,C;;;;;;;;;;;ACxBpoH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,iCAAO,CAAC,kCAAS,CAAC,OAAS,CAAC,mCAAC,cAAc,kBAAkB,sLAAsL,+BAA+B,4BAA4B,0BAA0B,kBAAkB,qBAAqB,sCAAsC,SAAS,EAAE,iBAAiB,gBAAgB,qDAAqD,uBAAuB,kBAAkB,kLAAkL,wCAAwC,mDAAmD,GAAG,GAAG,8BAA8B;AAAA,oGAAC,C","file":"39-es2015.js","sourcesContent":["// COPYRIGHT © 2019 Esri\n//\n// All rights reserved under the copyright laws of the United States\n// and applicable international laws, treaties, and conventions.\n//\n// This material is licensed for use under the Esri Master License\n// Agreement (MLA), and is bound by the terms of that agreement.\n// You may redistribute and use this code without modification,\n// provided you adhere to the terms of the MLA and include this\n// copyright notice.\n//\n// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english\n//\n// For additional information, contact:\n// Environmental Systems Research Institute, Inc.\n// Attn: Contracts and Legal Services Department\n// 380 New York Street\n// Redlands, California, USA 92373\n// USA\n//\n// email: contracts@esri.com\n//\n// See http://js.arcgis.com/4.14/esri/copyright.txt for details.\n\ndefine([\"require\",\"exports\",\"../../core/tsSupport/assignHelper\",\"../../core/tsSupport/awaiterHelper\",\"../../core/tsSupport/extendsHelper\",\"../../core/tsSupport/generatorHelper\",\"../../core/arrayUtils\",\"../../core/asyncUtils\",\"../../core/Error\",\"../../core/promiseUtils\",\"../../core/unitUtils\",\"../../geometry/Multipoint\",\"../../geometry/Point\",\"../../geometry/Polyline\",\"../../geometry/support/aaBoundingRect\",\"../../geometry/support/webMercatorUtils\",\"./ElevationSampler\",\"./ElevationTile\"],function(e,t,n,i,o,r,l,a,s,u,c,p,f,h,v,d,m,y){function T(e,t){var n=e.lods.length-1;if(t>0){var i=l.findIndex(e.lods,function(e){return e.resolution<t});0===i?n=0:i>0&&(n=i-1)}return n}Object.defineProperty(t,\"__esModule\",{value:!0});var g=function(){function e(){}return e.prototype.queryAll=function(e,t,o){return i(this,void 0,void 0,function(){var i,l,a,c,p;return r(this,function(r){switch(r.label){case 0:return e=o&&o.ignoreInvisibleLayers?e.filter(function(e){return e.visible}):e.slice(),e.length?(i=x.fromGeometry(t),l=!1,o&&o.returnSampleInfo||(l=!0),a=n({noDataValue:0,maximumAutoTileRequests:20},o,{returnSampleInfo:!0,demResolution:\"auto\"}),[4,this.query(e[e.length-1],i,a)]):[2,u.reject(new s(\"elevation-query:invalid-layer\",\"Elevation queries require at least one elevation layer to fetch tiles from\"))];case 1:return c=r.sent(),[4,this._queryAllContinue(e,c,a)];case 2:return p=r.sent(),p.geometry=p.geometry.export(),l&&delete p.sampleInfo,[2,p]}})})},e.prototype.query=function(e,t,o){return i(this,void 0,void 0,function(){var i;return r(this,function(r){switch(r.label){case 0:return e?t&&(t instanceof x||\"point\"===t.type||\"multipoint\"===t.type||\"polyline\"===t.type)?(o=n({noDataValue:0,demResolution:\"auto\",minDemResolution:0,maximumAutoTileRequests:20,returnSampleInfo:!1},o),i=new w(e,t.spatialReference,o),[4,e.load(o)]):[2,u.reject(new s(\"elevation-query:invalid-geometry\",\"Only point, polyline and multipoint geometries can be used to query elevation\"))]:[2,u.reject(new s(\"elevation-query:invalid-layer\",\"Elevation queries require an elevation layer to fetch tiles from\"))];case 1:return r.sent(),this._createGeometryDescriptor(i,t),[4,this._selectTiles(i)];case 2:return r.sent(),[4,this._populateElevationTiles(i)];case 3:return r.sent(),this._sampleGeometryWithElevation(i),[2,this._createQueryResult(i)]}})})},e.prototype.createSampler=function(e,t,o){return i(this,void 0,void 0,function(){return r(this,function(i){return e?t&&\"extent\"===t.type?(o=n({noDataValue:0,demResolution:\"auto\",maximumAutoTileRequests:20,returnSampleInfo:!1},o),[2,this._createSampler(e,t,o)]):[2,u.reject(new s(\"elevation-query:invalid-extent\",\"Invalid or undefined extent\"))]:[2,u.reject(new s(\"elevation-query:invalid-layer\",\"Elevation queries require an elevation layer to fetch tiles from\"))]})})},e.prototype.createSamplerAll=function(e,t,o){return i(this,void 0,void 0,function(){var i,l;return r(this,function(r){switch(r.label){case 0:return e=o&&o.ignoreInvisibleLayers?e.filter(function(e){return e.visible}):e.slice(),e.length?t&&\"extent\"===t.type?(i=n({noDataValue:0,maximumAutoTileRequests:20},o,{returnSampleInfo:!0,demResolution:\"auto\"}),[4,this._createSampler(e[e.length-1],t,i)]):[2,u.reject(new s(\"elevation-query:invalid-extent\",\"Invalid or undefined extent\"))]:[2,u.reject(new s(\"elevation-query:invalid-layer\",\"Elevation queries require at least one elevation layer to fetch tiles from\"))];case 1:return l=r.sent(),[2,this._createSamplerAllContinue(e,t,l,i)]}})})},e.prototype._createSampler=function(e,t,n,o){return i(this,void 0,void 0,function(){var i,l,a;return r(this,function(r){switch(r.label){case 0:return[4,e.load()];case 1:if(r.sent(),i=t.spatialReference,l=e.tileInfo.spatialReference,!i.equals(l)){if(!d.canProject(i,l))return[2,u.reject(new s(\"elevation-query:invalid-extent\",\"Extent spatial reference (\"+i.wkid+\") must be compatible with tile spatial reference (\"+l.wkid+\")\"))];t=d.project(t,l)}return a=new E(e,t,n,o),[4,this._selectTiles(a)];case 2:return r.sent(),[4,this._populateElevationTiles(a)];case 3:return r.sent(),[2,new m.MultiTileElevationSampler(a.elevationTiles,a.layer.tileInfo,a.options.noDataValue)]}})})},e.prototype._createSamplerAllContinue=function(e,t,n,o){return i(this,void 0,void 0,function(){var i,l,a,s;return r(this,function(r){switch(r.label){case 0:return e.pop(),e.length?(i=n.samplers.map(function(e){return v.fromExtent(e.extent)}),[4,this._createSampler(e[e.length-1],t,o,i)]):[2,n];case 1:return l=r.sent(),0===l.samplers.length?[2,n]:(a=n.samplers.concat(l.samplers),s=new m.MultiTileElevationSampler(a,o.noDataValue),[2,this._createSamplerAllContinue(e,t,s,o)])}})})},e.prototype._queryAllContinue=function(e,t,n){return i(this,void 0,void 0,function(){var i,o,l,a,s,u,c;return r(this,function(r){switch(r.label){case 0:if(i=e.pop(),t.geometry.coordinates.forEach(function(e,n){t.sampleInfo[n].demResolution>=0&&!t.sampleInfo[n].source&&(t.sampleInfo[n].source=i)}),!e.length)return[2,t];for(o=t.geometry.coordinates,l=[],a=[],s=0;s<o.length;s++)t.sampleInfo[s].demResolution<0&&(l.push(o[s]),a.push(s));return 0===l.length?[2,t]:(u=t.geometry.clone(l),[4,this.query(e[e.length-1],u,n)]);case 1:return c=r.sent(),a.forEach(function(e,n){o[e].z=c.geometry.coordinates[n].z,t.sampleInfo[e].demResolution=c.sampleInfo[n].demResolution}),[2,this._queryAllContinue(e,t,n)]}})})},e.prototype._createQueryResult=function(e){var t;t=e.outSpatialReference.equals(e.geometry.spatialReference)?e.geometry:e.geometry.project(e.outSpatialReference);var n={geometry:t.export(),noDataValue:e.options.noDataValue};return e.options.returnSampleInfo&&(n.sampleInfo=this._extractSampleInfo(e)),e.geometry.coordinates.forEach(function(e){e.tile=null,e.elevationTile=null}),n},e.prototype._createGeometryDescriptor=function(e,t){var n,i=e.layer.tileInfo.spatialReference;if(!(n=t instanceof x?t.project(i):d.project(t,i)))throw new s(\"elevation-query:spatial-reference-mismatch\",\"Cannot query elevation in '\"+t.spatialReference.wkid+\"' on an elevation service in '\"+i.wkid+\"'\");e.geometry=x.fromGeometry(n)},e.prototype._selectTiles=function(e){return i(this,void 0,void 0,function(){var t;return r(this,function(n){switch(n.label){case 0:return t=e.options.demResolution,(\"geometry\"===e.type&&this._preselectOutsideLayerExtent(e),\"number\"!=typeof t)?[3,1]:(this._selectTilesClosestResolution(e),[3,6]);case 1:return\"finest-contiguous\"!==t?[3,3]:[4,this._selectTilesFinestContiguous(e)];case 2:return n.sent(),[3,6];case 3:return\"auto\"!==t?[3,5]:[4,this._selectTilesAuto(e)];case 4:return n.sent(),[3,6];case 5:throw new s(\"elevation-query:invalid-dem-resolution\",\"Invalid dem resolution value '\"+t+'\\', expected a number, \"finest-contiguous\" or \"auto\"');case 6:return[2]}})})},e.prototype._preselectOutsideLayerExtent=function(e){var t=new y.ElevationTile(null);t.sample=function(){return e.options.noDataValue},e.outsideExtentTile=t;var n=e.layer.fullExtent;e.geometry.coordinates.forEach(function(e){var i=e.x,o=e.y;(i<n.xmin||i>n.xmax||o<n.ymin||o>n.ymax)&&(e.elevationTile=t)})},e.prototype._selectTilesClosestResolution=function(e){var t=e.layer.tileInfo,n=this._findNearestDemResolutionLODIndex(t,e.options.demResolution);e.selectTilesAtLOD(n)},e.prototype._findNearestDemResolutionLODIndex=function(e,t){for(var n=c.getMetersPerUnitForSR(e.spatialReference),i=t/n,o=e.lods[0],r=0,l=1;l<e.lods.length;l++){var a=e.lods[l];Math.abs(a.resolution-i)<Math.abs(o.resolution-i)&&(o=a,r=l)}return r},e.prototype._selectTilesFinestContiguous=function(e){return i(this,void 0,void 0,function(){var t;return r(this,function(n){switch(n.label){case 0:return t=T(e.layer.tileInfo,e.options.minDemResolution),[4,this._selectTilesFinestContiguousAt(e,t)];case 1:return n.sent(),[2]}})})},e.prototype._selectTilesFinestContiguousAt=function(e,t){return i(this,void 0,void 0,function(){var n,i,o,l;return r(this,function(r){switch(r.label){case 0:if(n=e.layer,e.selectTilesAtLOD(t),t<0)return[2];i=n.tilemapCache,o=e.getTilesToFetch(),r.label=1;case 1:return r.trys.push([1,6,,8]),i?[4,u.all(o.map(function(t){return i.fetchAvailability(t.level,t.row,t.col,{signal:e.options.signal})}))]:[3,3];case 2:return r.sent(),[3,5];case 3:return[4,this._populateElevationTiles(e)];case 4:if(r.sent(),!e.allElevationTilesFetched())throw e.clearElevationTiles(),new s(\"elevation-query:has-unavailable-tiles\");r.label=5;case 5:return[3,8];case 6:if(l=r.sent(),u.isAbortError(l))throw l;return[4,this._selectTilesFinestContiguousAt(e,t-1)];case 7:return r.sent(),[3,8];case 8:return[2]}})})},e.prototype._populateElevationTiles=function(e){return i(this,void 0,void 0,function(){var t,n,i;return r(this,function(o){switch(o.label){case 0:return t=e.getTilesToFetch(),n={},i=t.map(function(t){return e.layer.fetchTile(t.level,t.row,t.col,{noDataValue:e.options.noDataValue,signal:e.options.signal}).then(function(e){return n[t.id]=new y.ElevationTile(t,e)})}),[4,u.eachAlways(i)];case 1:return o.sent(),u.throwIfAborted(e.options.signal),e.populateElevationTiles(n),[2]}})})},e.prototype._selectTilesAuto=function(e){return i(this,void 0,void 0,function(){var t,n,o,l,s=this;return r(this,function(c){switch(c.label){case 0:return this._selectTilesAutoFinest(e),(this._reduceTilesForMaximumRequests(e),t=e.layer.tilemapCache)?(n=e.getTilesToFetch(),o={},l=n.map(function(n){return i(s,void 0,void 0,function(){var i,l;return r(this,function(r){switch(r.label){case 0:return i={id:null,level:0,row:0,col:0,extent:v.create()},[4,a.result(t.fetchAvailabilityUpsample(n.level,n.row,n.col,i,{signal:e.options.signal}))];case 1:if(l=r.sent(),!1===l.ok&&u.isAbortError(l.error))throw l.error;return!0===l.ok&&(o[n.id]=i),[2]}})})}),[4,u.all(l)]):[2,this._selectTilesAutoPrefetchUpsample(e)];case 1:return c.sent(),e.remapTiles(o),[2]}})})},e.prototype._reduceTilesForMaximumRequests=function(e){var t=e.layer.tileInfo,n=0,i={},o=function(e){e.id in i?i[e.id]++:(i[e.id]=1,n++)},r=function(e){var t=i[e.id];1===t?(delete i[e.id],n--):i[e.id]=t-1};e.forEachTileToFetch(o,r);for(var l=!0;l&&(l=!1,e.forEachTileToFetch(function(i){n<=e.options.maximumAutoTileRequests||(r(i),t.upsampleTile(i)&&(l=!0),o(i))},r),l););},e.prototype._selectTilesAutoFinest=function(e){var t=T(e.layer.tileInfo,e.options.minDemResolution);e.selectTilesAtLOD(t,e.options.maximumAutoTileRequests)},e.prototype._selectTilesAutoPrefetchUpsample=function(e){return i(this,void 0,void 0,function(){var t,n;return r(this,function(i){switch(i.label){case 0:return t=e.layer.tileInfo,[4,this._populateElevationTiles(e)];case 1:return i.sent(),n=!1,e.forEachTileToFetch(function(e,i){t.upsampleTile(e)?n=!0:i()}),n?[4,this._selectTilesAutoPrefetchUpsample(e)]:[3,3];case 2:i.sent(),i.label=3;case 3:return[2]}})})},e.prototype._sampleGeometryWithElevation=function(e){e.geometry.coordinates.forEach(function(t){var n=t.elevationTile,i=e.options.noDataValue;if(n){var o=n.sample(t.x,t.y);void 0!==o?i=o:t.elevationTile=null}t.z=i})},e.prototype._extractSampleInfo=function(e){var t=e.layer.tileInfo,n=c.getMetersPerUnitForSR(t.spatialReference);return e.geometry.coordinates.map(function(i){var o=-1;if(i.elevationTile&&i.elevationTile!==e.outsideExtentTile){o=t.lodAt(i.elevationTile.tile.level).resolution*n}return{demResolution:o}})},e}();t.ElevationQuery=g;var x=function(){function e(){}return e.prototype.export=function(){return this._exporter(this.coordinates,this.spatialReference)},e.prototype.clone=function(t){var n=this,i=new e;return i.geometry=this.geometry,i.spatialReference=this.spatialReference,i.coordinates=t||this.coordinates.map(function(e){return n._cloneCoordinate(e)}),i._exporter=this._exporter,i},e.prototype.project=function(e){var t=this;if(this.spatialReference.equals(e))return this.clone();if(d.canProject(this.spatialReference,e)){var n=e.isWGS84?d.xyToLngLat:d.lngLatToXY,i=[0,0],o=this.coordinates.map(function(e){var o=t._cloneCoordinate(e);return n(o.x,o.y,i),o.x=i[0],o.y=i[1],o}),r=this.clone(o);return r.spatialReference=e,r}return null},e.prototype._cloneCoordinate=function(e){return{x:e.x,y:e.y,z:e.z,m:e.m,tile:null,elevationTile:null}},e.fromGeometry=function(t){var n=new e;if(n.geometry=t,n.spatialReference=t.spatialReference,t instanceof e)n.coordinates=t.coordinates.map(function(e){return n._cloneCoordinate(e)}),n._exporter=function(e,n){var i=t.clone(e);return i.spatialReference=n,i};else switch(t.type){case\"point\":var i=t;t.hasM?n.coordinates=[{x:i.x,y:i.y,m:i.m}]:n.coordinates=[{x:i.x,y:i.y}],n._exporter=function(e,n){return t.hasM?new f(e[0].x,e[0].y,e[0].z,e[0].m,n):new f(e[0].x,e[0].y,e[0].z,n)};break;case\"multipoint\":var o=t;n.coordinates=o.points.map(function(e){if(t.hasM){var n=t.hasZ?3:2;return{x:e[0],y:e[1],m:e[n]}}return{x:e[0],y:e[1]}}),n._exporter=function(e,n){return t.hasM?new p({points:e.map(function(e){return[e.x,e.y,e.z,e.m]}),hasZ:!0,hasM:!0,spatiaReference:n}):new p(e.map(function(e){return[e.x,e.y,e.z]}),n)};break;case\"polyline\":var r=t,l=[],a=[],s=0;r.paths.forEach(function(e){a.push([s,s+e.length]),s+=e.length,l.push.apply(l,e.map(function(e){if(t.hasM){var n=t.hasZ?3:2;return{x:e[0],y:e[1],m:e[n]}}return{x:e[0],y:e[1]}}))}),n.coordinates=l,n._exporter=function(e,n){var i=t.hasM?e.map(function(e){return[e.x,e.y,e.z,e.m]}):e.map(function(e){return[e.x,e.y,e.z]}),o=a.map(function(e){return i.slice(e[0],e[1])});return new h({paths:o,hasM:t.hasM,hasZ:!0,spatialReference:n})}}return n},e}();t.GeometryDescriptor=x;var _=function(){function e(e,t){this.layer=e,this.options=t}return e}(),w=function(e){function t(t,n,i){var o=e.call(this,t,i)||this;return o.type=\"geometry\",o.outSpatialReference=n,o}return o(t,e),t.prototype.selectTilesAtLOD=function(e){if(e<0)this.geometry.coordinates.forEach(function(e){return e.tile=null});else{var t=this.layer.tileInfo,n=t.lods[e].level;this.geometry.coordinates.forEach(function(e){e.tile=t.tileAt(n,e.x,e.y)})}},t.prototype.allElevationTilesFetched=function(){return!this.geometry.coordinates.some(function(e){return!e.elevationTile})},t.prototype.clearElevationTiles=function(){for(var e=0,t=this.geometry.coordinates;e<t.length;e++){var n=t[e];n.elevationTile!==this.outsideExtentTile&&(n.elevationTile=null)}},t.prototype.populateElevationTiles=function(e){for(var t=0,n=this.geometry.coordinates;t<n.length;t++){var i=n[t];!i.elevationTile&&i.tile&&(i.elevationTile=e[i.tile.id])}},t.prototype.remapTiles=function(e){for(var t=0,n=this.geometry.coordinates;t<n.length;t++){var i=n[t];i.tile=e[i.tile.id]}},t.prototype.getTilesToFetch=function(){for(var e={},t=[],n=0,i=this.geometry.coordinates;n<i.length;n++){var o=i[n],r=o.tile;o.elevationTile||!o.tile||e[r.id]||(e[r.id]=r,t.push(r))}return t},t.prototype.forEachTileToFetch=function(e){for(var t=0,n=this.geometry.coordinates;t<n.length;t++){var i=n[t];!function(t){t.tile&&!t.elevationTile&&e(t.tile,function(){return t.tile=null})}(i)}},t}(_),E=function(e){function t(t,n,i,o){var r=e.call(this,t,i)||this;return r.type=\"extent\",r.elevationTiles=[],r.candidateTiles=[],r.fetchedCandidates=new Set,r.extent=n.intersection(t.fullExtent),r.maskExtents=o,r}return o(t,e),t.prototype.selectTilesAtLOD=function(e,t){var n=this._maximumLodForRequests(t),i=Math.min(n,e);i<0?this.candidateTiles.length=0:this._selectCandidateTilesCoveringExtentAt(i)},t.prototype._maximumLodForRequests=function(e){var t=this.layer.tileInfo;if(!e)return t.lods.length-1;for(var n=this.extent,i=t.lods.length-1;i>=0;i--){var o=t.lods[i],r=o.resolution*t.size[0],l=o.resolution*t.size[1];if(Math.ceil(n.width/r)*Math.ceil(n.height/l)<=e)return i}return-1},t.prototype.allElevationTilesFetched=function(){return this.candidateTiles.length===this.elevationTiles.length},t.prototype.clearElevationTiles=function(){this.elevationTiles.length=0,this.fetchedCandidates.clear()},t.prototype.populateElevationTiles=function(e){for(var t=0,n=this.candidateTiles;t<n.length;t++){var i=n[t],o=e[i.id];o&&(this.fetchedCandidates.add(i),this.elevationTiles.push(o))}},t.prototype.remapTiles=function(e){this.candidateTiles=this._uniqueNonOverlappingTiles(this.candidateTiles.map(function(t){return e[t.id]}))},t.prototype.getTilesToFetch=function(){return this.candidateTiles},t.prototype.forEachTileToFetch=function(e,t){var n=this,i=this.candidateTiles;this.candidateTiles=[],i.forEach(function(i){if(n.fetchedCandidates.has(i))return void(t&&t(i));var o=!1;e(i,function(){return o=!0}),o?t&&t(i):n.candidateTiles.push(i)}),this.candidateTiles=this._uniqueNonOverlappingTiles(this.candidateTiles,t)},t.prototype._uniqueNonOverlappingTiles=function(e,t){for(var n={},i=[],o=0,r=e;o<r.length;o++){var l=r[o];n[l.id]?t&&t(l):(n[l.id]=l,i.push(l))}var a=i.sort(function(e,t){return e.level-t.level});return a.filter(function(e,n){for(var i=0;i<n;i++)if(v.contains(a[i].extent,e.extent))return t&&t(e),!1;return!0})},t.prototype._selectCandidateTilesCoveringExtentAt=function(e){this.candidateTiles.length=0;for(var t=this.layer.tileInfo,n=t.lods[e],i=this.extent,o=t.tileAt(n.level,i.xmin,i.ymin),r=n.resolution*t.size[0],l=n.resolution*t.size[1],a=Math.ceil((i.xmax-o.extent[0])/r),s=Math.ceil((i.ymax-o.extent[1])/l),u=0;u<s;u++)for(var c=0;c<a;c++){var p={id:null,level:o.level,row:o.row-u,col:o.col+c};t.updateTileInfo(p),this._tileIsMasked(p)||this.candidateTiles.push(p)}},t.prototype._tileIsMasked=function(e){return!!this.maskExtents&&this.maskExtents.some(function(t){return v.contains(t,e.extent)})},t}(_);t.getFinestLodIndex=T,t.default=g});","// COPYRIGHT © 2019 Esri\n//\n// All rights reserved under the copyright laws of the United States\n// and applicable international laws, treaties, and conventions.\n//\n// This material is licensed for use under the Esri Master License\n// Agreement (MLA), and is bound by the terms of that agreement.\n// You may redistribute and use this code without modification,\n// provided you adhere to the terms of the MLA and include this\n// copyright notice.\n//\n// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english\n//\n// For additional information, contact:\n// Environmental Systems Research Institute, Inc.\n// Attn: Contracts and Legal Services Department\n// 380 New York Street\n// Redlands, California, USA 92373\n// USA\n//\n// email: contracts@esri.com\n//\n// See http://js.arcgis.com/4.14/esri/copyright.txt for details.\n\ndefine([\"require\",\"exports\",\"../../core/tsSupport/extendsHelper\",\"../../geometry\",\"../../core/compilerUtils\",\"../../core/Logger\",\"../../core/unitUtils\",\"../../geometry/support/aaBoundingRect\",\"../../geometry/support/contains\",\"../../geometry/support/webMercatorUtils\"],function(e,t,n,r,a,i,o,l,s,u){function p(e,t){var n=c(e,t.spatialReference);if(!n)return null;switch(e.type){case\"point\":f(e,n,t);break;case\"polyline\":m(e,n,t);break;case\"multipoint\":v(e,n,t);break;default:a.neverReached(e)}return e}function c(e,t){var n=e.spatialReference;return n.equals(t)?e:u.canProject(n,t)?u.project(e,t):(h.error(\"Cannot project geometry spatial reference (wkid:\"+n.wkid+\") to elevation sampler spatial reference (wkid:\"+t.wkid+\")\"),null)}function f(e,t,n){e.z=n.elevationAt(t)||0}function m(e,t,n){y.spatialReference=t.spatialReference;for(var r=e.hasM&&!e.hasZ,a=0;a<e.paths.length;a++)for(var i=e.paths[a],o=t.paths[a],l=0;l<i.length;l++){var s=i[l],u=o[l];y.x=u[0],y.y=u[1];var p=n.elevationAt(y)||0;r&&(s[3]=s[2]),s[2]=p}e.hasZ=!0}function v(e,t,n){y.spatialReference=t.spatialReference;for(var r=e.hasM&&!e.hasZ,a=0;a<e.points.length;a++){var i=e.points[a],o=t.points[a];y.x=o[0],y.y=o[1];var l=n.elevationAt(y)||0;r&&(i[3]=i[2]),i[2]=l}e.hasZ=!0}Object.defineProperty(t,\"__esModule\",{value:!0});var h=i.getLogger(\"esri.layers.support.ElevationSampler\"),x=function(){function e(){}return e.prototype.queryElevation=function(e){return p(e.clone(),this)},e.prototype.on=function(){return g},e.prototype.projectIfRequired=function(e,t){return c(e,t)},e}();t.ElevationSamplerBase=x;var d=function(e){function t(t,n,r){var a=e.call(this)||this;a.tile=t,a.noDataValue=r,a.extent=l.toExtent(t.tile.extent,n.spatialReference);var i=o.getMetersPerUnitForSR(n.spatialReference),s=n.lodAt(t.tile.level).resolution*i;return a.demResolution={min:s,max:s},a}return n(t,e),Object.defineProperty(t.prototype,\"spatialReference\",{get:function(){return this.extent.spatialReference},enumerable:!0,configurable:!0}),t.prototype.contains=function(e){var t=this.projectIfRequired(e,this.spatialReference);return s.extentContainsPoint(this.extent,t)},t.prototype.elevationAt=function(e){var t=this.projectIfRequired(e,this.spatialReference);if(!t)return null;if(!this.contains(e)){var n=this.extent,r=n.xmin+\", \"+n.ymin+\", \"+n.xmax+\", \"+n.ymax;h.warn(\"#elevationAt()\",\"Point used to sample elevation (\"+e.x+\", \"+e.y+\") is outside of the sampler extent (\"+r+\")\")}return this.tile.sample(t.x,t.y)},t}(x);t.TileElevationSampler=d;var R=function(e){function t(t,n,r){var a,i=e.call(this)||this;\"number\"==typeof n?(i.noDataValue=n,a=null):(a=n,i.noDataValue=r),i.samplers=a?t.map(function(e){return new d(e,a,i.noDataValue)}):t;var o=i.samplers[0];if(o){i.extent=o.extent.clone();var s=o.demResolution,u=s.min,p=s.max;i.demResolution={min:u,max:p};for(var c=1;c<i.samplers.length;c++){var f=i.samplers[c];i.extent.union(f.extent),i.demResolution.min=Math.min(i.demResolution.min,f.demResolution.min),i.demResolution.max=Math.max(i.demResolution.max,f.demResolution.max)}}else i.extent=l.toExtent(l.create(),a.spatialReference),i.demResolution={min:0,max:0};return i}return n(t,e),Object.defineProperty(t.prototype,\"spatialReference\",{get:function(){return this.extent.spatialReference},enumerable:!0,configurable:!0}),t.prototype.elevationAt=function(e){var t=this.projectIfRequired(e,this.spatialReference);if(!t)return null;for(var n=0,r=this.samplers;n<r.length;n++){var a=r[n];if(a.contains(t))return a.elevationAt(t)}return h.warn(\"#elevationAt()\",\"Point used to sample elevation (\"+e.x+\", \"+e.y+\") is outside of the sampler\"),null},t}(x);t.MultiTileElevationSampler=R,t.updateGeometryElevation=p;var y=new r.Point,g={remove:function(){}}});","// COPYRIGHT © 2019 Esri\n//\n// All rights reserved under the copyright laws of the United States\n// and applicable international laws, treaties, and conventions.\n//\n// This material is licensed for use under the Esri Master License\n// Agreement (MLA), and is bound by the terms of that agreement.\n// You may redistribute and use this code without modification,\n// provided you adhere to the terms of the MLA and include this\n// copyright notice.\n//\n// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english\n//\n// For additional information, contact:\n// Environmental Systems Research Institute, Inc.\n// Attn: Contracts and Legal Services Department\n// 380 New York Street\n// Redlands, California, USA 92373\n// USA\n//\n// email: contracts@esri.com\n//\n// See http://js.arcgis.com/4.14/esri/copyright.txt for details.\n\ndefine([\"require\",\"exports\"],function(t,e){function a(t,e,a){var r=t.safeWidth,n=t.width,l=t.pixelData,h=t.noDataValue,o=i(t.dy*(t.y1-a),0,r),u=i(t.dx*(e-t.x0),0,r),d=Math.floor(o),f=Math.floor(u),s=d*n+f,p=s+n,D=l[s],v=l[p],x=l[s+1],c=l[p+1];if(D!==h&&v!==h&&x!==h&&c!==h){var w=o-d,y=u-f,m=D+(x-D)*y;return m+(v+(c-v)*y-m)*w}}function i(t,e,a){return t<e?e:t>a?a:t}Object.defineProperty(e,\"__esModule\",{value:!0});var r=function(){function t(t,e){if(this.tile=t,!e)return void(this.samplerData=null);var a=this.tile.extent;this.samplerData={pixelData:e.values,width:e.width,height:e.height,safeWidth:.99999999*(e.width-1),noDataValue:e.noDataValue,dx:(e.width-1)/(a[2]-a[0]),dy:(e.width-1)/(a[3]-a[1]),x0:a[0],y1:a[3]}}return t.prototype.sample=function(t,e){if(this.samplerData)return a(this.samplerData,t,e)},t}();e.ElevationTile=r,e.default=r});"],"sourceRoot":"webpack:///"}