@arcgis/core 4.34.0-next.80 → 4.34.0-next.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.d.ts +4 -0
  2. package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.js +5 -0
  3. package/analysis/VolumeMeasurement/VolumeMeasurementInputUnits.d.ts +4 -0
  4. package/analysis/VolumeMeasurement/VolumeMeasurementInputUnits.js +5 -0
  5. package/analysis/VolumeMeasurementAnalysis.js +1 -1
  6. package/assets/esri/core/workers/RemoteClient.js +1 -1
  7. package/assets/esri/core/workers/chunks/{c90571063bd2bb57a5a7.js → 1d491447b13f2f2b4399.js} +1 -1
  8. package/assets/esri/core/workers/chunks/264a9a916e1e972b69d7.js +1 -0
  9. package/assets/esri/core/workers/chunks/30c85a1a4f118cc45a25.js +1 -0
  10. package/assets/esri/core/workers/chunks/3192b68675ff2afcb1d6.js +1 -0
  11. package/assets/esri/core/workers/chunks/365d63c2aed3a49918f2.js +1 -0
  12. package/assets/esri/core/workers/chunks/3ef8a7468d7e3b2f0b69.js +351 -0
  13. package/assets/esri/core/workers/chunks/{ede479faa4e6920fe673.js → a99752aec4602b5eeeaf.js} +6 -6
  14. package/assets/esri/core/workers/chunks/{b815c2f61fb9c58a2956.js → b6c4712e00fce87bd0f4.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{22bd4255b6b511a43b66.js → c2bc70b65f5c2a2c9671.js} +1 -1
  16. package/assets/esri/core/workers/chunks/cc579c94438f48a0dbab.js +1 -0
  17. package/assets/esri/core/workers/chunks/f6513ec888a7d927d948.js +1 -0
  18. package/assets/esri/core/workers/chunks/{23a13fbab9984953a7c6.js → fc06014fb484fc8c697e.js} +1 -1
  19. package/assets/esri/libs/dracoMeshDecoder/draco_mesh_decoder.wasm +0 -0
  20. package/chunks/GaussianSplat.glsl.js +2 -2
  21. package/chunks/HUDMaterial.glsl.js +4 -6
  22. package/chunks/draco_mesh_decoder.js +5 -0
  23. package/config.js +1 -1
  24. package/core/unitUtils.js +1 -1
  25. package/interfaces.d.ts +116 -12
  26. package/kernel.js +1 -1
  27. package/layers/CSVLayer.js +1 -1
  28. package/layers/FeatureLayer.js +1 -1
  29. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  30. package/layers/OrientedImageryLayer.js +1 -1
  31. package/layers/support/FieldConfiguration.js +1 -1
  32. package/libs/dracoMeshDecoder/dracoMeshDecoder.js +5 -0
  33. package/package.json +1 -1
  34. package/portal/schemas/definitions.js +1 -1
  35. package/rest/featureService/FeatureService.js +1 -1
  36. package/support/revision.js +1 -1
  37. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  38. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  39. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  40. package/views/3d/glTF/internal/Resource.js +1 -1
  41. package/views/3d/glTF/loader.js +1 -1
  42. package/views/3d/layers/FlowSubView3D.js +1 -1
  43. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  44. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
  45. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
  46. package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
  47. package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
  48. package/views/3d/layers/graphics/pipeline/rendering/RenderCommandContext.js +1 -1
  49. package/views/3d/layers/graphics/pipeline/symbolization/IconSymbolLayerRenderer.js +1 -1
  50. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  51. package/views/3d/support/buffer/InterleavedLayout.js +1 -1
  52. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  53. package/views/3d/support/flow/constants.js +1 -1
  54. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  55. package/views/3d/support/gaussianSplatting/GaussianSplatQualitySettings.js +5 -0
  56. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  57. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  58. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  59. package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
  60. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  61. package/views/3d/webgl-engine/materials/HUDMaterialBaseInstance.js +5 -0
  62. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  63. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
  64. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  65. package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +1 -1
  66. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  67. package/views/webgl/VertexArrayObject.js +1 -1
  68. package/widgets/Attribution/AttributionViewModel.js +1 -1
  69. package/widgets/Feature/FeatureMedia/FeatureMediaViewModel.js +1 -1
  70. package/widgets/Legend/LegendViewModel.js +1 -1
  71. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  72. package/assets/esri/core/workers/chunks/49486c2e12e768b347ed.js +0 -1
  73. package/assets/esri/core/workers/chunks/66e0bc4acb18f00a433d.js +0 -1
  74. package/assets/esri/core/workers/chunks/76db75337044de8218c9.js +0 -353
  75. package/assets/esri/core/workers/chunks/978fab0f0b10edde4ff8.js +0 -1
  76. package/assets/esri/core/workers/chunks/a07321a901d6847d1a6b.js +0 -1
  77. package/assets/esri/core/workers/chunks/ae8dce1a43ca7019f81d.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9738],{24045:(e,t,r)=>{function o(e,t){const r=e.count;t||(t=new e.TypedArrayConstructor(r));for(let o=0;o<r;o++)t[o]=e.get(o);return t}r.d(t,{m:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,makeDense:o},Symbol.toStringTag,{value:"Module"}))},99738:(e,t,r)=>{r.d(t,{loadGLTF:()=>G});var o=r(53966),n=r(93637),s=r(9093),a=r(49186),i=r(91869),u=r(74887),l=r(84952),c=r(46140),f=r(58083),d=r(67026),p=r(82534),m=r(13030),h=r(24045);r(44208);class T{constructor(e){this._data=e,this._offset4=0,this._dataUint32=new Uint32Array(this._data,0,Math.floor(this._data.byteLength/4))}readUint32(){const e=this._offset4;return this._offset4+=1,this._dataUint32[e]}readUint8Array(e){const t=4*this._offset4;return this._offset4+=e/4,new Uint8Array(this._data,t,e)}remainingBytes(){return this._data.byteLength-4*this._offset4}}var w=r(21818);const g={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1},x={pbrMetallicRoughness:g,emissiveFactor:[0,0,0],alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1},b={ESRI_externalColorMixMode:"tint",ESRI_receiveShadows:!0,ESRI_receiveAmbientOcclusion:!0},y=(e={})=>{const t={...g,...e.pbrMetallicRoughness},r=function(e){switch(e.ESRI_externalColorMixMode){case"multiply":case"tint":case"ignore":case"replace":break;default:(0,w.Xb)(e.ESRI_externalColorMixMode),e.ESRI_externalColorMixMode="tint"}return e}({...b,...e.extras});return{...x,...e,pbrMetallicRoughness:t,extras:r}},_={magFilter:9729,minFilter:9987,wrapS:10497,wrapT:10497},S=e=>({..._,...e});var A=r(51530),O=r(63907);const v=1179937895;class R{constructor(e,t,r,o){if(this._context=e,this.uri=t,this.json=r,this._glbBuffer=o,this._bufferLoaders=new Map,this._textureLoaders=new Map,this._textureCache=new Map,this._materialCache=new Map,this._nodeParentMap=new Map,this._nodeTransformCache=new Map,this._supportedExtensions=["KHR_texture_basisu","KHR_texture_transform"],this._baseUri=function(e){let t,r;return e.replace(/^(.*\/)?([^/]*)$/,(e,o,n)=>(t=o||"",r=n||"","")),{dirPart:t,filePart:r}}(this.uri).dirPart,this._checkVersionSupported(),this._checkRequiredExtensionsSupported(),null==r.scenes)throw new a.A("gltf-loader-unsupported-feature","Scenes must be defined.");if(null==r.meshes)throw new a.A("gltf-loader-unsupported-feature","Meshes must be defined");if(null==r.nodes)throw new a.A("gltf-loader-unsupported-feature","Nodes must be defined.");this._computeNodeParents()}static async load(e,t,r){if((0,l.DB)(t)){const r=(0,l.r$)(t);if(r&&"model/gltf-binary"!==r.mediaType)try{const o=JSON.parse(r.isBase64?atob(r.data):r.data);return new R(e,t,o)}catch{}const o=(0,l.lJ)(t);if(R._isGLBData(o))return this._fromGLBData(e,t,o)}if(U.test(t)||"gltf"===r?.expectedType){const o=await e.loadJSON(t,r);return new R(e,t,o)}const o=await e.loadBinary(t,r);if(R._isGLBData(o))return this._fromGLBData(e,t,o);if(D.test(t)||"glb"===r?.expectedType)throw new a.A("gltf-loader-invalid-glb","This is not a valid glb file.");const n=await e.loadJSON(t,r);return new R(e,t,n)}static _isGLBData(e){if(null==e)return!1;const t=new T(e);return t.remainingBytes()>=4&&t.readUint32()===v}static async _fromGLBData(e,t,r){const o=await R._parseGLBData(r);return new R(e,t,o.json,o.binaryData)}static async _parseGLBData(e){const t=new T(e);if(t.remainingBytes()<12)throw new a.A("gltf-loader-error","glb binary data is insufficiently large.");const r=t.readUint32(),n=t.readUint32(),s=t.readUint32();if(r!==v)throw new a.A("gltf-loader-error","Magic first 4 bytes do not fit to expected glb value.");if(e.byteLength<s)throw new a.A("gltf-loader-error","glb binary data is smaller than header specifies.");if(2!==n)throw new a.A("gltf-loader-unsupported-feature","An unsupported glb container version was detected. Only version 2 is supported.");let i,u,l=0;for(;t.remainingBytes()>=8;){const e=t.readUint32(),r=t.readUint32();if(0===l){if(1313821514!==r)throw new a.A("gltf-loader-error","First glb chunk must be JSON.");if(e<0)throw new a.A("gltf-loader-error","No JSON data found.");i=await(0,A.KB)(t.readUint8Array(e))}else if(1===l){if(5130562!==r)throw new a.A("gltf-loader-unsupported-feature","Second glb chunk expected to be BIN.");u=t.readUint8Array(e)}else o.A.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] More than 2 glb chunks detected. Skipping.");l+=1}if(!i)throw new a.A("gltf-loader-error","No glb JSON chunk detected.");return{json:i,binaryData:u}}async getBuffer(e,t){const r=this.json.buffers[e];if(null==r.uri){if(null==this._glbBuffer)throw new a.A("gltf-loader-error","glb buffer not present");return this._glbBuffer}const o=await this._getBufferLoader(e,t);if(o.byteLength!==r.byteLength)throw new a.A("gltf-loader-error","Buffer byte lengths should match.");return o}async _getBufferLoader(e,t){const r=this._bufferLoaders.get(e);if(r)return r;const o=this.json.buffers[e].uri,n=this._context.loadBinary(this._resolveUri(o),t).then(e=>new Uint8Array(e));return this._bufferLoaders.set(e,n),n}async getAccessor(e,t){if(!this.json.accessors)throw new a.A("gltf-loader-unsupported-feature","Accessors missing.");const r=this.json.accessors[e];if(null==r?.bufferView)throw new a.A("gltf-loader-unsupported-feature","Some accessor does not specify a bufferView.");if(r.type in["MAT2","MAT3","MAT4"])throw new a.A("gltf-loader-unsupported-feature",`AttributeType ${r.type} is not supported`);const o=this.json.bufferViews[r.bufferView],n=await this.getBuffer(o.buffer,t),s=I[r.type],i=L[r.componentType],u=s*i,l=o.byteStride||u;return{raw:n.buffer,byteStride:l,byteOffset:n.byteOffset+(o.byteOffset||0)+(r.byteOffset||0),entryCount:r.count,isDenselyPacked:l===u,componentCount:s,componentByteSize:i,componentType:r.componentType,min:r.min,max:r.max,normalized:!!r.normalized}}async getIndexData(e,t){if(null==e.indices)return;const r=await this.getAccessor(e.indices,t);if(r.isDenselyPacked)switch(r.componentType){case O.pe.UNSIGNED_BYTE:return new Uint8Array(r.raw,r.byteOffset,r.entryCount);case O.pe.UNSIGNED_SHORT:return new Uint16Array(r.raw,r.byteOffset,r.entryCount);case O.pe.UNSIGNED_INT:return new Uint32Array(r.raw,r.byteOffset,r.entryCount)}else switch(r.componentType){case O.pe.UNSIGNED_BYTE:return(0,h.m)(M(m.SL,r));case O.pe.UNSIGNED_SHORT:return(0,h.m)(M(m.h,r));case O.pe.UNSIGNED_INT:return(0,h.m)(M(m.P,r))}}async getPositionData(e,t){if(null==e.attributes.POSITION)throw new a.A("gltf-loader-unsupported-feature","No POSITION vertex data found.");const r=await this.getAccessor(e.attributes.POSITION,t);if(r.componentType!==O.pe.FLOAT)throw new a.A("gltf-loader-unsupported-feature","Expected type FLOAT for POSITION vertex attribute, but found "+(0,n.i7)(O.pe,r.componentType));if(3!==r.componentCount)throw new a.A("gltf-loader-unsupported-feature","POSITION vertex attribute must have 3 components, but found "+r.componentCount.toFixed());return M(m.xs,r)}async getNormalData(e,t){if(null==e.attributes.NORMAL)throw new a.A("gltf-loader-error","No NORMAL vertex data found.");const r=await this.getAccessor(e.attributes.NORMAL,t);if(r.componentType!==O.pe.FLOAT)throw new a.A("gltf-loader-unsupported-feature","Expected type FLOAT for NORMAL vertex attribute, but found "+(0,n.i7)(O.pe,r.componentType));if(3!==r.componentCount)throw new a.A("gltf-loader-unsupported-feature","NORMAL vertex attribute must have 3 components, but found "+r.componentCount.toFixed());return M(m.xs,r)}async getTangentData(e,t){if(null==e.attributes.TANGENT)throw new a.A("gltf-loader-error","No TANGENT vertex data found.");const r=await this.getAccessor(e.attributes.TANGENT,t);if(r.componentType!==O.pe.FLOAT)throw new a.A("gltf-loader-unsupported-feature","Expected type FLOAT for TANGENT vertex attribute, but found "+(0,n.i7)(O.pe,r.componentType));if(4!==r.componentCount)throw new a.A("gltf-loader-unsupported-feature","TANGENT vertex attribute must have 4 components, but found "+r.componentCount.toFixed());return M(m.Eq,r)}async getTextureCoordinates(e,t){if(null==e.attributes.TEXCOORD_0)throw new a.A("gltf-loader-error","No TEXCOORD_0 vertex data found.");const r=await this.getAccessor(e.attributes.TEXCOORD_0,t);if(2!==r.componentCount)throw new a.A("gltf-loader-unsupported-feature","TEXCOORD_0 vertex attribute must have 2 components, but found "+r.componentCount.toFixed());if(r.componentType===O.pe.FLOAT)return M(m.gH,r);if(!r.normalized)throw new a.A("gltf-loader-unsupported-feature","Integer component types are only supported for a normalized accessor for TEXCOORD_0.");return function(e){switch(e.componentType){case O.pe.BYTE:return new m.D6(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case O.pe.UNSIGNED_BYTE:return new m.LC(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case O.pe.SHORT:return new m.mJ(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case O.pe.UNSIGNED_SHORT:return new m.Yi(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case O.pe.UNSIGNED_INT:return new m.An(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case O.pe.FLOAT:return new m.gH(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount)}}(r)}async getVertexColors(e,t){if(null==e.attributes.COLOR_0)throw new a.A("gltf-loader-error","No COLOR_0 vertex data found.");const r=await this.getAccessor(e.attributes.COLOR_0,t);if(4!==r.componentCount&&3!==r.componentCount)throw new a.A("gltf-loader-unsupported-feature","COLOR_0 attribute must have 3 or 4 components, but found "+r.componentCount.toFixed());if(4===r.componentCount){if(r.componentType===O.pe.FLOAT)return M(m.Eq,r);if(r.componentType===O.pe.UNSIGNED_BYTE)return M(m.XP,r);if(r.componentType===O.pe.UNSIGNED_SHORT)return M(m.Uz,r)}else if(3===r.componentCount){if(r.componentType===O.pe.FLOAT)return M(m.xs,r);if(r.componentType===O.pe.UNSIGNED_BYTE)return M(m.eI,r);if(r.componentType===O.pe.UNSIGNED_SHORT)return M(m.nS,r)}throw new a.A("gltf-loader-unsupported-feature","Unsupported component type for COLOR_0 attribute: "+(0,n.i7)(O.pe,r.componentType))}hasPositions(e){return void 0!==e.attributes.POSITION}hasNormals(e){return void 0!==e.attributes.NORMAL}hasVertexColors(e){return void 0!==e.attributes.COLOR_0}hasTextureCoordinates(e){return void 0!==e.attributes.TEXCOORD_0}hasTangents(e){return void 0!==e.attributes.TANGENT}async getMaterial(e,t,r){let o=e.material?this._materialCache.get(e.material):void 0;if(!o){const n=null!=e.material?y(this.json.materials[e.material]):y(),s=n.pbrMetallicRoughness,a=this.hasVertexColors(e),i=this.getTexture(s.baseColorTexture,t),u=this.getTexture(n.normalTexture,t),l=r?this.getTexture(n.occlusionTexture,t):void 0,c=r?this.getTexture(n.emissiveTexture,t):void 0,f=r?this.getTexture(s.metallicRoughnessTexture,t):void 0,d=null!=e.material?e.material:-1;o={alphaMode:n.alphaMode,alphaCutoff:n.alphaCutoff,color:s.baseColorFactor,doubleSided:!!n.doubleSided,colorTexture:await i,normalTexture:await u,name:n.name,id:d,occlusionTexture:await l,emissiveTexture:await c,emissiveFactor:n.emissiveFactor,metallicFactor:s.metallicFactor,roughnessFactor:s.roughnessFactor,metallicRoughnessTexture:await f,hasVertexColors:a,ESRI_externalColorMixMode:n.extras.ESRI_externalColorMixMode,colorTextureTransform:s?.baseColorTexture?.extensions?.KHR_texture_transform,normalTextureTransform:n.normalTexture?.extensions?.KHR_texture_transform,occlusionTextureTransform:n.occlusionTexture?.extensions?.KHR_texture_transform,emissiveTextureTransform:n.emissiveTexture?.extensions?.KHR_texture_transform,metallicRoughnessTextureTransform:s?.metallicRoughnessTexture?.extensions?.KHR_texture_transform,receiveAmbientOcclusion:n.extras.ESRI_receiveAmbientOcclusion,receiveShadows:n.extras.ESRI_receiveShadows}}return o}async getTexture(e,t){if(!e)return;if(0!==(e.texCoord||0))throw new a.A("gltf-loader-unsupported-feature","Only TEXCOORD with index 0 is supported.");const r=e.index,o=this.json.textures[r],n=S(null!=o.sampler?this.json.samplers[o.sampler]:{}),s=F(o),u=this.json.images[s],l=await this._loadTextureImageData(r,o,t);return(0,i.tE)(this._textureCache,r,()=>{const e=e=>33071===e||33648===e||10497===e,t=e=>{throw new a.A("gltf-loader-error",`Unexpected TextureSampler WrapMode: ${e}`)};return{data:l,wrapS:e(n.wrapS)?n.wrapS:t(n.wrapS),wrapT:e(n.wrapT)?n.wrapT:t(n.wrapT),minFilter:n.minFilter,name:u.name,id:r}})}getNodeTransform(e){if(void 0===e)return N;let t=this._nodeTransformCache.get(e);if(!t){const r=this.getNodeTransform(this._getNodeParent(e)),o=this.json.nodes[e];o.matrix?t=(0,f.lw)((0,s.vt)(),r,o.matrix):o.translation||o.rotation||o.scale?(t=(0,s.o8)(r),o.translation&&(0,f.Tl)(t,t,o.translation),o.rotation&&(E[3]=(0,d.Xd)(E,o.rotation),(0,f.e$)(t,t,E[3],E)),o.scale&&(0,f.hs)(t,t,o.scale)):t=(0,s.o8)(r),this._nodeTransformCache.set(e,t)}return t}_resolveUri(e){return(0,l.s2)(e,this._baseUri)}_getNodeParent(e){return this._nodeParentMap.get(e)}_checkVersionSupported(){const e=c.R.parse(this.json.asset.version,"glTF");C.validate(e)}_checkRequiredExtensionsSupported(){const e=this.json;if(e.extensionsRequired&&!e.extensionsRequired.every(e=>this._supportedExtensions.includes(e)))throw new a.A("gltf-loader-unsupported-feature","gltf loader was not able to load unsupported feature. Required extensions: "+e.extensionsRequired.join(", "))}_computeNodeParents(){this.json.nodes.forEach((e,t)=>{e.children&&e.children.forEach(e=>{this._nodeParentMap.set(e,t)})})}async _loadTextureImageData(e,t,r){const o=this._textureLoaders.get(e);if(o)return o;const n=this._createTextureLoader(t,r);return this._textureLoaders.set(e,n),n}async _createTextureLoader(e,t){const r=F(e),o=this.json.images[r];if(o.uri){if(o.uri.endsWith(".ktx2")){const e=await this._context.loadBinary(this._resolveUri(o.uri),t);return new A.Xi(new Uint8Array(e))}return this._context.loadImage(this._resolveUri(o.uri),t)}if(null==o.bufferView)throw new a.A("gltf-loader-unsupported-feature","Image bufferView must be defined.");if(null==o.mimeType)throw new a.A("gltf-loader-unsupported-feature","Image mimeType must be defined.");const n=this.json.bufferViews[o.bufferView],s=await this.getBuffer(n.buffer,t);if(null!=n.byteStride)throw new a.A("gltf-loader-unsupported-feature","byteStride not supported for image buffer");const i=s.byteOffset+(n.byteOffset||0);return(0,A.pn)(new Uint8Array(s.buffer,i,n.byteLength),o.mimeType)}async getLoadedBuffersSize(){if(this._glbBuffer)return this._glbBuffer.byteLength;const e=await(0,u.nA)(Array.from(this._bufferLoaders.values())),t=await(0,u.nA)(Array.from(this._textureLoaders.values()));return e.reduce((e,t)=>e+(t?.byteLength??0),0)+t.reduce((e,t)=>e+(t?(0,A.x3)(t)?t.data.byteLength:t.width*t.height*4:0),0)}}const N=(0,f.hM)((0,s.vt)(),Math.PI/2),C=new c.R(2,0,"glTF"),E=(0,p.vt)(),I={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},L={[O.pe.BYTE]:1,[O.pe.UNSIGNED_BYTE]:1,[O.pe.SHORT]:2,[O.pe.UNSIGNED_SHORT]:2,[O.pe.HALF_FLOAT]:2,[O.pe.FLOAT]:4,[O.pe.INT]:4,[O.pe.UNSIGNED_INT]:4};function M(e,t){return new e(t.raw,t.byteOffset,t.byteStride,t.byteOffset+t.byteStride*(t.entryCount-1)+t.componentByteSize*t.componentCount)}function F(e){if(null!=e.extensions?.KHR_texture_basisu)return e.extensions.KHR_texture_basisu.source;if(null!==e.source)return e.source;throw new a.A("gltf-loader-unsupported-feature","Source is expected to be defined for a texture. It can also be omitted in favour of an KHR_texture_basisu extension tag.")}const U=/\.gltf$/i,D=/\.glb$/i;let B=0;async function G(e,t,r={},a=!0){const i=await R.load(e,t,r),u="gltf_"+B++,l={lods:[],materials:new Map,textures:new Map,meta:P(i)},c=!(!i.json.asset.extras||"symbolResource"!==i.json.asset.extras.ESRI_type),f=i.json.asset.extras?.ESRI_webstyleSymbol?.webstyle,d=new Map;await j(i,async(e,t,c,f)=>{const p=d.get(c)??0;d.set(c,p+1);const m=void 0!==e.mode?e.mode:O.WR.TRIANGLES,h=m===O.WR.TRIANGLES||m===O.WR.TRIANGLE_STRIP||m===O.WR.TRIANGLE_FAN?m:null;if(null==h)return void o.A.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Unsupported primitive mode ("+(0,n.i7)(O.WR,m)+"). Skipping primitive.");if(!i.hasPositions(e))return void o.A.getLogger("esri.views.3d.glTF").warn("Skipping primitive without POSITION vertex attribute.");const T=i.getPositionData(e,r),w=i.getMaterial(e,r,a),g=i.hasNormals(e)?i.getNormalData(e,r):null,x=i.hasTangents(e)?i.getTangentData(e,r):null,b=i.hasTextureCoordinates(e)?i.getTextureCoordinates(e,r):null,y=i.hasVertexColors(e)?i.getVertexColors(e,r):null,_=i.getIndexData(e,r),S={name:f,transform:(0,s.o8)(t),attributes:{position:await T,normal:g?await g:null,texCoord0:b?await b:null,color:y?await y:null,tangent:x?await x:null},indices:await _,primitiveType:h,material:H(l,await w,u)};let A=null;null!=l.meta?.ESRI_lod&&"screenSpaceRadius"===l.meta.ESRI_lod.metric&&(A=l.meta.ESRI_lod.thresholds[c]),l.lods[c]=l.lods[c]||{parts:[],name:f,lodThreshold:A},l.lods[c].parts[p]=S});for(const e of l.lods)e.parts=e.parts.filter(e=>!!e);const p=await i.getLoadedBuffersSize();return{model:l,meta:{isEsriSymbolResource:c,uri:i.uri,ESRI_webstyle:f},customMeta:{},usedMemory:p}}function P(e){const t=e.json;let r=null;return t.nodes.forEach(e=>{const t=e.extras;null!=t&&(t.ESRI_proxyEllipsoid||t.ESRI_lod)&&(r=t)}),r}async function j(e,t){const r=e.json,n=r.scenes[r.scene||0].nodes,s=n.length>1,a=[];for(const e of n){const t=r.nodes[e];a.push(i(e,0)),k(t)&&!s&&t.extensions.MSFT_lod.ids.forEach((e,t)=>i(e,t+1))}async function i(n,s){const u=r.nodes[n],l=e.getNodeTransform(n);if(null!=u.weights&&o.A.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Morph targets are not supported."),null!=u.mesh){const e=r.meshes[u.mesh];for(const r of e.primitives)a.push(t(r,l,s,e.name))}for(const e of u.children||[])a.push(i(e,s))}await Promise.all(a)}function k(e){return e.extensions?.MSFT_lod&&Array.isArray(e.extensions.MSFT_lod.ids)}function H(e,t,r){const o=t=>{const o=`${r}_tex_${t&&t.id}${t?.name?"_"+t.name:""}`;if(t&&!e.textures.has(o)){const r=function(e,t={}){return{data:e,parameters:{wrap:{s:10497,t:10497,...t.wrap},noUnpackFlip:!0,mipmap:!1,...t}}}(t.data,{wrap:{s:t.wrapS,t:t.wrapT},mipmap:V.has(t.minFilter),noUnpackFlip:!0});e.textures.set(o,r)}return o},n=`${r}_mat_${t.id}_${t.name}`;if(!e.materials.has(n)){const r=function(e={}){return{color:[1,1,1],opacity:1,alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1,castShadows:!0,receiveShadows:!0,receiveAmbientOcclusion:!0,colorTexture:null,normalTexture:null,occlusionTexture:null,emissiveTexture:null,metallicRoughnessTexture:null,colorTextureTransform:null,normalTextureTransform:null,occlusionTextureTransform:null,emissiveTextureTransform:null,metallicRoughnessTextureTransform:null,emissiveFactor:[0,0,0],metallicFactor:1,roughnessFactor:1,colorMixMode:"multiply",...e}}({color:[t.color[0],t.color[1],t.color[2]],opacity:t.color[3],alphaMode:t.alphaMode,alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,colorMixMode:t.ESRI_externalColorMixMode,colorTexture:t.colorTexture?o(t.colorTexture):void 0,normalTexture:t.normalTexture?o(t.normalTexture):void 0,occlusionTexture:t.occlusionTexture?o(t.occlusionTexture):void 0,emissiveTexture:t.emissiveTexture?o(t.emissiveTexture):void 0,metallicRoughnessTexture:t.metallicRoughnessTexture?o(t.metallicRoughnessTexture):void 0,emissiveFactor:[t.emissiveFactor[0],t.emissiveFactor[1],t.emissiveFactor[2]],colorTextureTransform:t.colorTextureTransform,normalTextureTransform:t.normalTextureTransform,occlusionTextureTransform:t.occlusionTextureTransform,emissiveTextureTransform:t.emissiveTextureTransform,metallicRoughnessTextureTransform:t.metallicRoughnessTextureTransform,metallicFactor:t.metallicFactor,roughnessFactor:t.roughnessFactor,receiveShadows:t.receiveShadows,receiveAmbientOcclusion:t.receiveAmbientOcclusion});e.materials.set(n,r)}return n}const V=new Set([9987,9985])}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7375,9738],{21015:(e,t,r)=>{r.d(t,{R:()=>u});var n=r(78888),o=r(60999),s=r(49186),a=r(74887),i=r(84952);class u{constructor(e){this._streamDataRequester=e}async loadJSON(e,t){return this._load(0,e,t)}async loadBinary(e,t){return(0,i.DB)(e)?((0,a.Te)(t),(0,i.lJ)(e)):this._load(1,e,t)}async loadImage(e,t){return this._load(2,e,t)}async _load(e,t,r){if(null==this._streamDataRequester)return(await(0,n.A)(t,{responseType:l[e]})).data;const i=await(0,o.Ke)(this._streamDataRequester.request(t,e,r));if(!0===i.ok)return i.value;throw(0,a.QP)(i.error),new s.A("glt-loader-request-error",`Request for resource failed: ${i.error}`)}}const l={2:"image",1:"array-buffer",0:"json",3:void 0}},24045:(e,t,r)=>{function n(e,t){const r=e.count;t||(t=new e.TypedArrayConstructor(r));for(let n=0;n<r;n++)t[n]=e.get(n);return t}r.d(t,{m:()=>n}),Object.freeze(Object.defineProperty({__proto__:null,makeDense:n},Symbol.toStringTag,{value:"Module"}))},43609:(e,t,r)=>{r.d(t,{a:()=>s,f:()=>a,n:()=>o});var n=r(34275);function o(e,t){s(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r=2,o=r){const s=t.length/2;let a=0,i=0;if(!(0,n.iu)(t)||(0,n.dk)(t)){for(let n=0;n<s;++n)e[a]=t[i],e[a+1]=t[i+1],a+=r,i+=o;return}const u=(0,n.a3)(t);if((0,n.JI)(t))for(let n=0;n<s;++n)e[a]=Math.max(t[i]/u,-1),e[a+1]=Math.max(t[i+1]/u,-1),a+=r,i+=o;else for(let n=0;n<s;++n)e[a]=t[i]/u,e[a+1]=t[i+1]/u,a+=r,i+=o}function a(e,t,r,n){const o=e.typedBuffer,s=e.typedBufferStride,a=n?.count??e.count;let i=(n?.dstIndex??0)*s;for(let e=0;e<a;++e)o[i]=t,o[i+1]=r,i+=s}Object.freeze(Object.defineProperty({__proto__:null,fill:a,normalizeIntegerBuffer:s,normalizeIntegerBufferView:o},Symbol.toStringTag,{value:"Module"}))},46140:(e,t,r)=>{r.d(t,{R:()=>o});var n=r(49186);let o=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new n.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[o,s]=t.split("."),a=/^\s*\d+\s*$/;if(!o?.match||!a.test(o))throw new n.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!s?.match||!a.test(s))throw new n.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const i=parseInt(o,10),u=parseInt(s,10);return new e(i,u,r)}}},51530:(e,t,r)=>{r.d(t,{KB:()=>a,Xi:()=>o,pn:()=>i,x3:()=>s});var n=r(44208);class o{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function s(e){return"encoded-mesh-texture"===e?.type}async function a(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function i(e,t){if("image/ktx2"===t)return new o(e);const r=new Blob([e],{type:t});let s=URL.createObjectURL(r);switch(t){case"image/jpeg":s+="#.jpg";break;case"image/png":s+="#.png"}const a=new Image;if((0,n.A)("esri-iPhone"))return new Promise((e,t)=>{const r=()=>{o(),e(a)},n=e=>{o(),t(e)},o=()=>{URL.revokeObjectURL(s),a.removeEventListener("load",r),a.removeEventListener("error",n)};a.addEventListener("load",r),a.addEventListener("error",n),a.src=s});try{a.src=s,await a.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(s),a}},63907:(e,t,r)=>{r.d(t,{CQ:()=>T,Fq:()=>p,H0:()=>s,SB:()=>u,WR:()=>n,XN:()=>a,iE:()=>i,ld:()=>l,nI:()=>m,pe:()=>o,r6:()=>f,vt:()=>c,yI:()=>d});const n={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},o={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,HALF_FLOAT:5131},s={RGBA4:32854,R16F:33325,RG16F:33327,RGB32F:34837,RGBA16F:34842,R32F:33326,RG32F:33328,RGBA32F:34836,R11F_G11F_B10F:35898,RGB8:32849,RGBA8:32856,RGB5_A1:32855,R8:33321,RG8:33323,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,RGB16F:34843,RGB9_E5:35901,SRGB8:35905,SRGB8_ALPHA8:35907,RGB565:36194,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2:32857,RGB10_A2UI:36975},a=Object.values(s),i={DEPTH24_STENCIL8:35056,DEPTH32F_STENCIL8:36013},u={DEPTH_COMPONENT16:33189,DEPTH_COMPONENT24:33190,DEPTH_COMPONENT32F:36012},l={FLOAT:o.FLOAT,UNSIGNED_BYTE:o.UNSIGNED_BYTE,UNSIGNED_INT_24_8:34042,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,BYTE:o.BYTE,UNSIGNED_SHORT:o.UNSIGNED_SHORT,SHORT:o.SHORT,UNSIGNED_INT:o.UNSIGNED_INT,INT:o.INT,HALF_FLOAT:5131,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269},c={Texture:0,TileTexture:1,BufferObject:2,VertexArrayObject:3,Shader:4,Program:5,FramebufferObject:6,Renderbuffer:7,TransformFeedback:8,Sync:9,UNCOUNTED:10,LinesOfCode:10,Uniform:11,COUNT:12},f=36064,d=36065,p=36066,m=33306,T={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_SRGB8_ETC2:37493,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37494,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37495,COMPRESSED_RGBA8_ETC2_EAC:37496,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37497}},84498:(e,t,r)=>{r.d(t,{x:()=>a});var n=r(34275),o=r(97146),s=r(63907);function a(e,t){switch(t){case s.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,o.tM)(e):(0,n.mg)(e)?new Uint16Array(e):e}(e);case s.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,n=(0,o.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(n[e++]=t,n[e++]=t+1,n[e++]=t+2):(n[e++]=t+1,n[e++]=t,n[e++]=t+2)}else{let t=0;for(let o=0;o<r;o+=1)o%2==0?(n[t++]=e[o],n[t++]=e[o+1],n[t++]=e[o+2]):(n[t++]=e[o+1],n[t++]=e[o],n[t++]=e[o+2])}return n}(e);case s.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,n=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)n[e++]=0,n[e++]=t+1,n[e++]=t+2;return n}const o=e[0];let s=e[1],a=0;for(let t=0;t<r;++t){const r=e[t+2];n[a++]=o,n[a++]=s,n[a++]=r,s=r}return n}(e)}}},90239:(e,t,r)=>{function n(e){switch(e){case"u8":case"i8":return 1;case"u16":case"i16":case"f16":return 2;case"u32":case"i32":case"f32":return 4;case"f64":return 8}}r.d(t,{GJ:()=>n})},97375:(e,t,r)=>{r.r(t),r.d(t,{loadGLTFMesh:()=>L});var n=r(68197),o=r(40876),s=r(78888),a=r(49186),i=r(91869),u=r(34727),l=r(77690),c=r(29242),f=r(51850),d=r(91829),p=r(16939),m=r(80882),T=r(35063),h=r(51147),_=r(1193),g=r(27615),w=r(13030),y=r(73354),x=r(65686),b=r(90239);Object.freeze(Object.defineProperty({__proto__:null,copy:function(e,t,r){const n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride,i=r?r.count:t.count;let u=(r?.dstIndex??0)*o,l=(r?.srcIndex??0)*a;for(let e=0;e<i;++e){for(let e=0;e<9;++e)n[u+e]=s[l+e];u+=o,l+=a}}},Symbol.toStringTag,{value:"Module"})),Object.freeze(Object.defineProperty({__proto__:null,copy:function(e,t,r){const n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride,i=r?r.count:t.count;let u=(r?.dstIndex??0)*o,l=(r?.srcIndex??0)*a;for(let e=0;e<i;++e){for(let e=0;e<16;++e)n[u+e]=s[l+e];u+=o,l+=a}}},Symbol.toStringTag,{value:"Module"})),r(24045);var S=r(43609);function R(e,t,r=3,n=r){const o=t.length/n;let s=0,a=0;for(let i=0;i<o;++i)e[s]=t[a],e[s+1]=t[a+1],e[s+2]=t[a+2],s+=r,a+=n}function A(e,t,r,n,o){const s=e.typedBuffer,a=e.typedBufferStride,i=o?.count??e.count;let u=(o?.dstIndex??0)*a;for(let e=0;e<i;++e)s[u]=t,s[u+1]=r,s[u+2]=n,u+=a}function E(e,t,r=4){const n=t.typedBuffer,o=t.typedBufferStride,s=t.count;let a=0,i=0;for(let t=0;t<s;++t)e[a]=n[i],e[a+1]=n[i+1],e[a+2]=n[i+2],e[a+3]=n[i+3],a+=r,i+=o}function O(e,t,r,n,o,s){const a=e.typedBuffer,i=e.typedBufferStride,u=s?.count??e.count;let l=(s?.dstIndex??0)*i;for(let e=0;e<u;++e)a[l]=t,a[l+1]=r,a[l+2]=n,a[l+3]=o,l+=i}function N(e,t){return new e(new ArrayBuffer(t*e.ElementCount*(0,b.GJ)(e.ElementType)))}Object.freeze(Object.defineProperty({__proto__:null,copy:R,copyView:function(e,t){R(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)},fill:A},Symbol.toStringTag,{value:"Module"})),Object.freeze(Object.defineProperty({__proto__:null,copy:E,copyView:function(e,t){E(e.typedBuffer,t,e.typedBufferStride)},fill:O},Symbol.toStringTag,{value:"Module"}));var v=r(72258),I=r(21015),C=r(99738),B=r(84498),G=r(51530);async function L(e,t,r){const o=new I.R(function(e){const t=e?.resolveFile;return t?{busy:!1,request:async(e,r,n)=>{const o=t?.(e)??e,a=2===r?"image":1===r||3===r?"array-buffer":"json";return(await(0,s.A)(o,{responseType:a,signal:n?.signal,timeout:0})).data}}:null}(r)),l=(await(0,C.loadGLTF)(o,t,r,!0)).model,c=l.lods.shift(),p=new Map,y=new Map;l.textures.forEach((e,t)=>p.set(t,function(e){return new T.A({data:((0,G.x3)(e.data),e.data),wrap:P(e.parameters.wrap)})}(e))),l.materials.forEach((e,t)=>y.set(t,function(e,t){const r=new n.A(function(e,t){return(0,d.fA)(H(e[0]),H(e[1]),H(e[2]),t)}(e.color,e.opacity)),o=e.emissiveFactor?new n.A(function(e){return(0,f.fA)(H(e[0]),H(e[1]),H(e[2]))}(e.emissiveFactor)):null,s=e=>e?new h.A({scale:e.scale?[e.scale[0],e.scale[1]]:[1,1],rotation:(0,u.KJ)(e.rotation??0),offset:e.offset?[e.offset[0],e.offset[1]]:[0,0]}):null;return new m.A({color:r,colorTexture:t.get(e.colorTexture),normalTexture:t.get(e.normalTexture),emissiveColor:o,emissiveTexture:t.get(e.emissiveTexture),occlusionTexture:t.get(e.occlusionTexture),alphaMode:D(e.alphaMode),alphaCutoff:e.alphaCutoff,doubleSided:e.doubleSided,metallic:e.metallicFactor,roughness:e.roughnessFactor,metallicRoughnessTexture:t.get(e.metallicRoughnessTexture),colorTextureTransform:s(e.colorTextureTransform),normalTextureTransform:s(e.normalTextureTransform),occlusionTextureTransform:s(e.occlusionTextureTransform),emissiveTextureTransform:s(e.emissiveTextureTransform),metallicRoughnessTextureTransform:s(e.metallicRoughnessTextureTransform)})}(e,p)));const x=function(e){let t=0;const r={color:!1,tangent:!1,normal:!1,texCoord0:!1},n=new Map,o=new Map,s=[];for(const a of e.parts){const{position:e,normal:u,color:l,tangent:c,texCoord0:f}=a.attributes,d=`\n ${M(e,n)}/\n ${M(u,n)}/\n ${M(l,n)}/\n ${M(c,n)}/\n ${M(f,n)}/\n ${U(a.transform)}\n `;let p=!1;const m=(0,i.tE)(o,d,()=>(p=!0,{start:t,length:e.count}));p&&(t+=e.count),u&&(r.normal=!0),l&&(r.color=!0),c&&(r.tangent=!0),f&&(r.texCoord0=!0),s.push({gltf:a,writeVertices:p,region:m})}return{vertexAttributes:{position:N(w.Xm,t),normal:r.normal?N(w.xs,t):null,tangent:r.tangent?N(w.Eq,t):null,color:r.color?N(w.XP,t):null,texCoord0:r.texCoord0?N(w.gH,t):null},parts:s,components:[]}}(c);for(const e of x.parts)F(x,e,y);const{position:b,normal:S,tangent:R,color:A,texCoord0:E}=x.vertexAttributes,O=(0,g.TE)(e,r),B=e.spatialReference.isGeographic?(0,g.TE)(e):O,L=(0,v.UR)({vertexAttributes:{position:b.typedBuffer,normal:S?.typedBuffer,tangent:R?.typedBuffer},vertexSpace:B,spatialReference:e.spatialReference},O,{allowBufferReuse:!0,sourceUnit:r?.unitConversionDisabled?void 0:"meters"});if(!L)throw new a.A("load-gltf-mesh:vertex-space-projection",`Failed to load mesh from glTF because we could not convert the vertex space from ${B.type} to ${O.type}`);return{transform:null,vertexSpace:O,components:x.components,spatialReference:e.spatialReference,vertexAttributes:new _.H({...L,color:A?.typedBuffer,uv:E?.typedBuffer})}}function M(e,t){if(null==e)return"-";const r=e.typedBuffer;return`${(0,i.tE)(t,r.buffer,()=>t.size)}/${r.byteOffset}/${r.byteLength}`}function U(e){return null!=e?e.toString():"-"}function F(e,t,r){t.writeVertices&&function(e,t){const{position:r,normal:n,tangent:o,color:s,texCoord0:a}=e.vertexAttributes,i=t.region.start,{attributes:f,transform:d}=t.gltf,p=f.position.count;if((0,y.d)(r.slice(i,p),f.position,d),null!=f.normal&&null!=n){const e=(0,l.Ge)((0,c.vt)(),d),t=n.slice(i,p);(0,y.c)(t,f.normal,e),(0,u.or)(e)&&(0,y.e)(t,t)}else null!=n&&A(n,0,0,1,{dstIndex:i,count:p});if(null!=f.tangent&&null!=o){const e=(0,l.z0)((0,c.vt)(),d),t=o.slice(i,p);(0,x.a)(t,f.tangent,e),(0,u.or)(e)&&(0,x.n)(t,t)}else null!=o&&O(o,0,0,1,1,{dstIndex:i,count:p});if(null!=f.texCoord0&&null!=a?(0,S.n)(a.slice(i,p),f.texCoord0):null!=a&&(0,S.f)(a,0,0,{dstIndex:i,count:p}),null!=f.color&&null!=s){const e=f.color,t=s.slice(i,p);if(4===e.elementCount)e instanceof w.Eq?(0,x.l)(t,e,1,255):(e instanceof w.XP||e instanceof w.Uz)&&(0,x.l)(t,e,1/255,255);else{O(t,255,255,255,255);const r=w.eI.fromTypedArray(t.typedBuffer,t.typedBufferStride);e instanceof w.xs?(0,y.l)(r,e,1,255):(e instanceof w.eI||e instanceof w.nS)&&(0,y.l)(r,e,1/255,255)}}else null!=s&&O(s.slice(i,p),255,255,255,255)}(e,t);const{indices:n,attributes:o,primitiveType:s,material:a}=t.gltf;let i=(0,B.x)(n||o.position.count,s);const f=t.region.start;if(f){const e=new Uint32Array(i);for(let t=0;t<i.length;t++)e[t]+=f;i=e}e.components.push(new p.A({name:t.gltf.name,faces:i,material:r.get(a),shading:o.normal?"source":"flat",trustSourceNormals:!0}))}function D(e){switch(e){case"OPAQUE":return"opaque";case"MASK":return"mask";case"BLEND":return"blend"}}function P(e){return{horizontal:j(e.s),vertical:j(e.t)}}function j(e){switch(e){case 33071:return"clamp";case 33648:return"mirror";case 10497:return"repeat"}}function H(e){return e**(1/o.Tf)*255}},99738:(e,t,r)=>{r.d(t,{loadGLTF:()=>D});var n=r(53966),o=r(93637),s=r(9093),a=r(49186),i=r(91869),u=r(74887),l=r(84952),c=r(46140),f=r(58083),d=r(67026),p=r(82534),m=r(13030),T=r(24045);r(44208);class h{constructor(e){this._data=e,this._offset4=0,this._dataUint32=new Uint32Array(this._data,0,Math.floor(this._data.byteLength/4))}readUint32(){const e=this._offset4;return this._offset4+=1,this._dataUint32[e]}readUint8Array(e){const t=4*this._offset4;return this._offset4+=e/4,new Uint8Array(this._data,t,e)}remainingBytes(){return this._data.byteLength-4*this._offset4}}var _=r(21818);const g={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1},w={pbrMetallicRoughness:g,emissiveFactor:[0,0,0],alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1},y={ESRI_externalColorMixMode:"tint",ESRI_receiveShadows:!0,ESRI_receiveAmbientOcclusion:!0},x=(e={})=>{const t={...g,...e.pbrMetallicRoughness},r=function(e){switch(e.ESRI_externalColorMixMode){case"multiply":case"tint":case"ignore":case"replace":break;default:(0,_.Xb)(e.ESRI_externalColorMixMode),e.ESRI_externalColorMixMode="tint"}return e}({...y,...e.extras});return{...w,...e,pbrMetallicRoughness:t,extras:r}},b={magFilter:9729,minFilter:9987,wrapS:10497,wrapT:10497},S=e=>({...b,...e});var R=r(51530),A=r(63907);const E=1179937895;class O{constructor(e,t,r,n){if(this._context=e,this.uri=t,this.json=r,this._glbBuffer=n,this._bufferLoaders=new Map,this._textureLoaders=new Map,this._textureCache=new Map,this._materialCache=new Map,this._nodeParentMap=new Map,this._nodeTransformCache=new Map,this._supportedExtensions=["KHR_texture_basisu","KHR_texture_transform"],this._baseUri=function(e){let t,r;return e.replace(/^(.*\/)?([^/]*)$/,(e,n,o)=>(t=n||"",r=o||"","")),{dirPart:t,filePart:r}}(this.uri).dirPart,this._checkVersionSupported(),this._checkRequiredExtensionsSupported(),null==r.scenes)throw new a.A("gltf-loader-unsupported-feature","Scenes must be defined.");if(null==r.meshes)throw new a.A("gltf-loader-unsupported-feature","Meshes must be defined");if(null==r.nodes)throw new a.A("gltf-loader-unsupported-feature","Nodes must be defined.");this._computeNodeParents()}static async load(e,t,r){if((0,l.DB)(t)){const r=(0,l.r$)(t);if(r&&"model/gltf-binary"!==r.mediaType)try{const n=JSON.parse(r.isBase64?atob(r.data):r.data);return new O(e,t,n)}catch{}const n=(0,l.lJ)(t);if(O._isGLBData(n))return this._fromGLBData(e,t,n)}if(M.test(t)||"gltf"===r?.expectedType){const n=await e.loadJSON(t,r);return new O(e,t,n)}const n=await e.loadBinary(t,r);if(O._isGLBData(n))return this._fromGLBData(e,t,n);if(U.test(t)||"glb"===r?.expectedType)throw new a.A("gltf-loader-invalid-glb","This is not a valid glb file.");const o=await e.loadJSON(t,r);return new O(e,t,o)}static _isGLBData(e){if(null==e)return!1;const t=new h(e);return t.remainingBytes()>=4&&t.readUint32()===E}static async _fromGLBData(e,t,r){const n=await O._parseGLBData(r);return new O(e,t,n.json,n.binaryData)}static async _parseGLBData(e){const t=new h(e);if(t.remainingBytes()<12)throw new a.A("gltf-loader-error","glb binary data is insufficiently large.");const r=t.readUint32(),o=t.readUint32(),s=t.readUint32();if(r!==E)throw new a.A("gltf-loader-error","Magic first 4 bytes do not fit to expected glb value.");if(e.byteLength<s)throw new a.A("gltf-loader-error","glb binary data is smaller than header specifies.");if(2!==o)throw new a.A("gltf-loader-unsupported-feature","An unsupported glb container version was detected. Only version 2 is supported.");let i,u,l=0;for(;t.remainingBytes()>=8;){const e=t.readUint32(),r=t.readUint32();if(0===l){if(1313821514!==r)throw new a.A("gltf-loader-error","First glb chunk must be JSON.");if(e<0)throw new a.A("gltf-loader-error","No JSON data found.");i=await(0,R.KB)(t.readUint8Array(e))}else if(1===l){if(5130562!==r)throw new a.A("gltf-loader-unsupported-feature","Second glb chunk expected to be BIN.");u=t.readUint8Array(e)}else n.A.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] More than 2 glb chunks detected. Skipping.");l+=1}if(!i)throw new a.A("gltf-loader-error","No glb JSON chunk detected.");return{json:i,binaryData:u}}async getBuffer(e,t){const r=this.json.buffers[e];if(null==r.uri){if(null==this._glbBuffer)throw new a.A("gltf-loader-error","glb buffer not present");return this._glbBuffer}const n=await this._getBufferLoader(e,t);if(n.byteLength!==r.byteLength)throw new a.A("gltf-loader-error","Buffer byte lengths should match.");return n}async _getBufferLoader(e,t){const r=this._bufferLoaders.get(e);if(r)return r;const n=this.json.buffers[e].uri,o=this._context.loadBinary(this._resolveUri(n),t).then(e=>new Uint8Array(e));return this._bufferLoaders.set(e,o),o}async getAccessor(e,t){if(!this.json.accessors)throw new a.A("gltf-loader-unsupported-feature","Accessors missing.");const r=this.json.accessors[e];if(null==r?.bufferView)throw new a.A("gltf-loader-unsupported-feature","Some accessor does not specify a bufferView.");if(r.type in["MAT2","MAT3","MAT4"])throw new a.A("gltf-loader-unsupported-feature",`AttributeType ${r.type} is not supported`);const n=this.json.bufferViews[r.bufferView],o=await this.getBuffer(n.buffer,t),s=C[r.type],i=B[r.componentType],u=s*i,l=n.byteStride||u;return{raw:o.buffer,byteStride:l,byteOffset:o.byteOffset+(n.byteOffset||0)+(r.byteOffset||0),entryCount:r.count,isDenselyPacked:l===u,componentCount:s,componentByteSize:i,componentType:r.componentType,min:r.min,max:r.max,normalized:!!r.normalized}}async getIndexData(e,t){if(null==e.indices)return;const r=await this.getAccessor(e.indices,t);if(r.isDenselyPacked)switch(r.componentType){case A.pe.UNSIGNED_BYTE:return new Uint8Array(r.raw,r.byteOffset,r.entryCount);case A.pe.UNSIGNED_SHORT:return new Uint16Array(r.raw,r.byteOffset,r.entryCount);case A.pe.UNSIGNED_INT:return new Uint32Array(r.raw,r.byteOffset,r.entryCount)}else switch(r.componentType){case A.pe.UNSIGNED_BYTE:return(0,T.m)(G(m.SL,r));case A.pe.UNSIGNED_SHORT:return(0,T.m)(G(m.h,r));case A.pe.UNSIGNED_INT:return(0,T.m)(G(m.P,r))}}async getPositionData(e,t){if(null==e.attributes.POSITION)throw new a.A("gltf-loader-unsupported-feature","No POSITION vertex data found.");const r=await this.getAccessor(e.attributes.POSITION,t);if(r.componentType!==A.pe.FLOAT)throw new a.A("gltf-loader-unsupported-feature","Expected type FLOAT for POSITION vertex attribute, but found "+(0,o.i7)(A.pe,r.componentType));if(3!==r.componentCount)throw new a.A("gltf-loader-unsupported-feature","POSITION vertex attribute must have 3 components, but found "+r.componentCount.toFixed());return G(m.xs,r)}async getNormalData(e,t){if(null==e.attributes.NORMAL)throw new a.A("gltf-loader-error","No NORMAL vertex data found.");const r=await this.getAccessor(e.attributes.NORMAL,t);if(r.componentType!==A.pe.FLOAT)throw new a.A("gltf-loader-unsupported-feature","Expected type FLOAT for NORMAL vertex attribute, but found "+(0,o.i7)(A.pe,r.componentType));if(3!==r.componentCount)throw new a.A("gltf-loader-unsupported-feature","NORMAL vertex attribute must have 3 components, but found "+r.componentCount.toFixed());return G(m.xs,r)}async getTangentData(e,t){if(null==e.attributes.TANGENT)throw new a.A("gltf-loader-error","No TANGENT vertex data found.");const r=await this.getAccessor(e.attributes.TANGENT,t);if(r.componentType!==A.pe.FLOAT)throw new a.A("gltf-loader-unsupported-feature","Expected type FLOAT for TANGENT vertex attribute, but found "+(0,o.i7)(A.pe,r.componentType));if(4!==r.componentCount)throw new a.A("gltf-loader-unsupported-feature","TANGENT vertex attribute must have 4 components, but found "+r.componentCount.toFixed());return G(m.Eq,r)}async getTextureCoordinates(e,t){if(null==e.attributes.TEXCOORD_0)throw new a.A("gltf-loader-error","No TEXCOORD_0 vertex data found.");const r=await this.getAccessor(e.attributes.TEXCOORD_0,t);if(2!==r.componentCount)throw new a.A("gltf-loader-unsupported-feature","TEXCOORD_0 vertex attribute must have 2 components, but found "+r.componentCount.toFixed());if(r.componentType===A.pe.FLOAT)return G(m.gH,r);if(!r.normalized)throw new a.A("gltf-loader-unsupported-feature","Integer component types are only supported for a normalized accessor for TEXCOORD_0.");return function(e){switch(e.componentType){case A.pe.BYTE:return new m.D6(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case A.pe.UNSIGNED_BYTE:return new m.LC(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case A.pe.SHORT:return new m.mJ(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case A.pe.UNSIGNED_SHORT:return new m.Yi(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case A.pe.UNSIGNED_INT:return new m.An(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case A.pe.FLOAT:return new m.gH(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount)}}(r)}async getVertexColors(e,t){if(null==e.attributes.COLOR_0)throw new a.A("gltf-loader-error","No COLOR_0 vertex data found.");const r=await this.getAccessor(e.attributes.COLOR_0,t);if(4!==r.componentCount&&3!==r.componentCount)throw new a.A("gltf-loader-unsupported-feature","COLOR_0 attribute must have 3 or 4 components, but found "+r.componentCount.toFixed());if(4===r.componentCount){if(r.componentType===A.pe.FLOAT)return G(m.Eq,r);if(r.componentType===A.pe.UNSIGNED_BYTE)return G(m.XP,r);if(r.componentType===A.pe.UNSIGNED_SHORT)return G(m.Uz,r)}else if(3===r.componentCount){if(r.componentType===A.pe.FLOAT)return G(m.xs,r);if(r.componentType===A.pe.UNSIGNED_BYTE)return G(m.eI,r);if(r.componentType===A.pe.UNSIGNED_SHORT)return G(m.nS,r)}throw new a.A("gltf-loader-unsupported-feature","Unsupported component type for COLOR_0 attribute: "+(0,o.i7)(A.pe,r.componentType))}hasPositions(e){return void 0!==e.attributes.POSITION}hasNormals(e){return void 0!==e.attributes.NORMAL}hasVertexColors(e){return void 0!==e.attributes.COLOR_0}hasTextureCoordinates(e){return void 0!==e.attributes.TEXCOORD_0}hasTangents(e){return void 0!==e.attributes.TANGENT}async getMaterial(e,t,r){let n=e.material?this._materialCache.get(e.material):void 0;if(!n){const o=null!=e.material?x(this.json.materials[e.material]):x(),s=o.pbrMetallicRoughness,a=this.hasVertexColors(e),i=this.getTexture(s.baseColorTexture,t),u=this.getTexture(o.normalTexture,t),l=r?this.getTexture(o.occlusionTexture,t):void 0,c=r?this.getTexture(o.emissiveTexture,t):void 0,f=r?this.getTexture(s.metallicRoughnessTexture,t):void 0,d=null!=e.material?e.material:-1;n={alphaMode:o.alphaMode,alphaCutoff:o.alphaCutoff,color:s.baseColorFactor,doubleSided:!!o.doubleSided,colorTexture:await i,normalTexture:await u,name:o.name,id:d,occlusionTexture:await l,emissiveTexture:await c,emissiveFactor:o.emissiveFactor,metallicFactor:s.metallicFactor,roughnessFactor:s.roughnessFactor,metallicRoughnessTexture:await f,hasVertexColors:a,ESRI_externalColorMixMode:o.extras.ESRI_externalColorMixMode,colorTextureTransform:s?.baseColorTexture?.extensions?.KHR_texture_transform,normalTextureTransform:o.normalTexture?.extensions?.KHR_texture_transform,occlusionTextureTransform:o.occlusionTexture?.extensions?.KHR_texture_transform,emissiveTextureTransform:o.emissiveTexture?.extensions?.KHR_texture_transform,metallicRoughnessTextureTransform:s?.metallicRoughnessTexture?.extensions?.KHR_texture_transform,receiveAmbientOcclusion:o.extras.ESRI_receiveAmbientOcclusion,receiveShadows:o.extras.ESRI_receiveShadows}}return n}async getTexture(e,t){if(!e)return;if(0!==(e.texCoord||0))throw new a.A("gltf-loader-unsupported-feature","Only TEXCOORD with index 0 is supported.");const r=e.index,n=this.json.textures[r],o=S(null!=n.sampler?this.json.samplers[n.sampler]:{}),s=L(n),u=this.json.images[s],l=await this._loadTextureImageData(r,n,t);return(0,i.tE)(this._textureCache,r,()=>{const e=e=>33071===e||33648===e||10497===e,t=e=>{throw new a.A("gltf-loader-error",`Unexpected TextureSampler WrapMode: ${e}`)};return{data:l,wrapS:e(o.wrapS)?o.wrapS:t(o.wrapS),wrapT:e(o.wrapT)?o.wrapT:t(o.wrapT),minFilter:o.minFilter,name:u.name,id:r}})}getNodeTransform(e){if(void 0===e)return N;let t=this._nodeTransformCache.get(e);if(!t){const r=this.getNodeTransform(this._getNodeParent(e)),n=this.json.nodes[e];n.matrix?t=(0,f.lw)((0,s.vt)(),r,n.matrix):n.translation||n.rotation||n.scale?(t=(0,s.o8)(r),n.translation&&(0,f.Tl)(t,t,n.translation),n.rotation&&(I[3]=(0,d.Xd)(I,n.rotation),(0,f.e$)(t,t,I[3],I)),n.scale&&(0,f.hs)(t,t,n.scale)):t=(0,s.o8)(r),this._nodeTransformCache.set(e,t)}return t}_resolveUri(e){return(0,l.s2)(e,this._baseUri)}_getNodeParent(e){return this._nodeParentMap.get(e)}_checkVersionSupported(){const e=c.R.parse(this.json.asset.version,"glTF");v.validate(e)}_checkRequiredExtensionsSupported(){const e=this.json;if(e.extensionsRequired&&!e.extensionsRequired.every(e=>this._supportedExtensions.includes(e)))throw new a.A("gltf-loader-unsupported-feature","gltf loader was not able to load unsupported feature. Required extensions: "+e.extensionsRequired.join(", "))}_computeNodeParents(){this.json.nodes.forEach((e,t)=>{e.children&&e.children.forEach(e=>{this._nodeParentMap.set(e,t)})})}async _loadTextureImageData(e,t,r){const n=this._textureLoaders.get(e);if(n)return n;const o=this._createTextureLoader(t,r);return this._textureLoaders.set(e,o),o}async _createTextureLoader(e,t){const r=L(e),n=this.json.images[r];if(n.uri){if(n.uri.endsWith(".ktx2")){const e=await this._context.loadBinary(this._resolveUri(n.uri),t);return new R.Xi(new Uint8Array(e))}return this._context.loadImage(this._resolveUri(n.uri),t)}if(null==n.bufferView)throw new a.A("gltf-loader-unsupported-feature","Image bufferView must be defined.");if(null==n.mimeType)throw new a.A("gltf-loader-unsupported-feature","Image mimeType must be defined.");const o=this.json.bufferViews[n.bufferView],s=await this.getBuffer(o.buffer,t);if(null!=o.byteStride)throw new a.A("gltf-loader-unsupported-feature","byteStride not supported for image buffer");const i=s.byteOffset+(o.byteOffset||0);return(0,R.pn)(new Uint8Array(s.buffer,i,o.byteLength),n.mimeType)}async getLoadedBuffersSize(){if(this._glbBuffer)return this._glbBuffer.byteLength;const e=await(0,u.nA)(Array.from(this._bufferLoaders.values())),t=await(0,u.nA)(Array.from(this._textureLoaders.values()));return e.reduce((e,t)=>e+(t?.byteLength??0),0)+t.reduce((e,t)=>e+(t?(0,R.x3)(t)?t.data.byteLength:t.width*t.height*4:0),0)}}const N=(0,f.hM)((0,s.vt)(),Math.PI/2),v=new c.R(2,0,"glTF"),I=(0,p.vt)(),C={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},B={[A.pe.BYTE]:1,[A.pe.UNSIGNED_BYTE]:1,[A.pe.SHORT]:2,[A.pe.UNSIGNED_SHORT]:2,[A.pe.HALF_FLOAT]:2,[A.pe.FLOAT]:4,[A.pe.INT]:4,[A.pe.UNSIGNED_INT]:4};function G(e,t){return new e(t.raw,t.byteOffset,t.byteStride,t.byteOffset+t.byteStride*(t.entryCount-1)+t.componentByteSize*t.componentCount)}function L(e){if(null!=e.extensions?.KHR_texture_basisu)return e.extensions.KHR_texture_basisu.source;if(null!==e.source)return e.source;throw new a.A("gltf-loader-unsupported-feature","Source is expected to be defined for a texture. It can also be omitted in favour of an KHR_texture_basisu extension tag.")}const M=/\.gltf$/i,U=/\.glb$/i;let F=0;async function D(e,t,r={},a=!0){const i=await O.load(e,t,r),u="gltf_"+F++,l={lods:[],materials:new Map,textures:new Map,meta:P(i)},c=!(!i.json.asset.extras||"symbolResource"!==i.json.asset.extras.ESRI_type),f=i.json.asset.extras?.ESRI_webstyleSymbol?.webstyle,d=new Map;await j(i,async(e,t,c,f)=>{const p=d.get(c)??0;d.set(c,p+1);const m=void 0!==e.mode?e.mode:A.WR.TRIANGLES,T=m===A.WR.TRIANGLES||m===A.WR.TRIANGLE_STRIP||m===A.WR.TRIANGLE_FAN?m:null;if(null==T)return void n.A.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Unsupported primitive mode ("+(0,o.i7)(A.WR,m)+"). Skipping primitive.");if(!i.hasPositions(e))return void n.A.getLogger("esri.views.3d.glTF").warn("Skipping primitive without POSITION vertex attribute.");const h=i.getPositionData(e,r),_=i.getMaterial(e,r,a),g=i.hasNormals(e)?i.getNormalData(e,r):null,w=i.hasTangents(e)?i.getTangentData(e,r):null,y=i.hasTextureCoordinates(e)?i.getTextureCoordinates(e,r):null,x=i.hasVertexColors(e)?i.getVertexColors(e,r):null,b=i.getIndexData(e,r),S={name:f,transform:(0,s.o8)(t),attributes:{position:await h,normal:g?await g:null,texCoord0:y?await y:null,color:x?await x:null,tangent:w?await w:null},indices:await b,primitiveType:T,material:$(l,await _,u)};let R=null;null!=l.meta?.ESRI_lod&&"screenSpaceRadius"===l.meta.ESRI_lod.metric&&(R=l.meta.ESRI_lod.thresholds[c]),l.lods[c]=l.lods[c]||{parts:[],name:f,lodThreshold:R},l.lods[c].parts[p]=S});for(const e of l.lods)e.parts=e.parts.filter(e=>!!e);const p=await i.getLoadedBuffersSize();return{model:l,meta:{isEsriSymbolResource:c,uri:i.uri,ESRI_webstyle:f},customMeta:{},usedMemory:p}}function P(e){const t=e.json;let r=null;return t.nodes.forEach(e=>{const t=e.extras;null!=t&&(t.ESRI_proxyEllipsoid||t.ESRI_lod)&&(r=t)}),r}async function j(e,t){const r=e.json,o=r.scenes[r.scene||0].nodes,s=o.length>1,a=[];for(const e of o){const t=r.nodes[e];a.push(i(e,0)),H(t)&&!s&&t.extensions.MSFT_lod.ids.forEach((e,t)=>i(e,t+1))}async function i(o,s){const u=r.nodes[o],l=e.getNodeTransform(o);if(null!=u.weights&&n.A.getLogger("esri.views.3d.glTF").warn("[Unsupported Feature] Morph targets are not supported."),null!=u.mesh){const e=r.meshes[u.mesh];for(const r of e.primitives)a.push(t(r,l,s,e.name))}for(const e of u.children||[])a.push(i(e,s))}await Promise.all(a)}function H(e){return e.extensions?.MSFT_lod&&Array.isArray(e.extensions.MSFT_lod.ids)}function $(e,t,r){const n=t=>{const n=`${r}_tex_${t&&t.id}${t?.name?"_"+t.name:""}`;if(t&&!e.textures.has(n)){const r=function(e,t={}){return{data:e,parameters:{wrap:{s:10497,t:10497,...t.wrap},noUnpackFlip:!0,mipmap:!1,...t}}}(t.data,{wrap:{s:t.wrapS,t:t.wrapT},mipmap:k.has(t.minFilter),noUnpackFlip:!0});e.textures.set(n,r)}return n},o=`${r}_mat_${t.id}_${t.name}`;if(!e.materials.has(o)){const r=function(e={}){return{color:[1,1,1],opacity:1,alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1,castShadows:!0,receiveShadows:!0,receiveAmbientOcclusion:!0,colorTexture:null,normalTexture:null,occlusionTexture:null,emissiveTexture:null,metallicRoughnessTexture:null,colorTextureTransform:null,normalTextureTransform:null,occlusionTextureTransform:null,emissiveTextureTransform:null,metallicRoughnessTextureTransform:null,emissiveFactor:[0,0,0],metallicFactor:1,roughnessFactor:1,colorMixMode:"multiply",...e}}({color:[t.color[0],t.color[1],t.color[2]],opacity:t.color[3],alphaMode:t.alphaMode,alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,colorMixMode:t.ESRI_externalColorMixMode,colorTexture:t.colorTexture?n(t.colorTexture):void 0,normalTexture:t.normalTexture?n(t.normalTexture):void 0,occlusionTexture:t.occlusionTexture?n(t.occlusionTexture):void 0,emissiveTexture:t.emissiveTexture?n(t.emissiveTexture):void 0,metallicRoughnessTexture:t.metallicRoughnessTexture?n(t.metallicRoughnessTexture):void 0,emissiveFactor:[t.emissiveFactor[0],t.emissiveFactor[1],t.emissiveFactor[2]],colorTextureTransform:t.colorTextureTransform,normalTextureTransform:t.normalTextureTransform,occlusionTextureTransform:t.occlusionTextureTransform,emissiveTextureTransform:t.emissiveTextureTransform,metallicRoughnessTextureTransform:t.metallicRoughnessTextureTransform,metallicFactor:t.metallicFactor,roughnessFactor:t.roughnessFactor,receiveShadows:t.receiveShadows,receiveAmbientOcclusion:t.receiveAmbientOcclusion});e.materials.set(o,r)}return o}const k=new Set([9987,9985])}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[212],{8947:(e,t,r)=>{r.d(t,{L:()=>o});var i=r(60999),n=r(74887),s=r(67076);async function o(e,t,r){const o=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(o&&"unique-value"===o.type&&o.styleOrigin){const a=await(0,i.Ke)(o.populateFromStyle());if((0,n.Te)(r),!1===a.ok){const r=a.error;t?.messages&&t.messages.push(new s.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:t})),e.clear("renderer",t?.origin)}}}},40212:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ct});var i=r(31635),n=r(37838),s=r(78888),o=r(69540),a=r(7762),l=r(49186),u=r(4718),d=r(53966),p=r(97768),y=r(92071),c=r(93637),h=r(74887),g=r(39516),f=r(10107),m=r(79901),b=r(36005),w=r(40608),v=r(43937),C=r(89317),F=r(38141),T=r(16930),M=r(55156),S=r(60950),I=r(89808),_=r(99959);const E=Symbol("isFeatureGraphicOrigin");var Z;class A extends _.A{get[(Z=E,S.ym)](){return this.layer}get[M.e](){return this.layer}get[I.Q](){return this.layer}constructor(e){super(),this[Z]=!0,this.type="feature",this.layer=e}get id(){return this.layer.id}}var j=r(4146),D=r(52106),O=r(44208),x=r(92474),q=r(61893),P=r(29953),L=r(56507),R=(r(87811),r(7695)),G=r(5443),k=r(39829),N=r(50498),$=r(96520),J=r(58501),V=r(22671);let W=0,z=class extends((0,x.WV)((0,q.g)(a.A))){constructor(e){super(e),this._idToClientGeometry=null,this.type="memory"}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}get _workerGeometryType(){const e=this.layer?.geometryType;return e?this._geometryTypeRequiresClientGraphicMapping(e)?"polygon":e:null}applyEdits(e){return this.load().then(()=>this._applyEdits(e))}openPorts(){return this.load().then(()=>this._connection.openPorts())}async queryFeatures(e,t={}){await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);(0,J.q)(e,this.layer.spatialReference,r);const i=V.A.fromJSON(r);if(!this._requiresClientGraphicMapping()||!this._idToClientGeometry)return i;const n=this.layer.objectIdField;for(const e of i.features){const t=e.attributes[n],r=this._idToClientGeometry.get(t);void 0!==r&&(e.geometry=r)}return i.geometryType=this.layer.geometryType,i}async queryFeaturesJSON(e,t={}){if(this._requiresClientGraphicMapping())throw new l.A("query-features-json:unsupported","Cannot query in JSON format for client only geometry types (mesh and extent)");await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);return(0,J.q)(e,this.layer.spatialReference,r),r}queryFeatureCount(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t))}queryObjectIds(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t))}queryExtent(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t)).then(e=>({count:e.count,extent:G.A.fromJSON(e.extent)}))}querySnapping(e,t={}){return this.load(t).then(()=>this._connection.invoke("querySnapping",e,t))}async queryAttributeBins(e,t={}){return await this.load(),this._connection.invoke("queryAttributeBins",e?.toJSON(),t)}async _applyEdits(e){if(!this._connection)throw new l.A("feature-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField;let r=null;const i=[],n=[];await Promise.all([this._prepareClientMapping(e.addFeatures,null),this._prepareClientMapping(e.updateFeatures,null)]);const s=e=>"objectId"in e&&null!=e.objectId?e.objectId:"attributes"in e&&null!=e.attributes[t]?e.attributes[t]:null;if(e.addFeatures&&(r=this._prepareAddFeatures(e.addFeatures)),e.deleteFeatures)for(const t of e.deleteFeatures){const e=s(t);null!=e&&i.push(e)}const o=e.updateFeatures&&this._idToClientGeometry?new Map:null;if(e.updateFeatures)for(const t of e.updateFeatures)if(n.push(this._serializeFeature(t)),o&&null!=t.geometry){const e=s(t);null!=e&&o.set(e,t)}(0,$.u)(r?r.features:null,n,this.layer.spatialReference);const{fullExtent:a,featureEditResults:u}=await this._connection.invoke("applyEdits",{adds:r?r.features:[],updates:n,deletes:i});return this.fullExtent=a,r&&r.finish(u.uidToObjectId),this._updateIdToClientGeometries(o,u),this._createEditsResult(u)}async _prepareClientMapping(e,t){if("mesh"!==this._layerOrSourceGeometryType||null==e)return;const r=[];for(const{geometry:i}of e)null==i||"mesh"!==i.type||i.hasExtent||i.loaded||r.push(i.load({signal:t}));r.length&&await Promise.all(r)}_updateIdToClientGeometries(e,t){if(this._idToClientGeometry){if(e)for(const r of t.updateResults){if(!r.success)continue;const t=e.get(r.objectId);null!=t&&this._addIdToClientGeometry(t)}for(const e of t.deleteResults)e.success&&this._idToClientGeometry.delete(e.objectId)}}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:""};return{objectId:e.objectId,globalId:e.globalId,error:t?new l.A("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_prepareAddFeatures(e){const t=new Map,r=new Array(e.length);let i=null;for(let n=0;n<e.length;n++){const s=e[n],o=this._serializeFeature(s);i||null==s.geometry||(i=s.geometry.type),r[n]=o,t.set(`${o.uid}`,s)}const n=this;return{features:r,inferredGeometryType:i,finish(e){const r=n.sourceJSON.objectIdField;for(const i in e){const s=e[i],o=t.get(i);o&&(o.attributes||(o.attributes={}),-1===s?delete o.attributes[r]:o.attributes[r]=s,n._addIdToClientGeometry(o))}}}}_addIdToClientGeometry(e){if(!this._idToClientGeometry)return;const t=this.sourceJSON.objectIdField,r=e.attributes?.[t];null!=r&&this._idToClientGeometry.set(r,e.geometry??null)}get _layerOrSourceGeometryType(){return this.layer?.geometryType??this.sourceJSON?.geometryType}_requiresClientGraphicMapping(){return this._geometryTypeRequiresClientGraphicMapping(this._layerOrSourceGeometryType)}_geometryRequiresClientGraphicMapping(e){return this._geometryTypeRequiresClientGraphicMapping(e.type)}_geometryTypeRequiresClientGraphicMapping(e){return"mesh"===e||"multipatch"===e||"extent"===e}_serializeFeature(e){const{attributes:t}=e,r=this._geometryForSerialization(e),i=(W++).toString();return r?{uid:i,geometry:r.toJSON(),attributes:t}:{uid:i,attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return null==t?null:this._geometryRequiresClientGraphicMapping(t)?t.extent?k.A.fromExtent(t.extent):null:t}async _startWorker(e){this._connection=await(0,P.ho)("MemorySourceWorker",{strategy:(0,O.A)("feature-layers-workers")?"dedicated":"local",signal:e,registryTarget:this});const{fields:t,spatialReference:r,objectIdField:i,hasM:n,hasZ:s,timeInfo:o,dateFieldsTimeZone:a}=this.layer,l="defaults"===this.layer.originOf("spatialReference");await this._prepareClientMapping(this.items,e);const u=this._prepareAddFeatures(this.items);this.addHandles(this.on("before-changes",e=>{d.A.getLogger(this).error("Source modifications will not propagate after layer has been loaded. Please use .applyEdits() instead"),e.preventDefault()}));const p={features:u.features,fields:t?.map(e=>e.toJSON()),geometryType:N.Ye.toJSON(this._workerGeometryType),hasM:"mesh"!==this._layerOrSourceGeometryType&&n,hasZ:"mesh"===this._layerOrSourceGeometryType||s,objectIdField:i,spatialReference:l?null:r&&r.toJSON(),timeInfo:o?.toJSON()??null,dateFieldsTimeZone:a},y=await this._connection.invoke("load",p,{signal:e});for(const e of y.warnings)d.A.getLogger(this.layer).warn("#load()",`${e.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:e});y.featureErrors.length&&d.A.getLogger(this.layer).warn("#load()",`Encountered ${y.featureErrors.length} validation errors while loading features. (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{errors:y.featureErrors});const c=y.layerDefinition;this._geometryTypeRequiresClientGraphicMapping(u.inferredGeometryType)&&(c.geometryType=N.Ye.toJSON(u.inferredGeometryType)),this.sourceJSON=c,this._requiresClientGraphicMapping()&&(this._idToClientGeometry=new Map),u.finish(y.assignedObjectIds)}};(0,i.Cg)([(0,R.u)({Type:D.A,ensureType:(0,L.dp)(D.A)})],z.prototype,"itemType",void 0),(0,i.Cg)([(0,f.MZ)()],z.prototype,"type",void 0),(0,i.Cg)([(0,f.MZ)({constructOnly:!0})],z.prototype,"layer",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],z.prototype,"_workerGeometryType",null),(0,i.Cg)([(0,f.MZ)()],z.prototype,"sourceJSON",void 0),z=(0,i.Cg)([(0,w.$)("esri.layers.graphics.sources.MemorySource")],z);var K=r(52136),Q=r(18768),B=r(63074),H=r(69208),U=r(6455),Y=r(47685),X=r(87718),ee=r(87796),te=r(56658),re=r(16131),ie=r(32756),ne=r(8303),se=r(65008);let oe=class extends se.A{constructor(){super(...arguments),this.updating=!1,this.status="unknown"}};(0,i.Cg)([(0,f.MZ)()],oe.prototype,"updating",void 0),(0,i.Cg)([(0,f.MZ)()],oe.prototype,"status",void 0),oe=(0,i.Cg)([(0,w.$)("esri.layers.support.PublishingInfo")],oe);const ae=Symbol(),le=e=>{var t;const r=e;let n=class extends r{constructor(){super(...arguments),this[t]=!0}static{t=ae}get publishingInfo(){if(this.destroyed)return null;const e=this._get("publishingInfo");if(e)return e;const t=new oe;return this._checkPublishingStatus(t),t}_checkPublishingStatus(e){let t=0;const r=async n=>{let s;e.updating=!0;try{s=await this.fetchPublishingStatus()}catch(e){s="unavailable"}"published"!==s&&"unavailable"!==s||("publishing"===e.status&&this.refresh(),i.remove()),e.status=s,e.updating=!1,i.removed||(t=setTimeout(r,n,n+125))},i={removed:!1,remove(){this.removed=!0,clearTimeout(t)}};this.when().catch(()=>i.remove()),r(250),this.addHandles(i)}};return(0,i.Cg)([(0,f.MZ)({readOnly:!0,clonable:!1})],n.prototype,"publishingInfo",null),n=(0,i.Cg)([(0,w.$)("esri.layers.mixins.PublishableLayer")],n),n};var ue=r(54310),de=r(25036),pe=r(82935),ye=r(63396),ce=r(60694),he=r(10873),ge=r(15426),fe=r(29005),me=r(33143),be=r(25482);let we=class extends((0,o.OU)(be.o)){constructor(e){super(e),this.type=null}};(0,i.Cg)([(0,f.MZ)({type:["date-time","number"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],we.prototype,"type",void 0),we=(0,i.Cg)([(0,w.$)("esri.layers.support.FieldFormat")],we);const ve="auto";let Ce=class extends we{constructor(e){super(e),this.dateStyle=null,this.hour12=ve,this.month=null,this.timeStyle=null,this.type="date-time",this.year=null}};(0,i.Cg)([(0,f.MZ)({type:["full","long","medium","short"],json:{write:!0}})],Ce.prototype,"dateStyle",void 0),(0,i.Cg)([(0,f.MZ)({type:["always","auto","never"],nonNullable:!0,json:{default:ve,write:!0}})],Ce.prototype,"hour12",void 0),(0,i.Cg)([(0,f.MZ)({type:["long","short"],json:{write:!0}})],Ce.prototype,"month",void 0),(0,i.Cg)([(0,f.MZ)({type:["full","long","medium","short"],json:{write:!0}})],Ce.prototype,"timeStyle",void 0),(0,i.Cg)([(0,f.MZ)({type:["date-time"]})],Ce.prototype,"type",void 0),(0,i.Cg)([(0,f.MZ)({type:["numeric"],json:{write:!0}})],Ce.prototype,"year",void 0),Ce=(0,i.Cg)([(0,w.$)("esri.layers.support.DateTimeFieldFormat")],Ce);const Fe={min:0,max:20},Te="decimal",Me="auto";let Se=class extends we{constructor(e){super(e),this.maximumFractionDigits=3,this.minimumFractionDigits=0,this.style=Te,this.type="number",this.useGrouping=Me}};(0,i.Cg)([(0,f.MZ)({type:L.jz,nonNullable:!0,range:Fe,json:{default:3,write:!0}})],Se.prototype,"maximumFractionDigits",void 0),(0,i.Cg)([(0,f.MZ)({type:L.jz,nonNullable:!0,range:Fe,json:{default:0,write:!0}})],Se.prototype,"minimumFractionDigits",void 0),(0,i.Cg)([(0,f.MZ)({type:["decimal"],nonNullable:!0,json:{default:Te,write:!0}})],Se.prototype,"style",void 0),(0,i.Cg)([(0,f.MZ)({type:["number"]})],Se.prototype,"type",void 0),(0,i.Cg)([(0,f.MZ)({type:["always","auto","never"],nonNullable:!0,json:{default:Me,write:!0}})],Se.prototype,"useGrouping",void 0),Se=(0,i.Cg)([(0,w.$)("esri.layers.support.NumberFieldFormat")],Se);const Ie={base:we,key:"type",errorContext:"field-configuration-format",typeMap:{"date-time":Ce,number:Se}};let _e=class extends((0,o.OU)(be.o)){constructor(e){super(e),this.alias=null,this.name=void 0,this.format=null}};(0,i.Cg)([(0,f.MZ)({json:{write:!0}})],_e.prototype,"alias",void 0),(0,i.Cg)([(0,f.MZ)({nonNullable:!0,json:{write:{isRequired:!0}}})],_e.prototype,"name",void 0),(0,i.Cg)([(0,f.MZ)({types:Ie,json:{write:!0}})],_e.prototype,"format",void 0),_e=(0,i.Cg)([(0,w.$)("esri.layers.support.FieldConfiguration")],_e);var Ee=r(30524),Ze=r(41227),Ae=r(68780);function je(e,t){if(Re(t))switch(t.type){case"integer":case"small-integer":case"big-integer":case"long":return De(e);case"single":case"double":return function(e){const t=De(e);return null!=e.places&&(t.maximumFractionDigits=t.minimumFractionDigits=e.places),t}(e);case"date":case"timestamp-offset":return function(e){return new Ce({dateStyle:Oe(e),year:Le(e),month:qe(e),timeStyle:Pe(e),hour12:xe(e)})}(e);case"date-only":return function(e){return new Ce({dateStyle:Oe(e),year:Le(e),month:qe(e)})}(e);case"time-only":return function(e){return new Ce({timeStyle:Pe(e),hour12:xe(e)})}(e)}}function De(e){return new Se({useGrouping:e.digitSeparator?"always":"never"})}function Oe(e){const{dateFormat:t}=e;return t?t.startsWith("short-date")?"short":t.startsWith("day-short-month-year")?"medium":t.startsWith("long-month-day-year")?"long":t.startsWith("long-date")?"full":null:null}function xe(e){return e.dateFormat?.endsWith("-24")?"never":"always"}function qe(e){switch(e.dateFormat){case"short-month-year":return"short";case"long-month-year":return"long";default:return null}}function Pe(e){const{dateFormat:t}=e;return t?t.includes("short-time")?"short":t.includes("long-time")?"medium":null:null}function Le(e){switch(e.dateFormat){case"short-month-year":case"long-month-year":case"year":return"numeric";default:return null}}function Re(e){return(0,Ee.WA)(e)||(0,Ee.vE)(e)||(0,Ee.zD)(e)||(0,Ee.OH)(e)||(0,Ee.Ah)(e)}function Ge(e,t){if(!Re(e))return;const r=t?.maximumFractionDigits??3;switch(e.type){case"integer":case"small-integer":case"big-integer":case"long":return new Se({maximumFractionDigits:0,minimumFractionDigits:0});case"single":case"double":return new Se({maximumFractionDigits:r,minimumFractionDigits:0});case"date":case"timestamp-offset":return new Ce({dateStyle:"short",timeStyle:"short"});case"date-only":return new Ce({dateStyle:"short"});case"time-only":return new Ce({timeStyle:"short"})}}function ke(e,t){const{name:r,alias:i,format:n}=t,s=e.fieldsIndex.get(r);if(!s||!i&&!n)return;const o=i||s.alias,a=Re(s)&&n?Ne(n,s):null;return new Ze.A({fieldName:s.name,label:o,format:a,visible:!1,isEditable:(0,Ee.R$)(s,e)})}function Ne(e,t){if(!Re(t))return;const r="number"===e.type,i="date-time"===e.type;switch(t.type){case"integer":case"small-integer":case"big-integer":case"long":return r?$e(e):null;case"single":case"double":return r?function(e){const t=$e(e);return t.places=e.maximumFractionDigits,t}(e):null;case"date":case"timestamp-offset":return i?function(e){let t;const r=Je(e),i=Ve(e),n="never"===e.hour12?"24":null,s="numeric"===e.year?"year":null,o=We(e);return r&&i&&n?t=`${r}-${i}-${n}`:r&&i?t=`${r}-${i}`:r?t=r:s&&o?t=`${o}-${s}`:s&&(t=s),t?new Ae.A({dateFormat:t}):null}(e):null;case"date-only":return i?function(e){let t;const r=Je(e),i="numeric"===e.year?"year":null,n=We(e);return r?t=r:i&&n?t=`${n}-${i}`:i&&(t=i),t?new Ae.A({dateFormat:t}):null}(e):null;case"time-only":return i?function(e){let t;const r=Ve(e),i="never"===e.hour12?"24":null;return r&&i?t=`short-date-${r}-${i}`:r&&(t=`short-date-${r}`),t?new Ae.A({dateFormat:t}):null}(e):null}}function $e(e){return new Ae.A({digitSeparator:"never"!==e.useGrouping})}function Je(e){switch(e.dateStyle){case"short":return"short-date";case"medium":return"day-short-month-year";case"long":return"long-month-day-year";case"full":return"long-date";default:return}}function Ve(e){return e.timeStyle&&("short"===e.timeStyle?"short-time":"long-time")}function We(e){switch(e.month){case"short":return"short-month";case"long":return"long-month";default:return}}var ze=r(17036),Ke=r(46499),Qe=r(39383),Be=r(22453),He=r(96184),Ue=r(17311),Ye=r(91908),Xe=r(27733),et=r(65494),tt=r(8947),rt=r(41214),it=r(61956),nt=r(54218),st=r(30291),ot=r(33910),at=r(78553);const lt="FeatureLayer";function ut(e,t){return new l.A("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}function dt(e){return e&&e instanceof a.A}const pt=(0,ze.p)();function yt(e,t,r){const i=!!r?.writeLayerSchema;return{enabled:i,ignoreOrigin:i}}let ct=class extends((0,ee.j)((0,te.J)((0,X.F)(le((0,Y.w6)((0,U.FJ)((0,B.dM)((0,ie.fY)((0,pe.e)((0,ye.d)((0,de.j)((0,ue.J)((0,Q.b)((0,re.q)((0,ne.A)((0,y.P)((0,H.d)((0,K.p)((0,o.OU)(j.A)))))))))))))))))))){constructor(...e){super(...e),this.attributeTableTemplate=null,this.charts=null,this.copyright=null,this.displayField=null,this.dynamicDataSource=null,this.fields=null,this.fieldsIndex=null,this.formTemplate=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new A(this),this.hasM=void 0,this.hasZ=void 0,this.infoFor3D=null,this.isTable=!1,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="ArcGISFeatureLayer",this.outFields=null,this.path=null,this.popupEnabled=!0,this.popupTemplate=null,this.resourceInfo=null,this.screenSizePerspectiveEnabled=!0,this.spatialReference=T.A.WGS84,this.subtypeCode=null,this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),this.templates=null,this.timeInfo=null,this.title=null,this.sublayerTitleMode="item-title",this.type="feature",this.typeIdField=null,this.types=null,this.visible=!0,this._debouncedSaveOperations=(0,h.sg)(async(e,t,i)=>{const{save:n,saveAs:s}=await r.e(3359).then(r.bind(r,33359));switch(e){case 0:return n(this,t);case 1:return s(this,i,t)}})}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;if(this.portalItem?.loaded&&this.source)return this.addResolvingPromise(this.createGraphicsSource(t).then(e=>this.initLayerProperties(e))),Promise.resolve(this);const r=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]},e).catch(h.QP).then(async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstValidLayerId(t);null!=e&&(this.layerId=e)}if(!this.url&&!this._hasMemorySource())throw new l.A("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this.initLayerProperties(await this.createGraphicsSource(t))}).then(()=>(0,ge.VA)(this,"load",e));return this.addResolvingPromise(r),Promise.resolve(this)}get _titleCreator(){const e=this._get("_titleCreator");return(0,p.pR)(e),new Ue.A({fieldsIndex:this.fieldsIndex,objectIdField:this.objectIdField,fields:this.fields,displayField:this.displayField,effectivePopupTemplate:this.popupTemplate??this.defaultPopupTemplate})}readCapabilities(e,t){return t=t.layerDefinition||t,(0,Be.S)(t,this.url)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("dynamicDataSource"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return!(this.loaded&&!this.capabilities?.operations.supportsEditing)&&(this._isOverridden("editingEnabled")?this._get("editingEnabled"):this._hasMemorySource()||this.userHasEditingPrivileges)}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}readEditingEnabled(e,t){return this._readEditingEnabled(t,!1)}readEditingEnabledFromWebMap(e,t,r){return this._readEditingEnabled(t,!0,r)}writeEditingEnabled(e,t){this._writeEditingEnabled(e,t,!1)}writeEditingEnabledToWebMap(e,t,r,i){this._writeEditingEnabled(e,t,!0,i)}get effectiveEditingEnabled(){return(0,ge.C$)(this)}get featureTitleFields(){return[...this._titleCreator.requiredFields]}set fieldConfigurations(e){if(this._override("fieldConfigurations",e),!this.loaded)return;const t=function(e,t){const{popupTemplate:r,fieldsIndex:i}=e;if(!r||!i)return;const n=function(e,t,r){t??=[],r=r?(0,u.o8)(r):[];let i=!1;const n=new Map;for(const r of t){const t=e.fieldsIndex.get(r.name);t&&n.set(t.name,r)}for(const t of r){const r=e.fieldsIndex.get(t.fieldName);if(!r)continue;const s=n.get(r.name);t.label=s?.alias||r.alias,t.format=Re(r)&&s?.format?Ne(s.format,r):null,i=!0,n.delete(r.name)}for(const t of n.values()){const n=ke(e,t);n&&(r.push(n),i=!0)}return i?r:null}(e,t,r.fieldInfos);if(!n)return;const s=r.clone();return s.fieldInfos=n,s}(this,e);t&&this._set("popupTemplate",t)}get fieldConfigurations(){return this._isOverridden("fieldConfigurations")?this._get("fieldConfigurations"):function(e){const{popupTemplate:t,fieldsIndex:r}=e,i=t?.fieldInfos;if(!i?.length||!r)return;const n=[];for(const{fieldName:e,label:t,format:s}of i){const i=r.get(e);if(!i)continue;const o=t&&t!==i.alias?t:null,a=Re(i)?s?je(s,i):Ge(i):null;(o||a)&&n.push(new _e({name:i.name,alias:o,format:a}))}return n.length?n:null}(this)||null}get defaultFieldConfigurations(){return function(e){const{fields:t}=e;if(!t?.length)return;const r=[];for(const e of t){const t=Re(e)?Ge(e,{maximumFractionDigits:2}):null;t&&r.push(new _e({name:e.name,format:t}))}return r.length?r:null}(this)}readIsTable(e,t){return"Table"===(t=t?.layerDefinition??t).type||!t.geometryType}writeIsTable(e,t,r,i){i?.writeLayerSchema&&(0,c.sM)(r,e?"Table":"Feature Layer",t)}readGlobalIdField(e,t){return(0,ge.jD)(t.layerDefinition||t)}readObjectIdField(e,t){return(0,ge.Zm)(t.layerDefinition||t)}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,Ee.yp)(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,r){t=t.layerDefinition||t;const i=t.drawingInfo?.renderer;if(i){const e=(0,et.L)(i,t,r)??void 0;return e||d.A.getLogger(this).error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:r}),e}return(0,ge.PD)(t,r)}set source(e){const t=this._get("source");t!==e&&(dt(t)&&this._resetMemorySource(t),dt(e)&&this._initMemorySource(e),this._set("source",e))}castSource(e){return e?Array.isArray(e)||e instanceof a.A?new z({layer:this,items:e}):e:null}readSource(e,t){const r=V.A.fromJSON(t.featureSet);return new z({layer:this,items:r?.features??[]})}readTemplates(e,t){const r=t.editFieldsInfo,i=r?.creatorField,n=r?.editorField;return e=e?.map(e=>fe.A.fromJSON(e)),this._fixTemplates(e,i),this._fixTemplates(e,n),e}readTitle(e,t){const r=t.layerDefinition?.name??t.name,i=t.title||t.layerDefinition?.title;if(r){const e=this.portalItem?.title;if("item-title"===this.sublayerTitleMode)return this.url?(0,ce.yG)(this.url,r):r;let t=r;if(!t&&this.url){const e=(0,ce.qg)(this.url);null!=e&&(t=e.title)}if(!t)return;return"item-title-and-service-name"===this.sublayerTitleMode&&e&&e!==t&&(t=e+" - "+t),(0,ce.cr)(t)}if("item-title"===this.sublayerTitleMode&&i)return i}readTitleFromWebMap(e,t){return t.title||t.layerDefinition?.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find(e=>e.name.toLowerCase()===r);e&&(r=e.name)}return r}readTypes(e,t){e=(t=t.layerDefinition||t).types;const r=t.editFieldsInfo,i=r?.creatorField,n=r?.editorField;return e?.map(e=>(e=me.A.fromJSON(e),this._fixTemplates(e.templates,i),this._fixTemplates(e.templates,n),e))}readVisible(e,t){return null!=t.layerDefinition?.defaultVisibility?!!t.layerDefinition.defaultVisibility:null!=t.visibility?!!t.visibility:void 0}async addAttachment(e,t){const r=await(0,ge.Xl)(this,e,t,lt);return this.lastEditsEventDate=new Date,r}async updateAttachment(e,t,r){const i=await(0,ge.bt)(this,e,t,r,lt);return this.lastEditsEventDate=new Date,i}async applyEdits(e,t){return(0,ge.ct)(this,e,t)}async uploadAssets(e,t){return(0,ge.rn)(this,e,t)}createPopupTemplate(e){return(0,st.tn)(this,e)}async createGraphicsSource(e){if(this._hasMemorySource()&&this.source)return this.source.load({signal:e});const{default:t}=await(0,h.qr)(Promise.all([r.e(708),r.e(364),r.e(8628),r.e(2593)]).then(r.bind(r,72593)),e);return new t({layer:this,supportedSourceTypes:this.supportedSourceTypes}).load({signal:e})}createQuery(){const e=(0,ge.VZ)(this);e.dynamicDataSource=this.dynamicDataSource;const t=null!=this.subtypeCode?`${this.subtypeField} = ${this.subtypeCode}`:null,r=(0,g.mA)(this.definitionExpression,t);return e.where=r||"1=1",e}async deleteAttachments(e,t){const r=await(0,ge.mm)(this,e,t,lt);return this.lastEditsEventDate=new Date,r}async fetchRecomputedExtents(e){return(0,ge.WP)(this,e,lt)}async getFeatureTitle(e,t){return this._titleCreator.getTitle(this,e,t)}async getFeatureTitles(e,t){return this._titleCreator.getTitles(this,e,t)}getFeatureType(e){return(0,ge.xd)(this.types,this.typeIdField,e)}getFieldAlias(e){const t=this.getField(e);if(t)return this.getFieldConfiguration(t.name)?.alias||t.alias}getFieldConfiguration(e){return e=e.toLowerCase(),this.fieldConfigurations?.find(t=>t.name.toLowerCase()===e)}getFieldDomain(e,t){return(0,ge.Vq)(this,e,t,this.getField(e)?.domain??null)}async queryAttachments(e,t){return(0,ge.lV)(this,e,t,lt)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(it.A.from(e)??r.createQuery(),t),n=this.graphicOrigin;if(i?.features)for(const e of i.features)e.layer=e.sourceLayer=r,e.origin=n;return i}async queryObjectIds(e,t){return await(0,ge.sg)(this,e,t,lt)}async queryFeatureCount(e,t){return(0,ge.Ye)(this,e,t,lt)}async queryExtent(e,t){return(0,ge.B5)(this,e,t,lt)}async queryRelatedFeatures(e,t){return(0,ge.hM)(this,e,t,lt)}async queryRelatedFeaturesCount(e,t){return(0,ge.S2)(this,e,t,lt)}async queryTopFeatures(e,t){const{source:i,capabilities:n}=await this.load();if(!i.queryTopFeatures||!n?.query?.supportsTopFeaturesQuery)throw new l.A(lt,"Layer source does not support queryTopFeatures capability");const s=await r.e(7561).then(r.bind(r,57561)),o=await i.queryTopFeatures(s.default.from(e),t);if(o?.features)for(const e of o.features)e.layer=e.sourceLayer=this;return o}async queryAttributeBins(e,t){const{source:i,capabilities:n}=await this.load();if(!i.queryAttributeBins)throw new l.A(lt,"Layer source does not support queryAttributeBins capability");(0,ge.ZJ)(e,n,lt);const s=await Promise.all([r.e(4575),r.e(7136)]).then(r.bind(r,14575)),o=await i.queryAttributeBins(s.default.from(e),t);if(o.features)for(const e of o.features)e.layer=e.sourceLayer=this;return o}async queryTopObjectIds(e,t){const{source:i,capabilities:n}=await this.load();if(!i.queryTopObjectIds||!n?.query.supportsTopFeaturesQuery)throw new l.A(lt,"Layer source does not support queryTopObjectIds capability");const s=await r.e(7561).then(r.bind(r,57561));return(await i.queryTopObjectIds(s.default.from(e),t)).filter(nt.Et)}async queryTopFeaturesExtent(e,t){const{source:i,capabilities:n}=await this.load();if(!i.queryTopExtents||!n?.query?.supportsTopFeaturesQuery)throw new l.A(lt,"Layer source does not support queryTopExtents capability");const s=await r.e(7561).then(r.bind(r,57561));return i.queryTopExtents(s.default.from(e),t)}async queryTopFeatureCount(e,t){const{source:i,capabilities:n}=await this.load();if(!i.queryTopCount||!n?.query?.supportsTopFeaturesQuery)throw new l.A(lt,"Layer source does not support queryFeatureCount capability");const s=await r.e(7561).then(r.bind(r,57561));return i.queryTopCount(s.default.from(e),t)}read(e,t){const r=e.featureCollection;if((r||"Feature Collection"===e.type)&&(this.resourceInfo=e),r){const{layers:e,showLegend:i}=r;1===e?.length&&(super.read(e[0],t),null!=i&&super.read({showLegend:i},t))}super.read(e,t),t&&"service"===t.origin&&(this.revert(["objectIdField","fields","timeInfo","dateFieldsTimeZone"],"service"),this.spatialReference||this.revert(["spatialReference"],"service"))}write(e,t){t={...t,origin:t?.origin??void 0,writeLayerSchema:t?.writeLayerSchema??this._hasMemorySource()};const{origin:r,layerContainerType:i,messages:n}=t;if(this.dynamicDataSource)return n?.push(ut(this,"using a dynamic data source cannot be written to web scenes, web maps and feature service items")),null;if(this.isTable){if(("web-map"===r||"web-scene"===r)&&"tables"!==i)return n?.push(ut(this,`a table source can only be written to tables, not ${i}`)),null;if(this._hasMemorySource())return n?.push(ut(this,"using an in-memory table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&("web-map"===r||"web-scene"===r)&&"tables"===i)return n?.push(ut(this,"using a non-table source cannot be written to tables in web maps or web scenes")),null;return super.write(e,t)}clone(){if(this._hasMemorySource())throw new l.A(lt,`FeatureLayer (title: ${this.title}, id: ${this.id}) created using in-memory source cannot be cloned`);return super.clone()}serviceSupportsSpatialReference(e){return!!this.loaded&&("memory"===this.source?.type||(0,Ye.D)(this,e))}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}_readEditingEnabled(e,t,r){let i=e.layerDefinition?.capabilities;return i?this._hasEditingCapability(i):(i=e.capabilities,t&&"web-map"===r?.origin&&!this._hasMemorySource()&&i?this._hasEditingCapability(i):void 0)}_hasEditingCapability(e){return e.toLowerCase().split(",").map(e=>e.trim()).includes("editing")}_writeEditingEnabled(e,t,r,i){if(!e){const e=this.capabilities?.operations?.supportsSync?"Query,Sync":"Query";(0,c.sM)("layerDefinition.capabilities",e,t),r&&!i?.writeLayerSchema&&(t.capabilities=e)}}_fetchFirstValidLayerId(e){return(0,s.A)(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(e=>{const t=e.data;if(t)return this.applyPreferredHost(t),this.findFirstValidLayerId(t)})}async initLayerProperties(e){return this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),this._verifyFields(),(0,Ee.yp)(this.renderer,this.fieldsIndex),(0,Ee.sv)(this.timeInfo,this.fieldsIndex),this._hasMemorySource()&&"mesh"===this.geometryType&&(this.capabilities.query.supportsReturnMesh=!0),(0,tt.L)(this,{origin:"service"})}async hasDataChanged(){return(0,ge.jp)(this)}async fetchPublishingStatus(){const e=this.source;return e?.fetchPublishingStatus?e.fetchPublishingStatus():"unavailable"}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||this._hasMemorySource()||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some(e=>"geometry"===e.type)||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_fixTemplates(e,t){e&&e.forEach(e=>{const r=e.prototype?.attributes;r&&t&&delete r[t]})}_verifySource(){if(this._hasMemorySource()){if(this.url)throw new l.A("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new l.A("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source")}_initMemorySource(e){e.forEach(e=>{e.layer=this,e.sourceLayer=this}),this.addHandles([e.on("after-add",e=>{e.item.layer=this,e.item.sourceLayer=this}),e.on("after-remove",e=>{e.item.layer=null,e.item.sourceLayer=null})],"fl-source")}_resetMemorySource(e){e.forEach(e=>{e.layer=null,e.sourceLayer=null}),this.removeHandles("fl-source")}_hasMemorySource(){return!(this.url||!this.source)}findFirstValidLayerId(e){return Array.isArray(e.layers)&&e.layers.length>0?e.layers[0].id:Array.isArray(e.tables)&&e.tables.length>0?e.tables[0].id:void 0}};(0,i.Cg)([(0,f.MZ)({clonable:!1,readOnly:!0})],ct.prototype,"_titleCreator",null),(0,i.Cg)([(0,f.MZ)(he.zQ)],ct.prototype,"attributeTableTemplate",void 0),(0,i.Cg)([(0,b.w)("service","capabilities")],ct.prototype,"readCapabilities",null),(0,i.Cg)([(0,f.MZ)({json:{origins:{"web-scene":{write:!1}},write:!0}})],ct.prototype,"charts",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],ct.prototype,"createQueryVersion",null),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"layerDefinition.copyrightText"}}})],ct.prototype,"copyright",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"layerDefinition.displayField"}}})],ct.prototype,"displayField",void 0),(0,i.Cg)([(0,f.MZ)({types:ot.Es,readOnly:!0})],ct.prototype,"defaultSymbol",void 0),(0,i.Cg)([(0,f.MZ)({type:Xe.L})],ct.prototype,"dynamicDataSource",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean})],ct.prototype,"editingEnabled",null),(0,i.Cg)([(0,b.w)(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],ct.prototype,"readEditingEnabled",null),(0,i.Cg)([(0,b.w)("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],ct.prototype,"readEditingEnabledFromWebMap",null),(0,i.Cg)([(0,v.K)(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],ct.prototype,"writeEditingEnabled",null),(0,i.Cg)([(0,v.K)("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],ct.prototype,"writeEditingEnabledToWebMap",null),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],ct.prototype,"effectiveEditingEnabled",null),(0,i.Cg)([(0,f.MZ)({clonable:!1,readOnly:!0})],ct.prototype,"featureTitleFields",null),(0,i.Cg)([(0,f.MZ)({type:[_e],json:{name:"layerDefinition.fieldConfigurations",write:!0,origins:{"web-scene":{write:!1}}}})],ct.prototype,"fieldConfigurations",null),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],ct.prototype,"defaultFieldConfigurations",null),(0,i.Cg)([(0,f.MZ)({...pt.fields,json:{read:{source:"layerDefinition.fields"},origins:{service:{name:"fields"},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:yt}}}}})],ct.prototype,"fields",void 0),(0,i.Cg)([(0,f.MZ)(pt.fieldsIndex)],ct.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,f.MZ)({type:F.A,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],ct.prototype,"formTemplate",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"layerDefinition.extent"}}})],ct.prototype,"fullExtent",void 0),(0,i.Cg)([(0,f.MZ)({json:{origins:{"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:yt,writer(e,t,r){const i=e?ge.iX.toJSON(e):null;i&&(0,c.sM)(r,i,t)}}}},read:{source:"layerDefinition.geometryType",reader:ge.iX.read}}})],ct.prototype,"geometryType",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0,clonable:!1})],ct.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"layerDefinition.hasM"}}})],ct.prototype,"hasM",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"layerDefinition.hasZ"}}})],ct.prototype,"hasZ",void 0),(0,i.Cg)([(0,f.MZ)(he.id)],ct.prototype,"id",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],ct.prototype,"infoFor3D",void 0),(0,i.Cg)([(0,f.MZ)({json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],ct.prototype,"isTable",void 0),(0,i.Cg)([(0,b.w)("service","isTable",["type","geometryType"]),(0,b.w)("isTable",["layerDefinition.type","layerDefinition.geometryType"])],ct.prototype,"readIsTable",null),(0,i.Cg)([(0,v.K)("web-map","isTable")],ct.prototype,"writeIsTable",null),(0,i.Cg)([(0,f.MZ)(he.kF)],ct.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,f.MZ)({type:[Ke.A],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:Qe.w,write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:Qe.w,write:{layerContainerTypes:C.K}}})],ct.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,f.MZ)((()=>{const e=(0,u.o8)(he.Ih);return e.json.origins["portal-item"]={write:{target:"layerDefinition.drawingInfo.transparency",writer(e,t,r){(0,c.sM)(r,(0,at.p)(e),t)}}},e})())],ct.prototype,"opacity",void 0),(0,i.Cg)([(0,f.MZ)(he.fV)],ct.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,f.MZ)({type:["show","hide"],json:(()=>{const e=(0,u.o8)(he.C1.json);return e.origins["portal-item"]={read:!1,write:!1},e})()})],ct.prototype,"listMode",void 0),(0,i.Cg)([(0,b.w)("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],ct.prototype,"readGlobalIdField",null),(0,i.Cg)([(0,f.MZ)({json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:yt}}}}})],ct.prototype,"objectIdField",void 0),(0,i.Cg)([(0,b.w)("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],ct.prototype,"readObjectIdField",null),(0,i.Cg)([(0,f.MZ)({type:["ArcGISFeatureLayer"],json:{write:{target:"layerType",ignoreOrigin:!0,layerContainerTypes:C.K}}})],ct.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,f.MZ)(pt.outFields)],ct.prototype,"outFields",void 0),(0,i.Cg)([(0,f.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],ct.prototype,"path",void 0),(0,i.Cg)([(0,f.MZ)(he.M6)],ct.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,f.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],ct.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],ct.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,f.MZ)({types:rt.Hg,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:rt.XJ,name:"layerDefinition.drawingInfo.renderer",write:{layerContainerTypes:C.K,overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema,layerContainerTypes:C.K})}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema,layerContainerTypes:C.K})}}})],ct.prototype,"renderer",null),(0,i.Cg)([(0,b.w)("service","renderer",["drawingInfo.renderer","defaultSymbol"]),(0,b.w)("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],ct.prototype,"readRenderer",null),(0,i.Cg)([(0,f.MZ)()],ct.prototype,"resourceInfo",void 0),(0,i.Cg)([(0,f.MZ)((()=>{const e=(0,u.o8)(he.PY);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],ct.prototype,"screenSizePerspectiveEnabled",void 0),(0,i.Cg)([(0,f.MZ)({clonable:!1})],ct.prototype,"source",null),(0,i.Cg)([(0,m.w)("source")],ct.prototype,"castSource",null),(0,i.Cg)([(0,b.w)("portal-item","source",["featureSet"]),(0,b.w)("web-map","source",["featureSet"])],ct.prototype,"readSource",null),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"layerDefinition.extent.spatialReference"}}})],ct.prototype,"spatialReference",void 0),(0,i.Cg)([(0,f.MZ)({type:Number})],ct.prototype,"subtypeCode",void 0),(0,i.Cg)([(0,f.MZ)({type:[fe.A]})],ct.prototype,"templates",void 0),(0,i.Cg)([(0,b.w)("templates",["editFieldsInfo","creatorField","editorField","templates"])],ct.prototype,"readTemplates",null),(0,i.Cg)([(0,f.MZ)({type:He.A})],ct.prototype,"timeInfo",void 0),(0,i.Cg)([(0,f.MZ)()],ct.prototype,"title",void 0),(0,i.Cg)([(0,b.w)("service","title",["name"]),(0,b.w)("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],ct.prototype,"readTitle",null),(0,i.Cg)([(0,b.w)("web-map","title",["layerDefinition.name","title"])],ct.prototype,"readTitleFromWebMap",null),(0,i.Cg)([(0,f.MZ)({type:String})],ct.prototype,"sublayerTitleMode",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:!1}})],ct.prototype,"type",void 0),(0,i.Cg)([(0,f.MZ)({type:String})],ct.prototype,"typeIdField",void 0),(0,i.Cg)([(0,b.w)("service","typeIdField"),(0,b.w)("typeIdField",["layerDefinition.typeIdField"])],ct.prototype,"readTypeIdField",null),(0,i.Cg)([(0,f.MZ)({type:[me.A]})],ct.prototype,"types",void 0),(0,i.Cg)([(0,b.w)("service","types",["types"]),(0,b.w)("types",["layerDefinition.types"])],ct.prototype,"readTypes",null),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility",layerContainerTypes:C.K}}}}})],ct.prototype,"visible",void 0),(0,i.Cg)([(0,b.w)("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],ct.prototype,"readVisible",null),ct=(0,i.Cg)([(0,w.$)("esri.layers.FeatureLayer")],ct)},63396:(e,t,r)=>{r.d(t,{d:()=>T});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608)),o=r(60950),a=r(99959);class l extends a.A{constructor(e){super(),this.type="track",this.trackInfoProvider=e}get id(){return this.trackInfoProvider.id}get[o.ym](){return this.trackInfoProvider.trackInfo}}var u=r(37838),d=r(69540),p=r(25482),y=r(93637),c=r(43937),h=r(50820),g=r(10873),f=r(46499),m=r(41214);let b=class extends((0,d.OU)(p.o)){constructor(e){super(e),this.labelingInfo=null,this.labelsVisible=!0,this.renderer=null,this.visible=!0}};(0,i.Cg)([(0,n.MZ)({type:[f.A],json:{write:!0}})],b.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,n.MZ)(g.kF)],b.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,n.MZ)({types:m.Hg,json:{write:!0}})],b.prototype,"renderer",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,json:{write:!0}})],b.prototype,"visible",void 0),b=(0,i.Cg)([(0,s.$)("esri.layers.support.TrackPartInfo")],b);var w=r(96576),v=r(59868),C=r(10184);let F=class extends((0,d.OU)(p.o)){constructor(e){super(e),this.enabled=!0,this.fields=[],this.latestObservations=new b({renderer:new w.A({symbol:v.UK.clone()})}),this.maxDisplayDuration=null,this.maxDisplayObservationsPerTrack=0,this.popupEnabled=!0,this.popupTemplate=null,this.previousObservations=new b({renderer:new w.A({symbol:v.UK.clone()})}),this.trackLines=new b({renderer:new w.A({symbol:v.A7.clone()})}),this.timeField="startTimeField"}writeFields(e,t,r){const i=e.filter(e=>"avg_angle"!==e.statisticType).map(e=>e.toJSON());(0,y.sM)(r,i,t)}};(0,i.Cg)([(0,n.MZ)({type:Boolean,json:{write:!0}})],F.prototype,"enabled",void 0),(0,i.Cg)([(0,n.MZ)({type:[h.A],json:{write:!0}})],F.prototype,"fields",void 0),(0,i.Cg)([(0,c.K)("fields")],F.prototype,"writeFields",null),(0,i.Cg)([(0,n.MZ)({type:b,json:{write:!0}})],F.prototype,"latestObservations",void 0),(0,i.Cg)([(0,n.MZ)({type:C.A,json:{write:!0}})],F.prototype,"maxDisplayDuration",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{write:!0}})],F.prototype,"maxDisplayObservationsPerTrack",void 0),(0,i.Cg)([(0,n.MZ)(g.M6)],F.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,n.MZ)({type:u.A,json:{name:"popupInfo",write:!0}})],F.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,n.MZ)({type:b,json:{write:!0}})],F.prototype,"previousObservations",void 0),(0,i.Cg)([(0,n.MZ)({type:b,json:{write:!0}})],F.prototype,"trackLines",void 0),(0,i.Cg)([(0,n.MZ)({type:["timeReceived","startTimeField","endTimeField"],json:{read:!0,write:!0}})],F.prototype,"timeField",void 0),F=(0,i.Cg)([(0,s.$)("esri.layers.support.TrackInfo")],F);const T=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.trackGraphicOrigin=new l(this),this.trackInfo=null}};return(0,i.Cg)([(0,n.MZ)({readOnly:!0,clonable:!1})],r.prototype,"trackGraphicOrigin",void 0),(0,i.Cg)([(0,n.MZ)({type:F})],r.prototype,"trackInfo",void 0),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.TrackableLayer")],r),r}},96520:(e,t,r)=>{r.d(t,{u:()=>o});var i=r(83047),n=r(21325);function s(e,t,r){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=r)}function o(e,t,r){if(!e&&!t||!r)return;const n=(0,i.G9)(r);a(e,r,n),a(t,r,n)}function a(e,t,r){if(e)for(const i of e)l(i.geometry,t,r)}function l(e,t,r){if(!e?.spatialReference||(0,n.aI)(e.spatialReference,t))return;const o=(0,i.G9)(e.spatialReference)/r;if(1!==o)if("x"in e)null!=e.z&&(e.z*=o);else if("rings"in e)s(e,e.rings,o);else if("paths"in e)s(e,e.paths,o);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=o)}}}]);