????

Your IP : 3.14.79.153


Current Path : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/
Upload File :
Current File : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/47.50a247a6c20c326ab24e.js

(function(){var e={"esri/views/layers/support/Path":"20TT","esri/views/2d/layers/LayerView2D":"6i4F","esri/views/layers/support/ClipRect":"7MXx","esri/views/2d/engine/vectorTiles/GlyphMosaic":"7wYu","esri/views/2d/engine/vectorTiles/TileHandler":"BEij","esri/views/2d/engine/vectorTiles/RenderBucket":"KyfE","esri/views/2d/engine/vectorTiles/RectangleBinPack":"VIUv","esri/views/2d/engine/vectorTiles/VectorTile":"VjU6","esri/views/layers/LayerView":"WsO6","esri/views/2d/tiling/TileInfoViewPOT":"YOjP","esri/views/layers/support/ClipArea":"ZMIQ","esri/views/2d/engine/vectorTiles/GeometryUtils":"c9QS","esri/views/2d/engine/vectorTiles/TileManager":"fCqw","esri/views/2d/engine/vectorTiles/FadeRecorder":"hwgr","esri/views/2d/engine/vectorTiles/SpriteMosaic":"mFzi","esri/views/2d/engine/vectorTiles/GlyphSource":"suOV","esri/views/layers/support/Geometry":"ts8o","esri/views/2d/engine/vectorTiles/VectorTileContainer":"uf/D","esri/views/2d/layers/VectorTileLayerView2D":"xkJJ"},t=this||window,r=t.webpackJsonp=t.webpackJsonp||[];r.registerAbsMids?r.registerAbsMids(e):(r.absMidsWaiting=r.absMidsWaiting||[]).push(e)})(),(window.webpackJsonp=window.webpackJsonp||[]).push([[47],{"20TT":function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("Vx27"),r("ZMIQ")],n=(function(e,t,r,i,n){return function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="path",t.path=[],t}return r.__extends(t,e),Object.defineProperty(t.prototype,"version",{get:function(){return(this._get("version")||0)+1},enumerable:!0,configurable:!0}),r.__decorate([i.property({type:[[[Number]]],json:{write:!0}})],t.prototype,"path",void 0),r.__decorate([i.property({readOnly:!0,dependsOn:["path"]})],t.prototype,"version",null),r.__decorate([i.subclass("esri.views.layers.support.Path")],t)}(n)}).apply(null,i),void 0===n||(e.exports=n)},"6i4F":function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("y4WC"),r("K2Kz"),r("8MXS"),r("Vx27"),r("YaB4"),r("ZMIQ"),r("7MXx"),r("ts8o"),r("20TT")],n=(function(e,t,r,i,n,a,o,s,l,u,c,h){Object.defineProperty(t,"__esModule",{value:!0});var p=i.ofType({key:"type",base:l,typeMap:{rect:u,path:h,geometry:c}});t.LayerView2DMixin=function(e){return function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.clips=new p,t.moving=!1,t.attached=!1,t.lastUpdateId=-1,t.updateRequested=!1,t}return r.__extends(t,e),t.prototype.initialize=function(){var e,t=this;this.container||(this.container=new s.Container),this.handles.add([a.init(this,"suspended",(function(e){t.container&&(t.container.visible=!e),t.view&&!e&&t.updateRequested&&t.view.requestUpdate()}),!0),a.init(this,["layer.opacity","container"],(function(){var e,r;t.container&&(t.container.opacity=null!==(r=null===(e=t.layer)||void 0===e?void 0:e.opacity)&&void 0!==r?r:1)}),!0),a.init(this,["layer.blendMode"],(function(e){t.container&&(t.container.blendMode=e)}),!0),this.clips.on("change",(function(){t.container.clips=t.clips,t.notifyChange("clips")}))]),this.container.clips=this.clips,(null===(e=this.view)||void 0===e?void 0:e.whenLayerView)?this.view.whenLayerView(this.layer).then((function(e){e!==t||t.attached||t.destroyed||(t.attach(),t.requestUpdate(),t.attached=!0)}),(function(){})):this.when().then((function(){t.attached||t.destroyed||(t.attach(),t.requestUpdate(),t.attached=!0)}),(function(){}))},t.prototype.destroy=function(){this.attached&&(this.detach(),this.attached=!1),this.handles.remove("initialize"),this.updateRequested=!1,this.layer=null,this.view=null},Object.defineProperty(t.prototype,"updating",{get:function(){return!this.attached||!this.suspended&&(this.updateRequested||this.isUpdating())},enumerable:!0,configurable:!0}),t.prototype.isVisibleAtScale=function(e){var t=!0,r=this.layer,i=r.minScale,n=r.maxScale;if(null!=i&&null!=n){var a=!i,o=!n;!a&&e<=i&&(a=!0),!o&&e>=n&&(o=!0),t=a&&o}return t},t.prototype.requestUpdate=function(){this.updateRequested||(this.updateRequested=!0,this.suspended||this.view.requestUpdate())},t.prototype.processUpdate=function(e){!this.isFulfilled()||this.isResolved()?(this._set("updateParameters",e),this.updateRequested&&!this.suspended&&(this.updateRequested=!1,this.update(e))):this.updateRequested=!1},t.prototype.isUpdating=function(){return!1},t.prototype.isRendering=function(){return!1},t.prototype.canResume=function(){return!!e.prototype.canResume.call(this)&&this.isVisibleAtScale(this.view.scale)},r.__decorate([o.property({type:p,set:function(e){var t=n.referenceSetter(e,this._get("clips"),p);this._set("clips",t)}})],t.prototype,"clips",void 0),r.__decorate([o.property()],t.prototype,"moving",void 0),r.__decorate([o.property()],t.prototype,"attached",void 0),r.__decorate([o.property()],t.prototype,"container",void 0),r.__decorate([o.property({dependsOn:["view.scale","layer.minScale","layer.maxScale"]})],t.prototype,"suspended",void 0),r.__decorate([o.property({readOnly:!0})],t.prototype,"updateParameters",void 0),r.__decorate([o.property()],t.prototype,"updateRequested",void 0),r.__decorate([o.property({dependsOn:["attached","updateRequested","suspended"]})],t.prototype,"updating",null),r.__decorate([o.property()],t.prototype,"view",void 0),r.__decorate([o.subclass("esri.views.2d.layers.LayerView2D")],t)}(e)}}).apply(null,i),void 0===n||(e.exports=n)},"7MXx":function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("Vx27"),r("ZMIQ")],n=(function(e,t,r,i,n){return function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="rect",t.left=null,t.right=null,t.top=null,t.bottom=null,t}var n;return r.__extends(t,e),n=t,t.prototype.clone=function(){return new n({left:this.left,right:this.right,top:this.top,bottom:this.bottom})},Object.defineProperty(t.prototype,"version",{get:function(){return(this._get("version")||0)+1},enumerable:!0,configurable:!0}),r.__decorate([i.property({type:[Number,String],json:{write:!0}})],t.prototype,"left",void 0),r.__decorate([i.property({type:[Number,String],json:{write:!0}})],t.prototype,"right",void 0),r.__decorate([i.property({type:[Number,String],json:{write:!0}})],t.prototype,"top",void 0),r.__decorate([i.property({type:[Number,String],json:{write:!0}})],t.prototype,"bottom",void 0),r.__decorate([i.property({readOnly:!0,dependsOn:["left","right","top","bottom"]})],t.prototype,"version",null),n=r.__decorate([i.subclass("esri.views.layers.support.ClipRect")],t)}(n)}).apply(null,i),void 0===n||(e.exports=n)},"7wYu":function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("H1tY"),r("qMld"),r("DJpR"),r("VIUv"),r("6cAc")],void 0===(n=(function(e,t,r,i,n,a,o){var s;return function(){function e(e,t,i){this.width=0,this.height=0,this._dirties=[],this._glyphData=[],this._currentPage=0,this._glyphIndex={},this._textures=[],this._rangePromises=new Map,!s&&r("stable-symbol-rendering")&&(s=new Set),this.width=e,this.height=t,this._glyphSource=i,this._binPack=new a(e-4,t-4),this._glyphData.push(new Uint8Array(e*t)),this._dirties.push(!0),this._textures.push(void 0)}return e.prototype.getGlyphItems=function(e,t){for(var n=this,l=[],u=this._glyphSource,c=new Set,h=0,p=t;h<p.length;h++){var d=Math.floor(p[h]*(1/256));c.add(d)}var f=[];return c.forEach((function(t){if(t<=256){var r=e+t;if(n._rangePromises.has(r))f.push(n._rangePromises.get(r));else{var i=u.getRange(e,t).then((function(){n._rangePromises.delete(r)}),(function(){n._rangePromises.delete(r)}));n._rangePromises.set(r,i),f.push(i)}}})),i.all(f).then((function(){var i,h=n._glyphIndex[e];if(h||(n._glyphIndex[e]=h={}),r("stable-symbol-rendering")){s.clear();for(var p=0,d=t;p<d.length;p++){var f=d[p];s.add(f)}var _=[];c.forEach((function(e){_.push(e)})),_.sort(),i=[];for(var y=0,v=_;y<v.length;y++)for(var g=v[y],b=0;b<256;++b)i.push(256*g+b)}else i=t;for(var m=0,w=i;m<w.length;m++){var x=h[f=w[m]];if(x)r("stable-symbol-rendering")&&!s.has(f)||(l[f]={sdf:!0,rect:x.rect,metrics:x.metrics,page:x.page,code:f});else{var D=u.getGlyph(e,f);if(D&&D.metrics){var T=D.metrics,I=void 0;if(0===T.width)I=new o.default(0,0,0,0);else{var P=T.width+6,S=T.height+6,V=P%4?4-P%4:4,B=S%4?4-S%4:4;1===V&&(V=5),1===B&&(B=5),(I=n._binPack.allocate(P+V,S+B)).isEmpty&&(n._dirties[n._currentPage]||(n._glyphData[n._currentPage]=null),n._currentPage=n._glyphData.length,n._glyphData.push(new Uint8Array(n.width*n.height)),n._dirties.push(!0),n._textures.push(void 0),n._binPack=new a(n.width-4,n.height-4),I=n._binPack.allocate(P+V,S+B));var R=n._glyphData[n._currentPage],C=D.bitmap,M=void 0,O=void 0;if(C)for(var j=0;j<S;j++){M=P*j,O=n.width*(I.y+j+1)+I.x;for(var k=0;k<P;k++)R[O+k+1]=C[M+k]}}h[f]={rect:I,metrics:T,tileIDs:null,page:n._currentPage},r("stable-symbol-rendering")&&!s.has(f)||(l[f]={sdf:!0,rect:I,metrics:T,page:n._currentPage,code:f}),n._dirties[n._currentPage]=!0}}}return l}))},e.prototype.removeGlyphs=function(e){for(var t in this._glyphIndex){var r=this._glyphIndex[t];if(r){var i=void 0;for(var n in r)if((i=r[n]).tileIDs.delete(e),0===i.tileIDs.size){for(var a=this._glyphData[i.page],o=i.rect,s=void 0,l=void 0,u=0;u<o.height;u++)for(s=this.width*(o.y+u)+o.x,l=0;l<o.width;l++)a[s+l]=0;delete r[n],this._dirties[i.page]=!0}}}},e.prototype.bind=function(e,t,r,i){void 0===i&&(i=0),this._textures[r]||(this._textures[r]=new n.Texture(e,{pixelFormat:6406,dataType:5121,width:this.width,height:this.height},new Uint8Array(this.width*this.height)));var a=this._textures[r];a.setSamplingMode(t),this._dirties[r]&&a.setData(this._glyphData[r]),e.bindTexture(a,i),this._dirties[r]=!1},e.prototype.dispose=function(){this._binPack=null;for(var e=0,t=this._textures;e<t.length;e++){var r=t[e];r&&r.dispose()}this._textures.length=0},e}()}).apply(null,i))||(e.exports=n)},BEij:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("zp6E"),r("H1tY"),r("ZHL0"),r("LxLY"),r("r7jh"),r("qMld"),r("8V7H"),r("lRq4"),r("VjU6"),r("c9QS"),r("7wYu"),r("suOV"),r("mFzi"),r("soIt"),r("f3JK")],void 0===(n=(function(e,t,r,i,n,a,o,s,l,u,c,h,p,d,f,_,y,v){Object.defineProperty(t,"__esModule",{value:!0});var g=new a(10),b=new Map,m=function(){function e(e,t,r,i,n,a){this._vectorTileLayer=e,this.devicePixelRatio=t,this.allowUpdates=r,this._container=i,this._memCache=n,this._enableCachingWorkerTiles=a,this._spriteMosaic=null,this._glyphMosaic=null,this._connection=null,this._updateToAbortController=new Map,this._ongoingTileRequests=new Map,this._ongoingRequestToController=new Map}return e.prototype.destroy=function(){this._updateToAbortController&&this._updateToAbortController.forEach((function(e){return e.abort()})),this._ongoingTileRequests&&this.abortAll(),this._connection&&(this._connection.close(),this._connection=null),this._vectorTileLayer=null,this._spriteMosaic&&(this._spriteMosaic.dispose(),this._spriteMosaic=null),this._glyphMosaic&&(this._glyphMosaic.dispose(),this._glyphMosaic=null)},Object.defineProperty(e.prototype,"spriteMosaic",{get:function(){var e=this;return this._spriteSourcePromise.then((function(){return e._spriteMosaic}))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"glyphMosaic",{get:function(){return this._glyphMosaic},enumerable:!0,configurable:!0}),e.prototype.start=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,i,a,o,s,c=this;return r.__generator(this,(function(h){for(a in i=[],t=this._vectorTileLayer.sourceNameToSource)i.push(this._fetchTileMap(t[a],e));return this._spriteSourcePromise=this._vectorTileLayer.loadSpriteSource(this.devicePixelRatio,e),this._spriteSourcePromise.then((function(e){c._spriteMosaic=new _(1024,1024,250),c._spriteMosaic.setSpriteSource(e),n("stable-symbol-rendering")&&c._spriteMosaic.preloadSpriteItems()})),s=new f((o=this._vectorTileLayer.styleRepository).glyphs),this._glyphMosaic=new d(1024,1024,s),this._broadcastPromise=u.open("WorkerTileHandler",{client:this,scheduler:e.scheduler,signal:e.signal}).then((function(t){return c._connection=t,l.all(c._connection.broadcast("setLayers",{style:o.styleJSON,enableCachingTiles:c._enableCachingWorkerTiles},r.__assign({},e)))})),[2,l.all(i)]}))}))},e.prototype.updateStyle=function(){return r.__awaiter(this,void 0,void 0,(function(){var e,t=this;return r.__generator(this,(function(r){switch(r.label){case 0:return[4,this._broadcastPromise];case 1:return r.sent(),this._updateToAbortController.forEach((function(e){return e.abort()})),this._updateToAbortController.clear(),e=this._vectorTileLayer.styleRepository,this._broadcastPromise=l.create((function(r,i){l.all(t._connection.broadcast("updateStyle",e.styleJSON)).then(r,i)})),[2,this._broadcastPromise]}}))}))},e.prototype.abortTileUpdate=function(e){this._updateToAbortController.has(e)&&(this._updateToAbortController.get(e).abort(),this._updateToAbortController.delete(e))},e.prototype.updateTile=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var i,n,a,o,s=this;return r.__generator(this,(function(r){switch(r.label){case 0:return this.allowUpdates&&e.isReady?[4,this._broadcastPromise]:[2];case 1:return r.sent(),i=Math.round(p.degToByte(t.state.rotation)),e.rotation===i?[2,null]:(this._updateToAbortController.has((a=e.key).id)&&((n=this._updateToAbortController.get(a.id)).abort(),this._updateToAbortController.delete(a.id)),n=l.createAbortController(),e.rotation=i,o=e.client.invoke("updateSymbols",{key:e.id,rotation:i},{signal:n.signal}).then((function(t){s._updateToAbortController.delete(a.id),e.isReady&&e.updateSymbolData(t)})).catch((function(e){l.isAbortError(e)||s._updateToAbortController.delete(a.id)})),this._updateToAbortController.set(e.id,n),[2,o])}}))}))},e.prototype.updateTileData=function(e){for(var t,r=e.tileId,i=this._container.children,n=0;n<i.length;n++)if((t=i[n]).id===r){t.updateTileData(e.tileData);break}},e.prototype.getVectorTile=function(e,t,i,n){return r.__awaiter(this,void 0,void 0,(function(){var a,u,p,d,f,_;return r.__generator(this,(function(r){switch(r.label){case 0:return a=new v(e,t,i,0),o.isSome(this._memCache)&&(u=this._memCache.get(a.id),o.isSome(u))?(u.reference(),[2,u]):[4,this._getVectorTileData(a)];case 1:return p=r.sent(),l.throwIfAborted(n),o.isSome(this._memCache)&&(d=this._memCache.get(a.id),o.isSome(d))?(d.reference(),[2,d]):this._vectorTileLayer?(f=this._vectorTileLayer.tileInfo.getTileBounds(c.create(),a),_=new h.VectorTile(a,this._vectorTileLayer.styleRepository,f,[512,512],0,!1),p&&p.tileData?(_.setData(p.tileData,p.client),o.isSome(this._memCache)&&(_.reference(),this._memCache.put(_.key.id,_,_.getMemoryUsage()*_.referenced,s.MIN_PRIORITY))):_.setData(null,null),[2,_]):[2,null]}}))}))},e.prototype.releaseVectorTile=function(e){o.isNone(this._memCache)||e.release()||this._memCache.updateSize(e.key.id,e,e.getMemoryUsage()*e.referenced)},e.prototype.fetchTileData=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var i,n,a;return r.__generator(this,(function(r){switch(r.label){case 0:return[4,this._getRefKeys(e,t)];case 1:for(a in i=r.sent(),n=[],this._vectorTileLayer.sourceNameToSource)n.push(a);return[2,this._getSourcesData(n,i,t)]}}))}))},e.prototype.parseTileData=function(e,t,i){return r.__awaiter(this,void 0,void 0,(function(){var a,o,s,l,u,c,h,d,f=this;return r.__generator(this,(function(_){switch(_.label){case 0:return(a=e&&e.data)?(o=a.sourceName2DataAndRefKey,s=a.transferList,0===Object.keys(o).length?[2,null]:[4,this._broadcastPromise]):[2,null];case 1:return _.sent(),l=Math.round(p.degToByte(t)),[4,this._connection.getAvailableClient()];case 2:return[4,(u=_.sent()).invoke("createTileAndParse",{key:e.key.id,rotation:l,cacheTile:this.allowUpdates,sourceName2DataAndRefKey:o},r.__assign(r.__assign({},i),{transferList:s})).catch((function(){return f._enableCachingWorkerTiles&&u.invoke("destructTileData",e.key.id).catch((function(){})),null}))];case 3:if(c=_.sent(),n("esri-vector-tiles-debug")){for(d in h={},o)h[d]=o[d].refKey;return[2,{tileData:c,client:u,refKeys:h}]}return[2,{tileData:c,client:u}]}}))}))},Object.defineProperty(e.prototype,"updating",{get:function(){return this._ongoingTileRequests.size>0},enumerable:!0,configurable:!0}),e.prototype.abortAll=function(){this._ongoingRequestToController.forEach((function(e){return e.abort()})),this._ongoingRequestToController.clear(),this._ongoingTileRequests.clear()},e.prototype.getSprites=function(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){switch(t.label){case 0:return[4,this._spriteSourcePromise];case 1:return t.sent(),[2,this._spriteMosaic.getSpriteItems(e)]}}))}))},e.prototype.getGlyphs=function(e){return this._glyphMosaic.getGlyphItems(e.font,e.codePoints)},e.prototype.getStyleRepository=function(){return this._vectorTileLayer.styleRepository},e.prototype._getTilePayload=function(e,t,n){return r.__awaiter(this,void 0,void 0,(function(){var a,o;return r.__generator(this,(function(s){switch(s.label){case 0:return a=v.pool.acquire(e.id),o=this._vectorTileLayer.sourceNameToSource[t].getSourceTileUrl(a.level,a.row,a.col),v.pool.release(a),[4,i(o,r.__assign({responseType:"array-buffer"},n))];case 1:return[2,{protobuff:s.sent().data,sourceName:t}]}}))}))},e.prototype._fetchTileMap=function(e,t){if(e.capabilities.operations.supportsTileMap&&e.tileIndex)return l.resolve();if(!e.tileMapURL)return l.resolve();var r=g.get(e.tileMapURL);if(r)return e.tileIndex=r,l.resolve();if(b.has(e.tileMapURL))return b.get(e.tileMapURL).then((function(t){e.tileIndex=new y(t.data)}));var n=i(e.tileMapURL,t);return n.then((function(t){e.tileIndex=new y(t.data),b.delete(e.tileMapURL),g.put(e.tileMapURL,e.tileIndex)})),b.set(e.tileMapURL,n),n},e.prototype._getRefKeys=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var i,n,a,o;return r.__generator(this,(function(r){for(a in i=this._vectorTileLayer.sourceNameToSource,n=new Array,i)o=i[a].getRefKey(e,t),n.push(o);return[2,l.eachAlways(n)]}))}))},e.prototype._getSourcesData=function(e,t,i){return r.__awaiter(this,void 0,void 0,(function(){var n,a,o,s,u,c;return r.__generator(this,(function(r){switch(r.label){case 0:for(n=[],c=0;c<t.length;c++)null==t[c].value||null==e[c]?n.push(null):(a=this._getTilePayload(t[c].value,e[c],i),n.push(a));return[4,l.eachAlways(n)];case 1:for(o=r.sent(),s={},u=[],c=0;c<o.length;c++)o[c].value&&o[c].value&&o[c].value.protobuff&&o[c].value.protobuff.byteLength>0&&(s[o[c].value.sourceName]={refKey:t[c].value.id,protobuff:o[c].value.protobuff},u.push(o[c].value.protobuff));return[2,{sourceName2DataAndRefKey:s,transferList:u}]}}))}))},e.prototype._getVectorTileData=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,i,n,a=this;return r.__generator(this,(function(r){return this._ongoingTileRequests.has(t=e.id)?[2,this._ongoingTileRequests.get(t)]:(i=new AbortController,n=this._getParsedVectorTileData(e,{signal:i.signal}).then((function(e){return a._ongoingTileRequests.delete(t),a._ongoingRequestToController.delete(t),e})).catch((function(){return a._ongoingTileRequests.delete(t),a._ongoingRequestToController.delete(t),null})),this._ongoingTileRequests.set(t,n),this._ongoingRequestToController.set(t,i),[2,n])}))}))},e.prototype._getParsedVectorTileData=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var i;return r.__generator(this,(function(r){switch(r.label){case 0:return[4,this.fetchTileData(e,t)];case 1:return i=r.sent(),[2,this.parseTileData({key:e,data:i},0,t)]}}))}))},e}();t.TileHandler=m}).apply(null,i))||(e.exports=n)},KyfE:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht")],void 0===(n=(function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){this.type=e};t.RenderBucket=i;var n=function(e){function t(){var t=e.call(this,2)||this;return t.triangleElementStart=0,t.triangleElementCount=0,t}return r.__extends(t,e),t.prototype.hasData=function(){return this.triangleElementCount>0},t.prototype.triangleCount=function(){return this.triangleElementCount/3},t}(i);t.LineRenderBucket=n;var a=function(e){function t(){var t=e.call(this,1)||this;return t.triangleElementStart=0,t.triangleElementCount=0,t.outlineElementStart=0,t.outlineElementCount=0,t}return r.__extends(t,e),t.prototype.hasData=function(){return this.triangleElementCount>0||this.outlineElementCount>0},t.prototype.triangleCount=function(){return(this.triangleElementCount+this.outlineElementCount)/3},t}(i);t.FillRenderBucket=a;var o=function(e){function t(){var t=e.call(this,3)||this;return t.iconPerPageElementsMap=new Map,t.glyphPerPageElementsMap=new Map,t.isSDF=!1,t}return r.__extends(t,e),t.prototype.hasData=function(){return this.iconPerPageElementsMap.size>0||this.glyphPerPageElementsMap.size>0},t.prototype.triangleCount=function(){var e=0;return this.iconPerPageElementsMap.forEach((function(t){e+=t[1]})),this.glyphPerPageElementsMap.forEach((function(t){e+=t[1]})),e/3},t}(i);t.SymbolRenderBucket=o;var s=function(e){function t(){var t=e.call(this,4)||this;return t.triangleElementStart=0,t.triangleElementCount=0,t}return r.__extends(t,e),t.prototype.hasData=function(){return this.triangleElementCount>0},t.prototype.triangleCount=function(){return this.triangleElementCount/3},t}(i);t.CircleRenderBucket=s;var l=function(e){function t(){return e.call(this,0)||this}return r.__extends(t,e),t.prototype.hasData=function(){return!0},t.prototype.triangleCount=function(){return 2},t}(i);t.BackgroundRenderBucket=l}).apply(null,i))||(e.exports=n)},VIUv:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("6cAc")],void 0===(n=(function(e,t,r){return function(){function e(e,t){this._width=0,this._height=0,this._free=[],this._width=e,this._height=t,this._free.push(new r.default(0,0,e,t))}return Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},enumerable:!0,configurable:!0}),e.prototype.allocate=function(e,t){if(e>this._width||t>this._height)return new r.default;for(var i=null,n=-1,a=0;a<this._free.length;++a){var o=this._free[a];e<=o.width&&t<=o.height&&(null===i||o.y<=i.y&&o.x<=i.x)&&(i=o,n=a)}return null===i?new r.default:(this._free.splice(n,1),i.width<i.height?(i.width>e&&this._free.push(new r.default(i.x+e,i.y,i.width-e,t)),i.height>t&&this._free.push(new r.default(i.x,i.y+t,i.width,i.height-t))):(i.width>e&&this._free.push(new r.default(i.x+e,i.y,i.width-e,i.height)),i.height>t&&this._free.push(new r.default(i.x,i.y+t,e,i.height-t))),new r.default(i.x,i.y,e,t))},e.prototype.release=function(e){for(var t=0;t<this._free.length;++t){var r=this._free[t];if(r.y===e.y&&r.height===e.height&&r.x+r.width===e.x)r.width+=e.width;else if(r.x===e.x&&r.width===e.width&&r.y+r.height===e.y)r.height+=e.height;else if(e.y===r.y&&e.height===r.height&&e.x+e.width===r.x)r.x=e.x,r.width+=e.width;else{if(e.x!==r.x||e.width!==r.width||e.y+e.height!==r.y)continue;r.y=e.y,r.height+=e.height}this._free.splice(t,1),this.release(e)}this._free.push(e)},e}()}).apply(null,i))||(e.exports=n)},VjU6:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("DJpR"),r("KyfE"),r("gi5q")],void 0===(n=(function(e,t,r,i,n,a){Object.defineProperty(t,"__esModule",{value:!0});var o=function(e){function t(t,r,i,n,a,o){var l=e.call(this,t,i,n,[4096,4096])||this;return l._referenced=0,l._symbolFadeHold=null,l._vectorTileData=null,l._symbolUpdateData=null,l._memoryUsed=s,l.rotation=0,l.layerData={},l.status="loading",l._referenced=1,l.styleLayers=r,l.id=t.id,l.rotation=a,l._cacheWorkerTiles=o,l}return r.__extends(t,e),Object.defineProperty(t.prototype,"hasSymbolBuckets",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isHoldingForFade",{get:function(){return null!==this._symbolFadeHold},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSymbolFadeDone",{get:function(){return!this._symbolFadeHold||this._symbolFadeHold<performance.now()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wasRequested",{get:function(){return"errored"===this.status||"loaded"===this.status||"reloading"===this.status},enumerable:!0,configurable:!0}),t.prototype.setData=function(e,t,r){this._vectorTileData=e,this.client=t,this.refKeys=r,this._memoryUsed=s,this.ready()},t.prototype.updateSymbolData=function(e){e&&(this._symbolUpdateData=e,this.requestRender())},t.prototype.updateTileData=function(e){this._vectorTileData=e,this.stage.requestRender(),this._memoryUsed=s},t.prototype.clearSymbolFadeHold=function(){this._symbolFadeHold=null},t.prototype.setSymbolHoldDuration=function(e){this._symbolFadeHold=performance.now()+e},t.prototype.hasData=function(){return Object.keys(this.layerData).length>0},t.prototype.dispose=function(){this._cacheWorkerTiles&&this.client&&this.client.invoke("destructTileData",this.id).catch((function(){})),this._deleteBufferMemory(),this.destroy(),this._memoryUsed=s},t.prototype.release=function(){return 0==--this._referenced&&(this.dispose(),this.stage=null,!0)},t.prototype.reference=function(){++this._referenced},Object.defineProperty(t.prototype,"referenced",{get:function(){return this._referenced},enumerable:!0,configurable:!0}),t.prototype.getMemoryUsage=function(){var e=this;return this._memoryUsed===s&&(this._memoryUsed=l.reduce((function(t,r){return e[r]?t+e[r].size:t}),0),this.texture&&(this._memoryUsed+=this.texture.descriptor.width*this.texture.descriptor.height*4),this._vectorTileData&&this._vectorTileData.bufferData&&(this._memoryUsed+=this._vectorTileData.bufferData.reduce((function(e,t){return e+t.byteLength}),this._vectorTileData.bufferDataInfo.byteLength+this._vectorTileData.bucketDataInfo.byteLength))),this._memoryUsed/(this._referenced||1)},t.prototype.commitChanges=function(){if(this._vectorTileData||this._symbolUpdateData)return this._vectorTileData?(this._deleteBufferMemory(),this._createRenderBuckets(),this._createBufferObjects(),void(this._vectorTileData=null)):void(this._symbolUpdateData&&(this._updateSymbolData(this._symbolUpdateData),this._symbolUpdateData=null))},t.prototype._deleteBufferMemory=function(){for(var e=0,t=["fillVertexArrayObject","fillDDVertexArrayObject","outlineVertexArrayObject","lineVertexArrayObject","lineDDVertexArrayObject","iconVertexArrayObject","iconDDVertexArrayObject","textVertexArrayObject","textDDVertexArrayObject","circleVertexArrayObject","fillVertexBuffer","fillDDVertexBuffer","fillIndexBuffer","outlineVertexBuffer","outlineDDVertexBuffer","outlineIndexBuffer","lineVertexBuffer","lineDDVertexBuffer","lineIndexBuffer","iconVertexBuffer","iconDDVertexBuffer","iconIndexBuffer","textVertexBuffer","textDDVertexBuffer","textIndexBuffer","circleVertexBuffer","circleIndexBuffer","texture"];e<t.length;e++){var r=t[e];this[r]&&(this[r].dispose(),this[r]=null)}this.layerData={},this.triangleCount=0},t.prototype._createRenderBuckets=function(){for(var e=new Uint32Array(this._vectorTileData.bucketDataInfo),t=e.length,r=0;r<t;){var i=e[r];switch(e[r+1]){case 0:(new n.BackgroundRenderBucket).layerID=i,r+=2;break;case 1:var a=new n.FillRenderBucket;a.layerID=i,a.triangleElementStart=e[r+2],a.triangleElementCount=e[r+3],a.outlineElementStart=e[r+4],a.outlineElementCount=e[r+5],0===a.triangleElementCount&&0===a.outlineElementCount||(this.layerData[i]=a),r+=6;break;case 2:var o=new n.LineRenderBucket;o.layerID=i,o.triangleElementStart=e[r+2],o.triangleElementCount=e[r+3],o.triangleElementCount>0&&(this.layerData[i]=o),r+=4;break;case 3:var s=new n.SymbolRenderBucket;s.layerID=i,s.isSDF=0!==e[r+2];var l=r+3,u=e[l];l++;for(var c=0;c<u;c++){var h=e[l],p=e[l+1],d=e[l+2];s.iconPerPageElementsMap.set(h,[p,d]),l+=3}var f=l,_=e[f];for(f++,c=0;c<_;c++)s.glyphPerPageElementsMap.set(h=e[f],[p=e[f+1],d=e[f+2]]),f+=3;(s.iconPerPageElementsMap.size>0||s.glyphPerPageElementsMap.size>0)&&(this.layerData[i]=s),r+=5+3*u+3*_;break;case 4:var y=new n.CircleRenderBucket;y.layerID=i,y.triangleElementStart=e[r+2],y.triangleElementCount=e[r+3],y.triangleElementCount>0&&(this.layerData[i]=y),r+=4;break;default:console.error("Bad bucket type!"),r+=2}}},t.prototype.attachWithContext=function(e){this.stage={context:e,trashDisplayObject:function(e){e.processDetach()},untrashDisplayObject:function(){return!1}}},t.prototype._updateSymbolData=function(e){if(!e||!e.bucketDataInfo)return!0;var t=new Uint32Array(e.bucketDataInfo),r=t.length;if(0===r)return!0;if(!this.isReady)return this.requestRender(),!1;for(var a=this.stage.context,o=new Uint32Array(e.bufferDataInfo),s=o.length,l=0,u=0;u<s;u+=2,l++)switch(o[u]){case 10:this.iconVertexBuffer&&(this.iconVertexBuffer.dispose(),this.iconVertexBuffer=null),this.iconVertexBuffer=i.BufferObject.createVertex(a,35044,e.bufferData[l]);break;case 11:this.iconDDVertexBuffer&&(this.iconDDVertexBuffer.dispose(),this.iconDDVertexBuffer=null),this.iconDDVertexBuffer=i.BufferObject.createVertex(a,35044,e.bufferData[l]);break;case 12:this.iconIndexBuffer&&(this.iconIndexBuffer.dispose(),this.iconIndexBuffer=null),this.iconIndexBuffer=i.BufferObject.createIndex(a,35044,e.bufferData[l]);break;case 13:this.textVertexBuffer&&(this.textVertexBuffer.dispose(),this.textVertexBuffer=null),this.textVertexBuffer=i.BufferObject.createVertex(a,35044,e.bufferData[l]);break;case 14:this.textDDVertexBuffer&&(this.textDDVertexBuffer.dispose(),this.textDDVertexBuffer=null),this.textDDVertexBuffer=i.BufferObject.createVertex(a,35044,e.bufferData[l]);break;case 15:this.textIndexBuffer&&(this.textIndexBuffer.dispose(),this.textIndexBuffer=null),this.textIndexBuffer=i.BufferObject.createIndex(a,35044,e.bufferData[l])}var c={};for(var h in this.layerData)3!==this.layerData[h].type&&(c[h]=this.layerData[h]);this.layerData=c;for(var p,d=this.styleLayers.layers,f=0;f<r;){h=t[f],(p=new n.SymbolRenderBucket).layerID=h,p.isSDF=0!==t[f+2],d.length>p.layerID&&d[p.layerID].type===p.type&&(c[p.layerID]=p);var _=f+3,y=t[_];_++;for(var v=0;v<y;v++){var g=t[_],b=t[_+1],m=t[_+2];p.iconPerPageElementsMap.set(g,[b,m]),_+=3}var w=_,x=t[w];for(w++,v=0;v<x;v++)p.glyphPerPageElementsMap.set(g=t[w],[b=t[w+1],m=t[w+2]]),w+=3;f+=5+3*y+3*x}return this.iconVertexArrayObject&&(this.iconVertexArrayObject.dispose(),this.iconVertexArrayObject=null),this.iconDDVertexArrayObject&&(this.iconDDVertexArrayObject.dispose(),this.iconDDVertexArrayObject=null),this.textVertexArrayObject&&(this.textVertexArrayObject.dispose(),this.textVertexArrayObject=null),this.textDDVertexArrayObject&&(this.textDDVertexArrayObject.dispose(),this.textDDVertexArrayObject=null),!0},t._createBufferToObject=function(){var e=[];return e[1]={create:i.BufferObject.createVertex,var:"fillVertexBuffer"},e[2]={create:i.BufferObject.createVertex,var:"fillDDVertexBuffer"},e[3]={create:i.BufferObject.createIndex,var:"fillIndexBuffer"},e[4]={create:i.BufferObject.createVertex,var:"outlineVertexBuffer"},e[5]={create:i.BufferObject.createVertex,var:"outlineDDVertexBuffer"},e[6]={create:i.BufferObject.createIndex,var:"outlineIndexBuffer"},e[7]={create:i.BufferObject.createVertex,var:"lineVertexBuffer"},e[8]={create:i.BufferObject.createVertex,var:"lineDDVertexBuffer"},e[9]={create:i.BufferObject.createIndex,var:"lineIndexBuffer"},e[10]={create:i.BufferObject.createVertex,var:"iconVertexBuffer"},e[11]={create:i.BufferObject.createVertex,var:"iconDDVertexBuffer"},e[12]={create:i.BufferObject.createIndex,var:"iconIndexBuffer"},e[13]={create:i.BufferObject.createVertex,var:"textVertexBuffer"},e[14]={create:i.BufferObject.createVertex,var:"textDDVertexBuffer"},e[15]={create:i.BufferObject.createIndex,var:"textIndexBuffer"},e[16]={create:i.BufferObject.createVertex,var:"circleVertexBuffer"},e[17]={create:i.BufferObject.createIndex,var:"circleIndexBuffer"},e},t.prototype._createBufferObjects=function(){for(var e=this.stage.context,r=new Uint32Array(this._vectorTileData.bufferDataInfo),i=r.length,n=0;n<i;n+=2){var a=n/2;if(!(r[n+1]<=0||0===this._vectorTileData.bufferData[a].byteLength)){var o=r[n],s=t.bufferToObject[o];s?this[s.var]?this[s.var].setData(this._vectorTileData.bufferData[a]):this[s.var]=s.create(e,35044,this._vectorTileData.bufferData[a]):console.error("Bad buffer type "+o)}}},t.bufferToObject=t._createBufferToObject(),t}(a.TiledDisplayObject);t.VectorTile=o;var s=-1,l=["fillVertexBuffer","fillDDVertexBuffer","fillIndexBuffer","outlineVertexBuffer","outlineDDVertexBuffer","outlineIndexBuffer","lineVertexBuffer","lineDDVertexBuffer","lineIndexBuffer","iconVertexBuffer","iconDDVertexBuffer","iconIndexBuffer","textVertexBuffer","textDDVertexBuffer","textIndexBuffer","circleVertexBuffer","circleIndexBuffer"]}).apply(null,i))||(e.exports=n)},WsO6:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("Gtr7"),r("BcWh"),r("7MDj"),r("NfRO"),r("qsST"),r("SZNs"),r("Vx27")],void 0===(n=(function(e,t,r,i,n,a,o,s,l,u){return function(e){function t(t){var r=e.call(this,t)||this;return r.layer=null,r.parent=null,r}return r.__extends(t,e),t.prototype.initialize=function(){var e=this;this.when().catch((function(t){if("layerview:create-error"!==t.name){var r=e.layer&&e.layer.id||"no id",i=e.layer&&e.layer.title||"no title";throw s.getLogger(e.declaredClass).error("#resolve()","Failed to resolve layer view (layer title: '"+i+"', id: '"+r+"')",t),t}}))},t.prototype.destroy=function(){this.layer=this.parent=null},Object.defineProperty(t.prototype,"fullOpacity",{get:function(){var e=function(e){return null==e?1:e};return e(this.get("layer.opacity"))*e(this.get("parent.fullOpacity"))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"suspended",{get:function(){return!this.canResume()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"suspendInfo",{get:function(){return this.getSuspendInfo()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"updating",{get:function(){return!!(this.updatingHandles&&this.updatingHandles.updating||this.isUpdating())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"visible",{get:function(){return!0===this.get("layer.visible")},set:function(e){void 0!==e?this._override("visible",e):this._clearOverride("visible")},enumerable:!0,configurable:!0}),t.prototype.canResume=function(){return!this.get("parent.suspended")&&this.get("view.ready")&&this.get("layer.loaded")&&this.visible||!1},t.prototype.getSuspendInfo=function(){var e=this.parent&&this.parent.suspended?this.parent.suspendInfo:{};return this.view&&this.view.ready||(e.viewNotReady=!0),this.layer&&this.layer.loaded||(e.layerNotLoaded=!0),this.visible||(e.layerInvisible=!0),e},t.prototype.isUpdating=function(){return!1},r.__decorate([u.property({dependsOn:["layer.opacity","parent.fullOpacity"]})],t.prototype,"fullOpacity",null),r.__decorate([u.property()],t.prototype,"layer",void 0),r.__decorate([u.property()],t.prototype,"parent",void 0),r.__decorate([u.property({readOnly:!0,dependsOn:["visible","layer.loaded","parent.suspended","view?.ready"]})],t.prototype,"suspended",null),r.__decorate([u.property({readOnly:!0,dependsOn:["visible","layer.loaded","parent.suspended","view?.ready"]})],t.prototype,"suspendInfo",null),r.__decorate([u.property({type:Boolean,dependsOn:["updatingHandles.updating"],readOnly:!0})],t.prototype,"updating",null),r.__decorate([u.property({dependsOn:["layer.visible"]})],t.prototype,"visible",null),r.__decorate([u.subclass("esri.views.layers.LayerView")],t)}(a.HandleOwnerMixin(o.IdentifiableMixin(l.EsriPromiseMixin(n.EventedMixin(i)))))}).apply(null,i))||(e.exports=n)},YOjP:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("pMLx"),r("M3W5"),r("f3JK")],n=(function(e,t,r,i,n,a){return function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._fullCacheLodInfos=null,t._levelByScale={},t}return r.__extends(t,e),t.prototype.getTileParentId=function(e){var t=a.pool.acquire(e),r=0===t.level?null:a.getId(t.level-1,t.row>>1,t.col>>1,t.world);return a.pool.release(t),r},t.prototype.getTileCoverage=function(t,r,i){var n=e.prototype.getTileCoverage.call(this,t,r,i);if(!n)return n;var a=1<<n.lodInfo.level;return n.spans=n.spans.filter((function(e){return e.row>=0&&e.row<a})),n},t.prototype.scaleToLevel=function(e){if(this._fullCacheLodInfos||this._initializeFullCacheLODs(this._lodInfos),this._levelByScale[e])return this._levelByScale[e];var t=this._fullCacheLodInfos;if(e>t[0].scale)return t[0].level;for(var r=void 0,i=void 0,n=0;n<t.length-1;n++)if(e>(i=t[n+1]).scale)return(r=t[n]).level+(r.scale-e)/(r.scale-i.scale);return t[t.length-1].level},t.prototype._initializeFullCacheLODs=function(e){var t;t=0===e[0].level?e.map((function(e){return{level:e.level,resolution:e.resolution,scale:e.scale}})):i.create({size:this.tileInfo.size[0],spatialReference:this.tileInfo.spatialReference}).lods.map((function(e){return{level:e.level,resolution:e.resolution,scale:e.scale}}));for(var r=0;r<t.length;r++)this._levelByScale[t[r].scale]=t[r].level;this._fullCacheLodInfos=t},t}(n)}).apply(null,i),void 0===n||(e.exports=n)},ZMIQ:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("ycL1"),r("Vx27")],n=(function(e,t,r,i,n){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),r.__decorate([n.subclass("esri.views.layers.support.ClipArea")],t)}(i.JSONSupport)}).apply(null,i),void 0===n||(e.exports=n)},c9QS: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}),t.C_INFINITY=Number.POSITIVE_INFINITY,t.C_PI=Math.PI,t.C_2PI=2*t.C_PI,t.C_PI_BY_2=t.C_PI/2,t.C_RAD_TO_256=128/t.C_PI,t.C_256_TO_RAD=t.C_PI/128,t.C_DEG_TO_256=256/360,t.C_DEG_TO_RAD=t.C_PI/180,t.C_SQRT2=1.414213562,t.C_SQRT2_INV=1/t.C_SQRT2;var r=1/Math.LN2;function i(e,t){return(e%=t)>=0?e:e+t}t.positiveMod=i,t.radToByte=function(e){return i(e*t.C_RAD_TO_256,256)},t.degToByte=function(e){return i(e*t.C_DEG_TO_256,256)},t.log2=function(e){return Math.log(e)*r},t.sqr=function(e){return e*e},t.interpolate=function(e,t,r){return e*(1-r)+t*r},t.between=function(e,t,r){return e>=t&&e<=r||e>=r&&e<=t}}).apply(null,i))||(e.exports=n)},fCqw:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("W6K4"),r("7Lgj"),r("f3JK")],void 0===(n=(function(e,t,r,i,n){Object.defineProperty(t,"__esModule",{value:!0});var a=function(e,t){return e+1/(1<<2*t)},o=function(){function e(e,t){this._tiles=new Map,this._tileCache=new r(40,(function(e){return e.dispose()})),this._viewSize=[0,0],this.fadeDuration=300,this.acquireTile=e.acquireTile,this.releaseTile=e.releaseTile,this.tileInfoView=e.tileInfoView,e.fadeDuration&&(this.fadeDuration=e.fadeDuration),this._container=t}return e.prototype.destroy=function(){this._tiles.clear(),this._tiles=null,this._tileCache.clear(),this._tileCache=null},e.prototype.update=function(e){var t=this;this._updateCacheSize(e);for(var r=this.tileInfoView.getTileCoverage(e.state,0,"smallest"),a=r.spans,o=r.lodInfo,s=o.level,l=new Set,u=new Set,c=0,h=a;c<h.length;c++)for(var p=h[c],d=p.row,f=p.colTo,_=p.colFrom;_<=f;_++){var y=n.getId(s,d,o.normalizeCol(_),o.getWorldForColumn(_)),v=this._getOrAcquireTile(y);l.add(y),v.hasData()?this._container.addChild(v):u.add(new n(y))}u.forEach((function(e){return t._findPlaceholdersForMissingTiles(e,l)})),l.forEach((function(e){t._tiles.get(e).clearSymbolFadeHold()}));var g=[];this._tiles.forEach((function(e,t){l.has(t)||g.push(t)}));for(var b=0,m=g;b<m.length;b++)(v=this._tiles.get(y=m[b])).hasSymbolBuckets&&!v.isHoldingForFade?v.setSymbolHoldDuration(this.fadeDuration):v.hasSymbolBuckets&&!v.isSymbolFadeDone||this._releaseTile(y);i.pool.release(r)},e.prototype._findPlaceholdersForMissingTiles=function(e,t){var r=this,i=[];this._tiles.forEach((function(n){r._addPlaceholderChild(i,n,e,t)}));var n=i.reduce(a,0);Math.abs(1-n)<1e-6||this._addPlaceholderParent(e.id,t)},e.prototype._addPlaceholderChild=function(e,t,r,i){var n,a,o;t.key.level<=r.level||!t.hasData()||(n=r).row===(a=t.key).row>>(o=a.level-n.level)&&n.col===a.col>>o&&n.world===a.world&&(this._container.addChild(t),i.add(t.id),e.push(t.key.level-r.level))},e.prototype._addPlaceholderParent=function(e,t){for(var r=e;;){if(!(r=s(r))||t.has(r))return;var i=this._getTile(r);if(i&&i.hasData())return this._container.addChild(i),void t.add(i.id)}},e.prototype._getOrAcquireTile=function(e){var t=this._tiles.get(e);return t||((t=this._tileCache.pop(e))||(t=this.acquireTile(new n(e))),this._tiles.set(e,t),t)},e.prototype._getTile=function(e){var t=this._tiles.get(e);return t||((t=this._tileCache.pop(e))&&this._tiles.set(e,t),t)},e.prototype._releaseTile=function(e){var t=this._tiles.get(e);this.releaseTile(t),this._container.removeChild(t),this._tiles.delete(e),t.hasData()?this._tileCache.put(e,t,1):t.dispose()},e.prototype._updateCacheSize=function(e){var t=e.state.size;if(t[0]!==this._viewSize[0]||t[1]!==this._viewSize[1]){var r=Math.ceil(t[0]/512)+1,i=Math.ceil(t[1]/512)+1;this._viewSize[0]=t[0],this._viewSize[1]=t[1],this._tileCache.maxSize=5*r*i}},e}();function s(e){var t=e.split("/"),r=t[1],i=t[2],n=t[3],a=parseInt(t[0],10);return 0===a?null:a-1+"/"+(parseInt(r,10)>>1)+"/"+(parseInt(i,10)>>1)+"/"+parseInt(n,10)}t.TileManager=o}).apply(null,i))||(e.exports=n)},hwgr: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}),t.FadeProperties=function(e,t,r,i){this.fadeSpeed=e,this.minfadeLevel=t,this.maxfadeLevel=r,this.fadeChange=i};var r=function(){function e(e,t){void 0===e&&(e=300),void 0===t&&(t=!1),this._levelSnapshots=[],this._duration=e,this._ignoreSpeed=t}return e.prototype.recordLevel=function(e){var t=performance.now(),r=this._levelSnapshots;0===r.length&&(r.push({level:e,now:0}),r.push({level:e,now:0})),2!==r.length&&r[0].level===e||r.push({level:e,now:t})},e.prototype.needsRedraw=function(){if(0===this._levelSnapshots.length)return!1;for(var e=this._duration,t=this._levelSnapshots,r=t.length,i=t[r-1],n=-1;r>n+1&&t[n+1].now+e<i.now;)n++;for(n<0&&(n=0);n<r;n++)if(t[n].level!==i.level)return!0;return!1},e.prototype.getFadeValues=function(){for(var e=this._duration,t=performance.now(),r=this._levelSnapshots;r.length>3&&r[1].now+e<t;)r.shift();r[1].now+e<t&&(r[0].level=r[1].level);var i=r[0].level,n=r[r.length-1],a=n.level,o=Math.min(i,a),s=Math.max(i,a),l=(n.level-r[1].level)/((n.now-r[1].now)/e);return this._ignoreSpeed?{fadeSpeed:0,minfadeLevel:o,maxfadeLevel:s,fadeChange:0}:{fadeSpeed:l,minfadeLevel:o,maxfadeLevel:s,fadeChange:(t-n.now)/e*l}},e}();t.FadeRecorder=r}).apply(null,i))||(e.exports=n)},mFzi:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("DJpR"),r("VIUv"),r("6cAc")],void 0===(n=(function(e,t,r,i,n){return function(){function e(e,t,r){void 0===r&&(r=0),this._size=[],this._mosaicsData=[],this._textures=[],this._dirties=[],this._maxItemSize=0,this._currentPage=0,this._pageWidth=0,this._pageHeight=0,this._mosaicRects={},this.pixelRatio=1,(e<=0||t<=0)&&console.error("Sprites mosaic defaultWidth and defaultHeight must be greater than zero!"),this._pageWidth=e,this._pageHeight=t,r>0&&(this._maxItemSize=r),this._binPack=new i(e-4,t-4)}return e.prototype.getWidth=function(e){return e>=this._size.length?-1:this._size[e][0]},e.prototype.getHeight=function(e){return e>=this._size.length?-1:this._size[e][1]},e.prototype.setSpriteSource=function(e){if(this.dispose(),this.pixelRatio=e.devicePixelRatio,0===this._mosaicsData.length){this._binPack=new i(this._pageWidth-4,this._pageHeight-4);var t=Math.floor(this._pageWidth),r=Math.floor(this._pageHeight),n=new Uint32Array(t*r);this._mosaicsData[0]=n,this._dirties.push(!0),this._size.push([this._pageWidth,this._pageHeight]),this._textures.push(void 0)}this._sprites=e},e.prototype.getSpriteItem=function(e,t){void 0===t&&(t=!1);var r=this._mosaicRects[e];if(r)return r;if(!this._sprites||"loaded"!==this._sprites.loadStatus)return null;var i=this._sprites.getSpriteInfo(e);if(!i||!i.width||!i.height||i.width<0||i.height<0)return null;var n=i.width,a=i.height,o=this._allocateImage(n,a),s=o[0],l=o[1];return s.width<=0?null:(this._copy(s,i,l,o[2],t),this._mosaicRects[e]=r={rect:s,width:n,height:a,sdf:i.sdf,simplePattern:!1,pixelRatio:i.pixelRatio,page:l},r)},e.prototype.preloadSpriteItems=function(){for(var e=0,t=this._sprites.spriteNames;e<t.length;e++)this.getSpriteItem(t[e],!0)},e.prototype.getSpriteItems=function(e){for(var t={},r=0,i=e;r<i.length;r++){var n=i[r];t[n]=this.getSpriteItem(n)}return t},e.prototype.getMosaicItemPosition=function(e,t){var r=this.getSpriteItem(e,t),i=r&&r.rect;return i?(i.width=r.width,i.height=r.height,{size:[r.width,r.height],tl:[(i.x+2)/this._size[r.page][0],(i.y+2)/this._size[r.page][1]],br:[(i.x+2+r.width)/this._size[r.page][0],(i.y+2+r.height)/this._size[r.page][1]],page:r.page}):null},e.prototype.bind=function(e,t,i,n){void 0===i&&(i=0),void 0===n&&(n=0),this._textures[i]||(this._textures[i]=new r.Texture(e,{pixelFormat:6408,dataType:5121,wrapMode:33071,width:this._size[i][0],height:this._size[i][1]},new Uint8Array(this._mosaicsData[i].buffer)));var a=this._textures[i];a.setSamplingMode(t),this._dirties[i]&&a.setData(new Uint8Array(this._mosaicsData[i].buffer)),e.bindTexture(a,n),this._dirties[i]=!1},e._copyBits=function(e,t,r,i,n,a,o,s,l,u,c){var h=i*t+r,p=s*a+o;if(c){p-=a;for(var d=-1;d<=u;h=((++d+u)%u+i)*t+r,p+=a)for(var f=-1;f<=l;f++)n[p+f]=e[h+(f+l)%l]}else for(d=0;d<u;d++){for(f=0;f<l;f++)n[p+f]=e[h+f];h+=t,p+=a}},e.prototype._copy=function(t,r,i,n,a,o){if(this._sprites&&"loaded"===this._sprites.loadStatus&&!(i>=this._mosaicsData.length)){var s=new Uint32Array(o?o.buffer:this._sprites.image.buffer),l=this._mosaicsData[i];l&&s||console.error("Source or target images are uninitialized!"),e._copyBits(s,o?r.width:this._sprites.width,r.x,r.y,l,n[0],t.x+2,t.y+2,r.width,r.height,a),this._dirties[i]=!0}},e.prototype._allocateImage=function(e,t){e+=2,t+=2;var r=Math.max(e,t);if(this._maxItemSize&&this._maxItemSize<r){var a=new n.default(0,0,e,t);return this._mosaicsData.push(new Uint32Array(e*t)),this._dirties.push(!0),this._size.push([e,t]),this._textures.push(void 0),[a,this._mosaicsData.length-1,[e,t]]}var o=e%4?4-e%4:4,s=t%4?4-t%4:4;1===o&&(o=5),1===s&&(s=5);var l=this._binPack.allocate(e+o,t+s);return l.width<=0?(this._dirties[this._currentPage]||(this._mosaicsData[this._currentPage]=null),this._currentPage=this._mosaicsData.length,this._mosaicsData.push(new Uint32Array(this._pageWidth*this._pageHeight)),this._dirties.push(!0),this._size.push([this._pageWidth,this._pageHeight]),this._textures.push(void 0),this._binPack=new i(this._pageWidth-4,this._pageHeight-4),this._allocateImage(e,t)):[l,this._currentPage,[this._pageWidth,this._pageHeight]]},e.prototype.dispose=function(){this._binPack=null,this._mosaicRects={};for(var e=0,t=this._textures;e<t.length;e++){var r=t[e];r&&r.dispose()}this._textures.length=0},e}()}).apply(null,i))||(e.exports=n)},suOV:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zp6E"),r("H1tY"),r("v7zm"),r("qMld")],void 0===(n=(function(e,t,r,i,n,a){var o=function(){function e(e){if(this._metrics=[],this._bitmaps=[],e)for(;e.next();)if(1===e.tag()){for(var t=e.getMessage();t.next();)if(3===t.tag()){for(var r=t.getMessage(),i=void 0,n=void 0,a=void 0,o=void 0,s=void 0,l=void 0,u=void 0;r.next();)switch(r.tag()){case 1:i=r.getUInt32();break;case 2:n=r.getBytes();break;case 3:a=r.getUInt32();break;case 4:o=r.getUInt32();break;case 5:s=r.getSInt32();break;case 6:l=r.getSInt32();break;case 7:u=r.getUInt32();break;default:r.skip()}r.release(),i&&(this._metrics[i]={width:a,height:o,left:s,top:l,advance:u},this._bitmaps[i]=n)}else t.skip();t.release()}else e.skip()}return e.prototype.getMetrics=function(e){return this._metrics[e]},e.prototype.getBitmap=function(e){return this._bitmaps[e]},e}(),s=function(){function e(){this._ranges=[]}return e.prototype.getRange=function(e){return this._ranges[e]},e.prototype.addRange=function(e,t){this._ranges[e]=t},e}();return function(){function e(e){this._glyphInfo={},this._baseURL=e}return e.prototype.getRange=function(e,t){var s=this._getFontStack(e);if(i("stable-symbol-rendering")&&t>0)return s.addRange(t,new o),a.resolve();if(s.getRange(t))return a.resolve();var l=256*t,u=l+255,c=this._baseURL.replace("{fontstack}",e).replace("{range}",l+"-"+u);return r(c,{responseType:"array-buffer"}).then((function(e){s.addRange(t,new o(new n(new Uint8Array(e.data),new DataView(e.data))))})).catch((function(){s.addRange(t,new o)}))},e.prototype.getGlyph=function(e,t){var r=this._getFontStack(e);if(r){var i=Math.floor(t/256);if(!(i>256)){var n=r.getRange(i);if(n)return{metrics:n.getMetrics(t),bitmap:n.getBitmap(t)}}}},e.prototype._getFontStack=function(e){var t=this._glyphInfo[e];return t||(t=this._glyphInfo[e]=new s),t},e}()}).apply(null,i))||(e.exports=n)},ts8o:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("TMur"),r("Vx27"),r("YADd"),r("Lzvl"),r("ZMIQ")],n=(function(e,t,r,i,n,a,o,s){var l={base:a,key:"type",typeMap:{extent:i.Extent,polygon:i.Polygon}};return function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="geometry",t.geometry=null,t}var i;return r.__extends(t,e),i=t,Object.defineProperty(t.prototype,"version",{get:function(){return(this._get("version")||0)+1},enumerable:!0,configurable:!0}),t.prototype.clone=function(){return new i({geometry:this.geometry.clone()})},r.__decorate([n.property({types:l,json:{read:o.fromJSON,write:!0}})],t.prototype,"geometry",void 0),r.__decorate([n.property({readOnly:!0,dependsOn:["geometry"]})],t.prototype,"version",null),i=r.__decorate([n.subclass("esri.views.layers.support.Geometry")],t)}(s)}).apply(null,i),void 0===n||(e.exports=n)},"uf/D":function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("R2Zq"),r("LxLY"),r("qMld"),r("lRq4"),r("YaB4"),r("hwgr"),r("tI6k"),r("JNkf"),r("gi5q"),r("7Lgj"),r("f3JK")],n=(function(e,t,r,i,n,a,o,s,l,u,c,h,p,d){function f(e,t){if(e){var r=e.getLayoutProperty("visibility");if(!r||"none"!==r.getValue()&&(void 0===e.minzoom||e.minzoom<t+1e-6)&&(void 0===e.maxzoom||e.maxzoom>=t-1e-6))return!0}return!1}Object.defineProperty(t,"__esModule",{value:!0});var _=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._backgroundTiles=[],t._fadeRecorder=new l.FadeRecorder(400),t._pointToCallbacks=new Map,t._parsedDataQueue=new Map,t}return r.__extends(t,e),t.prototype.destroy=function(){this.removeAllChildren(),this.children.forEach((function(e){return e.destroy()})),this._spriteMosaic&&this._spriteMosaic.dispose(),this._glyphMosaic&&this._glyphMosaic.dispose()},Object.defineProperty(t.prototype,"updating",{get:function(){return this._parsedDataQueue.size>0},enumerable:!0,configurable:!0}),t.prototype.setStyleResources=function(e,t,r){this._spriteMosaic=e,this._glyphMosaic=t,this._styleRepository=r},t.prototype.hitTest=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var i,n;return r.__generator(this,(function(r){return i=[e,t],n=a.createResolver(),this._pointToCallbacks.set(i,n),this.requestRender(),[2,n.promise]}))}))},t.prototype.setTileData=function(e,t){var r=this.stage;if(r.dataUploadCounter<u.MAX_GPU_UPLOADS_PER_FRAME&&t)return e.setData(t.tileData,t.client,t.refKeys),void r.dataUploadCounter++;t?(this._parsedDataQueue.set(e,t),this.emit("updating-change")):e.setData(null,null)},t.prototype.createRenderParams=function(t){return r.__assign(r.__assign({},e.prototype.createRenderParams.call(this,t)),{renderPass:null,styleLayer:null,styleLayerId:-1,glyphMosaic:this._glyphMosaic,spriteMosaic:this._spriteMosaic,fadeRecorder:this._fadeRecorder,hasClipping:!!this._clippingInfos})},t.prototype.doRender=function(t){!this.visible||t.drawPhase!==c.WGLDrawPhase.MAP&&t.drawPhase!==c.WGLDrawPhase.DEBUG||void 0===this._spriteMosaic||e.prototype.doRender.call(this,t)},t.prototype.removeChild=function(t){return this._parsedDataQueue.has(t)&&(this._parsedDataQueue.delete(t),this.emit("updating-change")),e.prototype.removeChild.call(this,t)},t.prototype.renderChildren=function(t){if(t.drawPhase!==c.WGLDrawPhase.DEBUG){var r=this.stage;if(this._parsedDataQueue.size>0&&r.dataUploadCounter<u.MAX_GPU_UPLOADS_PER_FRAME){for(var n=i.pairsOfMap(this._parsedDataQueue),a=0;a<n.length&&r.dataUploadCounter<u.MAX_GPU_UPLOADS_PER_FRAME;a++){var o=n[a][0],s=n[a][1];o.setData(s.tileData,s.client,s.refKeys),this._parsedDataQueue.delete(o),r.dataUploadCounter++}this.emit("updating-change")}if(this._fadeRecorder.recordLevel(t.displayLevel),this._doRender(t),(this._parsedDataQueue.size>0||this._fadeRecorder.needsRedraw())&&this.requestRender(),this._pointToCallbacks.size>0){var l=t.context,h=l.getBoundFramebufferObject();t.drawPhase=c.WGLDrawPhase.HITTEST;var p=t.painter.effects.hittest;p.bind(t),this._doRender(t),p.draw(t,this._pointToCallbacks,6),l.bindFramebuffer(h)}}else e.prototype.renderChildren.call(this,t)},t.prototype.removeAllChildren=function(){this._parsedDataQueue.clear();for(var t=0;t<this.children.length;t++)this.children[t].dispose();e.prototype.removeAllChildren.call(this)},t.prototype._doRender=function(t){var r=t.context,i=this._styleRepository,n=i.layers,a=!0;t.drawPhase===c.WGLDrawPhase.HITTEST&&(a=!1),i.backgroundBucketIds.length>0&&(t.renderPass="background",this._renderBackgroundLayers(t,i.backgroundBucketIds)),e.prototype.renderChildren.call(this,t);for(var o=this.children.filter((function(e){return e.visible})),s=0,l=o;s<l.length;s++){var u=l[s];u.triangleCount=0,u.commitChanges()}r.setStencilWriteMask(0),r.setColorMask(!0,!0,!0,!0),r.setStencilOp(7680,7680,7681),r.setStencilTestEnabled(!0),r.setBlendingEnabled(!1),r.setDepthTestEnabled(!0),r.setDepthWriteEnabled(!0),r.setDepthFunction(515),r.setClearDepth(1),r.clear(r.gl.DEPTH_BUFFER_BIT),t.renderPass="opaque";for(var h=n.length-1;h>=0;h--)this._renderStyleLayer(h,t,o);for(r.setDepthWriteEnabled(!1),r.setBlendingEnabled(a),r.setBlendFunctionSeparate(1,771,1,771),t.renderPass="translucent",h=0;h<n.length;h++)this._renderStyleLayer(h,t,o);for(r.setDepthTestEnabled(!1),t.renderPass="symbol",h=0;h<n.length;h++)this._renderStyleLayer(h,t,o);r.bindVAO(),r.setStencilTestEnabled(!0),r.setBlendingEnabled(!0)},t.prototype._renderStyleLayer=function(e,t,r){var i=t.painter,n=t.renderPass,a=this._styleRepository.layers[e];if(void 0!==a){var o;switch(a.type){case 0:return;case 1:if("opaque"!==n&&"translucent"!==t.renderPass)return;o="vtlFill";break;case 2:if("translucent"!==n)return;o="vtlLine";break;case 4:if("symbol"!==n)return;o="vtlCircle";break;case 3:if("symbol"!==n)return;o="vtlSymbol"}var s=t.displayLevel;if(!(0===r.length||void 0!==a.minzoom&&a.minzoom>=s+1e-6||void 0!==a.maxzoom&&a.maxzoom<s-1e-6)){t.styleLayerId=e,t.styleLayer=a;for(var l=0,u=r;l<u.length;l++)if(u[l].layerData[e]){i.renderObjects(t,r,o);break}}}},t.prototype._renderBackgroundLayers=function(e,t){for(var r=e.context,i=e.displayLevel,a=e.painter,s=e.state,l=this._styleRepository,u=!1,_=0,y=t;_<y.length;_++){var v=y[_];if(f(l.layers[v],i)){u=!0;break}}if(u){var g=this._tileInfoView.getTileCoverage(e.state,0,"smallest"),b=g.spans,m=g.lodInfo,w=m.level,x=o.create(),D=[];if(this._renderPasses){var T=this._renderPasses[0];n.isSome(this._clippingInfos)&&(T.brushes[0].prepareState(e,this._clippingInfos[0]),T.brushes[0].drawMany(e,this._clippingInfos))}for(var I,P=this._backgroundTiles,S=0,V=0,B=b;V<B.length;V++)for(var R=B[V],C=R.row,M=R.colTo,O=R.colFrom;O<=M;O++){if(S<P.length)(I=P[S]).key.set(w,C,m.normalizeCol(O),m.getWorldForColumn(O)),this._tileInfoView.getTileBounds(x,I.key,!1),I.bounds=x,I.coords[0]=x[0],I.coords[1]=x[3];else{var j=new d(w,C,m.normalizeCol(O),m.getWorldForColumn(O));I=new h.TiledDisplayObject(j,this._tileInfoView.getTileBounds(o.create(),j),[512,512],[4096,4096]),P.push(I)}I.setTransform(s,this._tileInfoView.getTileResolution(I.key)),D.push(I),S++}r.setStencilWriteMask(0),r.setColorMask(!0,!0,!0,!0),r.setStencilOp(7680,7680,7681),r.setStencilFunction(514,0,255);var k=!0;e.drawPhase===c.WGLDrawPhase.HITTEST&&(k=!1),r.setStencilTestEnabled(k);for(var L=0,A=t;L<A.length;L++){var E=l.layers[v=A[L]];f(E,i)&&(e.styleLayerId=v,e.styleLayer=E,a.renderObjects(e,D,"vtlBackground"))}p.pool.release(g)}},t}(s.TileContainer);t.VectorTileContainer=_}).apply(null,i),void 0===n||(e.exports=n)},xkJJ:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("jZlN"),r("ma1f"),r("eIBl"),r("qsST"),r("qMld"),r("Vx27"),r("lRq4"),r("BEij"),r("fCqw"),r("VjU6"),r("uf/D"),r("6i4F"),r("YOjP"),r("EBSo"),r("WsO6")],n=(function(e,t,r,i,n,a,o,s,l,u,c,h,p,d,f,_,y,v){var g=o.getLogger("esri.views.2d.layers.VectorTileLayerView2D");return function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._handles=new a,t._fetchQueue=null,t._parseQueue=null,t._isTileHandlerPromiseFulfilled=!1,t._invalidateStyle=!1,t}return r.__extends(t,e),t.prototype.initialize=function(){var e=this,t=this.layer.tileInfo,r=this.view.constraints.rotationEnabled;(t&&t.spatialReference).equals(this.view.spatialReference)?(this._tileInfoView=new _(this.layer.tileInfo,this.layer.fullExtent),this._vectorTileView=new d.VectorTileContainer(this._tileInfoView),this._tileHandler=new c.TileHandler(this.layer,window.devicePixelRatio||1,!0,this._vectorTileView,null,r),this.container.visible=this.layer.visible,this.container.addChild(this._vectorTileView),this.handles.add([this._vectorTileView.on("updating-change",(function(){return e.notifyChange("updating")})),this.watch("layer.currentStyleInfo",(function(){return e._start()})),this.watch("layer.visible",(function(){return e.container.visible=e.layer.visible}))])):this.addResolvingPromise(s.reject(new n("layerview:spatial-reference-incompatible","The spatial reference of this layer does not meet the requirements of the view",{layer:this.layer})))},t.prototype.destroy=function(){this._stop(),this.container.removeAllChildren(),this._vectorTileView.destroy(),this._tileHandler&&(this._tileHandler.destroy(),this._tileHandler=null)},t.prototype.hitTest=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var n,a,o,s;return r.__generator(this,(function(r){switch(r.label){case 0:return this.suspended||!this._tileHandlerPromise?[2,null]:[4,this._tileHandlerPromise];case 1:return r.sent(),[4,this._vectorTileView.hitTest(e,t)];case 2:return(n=r.sent())&&0!==n.length?(a=n[0]-1,o=this._tileHandler.getStyleRepository().layers,a>=o.length?[2,null]:((s=new i({attributes:{layerId:a,layerName:o[a].id}})).layer=this.layer,s.sourceLayer=this.layer,[2,s])):[2,null]}}))}))},t.prototype.update=function(e){var t=this,r=this._tileHandlerPromise;r&&r.then((function(){if(e.pixelRatio!==t._tileHandler.devicePixelRatio)return t._start(),void(t._tileHandler.devicePixelRatio=e.pixelRatio);t._invalidateStyle?(t._issueStyleInvalidation(),t._invalidateStyle=!1):(t._fetchQueue.pause(),t._parseQueue.pause(),t._fetchQueue.state=e.state,t._parseQueue.state=e.state,t._tileManager.update(e),t._parseQueue.resume(),t._fetchQueue.resume());for(var r=0,i=t._vectorTileView.children;r<i.length;r++)t._tileHandler.updateTile(i[r],e)}))},t.prototype.attach=function(){var e=this;this._start(),this._handles.add(this.layer.on("paint-change",(function(){return e._vectorTileView.requestRender()}))),this._handles.add(this.layer.on("layout-change",(function(){e._invalidateStyle=!0,e.requestUpdate()})))},t.prototype.detach=function(){this._stop(),this._handles.removeAll()},t.prototype.moveStart=function(){this.requestUpdate()},t.prototype.viewChange=function(){this.requestUpdate()},t.prototype.moveEnd=function(){this.requestUpdate()},t.prototype.canResume=function(){var t=e.prototype.canResume.call(this),r=this.layer;if(t&&r.currentStyleInfo){var i=this.view.scale,n=r.currentStyleInfo;if(n&&n.layerDefinition){var a=n.layerDefinition;a.minScale&&a.minScale<i&&(t=!1),a.maxScale&&a.maxScale>i&&(t=!1)}}return t},t.prototype.isUpdating=function(){var e,t,r,i;return!this._isTileHandlerPromiseFulfilled||null!==(t=null===(e=this._fetchQueue)||void 0===e?void 0:e.updating)&&void 0!==t&&t||null!==(i=null===(r=this._parseQueue)||void 0===r?void 0:r.updating)&&void 0!==i&&i||this._vectorTileView.updating},t.prototype.acquireTile=function(e){var t=this,r=this._createVectorTile(e);return this._tileHandlerPromise.then((function(){t._fetchQueue.push(r.key).then((function(e){return t._parseQueue.push(e)})).then((function(e){r.once("attach",(function(){return t.requestUpdate()})),t._vectorTileView.setTileData(r,e),t._vectorTileView.addChild(r)})).catch((function(e){s.isAbortError(e)||g.error(e),r.destroy()}))})),r},t.prototype.releaseTile=function(e){var t=e.key.id;this._fetchQueue.abort(t),this._parseQueue.abort(t),this._tileHandler.abortTileUpdate(t),this.requestUpdate()},t.prototype._start=function(){var e=this;if(this._stop(),this._tileManager=new h.TileManager({acquireTile:function(t){return e.acquireTile(t)},releaseTile:function(t){return e.releaseTile(t)},tileInfoView:this._tileInfoView,fadeDuration:300},this._vectorTileView),this.layer.currentStyleInfo){var t=new AbortController,r=this._tileHandler.start({signal:t.signal}).then((function(){e._fetchQueue=new y({tileInfoView:e._tileInfoView,process:function(t,r){return e._getTileData(t,r)},concurrency:15}),e._parseQueue=new y({tileInfoView:e._tileInfoView,process:function(t,r){return e._parseTileData(t,r)},concurrency:8}),e.requestUpdate(),e._isTileHandlerPromiseFulfilled=!0}));this._tileHandler.spriteMosaic.then((function(t){e._vectorTileView.setStyleResources(t,e._tileHandler.glyphMosaic,e.layer.styleRepository),e.requestUpdate()})),this._tileHandlerAbortController=t,this._tileHandlerPromise=r}},t.prototype._stop=function(){if(this._tileHandlerAbortController){var e=this._tileHandlerAbortController;e&&e.abort(),this._tileHandlerPromise=null,this._isTileHandlerPromiseFulfilled=!1,this._fetchQueue&&(this._fetchQueue.destroy(),this._fetchQueue=null),this._parseQueue&&(this._parseQueue.destroy(),this._parseQueue=null),this._tileManager&&(this._tileManager.destroy(),this._tileManager=null),this._vectorTileView.removeAllChildren()}},t.prototype._getTileData=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var i;return r.__generator(this,(function(r){switch(r.label){case 0:return[4,this._tileHandler.fetchTileData(e,t)];case 1:return i=r.sent(),[2,{key:e,data:i}]}}))}))},t.prototype._parseTileData=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(r){return[2,this._tileHandler.parseTileData(e,this.updateParameters.state.rotation,t)]}))}))},t.prototype._issueStyleInvalidation=function(){var e=this;this._tileHandlerPromise=this._tileHandler.updateStyle().then((function(){e._tileHandler.spriteMosaic.then((function(t){return e._vectorTileView.setStyleResources(t,e._tileHandler.glyphMosaic,e.layer.styleRepository)})),e._fetchQueue.pause(),e._parseQueue.pause(),e._fetchQueue.clear(),e._parseQueue.clear(),e._parseQueue.resume(),e._fetchQueue.resume(),e.requestUpdate()}))},t.prototype._createVectorTile=function(e){var t=this.view.constraints.rotationEnabled,r=this._tileInfoView.getTileBounds(u.create(),e);return new p.VectorTile(e,this.layer.styleRepository,r,[512,512],this.view.rotation,t)},r.__decorate([l.property()],t.prototype,"_fetchQueue",void 0),r.__decorate([l.property()],t.prototype,"_parseQueue",void 0),r.__decorate([l.property()],t.prototype,"_isTileHandlerPromiseFulfilled",void 0),r.__decorate([l.property({dependsOn:["view.scale","layer.currentStyleInfo"]})],t.prototype,"suspended",void 0),r.__decorate([l.property({dependsOn:["_isTileHandlerPromiseFulfilled","_parseQueue.updating","_parseQueue.updating"]})],t.prototype,"updating",void 0),r.__decorate([l.subclass("esri.views.2d.layers.VectorTileLayerView2D")],t)}(f.LayerView2DMixin(v))}).apply(null,i),void 0===n||(e.exports=n)}}]);