????

Your IP : 13.58.192.154


Current Path : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/
Upload File :
Current File : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/29.02afd7375ef12510a60e.js

(function(){var e={"esri/views/2d/layers/features/support/ClusterStore":"0SZq","esri/geohash/geohashUtils":"8pdz","esri/views/2d/layers/features/controllers/BaseController":"Btct","esri/geohash/GeohashTree":"JOu6","esri/views/2d/layers/features/support/pixelBuffering":"oWCy","esri/views/2d/layers/graphics/graphicsUtils":"wjMf"},t=this||window,r=t.webpackJsonp=t.webpackJsonp||[];r.registerAbsMids?r.registerAbsMids(e):(r.absMidsWaiting=r.absMidsWaiting||[]).push(e)})(),(window.webpackJsonp=window.webpackJsonp||[]).push([[29],{"0SZq":function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("TMur"),r("H1tY"),r("LxLY"),r("qMld"),r("jBNx"),r("JOu6"),r("8pdz"),r("nrlZ"),r("vtMp"),r("/COu"),r("Jvs9"),r("rfv1"),r("Q2Em"),r("ZooB"),r("zDti"),r("sCbS"),r("WEAo"),r("tI6k")],void 0===(n=(function(e,t,r,i,n,a,o,s,u,l,c,h,d,f,p,g,y,v,m,_,x){Object.defineProperty(t,"__esModule",{value:!0});var b=function(e){return a.andThen(e,(function(e){return"cluster"!==e.type?null:r.__assign(r.__assign({},e),{clusterRadius:s.pt2px(e.clusterRadius/2)})}))};function M(e,t,i){return r.__awaiter(this,void 0,void 0,(function(){var n,a,s;return r.__generator(this,(function(r){for(n=[],a=0,s=e;a<s.length;a++)n.push(S(s[a],t,i));return[2,o.all(n)]}))}))}function S(e,t,i){return r.__awaiter(this,void 0,void 0,(function(){var n,a,o;return r.__generator(this,(function(r){switch(r.label){case 0:return"onStatisticValueExpression"in e.outStatistic?(a=(n=e).outStatistic.onStatisticValueExpression,o=n,[4,m.createRendererExpression(a,t,i)]):[3,2];case 1:return o.expression=r.sent(),[2,n];case 2:return[2,e]}}))}))}var I=function(e){function t(t,r,i,n,a){var o=this,s=new f.default([],[r,i]);return(o=e.call(this,s,n,null,t)||this).invalid=!1,o.canDelete=!1,o.geohashBoundsInfo=a,o}return r.__extends(t,e),Object.defineProperty(t.prototype,"count",{get:function(){return this.attributes.cluster_count},enumerable:!0,configurable:!0}),t.create=function(e,r,i,n,a,o,s){var u=new t(r,i,n,o,s);return u.localId=e.createLocalId(u.objectId,!0),u.tileLevel=a,u},t.prototype.update=function(e,t,r,i,n){return this.geometry.coords[0]=e,this.geometry.coords[1]=t,this.tileLevel=r,this.attributes=i,this.geohashBoundsInfo=n,this.referenceId=null,this.invalid=!1,this},t.prototype.toJSON=function(){return{objectId:this.objectId,referenceId:this.referenceId,attributes:r.__assign(r.__assign({},this.attributes),{clusterId:this.objectId}),geometry:{x:this.geometry.coords[0],y:this.geometry.coords[1]}}},t}(d.default),w=function(e){function t(t,r,n,a){var o=e.call(this,t)||this;return o._deferredDeletionQueue=[],o._invalidated=!1,o._aggregateFieldsHash=null,o._geohashLevel=0,o._aggregateValueRanges={},o._aggregateValueRangesChanged=!1,o._aggregateFields=[],o._hasAggregateValueExpression=!1,o._hasViewExpression=!1,o._$view={scale:0,viewingMode:"none"},o._clusters=new Map,o._tiles=new Map,o._spatialReference=r,o._attributeStore=n,o._featureReduction=b(a),o._projectionSupportCheck=g.checkProjectionSupport(r,i.SpatialReference.WGS84),o}return r.__extends(t,e),t.prototype.setScale=function(e){var t=e!==this._$view.scale&&this._hasViewExpression,r=this._featureReduction;this._$view.scale=e,a.isSome(r)&&t&&(this._tree=new u.GeohashTree(this._aggregateFields),this._unindexFeatures(),this._reindexFeatures(!0))},t.prototype.update=function(e,t,i){return r.__awaiter(this,void 0,void 0,(function(){var n,o,s,l,c,h,d,f,p,g,y=this;return r.__generator(this,(function(r){switch(r.label){case 0:return n=this._featureReduction,o=a.andThen(t.featureReduction,b),s=t.aggregateFields.reduce((function(e,t){return e+JSON.stringify(t)}),""),l=s!==this._aggregateFieldsHash,c=null===n&&t.featureReduction||l,l?(h=this,[4,M(t.aggregateFields,this._spatialReference,i)]):[3,2];case 1:for(h._aggregateFields=r.sent(),this._hasViewExpression=!1,d=0,f=this._aggregateFields;d<f.length;d++)"onStatisticValueExpression"in(p=f[d]).outStatistic&&(g=p,this._hasAggregateValueExpression=!0,this._hasViewExpression=this._hasViewExpression||g.expression.referencesScale());r.label=2;case 2:return[4,this._projectionSupportCheck];case 3:return r.sent(),this._featureReduction=o,this._aggregateFieldsHash=s,this._aggregateValueRanges={},this._invalidated=!0,a.isNone(o)?(this._tree=null,[2]):(a.isSome(n)&&n.clusterRadius!==o.clusterRadius&&this._clusters.forEach((function(e){return e.canDelete=!0})),c&&(this._tree=new u.GeohashTree(t.aggregateFields),this._unindexFeatures()),(c||e)&&this._reindexFeatures(l),this._handleClusterUpdates(),this._tiles.forEach((function(e){return y._getClustersForTile(e,0,o.clusterRadius,null,!1)})),[2])}}))}))},t.prototype._ensureAggregateFields=function(e){if(this._hasAggregateValueExpression)for(var t=this._$view,r=0,i=this._aggregateFields;r<i.length;r++){var n=i[r];"onStatisticValueExpression"in n.outStatistic&&(e.attributes[n.outStatistic.onStatisticField]=_.callWithOptimizedFeature(n.expression,e,{$view:t},this.geometryInfo))}},t.prototype._unindexFeatures=function(){this._featuresById.forEach((function(e){e.geohashIndexed=!1}))},t.prototype._reindexFeatures=function(e){var t=this;this._featuresById.forEach((function(r){r.geohashX||r.geohashY||t._setGeohash(r),e&&t._ensureAggregateFields(r),t._attributeStore.isVisible(r)?t._insertIntoIndex(r):t._removeFromIndex(r)}))},t.prototype.onTileUpdate=function(e){var t=this,r=e.added,i=e.removed;if(r.length){var n=Math.max.apply(Math,r.map((function(e){return e.level})));this._setGeohashLevel(n),r.forEach((function(e){return t._tiles.set(e.key.id,e)}))}if(!a.isNone(this._featureReduction)){var o=this._featureReduction.clusterRadius;i.forEach((function(e){t._tiles.delete(e.key.id),t._markTileClustersForDeletion(e,o)}))}},t.prototype.sweepClusters=function(){var e=this;this._clusters.forEach((function(t,r){t.canDelete&&(e._attributeStore.freeLocalId(t.objectId),e._clusters.delete(r))}));for(var t=0,r=this._deferredDeletionQueue;t<r.length;t++)this._attributeStore.addLocalId(r[t]);this._deferredDeletionQueue=[]},t.prototype.executeTileQuery=function(t,i,n){return r.__awaiter(this,void 0,void 0,(function(){var o,s,u;return r.__generator(this,(function(r){switch(r.label){case 0:return a.isNone(this._featureReduction)?[2,e.prototype.executeTileQuery.call(this,t,i,n)]:[4,this._projectionSupportCheck];case 1:return r.sent(),this._handleClusterUpdates(),o=this._featureReduction.clusterRadius,s=this._getTransforms(t,i),u=this._getClustersForTile(t,n.pixelBuffer,o,s),this._aggregateValueRangesChanged&&(this.events.emit("valueRangesChanged",{valueRanges:this._aggregateValueRanges}),this._aggregateValueRangesChanged=!1),[2,u]}}))}))},t.prototype.getAggregate=function(e){var t=null;return this._clusters.forEach((function(r){r.localId===e&&(t=r.toJSON())})),t},t.prototype.getAggregateValueRanges=function(){return this._aggregateValueRanges},t.prototype._getClustersForTile=function(e,t,o,s,u){var l=this;void 0===u&&(u=!0),t=Math.max(t,50);for(var c=2*o,d=new Set,f=this._getGeohashLevel(e.key.level),p=Math.pow(2,e.key.level)*Math.ceil(x.TILE_SIZE/c),m=Math.ceil(t/c)+2,_=Math.ceil(x.TILE_SIZE/c)+2*m,b=e.key,M=b.row*x.TILE_SIZE,S=Math.floor(b.col*x.TILE_SIZE/c)-m,I=Math.floor(M/c)-m,w=S+_,T=I+_,R=new Array,k=e.tileInfoView.getLODInfoAt(e.key.level),F=S;F<=w;F++)for(var C=function(t){var o,c,m=F;k.wrap&&(m=F<0?F+p:F%p);var _=k.wrap&&F<0,x=k.wrap&&F%p!==F,b=L._lookupCluster(k,e.key.level,m,t,f);if(a.isSome(b)){var M=a.andThen(s,(function(e){return _?e.left:x?e.right:e.tile}));if(u&&a.isNone(M))return"continue";if(!b.count)return"continue";if(u&&1===b.count){var S=b.geohashBoundsInfo,I=S.xLL,w=S.yLL,T=S.xTR,C=S.yTR,O=S.level,E=a.unwrap(L._tree).findSingleOccupancyNode(I,w,T,C,O),G=a.unwrap(E).getLngLatBounds(),j={x:G[0],y:G[1]},V={x:G[2],y:G[3]},P=0,N=0,B=0,z=0;if(L._spatialReference.isWebMercator)P=(o=h.lngLatToXY(j.x,j.y))[0],N=o[1],B=(c=h.lngLatToXY(V.x,V.y))[0],z=c[1];else{var A=g.project(j,i.SpatialReference.WGS84,L._spatialReference),Y=g.project(V,i.SpatialReference.WGS84,L._spatialReference);if(!A||!Y)return n("esri-2d-debug")&&console.debug("Failed to reproject known tree node"),"continue";P=A.x,N=A.y,B=Y.x,z=Y.y}var X=null;if(L.forEachInBounds([P,N,B,z],(function(e){l._attributeStore.isVisible(e)&&(X&&n("esri-2d-debug")&&console.debug("Expected to find only one feature, but found multiple"),X=e)})),!X)return n("esri-2d-debug")&&console.debug("Expected to find a feature, but found none"),"continue";var q=v.getGeometry(L.geometryInfo.geometryType,L.geometryInfo.hasZ,L.geometryInfo.hasM,X.geometry,0,a.unwrap(M)),D=r.__assign(r.__assign({},X.attributes),b.attributes);b.referenceId=X.localId,d.add(b.objectId),R.push(new y.Feature(D,b.localId,q))}else u&&(d.add(b.objectId),q=v.getGeometry(L.geometryInfo.geometryType,L.geometryInfo.hasZ,L.geometryInfo.hasM,b.geometry,0,a.unwrap(M)),R.push(new y.Feature(b.attributes,b.localId,q)))}},L=this,O=I;O<=T;O++)C(O);return{features:R,objectIds:d}},t.prototype._getGeohashLevel=function(e){return Math.min(Math.ceil(e/2+2),12)},t.prototype._setGeohashLevel=function(e){var t=this,r=this._geohashLevel,i=this._getGeohashLevel(e),n=2*(Math.floor(i/2)+1)-1,o=this._tree;this._geohashLevel=n,a.isNone(o)||(n>r?(o.dropLevels(0),this._featuresById.forEach((function(e){e.geohashIndexed&&(t._setGeohash(e),o.insert(e,t._geohashLevel),e.geohashIndexed=!0)}))):n<r&&o.dropLevels(this._geohashLevel))},t.prototype._insertIntoIndex=function(e){e.geohashIndexed||(this._invalidated=!0,e.geohashIndexed=!0,a.unwrap(this._tree).insert(e,this._geohashLevel))},t.prototype._removeFromIndex=function(e){e.geohashIndexed&&(this._invalidated=!0,a.unwrap(this._tree).remove(e,this._geohashLevel),e.geohashIndexed=!1)},t.prototype._handleClusterUpdates=function(){var e=this;this._invalidated&&this._clusters.size&&this._clusters.forEach((function(t){a.isSome(t)&&(t.invalid=t.invalid||e._invalidated)})),this._invalidated=!1},t.prototype._getTransforms=function(e,t){var i={originPosition:"upperLeft",scale:[e.resolution,e.resolution],translate:[e.bounds[0],e.bounds[3]]},n=c.getInfo(t);if(!n)return{tile:i,left:null,right:null};var a=n.valid,o=a[0],s=a[1];return{tile:i,left:r.__assign(r.__assign({},i),{translate:[s,e.bounds[3]]}),right:r.__assign(r.__assign({},i),{translate:[o-s+e.bounds[0],e.bounds[3]]})}},t.prototype._getClusterId=function(e,t,r){return(15&e)<<28|(16383&t)<<14|16383&r},t.prototype._markForDeletion=function(e,t,r){var i=this._getClusterId(e,t,r);if(this._clusters.has(i)){var n=this._clusters.get(i);a.isSome(n)?n.canDelete=!0:this._clusters.delete(i)}},t.prototype._getClusterBounds=function(e,t,r){if(a.isNone(this._featureReduction))return null;var i=this._featureReduction.clusterRadius,n=2*i,o=r%2?t*n:t*n+i,s=r*n,u=s/x.TILE_SIZE,l=(o+n)/x.TILE_SIZE,c=(s-n)/x.TILE_SIZE;return[e.getXForColumn(o/x.TILE_SIZE),e.getYForRow(u),e.getXForColumn(l),e.getYForRow(c)]},t.prototype._lookupCluster=function(e,t,n,o,s){var u,c;if(a.isNone(this._featureReduction)||a.isNone(this._tree))return null;var d=this._getClusterId(t,n,o),f=this._clusters.get(d);if(f&&a.isSome(f)&&!f.invalid&&!f.canDelete)return f;var p=this._getClusterBounds(e,n,o),y=p[0],v=p[1],m=p[2],_=p[3],x={x:y,y:v},b={x:m,y:_},M=0,S=0,w=0,T=0;if(this._spatialReference.isWebMercator)M=(u=h.xyToLngLat(x.x,x.y))[0],S=u[1],w=(c=h.xyToLngLat(b.x,b.y))[0],T=c[1];else{var R=g.project(x,this._spatialReference,i.SpatialReference.WGS84),k=g.project(b,this._spatialReference,i.SpatialReference.WGS84);if(!R||!k)return null;M=R.x,S=R.y,w=k.x,T=k.y}M>w&&(w=180);var F={geohashX:0,geohashY:0},C={geohashX:0,geohashY:0};l.setGeohashXY(F,S,M,s),l.setGeohashXY(C,T,w,s);var L=F.geohashX,O=F.geohashY,E=C.geohashX,G=C.geohashY,j={xLL:L,yLL:O,xTR:E,yTR:G,level:s},V=this._tree.getRegionStatistics(L,O,E,G,s),P=V.count,N=P?V.xTotal/P:0,B=P?V.yTotal/P:0;if(a.isSome(f)&&f.canDelete){var z=this._attributeStore.removeLocalId(f.objectId);this._deferredDeletionQueue.push(z)}var A=a.isSome(f)&&!f.canDelete&&f.invalid,Y=r.__assign({cluster_count:P},V.attributes),X=this._attributeStore,q=A?f.update(N,B,t,Y,j):I.create(X,d,N,B,t,Y,j);return 0===P&&(q.geometry.coords[0]=(y+m)/2,q.geometry.coords[1]=(v+_)/2),this._attributeStore.setAttributeData(q.localId,q,this.geometryInfo,null),this._clusters.set(d,q),this._updateAggregateValueRangeForCluster(q,q.tileLevel),q},t.prototype._updateAggregateValueRangeForCluster=function(e,t){var r=this._aggregateValueRanges[t]||{minValue:1/0,maxValue:0},i=r.minValue,n=r.maxValue;r.minValue=Math.min(i,e.count),r.maxValue=Math.max(n,e.count),this._aggregateValueRanges[t]=r,i===r.minValue&&n===r.maxValue||(this._aggregateValueRangesChanged=!0)},t.prototype._markTileClustersForDeletion=function(e,t){for(var r=2*t,i=Math.ceil(x.TILE_SIZE/r),n=e.key,a=n.row*x.TILE_SIZE,o=Math.floor(n.col*x.TILE_SIZE/r),s=Math.floor(a/r),u=o;u<o+i;u++)for(var l=s;l<s+i;l++)this._markForDeletion(e.key.level,u,l)},t.prototype._setGeohash=function(e){var t=e.geometry;if(t&&t.coords.length){var r=g.project({x:t.coords[0],y:t.coords[1]},this._spatialReference,i.SpatialReference.WGS84);r?l.setGeohashXY(e,r.y,r.x,12):n("esri-2d-debug")&&console.debug("Tried to project feature geometry, but got back `null`")}},t.prototype._add=function(t){var r=this._featuresById.get(t.objectId);e.prototype._add.call(this,t),this._ensureAggregateFields(t),a.isSome(this._featureReduction)&&a.isSome(this._tree)&&(r?(t.geohashIndexed=r.geohashIndexed,t.geohashX=r.geohashX,t.geohashY=r.geohashY):this._setGeohash(t),!t.geohashIndexed&&this._attributeStore.isVisible(t)&&this._insertIntoIndex(t))},t.prototype._remove=function(t){return a.isSome(this._featureReduction)&&a.isSome(this._tree)&&this._removeFromIndex(t),e.prototype._remove.call(this,t)},t}(p.default);t.ClusterStore=w}).apply(null,i))||(e.exports=n)},"8pdz":function(e,t,r){var i,n;i=[r.dj.c(e.i),t],void 0===(n=(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=new Float64Array(2),i=new Float64Array(2);function n(e){return e<=57?e-48:e<=104?e-88:e<=107?e-89:e<=110?e-90:e-91}function a(e){return"0123456789bcdefghjkmnpqrstuvwxyz"[e]}function o(e){return(e[0]+e[1])/2}function s(e,t,r){return e[0]=t,e[1]=r,e}function u(e,t){var r=o(e),i=t,n=!t;e[0]=n*e[0]+i*r,e[1]=n*r+i*e[1]}function l(e,t){var r=t>o(e);return u(e,r),r}function c(e,t){for(var a=s(r,-90,90),l=s(i,-180,180),c=0;c<t.length;c++){var h=n(t.charCodeAt(c));c%2==0?(u(l,!!(16&h)),u(l,!!(4&h)),u(l,!!(1&h)),u(a,!!(8&h)),u(a,!!(2&h))):(u(a,!!(16&h)),u(a,!!(4&h)),u(a,!!(1&h)),u(l,!!(8&h)),u(l,!!(2&h)))}return e[0]=o(a),e[1]=o(l),e}function h(e,t,n){for(var o="",u=s(r,-90,90),c=s(i,-180,180),h=0;h<n;h++){var d=0;h%2?(d|=l(u,e)<<4,d|=l(c,t)<<3,d|=l(u,e)<<2,d|=l(c,t)<<1,d|=l(u,e)<<0):(d|=l(c,t)<<4,d|=l(u,e)<<3,d|=l(c,t)<<2,d|=l(u,e)<<1,d|=l(c,t)<<0),o+=a(d)}return o}function d(e){var t=Math.floor(5*e/2);return 180/Math.pow(2,t)}function f(e){var t=Math.ceil(5*e/2);return 360/Math.pow(2,t)}function p(e,t){return t?1&e|(4&e)>>1|(16&e)>>2:(2&e)>>1|(8&e)>>2}function g(e,t){return t?(2&e)>>1|(8&e)>>2:1&e|(4&e)>>1|(16&e)>>2}function y(e,t,r){var i=!((e.length-1)%2),o=e.substring(0,e.length-1),s=n(e.charCodeAt(e.length-1)),u=0,l=0,c=0,h=0;i?(u=8,l=4,c=1&s|(4&s)>>1|(16&s)>>2,h=(2&s)>>1|(8&s)>>2):(u=4,l=8,h=1&s|(4&s)>>1|(16&s)>>2,c=(2&s)>>1|(8&s)>>2);var d=c+t,f=h+r,p=Math.floor(d/u),g=Math.floor(f/l),v=a(function(e,t,r){return r?1&e|(1&t)<<1|(2&e)<<1|(2&t)<<2|(4&e)<<2:1&t|(1&e)<<1|(2&t)<<1|(2&e)<<2|(4&t)<<2}(d-p*u,f-g*l,i));return e.length>1&&(p||g)?y(o,p,g)+v:o+v}t.decodeBase32Char=n,t.encodeBase32Char=a,t.decodeGeohash=c,t.convertGeohash32ToXY=function(e,t){for(var r=0,i=0,a=30,o=30,s=0;s<t.length;s++){var u=n(t.charCodeAt(s)),l=s%2==0;r|=p(u,l)<<(a-=l?3:2),i|=g(u,l)<<(o-=l?2:3)}return{geohashX:r,geohashY:i}},t.decodeGeohashXY=function(e,t){for(var r=-90,i=90,n=-180,a=180,o=0;o<t;o++){for(var s=Math.ceil((o+1)/2),u=Math.floor((o+1)/2),l=1-o%2,c=30-(3*s+2*u),h=30-(2*s+3*u),d=2*l+3*(1-l),f=(7*l+3*(1-l)<<c&e.geohashX)>>c,p=(3*l+7*(1-l)<<h&e.geohashY)>>h,g=3*l+2*(1-l)-1;g>=0;g--){var y=(n+a)/2,v=f&1<<g?1:0;n=(1-v)*n+v*y,a=(1-v)*y+v*a}for(g=d-1;g>=0;g--){var m=(r+i)/2,_=p&1<<g?1:0;r=(1-_)*r+_*m,i=(1-_)*m+_*i}}return[n,r,a,i]},t.setGeohashXY=function(e,t,r,i){i%2&&(i+=1);for(var n=0,a=0,o=-90,s=90,u=-180,l=180,c=0;c<i/2;c++){for(var h=0;h<5;h++){var d=(u+l)/2,f=r>d?1:0;n|=f<<29-(h+5*c),u=(1-f)*u+f*d,l=(1-f)*d+f*l}for(h=0;h<5;h++){var p=(o+s)/2,g=t>p?1:0;a|=g<<29-(h+5*c),o=(1-g)*o+g*p,s=(1-g)*p+g*s}}e.geohashX=n,e.geohashY=a},t.encodeGeohash=h,t.latDistPerGeohash=d,t.lonDistPerGeohash=f,t.unpackXBits=p,t.unpackYBits=g,t.getRelativeGeohash=y,t.getIntersectingGeohashes=function(e,t,r,i,n){for(var a=Math.abs(r-e),o=Math.abs(i-t),s=d(n),u=f(n),l=Math.ceil(o/u),c=Math.ceil(a/s),p=h(e,t,n),g=new Array,v=0;v<l;v++)for(var m=0;m<c;m++)g.push(y(p,v,m));return g},t.forEachIntersectingGeohash=function(e,t,r,i,n,a){for(var o=Math.abs(r-e),s=Math.abs(i-t),u=d(n),l=f(n),p=Math.ceil(s/l),g=Math.ceil(o/u),v=h(e,t,n),m=0;m<p;m++)for(var _=0;_<g;_++){var x=y(v,m,_),b=c([0,0],x),M=b[0],S=b[1],I=S-l/2,w=M+u/2,T=S+l/2,R=u*l,k=Math.max(e,M-u/2),F=Math.max(t,I),C=Math.min(r,w)-k,L=Math.min(i,T)-F;a(x,Math.abs(C*L)/R)}}}).apply(null,i))||(e.exports=n)},Btct:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("ma1f"),r("7MDj"),r("H1tY"),r("qsST"),r("LxLY"),r("qMld"),r("Vx27"),r("Ytki"),r("ZooB"),r("I90O"),r("hz/Y"),r("IpeC"),r("YaB4"),r("lvbU"),r("0SZq"),r("oWCy")],n=(function(e,t,r,i,n,a,o,s,u,l,c,h,d,f,p,g,y,v,m){Object.defineProperty(t,"__esModule",{value:!0});var _=o.getLogger("esri.views.2d.layers.features.controllers.BaseController"),x=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._availableFields=[],t._pixelBuffer=0,t.config=null,t.filters=new Array(g.definitions.MAX_FILTERS),t.processor=null,t.remoteClient=null,t.service=null,t.tileStore=null,t}return r.__extends(t,e),t.prototype.initialize=function(){this.handles.add([this.tileStore.on("update",this.onTileUpdate.bind(this))]),this._initAttributeStore()},t.prototype.startup=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){switch(e.label){case 0:return this._initAttributeStore(),[4,this.attributeStore.setAttributeBindings(this.renderer,this.arcadeInfo)];case 1:return e.sent(),[4,u.all([this.attributeStore.updateFilters(this),this.updatePixelBuffer()])];case 2:return e.sent(),[2]}}))}))},t.prototype.destroy=function(){this.attributeStore&&this.attributeStore.destroy()},Object.defineProperty(t.prototype,"arcadeInfo",{get:function(){return{geometryType:this.service.geometryType,fields:this.service.fields,spatialReference:this.spatialReference}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"featureReduction",{get:function(){return this.config.featureReduction},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fieldsIndex",{get:function(){return new d(this.service.fields)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"geometryInfo",{get:function(){return{geometryType:this.service.geometryType,hasZ:!1,hasM:!1}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"returnCentroid",{get:function(){return this._get("returnCentroid")||function(e,t,r){if("esriGeometryPolygon"===t&&e.labelingInfo)return!0;if("esriGeometryPolygon"!==t)return!1;function i(e){if(!e)return!1;var t=e.type;return"simple-marker"===t||"picture-marker"===t||"text"===t||"web-style"===t||"cim"===t}switch(r.type){case"simple":return i(r.symbol);case"unique-value":return i(r.defaultSymbol)||r.uniqueValueInfos.some((function(e){return i(e.symbol)}));case"class-breaks":return i(r.defaultSymbol)||r.classBreakInfos.some((function(e){return i(e.symbol)}));case"dot-density":return!1;default:return!0}}(this.config,this.service.geometryType,this.renderer)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"returnOutline",{get:function(){return function(e,t){switch(e){case"esriGeometryPoint":case"esriGeometryPolyline":case"esriGeometryMultipoint":return!0;case"esriGeometryPolygon":return function(e){var t=e&&e.getSymbols();return"backgroundFillSymbol"in e&&null!=e.backgroundFillSymbol&&"outline"in e.backgroundFillSymbol&&null!=e.backgroundFillSymbol.outline||t.some((function(e){return"outline"in e&&null!=e.outline}))}(t)}}(this.service.geometryType,this.renderer)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryInfo",{get:function(){return{returnCentroid:this.returnCentroid,returnGeometry:!0,outFields:this.availableFields,definitionExpression:this.config.definitionExpression,gdbVersion:this.config.gdbVersion,historicMoment:this.config.historicMoment}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderer",{get:function(){return this.config?f.fromJSON(this.config.renderer):(_.error("mapview-controller","Unable to create renderer for undefined configuration"),null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"availableFields",{get:function(){var e=this,t=this.config.availableFields.filter((function(t){return-1===e._availableFields.indexOf(t)}));return this._availableFields=r.__spreadArrays(this._availableFields,t),this._availableFields},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"spatialReference",{get:function(){return this.tileStore.tileScheme.spatialReference},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"viewParams",{get:function(){return{viewingMode:"",scale:this.viewState&&this.viewState.scale||1}},enumerable:!0,configurable:!0}),t.prototype.getObjectId=function(e){return this.attributeStore.getFeatureId(e)},t.prototype.getAggregate=function(e){return null},t.prototype.getAggregateValueRanges=function(){return{}},t.prototype.getLocalId=function(e){return this.attributeStore.getLocalId(e)},t.prototype.mapValidLocalIds=function(e){var t=this;return e.map((function(e){return t.attributeStore.getLocalId(e)})).filter((function(e){return null!=e}))},t.prototype.setViewState=function(e){this._set("viewState",e)},t.prototype.updatePixelBuffer=function(){return r.__awaiter(this,void 0,void 0,(function(){var e;return r.__generator(this,(function(t){switch(t.label){case 0:return[4,m.computePxBuffer(this.renderer,this.service.geometryType)];case 1:return e=t.sent(),this._pixelBuffer=Math.max(this._pixelBuffer,e),[2]}}))}))},t.prototype.setHighlight=function(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){return[2,this.attributeStore.setHighlight(e)]}))}))},t.prototype.validateConfig=function(e){for(var t=0,r=e.filters;t<r.length;t++){var n=r[t];if(s.isSome(n)&&n.where)try{c.validateWhere(this.fieldsIndex,n.where)}catch(e){throw new i("mapview-bad-filter",e.message,{filter:n,missingFields:e.details})}}},t.prototype.onFeatureAdd=function(e){e.localId=this.attributeStore.createLocalId(e.objectId),this.attributeStore.setAttributeData(e.localId,e,this.geometryInfo,this.viewParams)},t.prototype.onFeatureRemove=function(e){!e.localId&&a("esri-2d-debug")&&console.debug("Feature must have localId"),this.attributeStore.freeLocalId(e.objectId)},t.prototype.enableEvent=function(e){},t.prototype._initAttributeStore=function(){var e=this;this.attributeStore?this.attributeStore.invalidateResources():this.attributeStore=new y.default({type:"remote",initialize:function(t,r){return e.remoteClient.invoke("tileRenderer.featuresView.attributeView.initialize",t,{signal:r})},update:function(t,r){return e.remoteClient.invoke("tileRenderer.featuresView.attributeView.requestUpdate",t,{signal:r})},render:function(){return e.remoteClient.invoke("tileRenderer.featuresView.requestRender")}})},t.prototype._createQueryEngine=function(e){return new h.default({definitionExpression:this.config.definitionExpression,fields:this.service.fields,geometryType:this.service.geometryType,objectIdField:this.service.objectIdField,hasM:!1,hasZ:!1,spatialReference:this.spatialReference.toJSON(),cacheSpatialQueries:!0,featureStore:e,timeInfo:this.service.timeInfo})},t.prototype._createTempQueryEngine=function(e){return void 0===e&&(e=this._createFeatureStore()),this._createQueryEngine(e)},t.prototype._createFeatureStore=function(){return new v.ClusterStore({geometryType:this.service.geometryType,hasM:!1,hasZ:!1},this.spatialReference,this.attributeStore,this.featureReduction)},t.prototype._createDefaultQuery=function(e){var t=new p,r=e.outFields,i=this.config,n=i.historicMoment,a=i.definitionExpression;return r=r.length/this.service.fields.length>=.75?["*"]:r,t.gdbVersion=i.gdbVersion,t.historicMoment=null!=n?new Date(n):null,t.num=e.num,t.outFields=r,t.outSpatialReference=this.spatialReference,t.returnGeometry=e.returnGeometry,t.returnCentroid=e.returnCentroid,t.start=e.resultOffset,t.where=a||"1=1",t},t.prototype.hasGeometryFilter=function(){return this.filters.some((function(e){return s.isSome(e)&&!!e.geometry}))},r.__decorate([l.property({readOnly:!0,dependsOn:["config","service","spatialReference"]})],t.prototype,"arcadeInfo",null),r.__decorate([l.property()],t.prototype,"config",void 0),r.__decorate([l.property({readOnly:!0,dependsOn:["config"]})],t.prototype,"featureReduction",null),r.__decorate([l.property({readOnly:!0,dependsOn:["service"]})],t.prototype,"fieldsIndex",null),r.__decorate([l.property()],t.prototype,"filters",void 0),r.__decorate([l.property({readOnly:!0,dependsOn:["service"]})],t.prototype,"geometryInfo",null),r.__decorate([l.property({readOnly:!0,dependsOn:["config"]})],t.prototype,"returnCentroid",null),r.__decorate([l.property({readOnly:!0,dependsOn:["service","config"]})],t.prototype,"returnOutline",null),r.__decorate([l.property({readOnly:!0,dependsOn:["config","availableFields"]})],t.prototype,"queryInfo",null),r.__decorate([l.property({dependsOn:["config"],readOnly:!0})],t.prototype,"renderer",null),r.__decorate([l.property()],t.prototype,"processor",void 0),r.__decorate([l.property({readOnly:!0,dependsOn:["config"]})],t.prototype,"availableFields",null),r.__decorate([l.property({constructOnly:!0})],t.prototype,"remoteClient",void 0),r.__decorate([l.property({constructOnly:!0})],t.prototype,"service",void 0),r.__decorate([l.property({dependsOn:["tileStore"]})],t.prototype,"spatialReference",null),r.__decorate([l.property({constructOnly:!0})],t.prototype,"tileInfo",void 0),r.__decorate([l.property({constructOnly:!0})],t.prototype,"tileStore",void 0),r.__decorate([l.property({readOnly:!0})],t.prototype,"viewState",void 0),r.__decorate([l.property({readOnly:!0,dependsOn:["viewState"]})],t.prototype,"viewParams",null),r.__decorate([l.subclass("esri.views.2d.layers.features.controllers.BaseController")],t)}(n.HandleOwner);t.default=x}).apply(null,i),void 0===n||(e.exports=n)},JOu6:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zIqJ"),r("LxLY"),r("8pdz")],void 0===(n=(function(e,t,r,i,n){Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e){this._pool=new r.default(8024),this._nodes=0,this._root=new o(0,0,0),this._fields=e}return e.prototype._acquire=function(e,t,r){var n=this._pool.dequeue();return this._nodes++,i.isSome(n)?n.realloc(e,t,r):new o(e,t,r)},e.prototype._release=function(e){this._nodes--,this._pool.enqueue(e)},Object.defineProperty(e.prototype,"count",{get:function(){return this._root.count},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"size",{get:function(){return this._nodes},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"poolSize",{get:function(){return this._pool.size},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"depth",{get:function(){var e=0;return this._forEachNode((function(t){return e=Math.max(e,t.depth)})),e},enumerable:!0,configurable:!0}),e.prototype.dropLevels=function(e){var t=this;this._forEachNode((function(r){if(r.depth>=e)for(var i=0;i<r.children.length;i++){var n=r.children[i];r.children[i]=null,n&&t._release(n)}}))},e.prototype.insert=function(e,t,r){void 0===r&&(r=0);for(var i=this._root,n=0,a=0,o=0;null!==i;){if(i.depth>=r&&(i.count+=1,i.xTotal+=e.geometry.coords[0],i.yTotal+=e.geometry.coords[1],i.xGeohashTotal+=e.geohashX,i.yGeohashTotal+=e.geohashY,this._updateStatistics(e,i,1)),n>=t)return;var s=Math.ceil((n+1)/2),u=Math.floor((n+1)/2),l=1-n%2,c=30-(3*s+2*u),h=30-(2*s+3*u),d=(e.geohashX&7*l+3*(1-l)<<c)>>c,f=(e.geohashY&3*l+7*(1-l)<<h)>>h,p=d+f*(8*l+4*(1-l));a=a<<3*l+2*(1-l)|d,o=o<<2*l+3*(1-l)|f,null==i.children[p]&&(i.children[p]=this._acquire(a,o,n+1)),n+=1,i=i.children[p]}},e.prototype.remove=function(e,t){for(var r=this._root,i=0;null!==r;){if(r.count-=1,r.xTotal-=e.geometry.coords[0],r.yTotal-=e.geometry.coords[1],r.xGeohashTotal-=e.geohashX,r.yGeohashTotal-=e.geohashY,this._updateStatistics(e,r,-1),i>=t)return;var n=Math.ceil((i+1)/2),a=Math.floor((i+1)/2),o=1-i%2,s=30-(3*n+2*a),u=30-(2*n+3*a),l=((e.geohashX&7*o+3*(1-o)<<s)>>s)+((e.geohashY&3*o+7*(1-o)<<u)>>u)*(8*o+4*(1-o)),c=r.children[l];1===c.count&&(this._release(c),r.children[l]=null),i+=1,r=c}},e.prototype.find=function(e,t,r){return this._root.find(e,t,r,0,0,0)},e.prototype.findSingleOccupancyNode=function(e,t,r,i,n){for(var a=this._root;null!==a;){var o=a.depth,s=a.xNode,u=a.yNode,l=1-o%2,c=a.xGeohashTotal/a.count,h=a.yGeohashTotal/a.count;if(1===a.count&&e<c&&c<=r&&t<h&&h<=i)return a;if(o>=n)a=a.next;else{for(var d=Math.ceil((o+1)/2),f=Math.floor((o+1)/2),p=30-(3*d+2*f),g=30-(2*d+3*f),y=~((1<<p)-1),v=~((1<<g)-1),m=(t&v)>>g,_=(r&y)>>p,x=(i&v)>>g,b=s<<3*l+2*(1-l),M=u<<2*l+3*(1-l),S=b+8*l+4*(1-l),I=M+4*l+8*(1-l),w=Math.max(b,(e&y)>>p),T=Math.max(M,m),R=Math.min(S,_),k=Math.min(I,x),F=null,C=null,L=T;L<=k;L++)for(var O=w;O<=R;O++){var E=a.children[O-b+(L-M)*(8*l+4*(1-l))];E&&(F||((F=E).next=a.next),C&&(C.next=E),C=E,E.next=a.next)}a=F||a.next}}return null},e.prototype.getRegionStatistics=function(e,t,r,i,n){for(var a=this._root,o=0,s=0,u=0,l={};null!==a;){var c=a.depth,h=a.xNode,d=a.yNode;if(c>=n){var f=a.xGeohashTotal/a.count,p=a.yGeohashTotal/a.count;e<f&&f<=r&&t<p&&p<=i&&(o+=a.count,s+=a.xTotal,u+=a.yTotal,this._aggregateStatistics(l,a.statistics)),a=a.next}else{for(var g=Math.ceil((c+1)/2),y=Math.floor((c+1)/2),v=1-c%2,m=30-(3*g+2*y),_=30-(2*g+3*y),x=~((1<<m)-1),b=~((1<<_)-1),M=(t&b)>>_,S=(r&x)>>m,I=(i&b)>>_,w=h<<3*v+2*(1-v),T=d<<2*v+3*(1-v),R=w+8*v+4*(1-v),k=T+4*v+8*(1-v),F=Math.max(w,(e&x)>>m),C=Math.max(T,M),L=Math.min(R,S),O=Math.min(k,I),E=null,G=null,j=C;j<=O;j++)for(var V=F;V<=L;V++){var P=a.children[V-w+(j-T)*(8*v+4*(1-v))];if(P){if(j!==C&&j!==O&&V!==F&&V!==L){p=P.yGeohashTotal/P.count,e<(f=P.xGeohashTotal/P.count)&&f<=r&&t<p&&p<=i&&(o+=P.count,s+=P.xTotal,u+=P.yTotal,this._aggregateStatistics(l,P.statistics));continue}E||((E=P).next=a.next),G&&(G.next=P),G=P,P.next=a.next}}a=E||a.next}}return{count:o,attributes:this._normalizeStatistics(l,o),xTotal:s,yTotal:u}},e.prototype._forEachNode=function(e){for(var t=this._root;null!==t;){var r=this._linkChildren(t)||t.next;e(t),t=r}},e.prototype._linkChildren=function(e){for(var t=null,r=null,i=0;i<=e.children.length;i++){var n=e.children[i];n&&(t||((t=n).next=e.next),r&&(r.next=n),r=n,n.next=e.next)}return t},e.prototype._updateStatistics=function(e,t,r){for(var i=0,n=this._fields;i<n.length;i++){var a=n[i],o=a.name,s=e.attributes[a.outStatistic.onStatisticField];switch(a.outStatistic.statisticType){case"norm":t.statistics[o]||(t.statistics[o]={});var u=e.attributes[a.outStatistic.onStatisticNormalizationField],l=t.statistics[o].onStatisticField||0,c=t.statistics[o].onStatisticNormalizationField||0;null==s||isNaN(s)||null==u||0===u||isNaN(u)||(t.statistics[o].onStatisticField=l+r*s,t.statistics[o].onStatisticNormalizationField=c+r*u);break;case"sum":case"avg":t.statistics[o]||(t.statistics[o]={value:0,nanCount:0});var h=t.statistics[o].value,d=t.statistics[o].nanCount;null==s||isNaN(s)?t.statistics[o].nanCount=d+r:t.statistics[o].value=h+r*s;break;case"avg_angle":t.statistics[o]||(t.statistics[o]={x:0,y:0,nanCount:0});var f=t.statistics[o].x,p=t.statistics[o].y,g=(d=t.statistics[o].nanCount,Math.PI/180);null==s||isNaN(s)?t.statistics[o].nanCount=d+r:(t.statistics[o].x=f+r*Math.cos(s*g),t.statistics[o].y=p+r*Math.sin(s*g));break;case"mode":t.statistics[o]||(t.statistics[o]={}),t.statistics[o][s]=(h=t.statistics[o][s]||0)+r}}},e.prototype._aggregateStatistics=function(e,t){for(var r=0,i=this._fields;r<i.length;r++){var n=i[r],a=n.name;switch(n.outStatistic.statisticType){case"sum":case"avg":case"avg_angle":case"mode":case"norm":for(var o in e[a]||(e[a]={}),t[a])e[a][o]=(e[a][o]||0)+t[a][o]}}},e.prototype._normalizeStatistics=function(e,t){for(var r={},i=0,n=this._fields;i<n.length;i++){var a=n[i],o=a.name;switch(a.outStatistic.statisticType){case"norm":var s=e[o];if(t&&null==s.onStatisticNormalizationField)break;if(t&&s.onStatisticNormalizationField){r[o]=s.onStatisticField/s.onStatisticNormalizationField;break}r[o]=0;break;case"sum":if(!t)break;var u=e[o],l=u.value;if(!(t-(h=u.nanCount)))break;r[o]=l;break;case"avg":if(!t)break;var c=e[o];if(l=c.value,!(t-(h=c.nanCount)))break;r[o]=l/(t-h);break;case"avg_angle":if(!t)break;var h,d=e[o],f=d.x,p=d.y;if(!(t-(h=d.nanCount)))break;var g=180/Math.PI,y=Math.atan2(p/(t-h),f/(t-h))*g;r[o]=y;break;case"mode":var v=e[o],m=0,_=null;for(var x in v){var b=v[x];b>m&&(m=b,_=x)}r[o]="null"===_?null:_}}return r},e}();t.GeohashTree=a;var o=function(){function e(e,t,r){this.count=0,this.xTotal=0,this.yTotal=0,this.statistics={},this.next=null,this.depth=0,this.xNode=0,this.yNode=0,this.xGeohashTotal=0,this.yGeohashTotal=0,this.children=new Array(32);for(var i=0;i<this.children.length;i++)this.children[i]=null;this.xNode=e,this.yNode=t,this.depth=r}return e.prototype.realloc=function(e,t,r){for(var i=0;i<this.children.length;i++)this.children[i]=null;return this.xNode=e,this.yNode=t,this.depth=r,this.next=null,this.xGeohashTotal=0,this.yGeohashTotal=0,this.xTotal=0,this.yTotal=0,this.count=0,this.statistics={},this},e.prototype.getLngLatBounds=function(){var e=this.depth,t=Math.ceil(e/2),r=Math.floor(e/2);return n.decodeGeohashXY({geohashX:this.xNode<<30-(3*t+2*r),geohashY:this.yNode<<30-(2*t+3*r)},this.depth)},e.prototype.find=function(e,t,r,i,n,a){if(i>=r)return this;var o=1-i%2,s=3*o+2*(1-o),u=2*o+3*(1-o),l=30-n-s,c=30-a-u,h=this.children[((e&7*o+3*(1-o)<<l)>>l)+((t&3*o+7*(1-o)<<c)>>c)*(8*o+4*(1-o))];return null==h?null:h.find(e,t,r,i+1,n+s,a+u)},e}()}).apply(null,i))||(e.exports=n)},oWCy:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("qMld"),r("jBNx"),r("fb50"),r("YaB4"),r("tI6k"),r("wjMf")],void 0===(n=(function(e,t,r,i,n,a,o,s,u){Object.defineProperty(t,"__esModule",{value:!0});var l={"simple-marker":1,"picture-marker":1,text:1,"simple-line":1,"simple-fill":1,"picture-fill":1,cim:1,"web-style":1};t.computePxBuffer=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var a,o,s,u,l,c;return r.__generator(this,(function(r){switch(r.label){case 0:if("heatmap"===e.type)return[2,Math.round(3*e.blurRadius)];if("dot-density"===e.type)return[2,0];if("dictionary"===e.type)return"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?[2,100]:[2,50];for(a=e.getSymbols(),o=function(e){if(!("visualVariables"in e))return 0;if(!e.hasVisualVariables("size"))return 0;var t=e.getVisualVariablesForType("size");if(!t[0])return 0;var r=t[0];return"stops"===r.transformationType?r.stops.map((function(e){return e.size})).reduce(v,0):"clamped-linear"===r.transformationType?"number"==typeof r.maxSize?r.maxSize:r.maxSize.stops.map((function(e){return e.size})).reduce(v,0):"real-world-size"===r.transformationType?30:void 0}(e),s=[],u=0,l=a;u<l.length;u++)s.push(g(l[u],o));return[4,i.all(s)];case 1:return c=r.sent(),[2,n.pt2px(c.reduce(v,0))]}}))}))};var c=[0,0,0,0];function h(e,t){return null==e?t:e}function d(e,t){return null==e.outline?t:h(e.outline.width,t)}var f={sdf:!0,code:99,metrics:s.AVERAGE_GLYPH_MOSAIC_ITEM.metrics,rect:new a.default(0,0,24,24),page:0,textureBinding:2};function p(e,t){return r.__awaiter(this,void 0,void 0,(function(){var i,n,a,s,l,g,v,m,_,x,b,M,S,I;return r.__generator(this,(function(w){switch(w.label){case 0:return"simple-marker"===e.type?(i=Math.max(h(e.size,12),t),[2,y(e)+.707*i]):"picture-marker"===e.type?(n=Math.max(h(e.height,12),t),a=h(e.width,12)*(n/h(e.height,12)),s=a/2,l=n/2,[2,y(e)+Math.sqrt(s*s+l*l)]):"text"===e.type?(g=function(e){var t=e.text&&e.text.length;if(!t)return{glyphMosaicItems:[f]};for(var i=[],n=0;n<t;n++)i.push(r.__assign(r.__assign({},f),{code:e.text.charCodeAt(n)}));return{glyphMosaicItems:i}}(e),u.getTextSymbolSize(c,e,g),v=Math.abs(c[0]),m=Math.abs(c[1]),_=c[2],x=c[3],[2,Math.max(v,m)+Math.max(_,x)]):"simple-line"===e.type?(b=e,M=Math.max(h(b.width,.75),t)/2,b.marker?[2,Math.max(6*b.width,2*t)]:[2,M]):"simple-fill"===e.type||"picture-fill"===e.type?[2,Math.max(d(e,0),t)/2]:"cim"===e.type?(S=o.CIMSymbolHelper.getEnvelope(e.data))?[2,Math.sqrt(S.width*S.width+S.height*S.height)]:[2,0]:"web-style"!==e.type?[3,2]:(I=p,[4,e.fetchCIMSymbol()]);case 1:return[2,I.apply(void 0,[w.sent(),t])];case 2:return[2,0]}}))}))}function g(e,t){return r.__awaiter(this,void 0,void 0,(function(){var i,n;return r.__generator(this,(function(r){switch(r.label){case 0:return function(e){return e.type in l}(e)?(n=(i=Math).min,[4,p(e,t)]):[2,0];case 1:return[2,n.apply(i,[r.sent(),75])]}}))}))}function y(e){var t=h(e.xoffset,0),r=h(e.yoffset,0);return Math.sqrt(t*t+r*r)}function v(e,t){return Math.max(e,t)}}).apply(null,i))||(e.exports=n)},wjMf:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("LxLY"),r("jBNx"),r("aMdW"),r("Zx0K"),r("W9tT"),r("ab6c"),r("Z4y+"),r("lRq4"),r("hBh5"),r("Thzy"),r("Lzvl"),r("fw2w"),r("nrlZ"),r("nrlZ"),r("YaB4"),r("YaB4")],void 0===(n=(function(e,t,r,i,n,a,o,s,u,l,c,h,d,f,p,g,y,v){Object.defineProperty(t,"__esModule",{value:!0});var m=Math.PI/180,_=a.mat2df32.create(),x=s.vec2f32.create(),b=l.create();t.getBounds=function(e,t,r,i,n,a,o){if(!i||!r.symbol)return e[0]=e[1]=e[2]=e[3]=0,t[0]=t[1]=t[2]=t[3]=0,e;var s=i;if(!d.isPoint(s)){c.getBoundsXY(e,s);var u=t[0];0===u&&(u=function(e){var t=0;switch(e.symbol.type){case"simple-fill":case"picture-fill":var r=e.symbol.outline;if(!r)return 0;t=r.width;break;case"simple-line":t=e.symbol.width;break;case"simple-marker":t=e.symbol.size;break;case"picture-marker":t=Math.max(e.symbol.width,e.symbol.height);break;case"text":var i=[0,0,0,0];O(i,e.symbol,e.mosaicItem);var n=Math.max(Math.abs(i[0]),Math.abs(i[1]));t=Math.max(i[2],i[3])+n;break;case"cim":case"expanded-cim":var a=y.CIMSymbolHelper.getEnvelope(e.symbol.data);t=Math.sqrt(a.width*a.width+a.height*a.height)}return t}(r),t[0]=u);var l=n*u/2;return e[0]-=l,e[1]-=l,e[2]+=l,e[3]+=l,e}var h=s.x,p=s.y;return"text"===r.symbol.type&&0===t[2]&&0===t[3]&&O(t,r.symbol,r.mosaicItem),function(e,t,r,i,n,a,o,s){var u;switch(i.type){case"simple-marker":case"picture-marker":u=F(t,r,i,a,o,0);break;case"text":u=L(t,r,i,n,a,0);break;case"cim":case"expanded-cim":u=C(t,r,i,a,o,0)}for(var l,c=0,h=0;h<u.rings[0].length-1;h++)l=u.rings[0][h],c=Math.max(c,(t-l[0])*(t-l[0])+(r-l[1])*(r-l[1]));c=Math.sqrt(c);var d=f.normalizeMapX(t-c,s),p=f.normalizeMapX(t+c,s);if(d>p){var y=g.getInfo(s);if(y){var v=y.valid;d=v[0],p=v[1]}}e[0]=d,e[1]=r-c,e[2]=p,e[3]=r+c}(e,h,p,r.symbol,t,n,a,o),e},t.isMarkerSymbol=function(e){return"simple-marker"===e||"picture-marker"===e||"text"===e},t.graphicGeometryToNumber=function(e){switch(r.unwrap(e.geometry).type){case"point":case"multipoint":return 0;case"polyline":return 1;case"polygon":case"extent":return 2}return 0};var M=s.vec2f32.create(),S=s.vec2f32.create(),I=s.vec2f32.create(),w=s.vec2f32.create(),T=s.vec2f32.create(),R=s.vec2f32.create(),k=s.vec2f32.create();function F(e,t,r,a,s,u){var l,c,h=i.pt2px(r.xoffset),d=i.pt2px(r.yoffset),f=m*r.angle,p=m*u;switch(r.type){case"simple-marker":l=c=i.pt2px(r.size);break;case"picture-marker":var g=r;l=i.pt2px(g.width),c=i.pt2px(g.height)}s<.04&&(a=.04*a/s);var y=n.mat2d.identity(_);n.mat2d.translate(y,y,o.vec2.set(x,e,t)),n.mat2d.rotate(y,y,p-f),n.mat2d.scale(y,y,o.vec2.set(x,a,-a)),n.mat2d.translate(y,y,o.vec2.set(x,h,-d));var v=[0,0];o.vec2.transformMat2d(v,o.vec2.set(x,-.5*l,-.5*c),y);var b=[0,0];o.vec2.transformMat2d(b,o.vec2.set(x,-.5*l,.5*c),y);var M=[0,0];o.vec2.transformMat2d(M,o.vec2.set(x,.5*l,-.5*c),y);var S=[0,0];return o.vec2.transformMat2d(S,o.vec2.set(x,.5*l,.5*c),y),{rings:[[v,M,S,b,v]]}}function C(e,t,r,a,s,u){var l=y.CIMSymbolHelper.getEnvelope(r.data);if(!l)return null;s<.04&&(a=.04*a/s);var c=i.pt2px(l.width),h=i.pt2px(l.height),d=i.pt2px(l.x),f=i.pt2px(l.y),p=0*m,g=m*u,v=n.mat2d.identity(_);n.mat2d.translate(v,v,o.vec2.set(x,e,t)),n.mat2d.rotate(v,v,g-p),n.mat2d.scale(v,v,o.vec2.set(x,a,a));var b=[0,0];o.vec2.transformMat2d(b,o.vec2.set(x,d,f+h),v);var M=[0,0];o.vec2.transformMat2d(M,o.vec2.set(x,d,f),v);var S=[0,0];o.vec2.transformMat2d(S,o.vec2.set(x,d+c,f+h),v);var I=[0,0];return o.vec2.transformMat2d(I,o.vec2.set(x,d+c,f),v),{rings:[[b,S,I,M,b]]}}function L(e,t,r,a,s,u){var l=i.pt2px(r.xoffset),c=i.pt2px(r.yoffset),h=m*r.angle,d=m*u,f=n.mat2d.identity(_);n.mat2d.translate(f,f,o.vec2.set(x,e,t)),n.mat2d.rotate(f,f,d),n.mat2d.scale(f,f,o.vec2.set(x,s,-s));var p=a[0]+a[2]/2,g=a[1]+a[3]/2;n.mat2d.translate(f,f,o.vec2.set(x,l,-c)),n.mat2d.translate(f,f,o.vec2.set(x,p,g)),n.mat2d.rotate(f,f,h),n.mat2d.translate(f,f,o.vec2.set(x,-p,-g));var y=[0,0];o.vec2.transformMat2d(y,o.vec2.set(x,a[0],a[1]),f);var v=[0,0];o.vec2.transformMat2d(v,o.vec2.set(x,a[0],a[1]+a[3]),f);var b=[0,0];o.vec2.transformMat2d(b,o.vec2.set(x,a[0]+a[2],a[1]),f);var M=[0,0];return o.vec2.transformMat2d(M,o.vec2.set(x,a[0]+a[2],a[1]+a[3]),f),{rings:[[y,b,M,v,y]]}}function O(e,t,r){if(!r||0===r.glyphMosaicItems.length)return e;var n=y.bidiText(t.text)[1],a=v.shapeGlyphs(r.glyphMosaicItems,n,{scale:i.pt2px(t.font.size)/24,angle:t.angle,xOffset:t.xoffset,yOffset:t.yoffset,hAlign:v.alignmentUtils.getXAnchorDirection(t.horizontalAlignment||"center"),vAlign:v.alignmentUtils.getYAnchorDirection(t.verticalAlignment||"baseline"),maxLineWidth:Math.max(32,Math.min(t.lineWidth||512,512)),lineHeight:30*Math.max(.25,Math.min(t.lineHeight||1,4)),decoration:t.font.decoration||"none",isCIM:!1}).bounds;return e[0]=a.x-a.halfWidth,e[1]=a.y-a.halfHeight,e[2]=a.width,e[3]=a.height,e}t.isPointOnPolyline=function(e,t,r,i){o.vec2.set(I,t,r);for(var n,a,s,u,l,c,h,d,f,p=e.paths,g=1/0,y=0;y<p.length;y++){var v=p[y];if(!(v.length<2))for(var m=1;m<v.length;m++)n=v[m-1][0],s=v[m-1][1],a=v[m][0],u=v[m][1],l=Math.min(n,a)-i,c=Math.min(s,u)-i,h=Math.max(n,a)+i,d=Math.max(s,u)+i,t<l||t>h||r<c||r>d||(o.vec2.set(M,n,s),o.vec2.set(S,a,u),o.vec2.subtract(w,S,M),o.vec2.subtract(T,M,I),o.vec2.scale(R,w,o.vec2.dot(w,T)/o.vec2.dot(w,w)),o.vec2.subtract(k,T,R),g>(f=o.vec2.dot(k,k))&&(g=f))}return Math.sqrt(g)<=i},t.getMarkerSymbolBounds=F,t.getCIMMarkerBounds=C,t.getTextSymbolBounds=L,t.normalizeCentralMeridian=function(e){var t,r,i,n,a,o,s,u,l=null;if(!e)return null;if("mesh"===e.type)return e.toJSON();if(!(r=p.getInfo(t=e.spatialReference)))return e.toJSON();i=E[a=t.isWebMercator?102100:4326].maxX,n=E[a].minX,o=E[a].plus180Line,s=E[a].minus180Line;var f=e.toJSON();if(d.isPoint(f))u=N(f,i,n);else if(d.isMultipoint(f))f.points=f.points.map((function(e){return N(e,i,n)})),u=f;else if(d.isExtent(f))u=function(e,t){if(!t)return e;var r=function(e,t){var r,i=[],n=e.ymin,a=e.ymax,o=e.xmax-e.xmin,s=e.xmin,u=e.xmax,l=t.valid,c=l[0],h=l[1],d=(r=j(e.xmin,t)).x,f=r.frameId,p=(r=j(e.xmax,t)).x,g=r.frameId,y=d===p&&o>0;if(o>2*h){var v={xmin:s<u?d:p,ymin:n,xmax:h,ymax:a},m={xmin:c,ymin:n,xmax:s<u?p:d,ymax:a},_={xmin:0,ymin:n,xmax:h,ymax:a},x={xmin:c,ymin:n,xmax:0,ymax:a},b=[],M=[];V(v,_)&&b.push(f),V(v,x)&&M.push(f),V(m,_)&&b.push(g),V(m,x)&&M.push(g);for(var S=f+1;S<g;S++)b.push(S),M.push(S);i.push({extent:v,frameIds:[f]},{extent:m,frameIds:[g]},{extent:_,frameIds:b},{extent:x,frameIds:M})}else d>p||y?i.push({extent:{xmin:d,ymin:n,xmax:h,ymax:a},frameIds:[f]},{extent:{xmin:c,ymin:n,xmax:p,ymax:a},frameIds:[g]}):i.push({extent:{xmin:d,ymin:n,xmax:p,ymax:a},frameIds:[f]});return i}(e,t).map((function(e){return e.extent}));return r.length<2?r[0]||e:r.length>2?(e.xmin=t.valid[0],e.xmax=t.valid[1],e):{rings:r.map((function(e){return[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]}))}}(f,r);else if(d.isPolygon(f)||d.isPolyline(f)){var g=b;c.getBoundsXY(g,f);var y={xmin:g[0],ymin:g[1],xmax:g[2],ymax:g[3]},v=G(y.xmin,n)*(2*i),m=0===v?f:function(e,t){for(var r=function(e){return d.isPolygon(e)?e.rings:e.paths}(e),i=0,n=r;i<n.length;i++)for(var a=0,o=n[i];a<o.length;a++)o[a][0]+=t;return e}(f,v);y.xmin+=v,y.xmax+=v,h.extentIntersectsPolyline(y,o)&&y.xmax!==i||h.extentIntersectsPolyline(y,s)&&y.xmin!==n?l=m:u=m}else u=e.clone();return null!==l?(new B).cut(l,i):u},t.getTextSymbolSize=O;var E={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:{paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:u.WebMercator},minus180Line:{paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:u.WebMercator}},4326:{maxX:180,minX:-180,plus180Line:{paths:[[[180,-180],[180,180]]],spatialReference:u.WGS84},minus180Line:{paths:[[[-180,-180],[-180,180]]],spatialReference:u.WGS84}}};function G(e,t){return Math.ceil((e-t)/(2*t))}function j(e,t){var r,i=t.valid,n=i[0],a=i[1],o=2*a,s=0;return e>a?(e-=(r=Math.ceil(Math.abs(e-a)/o))*o,s=r):e<n&&(e+=(r=Math.ceil(Math.abs(e-n)/o))*o,s=-r),{x:e,frameId:s}}function V(e,t){var r=t.xmin,i=t.ymin,n=t.xmax,a=t.ymax;return P(e,r,i)&&P(e,r,a)&&P(e,n,a)&&P(e,n,i)}function P(e,t,r){return t>=e.xmin&&t<=e.xmax&&r>=e.ymin&&r<=e.ymax}function N(e,t,r){var i;if(Array.isArray(e))if((i=e[0])>t){var n=G(i,t);e[0]=i+n*(-2*t)}else i<r&&(n=G(i,r),e[0]=i+n*(-2*r));else(i=e.x)>t?(n=G(i,t),e.x+=n*(-2*t)):i<r&&(n=G(i,r),e.x+=n*(-2*r));return e}var B=function(){function e(){}return e.prototype.cut=function(e,t){var r;if(e.rings)this.closed=!0,r=e.rings,this.minPts=4;else{if(!e.paths)return null;this.closed=!1,r=e.paths,this.minPts=2}for(var i=r.length,n=-2*t,a=0;a<i;a++){var o=r[a];if(o&&o.length>=this.minPts){for(var s=[],u=0,l=o;u<l.length;u++){var c=l[u];s.push([c[0]+n,c[1]])}r.push(s)}}return this.closed?e.rings=r:e.paths=r,e},e}()}).apply(null,i))||(e.exports=n)}}]);