(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6dc0d0fd"],{"0e0b":function(e,t,r){"use strict";r.d(t,"a",(function(){return j}));var i=r("a4ee"),s=r("fc29"),a=r("ce6d"),n=r("59b2"),o=(r("b50f"),r("c120"),r("cea0"),r("d386")),l=r("0fc4"),c=r("8188"),u=r("4261"),p=r("9180"),d=r("95e9");let b=class extends s["a"]{constructor(e){super(e),this.events=new a["a"]}forEach(e){this.forAllFeatures(t=>(e(t),d["a"].CONTINUE))}forEachBounds(e,t,r){const i=this.getFeatureExtent;for(const s of e)t(i(s,r))}forEachInBounds(e,t){this.forAllFeatures(r=>{const i=this.getFeatureExtent(r,h);return Object(p["w"])(e,Object(u["F"])(i,O))&&t(r),d["a"].CONTINUE},t=>{if(Object(c["o"])(t.node.mbs,this.sourceSpatialReference,y,this.viewSpatialReference),y[0]>=e[0]&&y[2]<=e[2]&&y[1]>=e[1]&&y[3]<=e[3])return d["a"].CONTINUE;const r=Math.max(e[0],Math.min(y[0],e[2])),i=Math.max(e[1],Math.min(y[1],e[3])),s=y[0]-r,a=y[1]-i;return s*s+a*a<=y[3]*y[3]?d["a"].CONTINUE:d["a"].SKIP})}};Object(i["a"])([Object(n["b"])({constructOnly:!0})],b.prototype,"featureAdapter",void 0),Object(i["a"])([Object(n["b"])({constructOnly:!0})],b.prototype,"forAllFeatures",void 0),Object(i["a"])([Object(n["b"])({constructOnly:!0})],b.prototype,"getFeatureExtent",void 0),Object(i["a"])([Object(n["b"])({constructOnly:!0})],b.prototype,"sourceSpatialReference",void 0),Object(i["a"])([Object(n["b"])({constructOnly:!0})],b.prototype,"viewSpatialReference",void 0),b=Object(i["a"])([Object(o["a"])("esri.views.3d.layers.i3s.I3SQueryFeatureStore")],b);const y=Object(l["e"])(),h=Object(u["h"])(),O=Object(p["l"])(),j=b},"16d0":function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var i=r("a4ee"),s=r("e92d"),a=r("59b2"),n=(r("b50f"),r("c120"),r("cea0"),r("d386")),o=r("66a2"),l=r("ee9c");const c=s["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?(c.error("definitionExpression references unknown fields: "+t.join(", ")),null):(this._definitionExpressionErrors=0,e)}catch(e){return c.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(i["a"])([Object(a["b"])()],t.prototype,"i3slayer",void 0),Object(i["a"])([Object(a["b"])({readOnly:!0})],t.prototype,"parsedDefinitionExpression",null),Object(i["a"])([Object(a["b"])({readOnly:!0})],t.prototype,"definitionExpressionFields",null),t=Object(i["a"])([Object(n["a"])("esri.views.3d.layers.support.DefinitionExpressionSceneLayerView")],t),t}},"18cc":function(e,t,r){"use strict";r.d(t,"a",(function(){return O}));var i=r("a4ee"),s=r("fc29"),a=r("ce50"),n=r("af40"),o=r("b2b2"),l=r("59b2"),c=(r("b50f"),r("c120"),r("cea0"),r("d386")),u=r("3af1"),p=r("6411"),d=r("2edc"),b=r("69dd");const y=p["a"];let h=class extends s["a"]{constructor(e){super(e),this._dataQueryEngineInstance=null,this._handles=new n["a"]}get defaultQueryJSON(){return new b["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:i}=await this.dataQueryEngine.executeQueryForExtent(this._ensureQueryJSON(e),t);return{count:r,extent:u["a"].fromJSON(i)}}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 a["a"]("feature-store:unsupported-query","returnGeometry is not yet supported for mesh scene layer queries");if(r.returnCentroid)throw new a["a"]("feature-store:unsupported-query","returnCentroid is not yet supported for mesh scene layer queries");const i=await this.dataQueryEngine.executeQuery(r,t),s=d["default"].fromJSON(i);return s.features.forEach(e=>{e.geometry=null}),s}_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()),i=this.layerView.view.resourceController.scheduler,s=this.spatialReference.toJSON(),a=this.priority,n=this.spatialIndex;return this._dataQueryEngineInstance=new y({hasZ:!0,hasM:!1,geometryType:t,fields:r,timeInfo:null,spatialReference:s,objectIdField:e,featureStore:n,scheduler:i,priority:a}),this._dataQueryEngineInstance}};Object(i["a"])([Object(l["b"])({constructOnly:!0})],h.prototype,"layerView",void 0),Object(i["a"])([Object(l["b"])({constructOnly:!0})],h.prototype,"priority",void 0),Object(i["a"])([Object(l["b"])({constructOnly:!0})],h.prototype,"spatialIndex",void 0),Object(i["a"])([Object(l["b"])({readOnly:!0,aliasOf:"layerView.view.spatialReference"})],h.prototype,"spatialReference",void 0),Object(i["a"])([Object(l["b"])({readOnly:!0,aliasOf:"layerView.i3slayer"})],h.prototype,"layer",void 0),Object(i["a"])([Object(l["b"])({readOnly:!0})],h.prototype,"defaultQueryJSON",null),h=Object(i["a"])([Object(c["a"])("esri.views.3d.layers.i3s.I3SQueryEngine")],h);const O=h},"246f":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return se}));var i=r("a4ee"),s=r("8d60"),a=r("fc29"),n=r("2c4f"),o=r("c649"),l=r("e92d"),c=r("b2b2"),u=r("f4cc"),p=r("3795"),d=r("59b2"),b=(r("b50f"),r("c120"),r("cea0"),r("d386")),y=(r("433f"),r("ce50")),h=r("477c"),O=r("66a2"),j=(r("e814"),r("96d4")),f=r("c1da"),g=r("69dd"),m=r("ce6d"),v=r("9096"),w=r("a5d8"),x=r("fab3");const E=(e,t)=>{let r=class extends(Object(x["b"])(Object(v["b"])(Object(w["b"])(m["a"].EventedMixin(e))))){constructor(e){super(e),this.sublayer=null,this.parent=null,this.view=null}initialize(){}get suspended(){return!this.canResume()}get updating(){return!this.suspended&&this.isUpdating()}get visible(){return!0===this.get("sublayer.visible")}set visible(e){void 0!==e?this._override("visible",e):this._clearOverride("visible")}get fullOpacity(){const e=e=>null!=e?e:1;return e(this.get("sublayer.opacity"))*e(this.get("parent.fullOpacity"))}canResume(){return!this.get("parent.suspended")&&this.get("view.ready")&&this.visible||!1}isUpdating(){return!1}};return Object(i["a"])([Object(d["b"])()],r.prototype,"sublayer",void 0),Object(i["a"])([Object(d["b"])()],r.prototype,"parent",void 0),Object(i["a"])([Object(d["b"])({readOnly:!0})],r.prototype,"suspended",null),Object(i["a"])([Object(d["b"])({type:Boolean,readOnly:!0})],r.prototype,"updating",null),Object(i["a"])([Object(d["b"])()],r.prototype,"view",void 0),Object(i["a"])([Object(d["b"])()],r.prototype,"visible",null),Object(i["a"])([Object(d["b"])()],r.prototype,"fullOpacity",null),r=Object(i["a"])([Object(b["a"])("esri.views.3d.layers.BuildingSublayerView3D")],r),r};var F,S=r("4c7e"),I=r("95e9"),_=r("0fc4"),R=r("ec13"),T=r("caf1");!function(e){e[e.Solid=0]="Solid",e[e.WireFrame=1]="WireFrame",e[e.XRay=2]="XRay"}(F||(F={}));const C=.15,Q=.5*C;function L(e){switch(e.filterMode.type){case"solid":return{mode:F.Solid};case"wire-frame":return{mode:F.WireFrame,edgeMaterial:Object(R["b"])(e.filterMode.edges,{})};case"x-ray":return{mode:F.XRay}}}function k(e,t){if(Object(c["j"])(t))return e.color[3]=0,e.edgeMaterial=null,void(e.pickable=!1);switch(t.mode){case F.Solid:return;case F.WireFrame:return e.color[3]=0,e.edgeMaterial=t.edgeMaterial,void(e.pickable=!1);case F.XRay:return e.color[0]=1,e.color[1]=1,e.color[2]=1,e.color[3]*=C,e.colorMixMode=T["a"].Replace,e.castShadows=!1,e.pickable=!1,void(e.edgeMaterial=M(e.edgeMaterial))}}function M(e){return Object(c["j"])(e)?null:(P.lastMaterial!==e&&(P.cachedMaterial=D(e),P.lastMaterial=e),P.cachedMaterial)}function D(e){const t=Object(_["d"])(e.color);return t[3]*=Q,{...e,color:t}}const P={cachedMaterial:null,lastMaterial:null};var N=r("9a0d"),A=r("4bb0"),q=r("18cc"),V=r("8ea5"),B=r("0e0b"),G=r("ee9c"),U=r("16d0");r("3eec"),r("c0d3"),r("0b86"),r("25245");class z extends a["a"]{constructor(){super(...arguments),this.sublayer=null}get updating(){return!1}get suspended(){return!1}get availableFields(){return[]}get filter(){return null}set filter(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")}highlight(e){throw new Error("Not implemented")}}Object(i["a"])([Object(d["b"])()],z.prototype,"sublayer",void 0),Object(i["a"])([Object(d["b"])()],z.prototype,"availableFields",null),Object(i["a"])([Object(d["b"])()],z.prototype,"filter",null);var W=r("ad73"),J=r("9305");const K=l["a"].getLogger("esri.views.3d.layers.BuildingComponentSublayerView3D");let H=class extends(Object(U["a"])(Object(S["a"])(E(z)))){constructor(){super(...arguments),this.type="building-component-sublayer-3d",this.layerView=null,this._elevationContext="scene",this._isIntegratedMesh=!1,this._supportsLabeling=!1,this.lodFactor=1,this.progressiveLoadFactor=1,this._queryEngine=null}get layerUid(){return this.sublayer.layer.uid}get sublayerUid(){return this.sublayer.uid}initialize(){this.updatingHandles.add(()=>[this.sublayer.renderer,this.definitionExpressionFields,this.filterExpressionFields],()=>this._updateRequiredFields()),this.updatingHandles.add(()=>this.sublayer.renderer,e=>this._rendererChange(e),h["a"]),this.updatingHandles.add(()=>[this.parsedDefinitionExpression,this.filter,Object(c["b"])(this.viewFilter,({parsedWhereClause:e,parsedGeometry:t,sortedObjectIds:r})=>[e,t,r])],()=>this._filterChange()),this.updatingHandles.add(()=>this.parsedFilterExpressions,()=>this._updateSymbologyOverride(),h["a"]),this.addResolvingPromise(this._updateRequiredFields())}get parsedFilterExpressions(){return"Overview"===this.sublayer.modelName?[]:this.layerView.filterExpressions.map(([e,t])=>{let r;try{r=O["WhereClause"].create(e,this.sublayer.fieldsIndex)}catch(a){return K.error("Failed to parse filterExpression: "+a),null}if(!r.isStandardized)return K.error("filterExpression is using non standard function"),null;const i=[],s=r.fieldNames;return Object(G["l"])(s,this.sublayer.fields,{missingFields:i}),i.length>0?(K.error("filterExpression references unknown fields: "+i.join(", ")),null):[r,t]}).filter(e=>null!=e)}get filter(){return Object(c["k"])(this.viewFilter)?this.viewFilter.filter:null}set filter(e){!Object(c["j"])(e)&&A["a"].checkSupport(e)?Object(c["k"])(this.viewFilter)?this.viewFilter.filter=e:this.viewFilter=new A["a"]({filter:e,layerFieldsIndex:this.sublayer.fieldsIndex,loadAsyncModule:e=>this._loadAsyncModule(e),applyFilters:()=>this._applyFilters(!0),addSqlFilter:(e,t)=>this.addSqlFilter(e,t,this.logError)}):this.viewFilter=null}_updateSymbologyOverride(){const e=this.parsedFilterExpressions;e.length>0?this._setSymbologyOverride((t,r)=>{for(const[s,a]of e)try{if(s.testFeature(t))return k(r,a)}catch(i){this.logError(i)}return k(r,null)},this.filterExpressionFields):this._setSymbologyOverride(null,null)}get filterExpressionFields(){return Object(f["j"])(this.sublayer.fieldsIndex,this.parsedFilterExpressions.reduce((e,[t])=>e.concat(t.fieldNames),[]))}get availableFields(){const e=this.sublayer,t=e.fieldsIndex;let r=this.requiredFields;if(e.outFields||e.layer.outFields){const i=[...e.outFields||[],...e.layer.outFields||[]];r=[...Object(f["u"])(t,i),...r]}return Object(f["j"])(t,r)}_createLayerGraphic(e){const t=new s["a"](null,null,e);return t.layer=this.sublayer.layer,t.sourceLayer=this.sublayer,t}canResume(){return super.canResume()&&(!this._controller||this._controller.rootNodeVisible)}async fetchPopupFeatures(e,t){const r=this._validateFetchPopupFeatures(t);if(r)return Promise.reject(r);if(!Object(c["k"])(t)||!t.clientGraphics||0===t.clientGraphics.length)return[];const i=[],s=[],a=Object(c["k"])(this.sublayer.associatedLayer)?await this.sublayer.associatedLayer.load():this.sublayer,n=Object(f["u"])(this.sublayer.fieldsIndex,await Object(W["b"])(a,Object(W["a"])(this.sublayer,t))),o=new Set;for(const l of t.clientGraphics)Object(f["s"])(n,l,o)?s.push(l):i.push(l);return 0===s.length?Promise.resolve(i):(Object(c["k"])(this.sublayer.associatedLayer)&&await this.sublayer.associatedLayer.load().catch(()=>K.warn("Failed to load associated feature layer. Displaying popup attributes from cached attributes.")),this.whenGraphicAttributes(s,Array.from(o)).catch(()=>s).then(e=>i.concat(e)))}async _updateRequiredFields(){const e=Object(f["j"])(this.sublayer.fieldsIndex,[...this.sublayer.renderer?await this.sublayer.renderer.getRequiredFields(this.sublayer.fieldsIndex):[],...this.definitionExpressionFields||[],...this.filterExpressionFields||[]]);this._set("requiredFields",e)}_validateFetchPopupFeatures(e){const{sublayer:t}=this,{popupEnabled:r}=t;return r?Object(W["a"])(t,e)?void 0:new y["a"]("buildingscenelayerview3d:fetchPopupFeatures","Layer does not define a popup template",{sublayer:t}):new y["a"]("buildingscenelayerview3d:fetchPopupFeatures","Popups are disabled",{sublayer:t})}getFilters(){const e=super.getFilters();return this.addSqlFilter(e,this.parsedDefinitionExpression,this.logError),Object(c["k"])(this.viewFilter)&&this.viewFilter.addFilters(e,this.view,this._controller.crsIndex,this._collection),e}createQuery(){const e={outFields:["*"],returnGeometry:!1,outSpatialReference:this.view.spatialReference};return Object(c["k"])(this.filter)?this.filter.createQuery(e):new g["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.sublayer,r=t.layer;for(const i of e.features)i.layer=r,i.sourceLayer=t;return e})}queryObjectIds(e,t){return this._ensureQueryEngine().executeQueryForIds(this._ensureQuery(e),null==t?void 0:t.signal)}_ensureQueryEngine(){return Object(c["j"])(this._queryEngine)&&(this._queryEngine=this._createQueryEngine()),this._queryEngine}_createQueryEngine(){const e=Object(N["c"])(this.view.spatialReference,this.view.renderSpatialReference,this._collection);return new q["a"]({layerView:this,priority:J["c"].FEATURE_QUERY_ENGINE,spatialIndex:new B["a"]({featureAdapter:new V["a"]({objectIdField:this.sublayer.objectIdField,attributeStorageInfo:this.sublayer.attributeStorageInfo,getFeatureExtent:e}),forAllFeatures:(e,t)=>this._forAllFeatures((t,r,i)=>e({id:t,index:r,meta:i}),t,I["b"].ALL_IN_CLIPPING_AREA),getFeatureExtent:e,sourceSpatialReference:Object(G["q"])(this.sublayer),viewSpatialReference:this.view.spatialReference})})}_ensureQuery(e){return this._addDefinitionExpressionToQuery(Object(c["j"])(e)?this.createQuery():g["a"].from(e))}};Object(i["a"])([Object(d["b"])({aliasOf:"sublayer"})],H.prototype,"i3slayer",void 0),Object(i["a"])([Object(d["b"])()],H.prototype,"layerView",void 0),Object(i["a"])([Object(d["b"])()],H.prototype,"suspended",void 0),Object(i["a"])([Object(d["b"])({readOnly:!0,aliasOf:"view.qualitySettings.sceneService.3dObject.lodFactor"})],H.prototype,"lodFactor",void 0),Object(i["a"])([Object(d["b"])({readOnly:!0})],H.prototype,"parsedFilterExpressions",null),Object(i["a"])([Object(d["b"])({type:j["a"]})],H.prototype,"filter",null),Object(i["a"])([Object(d["b"])()],H.prototype,"viewFilter",void 0),Object(i["a"])([Object(d["b"])({type:[String],readOnly:!0})],H.prototype,"filterExpressionFields",null),Object(i["a"])([Object(d["b"])({type:[String],readOnly:!0})],H.prototype,"requiredFields",void 0),Object(i["a"])([Object(d["b"])({type:[String],readOnly:!0})],H.prototype,"availableFields",null),H=Object(i["a"])([Object(b["a"])("esri.views.3d.layers.BuildingComponentSublayerView3D")],H);const Z=H;var $=r("66af"),X=r("deae"),Y=r("365a");class ee extends Y["a"]{constructor(){super(...arguments),this.layer=null,this.sublayerViews=null}highlight(e){throw new Error("Not implemented")}}Object(i["a"])([Object(d["b"])()],ee.prototype,"layer",void 0),Object(i["a"])([Object(d["b"])()],ee.prototype,"sublayerViews",void 0);const te=l["a"].getLogger("esri.views.3d.layers.BuildingSceneLayerView3D"),re=E(a["a"]);let ie=class extends(Object($["a"])(ee)){constructor(){super(...arguments),this.type="building-scene-3d",this.sublayerViews=new n["a"],this._abortController=new AbortController,this._loadingComponents=0}get filterExpression(){const e=this.layer.activeFilterId,t=null!=e?this.layer.filters.find(t=>t.id===e):null,r=null!=t?t.filterBlocks.find(e=>"solid"===e.filterMode.type):null;return r?r.filterExpression:null}get filterExpressions(){const e=this.layer.activeFilterId,t=null!=e?this.layer.filters.find(t=>t.id===e):null;return t&&t.filterBlocks?t.filterBlocks.toArray().map(e=>[e.filterExpression,L(e)]):[]}get updatingProgressValue(){const e=this.sublayerViews,t=this._loadingComponents+(e?e.length:0);return e.reduce((e,t)=>e+t.updatingProgress,0)/t}isUpdating(){return this._loadingComponents>0||this.sublayerViews&&this.sublayerViews.some(e=>e.updating)}initialize(){Object(G["g"])(this.layer.spatialReference,this.view.spatialReference,this.view.viewingMode),this._initializeSubLayerViews(this.layer.sublayers,this)}destroy(){this.sublayerViews&&(this.sublayerViews.forEach(e=>e.destroy()),this.sublayerViews=null),this._abortController.abort(),this._abortController=null}_initializeSubLayerViews(e,t){const r=this,i=this.view;e.forEach(e=>{if(!e.isEmpty)if("building-group"===e.type){const r=new re({sublayer:e,view:i,parent:t});this._initializeSubLayerViews(e.sublayers,r)}else"mesh"===e.geometryType&&(this._loadingComponents++,e.load({signal:this._abortController.signal}).then(()=>{const s=new Z({sublayer:e,layerView:r,view:i,parent:t});this.sublayerViews.push(s),this.handles.add([Object(p["a"])(s,"updating",()=>this.notifyChange("updating"),!0),Object(p["a"])(s,"updatingProgress",()=>this.notifyChange("updatingProgressValue"),!0)])}).catch(t=>{Object(u["m"])(t)||te.error(`Error while creating view for sublayer ${e.id}\nLayer: ${this.layer.url}\n`,t)}).then(()=>{this._loadingComponents--,this.notifyChange("updating"),this.notifyChange("updatingProgressValue")}))})}getGraphicFromIntersectorTarget(e){for(const t of this.sublayerViews.items)if(t.sublayer.uid===e.sublayerUid)return t.getGraphicFromIntersectorTarget(e);return null}async fetchPopupFeatures(e,t){if(!Object(c["k"])(t)||!t.clientGraphics||0===t.clientGraphics.length)return;const r=this._findComponent(t.clientGraphics[0].sourceLayer);return Object(c["j"])(r)?void 0:r.fetchPopupFeatures(e,t)}whenGraphicBounds(e){const t=this._findComponent(e.sourceLayer);return Object(c["j"])(t)?Promise.reject():t.whenGraphicBounds(e)}_findComponent(e){return this.sublayerViews.find(t=>e===t.sublayer)}highlight(e){e instanceof s["a"]?e=[e]:e instanceof n["a"]&&(e=e.toArray());const t=[];if(Array.isArray(e)&&e.length>0&&e[0]instanceof s["a"]){const r=e,i=new Map;for(const e of r){let t=i.get(e.sourceLayer);null==t&&(t=[],i.set(e.sourceLayer,t)),t.push(e)}this.sublayerViews.forEach(e=>{const r=i.get(e.sublayer);r&&t.push(e.highlight(r))})}return Object(o["a"])(t)}getUsedMemory(){return this.sublayerViews.reduce((e,t)=>e+t.getUsedMemory(),0)}getUnloadedMemory(){return this.sublayerViews.reduce((e,t)=>e+t.getUnloadedMemory(),0)}ignoresMemoryFactor(){return!1}};Object(i["a"])([Object(d["b"])()],ie.prototype,"sublayerViews",void 0),Object(i["a"])([Object(d["b"])({readOnly:!0})],ie.prototype,"filterExpression",null),Object(i["a"])([Object(d["b"])({readOnly:!0})],ie.prototype,"filterExpressions",null),Object(i["a"])([Object(d["b"])(X["a"])],ie.prototype,"updatingProgress",void 0),Object(i["a"])([Object(d["b"])({readOnly:!0,dependsOn:[]})],ie.prototype,"updatingProgressValue",null),ie=Object(i["a"])([Object(b["a"])("esri.views.3d.layers.BuildingSceneLayerView3D")],ie);const se=ie},"2e4d":function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var i=r("a4ee"),s=r("a5d8"),a=r("e694"),n=r("59b2"),o=(r("b50f"),r("c120"),r("cea0")),l=r("afcf"),c=r("d386"),u=r("22f4");let p=class extends(Object(s["b"])(a["b"])){constructor(e){super(e),this.title="",this.id=-1,this.modelName=null,this.isEmpty=null,this.visible=!0,this.opacity=1}readTitle(e,t){return"string"==typeof t.alias?t.alias:"string"==typeof t.name?t.name:""}readIdOnlyOnce(e){return-1!==this.id?this.id:"number"==typeof e?e:void 0}};Object(i["a"])([Object(n["b"])({type:String,json:{origins:{"web-scene":{write:!0},"portal-item":{write:!0}}}})],p.prototype,"title",void 0),Object(i["a"])([Object(l["a"])("service","title",["alias","name"])],p.prototype,"readTitle",null),Object(i["a"])([Object(n["b"])()],p.prototype,"layer",void 0),Object(i["a"])([Object(n["b"])({type:o["a"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],p.prototype,"id",void 0),Object(i["a"])([Object(l["a"])("service","id")],p.prototype,"readIdOnlyOnce",null),Object(i["a"])([Object(n["b"])(Object(u["k"])(String))],p.prototype,"modelName",void 0),Object(i["a"])([Object(n["b"])(Object(u["k"])(Boolean))],p.prototype,"isEmpty",void 0),Object(i["a"])([Object(n["b"])({type:Boolean,json:{name:"visibility",write:!0}})],p.prototype,"visible",void 0),Object(i["a"])([Object(n["b"])({type:Number,json:{write:!0}})],p.prototype,"opacity",void 0),p=Object(i["a"])([Object(c["a"])("esri.layers.buildingSublayers.BuildingSublayer")],p);const d=p},"433f":function(e,t,r){"use strict";r.d(t,"a",(function(){return O}));var i,s=r("a4ee"),a=r("2c4f"),n=r("1853"),o=r("0028"),l=r("59b2"),c=(r("b50f"),r("c120"),r("cea0"),r("d386")),u=r("e814"),p=r("2e4d");const d={type:a["a"],readOnly:!0,json:{origins:{service:{read:{source:"sublayers",reader:b}}},read:!1}};function b(e,t,r){if(e&&Array.isArray(e))return new a["a"](e.map(e=>{const t=h(e);if(t){const i=new t;return i.read(e,r),i}r&&r.messages&&e&&r.messages.push(new o["a"]("building-scene-layer:unsupported-sublayer-type","Building scene sublayer of type '"+(e.type||"unknown")+"' are not supported",{definition:e,context:r}))}))}let y=i=class extends p["a"]{constructor(e){super(e),this.type="building-group",this.listMode="show",this.sublayers=null}loadAll(){return Object(n["b"])(this,e=>i.forEachSublayer(this.sublayers,t=>{"building-group"!==t.type&&e(t)}))}};function h(e){return"group"===e.layerType?y:u["a"]}Object(s["a"])([Object(l["b"])({type:["hide","show","hide-children"],json:{write:!0}})],y.prototype,"listMode",void 0),Object(s["a"])([Object(l["b"])(d)],y.prototype,"sublayers",void 0),y=i=Object(s["a"])([Object(c["a"])("esri.layers.buildingSublayers.BuildingGroupSublayer")],y),function(e){function t(e,r){e.forEach(e=>{r(e),"building-group"===e.type&&t(e.sublayers,r)})}e.sublayersProperty=d,e.readSublayers=b,e.forEachSublayer=t}(y||(y={}));const O=y},"4bb0":function(e,t,r){"use strict";r.d(t,"a",(function(){return F}));var i=r("a4ee"),s=(r("e06a"),r("fc29")),a=r("b50f"),n=r("e92d"),o=r("38a4"),l=r("b2b2"),c=r("8048"),u=r("3795"),p=r("59b2"),d=(r("c120"),r("cea0"),r("d386")),b=r("e431"),y=r("66a2"),h=r("8188"),O=r("4261"),j=r("9180"),f=r("2255"),g=r("9786"),m=r("96d4"),v=r("ee9c"),w=r("5996");const x=n["a"].getLogger("esri.views.3d.layers.i3s.I3SMeshViewFilter");let E,F=class extends s["a"]{constructor(e){super(e),this._projectionEngineLoaded=!1}initialize(){Object(u["j"])(this,"filter.geometry").then(()=>this.loadAsyncModule(I().then(e=>{this.destroyed||(this._geometryEngine=e,this.applyFilters())})))}get sortedObjectIds(){if(Object(l["j"])(this.filter.objectIds))return null;const e=new Float64Array(this.filter.objectIds);return e.sort(),e}get parsedWhereClause(){const e=Object(l["k"])(this.filter)?this.filter.where:null;if(Object(l["j"])(e)||!e)return null;try{return y["WhereClause"].create(e,this.layerFieldsIndex)}catch(t){x.error("Failed to parse filter where clause: "+t)}return null}addFilters(e,t,r,i){const s=this.sortedObjectIds;Object(l["k"])(s)&&e.push(e=>Object(v["u"])(s,!0,e)),this.addSqlFilter(e,this.parsedWhereClause);const a=this.parsedGeometry;if(Object(l["k"])(a)){const s=this.spatialRelationship;e.push((e,n)=>L(e,n,i,t,r,a,s))}}isMBSGeoemtryVisible(e,t,r){const i=this.parsedGeometry;if(Object(l["k"])(i)){const s=this.spatialRelationship,a=i[0].spatialReference||t;return Object(h["o"])(e,r,k,a)?Q(k,i,a,s):(x.warnOnce("SceneLayerView.filter.geometry is using unsupported SpatialReference, skipping geometry filter for MBS"),!0)}return!0}get parsedGeometry(){if(Object(l["j"])(this.filter))return null;if(!this._geometryEngine)return null;const{geometry:e}=this.filter;if(Object(l["j"])(e))return null;const{distance:t,units:r}=this.filter,i=this.spatialRelationship,s="mesh"===e.type?e.extent:e;if(Object(l["j"])(t)||0===t)return C(s,i);const a=r||Object(c["h"])(s.spatialReference);if(s.spatialReference.isWGS84)return C(this._geometryEngine.geodesicBuffer(s,t,a),i);const n=Object(g["d"])(s,w["a"].WGS84);if(Object(l["k"])(n))return C(Object(g["d"])(this._geometryEngine.geodesicBuffer(n,t,a),s.spatialReference),i);if(!this._projectionEngineLoaded&&(this.loadAsyncModule(Object(h["i"])().then(()=>this._projectionEngineLoaded=!0)),!this._projectionEngineLoaded))return null;let o=null;try{o=Object(h["m"])(s,w["a"].WGS84)}catch(u){}if(o)try{o=Object(h["m"])(this._geometryEngine.geodesicBuffer(o,t,a),s.spatialReference)}catch(u){o=null}return o||x.error(`Filter by geodesic buffer (distance) unsupported, failed to project input geometry (${s.spatialReference.wkid}) to WGS84.`),C(o,i)}get spatialRelationship(){return Object(l["k"])(this.filter)?this.filter.spatialRelationship:"intersects"}static checkSupport(e){return e.timeExtent?(x.warn("Filters with a timeExtent are not supported for mesh scene layers"),!1):!!R(e.spatialRelationship)||(x.warn(`Filters with spatialRelationship other than ${_.join(", ")} are not supported for mesh scene layers`),!1)}};function S(){return!!E}async function I(){return S()||(E=await Promise.all([r.e("chunk-2d22cf8c"),r.e("chunk-1900908c")]).then(r.bind(null,"ea51"))),E}Object(i["a"])([Object(p["b"])({type:m["a"]})],F.prototype,"filter",void 0),Object(i["a"])([Object(p["b"])()],F.prototype,"layerFieldsIndex",void 0),Object(i["a"])([Object(p["b"])()],F.prototype,"loadAsyncModule",void 0),Object(i["a"])([Object(p["b"])()],F.prototype,"applyFilters",void 0),Object(i["a"])([Object(p["b"])()],F.prototype,"addSqlFilter",void 0),Object(i["a"])([Object(p["b"])({readOnly:!0})],F.prototype,"sortedObjectIds",null),Object(i["a"])([Object(p["b"])({readOnly:!0})],F.prototype,"parsedWhereClause",null),Object(i["a"])([Object(p["b"])({readOnly:!0})],F.prototype,"parsedGeometry",null),Object(i["a"])([Object(p["b"])({readOnly:!0})],F.prototype,"spatialRelationship",null),Object(i["a"])([Object(p["b"])()],F.prototype,"_projectionEngineLoaded",void 0),Object(i["a"])([Object(p["b"])()],F.prototype,"_geometryEngine",void 0),F=Object(i["a"])([Object(d["a"])("esri.views.3d.layers.i3s.I3SMeshViewFilter")],F);const _=(e=>e)(["contains","intersects","disjoint"]);function R(e){return null!=e&&_.indexOf(e)>=0}var T;function C(e,t){if(Object(l["j"])(e))return null;if("disjoint"===t&&"polygon"===e.type){const t=new Array(e.rings.length);for(let s=0;se.aabr[0]-t.aabr[0]);const r=new Set,i=new a["a"];for(let e=0;e=s.aabr[2])break;r.add(e)}r.forEach(e=>{if(s!==e)if(e.aabr[2]<=s.aabr[0])r.delete(e);else if(E.intersects(s,e)){s.rings=s.rings.concat(e.rings),Object(j["p"])(s.aabr,e.aabr,s.aabr),delete s._geVersion,r.delete(e);const n=Object(a["g"])(t,e,t.length,i);t.splice(n,1)}}),r.add(s)}for(const e of t)delete e.aabr;return t}return[e]}function Q(e,t,r,i){const s=D(e,r);return t.every(e=>P(e,s,i)!==T.DISCARD)}function L(e,t,r,i,s,a,n){const o=a[0].spatialReference||i.spatialReference;if(!Object(h["o"])(t.node.mbs,s,k,o))return void x.warnOnce("SceneLayerView.filter.geometry is using unsupported SpatialReference, skipping geometry filter");const l=D(k,o),c=M(n,i,o,r,t.objectHandle);for(const u of a){if(0===e.length)return;switch(P(u,l,n)){case T.DISCARD:return void(e.length=0);case T.KEEP:continue}Object(v["k"])(e,t.featureIds,e=>V(u,e,c))}}!function(e){e[e.KEEP=0]="KEEP",e[e.DISCARD=1]="DISCARD",e[e.TEST=2]="TEST"}(T||(T={}));const k=[0,0,0,0];function M(e,t,r,i,s){const a=t.renderSpatialReference,n=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 l={indices:null,data:null,stride:0,startIndex:0,endIndex:0};let c,u;switch(e){case"intersects":c=(e,t)=>E.intersects(e,t)?T.KEEP:T.TEST,u=N;break;case"contains":c=(e,t)=>E.contains(e,t)?T.TEST:T.DISCARD,u=N;break;default:c=(e,t)=>E.disjoint(e,t)?T.TEST:T.DISCARD,u=A}return{collection:i,object:s,type:e,maskSR:r,renderSR:a,aabbCache:n,triangle:o,positions:l,triangleTest:c,geometryTest:u}}function D(e,t){const r={x:e[0],y:e[1],hasZ:!1,hasM:!1,type:"point",spatialReference:t},i=!t.isWGS84&&!t.isWebMercator,s=Number.isNaN(e[3])?0:Object(o["f"])(e[3],0,2*f["a"].radius),a=i?E.buffer(r,s,1):E.geodesicBuffer(r,s,1);return a.type="polygon",a}function P(e,t,r){switch(r){case"intersects":case"contains":return N(e,t);case"disjoint":return A(e,t)}}function N(e,t){return E.intersects(e,t)?E.contains(e,t)?T.KEEP:T.TEST:T.DISCARD}function A(e,t){return E.intersects(e,t)?E.contains(e,t)?T.DISCARD:T.TEST:T.KEEP}const q=2**-32;function V(e,t,r){const{collection:i,object:s,renderSR:a,maskSR:n,geometryTest:o,aabbCache:l}=r;let c=l.get(t);if(!c){const e=i.getObjectTransform(s);i.getComponentAabb(s,t,B);const r=[[B[0],B[1],0],[B[0],B[4],0],[B[3],B[4],0],[B[3],B[1],0]];for(let t=0;t<4;++t)Object(b["z"])(r[t],r[t],e.rotationScale),Object(b["h"])(r[t],r[t],e.position),Object(h["y"])(r[t],a,r[t],n);c={rings:[r],hasZ:!1,hasM:!1,type:"polygon",spatialReference:n},c.rings[0][4]=c.rings[0][0],l.set(t,c)}switch(o(e,c)){case T.DISCARD:return!1;case T.KEEP:return!0}const{triangle:u,triangleTest:p,positions:d}=r,y=u.rings[0][0],O=u.rings[0][1],j=u.rings[0][2],f=i.getObjectTransform(s);i.getComponentPositions(s,t,d);const{indices:g,data:m,stride:v,startIndex:w,endIndex:x}=d;for(let E=w;Enull!=e?e:""+t.index}}})],d.prototype,"name",void 0),Object(i["a"])([Object(n["a"])({jpg:"jpg",png:"png",dds:"dds","ktx-etc2":"ktx-etc2",ktx2:"ktx2",basis:"basis"})],d.prototype,"format",void 0),d=Object(i["a"])([Object(o["a"])("esri.layer.support.I3STextureFormat")],d);let b=class extends s["a"]{constructor(){super(...arguments),this.atlas=!1}};Object(i["a"])([Object(a["b"])({type:[d]})],b.prototype,"formats",void 0),Object(i["a"])([Object(a["b"])({type:Boolean})],b.prototype,"atlas",void 0),b=Object(i["a"])([Object(o["a"])("esri.layer.support.I3STextureSetDefinition")],b);let y=class extends s["a"]{};Object(i["a"])([Object(n["a"])({Float32:"Float32",UInt64:"UInt64",UInt32:"UInt32",UInt16:"UInt16",UInt8:"UInt8"})],y.prototype,"type",void 0),Object(i["a"])([Object(a["b"])({type:Number})],y.prototype,"component",void 0),y=Object(i["a"])([Object(o["a"])("esri.layer.support.I3SGeometryAttribute")],y);let h=class extends s["a"]{};Object(i["a"])([Object(n["a"])({draco:"draco"})],h.prototype,"encoding",void 0),Object(i["a"])([Object(a["b"])({type:[String]})],h.prototype,"attributes",void 0),h=Object(i["a"])([Object(o["a"])("esri.layer.support.I3SGeometryCompressedAttributes")],h);let O=class extends s["a"]{constructor(){super(...arguments),this.offset=0}};Object(i["a"])([Object(a["b"])({type:Number})],O.prototype,"offset",void 0),Object(i["a"])([Object(a["b"])({type:y})],O.prototype,"position",void 0),Object(i["a"])([Object(a["b"])({type:y})],O.prototype,"normal",void 0),Object(i["a"])([Object(a["b"])({type:y})],O.prototype,"uv0",void 0),Object(i["a"])([Object(a["b"])({type:y})],O.prototype,"color",void 0),Object(i["a"])([Object(a["b"])({type:y})],O.prototype,"uvRegion",void 0),Object(i["a"])([Object(a["b"])({type:y})],O.prototype,"featureId",void 0),Object(i["a"])([Object(a["b"])({type:y})],O.prototype,"faceRange",void 0),Object(i["a"])([Object(a["b"])({type:h})],O.prototype,"compressedAttributes",void 0),O=Object(i["a"])([Object(o["a"])("esri.layer.support.I3SGeometryBuffer")],O);let j=class extends s["a"]{};Object(i["a"])([Object(n["a"])({triangle:"triangle"})],j.prototype,"topology",void 0),Object(i["a"])([Object(a["b"])()],j.prototype,"geometryBuffers",void 0),j=Object(i["a"])([Object(o["a"])("esri.layer.support.I3SGeometryDefinition")],j)},"6e36":function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));var i=r("2eab"),s=r("ce50"),a=r("b2b2");async function n(e,t,r,n,o,l){let c=null;if(Object(a["k"])(r)){const t=e+"/nodepages/",s=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await Object(i["default"])(s,{query:{f:"json",token:n},responseType:"json",signal:l})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(d){Object(a["k"])(o)&&o.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",s,d),c=d}}if(!t)return null;const u=e+"/nodes/",p=u+(t&&t.split("/").pop());try{return{type:"node",rootNode:(await Object(i["default"])(p,{query:{f:"json",token:n},responseType:"json",signal:l})).data,urlPrefix:u}}catch(d){throw new s["a"]("sceneservice:root-node-missing","Root node missing.",{pageError:c,nodeError:d,url:p})}}},"7eab":function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));const i={attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1},data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1},query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},"8ea5":function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var i=r("b2b2"),s=r("4261"),a=r("d97e"),n=r("8152"),o=r("ee9c");class l{constructor(e){this.objectIdField=e.objectIdField,this.getFeatureExtent=e.getFeatureExtent}getObjectId(e){return e.id}getAttributes(e){const{meta:t,index:r}=e,s={};this.objectIdField&&(s[this.objectIdField]=e.id);const a=Object(i["k"])(t.attributeInfo)&&t.attributeInfo.attributeData;if(Object(i["k"])(a))for(const i of Object.keys(a))s[i]=Object(o["o"])(a[i],r);return s}getAttribute(e,t){if(t===this.objectIdField)return e.id;const{meta:r,index:s}=e,a=Object(i["k"])(r.attributeInfo)&&r.attributeInfo.attributeData;return Object(i["k"])(a)?Object(o["o"])(a[t],s):null}getGeometry(e){if(e.geometry)return e.geometry;const[t,r,i,s,a]=this.getFeatureExtent(e,c);return new n["a"]([5],[t,r,i,s,r,i,s,a,i,t,a,i,t,r,i])}getCentroid(e,t){if(e.geometry)return Object(a["a"])(new n["a"],e.geometry,t.hasZ,t.hasM);const[r,i,s,o,l,u]=this.getFeatureExtent(e,c);return new n["a"]([0],[(r+o)/2,(i+l)/2,(s+u)/2])}cloneWithGeometry(e,t){const{id:r,index:i,meta:s}=e;return{id:r,index:i,meta:s,geometry:t}}}const c=Object(s["h"])()},ad73:function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return a}));var i=r("b2b2"),s=r("c1da");async function a(e,t=e.popupTemplate){if(!Object(i["k"])(t))return[];const r=await t.getRequiredFields(e.fieldsIndex),{lastEditInfoEnabled:a}=t,{objectIdField:n,typeIdField:o,globalIdField:l,relationships:c}=e;if(r.includes("*"))return["*"];const u=a?await Object(s["n"])(e):[],p=Object(s["j"])(e.fieldsIndex,[...r,...u]);return o&&p.push(o),p&&n&&e.fieldsIndex.has(n)&&-1===p.indexOf(n)&&p.push(n),p&&l&&e.fieldsIndex.has(l)&&-1===p.indexOf(l)&&p.push(l),c&&c.forEach(t=>{const{keyField:r}=t;p&&r&&e.fieldsIndex.has(r)&&-1===p.indexOf(r)&&p.push(r)}),p}function n(e,t){return e.popupTemplate?e.popupTemplate:Object(i["k"])(t)&&t.defaultPopupTemplateEnabled&&Object(i["k"])(e.defaultPopupTemplate)?e.defaultPopupTemplate:null}},e814:function(e,t,r){"use strict";r.d(t,"a",(function(){return L}));var i=r("a4ee"),s=r("4856"),a=(r("b423"),r("261a"),r("b48d"),r("478c"),r("667b"),r("ff57"),r("da00"),r("f976"),r("5cdb")),n=r("2eab"),o=r("ce50"),l=r("fa8a"),c=r("6d5f"),u=r("e92d"),p=r("b2b2"),d=r("fab3"),b=r("59b2"),y=(r("b50f"),r("c120"),r("cea0"),r("448d")),h=r("afcf"),O=r("d386"),j=r("3af1"),f=r("5996"),g=r("5bd5"),m=r("2e4d"),v=r("7eab"),w=r("22f4"),x=r("2feb"),E=r("80b7"),F=r("6e36"),S=r("5d34"),I=r("69dd"),_=r("f51b"),R=r("fd14");const T=u["a"].getLogger("esri.layers.buildingSublayers.BuildingComponentSublayer"),C=Object(x["a"])();let Q=class extends(c["a"].LoadableMixin(Object(d["b"])(m["a"]))){constructor(e){super(e),this.type="building-component",this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.fields=null,this.associatedLayer=null,this.outFields=null,this.listMode="show",this.renderer=null,this.definitionExpression=null,this.popupEnabled=!0,this.popupTemplate=null,this.layerType="3d-object"}get parsedUrl(){return this.layer?{path:`${this.layer.parsedUrl.path}/sublayers/${this.id}`,query:this.layer.parsedUrl.query}:null}get fieldsIndex(){return new E["a"](this.fields)}readAssociatedLayer(e,t){const r=this.layer.associatedFeatureServiceItem,i=t.associatedLayerID;return Object(p["k"])(r)&&"number"==typeof i?new g["default"]({portalItem:r,layerId:i}):null}get objectIdField(){if(null!=this.fields)for(const e of this.fields)if("oid"===e.type)return e.name;return null}get displayField(){return Object(p["k"])(this.associatedLayer)?this.associatedLayer.displayField:null}get apiKey(){return this.layer.apiKey}get fullExtent(){return this.layer.fullExtent}get spatialReference(){return this.layer.spatialReference}get version(){return this.layer.version}get elevationInfo(){return this.layer.elevationInfo}get minScale(){return this.layer.minScale}get maxScale(){return this.layer.maxScale}get effectiveScaleRange(){return this.layer.effectiveScaleRange}get defaultPopupTemplate(){return this.createPopupTemplate()}load(e){const t=Object(p["k"])(e)?e.signal:null,r=this._fetchService(t).then(()=>{this.indexInfo=Object(F["a"])(this.parsedUrl.path,this.rootNode,this.nodePages,this.apiKey,T,t)});return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){return Object(_["a"])(this,e)}async _fetchService(e){const t=(await Object(n["default"])(this.parsedUrl.path,{query:{f:"json",token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){var r,i,s,a;const n=null==(r=this.getFeatureType(null==t?void 0:t.feature))||null==(i=r.domains)?void 0:i[e];return n&&"inherited"!==n.type?n:null!=(s=null==(a=this.getField(e))?void 0:a.domain)?s:null}getFeatureType(e){return e&&Object(p["k"])(this.associatedLayer)?this.associatedLayer.getFeatureType(e):null}get types(){return Object(p["k"])(this.associatedLayer)?this.associatedLayer.types:[]}get typeIdField(){return Object(p["k"])(this.associatedLayer)?this.associatedLayer.typeIdField:null}get geometryType(){return"3d-object"===this.layerType?"mesh":"point"}get profile(){return"3d-object"===this.layerType?"mesh-pyramids":"points"}get capabilities(){const e=Object(p["k"])(this.associatedLayer)&&this.associatedLayer.capabilities?this.associatedLayer.capabilities:v["a"],{query:t,data:{supportsZ:r,supportsM:i,isVersioned:s}}=e;return{query:t,data:{supportsZ:r,supportsM:i,isVersioned:s}}}createQuery(){const e=new I["a"];return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryFeatures(e||this.createQuery(),t)).then(e=>{if(null!=e&&e.features)for(const t of e.features)t.layer=this.layer,t.sourceLayer=this;return e})}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(r=>r.queryObjectIds(e||this.createQuery(),t))}getFieldUsageInfo(e){return this.fieldsIndex.has(e)?{supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1}:{supportsLabelingInfo:!1,supportsRenderer:!0,supportsPopupTemplate:!0,supportsLayerQuery:Object(p["k"])(this.associatedLayer)}}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return Object(p["k"])(e)&&e.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),Object(p["j"])(this.associatedLayer))throw new o["a"]("buildingscenelayer:query-not-available","BuildingSceneLayer component layer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new o["a"]("buildingscenelayer:query-not-available","BuildingSceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}};Object(i["a"])([Object(b["b"])({readOnly:!0})],Q.prototype,"parsedUrl",null),Object(i["a"])([Object(b["b"])({type:S["c"],readOnly:!0})],Q.prototype,"nodePages",void 0),Object(i["a"])([Object(b["b"])({type:[S["b"]],readOnly:!0})],Q.prototype,"materialDefinitions",void 0),Object(i["a"])([Object(b["b"])({type:[S["d"]],readOnly:!0})],Q.prototype,"textureSetDefinitions",void 0),Object(i["a"])([Object(b["b"])({type:[S["a"]],readOnly:!0})],Q.prototype,"geometryDefinitions",void 0),Object(i["a"])([Object(b["b"])({readOnly:!0})],Q.prototype,"serviceUpdateTimeStamp",void 0),Object(i["a"])([Object(b["b"])({readOnly:!0})],Q.prototype,"store",void 0),Object(i["a"])([Object(b["b"])({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],Q.prototype,"rootNode",void 0),Object(i["a"])([Object(b["b"])({readOnly:!0})],Q.prototype,"attributeStorageInfo",void 0),Object(i["a"])([Object(b["b"])(C.fields)],Q.prototype,"fields",void 0),Object(i["a"])([Object(b["b"])({readOnly:!0})],Q.prototype,"fieldsIndex",null),Object(i["a"])([Object(b["b"])({readOnly:!0,type:g["default"]})],Q.prototype,"associatedLayer",void 0),Object(i["a"])([Object(h["a"])("service","associatedLayer",["associatedLayerID"])],Q.prototype,"readAssociatedLayer",null),Object(i["a"])([Object(b["b"])(C.outFields)],Q.prototype,"outFields",void 0),Object(i["a"])([Object(b["b"])({type:String,readOnly:!0})],Q.prototype,"objectIdField",null),Object(i["a"])([Object(b["b"])({readOnly:!0,type:String,json:{read:!1}})],Q.prototype,"displayField",null),Object(i["a"])([Object(b["b"])({readOnly:!0,type:String})],Q.prototype,"apiKey",null),Object(i["a"])([Object(b["b"])({readOnly:!0,type:j["a"]})],Q.prototype,"fullExtent",null),Object(i["a"])([Object(b["b"])({readOnly:!0,type:f["a"]})],Q.prototype,"spatialReference",null),Object(i["a"])([Object(b["b"])({readOnly:!0})],Q.prototype,"version",null),Object(i["a"])([Object(b["b"])({readOnly:!0,type:R["a"]})],Q.prototype,"elevationInfo",null),Object(i["a"])([Object(b["b"])({readOnly:!0,type:Number})],Q.prototype,"minScale",null),Object(i["a"])([Object(b["b"])({readOnly:!0,type:Number})],Q.prototype,"maxScale",null),Object(i["a"])([Object(b["b"])({readOnly:!0,type:Number})],Q.prototype,"effectiveScaleRange",null),Object(i["a"])([Object(b["b"])({type:["hide","show"],json:{write:!0}})],Q.prototype,"listMode",void 0),Object(i["a"])([Object(b["b"])({types:a["b"],json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Q.prototype,"renderer",void 0),Object(i["a"])([Object(b["b"])({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Q.prototype,"definitionExpression",void 0),Object(i["a"])([Object(b["b"])(w["j"])],Q.prototype,"popupEnabled",void 0),Object(i["a"])([Object(b["b"])({type:s["a"],json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],Q.prototype,"popupTemplate",void 0),Object(i["a"])([Object(b["b"])({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Q.prototype,"normalReferenceFrame",void 0),Object(i["a"])([Object(b["b"])({readOnly:!0,json:{read:!1}})],Q.prototype,"defaultPopupTemplate",null),Object(i["a"])([Object(b["b"])()],Q.prototype,"types",null),Object(i["a"])([Object(b["b"])()],Q.prototype,"typeIdField",null),Object(i["a"])([Object(b["b"])({json:{write:!1}}),Object(y["a"])(new l["a"]({"3DObject":"3d-object",Point:"point"}))],Q.prototype,"layerType",void 0),Object(i["a"])([Object(b["b"])()],Q.prototype,"geometryType",null),Object(i["a"])([Object(b["b"])()],Q.prototype,"profile",null),Object(i["a"])([Object(b["b"])({readOnly:!0,json:{read:!1}})],Q.prototype,"capabilities",null),Q=Object(i["a"])([Object(O["a"])("esri.layers.buildingSublayers.BuildingComponentSublayer")],Q);const L=Q}}]); //# sourceMappingURL=chunk-6dc0d0fd.3ecb10d5.js.map