????
Current Path : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/ |
Current File : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/86.4f02e55be282281db0c9.js |
(function(){var e={"esri/views/2d/layers/features/batchUtils":"SCaX","esri/views/2d/layers/features/processors/SymbolProcessor":"dh9Z","esri/layers/support/labelFormatUtils":"y/j/"},t=this||window,r=t.webpackJsonp=t.webpackJsonp||[];r.registerAbsMids?r.registerAbsMids(e):(r.absMidsWaiting=r.absMidsWaiting||[]).push(e)})(),(window.webpackJsonp=window.webpackJsonp||[]).push([[86],{SCaX:function(e,t,r){var n,a;n=[r.dj.c(e.i),t,r("qMld")],void 0===(a=(function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.executeForEachAsync=function(e,t,n){var a,i=null!==(a=null==n?void 0:n.batchSize)&&void 0!==a?a:100,o=r.createResolver(),s=0;return function a(){for(var l=Date.now(),u=!1,c=0;!u&&c<500;){try{for(n&&r.throwIfAborted(n);s<Math.min(s+i,e.length);s++)t(e[s])}catch(e){o.reject(e)}c=Date.now()-l,u=s>=e.length}u?o.resolve():setTimeout(a,0)}(),o.promise}}).apply(null,n))||(e.exports=a)},dh9Z:function(e,t,r){var n,a;n=[r.dj.c(e.i),t,r("zOht"),r("ma1f"),r("H1tY"),r("qsST"),r("LxLY"),r("qMld"),r("Vx27"),r("Z4y+"),r("5WBt"),r("y/j/"),r("hz/Y"),r("YaB4"),r("WEAo"),r("MtZC"),r("SCaX"),r("rAGl"),r("68TM"),r("lvbU")],a=(function(e,t,r,n,a,i,o,s,l,u,c,f,d,p,h,y,g,v,b,_){Object.defineProperty(t,"__esModule",{value:!0});var m=i.getLogger("esri.views.2d.layers.features.processors.SymbolProcessor"),w=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._symbolToMosaicItemMap=new Map,t._visualSetPromises=new Map,t.type="symbol",t}return r.__extends(t,e),t.prototype.initialize=function(){this._factory=this._createFactory()},t.prototype.destroy=function(){this._visualSetPromises.clear(),this._symbolToMosaicItemMap.clear(),this.notifyChange("updating")},Object.defineProperty(t.prototype,"supportsTileUpdates",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"labelingInfo",{get:function(){return!this.config||o.isNone(this.config.labelingInfo)?null:this.config.labelingInfo.map((function(e){return c.fromJSON(e)}))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"labelingInfoFeatureReduction",{get:function(){var e,t;if(!this.config||o.isNone(this.config.featureReduction))return null;var r=this.config.featureReduction;return"cluster"===r.type&&o.isSome(null===(e=r.drawingInfo)||void 0===e?void 0:e.labelingInfo)?null===(t=r.drawingInfo)||void 0===t?void 0:t.labelingInfo.map((function(e){return c.fromJSON(e)})):null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasLabels",{get:function(){return!(!this.labelingInfo&&!this.labelingInfoFeatureReduction)},enumerable:!0,configurable:!0}),t.prototype._updateLabelClassInfos=function(){return r.__awaiter(this,void 0,void 0,(function(){var e,t,a,i,l,u=this;return r.__generator(this,(function(c){switch(c.label){case 0:return o.isNone(this.labelingInfo)&&o.isNone(this.labelingInfoFeatureReduction)?[2,s.resolve()]:(e=function(e){return r.__awaiter(u,void 0,void 0,(function(){var t,a;return r.__generator(this,(function(r){switch(r.label){case 0:t=null,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,f.createLabelFunction(e,this.service.fields,this.spatialReference)];case 2:return t=r.sent(),[3,4];case 3:return a=r.sent(),m.error(new n("mapview-labeling","Failed to evaluate "+(e.where?"where":"arcade")+" expression",{labelClass:e,error:a})),[3,4];case 4:return[2,t]}}))}))},t=[],o.isSome(this.labelingInfo)&&t.push.apply(t,this.labelingInfo.map((function(t,n){return r.__awaiter(u,void 0,void 0,(function(){var a;return r.__generator(this,(function(r){switch(r.label){case 0:return a=o.andThen,[4,e(t)];case 1:return[2,a.apply(void 0,[r.sent(),function(e){return{type:"feature",labelClass:t,index:n,minScale:t.minScale,maxScale:t.maxScale,builder:e,symbol:t.symbol,symbolJSON:t.symbol.toJSON()}}])]}}))}))}))),o.isSome(this.labelingInfoFeatureReduction)&&(a=t.length,t.push.apply(t,this.labelingInfoFeatureReduction.map((function(t,n){return r.__awaiter(u,void 0,void 0,(function(){var i;return r.__generator(this,(function(r){switch(r.label){case 0:return i=o.andThen,[4,e(t)];case 1:return[2,i.apply(void 0,[r.sent(),function(e){return{type:"aggregate",labelClass:t,index:a+n,minScale:t.minScale,maxScale:t.maxScale,builder:e,symbol:t.symbol,symbolJSON:t.symbol.toJSON()}}])]}}))}))})))),[4,s.all(t)]);case 1:return i=c.sent(),l=i.filter((function(e){return e})),this._labelClassInfos=l,[2]}}))}))},Object.defineProperty(t.prototype,"hydrate",{get:function(){return h.createHydrateFactory(this.service.geometryType)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderer",{get:function(){return this.config?d.fromJSON(this.config.renderer):(a("esri-2d-debug")&&console.debug("Unable to create renderer for undefined configuration"),null)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"updating",{get:function(){return this._visualSetPromises.size>0},enumerable:!0,configurable:!0}),t.prototype.update=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t;return r.__generator(this,(function(r){switch(r.label){case 0:return t=this._getMeshHash(),this._set("config",e),[4,this._updateLabelClassInfos()];case 1:return r.sent(),t!==this._getMeshHash()&&(this._factory=this._createFactory()),this._factory.update(this._labelClassInfos,this.renderer,this.tileStore.tileScheme.tileInfo),[2]}}))}))},t.prototype.onTileData=function(e,t,r){var n=this,a=this._onTileData(e,t,r);return this._visualSetPromises.set(e,a),s.always(a,(function(){return n._cleanPromise(e)})),this.notifyChange("updating"),a},t.prototype.onTileError=function(e,t,r){var n=this,a=this.remoteClient.invoke("tileRenderer.onTileError",{tileKey:e.id,error:t},{signal:r.signal});return this._visualSetPromises.set(e,a),s.always(a,(function(){return n._cleanPromise(e)})),this.notifyChange("updating"),a},t.prototype._getMeshHash=function(){var e=y.getVVFlags("visualVariables"in this.renderer&&this.renderer.visualVariables||[]);return this.renderer.getMeshHash()+"."+e},t.prototype._createFactory=function(){var e=this,t=this.service,r=t.geometryType,n=t.objectIdField,a={geometryType:r,fields:t.fields,spatialReference:u.fromJSON(this.spatialReference)},i=new p.WGLTemplateStore((function(t,r){return e.remoteClient.invoke("tileRenderer.getMaterialItems",t,r)}),!1);return this._store=i,this._matcher=p.createMatcher(i,a,this.renderer),new p.WGLMeshFactory(r,n,this.renderer,i)},t.prototype._cleanPromise=function(e){this._visualSetPromises.delete(e),this.notifyChange("updating")},t.prototype._onTileData=function(e,t,n){return r.__awaiter(this,void 0,void 0,(function(){var a,i,s,l,u,c,f,d,p,h;return r.__generator(this,(function(r){switch(r.label){case 0:a=t.remove,i=t.clear,s=this._processFeatures(e,t.addOrUpdate,t.transformParams,n),l=n.signal,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,s];case 2:return u=r.sent(),c=o.andThen(u,(function(e){return e.message})),f=o.andThen(u,(function(e){return e.transferList}))||[],d={addOrUpdate:c,remove:a,clear:i},p={transferList:o.unwrap(f)||[],signal:l},[2,this.remoteClient.invoke("tileRenderer.onTileData",{tileKey:e.id,data:d},p)];case 3:return h=r.sent(),this._handleError(e,h,n),[3,4];case 4:return[2]}}))}))},t.prototype._processFeatures=function(e,t,n,a){return r.__awaiter(this,void 0,void 0,(function(){var i,o,l,u,c;return r.__generator(this,(function(r){switch(r.label){case 0:return t&&t.length?(i=this._factory,o={viewingMode:"",scale:e.scale},[4,this._matcher]):[2,null];case 1:return l=r.sent(),[4,this._getLabelInfos(e,t,n)];case 2:return u=r.sent(),[4,i.analyze(t,l,n,o)];case 3:return c=r.sent(),s.throwIfAborted(a),[2,this._writeFeatures(e,c,n,u,i,a)]}}))}))},t.prototype._writeFeatures=function(e,t,i,s,l,u){return r.__awaiter(this,void 0,void 0,(function(){var c,f,d;return r.__generator(this,(function(p){switch(p.label){case 0:return c=l.createMeshData(t.length),f={viewingMode:"",scale:e.scale},d=r.__assign(r.__assign({},u),{batchSize:200}),[4,g.executeForEachAsync(t,(function(t){try{var r=o.isSome(s)?s.get(t.localId):null;l.write(c,t,i,f,e.level,r)}catch(e){a("esri-2d-debug")&&m.error(new n("mapview-mesh-factory","Failed to write feature",{error:e,feature:t}))}}),d)];case 1:return p.sent(),[2,this._encodeDisplayData(c)]}}))}))},t.prototype._encodeDisplayData=function(e){var t={},r=new Array;return e.encode(t,r),{message:t,transferList:r}},t.prototype._handleError=function(e,t,r){if(!s.isAbortError(t))return this.remoteClient.invoke("tileRenderer.onTileError",{tileKey:e.id,error:t.message},{signal:r.signal})},t.prototype._getLabelClassInfosForScale=function(e){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(t){return[2,this._labelClassInfos.filter((function(t){var r=t.minScale,n=t.maxScale;return(!r||r>=e||0===r)&&(!n||n<=e||0===n)}))]}))}))},t.prototype._shouldDiscard=function(e,t){switch(this.service.geometryType){case"esriGeometryPoint":var r=t.geometry,n=r.x,a=r.y;return e.checkOverlap(n,a);case"esriGeometryPolygon":var i=t.centroid;return e.checkOverlap(n=i.x,a=i.y);default:return!1}},t.prototype._markUsed=function(e,t){switch(this.service.geometryType){case"esriGeometryPoint":var r=t.geometry,n=r.x,a=r.y;return e.markUsed(n,a);case"esriGeometryPolygon":var i=t.centroid;return e.markUsed(n=i.x,a=i.y)}},t.prototype._getLabelInfos=function(e,t,n){return r.__awaiter(this,void 0,void 0,(function(){var a,i,s,l,c,f,d,h;return r.__generator(this,(function(y){switch(y.label){case 0:return this.hasLabels&&t&&0!==t.length?[4,this._getLabelClassInfosForScale(e.scale)]:[2,null];case 1:if(0===(a=y.sent()).length)return[2,null];for(i=new Map,s=new p.CollisionGrid(p.definitions.COLLISION_EARLY_REJECT_BUCKET_SIZE),l=function(e){var t=e.localId;if(c._shouldDiscard(s,e))return i.has(t)||i.set(t,null),"continue";for(var l=function(e,t){for(var r=new Array(e),n=0;n<r.length;n++)r[n]=null;return r}(a.length),f=!1,d=function(i){var s=a[i],d=s.type,h=s.index,y=s.builder,g=s.symbolJSON;if((_.isAggregateId(t)&&e.attributes.cluster_count>1?"aggregate":"feature")!==d)return"continue";if(!n)return m.error("mapview-labeling","Tried to evaluate geometry expression but no transformation found"),{value:void 0};var b=c.hydrate(e.geometry,n.transform,n.hasZ,n.hasM),w=r.__assign(r.__assign({},e),{geometry:b});b.spatialReference=u.fromJSON(c.spatialReference);var S=y.evaluate(w);if(o.isNone(S)||""===S)return"continue";var I=p.bidiText(S),O=I[1];f=!0,c._store.getMosaicItem(g,!1,v.codepoints(I[0])).then((function(e){l[h]={glyphs:e.glyphMosaicItems,rtl:O,classIndex:h}}))},h=0;h<a.length;h++){var y=d(h);if("object"==typeof y)return y}i.set(t,l),f&&c._markUsed(s,e)},c=this,f=0,d=t;f<d.length;f++)if("object"==typeof(h=l(d[f])))return[2,h.value];return[2,i]}}))}))},r.__decorate([l.property({readOnly:!0})],t.prototype,"supportsTileUpdates",null),r.__decorate([l.property()],t.prototype,"config",void 0),r.__decorate([l.property({dependsOn:["config"]})],t.prototype,"labelingInfo",null),r.__decorate([l.property({dependsOn:["config"]})],t.prototype,"labelingInfoFeatureReduction",null),r.__decorate([l.property({dependsOn:["labelingInfo","labelingInfoFeatureReduction"]})],t.prototype,"hasLabels",null),r.__decorate([l.property({dependsOn:["service"]})],t.prototype,"hydrate",null),r.__decorate([l.property({dependsOn:["config"],readOnly:!0})],t.prototype,"renderer",null),r.__decorate([l.property({readOnly:!0})],t.prototype,"updating",null),r.__decorate([l.subclass("esri.views.2d.layers.features.processors.SymbolProcessor")],t)}(b.default);t.default=w}).apply(null,n),void 0===a||(e.exports=a)},"y/j/":function(e,t,r){var n,a;n=[r.dj.c(e.i),t,r("zOht"),r("ma1f"),r("qsST"),r("hCwm"),r("ICCr"),r("I90O"),r("k7g7"),r("L924"),r("sCbS"),r("2Kdy")],void 0===(a=(function(e,t,n,a,i,o,s,l,u,c,f){Object.defineProperty(t,"__esModule",{value:!0});var d=i.getLogger("esri.layers.support.labelFormatUtils"),p={type:"simple",evaluate:function(){return null}};function h(e,t,r,n){var a=u.getField(n,e);if(!a)return t;if(null==r[a.name])return"";var i=a.domain;if(i)if("codedValue"===i.type||"coded-value"===i.type)for(var l=r[a.name],c=0,f=i.codedValues;c<f.length;c++){var d=f[c];if(d.code===l)return d.name}else if("range"===i.type){var p=+r[a.name];if(("range"in i?i.range[0]:i.minValue)<=p&&p<=("range"in i?i.range[1]:i.maxValue))return i.name}var h=r[a.name];return"date"===a.type||"esriFieldTypeDate"===a.type?h=o.formatDate(h,o.convertDateFormatToIntlOptions("short-date")):u.isNumericField(a)&&(h=s.formatNumber(+h)),h||""}t.createLabelFunction=function(t,i,o){return n.__awaiter(this,void 0,void 0,(function(){var s,u,y,g,v,b,_,m;return n.__generator(this,(function(n){switch(n.label){case 0:return t&&t.symbol?(s=t.where,u=t.getLabelExpression(),s?[4,new Promise((function(e,t){r.e(8).then((function(){var t=[r("1eyA")];e.apply(null,t)}).bind(this)).catch(t.bind(this))}))]:[3,2]):[2,p];case 1:return g=n.sent(),[3,3];case 2:g=null,n.label=3;case 3:return y=g,"arcade"!==u.type?[3,5]:[4,f.createLabelExpression(u.expression,o,i)];case 4:return b=n.sent(),v={type:"arcade",evaluate:function(e){try{var t=b.evaluate({$feature:b.repurposeFeature(e)});if(null!=t)return t.toString()}catch(t){d.error(new a("bad-arcade-expression","Encountered an error when evaluating label expression for feature",{feature:e,expression:u}))}return null},needsHydrationToEvaluate:function(){return null==c.getSingleFieldArcadeExpression(u.expression)}},[3,6];case 5:v={type:"simple",evaluate:function(e){var t=e&&e.attributes;return t?u.expression.replace(/{[^}]*}/g,(function(e){return h(e.slice(1,-1),e,t,i)})):null}},n.label=6;case 6:if(s){try{_=y.WhereClause.create(s,new l(i))}catch(e){return[2,p]}m=v.evaluate,v.evaluate=function(e){return _.testFeature(e)?m(e):null}}return[2,v]}}))}))},t.formatField=h}).apply(null,n))||(e.exports=a)}}]);