123456789 |
- import{_ as c,$ as d,a0 as R,cJ as j,a1 as le,h as S,k as C,cK as pe,cL as M,aL as ye,a as p,al as K,x as fe,cM as ge,D as _e,cN as b,cO as me,q as ve,bF as W,cP as we,s as E,cQ as be,cR as ue,cS as Re,R as A,cG as ce,cH as Y,cT as Z,cU as X,cV as P,cW as ee,cX as qe,cq as te,cY as ie,cZ as Se,c_ as re,c$ as Ee,d0 as xe,d1 as N,d2 as J,t as k,g as F,d3 as Fe,d4 as Ie,b4 as L,ct as Oe,cA as Ce,S as Te,aY as Ue,m as I,d5 as Ae,d6 as ke,b_ as Ve,d7 as $e,b$ as Pe,aI as Ne,d8 as Je}from"./index.6c049565.js";import{a as se}from"./utils.eb2c3fd5.js";import{a9 as Le}from"./enums.0295eb81.js";import{y as Qe,u as ze}from"./LayerView.7c2db9bf.js";import{F as He,h as je}from"./schemaUtils.7eee5b9f.js";import{e as Me}from"./util.d5f4af7b.js";import{s as Q,d as Be}from"./popupUtils.33b7306b.js";import{i as Ge}from"./RefreshableLayerView.5868f703.js";import"./Utils.e8554a0e.js";import"./enums.2d9e6f64.js";import"./Texture.8e8dfb11.js";import"./VertexElementDescriptor.1fdca6da.js";import"./MaterialKey.bbaab8f1.js";import"./visualVariablesUtils.88ca310b.js";import"./createSymbolSchema.30665f63.js";import"./ExpandedCIM.64535143.js";import"./BidiEngine.d8bba3fc.js";import"./Rect.95b0fd2e.js";import"./quantizationUtils.4f3ed95a.js";import"./GeometryUtils.4f19e772.js";import"./floatRGBA.c5518572.js";let V=class extends j{constructor(){super(...arguments),this.isAggregate=!0}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.sourceLayer&&this.sourceLayer.featureReduction;return t&&"popupTemplate"in t&&t.popupEnabled?t.popupTemplate:null}getObjectId(){return this.attributes.aggregateId}};c([d({type:Boolean})],V.prototype,"isAggregate",void 0),V=c([R("esri.AggregateGraphic")],V);const B=V;let m=class extends le{constructor(e){super(e),this._filter=null,this.duration=S("mapview-transitions-duration"),this._excludedEffectView=new se(e),this._includedEffectView=new se(e)}get excludedEffects(){return this._excludedEffectView.effects}set featureEffect(e){this._get("featureEffect")!==e&&this._transitionTo(e)}get filter(){var e;return this._filter||((e=C(this.featureEffect))==null?void 0:e.filter)||null}get hasEffects(){return this._excludedEffectView.hasEffects||this._includedEffectView.hasEffects}get includedEffects(){return this._includedEffectView.effects}set scale(e){this._set("scale",e),this._excludedEffectView.scale=e,this._includedEffectView.scale=e}get transitioning(){return this._excludedEffectView.transitioning||this._includedEffectView.transitioning}transitionStep(e,t){this._set("scale",t),this.transitioning?(this._includedEffectView.transitionStep(e,t),this._excludedEffectView.transitionStep(e,t),this.transitioning||(this._filter=null)):(this._excludedEffectView.scale=t,this._includedEffectView.scale=t)}endTransitions(){this._includedEffectView.endTransitions(),this._excludedEffectView.endTransitions(),this._filter=null}_transitionTo(e){const t=this._get("featureEffect"),i=C(e),r=C(i==null?void 0:i.includedEffect),s=C(i==null?void 0:i.excludedEffect),a=this._includedEffectView.canTransitionTo(r)&&this._excludedEffectView.canTransitionTo(s);this._includedEffectView.effect=r,this._excludedEffectView.effect=s,this._set("featureEffect",i),this._filter=(i==null?void 0:i.filter)||(t==null?void 0:t.filter)||null,a||this.endTransitions()}};c([d()],m.prototype,"_filter",void 0),c([d()],m.prototype,"_excludedEffectView",void 0),c([d()],m.prototype,"_includedEffectView",void 0),c([d()],m.prototype,"duration",void 0),c([d()],m.prototype,"excludedEffects",null),c([d()],m.prototype,"featureEffect",null),c([d()],m.prototype,"filter",null),c([d()],m.prototype,"hasEffects",null),c([d()],m.prototype,"includedEffects",null),c([d({value:0})],m.prototype,"scale",null),c([d()],m.prototype,"transitioning",null),m=c([R("esri.layers.effects.FeatureEffectView")],m);const De=m;let T=class extends M{constructor(){super(...arguments),this.features=[]}readFeatures(e,t){var s;const i=ye.fromJSON(t.spatialReference),r=[];for(let a=0;a<e.length;a++){const n=e[a],o=B.fromJSON(n),l=n.geometry&&n.geometry.spatialReference;p(o.geometry)&&!l&&(o.geometry.spatialReference=i);const u=n.aggregateGeometries,h=o.aggregateGeometries;if(u&&p(h))for(const y in h){const f=h[y],g=(s=u[y])==null?void 0:s.spatialReference;p(f)&&!g&&(f.spatialReference=i)}r.push(o)}return r}};c([d({type:[B],json:{write:!0}})],T.prototype,"features",void 0),c([pe("features")],T.prototype,"readFeatures",null),T=c([R("esri.rest.support.AggregateFeatureSet")],T);const Ke=T;async function We(e,t){if(!e)return null;switch(e.type){case"symbol":return new(await K(()=>import("./SymbolTileRenderer.cbf21308.js"),["assets/SymbolTileRenderer.cbf21308.js","assets/index.6c049565.js","assets/index.cf071e35.css","assets/CircularArray.415a06a8.js","assets/Utils.e8554a0e.js","assets/enums.0295eb81.js","assets/enums.2d9e6f64.js","assets/Texture.8e8dfb11.js","assets/VertexElementDescriptor.1fdca6da.js","assets/FeatureContainer.8e5dd053.js","assets/TileContainer.282da507.js","assets/utils.eb2c3fd5.js","assets/MaterialKey.bbaab8f1.js","assets/WGLContainer.bbd0fcb8.js","assets/pixelUtils.f4eba4af.js","assets/VertexArrayObject.729879be.js","assets/ProgramTemplate.83fdf5b6.js","assets/StyleDefinition.d56936e4.js","assets/config.82550349.js","assets/GeometryUtils.51c4032a.js","assets/earcut.afc1d357.js","assets/visualVariablesUtils.4b17aac7.js","assets/visualVariablesUtils.88ca310b.js","assets/BufferPool.8a9a4ff1.js","assets/schemaUtils.7eee5b9f.js","assets/createSymbolSchema.30665f63.js","assets/ExpandedCIM.64535143.js","assets/BidiEngine.d8bba3fc.js","assets/Rect.95b0fd2e.js","assets/quantizationUtils.4f3ed95a.js","assets/GeometryUtils.4f19e772.js","assets/floatRGBA.c5518572.js","assets/util.d5f4af7b.js","assets/BaseTileRenderer.8f8a014d.js"])).default(t);case"heatmap":return new(await K(()=>import("./HeatmapTileRenderer.f5b46d0e.js"),["assets/HeatmapTileRenderer.f5b46d0e.js","assets/index.6c049565.js","assets/index.cf071e35.css","assets/BitmapTileContainer.76242c82.js","assets/Bitmap.5c9e2d15.js","assets/utils.eb2c3fd5.js","assets/Utils.e8554a0e.js","assets/enums.0295eb81.js","assets/enums.2d9e6f64.js","assets/Texture.8e8dfb11.js","assets/VertexElementDescriptor.1fdca6da.js","assets/MaterialKey.bbaab8f1.js","assets/TileContainer.282da507.js","assets/WGLContainer.bbd0fcb8.js","assets/pixelUtils.f4eba4af.js","assets/VertexArrayObject.729879be.js","assets/ProgramTemplate.83fdf5b6.js","assets/StyleDefinition.d56936e4.js","assets/config.82550349.js","assets/GeometryUtils.51c4032a.js","assets/earcut.afc1d357.js","assets/BaseTileRenderer.8f8a014d.js"])).default(t)}}function z(e){return e.some(t=>t.globalId)}function O(e){return e.filter(t=>!t.error).map(t=>{var i;return(i=t.objectId)!=null?i:t.globalId})}function ae(e,t){const i=new Set(e);for(const r of t.values())i.add(r);return i}function ne(e,t){const i=new Set(e);for(const r of t.values())i.delete(r);return i}let $=class extends le{constructor(e){super(e),this._hasGlobalIds=!1}normalizeCtorArgs(e){return this._queueProcessor=new fe({concurrency:1,process:e.process}),{}}destroy(){this.clear()}get updating(){return this._queueProcessor.length>0}clear(){this._queueProcessor.clear()}push(e){const t=this._queueProcessor,i=t.last();switch(e.type){case"update":case"refresh":if((i==null?void 0:i.type)===e.type)return;t.push(e).finally(()=>this.notifyChange("updating"));break;case"edit":{const r=(i==null?void 0:i.type)==="processed-edit"?i:null;r&&t.popLast();const s=this._mergeEdits(r,e);for(const a of s)t.push(a).finally(()=>this.notifyChange("updating"));break}}this.notifyChange("updating")}_mergeEdits(e,t){var u,h;const{addedFeatures:i,deletedFeatures:r,updatedFeatures:s}=t.edits;if(this._hasGlobalIds=this._hasGlobalIds||z(i)||z(s)||z(r),this._hasGlobalIds)return[e,{type:"processed-edit",edits:{addOrModified:[...i,...s],removed:r}}];const a=new Set(O((u=e==null?void 0:e.edits.addOrModified)!=null?u:[])),n=new Set(O((h=e==null?void 0:e.edits.removed)!=null?h:[])),o=new Set([...O(i),...O(s)]),l=new Set(O(r));return[{type:"processed-edit",edits:{addOrModified:Array.from(ae(ne(a,l),o)).map(y=>({objectId:y})),removed:Array.from(ae(ne(n,o),l)).map(y=>({objectId:y}))}}]}};c([d({readOnly:!0})],$.prototype,"updating",null),$=c([R("esri.views.2d.layers.support.FeatureCommandQueue")],$);const Ye=$;function Ze(e){return Array.isArray(e)}let x=class extends ge{constructor(e){super(e),this._startupResolver=_e(),this.isReady=!1}initialize(){this._controller=new AbortController,this.addResolvingPromise(this._startWorker(this._controller.signal))}destroy(){this._controller.abort(),this._connection&&this._connection.close()}set tileRenderer(e){this.client.tileRenderer=e}get closed(){return this._connection.closed}async startup(e,t,i,r){await this.when();const s=this._controller.signal,a=Ze(i.source)?{transferList:i.source,signal:s}:void 0,n={service:i,config:t,tileInfo:e.tileInfo.toJSON(),tiles:r};await this._connection.invoke("startup",n,a),this._startupResolver.resolve(),this._set("isReady",!0)}async updateTiles(e){return await this._startupResolver.promise,b(this._connection.invoke("updateTiles",e))}async update(e){const t={config:e};return await this._startupResolver.promise,this._connection.invoke("update",t)}async applyUpdate(e){return await this._startupResolver.promise,this._connection.invoke("applyUpdate",e)}async setHighlight(e){return await this._startupResolver.promise,b(this._connection.invoke("controller.setHighlight",e))}async stop(){if(await this._startupResolver.promise,!this.closed)return b(this._connection.invoke("stop"))}async refresh(e){return await this._startupResolver.promise,b(this._connection.invoke("controller.refresh",e))}async querySummaryStatistics(e,t,i){return await this._startupResolver.promise,this._connection.invoke("controller.querySummaryStatistics",{query:e.toJSON(),params:t},i)}async queryAggregateSummaryStatistics(e,t,i){return await this._startupResolver.promise,this._connection.invoke("controller.queryAggregateSummaryStatistics",{query:e.toJSON(),params:t},i)}async queryUniqueValues(e,t,i){return await this._startupResolver.promise,this._connection.invoke("controller.queryUniqueValues",{query:e.toJSON(),params:t},i)}async queryAggregateUniqueValues(e,t,i){return await this._startupResolver.promise,this._connection.invoke("controller.queryAggregateUniqueValues",{query:e.toJSON(),params:t},i)}async queryClassBreaks(e,t,i){return await this._startupResolver.promise,this._connection.invoke("controller.queryClassBreaks",{query:e.toJSON(),params:t},i)}async queryAggregateClassBreaks(e,t,i){return await this._startupResolver.promise,this._connection.invoke("controller.queryAggregateClassBreaks",{query:e.toJSON(),params:t},i)}async queryHistogram(e,t,i){return await this._startupResolver.promise,this._connection.invoke("controller.queryHistogram",{query:e.toJSON(),params:t},i)}async queryAggregateHistogram(e,t,i){return await this._startupResolver.promise,this._connection.invoke("controller.queryAggregateHistogram",{query:e.toJSON(),params:t},i)}async queryFeatures(e,t){return await this._startupResolver.promise,this._connection.invoke("controller.queryFeatures",e.toJSON(),t)}async queryVisibleFeatures(e,t){return await this._startupResolver.promise,this._connection.invoke("controller.queryVisibleFeatures",e.toJSON(),t)}async queryObjectIds(e,t){return await this._startupResolver.promise,this._connection.invoke("controller.queryObjectIds",e.toJSON(),t)}async queryFeatureCount(e,t){return await this._startupResolver.promise,this._connection.invoke("controller.queryFeatureCount",e.toJSON(),t)}async queryExtent(e,t){return this._connection.invoke("controller.queryExtent",e.toJSON(),t)}async queryLatestObservations(e,t){return await this._startupResolver.promise,this._connection.invoke("controller.queryLatestObservations",e.toJSON(),t)}async queryStatistics(e){return await this._startupResolver.promise,this._connection.invoke("controller.queryStatistics",e)}async queryAggregates(e,t){return await this._startupResolver.promise,this._connection.invoke("controller.queryAggregates",e.toJSON(),t)}async queryAggregateCount(e,t){return await this._startupResolver.promise,this._connection.invoke("controller.queryAggregateCount",e.toJSON(),t)}async queryAggregateIds(e,t){return await this._startupResolver.promise,this._connection.invoke("controller.queryAggregateIds",e.toJSON(),t)}async getObjectId(e){return await this._startupResolver.promise,this._connection.invoke("controller.getObjectId",e)}async getDisplayId(e){return await this._startupResolver.promise,this._connection.invoke("controller.getDisplayId",e)}async getFeatures(e){return await this._startupResolver.promise,this._connection.invoke("controller.getFeatures",e)}async getAggregates(){return await this._startupResolver.promise,this._connection.invoke("controller.getAggregates")}async getAggregateValueRanges(){return await this._startupResolver.promise,this._connection.invoke("controller.getAggregateValueRanges")}async mapValidDisplayIds(e){return await this._startupResolver.promise,this._connection.invoke("controller.mapValidDisplayIds",e)}async onEdits(e){return await this._startupResolver.promise,b(this._connection.invoke("controller.onEdits",e))}async enableEvent(e,t){return await this._startupResolver.promise,b(this._connection.invoke("controller.enableEvent",{name:e,value:t}))}pauseStream(){return b(this._connection.invoke("controller.pauseStream"))}resumeStream(){return b(this._connection.invoke("controller.resumeStream"))}async _startWorker(e){try{this._connection=await me("Pipeline",{client:this.client,strategy:"dedicated",signal:e})}catch(t){ve(t)}}};c([d()],x.prototype,"isReady",void 0),c([d({constructOnly:!0})],x.prototype,"client",void 0),c([d()],x.prototype,"tileRenderer",null),x=c([R("esri.views.2d.layers.support.FeatureLayerProxy")],x);const Xe=x,et=1e-6;class tt{constructor(t){this._tiles=new Map,this.buffer=0,this.acquireTile=t.acquireTile,this.releaseTile=t.releaseTile,this.tileInfoView=t.tileInfoView,this.buffer=t.buffer}destroy(){}clear(){this._tiles.forEach(t=>this._releaseTile(t))}tileKeys(){const t=[];return this._tiles.forEach((i,r)=>t.push(r)),t}update(t){const i=this.tileInfoView.getTileCoverage(t.state,this.buffer,"closest"),{spans:r,lodInfo:s}=i,{level:a}=s,n=[],o=[],l=new Set,u=new Set;for(const{row:h,colFrom:y,colTo:f}of r)for(let g=y;g<=f;g++){const v=W.getId(a,h,s.normalizeCol(g),s.getWorldForColumn(g)),w=this._getOrAcquireTile(n,v);l.add(v),w.isReady?w.visible=!0:u.add(w.key)}return u.forEach(h=>this._addPlaceholders(l,h)),this._tiles.forEach(h=>{l.has(h.key.id)||(o.push(h.key.id),this._releaseTile(h))}),we.pool.release(i),{hasMissingTiles:u.size>0,added:n,removed:o}}_getOrAcquireTile(t,i){if(!this._tiles.has(i)){const r=this.acquireTile(new W(i));t.push(i),this._tiles.set(i,r),r.visible=!1}return this._tiles.get(i)}_getTile(t){return this._tiles.get(t)}_releaseTile(t){this._tiles.delete(t.key.id),this.releaseTile(t)}_addPlaceholders(t,i){const r=this._addPlaceholderChildren(t,i);Math.abs(1-r)<et||this._addPlaceholderParent(t,i)||(this._getTile(i.id).visible=!0)}_addPlaceholderChildren(t,i){let r=0;return this._tiles.forEach(s=>{r+=this._addPlaceholderChild(t,s,i)}),r}_addPlaceholderChild(t,i,r){return i.key.level<=r.level||!i.hasData||!r.contains(i.key)?0:(i.visible=!0,t.add(i.key.id),1/(1<<2*(i.key.level-r.level)))}_addPlaceholderParent(t,i){let r=i.getParentKey(),s=0,a=null;for(;p(r);){if(t.has(r.id))return!0;const n=this._getTile(r.id);if(n!=null&&n.isReady){for(const o of t){const l=this._getTile(o);r.contains(l.key)&&(l.visible=!1)}return n.visible=!0,t.add(n.key.id),!0}(n==null?void 0:n.hasData)&&n.patchCount>s&&(s=n.patchCount,a=n),r=r.getParentKey()}return!!a&&(a.visible=!0,t.add(a.key.id),!0)}}const de="esri.views.layers.FeatureLayerView",H=E.getLogger(de),it=e=>{let t=class extends e{constructor(...i){super(...i),this._updatingRequiredFieldsPromise=null,this.filter=null,this.timeExtent=null,this.layer=null,this.requiredFields=[],this.view=null}initialize(){this.handles.add([A(()=>{var r;const i=this.layer;return[(r=i==null?void 0:i.elevationInfo)==null?void 0:r.featureExpressionInfo,i&&"displayField"in i?i.displayField:null,i==null?void 0:i.timeInfo,i&&"renderer"in i&&i.renderer,i&&"labelingInfo"in i&&i.labelingInfo,i&&"floorInfo"in i&&i.floorInfo,this.filter,this.featureEffect,this.timeExtent]},()=>this._handleRequiredFieldsChange(),ce),Y(()=>{var i;return(i=this.view)==null?void 0:i.floors},"change",()=>this._handleRequiredFieldsChange()),Y(()=>{const i=this.layer;return i&&"sublayers"in i&&i.sublayers},"change",()=>this._handleRequiredFieldsChange())])}get availableFields(){const{layer:i,layer:{fieldsIndex:r},requiredFields:s}=this;return"outFields"in i&&i.outFields?Z(r,[...X(r,i.outFields),...s]):Z(r,s)}get featureEffect(){return this.layer&&"featureEffect"in this.layer?this.layer.featureEffect:null}set featureEffect(i){this._override("featureEffect",i)}get maximumNumberOfFeatures(){return 0}set maximumNumberOfFeatures(i){H.error("#maximumNumberOfFeatures=","Setting maximum number of features is not supported")}get maximumNumberOfFeaturesExceeded(){return!1}highlight(i){throw new Error("missing implementation")}createQuery(){const i={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference},r=p(this.filter)?this.filter.createQuery(i):new P(i);if(this.layer.type==="feature"){const s=ee(this);p(s)&&(r.where=r.where?`(${r.where}) AND (${s})`:s)}return p(this.timeExtent)&&(r.timeExtent=p(r.timeExtent)?r.timeExtent.intersection(this.timeExtent):this.timeExtent.clone()),r}createAggregateQuery(){const i={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return new P(i)}queryFeatures(i,r){throw new Error("missing implementation")}queryObjectIds(i,r){throw new Error("missing implementation")}queryFeatureCount(i,r){throw new Error("missing implementation")}queryExtent(i,r){throw new Error("missing implementation")}async fetchPopupFeatures(i,r){const s=this.validateFetchPopupFeatures(r);if(s)throw s;return this.fetchClientPopupFeatures(r)}_loadArcadeModules(i){if(i.get("expressionInfos.length")||Array.isArray(i.content)&&i.content.some(r=>r.type==="expression"))return qe()}_handleRequiredFieldsChange(){const i=this._updateRequiredFields();this._set("_updatingRequiredFieldsPromise",i),i.then(()=>{this._updatingRequiredFieldsPromise===i&&this._set("_updatingRequiredFieldsPromise",null)})}async _updateRequiredFields(){if(!this.layer||!this.view)return;const i=this.view.type==="3d",{layer:r,layer:{fieldsIndex:s,objectIdField:a}}=this,n="renderer"in r&&r.renderer,o="orderBy"in r&&r.orderBy,l="featureReduction"in r?r.featureReduction:null,u=new Set,h=await te([n?n.collectRequiredFields(u,s):null,ie(u,r),i?Se(u,r):null,p(this.filter)?re(u,r,this.filter):null,p(this.featureEffect)?re(u,r,this.featureEffect.filter):null,l?Ee(u,r,l):null,o?xe(u,r,o):null]);if(r.timeInfo&&this.timeExtent&&N(u,r.fieldsIndex,[r.timeInfo.startField,r.timeInfo.endField]),r.type==="feature"&&(r.floorInfo&&N(u,r.fieldsIndex,[r.floorInfo.floorField]),i&&p(r.infoFor3D)&&(r.globalIdField==null&&H.error("globalIdField missing on 3DObjectFeatureLayer"),N(u,r.fieldsIndex,[r.globalIdField]))),r.type==="subtype-group"){J(u,s,r.subtypeField);const f=r.sublayers.map(g=>{var v;return Promise.all([(v=g.renderer)==null?void 0:v.collectRequiredFields(u,s),ie(u,g)])});await te(f)}for(const f of h)f.error&&H.error(f.error);J(u,s,a),i&&"displayField"in r&&r.displayField&&J(u,s,r.displayField);const y=Array.from(u).sort();this._set("requiredFields",y)}validateFetchPopupFeatures(i){if(k(i))return null;for(const r of i.clientGraphics){const s=r.layer;if("popupEnabled"in s&&!s.popupEnabled)return new F("featurelayerview:fetchPopupFeatures","Popups are disabled",{layer:s});if(r.isAggregate){const a="featureReduction"in s?s.featureReduction:null;if(!(a&&"popupTemplate"in a&&a.popupEnabled&&a.popupTemplate))return new F("featurelayerview:fetchPopupFeatures","Popups are disabled",{layer:s})}else if("popupTemplate"in s&&!Q(s,i))return new F("featurelayerview:fetchPopupFeatures","Layer does not define a popup template",{layer:s})}}async fetchClientPopupFeatures(i){const r=p(i)?i.clientGraphics:null;if(!r||r.length===0)return[];const s=new Array(r.length),a=new Map,n=await this.createPopupQuery(i);for(let o=0;o<r.length;o++){const l=r[o];if(l.isAggregate){s[o]=l;continue}const{layer:u}=l;if(!("popupEnabled"in u))continue;const h=X(this.layer.fieldsIndex,n.outFields),y=Q(u,i);if(k(y))continue;const f=await this._loadArcadeModules(y);f&&f.arcadeUtils.hasGeometryOperations(y)||!Fe(h,l)?a.set(l.getObjectId(),o):s[o]=l}if(this.layer.type==="stream"||a.size===0)return s.filter(Boolean);n.objectIds=Array.from(a.keys());try{const o=await this.layer.queryFeatures(n);for(const l of o.features)s[a.get(l.getObjectId())]=l}catch{}return s.filter(Boolean)}async createPopupQuery(i){const r=this.layer.createQuery(),s=new Set;let a=!1;const n=p(i)&&i.clientGraphics?i.clientGraphics.map(o=>o.layer):[this.layer];for(const o of n){if(!("popupEnabled"in o))continue;const l=Q(o,i);if(k(l))continue;const u=await this._loadArcadeModules(l),h=u&&u.arcadeUtils.hasGeometryOperations(l);a=!(this.layer.geometryType!=="point"&&!h);const y=await Be(this.layer,l);for(const f of y)s.add(f)}if(r.returnGeometry=a,r.returnZ=a,r.returnM=a,r.outFields=Array.from(s),r.outSpatialReference=this.view.spatialReference,this.layer.type==="feature"){const o=ee(this);p(o)&&(r.where=r.where?`(${r.where}) AND (${o})`:o)}return r}canResume(){return!!super.canResume()&&(!p(this.timeExtent)||!this.timeExtent.isEmpty)}};return c([d()],t.prototype,"_updatingRequiredFieldsPromise",void 0),c([d({readOnly:!0})],t.prototype,"availableFields",null),c([d({type:be})],t.prototype,"featureEffect",null),c([d({type:ue})],t.prototype,"filter",void 0),c([d(Re)],t.prototype,"timeExtent",void 0),c([d()],t.prototype,"layer",void 0),c([d({type:Number})],t.prototype,"maximumNumberOfFeatures",null),c([d({readOnly:!0,type:Boolean})],t.prototype,"maximumNumberOfFeaturesExceeded",null),c([d({readOnly:!0})],t.prototype,"requiredFields",void 0),c([d()],t.prototype,"suspended",void 0),c([d()],t.prototype,"view",void 0),t=c([R(de)],t),t};function oe(e){return e&&"openPorts"in e}let _=class extends it(Ge(Qe(ze))){constructor(){super(...arguments),this._pipelineIsUpdating=!0,this._commandsQueue=new Ye({process:e=>{switch(e.type){case"processed-edit":return this._doEdit(e);case"refresh":return this._doRefresh(e.dataChanged);case"update":return this._doUpdate()}}}),this._visibilityOverrides=new Set,this._highlightIds=new Map,this._updateHighlight=Ie(async()=>this._proxy.setHighlight(Array.from(this._highlightIds.keys()))),this._uploadsLocked=!1,this._needsClusterSizeUpdate=!1,this.featureEffectView=new De,this._lastDefinitionExpression=null}destroy(){var e;L(this._updateClusterSizeTask,t=>t.remove()),(e=this._proxy)==null||e.destroy(),this._commandsQueue.destroy()}initialize(){this.addResolvingPromise(Promise.all([this._initProxy(),this._initServiceOptions()])),this.handles.add([this.on("valueRangesChanged",e=>{this._set("_aggregateValueRanges",e.valueRanges)}),A(()=>this.featureEffect,e=>{this.featureEffectView.featureEffect=e},ce)]),this.featureEffectView.endTransitions()}async _initProxy(){const e=this.layer;if("isTable"in e&&e.isTable)throw new F("featurelayerview:table-not-supported","table feature layer can't be displayed",{layer:this.layer});const t=e.type==="feature"||e.type==="subtype-group",i="capabilities"in e&&e.capabilities.operations.supportsQuery;if(t&&!i)throw new F("featurelayerview:query-not-supported","layer view requires a layer with query capability",{layer:e});this._proxy&&this._proxy.destroy();const r=this._createClientOptions();return this._set("_proxy",new Xe({client:r})),this._proxy.when()}async _initServiceOptions(){return this._set("_serviceOptions",await this._createServiceOptions()),this._serviceOptions}get orderByFields(){return this._serviceOptions.type!=="stream"&&this._serviceOptions.orderByFields}get labelsVisible(){const e=this.layer.type==="subtype-group"?this.layer.sublayers.items:[this.layer];return!this.suspended&&e.some(t=>t.labelingInfo&&t.labelsVisible)}get queryMode(){return this._serviceOptions.type}get renderingConfigHash(){var G,D;if(!this.layer)return null;const e=this.availableFields,t=this.layer,i=this.view.floors,{definitionExpression:r}=t,s=this.layer.type!=="subtype-group"&&this.layer.labelsVisible&&this.layer.labelingInfo,a="renderer"in t&&t.renderer,n="gdbVersion"in t?t.gdbVersion:void 0,o="historicMoment"in t?(G=t.historicMoment)==null?void 0:G.getTime():void 0,{timeExtent:l}=this,u="customParameters"in t?JSON.stringify(t.customParameters):void 0,h="apiKey"in t?t.apiKey:void 0,y=t.type==="stream"?`${JSON.stringify(t.geometryDefinition)}${t.definitionExpression}`:null,f=JSON.stringify(this.clips),g="featureReduction"in t?(D=t.featureReduction)==null?void 0:D.toJSON():null,v="orderBy"in this.layer&&JSON.stringify(this.layer.orderBy),w="sublayers"in this.layer&&this.layer.sublayers.items.reduce((he,U)=>he+`${U.visible?1:0}.${JSON.stringify(U.renderer)}.${U.labelsVisible}
- .${JSON.stringify(U.labelingInfo)}`,""),q="subtypeCode"in this.layer&&this.layer.subtypeCode;return JSON.stringify({orderBy:v,sublayerHash:w,subtypeCode:q,filterHash:p(this.filter)&&this.filter.toJSON(),effectHash:p(this.featureEffect)&&this.featureEffect.toJSON(),streamFilter:y,gdbVersion:n,definitionExpression:r,historicMoment:o,availableFields:e,renderer:a,labelingInfo:s,timeExtent:l,floors:i,clipsHash:f,featureReduction:g,customParameters:u,apiKey:h})}highlight(e){let t;return e instanceof j?t=[e.getObjectId()]:typeof e=="number"||typeof e=="string"?t=[e]:Oe.isCollection(e)&&e.length>0?t=e.map(i=>i==null?void 0:i.getObjectId()).toArray():Array.isArray(e)&&e.length>0&&(t=typeof e[0]=="number"||typeof e[0]=="string"?e:e.map(i=>i==null?void 0:i.getObjectId())),t=t==null?void 0:t.filter(i=>i!=null),t&&t.length?(this._addHighlight(t),{remove:()=>this._removeHighlight(t)}):{remove:()=>{}}}hasHighlight(){return!!this._highlightIds.size}async hitTest(e,t){if(!this.tileRenderer)return null;const i=await this.tileRenderer.hitTest(t);if(i.length===0)return null;const{features:r,aggregates:s}=await this._proxy.getFeatures(i);return[...s.map(a=>this._createGraphicHit(e,B.fromJSON(a))),...r.map(a=>this._createGraphicHit(e,j.fromJSON(a)))]}queryStatistics(){return this._proxy.queryStatistics()}async querySummaryStatistics(e,t,i){const r={...t,scale:this.view.scale};return this._proxy.querySummaryStatistics(this._cleanUpQuery(e),r,i)}async queryAggregateSummaryStatistics(e,t,i){const r={...t,scale:this.view.scale};return this._proxy.queryAggregateSummaryStatistics(this._cleanUpAggregateQuery(e),r,i)}async queryUniqueValues(e,t,i){const r={...t,scale:this.view.scale};return this._proxy.queryUniqueValues(this._cleanUpQuery(e),r,i)}async queryAggregateUniqueValues(e,t,i){const r={...t,scale:this.view.scale};return this._proxy.queryAggregateUniqueValues(this._cleanUpAggregateQuery(e),r,i)}async queryClassBreaks(e,t,i){const r={...t,scale:this.view.scale};return this._proxy.queryClassBreaks(this._cleanUpQuery(e),r,i)}async queryAggregateClassBreaks(e,t,i){const r={...t,scale:this.view.scale};return this._proxy.queryAggregateClassBreaks(this._cleanUpAggregateQuery(e),r,i)}async queryHistogram(e,t,i){const r={...t,scale:this.view.scale};return this._proxy.queryHistogram(this._cleanUpQuery(e),r,i)}async queryAggregateHistogram(e,t,i){const r={...t,scale:this.view.scale};return this._proxy.queryAggregateHistogram(this._cleanUpAggregateQuery(e),r,i)}queryFeatures(e,t){return this.queryFeaturesJSON(e,t).then(i=>{const r=M.fromJSON(i);return r.features.forEach(s=>this._setLayersForFeature(s)),r})}queryVisibleFeatures(e,t){return this._proxy.queryVisibleFeatures(this._cleanUpQuery(e),t).then(i=>{const r=M.fromJSON(i);return r.features.forEach(s=>this._setLayersForFeature(s)),r})}async queryAggregates(e,t){const i=await this._proxy.queryAggregates(this._cleanUpAggregateQuery(e),t),r=Ke.fromJSON(i);return r.features.forEach(s=>this._setLayersForFeature(s)),r}queryAggregateIds(e,t){return this._proxy.queryAggregateIds(this._cleanUpAggregateQuery(e),t)}queryAggregateCount(e,t){return this._proxy.queryAggregateCount(this._cleanUpAggregateQuery(e),t)}queryAggregateJSON(e,t){return this._proxy.queryAggregates(this._cleanUpAggregateQuery(e),t)}queryFeaturesJSON(e,t){return this._proxy.queryFeatures(this._cleanUpQuery(e),t)}queryObjectIds(e,t){return this._proxy.queryObjectIds(this._cleanUpQuery(e),t)}queryFeatureCount(e,t){return this._proxy.queryFeatureCount(this._cleanUpQuery(e),t)}queryExtent(e,t){return this._proxy.queryExtent(this._cleanUpQuery(e),t).then(i=>({count:i.count,extent:Ce.fromJSON(i.extent)}))}setVisibility(e,t){t?this._visibilityOverrides.delete(e):this._visibilityOverrides.add(e),this._update()}update(e){if(!this._tileStrategy||!this.tileRenderer)return;const{hasMissingTiles:t,added:i,removed:r}=this._tileStrategy.update(e);(i.length||r.length)&&this._proxy.updateTiles({added:i,removed:r}),t&&this.requestUpdate(),this.notifyChange("updating")}attach(){this.view.timeline.record(`${this.layer.title} (FeatureLayer) Attach`),this._tileStrategy=new tt({acquireTile:e=>this._acquireTile(e),releaseTile:e=>this._releaseTile(e),tileInfoView:this.view.featuresTilingScheme,buffer:0}),this.handles.add(A(()=>this.renderingConfigHash,()=>this._update(),Te),"attach"),this.layer.type!=="stream"&&this.handles.add(this.layer.on("edits",e=>this._edit(e)),"attach")}detach(){var e;this._commandsQueue.clear(),(e=this._proxy)==null||e.stop(),this.container.removeAllChildren(),this.handles.remove("attach"),this.tileRenderer&&(this.tileRenderer.uninstall(this.container),this.tileRenderer=null),this._tileStrategy&&(this._tileStrategy.destroy(),this._tileStrategy=null),this._tileRendererHash=null}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}isUpdating(){var o;const e="renderer"in this.layer&&this.layer.renderer!=null,t=this._commandsQueue.updating,i=this._updatingRequiredFieldsPromise!=null,r=!this._proxy||!this._proxy.isReady,s=this._pipelineIsUpdating,a=this.tileRenderer==null||((o=this.tileRenderer)==null?void 0:o.updating),n=e&&(t||i||r||s||a);return S("esri-2d-log-updating")&&console.log(`Updating FLV2D: ${n}
- -> hasRenderer ${e}
- -> hasPendingCommand ${t}
- -> updatingRequiredFields ${i}
- -> updatingProxy ${r}
- -> updatingPipeline ${s}
- -> updatingTileRenderer ${a}
- `),n}_createClientOptions(){return{setUpdating:e=>{this._set("_pipelineIsUpdating",e)},emitEvent:e=>{this.emit(e.name,e.event)}}}async _detectQueryMode(e){var a;const t="path"in e,i="editingInfo"in this.layer&&((a=this.layer.editingInfo)==null?void 0:a.lastEditDate),r=!!this.layer.refreshInterval,s=!i&&r;if(t&&(this.layer.type==="feature"||this.layer.type==="subtype-group")&&this.layer.geometryType==="point"&&this.layer.capabilities.query.supportsPagination&&!this.layer.capabilities.operations.supportsEditing&&!s&&S("featurelayer-snapshot-enabled"))try{const n=await this.layer.queryFeatureCount();if(n<=S("featurelayer-snapshot-point-min-threshold"))return{mode:"snapshot",featureCount:n};const o=S("featurelayer-snapshot-point-max-threshold"),l=S("featurelayer-snapshot-point-coverage"),u=this.view.extent,h=C(this.layer.fullExtent),y=h==null?void 0:h.clone().intersection(u),f=p(y)?y.width*y.height:0,g=(h==null?void 0:h.width)*(h==null?void 0:h.height),v=g===0?0:f/g;if(n<=o&&v>=l)return{mode:"snapshot",featureCount:n}}catch(n){E.getLogger(this.declaredClass).warn("mapview-feature-layer","Encountered an error when querying for featureCount",{error:n})}return{mode:"on-demand"}}async _createServiceOptions(){var w;const e=this.layer;if(e.type==="stream")return null;const{capabilities:t,objectIdField:i}=e,r=e.fields.map(q=>q.toJSON()),s=p(e.fullExtent)&&e.fullExtent.toJSON(),a=Me(e.geometryType),n=e.timeInfo&&e.timeInfo.toJSON()||null,o=e.spatialReference?e.spatialReference.toJSON():null,l=e.type==="feature"?e.globalIdField:null;let u;e.type==="ogc-feature"?u=e.source.getSource():oe(e.source)?u=await e.source.openPorts():e.parsedUrl&&(u=Ue(e.parsedUrl),"dynamicDataSource"in e&&e.dynamicDataSource&&(u.query={layer:JSON.stringify({source:e.dynamicDataSource})}));const h="datesInUnknownTimezone"in this.layer&&this.layer.datesInUnknownTimezone,y=(w="subtypeField"in this.layer&&this.layer.subtypeField)!=null?w:null,{mode:f,featureCount:g}=await this._detectQueryMode(u);let v=this.layer.objectIdField;if(this.layer.type==="feature"&&p(this.layer.orderBy)&&this.layer.orderBy.length){const q=!this.layer.orderBy[0].valueExpression&&this.layer.orderBy[0].field;q&&(v=q)}return{type:f,timeReferenceUnknownClient:h,subtypeField:y,featureCount:g,globalIdField:l,maxRecordCount:t.query.maxRecordCount,tileMaxRecordCount:t.query.tileMaxRecordCount,capabilities:t,fields:r,fullExtent:s,geometryType:a,objectIdField:i,source:u,timeInfo:n,spatialReference:o,orderByFields:v}}async _createMemoryServiceOptions(e){const t=await e.openPorts();return{...this._createServiceOptions(),type:"memory",source:t}}_cleanUpQuery(e){const t=P.from(e)||this.createQuery();return t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference),t}_cleanUpAggregateQuery(e){const t=P.from(e)||this.createAggregateQuery();return t.outSpatialReference||(t.outSpatialReference=this.view.spatialReference),t}async _update(){return this._commandsQueue.push({type:"update"})}async _edit(e){return this.suspended?void this._clearTiles():this._validateEdit(e)?this._commandsQueue.push({type:"edit",edits:e}):void 0}async doRefresh(e){if(this.attached&&this._tileStrategy.tileKeys().length)return this.suspended&&e?void this._clearTiles():this._commandsQueue.push({type:"refresh",dataChanged:e})}_clearTiles(){this._tileStrategy.tileKeys().length&&(this._proxy.updateTiles({added:[],removed:this._tileStrategy.tileKeys()}),this._tileStrategy.clear(),this.requestUpdate(),this._commandsQueue.clear(),this._update())}_validateEdit(e){const t="globalIdField"in this.layer&&this.layer.globalIdField,i=e.deletedFeatures.some(s=>s.objectId===-1||!s.objectId),r=t&&this.availableFields.includes(t);return i&&!r?(E.getLogger(this.declaredClass).error(new F("mapview-apply-edits",`Editing the specified service requires the layer's globalIdField, ${t} to be included the layer's outFields for updates to be reflected on the map`)),null):e}async _doUpdate(){try{if(this.destroyed||!this._hasRequiredSupport(this.layer)||!this._tileStrategy)return;const{featureEffectView:e,filter:t}=this;await this._updateRequiredFields();const{renderer:i}=this._getEffectiveRenderer();this._set("_effectiveRenderer",i);const r=this._createSchemaConfig(),s=this._createConfiguration(r,t,e.filter),a=this._lastDefinitionExpression!==s.schema.source.definitionExpression;this._lastDefinitionExpression=s.schema.source.definitionExpression;const n=s.schema.tileRenderer,o=this._createTileRendererHash(n);if(this._serviceOptions.type==="snapshot"&&(s.schema.source.initialFeatureCount=this._serviceOptions.featureCount),o!==this._tileRendererHash){await this._initTileRenderer(n,i);const l=this.layer,u=l.type==="stream"?await this._initServiceOptions():this._serviceOptions;this.tileRenderer.onConfigUpdate(i),l.type!=="stream"&&oe(l.source)&&(u.source=await l.source.openPorts());const h={added:this._tileStrategy.tileKeys(),removed:[]};await this._proxy.startup(this.view.featuresTilingScheme,s,u,h),this.hasHighlight()&&await this._proxy.setHighlight(Array.from(this._highlightIds.keys())),await this._onceTilesUpdated(),this.tileRenderer.onConfigUpdate(i)}else{this._serviceOptions.type==="snapshot"&&a&&(s.schema.source.changedFeatureCount=await this.layer.queryFeatureCount());const l=await this._proxy.update(s);(l.mesh||l.targets.aggregate)&&this._lockGPUUploads();try{await this._proxy.applyUpdate(l)}catch(u){I(u)||E.getLogger(this.declaredClass).error(u)}(l.mesh||l.targets.aggregate)&&this._unlockGPUUploads(),this.tileRenderer.onConfigUpdate(i),this._updateClusterSizeVariable(),this._forceAttributeTextureUpload()}this._tileRendererHash=o,this.tileRenderer.invalidateLabels(),this.requestUpdate()}catch{}}async _doEdit(e){try{await this._proxy.onEdits(e)}catch(t){I(t)}}async _doRefresh(e){this._lockGPUUploads();try{let i;e&&this.queryMode==="snapshot"&&"queryFeatureCount"in this.layer&&(i=await this.layer.queryFeatureCount()),await this._proxy.refresh({dataChanged:e,featureCount:i})}catch(i){I(i)}this._unlockGPUUploads();const t=this.layer;t&&"featureReduction"in t&&t.featureReduction&&this._updateClusterSizeVariable()}_updateClusterSizeVariable(){this._needsClusterSizeUpdate&&(this.tileRenderer.onConfigUpdate(this._effectiveRenderer),this._needsClusterSizeUpdate=!1)}_createUpdateClusterSizeTask(e,t){return A(()=>this._aggregateValueRanges,i=>{this._updateClusterEffectiveRendererSizeVariable(e,t,i),this._needsClusterSizeUpdate=!0,this._uploadsLocked||this._updateClusterSizeVariable()})}async _updateClusterEffectiveRendererSizeVariable(e,t,i){if(e.dynamicClusterSize&&"visualVariables"in e&&e.visualVariables){const r=Ae(e.visualVariables);if(p(r)&&r.field==="cluster_count"){const s=e.visualVariables.indexOf(r);e.visualVariables[s]=ke(t,i);const a=e.clone();a.dynamicClusterSize=!0,this._set("_effectiveRenderer",a)}}}_getEffectiveRenderer(){var r;const e=this.layer,t="renderer"in e?e.renderer:null,i="featureReduction"in e?e.featureReduction:null;if(p(this._updateClusterSizeTask)&&(this._updateClusterSizeTask.remove(),this._updateClusterSizeTask=null),i&&"renderer"in i&&i.renderer&&!((r=i.renderer.authoringInfo)!=null&&r.isAutoGenerated)){const s=i.fields;if(i.type==="cluster"){const{renderer:a,didInject:n}=Ve(i.renderer,i,this._aggregateValueRanges);return n&&(L(this._updateClusterSizeTask,o=>o.remove()),this._updateClusterSizeTask=this._createUpdateClusterSizeTask(a,i)),{renderer:a,aggregateFields:s,featureReduction:i}}return{renderer:i.renderer,aggregateFields:s,featureReduction:i}}if(i&&i.type==="cluster"&&$e(t)){const s=i,a=[],n=Pe(a,t,s,this._aggregateValueRanges,!0);return L(this._updateClusterSizeTask,o=>o.remove()),this._updateClusterSizeTask=this._createUpdateClusterSizeTask(n,s),{renderer:n,aggregateFields:a,featureReduction:i}}return{renderer:t,aggregateFields:[],featureReduction:null}}_acquireTile(e){const t=this.tileRenderer.acquireTile(e);return t.once("attach",()=>{this.requestUpdate()}),t}_releaseTile(e){this.tileRenderer.releaseTile(e)}async _initTileRenderer(e,t){const i=await We(e,{layerView:this,tileInfoView:this.view.featuresTilingScheme,layer:this.layer});return this.tileRenderer&&(this._tileStrategy.clear(),this.tileRenderer.uninstall(this.container),this.tileRenderer.destroy(),this.tileRenderer=null),this.destroyed?null:(this._proxy.tileRenderer=i,this._set("tileRenderer",i),this.tileRenderer.install(this.container),this.tileRenderer.onConfigUpdate(t),this.requestUpdate(),this.tileRenderer)}_createTileRendererHash(e){return`${e.type}`}get hasFilter(){const e=!!("floorInfo"in this.layer&&this.layer.floorInfo&&this.view.floors&&this.view.floors.length);return!!this.filter||e||!!this._visibilityOverrides.size||!!this.timeExtent}_injectOverrides(e){const t=p(e)?e.timeExtent:null,i=p(this.timeExtent)&&p(t)?this.timeExtent.intersection(t):this.timeExtent||t;let r=null;const s="floorInfo"in this.layer&&this.layer.floorInfo;if(s){const n=p(e)&&e.where;r=this._addFloorFilterClause(n)}if(!this._visibilityOverrides.size&&!i&&!s)return p(e)?e.toJSON():null;(e=p(e)&&e.clone()||new ue).timeExtent=i,r&&(e.where=r);const a=e.toJSON();return a.hiddenIds=Array.from(this._visibilityOverrides),a}_addFloorFilterClause(e){var r;const t=this.layer;let i=e||"";if("floorInfo"in t&&t.floorInfo){let s=this.view.floors;if(!s||!s.length)return i;(r=t.floorInfo.viewAllLevelIds)!=null&&r.length&&(s=t.floorInfo.viewAllLevelIds);const a=s.filter(l=>l!=="").map(l=>"'"+l+"'");a.push("''");const n=t.floorInfo.floorField;let o="("+n+" IN ({ids}) OR "+n+" IS NULL)";if(o=o.replace("{ids}",a.join(", ")),p(i)&&i.includes(n)){let l=new RegExp("AND \\("+n+".*NULL\\)","g");i=i.replace(l,""),l=new RegExp("\\("+n+".*NULL\\)","g"),i=i.replace(l,""),i=i.replace(/\s+/g," ").trim()}i=i!==""?"("+i+") AND "+o:o}return i!==""?i:null}_createConfiguration(e,t,i){const r=this.layer.type==="feature"&&this.layer.historicMoment?this.layer.historicMoment.getTime():void 0,s=this.layer.type==="feature"?this.layer.gdbVersion:void 0,a=new Array(Le),n=this._injectOverrides(t);a[0]=n,a[1]=p(i)?i.toJSON():null;const o=He(e);if(k(o))return null;const l=Ne("2d");return{availableFields:this.availableFields,gdbVersion:s,historicMoment:r,devicePixelRatio:window.devicePixelRatio||1,filters:a,schema:o,supportsTextureFloat:l.supportsTextureFloat,maxTextureSize:l.maxTextureSize}}_hasRequiredSupport(e){return!("renderer"in e)||je(e.renderer)}_onceTilesUpdated(){return this.requestUpdate(),Je(()=>!this._pipelineIsUpdating)}_lockGPUUploads(){this.tileRenderer&&(this._uploadsLocked=!0,this.tileRenderer.lockGPUUploads())}_unlockGPUUploads(){this.tileRenderer&&(this._uploadsLocked=!1,this.tileRenderer.unlockGPUUploads())}_forceAttributeTextureUpload(){this.tileRenderer&&this.tileRenderer.forceAttributeTextureUpload()}_createSchemaConfig(){const e=this.layer;return{renderer:"renderer"in e?e.renderer:null,spatialReference:e.spatialReference,timeExtent:e.timeExtent,definitionExpression:e.definitionExpression,featureReduction:"featureReduction"in e?e.featureReduction:null,fields:e.fields,geometryType:e.geometryType,historicMoment:"historicMoment"in e?e.historicMoment:null,labelsVisible:"labelsVisible"in e&&e.labelsVisible,labelingInfo:"labelingInfo"in e&&e.labelingInfo,availableFields:this.availableFields,featureEffect:this.featureEffect,filter:this.filter,gdbVersion:"gdbVersion"in e?e.gdbVersion:null,pixelBuffer:0,orderBy:"orderBy"in e&&e.orderBy?e.orderBy:null,customParameters:{..."customParameters"in e?e.customParameters:void 0,token:"apiKey"in e?e.apiKey:void 0},subtypeCode:"subtypeCode"in e?e.subtypeCode:void 0,subtypeField:"subtypeField"in e?e.subtypeField:void 0}}_addHighlight(e){for(const t of e)if(this._highlightIds.has(t)){const i=this._highlightIds.get(t);this._highlightIds.set(t,i+1)}else this._highlightIds.set(t,1);this._updateHighlight().catch(t=>{I(t)||E.getLogger(this.declaredClass).error(t)})}_removeHighlight(e){for(const t of e)if(this._highlightIds.has(t)){const i=this._highlightIds.get(t)-1;i===0?this._highlightIds.delete(t):this._highlightIds.set(t,i)}this._updateHighlight().catch(t=>{I(t)||E.getLogger(this.declaredClass).error(t)})}_setLayersForFeature(e){const t=this.layer;e.layer=t,e.sourceLayer=t}_createGraphicHit(e,t){return this._setLayersForFeature(t),p(t.geometry)&&(t.geometry.spatialReference=this.view.spatialReference),{type:"graphic",graphic:t,layer:this.layer,mapPoint:e}}};c([d()],_.prototype,"_serviceOptions",void 0),c([d()],_.prototype,"_proxy",void 0),c([d()],_.prototype,"_pipelineIsUpdating",void 0),c([d()],_.prototype,"_effectiveRenderer",void 0),c([d()],_.prototype,"_aggregateValueRanges",void 0),c([d()],_.prototype,"_commandsQueue",void 0),c([d()],_.prototype,"featureEffectView",void 0),c([d()],_.prototype,"labelsVisible",null),c([d({readOnly:!0})],_.prototype,"queryMode",null),c([d()],_.prototype,"renderingConfigHash",null),c([d()],_.prototype,"tileRenderer",void 0),c([d()],_.prototype,"updating",void 0),_=c([R("esri.views.2d.layers.FeatureLayerView2D")],_);const St=_;export{St as default};
|