(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-02473e05"],{"0e0b":function(e,t,r){"use strict";r.d(t,"a",(function(){return O}));var n=r("a4ee"),i=r("fc29"),s=r("ce6d"),a=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("d386")),c=r("0fc4"),l=r("8188"),u=r("4261"),d=r("9180"),b=r("95e9");let p=class extends i["a"]{constructor(e){super(e),this.events=new s["a"]}forEach(e){this.forAllFeatures(t=>(e(t),b["a"].CONTINUE))}forEachBounds(e,t,r){const n=this.getFeatureExtent;for(const i of e)t(n(i,r))}forEachInBounds(e,t){this.forAllFeatures(r=>{const n=this.getFeatureExtent(r,f);return Object(d["w"])(e,Object(u["F"])(n,y))&&t(r),b["a"].CONTINUE},t=>{if(Object(l["o"])(t.node.mbs,this.sourceSpatialReference,h,this.viewSpatialReference),h[0]>=e[0]&&h[2]<=e[2]&&h[1]>=e[1]&&h[3]<=e[3])return b["a"].CONTINUE;const r=Math.max(e[0],Math.min(h[0],e[2])),n=Math.max(e[1],Math.min(h[1],e[3])),i=h[0]-r,s=h[1]-n;return i*i+s*s<=h[3]*h[3]?b["a"].CONTINUE:b["a"].SKIP})}};Object(n["a"])([Object(a["b"])({constructOnly:!0})],p.prototype,"featureAdapter",void 0),Object(n["a"])([Object(a["b"])({constructOnly:!0})],p.prototype,"forAllFeatures",void 0),Object(n["a"])([Object(a["b"])({constructOnly:!0})],p.prototype,"getFeatureExtent",void 0),Object(n["a"])([Object(a["b"])({constructOnly:!0})],p.prototype,"sourceSpatialReference",void 0),Object(n["a"])([Object(a["b"])({constructOnly:!0})],p.prototype,"viewSpatialReference",void 0),p=Object(n["a"])([Object(o["a"])("esri.views.3d.layers.i3s.I3SQueryFeatureStore")],p);const h=Object(c["e"])(),f=Object(u["h"])(),y=Object(d["l"])(),O=p},"16d0":function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r("a4ee"),i=r("e92d"),s=r("59b2"),a=(r("b50f"),r("c120"),r("cea0"),r("d386")),o=r("66a2"),c=r("ee9c");const l=i["a"].getLogger("esri.views.3d.layers.support.DefinitionExpressionSceneLayerView"),u=e=>{let t=class extends e{constructor(){super(...arguments),this._definitionExpressionErrors=0,this._maxDefinitionExpressionErrors=20,this.logError=e=>{this._definitionExpressionErrors0?(l.error("definitionExpression references unknown fields: "+t.join(", ")),null):(this._definitionExpressionErrors=0,e)}catch(e){return l.error("Failed to parse definitionExpression: "+e),null}}get definitionExpressionFields(){return this.parsedDefinitionExpression?this.parsedDefinitionExpression.fieldNames:null}_evaluateClause(e,t){try{return e.testFeature(t)}catch(r){return this.logError(r),!1}}_addDefinitionExpressionToQuery(e){if(!this.parsedDefinitionExpression)return e;const t=this.i3slayer.definitionExpression,r=e.clone();return r.where?r.where=`(${t}) AND (${r.where})`:r.where=t,r}};return Object(n["a"])([Object(s["b"])()],t.prototype,"i3slayer",void 0),Object(n["a"])([Object(s["b"])({readOnly:!0})],t.prototype,"parsedDefinitionExpression",null),Object(n["a"])([Object(s["b"])({readOnly:!0})],t.prototype,"definitionExpressionFields",null),t=Object(n["a"])([Object(a["a"])("esri.views.3d.layers.support.DefinitionExpressionSceneLayerView")],t),t}},"18cc":function(e,t,r){"use strict";r.d(t,"a",(function(){return y}));var n=r("a4ee"),i=r("fc29"),s=r("ce50"),a=r("af40"),o=r("b2b2"),c=r("59b2"),l=(r("b50f"),r("c120"),r("cea0"),r("d386")),u=r("3af1"),d=r("6411"),b=r("2edc"),p=r("69dd");const h=d["a"];let f=class extends i["a"]{constructor(e){super(e),this._dataQueryEngineInstance=null,this._handles=new a["a"]}get defaultQueryJSON(){return new p["a"]({outSpatialReference:this.spatialReference}).toJSON()}get dataQueryEngine(){return this._ensureDataQueryEngine()}initialize(){this._handles.add(this.layerView.on("visible-geometry-changed",()=>this.spatialIndex.events.emit("changed")))}destroy(){this._dataQueryEngineInstance&&(this._dataQueryEngineInstance.destroy(),this._dataQueryEngineInstance=null),this._handles&&(this._handles.destroy(),this._handles=null),this._set("layerView",null)}async executeQueryForCount(e,t){return this.dataQueryEngine.executeQueryForCount(this._ensureQueryJSON(e),t)}async executeQueryForExtent(e,t){const{count:r,extent:n}=await this.dataQueryEngine.executeQueryForExtent(this._ensureQueryJSON(e),t);return{count:r,extent:u["a"].fromJSON(n)}}async executeQueryForIds(e,t){return this.dataQueryEngine.executeQueryForIds(this._ensureQueryJSON(e),t)}async executeQuery(e,t){const r=this._ensureQueryJSON(e);if(r.returnGeometry)throw new s["a"]("feature-store:unsupported-query","returnGeometry is not yet supported for mesh scene layer queries");if(r.returnCentroid)throw new s["a"]("feature-store:unsupported-query","returnCentroid is not yet supported for mesh scene layer queries");const n=await this.dataQueryEngine.executeQuery(r,t),i=b["default"].fromJSON(n);return i.features.forEach(e=>{e.geometry=null}),i}_ensureQueryJSON(e){if(Object(o["j"])(e))return this.defaultQueryJSON;const t=e.toJSON();return t.outSpatialReference||(e.outSpatialReference=this.spatialReference),t}_ensureDataQueryEngine(){if(this._dataQueryEngineInstance)return this._dataQueryEngineInstance;const e=this.layer.objectIdField||"OBJECTID",t="esriGeometryPolygon",r=this.layer.fields.map(e=>e.toJSON()),n=this.layerView.view.resourceController.scheduler,i=this.spatialReference.toJSON(),s=this.priority,a=this.spatialIndex;return this._dataQueryEngineInstance=new h({hasZ:!0,hasM:!1,geometryType:t,fields:r,timeInfo:null,spatialReference:i,objectIdField:e,featureStore:a,scheduler:n,priority:s}),this._dataQueryEngineInstance}};Object(n["a"])([Object(c["b"])({constructOnly:!0})],f.prototype,"layerView",void 0),Object(n["a"])([Object(c["b"])({constructOnly:!0})],f.prototype,"priority",void 0),Object(n["a"])([Object(c["b"])({constructOnly:!0})],f.prototype,"spatialIndex",void 0),Object(n["a"])([Object(c["b"])({readOnly:!0,aliasOf:"layerView.view.spatialReference"})],f.prototype,"spatialReference",void 0),Object(n["a"])([Object(c["b"])({readOnly:!0,aliasOf:"layerView.i3slayer"})],f.prototype,"layer",void 0),Object(n["a"])([Object(c["b"])({readOnly:!0})],f.prototype,"defaultQueryJSON",null),f=Object(n["a"])([Object(l["a"])("esri.views.3d.layers.i3s.I3SQueryEngine")],f);const y=f},"1e7c":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return k}));var n=r("a4ee"),i=r("8d60"),s=r("e92d"),a=r("b2b2"),o=r("477c"),c=r("59b2"),l=(r("b50f"),r("c120"),r("cea0"),r("d386")),u=r("66a2"),d=r("96d4"),b=r("69dd"),p=r("4c7e"),h=r("95e9"),f=r("66af"),y=r("dd25"),O=r("9a0d"),j=r("4bb0"),g=r("c453"),E=r("18cc"),w=r("8ea5"),F=r("0e0b"),m=r("ee9c"),I=r("16d0"),v=r("f426"),x=r("f7f0"),S=r("bb87"),_=r("deae"),R=r("e315"),C=r("f353"),D=r("9305");const A=s["a"].getLogger("esri.views.3d.layers.SceneLayerView3D"),N=Object(v["a"])();let Q=class extends(Object(p["a"])(Object(I["a"])(Object(x["a"])(Object(f["a"])(R["a"]))))){constructor(){super(...arguments),this.type="scene-layer-3d",this.lodFactor=1,this.progressiveLoadFactor=1,this._elevationContext="scene",this._isIntegratedMesh=!1,this._supportsLabeling=!0,this._interactiveEditingSessions=new Map,this._queryEngine=null}get filter(){return Object(a["k"])(this.viewFilter)?this.viewFilter.filter:null}set filter(e){!Object(a["j"])(e)&&j["a"].checkSupport(e)?Object(a["k"])(this.viewFilter)?this.viewFilter.filter=e:this.viewFilter=new j["a"]({filter:e,layerFieldsIndex:this.layer.fieldsIndex,loadAsyncModule:e=>this._loadAsyncModule(e),applyFilters:()=>this._applyFilters(!0),addSqlFilter:(e,t)=>this.addSqlFilter(e,t,this.logError)}):this.viewFilter=null}get requiredFields(){var e,t;return null!=(e=null==(t=this.fieldsHelper)?void 0:t.requiredFields)?e:[]}get floorFilterClause(){const e=Object(C["b"])(this);return Object(a["k"])(e)?u["WhereClause"].create(e,this.layer.fieldsIndex):null}get excludeObjectIdsSorted(){const e=this.layer.excludeObjectIds;return e.length?e.toArray().sort((e,t)=>e-t):null}get lodCrossfadeinDuration(){var e,t;return null!=(e=null==(t=this.view)?void 0:t.qualitySettings.sceneService["3dObject"].lodCrossfadeinDuration)?e:0}get lodCrossfadeoutDuration(){var e,t;return null!=(e=null==(t=this.view)?void 0:t.qualitySettings.sceneService["3dObject"].lodCrossfadeoutDuration)?e:0}get lodCrossfadeUncoveredDuration(){var e,t;return null!=(e=null==(t=this.view)?void 0:t.qualitySettings.sceneService["3dObject"].lodCrossfadeUncoveredDuration)?e:0}initialize(){this.fieldsHelper=new S["a"]({layerView:this}),this.updatingHandles.add(()=>this.layer.rangeInfos,e=>this._rangeInfosChanged(e),o["a"]),this.updatingHandles.add(()=>this.layer.renderer,e=>this.updatingHandles.addPromise(this._rendererChange(e)),o["a"]),this.updatingHandles.add(()=>[this.parsedDefinitionExpression,this.filter,this.floorFilterClause,this.excludeObjectIdsSorted,Object(a["b"])(this.viewFilter,e=>[e.parsedWhereClause,e.parsedGeometry,e.sortedObjectIds])],()=>this._filterChange()),this.updatingHandles.add(()=>[this.filter,Object(a["b"])(this.viewFilter,e=>e.parsedGeometry)],()=>this._geometryFilterChange()),this.handles.add(this.layer.on("apply-edits",e=>this.updatingHandles.addPromise(e.result))),this.handles.add(this.layer.on("edits",e=>this._handleEdits(e)))}destroy(){this.fieldsHelper=Object(a["d"])(this.fieldsHelper)}_rangeInfosChanged(e){null!=e&&e.length>0&&A.warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}createQuery(){const e={outFields:["*"],returnGeometry:!1,outSpatialReference:this.view.spatialReference};return Object(a["k"])(this.filter)?this.filter.createQuery(e):new b["a"](e)}queryExtent(e,t){return this._ensureQueryEngine().executeQueryForExtent(this._ensureQuery(e),null==t?void 0:t.signal)}queryFeatureCount(e,t){return this._ensureQueryEngine().executeQueryForCount(this._ensureQuery(e),null==t?void 0:t.signal)}queryFeatures(e,t){return this._ensureQueryEngine().executeQuery(this._ensureQuery(e),null==t?void 0:t.signal).then(e=>{if(null==e||!e.features)return e;const t=this.layer;for(const r of e.features)r.layer=t,r.sourceLayer=t;return e})}queryObjectIds(e,t){return this._ensureQueryEngine().executeQueryForIds(this._ensureQuery(e),null==t?void 0:t.signal)}_ensureQueryEngine(){return this._queryEngine||(this._queryEngine=this._createQueryEngine()),this._queryEngine}_createQueryEngine(){const e=Object(O["c"])(this.view.spatialReference,this.view.renderSpatialReference,this._collection);return new E["a"]({layerView:this,priority:D["c"].FEATURE_QUERY_ENGINE,spatialIndex:new F["a"]({featureAdapter:new w["a"]({objectIdField:this.layer.objectIdField,attributeStorageInfo:this.layer.attributeStorageInfo,getFeatureExtent:e}),forAllFeatures:(e,t)=>this._forAllFeatures((t,r,n)=>e({id:t,index:r,meta:n}),t,h["b"].ALL_IN_CLIPPING_AREA),getFeatureExtent:e,sourceSpatialReference:Object(m["q"])(this.layer),viewSpatialReference:this.view.spatialReference})})}highlight(e){const t=this._highlights;if(e instanceof b["a"]){const{set:r,handle:n}=t.acquireSet();return this.queryObjectIds(e).then(e=>t.setFeatureIds(r,e)),n}return super.highlight(e)}createInteractiveEditSession(e){return Object(y["a"])(this.attributeEditingContext,e)}_createLayerGraphic(e){const t=new i["a"](null,null,e);return t.layer=this.layer,t.sourceLayer=this.layer,t}canResume(){return super.canResume()&&(!this._controller||this._controller.rootNodeVisible)}getFilters(){const e=super.getFilters(),t=this.excludeObjectIdsSorted;return Object(a["k"])(t)&&e.push(e=>Object(m["u"])(t,!1,e)),this.floorFilterClause&&this.addSqlFilter(e,this.floorFilterClause,this.logError),this.addSqlFilter(e,this.parsedDefinitionExpression,this.logError),Object(a["k"])(this.viewFilter)&&this.viewFilter.addFilters(e,this.view,this._controller.crsIndex,this._collection),e}_ensureQuery(e){return this._addDefinitionExpressionToQuery(Object(a["j"])(e)?this.createQuery():b["a"].from(e))}get attributeEditingContext(){return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:this._getObjectIdField(),forEachNode:e=>this._forAllNodes(t=>Object(a["k"])(t)?e(t.node,t.featureIds):null),attributeStorageInfo:this.i3slayer.attributeStorageInfo,attributeOverrides:this.attributeOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(e,t)=>this.setAttributeData(e,t),clearMemCache:()=>this.clearMemCache()}}_handleEdits(e){Object(y["b"])(this.attributeEditingContext,e)}get hasGeometryFilter(){const e=this.viewFilter;return Object(a["k"])(e)&&Object(a["k"])(e.parsedGeometry)}computeNodeFiltering(e){const t=this.viewFilter;return Object(a["j"])(t)||t.isMBSGeoemtryVisible(e,this.view.spatialReference,this._controller.crsIndex)?g["e"].Unmodified:g["e"].Culled}};Object(n["a"])([Object(c["b"])({aliasOf:"layer"})],Q.prototype,"i3slayer",void 0),Object(n["a"])([Object(c["b"])(_["a"])],Q.prototype,"updatingProgress",void 0),Object(n["a"])([Object(c["b"])({type:d["a"]})],Q.prototype,"filter",null),Object(n["a"])([Object(c["b"])()],Q.prototype,"viewFilter",void 0),Object(n["a"])([Object(c["b"])(N.requiredFields)],Q.prototype,"requiredFields",null),Object(n["a"])([Object(c["b"])(N.availableFields)],Q.prototype,"availableFields",void 0),Object(n["a"])([Object(c["b"])()],Q.prototype,"fieldsHelper",void 0),Object(n["a"])([Object(c["b"])()],Q.prototype,"floorFilterClause",null),Object(n["a"])([Object(c["b"])()],Q.prototype,"excludeObjectIdsSorted",null),Object(n["a"])([Object(c["b"])({readOnly:!0,aliasOf:"view.qualitySettings.sceneService.3dObject.lodFactor"})],Q.prototype,"lodFactor",void 0),Object(n["a"])([Object(c["b"])({readOnly:!0,aliasOf:"_controller.updatingProgress"})],Q.prototype,"updatingProgressValue",void 0),Q=Object(n["a"])([Object(l["a"])("esri.views.3d.layers.SceneLayerView3D")],Q);const k=Q},"4bb0":function(e,t,r){"use strict";r.d(t,"a",(function(){return v}));var n=r("a4ee"),i=(r("e06a"),r("fc29")),s=r("b50f"),a=r("e92d"),o=r("38a4"),c=r("b2b2"),l=r("8048"),u=r("3795"),d=r("59b2"),b=(r("c120"),r("cea0"),r("d386")),p=r("e431"),h=r("66a2"),f=r("8188"),y=r("4261"),O=r("9180"),j=r("2255"),g=r("9786"),E=r("96d4"),w=r("ee9c"),F=r("5996");const m=a["a"].getLogger("esri.views.3d.layers.i3s.I3SMeshViewFilter");let I,v=class extends i["a"]{constructor(e){super(e),this._projectionEngineLoaded=!1}initialize(){Object(u["j"])(this,"filter.geometry").then(()=>this.loadAsyncModule(S().then(e=>{this.destroyed||(this._geometryEngine=e,this.applyFilters())})))}get sortedObjectIds(){if(Object(c["j"])(this.filter.objectIds))return null;const e=new Float64Array(this.filter.objectIds);return e.sort(),e}get parsedWhereClause(){const e=Object(c["k"])(this.filter)?this.filter.where:null;if(Object(c["j"])(e)||!e)return null;try{return h["WhereClause"].create(e,this.layerFieldsIndex)}catch(t){m.error("Failed to parse filter where clause: "+t)}return null}addFilters(e,t,r,n){const i=this.sortedObjectIds;Object(c["k"])(i)&&e.push(e=>Object(w["u"])(i,!0,e)),this.addSqlFilter(e,this.parsedWhereClause);const s=this.parsedGeometry;if(Object(c["k"])(s)){const i=this.spatialRelationship;e.push((e,a)=>N(e,a,n,t,r,s,i))}}isMBSGeoemtryVisible(e,t,r){const n=this.parsedGeometry;if(Object(c["k"])(n)){const i=this.spatialRelationship,s=n[0].spatialReference||t;return Object(f["o"])(e,r,Q,s)?A(Q,n,s,i):(m.warnOnce("SceneLayerView.filter.geometry is using unsupported SpatialReference, skipping geometry filter for MBS"),!0)}return!0}get parsedGeometry(){if(Object(c["j"])(this.filter))return null;if(!this._geometryEngine)return null;const{geometry:e}=this.filter;if(Object(c["j"])(e))return null;const{distance:t,units:r}=this.filter,n=this.spatialRelationship,i="mesh"===e.type?e.extent:e;if(Object(c["j"])(t)||0===t)return D(i,n);const s=r||Object(l["h"])(i.spatialReference);if(i.spatialReference.isWGS84)return D(this._geometryEngine.geodesicBuffer(i,t,s),n);const a=Object(g["d"])(i,F["a"].WGS84);if(Object(c["k"])(a))return D(Object(g["d"])(this._geometryEngine.geodesicBuffer(a,t,s),i.spatialReference),n);if(!this._projectionEngineLoaded&&(this.loadAsyncModule(Object(f["i"])().then(()=>this._projectionEngineLoaded=!0)),!this._projectionEngineLoaded))return null;let o=null;try{o=Object(f["m"])(i,F["a"].WGS84)}catch(u){}if(o)try{o=Object(f["m"])(this._geometryEngine.geodesicBuffer(o,t,s),i.spatialReference)}catch(u){o=null}return o||m.error(`Filter by geodesic buffer (distance) unsupported, failed to project input geometry (${i.spatialReference.wkid}) to WGS84.`),D(o,n)}get spatialRelationship(){return Object(c["k"])(this.filter)?this.filter.spatialRelationship:"intersects"}static checkSupport(e){return e.timeExtent?(m.warn("Filters with a timeExtent are not supported for mesh scene layers"),!1):!!R(e.spatialRelationship)||(m.warn(`Filters with spatialRelationship other than ${_.join(", ")} are not supported for mesh scene layers`),!1)}};function x(){return!!I}async function S(){return x()||(I=await Promise.all([r.e("chunk-2d22cf8c"),r.e("chunk-1900908c")]).then(r.bind(null,"ea51"))),I}Object(n["a"])([Object(d["b"])({type:E["a"]})],v.prototype,"filter",void 0),Object(n["a"])([Object(d["b"])()],v.prototype,"layerFieldsIndex",void 0),Object(n["a"])([Object(d["b"])()],v.prototype,"loadAsyncModule",void 0),Object(n["a"])([Object(d["b"])()],v.prototype,"applyFilters",void 0),Object(n["a"])([Object(d["b"])()],v.prototype,"addSqlFilter",void 0),Object(n["a"])([Object(d["b"])({readOnly:!0})],v.prototype,"sortedObjectIds",null),Object(n["a"])([Object(d["b"])({readOnly:!0})],v.prototype,"parsedWhereClause",null),Object(n["a"])([Object(d["b"])({readOnly:!0})],v.prototype,"parsedGeometry",null),Object(n["a"])([Object(d["b"])({readOnly:!0})],v.prototype,"spatialRelationship",null),Object(n["a"])([Object(d["b"])()],v.prototype,"_projectionEngineLoaded",void 0),Object(n["a"])([Object(d["b"])()],v.prototype,"_geometryEngine",void 0),v=Object(n["a"])([Object(b["a"])("esri.views.3d.layers.i3s.I3SMeshViewFilter")],v);const _=(e=>e)(["contains","intersects","disjoint"]);function R(e){return null!=e&&_.indexOf(e)>=0}var C;function D(e,t){if(Object(c["j"])(e))return null;if("disjoint"===t&&"polygon"===e.type){const t=new Array(e.rings.length);for(let i=0;ie.aabr[0]-t.aabr[0]);const r=new Set,n=new s["a"];for(let e=0;e=i.aabr[2])break;r.add(e)}r.forEach(e=>{if(i!==e)if(e.aabr[2]<=i.aabr[0])r.delete(e);else if(I.intersects(i,e)){i.rings=i.rings.concat(e.rings),Object(O["p"])(i.aabr,e.aabr,i.aabr),delete i._geVersion,r.delete(e);const a=Object(s["g"])(t,e,t.length,n);t.splice(a,1)}}),r.add(i)}for(const e of t)delete e.aabr;return t}return[e]}function A(e,t,r,n){const i=T(e,r);return t.every(e=>q(e,i,n)!==C.DISCARD)}function N(e,t,r,n,i,s,a){const o=s[0].spatialReference||n.spatialReference;if(!Object(f["o"])(t.node.mbs,i,Q,o))return void m.warnOnce("SceneLayerView.filter.geometry is using unsupported SpatialReference, skipping geometry filter");const c=T(Q,o),l=k(a,n,o,r,t.objectHandle);for(const u of s){if(0===e.length)return;switch(q(u,c,a)){case C.DISCARD:return void(e.length=0);case C.KEEP:continue}Object(w["k"])(e,t.featureIds,e=>P(u,e,l))}}!function(e){e[e.KEEP=0]="KEEP",e[e.DISCARD=1]="DISCARD",e[e.TEST=2]="TEST"}(C||(C={}));const Q=[0,0,0,0];function k(e,t,r,n,i){const s=t.renderSpatialReference,a=new Map,o={rings:[[[0,0,0],[0,0,0],[0,0,0],[0,0,0]]],hasZ:!1,hasM:!1,type:"polygon",spatialReference:r};o.rings[0][3]=o.rings[0][0];const c={indices:null,data:null,stride:0,startIndex:0,endIndex:0};let l,u;switch(e){case"intersects":l=(e,t)=>I.intersects(e,t)?C.KEEP:C.TEST,u=M;break;case"contains":l=(e,t)=>I.contains(e,t)?C.TEST:C.DISCARD,u=M;break;default:l=(e,t)=>I.disjoint(e,t)?C.TEST:C.DISCARD,u=U}return{collection:n,object:i,type:e,maskSR:r,renderSR:s,aabbCache:a,triangle:o,positions:c,triangleTest:l,geometryTest:u}}function T(e,t){const r={x:e[0],y:e[1],hasZ:!1,hasM:!1,type:"point",spatialReference:t},n=!t.isWGS84&&!t.isWebMercator,i=Number.isNaN(e[3])?0:Object(o["f"])(e[3],0,2*j["a"].radius),s=n?I.buffer(r,i,1):I.geodesicBuffer(r,i,1);return s.type="polygon",s}function q(e,t,r){switch(r){case"intersects":case"contains":return M(e,t);case"disjoint":return U(e,t)}}function M(e,t){return I.intersects(e,t)?I.contains(e,t)?C.KEEP:C.TEST:C.DISCARD}function U(e,t){return I.intersects(e,t)?I.contains(e,t)?C.DISCARD:C.TEST:C.KEEP}const L=2**-32;function P(e,t,r){const{collection:n,object:i,renderSR:s,maskSR:a,geometryTest:o,aabbCache:c}=r;let l=c.get(t);if(!l){const e=n.getObjectTransform(i);n.getComponentAabb(i,t,G);const r=[[G[0],G[1],0],[G[0],G[4],0],[G[3],G[4],0],[G[3],G[1],0]];for(let t=0;t<4;++t)Object(p["z"])(r[t],r[t],e.rotationScale),Object(p["h"])(r[t],r[t],e.position),Object(f["y"])(r[t],s,r[t],a);l={rings:[r],hasZ:!1,hasM:!1,type:"polygon",spatialReference:a},l.rings[0][4]=l.rings[0][0],c.set(t,l)}switch(o(e,l)){case C.DISCARD:return!1;case C.KEEP:return!0}const{triangle:u,triangleTest:d,positions:b}=r,h=u.rings[0][0],y=u.rings[0][1],O=u.rings[0][2],j=n.getObjectTransform(i);n.getComponentPositions(i,t,b);const{indices:g,data:E,stride:w,startIndex:F,endIndex:m}=b;for(let I=F;I{const{keyField:r}=t;d&&r&&e.fieldsIndex.has(r)&&-1===d.indexOf(r)&&d.push(r)}),d}function a(e,t){return e.popupTemplate?e.popupTemplate:Object(n["k"])(t)&&t.defaultPopupTemplateEnabled&&Object(n["k"])(e.defaultPopupTemplate)?e.defaultPopupTemplate:null}},bb87:function(e,t,r){"use strict";r.d(t,"a",(function(){return j}));var n=r("a4ee"),i=r("fc29"),s=r("e92d"),a=r("c0d3"),o=r("59b2"),c=r("d386"),l=r("cb26");const u=e=>{let t=class extends e{constructor(){super(...arguments),this._numUpdating=0,this.asyncUpdateState=new Map}get updating(){return this._numUpdating>0}autoUpdateAsync(e,t){return b(t=>this._updateAsync(e,t),t)}async _updateAsync(e,r){if(!this._startAsyncUpdate(e)){try{const t=await r();this._set(e,t)}catch(t){s["a"].getLogger(this.declaredClass).warn(`Async update of "${e}" failed. Async update functions should not throw exceptions.`)}this._endAsyncUpdate(e)&&this._updateAsync(e,r)}}_startAsyncUpdate(e){var t;const r=null!=(t=this.asyncUpdateState.get(e))?t:d.None;return r&d.Updating?(this.asyncUpdateState.set(e,r|d.Invalidated),!0):(++this._numUpdating,this.asyncUpdateState.set(e,r|d.Updating),!1)}_endAsyncUpdate(e){var t;--this._numUpdating;const r=(null!=(t=this.asyncUpdateState.get(e))?t:d.None)&~d.Updating;return r&d.Invalidated?(this.asyncUpdateState.set(e,r&~d.Invalidated),!0):(this.asyncUpdateState.set(e,r),!1)}};return Object(n["a"])([Object(o["b"])({readOnly:!0})],t.prototype,"updating",null),Object(n["a"])([Object(o["b"])()],t.prototype,"_numUpdating",void 0),t=Object(n["a"])([Object(c["a"])("esri.core.AsyncUpdate")],t),t};var d;function b(e,t){const r=()=>{s&&!o&&e(n)},n=()=>{if(!s||o)return t();s.clear(),o=!0;const e=Object(a["b"])(s,t);return o=!1,e},i=()=>{s&&(s.destroy(),s=null)};let s=new l["a"](r),o=!1;return e(n),{remove:i}}!function(e){e[e.None=0]="None",e[e.Updating=1]="Updating",e[e.Invalidated=2]="Invalidated"}(d||(d={}));let p=class extends(u(i["a"])){};p=Object(n["a"])([Object(c["a"])("esri.core.AsyncUpdate")],p);var h=r("9096"),f=r("b2b2"),y=(r("b50f"),r("c120"),r("cea0"),r("c1da"));const O=s["a"].getLogger("esri.views.3d.layers.support.SceneLayerViewRequiredFields");let j=class extends(u(h["a"])){constructor(e){super(e)}get requiredFields(){const{layerView:{layer:{fieldsIndex:e},definitionExpressionFields:t},rendererFields:r,labelingFields:n,viewFilterFields:i}=this;return Object(y["j"])(e,[...Object(f["u"])(t,[]),...Object(f["u"])(r,[]),...Object(f["u"])(n,[]),...Object(f["u"])(i,[])])}initialize(){const e=this.layerView.layer;this.layer=e,this.handles.add([this.autoUpdateAsync("rendererFields",()=>{const{fieldsIndex:e,renderer:t}=this.layer;return t?g(r=>t.collectRequiredFields(r,e)):null}),this.autoUpdateAsync("labelingFields",()=>{const{layer:e}=this;return e.labelsVisible?g(t=>Object(y["g"])(t,e)):null}),this.autoUpdateAsync("viewFilterFields",()=>{const{layer:e,filter:t}=this.layerView;return g(r=>Object(y["f"])(r,e,t))})])}};async function g(e){const t=new Set;try{return await e(t),Array.from(t).sort()}catch(r){return O.error(r),null}}Object(n["a"])([Object(o["b"])()],j.prototype,"layerView",void 0),Object(n["a"])([Object(o["b"])()],j.prototype,"layer",void 0),Object(n["a"])([Object(o["b"])()],j.prototype,"requiredFields",null),Object(n["a"])([Object(o["b"])()],j.prototype,"rendererFields",void 0),Object(n["a"])([Object(o["b"])()],j.prototype,"labelingFields",void 0),Object(n["a"])([Object(o["b"])()],j.prototype,"viewFilterFields",void 0),j=Object(n["a"])([Object(c["a"])("esri.views.3d.layers.support.SceneLayerViewRequiredFields")],j)},dd25:function(e,t,r){"use strict";r.d(t,"a",(function(){return c})),r.d(t,"b",(function(){return l}));var n=r("7ffa"),i=r("b2b2"),s=r("d36d");const a={setAttribute(){},rollback(){},commit(){}};var o;function c(e,t){const r=t.attributes[e.objectIdField],s=e.sessions.get(r);if(s)return s;const c=Object(n["a"])(t.attributes),l=new Set;if(null==r)return a;const u=e.attributeOverrides.createInteractiveEditSession(r),d=new Map,b=(e,t)=>{const n=d.get(e);if(null==n){const n=t.indexOf(r);return d.set(e,n),n}return n};let p=o.EDITING;const h={setAttribute(r,n){if(p!==o.EDITING)return;const s=e.fieldsIndex.get(r);if(Object(i["j"])(s))return;const a=e.attributeStorageInfo.findIndex(e=>e.name===s.name);if(a<0)return;u.set(a,n);const c=e.attributeStorageInfo[a];let d=!1;l.add(r),e.forEachNode((r,i)=>{const s=b(r,i);if(-1===s)return;const a=e.getAttributeData(r.index);if(a){const i=a[c.name];i&&(i[s]=n,e.setAttributeData(r.index,a,t),d=!0)}}),d&&e.clearMemCache()},rollback(){if(p===o.EDITING){for(const e of l)this.setAttribute(e,c[e]);u.rollback(),p=o.ROLLED_BACK,e.sessions.delete(r)}},commit(){p===o.EDITING&&(u.commit(),p=o.COMMITTED,e.sessions.delete(r))}};return e.sessions.set(r,h),h}function l(e,t){const r=u(e,t);if(0===r.size)return;const n=new Map;for(let i=0;i{const a=e.getAttributeData(r);let o=!1;t.forEach((t,r)=>{const c=Object(i["k"])(a)?a[r]:null,l=n.get(r);for(const{featureIndex:n,value:i,featureId:a}of t)c&&(c[n]=i,o=!0,s=!0),e.attributeOverrides.updateValue(a,l,i)}),o&&e.setAttributeData(r,a,null)}),s&&e.clearMemCache()}function u(e,t){const r=t.edits.updateFeatures;if(!r||0===r.length)return new f;const n=p(t),i=new f,a=new Map;for(let s=0;s{const t=Object(s["a"])(o,e.attributes,c);return n.has(t)});return e.forEachNode((t,r)=>{const n=new Set(r);for(const a of l){const l=Object(s["a"])(o,a.attributes,c);if(!n.has(l))continue;const u=r.indexOf(l);for(const r in a.attributes){const n=e.fieldsIndex.normalizeFieldName(r),s=d(i,t.index,n),o=a.attributes[r];s.push({featureIndex:u,featureId:l,value:o})}}}),i}function d(e,t,r){const n=b(e,t),i=n.get(r);if(i)return i;const s=new Array;return n.set(r,s),s}function b(e,t){const r=e.get(t);if(r)return r;const n=new h;return e.set(t,n),n}function p(e){const t=new Set;if(!e.updatedFeatures)return t;for(const r of e.updatedFeatures)null!=r.objectId&&null==r.error&&t.add(r.objectId);return t}!function(e){e[e.EDITING=0]="EDITING",e[e.ROLLED_BACK=1]="ROLLED_BACK",e[e.COMMITTED=2]="COMMITTED"}(o||(o={}));const h=Map,f=Map},e315:function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));var n=r("a4ee"),i=r("59b2"),s=(r("b50f"),r("c120"),r("cea0"),r("3eec"),r("c0d3"),r("0b86"),r("25245"),r("365a"));class a extends s["a"]{constructor(){super(...arguments),this.layer=null,this.filter=null}get availableFields(){return[]}get maximumNumberOfFeatures(){return 0}set maximumNumberOfFeatures(e){throw new Error("Not implemented")}get maximumNumberOfFeaturesExceeded(){return!1}highlight(e){throw new Error("Not implemented")}queryFeatures(e,t){throw new Error("Not implemented")}queryObjectIds(e,t){throw new Error("Not implemented")}queryFeatureCount(e,t){throw new Error("Not implemented")}createQuery(){throw new Error("Not implemented")}queryExtent(e,t){throw new Error("Not implemented")}}Object(n["a"])([Object(i["b"])()],a.prototype,"layer",void 0),Object(n["a"])([Object(i["b"])()],a.prototype,"availableFields",null),Object(n["a"])([Object(i["b"])()],a.prototype,"maximumNumberOfFeatures",null),Object(n["a"])([Object(i["b"])({readOnly:!0})],a.prototype,"maximumNumberOfFeaturesExceeded",null),Object(n["a"])([Object(i["b"])()],a.prototype,"filter",void 0)},f426:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r("c1da");function i(){return{requiredFields:{type:[String],readOnly:!0},availableFields:{type:[String],readOnly:!0,get:function(){const{layer:e,layer:{fieldsIndex:t},requiredFields:r}=this;return e.outFields?Object(n["j"])(t,[...Object(n["u"])(t,e.outFields),...r]):Object(n["j"])(t,r)}}}}},f7f0:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r("a4ee"),i=r("ce50"),s=r("b2b2"),a=(r("e92d"),r("cea0"),r("b50f"),r("c120"),r("2dd4"),r("d386")),o=r("c1da"),c=r("ad73");const l=e=>{let t=class extends e{_validateFetchPopupFeatures(e){const{layer:t}=this,{popupEnabled:r}=t;return r?Object(c["a"])(t,e)?void 0:new i["a"]("scenelayerview3d:fetchPopupFeatures","Layer does not define a popup template",{layer:t}):new i["a"]("scenelayerview3d:fetchPopupFeatures","Popups are disabled",{layer:t})}async prepareFetchPopupFeatures(e){}async fetchPopupFeatures(e,t){const r=this._validateFetchPopupFeatures(t);if(r)return Promise.reject(r);const n=Object(s["k"])(t)?t.clientGraphics:null;if(!n||0===n.length)return Promise.resolve([]);const i="scene"===this.layer.type&&Object(s["k"])(this.layer.associatedLayer)?this.layer.associatedLayer:this.layer,a=Object(o["u"])(this.layer.fieldsIndex,await Object(c["b"])(i,Object(c["a"])(this.layer,t)));await this.prepareFetchPopupFeatures(a);const l=new Set,u=[],d=[];for(const s of n)Object(o["s"])(a,s,l)?d.push(s):u.push(s);return 0===d.length?Promise.resolve(u):this.whenGraphicAttributes(d,[...l]).catch(()=>d).then(e=>u.concat(e))}};return t=Object(n["a"])([Object(a["a"])("esri.views.3d.layers.support.PopupSceneLayerView")],t),t}}}]); //# sourceMappingURL=chunk-02473e05.f874b383.js.map