@arcgis/core 5.1.0-next.88 → 5.1.0-next.89

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 (82) hide show
  1. package/arcade/validation/arcadeValidator.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/0840e7dd62643c56ae9e.js +1 -0
  4. package/assets/esri/core/workers/chunks/{500be1fb7cc9efec875c.js → 0e3dcf99382478181366.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{aae40d70eb01249c1bab.js → 1e4e7111d43f01c149b3.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{2549a07f403447482f4e.js → 2dcfc4d7e76c922bcbf9.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{4dc91c2208201ba34c90.js → 3397eae416622c64e628.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{b9e163f4a898e50cc854.js → 39d6032d79720935910d.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{d05a7ce6c1d4b883ed4c.js → 41cbde4738ae4adf973d.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{a401d44a5b45c05072c2.js → 4b9b9e6136c11d5d7901.js} +1 -1
  11. package/assets/esri/core/workers/chunks/5409369d0d637cb30257.js +1 -0
  12. package/assets/esri/core/workers/chunks/{defac06f9e2b43090677.js → 73af4c947e8151d411c1.js} +2 -2
  13. package/assets/esri/core/workers/chunks/{01bd1b86ba899c6aa4c0.js → 75c09a2fa4c34b4844c5.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{b2983f521d8c96becd8a.js → 7ed5b669010db58845f8.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{8178e9ba3c568d406a87.js → 81d761c837b7456ec99f.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{7185486c6dc28fc367a1.js → 90a8dfb03a437fe8a6e7.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{c9065cee85eb8dde6a42.js → a2159df718a7f2f59271.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{7f34fa9f154f5101cb13.js → a232d05c0a055f398c6e.js} +1 -1
  19. package/assets/esri/core/workers/chunks/a508104179e08f0f268c.js +2 -0
  20. package/assets/esri/core/workers/chunks/{4baf66314f82cfa76beb.js → adfa5c136c72c1e65770.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{004af103a94d21cb4889.js → aefeb5a17bb481c95da3.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{164ee62f2211987ad850.js → bb8d596f15fd3a0d783a.js} +1 -1
  23. package/assets/esri/core/workers/chunks/bea2fd831d7a864e5995.js +596 -0
  24. package/assets/esri/core/workers/chunks/{3cf77b7a61f78f9bcd62.js → ceff78c9e31e3572a082.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{5cc38ac051d3d0557920.js → cfaa6e205bfc0c94a1b1.js} +1 -1
  26. package/assets/esri/core/workers/chunks/d5ad036d282df54b9ddc.js +1 -0
  27. package/assets/esri/core/workers/chunks/{475394218caaa4cd3e86.js → d7e7f3efd1d28617b808.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{f37e4ae0e9be80210db0.js → f2c11f54255fd506655e.js} +1 -1
  29. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  30. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  31. package/chunks/ComponentShader.glsl.js +3 -3
  32. package/chunks/index.js +1 -1
  33. package/config.js +1 -1
  34. package/interfaces.d.ts +7 -0
  35. package/kernel.js +1 -1
  36. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  37. package/package.json +2 -2
  38. package/support/revision.js +1 -1
  39. package/views/3d/input/handlers/KeyboardNavigation.js +1 -1
  40. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  41. package/views/3d/layers/support/IntegratedMesh3DTilesVertexProcessing.js +1 -1
  42. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  43. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +3 -3
  44. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +22 -16
  45. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizer.js +1 -1
  46. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  47. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  48. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
  49. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBuffer.js +1 -1
  50. package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
  51. package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
  52. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  53. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  54. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  55. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  56. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  57. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  58. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  59. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  60. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  61. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  62. package/views/3d/webgl-engine/materials/renderers/TextureBufferCache.js +1 -1
  63. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
  64. package/views/3d/webgl-engine/shaders/RibbonLineLayouts.js +2 -0
  65. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  66. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  67. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  68. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +64 -0
  69. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +2 -0
  70. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.d.ts +3 -0
  71. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
  72. package/widgets/BatchAttributeForm/inputs/GroupInput.d.ts +2 -1
  73. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  74. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  75. package/widgets/BatchAttributeForm/inputs/types.d.ts +4 -2
  76. package/assets/esri/core/workers/chunks/3e72bd6dbfc52d956c06.js +0 -1
  77. package/assets/esri/core/workers/chunks/a429355534bf6cbd8304.js +0 -1
  78. package/assets/esri/core/workers/chunks/d00dddc3881fa29446e1.js +0 -1
  79. package/assets/esri/core/workers/chunks/f9fe3c9867b0bdb2aec6.js +0 -596
  80. package/assets/esri/core/workers/chunks/fe30e61652716fcccf16.js +0 -2
  81. /package/assets/esri/core/workers/chunks/{defac06f9e2b43090677.js.LICENSE.txt → 73af4c947e8151d411c1.js.LICENSE.txt} +0 -0
  82. /package/assets/esri/core/workers/chunks/{fe30e61652716fcccf16.js.LICENSE.txt → a508104179e08f0f268c.js.LICENSE.txt} +0 -0
@@ -246,7 +246,7 @@ screenSizePerspectiveScaleFactor(absCosAngle, distanceToCamera, params)
246
246
  return size * clamp(mix(factor.x, 1.0, factor.y), factor.z, 1.0);
247
247
  }`),t.vertex.code.add(o.H`vec2 screenSizePerspectiveScaleVec2(vec2 size, float absCosAngle, float distanceToCamera, vec3 params) {
248
248
  return applyScreenSizePerspectiveScaleFactorVec2(size, screenSizePerspectiveScaleFactor(absCosAngle, distanceToCamera, params));
249
- }`)}function c(t){t.uniforms.add(new s.t("screenSizePerspective",t=>l(t.screenSizePerspective,t.screenSizePerspectiveMinPixelReferenceSize)))}function h(t){t.uniforms.add(new s.t("screenSizePerspectiveAlignment",t=>l(t.screenSizePerspectiveAlignment||t.screenSizePerspective,t.screenSizePerspectiveAlignment?null:t.screenSizePerspectiveMinPixelReferenceSize)))}function l(t,e){const i=null!=e&&null!=t?Math.min(t.minPixelSize/e,1):0;return t?(0,r.hZ)(u,t.divisor,t.offset,i):(0,r.hZ)(u,0,0,0)}const u=(0,n.vt)()},77949(t,e,i){i.d(e,{NB:()=>p,Nz:()=>_,S7:()=>g,yu:()=>d});var r=i(58083),n=i(9093),s=i(35522),o=i(51850),a=i(23205),c=i(40710),h=i(33094),l=i(58029),u=i(97102);function d(t,e){e.instancedDoublePrecision?t.constants.add("cameraPosition","vec3",o.uY):t.uniforms.add(new c.W("cameraPosition",(t,e)=>(0,s.hZ)(m,e.camera.viewInverseTransposeMatrix[3]-t.origin[0],e.camera.viewInverseTransposeMatrix[7]-t.origin[1],e.camera.viewInverseTransposeMatrix[11]-t.origin[2])))}function p(t,e){if(!e.instancedDoublePrecision)return void t.uniforms.add(new l.F("proj",t=>t.camera.projectionMatrix),new u.S("view",(t,e)=>(0,r.Tl)(f,e.camera.viewMatrix,t.origin)),new c.W("localOrigin",t=>t.origin));const i=({camera:t})=>(0,s.hZ)(m,t.viewInverseTransposeMatrix[3],t.viewInverseTransposeMatrix[7],t.viewInverseTransposeMatrix[11]);t.uniforms.add(new l.F("proj",t=>t.camera.projectionMatrix),new l.F("view",t=>(0,r.Tl)(f,t.camera.viewMatrix,i(t))),new a.d("localOrigin",t=>i(t)))}const f=(0,n.vt)(),m=(0,o.vt)();function g(t){t.uniforms.add(new l.F("viewNormal",t=>t.camera.viewInverseTransposeMatrix))}function _(t){t.uniforms.add(new h.U("pixelRatio",t=>t.camera.pixelRatio/t.overlayStretch))}},77108(t,e,i){i.d(e,{E:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"vec2",0,(r,n)=>r.setUniform2fv(t,e(n),i))}}},68259(t,e,i){i.d(e,{t:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"vec2",2,(r,n,s,o)=>r.setUniform2fv(t,e(n,s,o),i))}}},47286(t,e,i){i.d(e,{G:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"vec2",1,(r,n,s)=>r.setUniform2fv(t,e(n,s),i))}}},23205(t,e,i){i.d(e,{d:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"vec3",0,(r,n)=>r.setUniform3fv(t,e(n),i))}}},14314(t,e,i){i.d(e,{I:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"vec4",0,(r,n)=>r.setUniform4fv(t,e(n),i))}}},71988(t,e,i){i.d(e,{E:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"vec4",1,(r,n,s)=>r.setUniform4fv(t,e(n,s),i))}}},33094(t,e,i){i.d(e,{U:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"float",0,(r,n)=>r.setUniform1f(t,e(n),i))}}},44887(t,e,i){i.d(e,{x:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i,r){super(t,"float",1,(e,n,s)=>e.setUniform1fv(t,i(n,s),r),e)}}},35818(t,e,i){i.d(e,{W:()=>n});var r=i(74333);class n extends r.n{constructor(t,e){super(t,"int",0,(i,r)=>i.setUniform1i(t,e(r)))}}},93588(t,e,i){i.d(e,{c:()=>n});var r=i(74333);class n extends r.n{constructor(t,e){super(t,"int",1,(i,r,n)=>i.setUniform1i(t,e(r,n)))}}},35644(t,e,i){i.d(e,{k:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"mat3",1,(r,n,s)=>r.setUniformMatrix3fv(t,e(n,s),i))}}},58029(t,e,i){i.d(e,{F:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"mat4",0,(r,n)=>r.setUniformMatrix4fv(t,e(n),i))}}},97102(t,e,i){i.d(e,{S:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"mat4",2,(r,n,s)=>r.setUniformMatrix4fv(t,e(n,s),i))}}},12791(t,e,i){i.d(e,{x:()=>n});var r=i(74333);class n extends r.n{constructor(t,e){super(t,"sampler2D",0,(i,r)=>i.bindTexture(t,e(r)))}}},13840(t,e,i){i.d(e,{r:()=>r});class r{constructor(t,e){this._module=t,this._load=e}get(){return this._module}async reload(){return this._module=await this._load(),this._module}}},98958(t,e,i){i.d(e,{w:()=>f});var r=i(5482),n=i(69622),s=i(53966),o=i(91429),a=i(41976),c=(i(44208),i(26857)),h=i(94656);class l{constructor(t,e,i){this._context=t,this.locations=i,this._textures=new Map,this.source=(0,h.en)()?e:null,e.attributeNames.forEach(t=>{i.has(t)||s.A.getLogger("esri.views.3d.webgl-engine.lib.Program").error(`Missing VertexAttributeLocation for ${t} used in shader`)}),this._glProgram=t.programCache.get(e.generate("vertex",!0),e.generate("fragment",!0),i),this._glProgram.stop=()=>{throw new Error("Wrapped _glProgram used directly")},this.bind=e.generateBind(this),this.bindPass=e.generateBindPass(this),this.bindDraw=e.generateBindDraw(this)}get glName(){return this._glProgram.glName}get hasTransformFeedbackVaryings(){return this._glProgram.hasTransformFeedbackVaryings}get compiled(){return this._glProgram.compiled}setUniform1b(t,e){this._glProgram.setUniform1i(t,e?1:0)}setUniform1i(t,e){this._glProgram.setUniform1i(t,e)}setUniform1f(t,e,i){this._glProgram.setUniform1f(t,e,i)}setUniform2fv(t,e,i){this._glProgram.setUniform2fv(t,e,i)}setUniform3fv(t,e,i){this._glProgram.setUniform3fv(t,e,i)}setUniform4fv(t,e,i){this._glProgram.setUniform4fv(t,e,i)}setUniformMatrix3fv(t,e,i){this._glProgram.setUniformMatrix3fv(t,e,!1,i)}setUniformMatrix4fv(t,e,i){this._glProgram.setUniformMatrix4fv(t,e,!1,i)}setUniformMatrices4fv(t,e,i){this._glProgram.setUniformMatrices4fv(t,e,!1,i)}setUniform1fv(t,e,i){this._glProgram.setUniform1fv(t,e,i)}setUniform1iv(t,e){this._glProgram.setUniform1iv(t,e)}setUniform2iv(t,e){this._glProgram.setUniform2iv(t,e)}setUniform3iv(t,e){this._glProgram.setUniform3iv(t,e)}setUniform4iv(t,e){this._glProgram.setUniform4iv(t,e)}assertCompatibleVertexAttributeLocations(t,e){if(c.b.ENABLE_OPTIMIZATIONS)return;let i=t.locations;if(e){const t=new Map(i);e.forEach((e,r)=>t.set(r,i.size+e)),i=t}i.size!==this.locations.size&&console.error(`VertexAttributeLocations are incompatible: ${i}, ${this.locations}`),this.locations.forEach((t,e)=>{i.get(e)!==t&&console.error(`VertexAttributeLocations are incompatible: Program has ${e} at position ${t}, VAO has it at position ${i.get(e)}.`)})}stop(){this._textures.clear()}bindTexture(t,e,i){if(!e?.glName){const i=`Texture sampler ${t} in ${this._context.debugBoundTechnique} has no given Texture in ${(new Error).stack}`;(0,h.en)()&&console.error(i),e=this._context.emptyTexture}const r=this._ensureTextureUnit(t,e);this._context.useProgram(this);const n=r.unit;this.setUniform1i(t,n),this._context.bindTexture(e,n,!1,i)}_ensureTextureUnit(t,e){let i=this._textures.get(t);return null==i?(i={texture:e,unit:this._textures.size},this._textures.set(t,i)):i.texture=e,i}}var u=i(63907),d=i(90644),p=i(85079);let f=class extends n.A{constructor(t,e,i){super({}),this._context=t,this._configuration=e,this.primitiveType=u.WR.TRIANGLES,this._unused=!0,this.ignoreUnused=!1,this.key=e.key,this.locations=(0,p.Xk)(i??a.lK),this._pipeline=this.initializePipeline(e),this.reload=async i=>{if(i&&await this.shader.reload(),!this.key.equals(e.key))return void s.A.getLogger("esri.views.3d.webgl.ShaderTechnique").warn(`Configuration was changed after construction, cannot reload shader for ${this.declaredClass}.`);const r=this.shader.get().build(e);r.debugName=this.declaredClass,this._program=new l(t.rctx,r,this.locations),this._pipeline=this.initializePipeline(e)}}initialize(){const t=this.shader.get().build(this._configuration);t.debugName=this.declaredClass,this._program=new l(this._context.rctx,t,this.locations)}get program(){return this._unused=!1,this._program}get compiled(){return this._unused=!1,this.program.compiled}get unused(){return this._unused}ensureAttributeLocations(t){this.program.assertCompatibleVertexAttributeLocations(t)}getPipeline(t,e){return this._pipeline}initializePipeline(t){return(0,d.Ey)({blending:d.RC,colorWrite:d.kn})}};f=(0,r.Cg)([(0,o.$K)("esri.views.3d.webgl-engine.core.shaderTechnique.ShaderTechnique")],f)},51976(t,e,i){i.d(e,{K:()=>a,W:()=>c});var r=i(49186),n=i(4576);class s{constructor(t){this._bits=[...t]}equals(t){return(0,n.aI)(this._bits,t.bits)}get code(){return this._code??=String.fromCharCode(...this._bits),this._code}get bits(){return this._bits}}var o=i(65786);class a extends o.Y{constructor(){super(),this._parameterBits=this._parameterBits?.map(()=>0)??[],this._parameterNames??=[]}get key(){return this._key??=new s(this._parameterBits),this._key}decode(t=this.key){const e=this._parameterBits;this._parameterBits=[...t.bits];const i=this._parameterNames.map(t=>` ${t}: ${this[t]}`).join("\n");return this._parameterBits=e,i}}function c(t={}){return(e,i)=>{e.hasOwnProperty("_parameterNames")||Object.defineProperty(e,"_parameterNames",{value:e._parameterNames?.slice()??[],configurable:!0,writable:!0}),e.hasOwnProperty("_parameterBits")||Object.defineProperty(e,"_parameterBits",{value:e._parameterBits?.slice()??[0],configurable:!0,writable:!0}),e._parameterNames.push(i);const n=t.count||2,s=Math.ceil(Math.log2(n)),o=e._parameterBits;let a=0;for(;o[a]+s>16;)a++,a>=o.length&&o.push(0);const c=o[a],h=(1<<s)-1<<c;o[a]+=s,t.count?Object.defineProperty(e,i,{get(){return(this._parameterBits[a]&h)>>c},set(e){const n=this._parameterBits[a];if((n&h)>>c!==e){if(this._key=null,this._parameterBits[a]=n&~h|+e<<c&h,"number"!=typeof e)throw new r.A("internal:invalid-shader-configuration",`Configuration value for ${i} must be a number, got ${typeof e}`);if(null==t.count)throw new r.A("internal:invalid-shader-configuration",`Configuration value for ${i} must provide a count option`)}}}):Object.defineProperty(e,i,{get(){return!!((this._parameterBits[a]&h)>>c)},set(t){const e=this._parameterBits[a];if(!!((e&h)>>c)!==t&&(this._key=null,this._parameterBits[a]=e&~h|+t<<c,"boolean"!=typeof t))throw new r.A("internal:invalid-shader-configurationx",`Configuration value for ${i} must be boolean, got ${typeof t}`)}})}}},16943(t,e,i){i.d(e,{E:()=>n});var r=i(44208);function n(){return!!(0,r.A)("enable-feature:objectAndLayerId-rendering")}},41976(t,e,i){i.d(e,{lK:()=>a,wR:()=>o});var r=i(63907),n=i(85079),s=i(74038);const o=[],a=(new s._("position",3,r.pe.FLOAT,0,12),[new s._("position",2,r.pe.FLOAT,0,8)]);(0,n.Xk)(a),new s._("position",2,r.pe.FLOAT,0,12),new s._("uv0",2,r.pe.HALF_FLOAT,8,12),new s._("position",2,r.pe.FLOAT,0,16),new s._("uv0",2,r.pe.FLOAT,8,16)},92130(t,e,i){i.d(e,{A:()=>r});class r{constructor(t){this._material=t.material,this._techniques=t.techniques}dispose(){}get _stippleTextures(){return this._techniques.context?.stippleTextures}get _markerTextures(){return this._techniques.context?.markerTextures}getTechnique(t,e){return this._techniques.get(t,this._material.getConfiguration(e))}ensureResources(t){return 2}}},63500(t,e,i){i.d(e,{V:()=>E});var r=i(9093),n=i(35522),s=i(97146),o=i(46610),a=i(34275),c=i(20498);function h(t){if(t.length<a.y9)return Array.from(t);if(Array.isArray(t))return Float64Array.from(t);if(!("BYTES_PER_ELEMENT"in t))return Array.from(t);switch(t.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(t);case 2:return(0,a.LW)(t)?(0,c.pX)().from(t):(0,a.jq)(t)?Uint16Array.from(t):Int16Array.from(t);case 4:return Float32Array.from(t);default:return Float64Array.from(t)}}var l=i(15142),u=i(51850),d=i(620);class p{get center(){return(0,u.fA)(this._data[0],this._data[1],this._data[2])}get radius(){return this._data[3]}get bbMin(){return(0,u.fA)(this._data[4],this._data[5],this._data[6])}get bbMax(){return(0,u.fA)(this._data[7],this._data[8],this._data[9])}constructor(t,e,i){this.primitiveIndices=t,this._numIndexPerPrimitive=e,this.position=i,this._data=[.1,0,0,0,0,0,0,0,0,0],this._children=void 0,(0,d.vA)(t.length>=1),(0,d.vA)(3===i.size||4===i.size);const{data:r,size:s,indices:o}=i;(0,d.vA)(o.length%this._numIndexPerPrimitive===0),(0,d.vA)(o.length>=t.length*this._numIndexPerPrimitive);const a=t.length;let c=s*o[this._numIndexPerPrimitive*t[0]];f.clear(),f.push(c);const h=(0,u.fA)(r[c],r[c+1],r[c+2]),l=(0,u.o8)(h);for(let e=0;e<a;++e){const i=this._numIndexPerPrimitive*t[e];for(let t=0;t<this._numIndexPerPrimitive;++t){c=s*o[i+t],f.push(c);let e=r[c];h[0]=Math.min(e,h[0]),l[0]=Math.max(e,l[0]),e=r[c+1],h[1]=Math.min(e,h[1]),l[1]=Math.max(e,l[1]),e=r[c+2],h[2]=Math.min(e,h[2]),l[2]=Math.max(e,l[2])}}for(let t=0;t<3;++t)this._data[4+t]=h[t],this._data[7+t]=l[t];const p=(0,n.Cc)((0,u.vt)(),this.bbMin,this.bbMax,.5);let m=.5*Math.max(Math.max(l[0]-h[0],l[1]-h[1]),l[2]-h[2]),g=m*m;for(let t=0;t<f.length;++t){c=f.at(t);const e=r[c]-p[0],i=r[c+1]-p[1],n=r[c+2]-p[2],s=e*e+i*i+n*n;if(s<=g)continue;const o=Math.sqrt(s),a=.5*(o-m);m+=a,g=m*m;const h=a/o;p[0]+=e*h,p[1]+=i*h,p[2]+=n*h}this._data[3]=m;for(let t=0;t<3;++t)this._data[0+t]=p[t];f.clear()}getChildren(){if(this._children||(0,n.hG)(this.bbMin,this.bbMax)<=1)return this._children;const t=(0,n.Cc)((0,u.vt)(),this.bbMin,this.bbMax,.5),e=this.primitiveIndices.length,i=new Uint8Array(e),r=new Array(8);for(let t=0;t<8;++t)r[t]=0;const{data:s,size:o,indices:a}=this.position;for(let n=0;n<e;++n){let e=0;const c=this._numIndexPerPrimitive*this.primitiveIndices[n];let h=o*a[c],l=s[h],u=s[h+1],d=s[h+2];for(let t=1;t<this._numIndexPerPrimitive;++t){h=o*a[c+t];const e=s[h],i=s[h+1],r=s[h+2];e<l&&(l=e),i<u&&(u=i),r<d&&(d=r)}l<t[0]&&(e|=1),u<t[1]&&(e|=2),d<t[2]&&(e|=4),i[n]=e,++r[e]}let c=0;for(let t=0;t<8;++t)r[t]>0&&++c;if(c<2)return;const h=new Array(8);for(let t=0;t<8;++t)h[t]=r[t]>0?new Uint32Array(r[t]):void 0;for(let t=0;t<8;++t)r[t]=0;for(let t=0;t<e;++t){const e=i[t];h[e][r[e]++]=this.primitiveIndices[t]}this._children=new Array;for(let t=0;t<8;++t)void 0!==h[t]&&this._children.push(new p(h[t],this._numIndexPerPrimitive,this.position));return this._children}static prune(){f.prune()}}const f=new l.A({deallocator:null});var m=i(24326);class g{constructor(t){this.id=(0,m.c)(),this._attributes=new Map;for(const[e,i]of t)this._attributes.set(e,{...i,indices:(0,s.Dg)(i.indices)})}get attributes(){return this._attributes}}var _=i(4341),v=i(11964);function y(t,e,i){return(0,n.Re)(x,e,t),(0,n.Re)(b,i,t),.5*(0,n.Bw)((0,n.$A)(x,x,b))}i(32114),new _.I(v.vt),new _.I(()=>{return t?{p0:(0,u.o8)(t.p0),p1:(0,u.o8)(t.p1),p2:(0,u.o8)(t.p2)}:{p0:(0,u.vt)(),p1:(0,u.vt)(),p2:(0,u.vt)()};var t});const x=(0,u.vt)(),b=(0,u.vt)(),w=(0,u.vt)(),T=(0,u.vt)(),A=(0,u.vt)(),M=(0,u.vt)();var C=i(17478),S=i(94656);class E extends g{constructor(t,e,i=null,r=0,n=null,s=-1,o,a){super(e),this.material=t,this.mapPositions=i,this.type=r,this.olidColor=n,this.edgeIndicesLength=s,this.baseGeometry=o,this.drawIndices=a,this._vertexPositionIndicesCache=void 0,this._highlights=null,this._highlightOptionsCounts=null,this.visible=!0,this._boundingInfo=null,(0,d.vA)((t?.useIndexing??!1)===(null!=a),"Material index requirement and Geometry must match");const c=this.positionAttribute;null!=c&&this.edgeIndicesLength<0&&(this.edgeIndicesLength=c.indices.length)}instantiate(t={}){const e=new E(t.material||this.material,[],this.mapPositions,this.type,this.olidColor,this.edgeIndicesLength,this.baseGeometry,this.drawIndices);return this._attributes.forEach((t,i)=>{t.exclusive=!1,e._attributes.set(i,t)}),e._boundingInfo=this._boundingInfo,e.transformation=t.transformation||this.transformation,e}getMutableAttribute(t){let e=this._attributes.get(t);return e&&!e.exclusive&&(e={...e,exclusive:!0,data:h(e.data)},this._attributes.set(t,e)),e}setAttributeData(t,e){const i=this._attributes.get(t);i?this._attributes.set(t,{...i,exclusive:!0,data:e}):(0,S.en)()&&console.warn(`Setting undefined attribute ${t} data`)}get primitivePositionIndices(){if(void 0!==this._vertexPositionIndicesCache)return this._vertexPositionIndicesCache;const{drawIndices:t}=this,e=this.positionAttribute;if(null!=t&&null!=e){const i=new Array;for(const r of t)i.push(e.indices[r]);this._vertexPositionIndicesCache=i}else this._vertexPositionIndicesCache=e?.indices??null;return this._vertexPositionIndicesCache}get positionAttribute(){return this.attributes.get("position")??this.baseGeometry?.attributes.get("position")}get indexCount(){const t=this.drawIndices??this.positionAttribute?.indices;return t?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(t){return!!(0===this.type?this._computeAttachmentOriginTriangles(t):2===this.type?this._computeAttachmentOriginLines(t):this._computeAttachmentOriginPoints(t))&&(null!=this._transformation&&(0,n.Z0)(t,t,this._transformation),!0)}_computeAttachmentOriginTriangles(t){return function(t,e,i=e?.indices){if(!e||!i)return!1;const{size:r,data:s}=e;(0,n.hZ)(t,0,0,0),(0,n.hZ)(M,0,0,0);let o=0,a=0;for(let e=0;e<i.length-2;e+=3){const c=i[e]*r,h=i[e+1]*r,l=i[e+2]*r;(0,n.hZ)(w,s[c],s[c+1],s[c+2]),(0,n.hZ)(T,s[h],s[h+1],s[h+2]),(0,n.hZ)(A,s[l],s[l+1],s[l+2]);const u=y(w,T,A);u?((0,n.WQ)(w,w,T),(0,n.WQ)(w,w,A),(0,n.hs)(w,w,1/3*u),(0,n.WQ)(t,t,w),o+=u):((0,n.WQ)(M,M,w),(0,n.WQ)(M,M,T),(0,n.WQ)(M,M,A),a+=3)}return!(0===a&&0===o||(0!==o?((0,n.hs)(t,t,1/o),0):0===a||((0,n.hs)(t,M,1/a),0)))}(t,this.positionAttribute,this.primitivePositionIndices)}_computeAttachmentOriginLines(t){const e=this.positionAttribute,i=this.primitivePositionIndices;return function(t,e,i,r=e?.indices){if(!e||!r)return!1;(0,n.hZ)(t,0,0,0),(0,n.hZ)(M,0,0,0);let s=0,o=0;const{size:a,data:c}=e,h=r.length-1,l=h+(i?2:0);for(let e=0;e<l;e+=2){const i=e<h?e+1:0,l=r[e<h?e:h]*a,u=r[i]*a;w[0]=c[l],w[1]=c[l+1],w[2]=c[l+2],T[0]=c[u],T[1]=c[u+1],T[2]=c[u+2],(0,n.hs)(w,(0,n.WQ)(w,w,T),.5);const d=(0,n.xg)(w,T);d>0?((0,n.WQ)(t,t,(0,n.hs)(w,w,d)),s+=d):0===s&&((0,n.WQ)(M,M,w),o++)}return 0!==s?((0,n.hs)(t,t,1/s),!0):0!==o&&((0,n.hs)(t,M,1/o),!0)}(t,e,function(t,e){return!(!("isClosed"in t)||!t.isClosed)&&e.indices.length>2}(this.material.parameters,e),i)}_computeAttachmentOriginPoints(t){return function(t,e,i=e?.indices){if(!e||!i)return!1;const{size:r,data:s}=e;(0,n.hZ)(t,0,0,0);let o=-1,a=0;for(let e=0;e<i.length;e++){const n=i[e]*r;o!==n&&(t[0]+=s[n],t[1]+=s[n+1],t[2]+=s[n+2],a++),o=n}return a>1&&(0,n.hs)(t,t,1/a),a>0}(t,this.positionAttribute,this.primitivePositionIndices)}invalidateBoundingInfo(){this._boundingInfo=null,this._vertexPositionIndicesCache=void 0}_calculateBoundingInfo(){const t=this.positionAttribute,e=this.primitivePositionIndices;if(!t||!e||0===e.length)return null;const i=e===t.indices?t:new o.n(t.data,e,t.size,!1,t.stride),r=0===this.type?3:1;(0,d.vA)(e.length%r===0,"Indexing error: "+e.length+" not divisible by "+r);const n=(0,s.tM)(e.length/r);return new p(n,r,i)}get transformation(){return this._transformation??r.zK}set transformation(t){this._transformation=t&&t!==r.zK?(0,r.o8)(t):null}get highlights(){return this._highlights||R}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}foreachHighlightOptions(t){this._highlightOptionsCounts?.forEach((e,i)=>t(i))}allocateIdAndHighlight(t){const e=new C.h(t);return this.addHighlight(e)}addHighlight(t){this._ensureHighlights().add(t);const{highlightName:e}=t,i=(this._highlightOptionsCounts?.get(e)??0)+1;return this._ensureHighlightOptionsCounts().set(e,i),t}_ensureHighlights(){let t=this._highlights;return t||(t=new Set,this._highlights=t),t}_ensureHighlightOptionsCounts(){let t=this._highlightOptionsCounts;return t||(t=new Map,this._highlightOptionsCounts=t),t}removeHighlight(t){if(this._highlights?.delete(t)){const{highlightName:e}=t,i=this._highlightOptionsCounts?.get(e)??0;i<=1?this._highlightOptionsCounts?.delete(e):this._ensureHighlightOptionsCounts().set(e,i-1)}}}const R=new Set},49718(t,e,i){i(51850),i(6867).i},6867(t,e,i){i.d(e,{i:()=>l});var r=i(58083),n=i(9093),s=i(35522),o=i(51850),a=i(78955),c=i(91829),h=i(71351);class l{get ray(){return this._ray}get distanceInRenderSpace(){return null==this.distance?null:((0,s.hs)(d,this.ray.direction,this.distance),(0,s.Bw)(d))}withinDistance(t){return!!u(this)&&this.distanceInRenderSpace<=t}getIntersectionPoint(t){return!!u(this)&&((0,s.hs)(d,this.ray.direction,this.distance),(0,s.WQ)(t,this.ray.origin,d),!0)}getTransformedNormal(t){return(0,s.C)(p,this.normal),p[3]=0,(0,a.Z0)(p,p,this.transformation),(0,s.C)(t,p),(0,s.S8)(t,t)}constructor(t){this.intersector=4,this.normal=(0,o.vt)(),this.transformation=(0,n.vt)(),this._ray=(0,h.vt)(),this.init(t)}init(t){this.distance=this.target=this.drapedLayerOrder=this.renderPriority=null,this.intersector=4,(0,h.C)(t,this._ray)}set(t,e,i,a,c,h,l){this.intersector=t,this.distance=i,(0,s.C)(this.normal,a??o.Cb),(0,r.C)(this.transformation,c??n.zK),this.target=e,this.drapedLayerOrder=h,this.renderPriority=l}copy(t){(0,h.C)(t.ray,this._ray),this.intersector=t.intersector,this.distance=t.distance,this.target=t.target,this.drapedLayerOrder=t.drapedLayerOrder,this.renderPriority=t.renderPriority,(0,s.C)(this.normal,t.normal),(0,r.C)(this.transformation,t.transformation)}}function u(t){return null!=t?.distance}const d=(0,o.vt)(),p=(0,c.vt)()},18845(t,e,i){i.d(e,{h:()=>U});var r=i(49186),n=i(65529),s=i(97768),o=i(17676),a=i(34275),c=i(24326),h=i(84952),l=i(38969),u=i(31217),d=i(95117),p=i(2741);let f;var m=i(63907),g=i(21231),_=i(42293);let v=null,y=null;async function x(){return null==y&&(f??=(async()=>{const t=await i.e(9321).then(i.bind(i,49321)),e=await t.default({locateFile:t=>(0,p.s)(`esri/libs/basisu/${t}`)});return e.initializeBasis(),e})(),y=f,v=await y),y}function b(t,e){if(null==v)return t.byteLength;const i=new v.BasisFile(new Uint8Array(t)),r=A(i)?T(i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),e):0;return i.close(),i.delete(),r}function w(t,e){if(null==v)return t.byteLength;const i=new v.KTX2File(new Uint8Array(t)),r=M(i)?T(i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),e):0;return i.close(),i.delete(),r}function T(t,e,i,r,n){const s=(0,_.MW)(e?m.CQ.COMPRESSED_RGBA8_ETC2_EAC:m.CQ.COMPRESSED_RGB8_ETC2),o=n&&t>1?(4**t-1)/(3*4**(t-1)):1;return Math.ceil(i*r*s*o)}function A(t){return t.getNumImages()>=1&&!t.isUASTC()}function M(t){return t.getFaces()>=1&&(t.isETC1S()||t.isUASTC())}function C(t,e,i,r,n,s,o,a){const{compressedTextureETC:c,compressedTextureS3TC:h}=t.capabilities,[l,u]=c?r?[1,m.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[0,m.CQ.COMPRESSED_RGB8_ETC2]:h?r?[3,m.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[2,m.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[13,6408],d=e.hasMipmap?i:Math.min(1,i),p=[];for(let t=0;t<d;t++)p.push(new Uint8Array(o(t,l))),a(t,l,p[t]);return e.internalFormat=u,e.hasMipmap=p.length>1,e.samplingMode=e.hasMipmap?9987:9729,e.width=n,e.height=s,new g.A(t,e,{type:"compressed",levels:p})}var S=i(53966);const E=()=>S.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function R(t){return t.charCodeAt(0)+(t.charCodeAt(1)<<8)+(t.charCodeAt(2)<<16)+(t.charCodeAt(3)<<24)}const I=R("DXT1"),O=R("DXT3"),D=R("DXT5");function F(t,e){const i=new Int32Array(t.buffer,t.byteOffset,31);if(542327876!==i[0])return E().error("Invalid magic number in DDS header"),null;if(!(4&i[20]))return E().error("Unsupported format, must contain a FourCC code"),null;const r=i[21];let n,s;switch(r){case I:n=8,s=m.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case O:n=16,s=m.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case D:n=16,s=m.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return E().error("Unsupported FourCC code:",function(t){return String.fromCharCode(255&t,t>>8&255,t>>16&255,t>>24&255)}(r)),null}let o=1,a=i[4],c=i[3];(3&a||3&c)&&(E().warn("Rounding up compressed texture size to nearest multiple of 4."),a=a+3&-4,c=c+3&-4);const h=a,l=c;let u,d;131072&i[2]&&!1!==e&&(o=Math.max(1,i[7]));let p=t.byteOffset+i[1]+4;const f=[];for(let e=0;e<o;++e)d=(a+3>>2)*(c+3>>2)*n,u=new Uint8Array(t.buffer,p,d),f.push(u),p+=d,a=Math.max(1,a>>1),c=Math.max(1,c>>1);return{textureData:{type:"compressed",levels:f},internalFormat:s,width:h,height:l}}var P=i(78988),N=i(620),B=i(67171),L=i(12541);class U{constructor(t,e){this._data=t,this.id=(0,c.c)(),this.events=new n.bk,this._parameters={...z,...e},this._startPreload(t)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(t){t instanceof HTMLVideoElement?(this.update=e=>this._update(t,e),this._startPreloadVideoElement(t)):t instanceof HTMLImageElement&&this._startPreloadImageElement(t)}_startPreloadVideoElement(t){if(!((0,h.w8)(t.src)||"auto"===t.preload&&t.crossOrigin)&&(t.preload="auto",t.crossOrigin="anonymous",t.src=t.src,t.paused&&t.autoplay)){const e=[];(0,l.i)(t,t=>e.push(t)).then(()=>{t.play()}).finally(()=>e.forEach(t=>t.remove()))}}_startPreloadImageElement(t){(0,h.DB)(t.src)||(0,h.w8)(t.src)||t.crossOrigin||(t.crossOrigin="anonymous",t.src=t.src)}_createDescriptor(t){const e=new B.R;return e.wrapMode=this._parameters.wrap??10497,e.flipped=!this._parameters.noUnpackFlip,e.samplingMode=this._parameters.mipmap?9987:9729,e.hasMipmap=!!this._parameters.mipmap,e.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,e.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?t.parameters.maxMaxAnisotropy:1),e.dataType=this._parameters.dataType??e.dataType,e.pixelFormat=this._parameters.pixelFormat??e.pixelFormat,e.internalFormat=this._parameters.internalFormat??e.internalFormat,e.isImmutable=!0===this._parameters.immutable&&function(t){return null!=t&&((0,L.tl)(t)||(0,L.tr)(t)||(0,L.CR)(t)||(0,L.QJ)(t))}(this._parameters.internalFormat),e}get texture(){return this._texture??this._emptyTexture}get loaded(){return null!=this._texture}get usedMemory(){return this._texture?.usedMemory||function(t,e){if(null==t)return 0;if((0,a.mw)(t)||(0,a.mg)(t))return"image/ktx2"===e.encoding?w(t,!!e.mipmap):"image/x.basis"===e.encoding?b(t,!!e.mipmap):t.byteLength;const{width:i,height:r}=t instanceof Image||t instanceof ImageData||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement?H(t):e,n=e.pixelFormat??6408,s=(0,_.wH)(n);return(e.mipmap?4/3:1)*i*r*s||0}(this._data,this._parameters)}load(t){if(this._loadingPromise)return this._loadingPromise;if(this._texture)return this._texture;const e=this._data;return null==e?(this._texture=new g.A(t,this._createDescriptor(t),null),this._texture):(this._emptyTexture=t.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof e?this._loadFromURL(t,e):e instanceof Image?this._loadFromImageElement(t,e):e instanceof HTMLVideoElement?this._loadFromVideoElement(t,e):e instanceof ImageData||e instanceof HTMLCanvasElement?this._loadFromImage(t,e):(0,a.mg)(e)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(t,e):(0,a.mw)(e)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(t,new Uint8Array(e)):((0,a.mw)(e)||(0,a.mg)(e))&&"image/ktx2"===this._parameters.encoding?this._loadFromKTX2(t,e):((0,a.mw)(e)||(0,a.mg)(e))&&"image/x.basis"===this._parameters.encoding?this._loadFromBasis(t,e):(0,a.mw)(e)?this._loadFromPixelData(t,new Uint8Array(e)):(0,a.iu)(e)?this._loadFromPixelData(t,e):null)}_update(t,e){return null==this._texture||t.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||e===t.currentTime?e:(this._texture.setData(t),this._texture.descriptor.hasMipmap&&this._texture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),t.currentTime)}_loadFromDDSData(t,e){return this._texture=function(t,e,i){const r=F(i,e.hasMipmap??!1);if(null==r)throw new Error("DDS texture data is null");const{textureData:n,internalFormat:s,width:o,height:a}=r;return e.samplingMode=n.levels.length>1?9987:9729,e.hasMipmap=n.levels.length>1,e.internalFormat=s,e.width=o,e.height=a,new g.A(t,e,n)}(t,this._createDescriptor(t),e),this._emptyTexture=null,this._texture}_loadFromKTX2(t,e){return this._loadAsync(()=>async function(t,e,i){null==v&&(v=await x());const r=new v.KTX2File(new Uint8Array(i));if(!M(r))return null;r.startTranscoding();const n=C(t,e,r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),(t,e)=>r.getImageTranscodedSizeInBytes(t,0,0,e),(t,e,i)=>r.transcodeImage(i,t,0,0,e,0,-1,-1));return r.close(),r.delete(),n}(t,this._createDescriptor(t),e).then(t=>(this._texture=t,t)))}_loadFromBasis(t,e){return this._loadAsync(()=>async function(t,e,i){null==v&&(v=await x());const r=new v.BasisFile(new Uint8Array(i));if(!A(r))return null;r.startTranscoding();const n=C(t,e,r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),(t,e)=>r.getImageTranscodedSizeInBytes(0,t,e),(t,e,i)=>r.transcodeImage(i,0,t,e,0,0));return r.close(),r.delete(),n}(t,this._createDescriptor(t),e).then(t=>(this._texture=t,t)))}_loadFromPixelData(t,e){(0,N.vA)(this._parameters.width>0&&this._parameters.height>0);const i=this._createDescriptor(t);return 6407!==i.pixelFormat&&6408!==i.pixelFormat||(i.compress=this._parameters.compressionOptions),i.width=this._parameters.width??0,i.height=this._parameters.height??0,this._texture=new g.A(t,i,e),this._texture}_loadFromURL(t,e){return this._loadAsync(async i=>{const r=await(0,u.D)(e,{signal:i});return(0,o.Te)(i),this._loadFromImage(t,r)})}_loadFromImageElement(t,e){return e.complete?this._loadFromImage(t,e):this._loadAsync(async i=>{const r=await(0,d.y)(e,e.src,!1,i);return(0,o.Te)(i),this._loadFromImage(t,r)})}_loadFromVideoElement(t,e){return e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(t,e):this._loadFromVideoElementAsync(t,e)}_loadFromVideoElementAsync(t,e){return this._loadAsync(i=>new Promise((n,a)=>{const c=()=>{e.removeEventListener("loadeddata",h),e.removeEventListener("error",l),(0,s.xt)(u)},h=()=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(c(),n(this._loadFromImage(t,e)))},l=t=>{c(),a(t||new r.A("texture:load-error","Failed to load video"))};e.addEventListener("loadeddata",h),e.addEventListener("error",l);const u=(0,o.u7)(i,()=>l((0,o.NK)()))}))}_loadFromImage(t,e){let i=e;i instanceof HTMLVideoElement||(i=(0,P.vM)(i,t.parameters));const r=H(i);this._parameters.width=r.width,this._parameters.height=r.height;const n=this._createDescriptor(t);return n.width=r.width,n.height=r.height,n.compress=this._parameters.compressionOptions,this._texture=new g.A(t,n,i),this._emptyTexture=null,this.events.emit("loaded"),this._texture}_loadAsync(t){const e=new AbortController;this._loadingController=e;const i=t(e.signal);this._loadingPromise=i;const r=()=>{this._loadingController===e&&(this._loadingController=null),this._loadingPromise===i&&(this._loadingPromise=null),this._emptyTexture=null};return i.then(r,r),i}unload(){if(this._texture=(0,s.WD)(this._texture),this._emptyTexture=null,null!=this._loadingController){const t=this._loadingController;this._loadingController=null,this._loadingPromise=null,t.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function H(t){return t instanceof HTMLVideoElement?{width:t.videoWidth,height:t.videoHeight}:t}const z={wrap:{s:10497,t:10497},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1}},11725(t,e,i){i.d(e,{i:()=>a});var r=i(24326),n=i(49255),s=i(43616),o=i(65786);class a{constructor(t,e){this.id=(0,r.c)(),this.supportsEdges=!1,this._renderPriority=0,this._parameters=new e,(0,s.MB)(this._parameters,t),this.validateParameters(this._parameters)}get useIndexing(){return this.parameters.useIndexing??!1}get parameters(){return this._parameters}update(t){return!1}setParameters(t,e=!0){(0,s.MB)(this._parameters,t)&&(this.validateParameters(this._parameters),e&&this._parametersChanged())}validateParameters(t){}shouldRender(t){return this.visible&&this.isVisibleForOutput(t.output)&&(!this.parameters.isDecoration||t.bind.decorations)&&0!==(this.parameters.renderOccluded&t.renderOccludedMask)}isVisibleForOutput(t){return!0}get renderPriority(){return this._renderPriority}set renderPriority(t){t!==this._renderPriority&&(this._renderPriority=t,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}get renderOccludedFlags(){return this.visible?this.parameters.renderOccluded:0}get testsTransparentRenderOrder(){return this.parameters.testsTransparentRenderOrder}get hasEmissions(){return 0}getConfiguration(t){return this.updateConfiguration(t),this._configuration}updateConfiguration(t){this._configuration.output=t.output,this._configuration.hasEmission=t.hasEmission&&(0,n._o)(t.output),this._configuration.hasHighlightMixTexture=10===t.output&&null!=t.highlightMixTexture,this._configuration.useFloatBlend=t.useFloatBlend.value,this._configuration.emissionDimmingPass=t.transparentWithoutDepthEmissionDimmingPass&&(0,n._o)(t.output)}}o.Y},17478(t,e,i){i.d(e,{h:()=>s,p:()=>o});var r=i(24326);class n{constructor(){this.uid=(0,r.c)()}}class s extends n{constructor(t){super(),this.highlightName=t,this.channel=0}}class o extends n{constructor(){super(...arguments),this.channel=1}}},33524(t,e,i){i.d(e,{Yf:()=>o,mt:()=>c,z5:()=>a});var r=i(49255),n=i(90644);const s=(0,n.p3)(1,0,1,771);function o(t,e=!1,i=!1){if(i)return n.uR;switch(t){case 0:return e?n.RC:n.T8;case 1:return s;default:return null}}function a(t){if(t.draped)return null;switch(t.output){case 0:case 2:default:return t.writeDepth?n.Uy:null;case 1:return null}}function c(t,e=513){return{func:(0,r.Sp)(t)?515:e}}},56133(t,e,i){i.d(e,{Ax:()=>h,Q0:()=>u,cP:()=>c,iB:()=>l,m:()=>n,r8:()=>a,sf:()=>s,v0:()=>o});var r=i(90644);const n={func:513},s={func:519},o={mask:255},a={mask:0},c=(0,r.nk)(2,2,{compare:519,fail:7680,zFail:7680,zPass:0}),h=(0,r.nk)(2,2,{compare:519,fail:7680,zFail:7680,zPass:7681}),l=(0,r.nk)(2,2,{compare:514,fail:7680,zFail:7680,zPass:7680}),u=(0,r.nk)(2,2,{compare:517,fail:7680,zFail:7680,zPass:7680})},77194(t,e,i){i.d(e,{PS:()=>n}),i(44208);var r=i(34727);class n{constructor(){this._scale=0,this._angleFactor=0,this._minScale=0}update(t,e,i,r){i?(this._scale=Math.min(i.divisor/(e-i.offset),1),this._angleFactor=function(t){return Math.abs(t)**3}(t),this._minScale=null!=r?Math.min(i.minPixelSize/r,1):0):(this._scale=1,this._minScale=1,this._angleFactor=1)}apply(t){const{_scale:e,_angleFactor:i,_minScale:n}=this;return t*(0,r.qE)((0,r.Cc)(e,1,i),n,1)}applyVec2(t,e){t[0]=this.apply(e[0]),t[1]=this.apply(e[1])}}},78988(t,e,i){i.d(e,{Mv:()=>n,vM:()=>s});var r=i(49186);function n(t,e){return e=16*Math.floor(e/16),Math.min(16*Math.round(t/16),e)}function s(t,e){const[i,r]=o(t,e);return t.width===i&&t.height===r?t:a(t,i,r)}function o({width:t,height:e},{maxPreferredTexturePixels:i,maxTextureSize:r}){const s=Math.max(t,e),o=t*e;if(s<=r&&o<=i)return[t,e];const a=Math.min(Math.sqrt(i/o),r/s);return[n(Math.round(t*a),r),n(Math.round(e*a),r)]}function a(t,e,i){if(t instanceof ImageData)return a(function(t){const e=document.createElement("canvas");e.width=t.width,e.height=t.height;const i=e.getContext("2d");if(null==i)throw new r.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return i.putImageData(t,0,0),e}(t),e,i);const n=document.createElement("canvas");return n.width=e,n.height=i,n.getContext("2d").drawImage(t,0,0,n.width,n.height),n}},16396(t,e,i){i.d(e,{ou:()=>c}),i(77690),i(29242),i(58083),i(9093);var r=i(35522),n=i(51850),s=i(94008),o=i(57005);const a=new class{constructor(t=0){this.offset=t,this.tmpVertex=(0,n.vt)(),this._tmpSphere=new s.iy}applyToVertex(t,e,i){const n=this.objectTransform.transform,s=(0,r.hZ)(h,t,e,i),o=(0,r.Z0)(s,s,n),a=this.offset/(0,r.Bw)(o);(0,r.Ln)(o,o,o,a);const c=this.objectTransform.inverse;return(0,r.Z0)(this.tmpVertex,o,c),this.tmpVertex}applyToMinMax(t,e){const i=this.offset/(0,r.Bw)(t);(0,r.Ln)(t,t,t,i);const n=this.offset/(0,r.Bw)(e);(0,r.Ln)(e,e,e,n)}applyToAabb(t){const e=this.offset/Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]+=t[0]*e,t[1]+=t[1]*e,t[2]+=t[2]*e;const i=this.offset/Math.sqrt(t[3]*t[3]+t[4]*t[4]+t[5]*t[5]);return t[3]+=t[3]*i,t[4]+=t[4]*i,t[5]+=t[5]*i,t}applyToBoundingSphere(t){const e=t.center,i=(0,r.Bw)(e),n=this.offset/i;return(0,r.Ln)(this._tmpSphere.center,e,e,n),this._tmpSphere.radius=t.radius+t.radius*this.offset/i,this._tmpSphere}};function c(t){return null!=t?(a.offset=t,a):null}new class{constructor(t=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpVertex=(0,n.vt)(),this._tmpMbs=new s.iy,this._tmpObb=new o.ab,this._resetOffset(t)}_resetOffset(t){this._offset=t,this._totalOffset=t}set offset(t){this._resetOffset(t)}get offset(){return this._offset}set componentOffset(t){this._totalOffset=this._offset+t}set localOrigin(t){this.componentLocalOriginLength=(0,r.Bw)(t)}applyToVertex(t,e,i){const n=(0,r.hZ)(h,t,e,i),s=(0,r.hZ)(l,t,e,i+this.componentLocalOriginLength),o=this._totalOffset/(0,r.Bw)(s);return(0,r.Ln)(this._tmpVertex,n,s,o),this._tmpVertex}applyToAabb(t){const e=this.componentLocalOriginLength,i=t[0],r=t[1],n=t[2]+e,s=t[3],o=t[4],a=t[5]+e,c=Math.abs(i),h=Math.abs(r),l=Math.abs(n),u=Math.abs(s),d=Math.abs(o),p=Math.abs(a),f=.5*(1+Math.sign(i*s))*Math.min(c,u),m=.5*(1+Math.sign(r*o))*Math.min(h,d),g=.5*(1+Math.sign(n*a))*Math.min(l,p),_=Math.sqrt(f*f+m*m+g*g),v=Math.sign(c+i),y=Math.sign(h+r),x=Math.sign(l+n),b=Math.sign(u+s),w=Math.sign(d+o),T=Math.sign(p+a),A=this._totalOffset;if(_<A)return t[0]-=(1-v)*A,t[1]-=(1-y)*A,t[2]-=(1-x)*A,t[3]+=b*A,t[4]+=w*A,t[5]+=T*A,t;const M=Math.max(c,u),C=Math.max(h,d),S=Math.max(l,p),E=A/Math.sqrt(M*M+C*C+S*S),R=A/_,I=R-E,O=-I;return t[0]+=i*(v*O+R),t[1]+=r*(y*O+R),t[2]+=n*(x*O+R),t[3]+=s*(b*I+E),t[4]+=o*(w*I+E),t[5]+=a*(T*I+E),t}applyToMbs(t){const e=t.center,i=(0,r.Bw)(e),n=this._totalOffset/i;return(0,r.Ln)(this._tmpMbs.center,e,e,n),this._tmpMbs.radius=t.radius+t.radius*this._totalOffset/i,this._tmpMbs}applyToObb(t){return(0,o.gm)(t,this._totalOffset,this._totalOffset,1,this._tmpObb),this._tmpObb}},new class{constructor(t=0){this.offset=t,this.tmpVertex=(0,n.vt)()}applyToVertex(t,e,i){const n=(0,r.hZ)(h,t,e,i),s=(0,r.WQ)(l,n,this.localOrigin),o=this.offset/(0,r.Bw)(s);return(0,r.Ln)(this.tmpVertex,n,s,o),this.tmpVertex}applyToAabb(t){const e=u,i=d,r=p;for(let n=0;n<3;++n)e[n]=t[0+n]+this.localOrigin[n],i[n]=t[3+n]+this.localOrigin[n],r[n]=e[n];const n=this.applyToVertex(e[0],e[1],e[2]);for(let e=0;e<3;++e)t[e]=n[e],t[e+3]=n[e];const s=e=>{const i=this.applyToVertex(e[0],e[1],e[2]);for(let e=0;e<3;++e)t[e]=Math.min(t[e],i[e]),t[e+3]=Math.max(t[e+3],i[e])};for(let t=1;t<8;++t){for(let n=0;n<3;++n)r[n]=t&1<<n?i[n]:e[n];s(r)}let o=0;for(let t=0;t<3;++t)e[t]*i[t]<0&&(o|=1<<t);if(0!==o&&7!==o)for(let t=0;t<8;++t)if(0===(o&t)){for(let n=0;n<3;++n)r[n]=o&1<<n?0:t&1<<n?e[n]:i[n];s(r)}for(let e=0;e<3;++e)t[e]-=this.localOrigin[e],t[e+3]-=this.localOrigin[e];return t}};const h=(0,n.vt)(),l=(0,n.vt)(),u=(0,n.vt)(),d=(0,n.vt)(),p=(0,n.vt)()},75497(t,e,i){i.d(e,{$p:()=>s,Qx:()=>o,e_:()=>a});var r=i(51850),n=i(37957);class s{constructor(t=(0,r.Ul)()){this.intensity=t}}class o{constructor(t=(0,r.Ul)(),e=(0,r.fA)(.57735,.57735,.57735),i=!0,n=1,s=1){this.intensity=t,this.direction=e,this.castShadows=i,this.specularStrength=n,this.environmentStrength=s}}class a{constructor(){this.r=n.P.create(),this.g=n.P.create(),this.b=n.P.create()}clear(){this.r.fill(0),this.g.fill(0),this.b.fill(0)}}},57226(t,e,i){i.d(e,{TA:()=>x,uH:()=>y});var r=i(34727),n=i(35522),s=i(51850),o=i(75497);function a(t,e,i){i.length=t.length;for(let r=0;r<t.length;r++)i[r]=t[r]*e;return i}function c(t,e,i){(i=i||t).length=t.length;for(let r=0;r<t.length;r++)i[r]=t[r]+e[r];return i}var h=i(37957);const l=.28209479177;function u(t,e){(0,n.ze)(m,t.direction),function(t,e){const i=t[0],r=t[1],n=t[2],s=e||h.P.create();s[0]=l,s[1]=.4886025119*i,s[2]=.4886025119*n,s[3]=.4886025119*r,s[4]=1.09254843059*i*r,s[5]=1.09254843059*r*n,s[6]=.31539156525*(3*n*n-1),s[7]=1.09254843059*i*n,s[8]=.54627421529*(i*i-r*r)}(m,p),function(t,e,i){(i=i||t).length=t.length;for(let r=0;r<t.length;r++)i[r]=t[r]*e[r]}(p,g),a(p,t.intensity[0],f),c(e.r,f),a(p,t.intensity[1],f),c(e.g,f),a(p,t.intensity[2],f),c(e.b,f)}function d(t,e){e.r[0]+=l*g[0]*t.intensity[0]*4*Math.PI,e.g[0]+=l*g[0]*t.intensity[1]*4*Math.PI,e.b[0]+=l*g[0]*t.intensity[2]*4*Math.PI}const p=h.P.create(),f=h.P.create(),m=(0,s.vt)(),g=[3.141593,2.094395,2.094395,2.094395,.785398,.785398,.785398,.785398,.785398];class _{constructor(){this.color=(0,s.vt)(),this.intensity=1}}class v{constructor(){this.direction=(0,s.vt)(),this.ambient=new _,this.diffuse=new _}}const y=.4;class x{constructor(){this._legacy=new v,this.globalFactor=.5,this.noonFactor=.5,this._sphericalHarmonics=new o.e_,this._mainLight=new o.Qx((0,s.vt)(),(0,s.fA)(1,0,0),!1)}get legacy(){return this._legacy}get sh(){return this._sphericalHarmonics}get mainLight(){return this._mainLight}set(t){(function(t,e,i){var r;i.clear(),(0,n.hZ)(e.intensity,0,0,0),r=t,Array.isArray(r)?Array.isArray(t)&&((0,n.C)(e.direction,t[0].direction),(0,n.C)(e.intensity,t[0].intensity),e.specularStrength=t[0].specularStrength,e.environmentStrength=t[0].environmentStrength,e.castShadows=t[0].castShadows,u(t[2],i),d(t[1],i)):d(t,i)})(t,this._mainLight,this._sphericalHarmonics),this.updateLegacy()}updateLegacy(){(0,n.C)(this._legacy.direction,this._mainLight.direction);const t=1/Math.PI;this._legacy.ambient.color[0]=.282095*this._sphericalHarmonics.r[0]*t,this._legacy.ambient.color[1]=.282095*this._sphericalHarmonics.g[0]*t,this._legacy.ambient.color[2]=.282095*this._sphericalHarmonics.b[0]*t,(0,n.hs)(this._legacy.diffuse.color,this._mainLight.intensity,t),(0,n.C)(b,this._legacy.diffuse.color),(0,n.hs)(b,b,y*this.globalFactor),(0,n.WQ)(this._legacy.ambient.color,this._legacy.ambient.color,b)}copyFrom(t){h.P.copy(this._sphericalHarmonics.r,t.sh.r),h.P.copy(this._sphericalHarmonics.g,t.sh.g),h.P.copy(this._sphericalHarmonics.b,t.sh.b),(0,n.C)(this._mainLight.direction,t.mainLight.direction),(0,n.C)(this._mainLight.intensity,t.mainLight.intensity),this._mainLight.castShadows=t.mainLight.castShadows,this._mainLight.specularStrength=t.mainLight.specularStrength,this._mainLight.environmentStrength=t.mainLight.environmentStrength,this.globalFactor=t.globalFactor,this.noonFactor=t.noonFactor}lerpLighting(t,e,i){if((0,n.Cc)(this._mainLight.intensity,t.mainLight.intensity,e.mainLight.intensity,i),this._mainLight.environmentStrength=(0,r.Cc)(t.mainLight.environmentStrength,e.mainLight.environmentStrength,i),this._mainLight.specularStrength=(0,r.Cc)(t.mainLight.specularStrength,e.mainLight.specularStrength,i),(0,n.C)(this._mainLight.direction,e.mainLight.direction),this._mainLight.castShadows=e.mainLight.castShadows,this.globalFactor=(0,r.Cc)(t.globalFactor,e.globalFactor,i),this.noonFactor=(0,r.Cc)(t.noonFactor,e.noonFactor,i),t.sh.r.length===e.sh.r.length)for(let n=0;n<e.sh.r.length;n++)this._sphericalHarmonics.r[n]=(0,r.Cc)(t.sh.r[n],e.sh.r[n],i),this._sphericalHarmonics.g[n]=(0,r.Cc)(t.sh.g[n],e.sh.g[n],i),this._sphericalHarmonics.b[n]=(0,r.Cc)(t.sh.b[n],e.sh.b[n],i);else for(let t=0;t<e.sh.r.length;t++)this._sphericalHarmonics.r[t]=e.sh.r[t],this._sphericalHarmonics.g[t]=e.sh.g[t],this._sphericalHarmonics.b[t]=e.sh.b[t];this.updateLegacy()}}const b=(0,s.vt)()},33442(t,e,i){i.d(e,{Tk:()=>_,b6:()=>p,sG:()=>u});var r=i(35522),n=i(51850),s=i(49255);const o=d(-1),a=d(1),c=o,h=new Array;h[0]=null,h[1]=a,h[2]=o,h[3]=d(-2),h[4]=d(-3);const l=h.map(t=>function(t,e){return e?{factor:t.factor+e.factor,units:t.units+e.units}:t}(c,t));function u({output:t,enableOITOffset:e,polygonOffset:i}){return(0,s.Sp)(t)&&e?l[i]:h[i]}function d(t){return{factor:1*t,units:2*t}}function p(t,e,i,n){const s=u(e);if(!s)return t;const o=m*s.units,a=(0,r.S8)(g,(0,r.jb)(g,n,i));return(e,i,n)=>{const c=(i?1-Math.abs((0,r.Om)(a,i)):0)*s.factor*f+o;return t(e+c,i,n)}}h[1]=a;const f=5e-5,m=5e-6,g=(0,n.vt)();function _(t){const e=u(t)??{factor:0,units:0};return{factor:e.factor+o.factor*t.polygonOffsetIndex,units:e.units+o.units*t.polygonOffsetIndex}}},47724(t,e,i){i.d(e,{L:()=>a});var r=i(5482),n=i(51976),s=i(68317);class o extends s.Hz{constructor(){super(...arguments),this.hasHighlightMixTexture=!1,this.emissionDimmingPass=!1,this.bindType=1,this.instanced=!1,this.writeDepth=!0,this.oitPremultipliedAlpha=!1}}(0,r.Cg)([(0,n.W)()],o.prototype,"hasHighlightMixTexture",void 0),(0,r.Cg)([(0,n.W)()],o.prototype,"emissionDimmingPass",void 0);class a extends o{constructor(){super(...arguments),this.polygonOffset=0,this.transparent=!1,this.enableOITOffset=!0}}(0,r.Cg)([(0,n.W)({count:5})],a.prototype,"polygonOffset",void 0),(0,r.Cg)([(0,n.W)()],a.prototype,"transparent",void 0),(0,r.Cg)([(0,n.W)()],a.prototype,"enableOITOffset",void 0)},35622(t,e,i){i.d(e,{S:()=>a,p:()=>c}),i(34727),i(77690),i(29242),i(58083);var r=i(9093),n=(i(35522),i(51850)),s=(i(78955),i(91829),i(31756),i(26857),i(16943),i(65786));class o extends s.Y{constructor(t){super(),this.vvSize=t?.size??null,this.vvColor=t?.color??null,this.vvOpacity=t?.opacity??null}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}(0,r.vt)(),(0,n.vt)(),(0,r.vt)();class a extends o{constructor(){super(...arguments),this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}}const c=8},43616(t,e,i){i.d(e,{MB:()=>c,Um:()=>h,kE:()=>o});var r=i(4576),n=i(34727),s=i(77194);function o(t,e,i,r,s,o){let a=i.screenLength*t.pixelRatio;null!=s&&(l.update(r,e,s,o),a=l.apply(a));const c=a*Math.tan(.5*t.fovY)/(.5*t.fullHeight);return(0,n.qE)(c*e,i.minWorldLength,i.maxWorldLength)}const a=(0,r.VO)();function c(t,e){let i=!1;for(const r in e){const n=e[r];void 0!==n&&(Array.isArray(n)?Array.isArray(t[r])&&a(n,t[r])||(t[r]=n.slice(),i=!0):t[r]!==n&&(i=!0,t[r]=n))}return i}const h={multiply:1,ignore:2,replace:3,tint:4},l=new s.PS},59907(t,e,i){i.d(e,{Wu:()=>u,vJ:()=>f});var r=i(35522),n=i(51850),s=i(58083),o=i(13030),a=i(620);function c(t,e,i){const{data:r,indices:n}=t,s=e.typedBuffer,o=e.typedBufferStride,a=n.length;i*=o;for(let t=0;t<a;++t){const e=2*n[t];s[i]=r[e],s[i+1]=r[e+1],i+=o}}function h(t,e,i,r=1){const{data:n,indices:s}=t,o=e.typedBuffer,a=e.typedBufferStride,c=s.length;if(i*=a,1===r)for(let t=0;t<c;++t){const e=3*s[t];o[i]=n[e],o[i+1]=n[e+1],o[i+2]=n[e+2],i+=a}else for(let t=0;t<c;++t){const e=3*s[t];for(let t=0;t<r;++t)o[i]=n[e],o[i+1]=n[e+1],o[i+2]=n[e+2],i+=a}}function l(t,e,i,r=1){const{data:n,indices:s}=t,o=e.typedBuffer,a=e.typedBufferStride,c=s.length;if(i*=a,1===r)for(let t=0;t<c;++t){const e=4*s[t];o[i]=n[e],o[i+1]=n[e+1],o[i+2]=n[e+2],o[i+3]=n[e+3],i+=a}else for(let t=0;t<c;++t){const e=4*s[t];for(let t=0;t<r;++t)o[i]=n[e],o[i+1]=n[e+1],o[i+2]=n[e+2],o[i+3]=n[e+3],i+=a}}function u(t,e,i,n){(0,r.Re)(d,t,e);const s=Math.max(Math.sqrt((0,r.Bw)(d)),1e-4);(0,r.hs)(d,d,1/s),i[n++]=d[0],i[n++]=d[1],i[n++]=d[2],i[n++]=s}const d=(0,n.vt)();function p(t,e,i,r,n=1){const s=e.typedBuffer,o=e.typedBufferStride;if(r*=o,1===n)for(let e=0;e<i;++e)s[r]=t[0],s[r+1]=t[1],s[r+2]=t[2],s[r+3]=t[3],r+=o;else for(let e=0;e<i;++e)for(let e=0;e<n;++e)s[r]=t[0],s[r+1]=t[1],s[r+2]=t[2],s[r+3]=t[3],r+=o}function f(t,e,i,r,n,s,a){let c={numItems:0,numVerticesPerItem:0};for(const h of i.fields.keys()){const i=t.get(h),l=i?.indices;if(i&&l)"position"===h&&(c={numItems:1,numVerticesPerItem:l.length}),m(h,i,r,n,s,a);else if("olidColor"===h&&null!=e){const i=t.get("position")?.indices;if(i){const t=i.length;p(e,s.getField(h,o.XP),t,a)}}}return c}function m(t,e,i,r,n,u){switch(t){case"position":{(0,a.vA)(3===e.size);const r=n.getField(t,o.xs);(0,a.vA)(!!r,`No buffer view for ${t}`),function(t,e,i,r,n=1){if(!e)return void h(t,i,r,n);const{data:o,indices:a}=t,c=i.typedBuffer,l=i.typedBufferStride,u=a.length,d=e[0],p=e[1],f=e[2],m=e[4],g=e[5],_=e[6],v=e[8],y=e[9],x=e[10],b=e[12],w=e[13],T=e[14];r*=l;let A=0,M=0,C=0;const S=(0,s.tZ)(e)?t=>{A=o[t]+b,M=o[t+1]+w,C=o[t+2]+T}:t=>{const e=o[t],i=o[t+1],r=o[t+2];A=d*e+m*i+v*r+b,M=p*e+g*i+y*r+w,C=f*e+_*i+x*r+T};if(1===n)for(let t=0;t<u;++t)S(3*a[t]),c[r]=A,c[r+1]=M,c[r+2]=C,r+=l;else for(let t=0;t<u;++t){S(3*a[t]);for(let t=0;t<n;++t)c[r]=A,c[r+1]=M,c[r+2]=C,r+=l}}(e,i,r,u);break}case"normal":{(0,a.vA)(3===e.size);const i=n.getField(t,o.xs);(0,a.vA)(!!i,`No buffer view for ${t}`),function(t,e,i,r,n=1){if(!e)return void h(t,i,r,n);const{data:o,indices:a}=t,c=e,l=i.typedBuffer,u=i.typedBufferStride,d=a.length,p=c[0],f=c[1],m=c[2],g=c[4],_=c[5],v=c[6],y=c[8],x=c[9],b=c[10],w=!(0,s.ut)(c),T=1e-6,A=1-T;r*=u;let M=0,C=0,S=0;const E=(0,s.tZ)(c)?t=>{M=o[t],C=o[t+1],S=o[t+2]}:t=>{const e=o[t],i=o[t+1],r=o[t+2];M=p*e+g*i+y*r,C=f*e+_*i+x*r,S=m*e+v*i+b*r};if(1===n)if(w)for(let t=0;t<d;++t){E(3*a[t]);const e=M*M+C*C+S*S;if(e<A&&e>T){const t=1/Math.sqrt(e);l[r]=M*t,l[r+1]=C*t,l[r+2]=S*t}else l[r]=M,l[r+1]=C,l[r+2]=S;r+=u}else for(let t=0;t<d;++t)E(3*a[t]),l[r]=M,l[r+1]=C,l[r+2]=S,r+=u;else for(let t=0;t<d;++t){if(E(3*a[t]),w){const t=M*M+C*C+S*S;if(t<A&&t>T){const e=1/Math.sqrt(t);M*=e,C*=e,S*=e}}for(let t=0;t<n;++t)l[r]=M,l[r+1]=C,l[r+2]=S,r+=u}}(e,r,i,u);break}case"normalCompressed":case"profileRight":case"profileUp":{(0,a.vA)(2===e.size);const i=n.getField(t,o.mJ);(0,a.vA)(!!i,`No buffer view for ${t}`),c(e,i,u);break}case"uv0":{(0,a.vA)(2===e.size);const i=n.getField(t,o.ZD)??n.getField(t,o.gH);(0,a.vA)(!!i,`No buffer view for ${t}`),c(e,i,u);break}case"uvi":{(0,a.vA)(2===e.size);const i=n.getField(t,o.mJ);(0,a.vA)(!!i,`No buffer view for ${t}`),c(e,i,u);break}case"color":case"symbolColor":{const i=n.getField(t,o.XP);(0,a.vA)(!!i,`No buffer view for ${t}`),(0,a.vA)(3===e.size||4===e.size),function(t,e,i,r,n=1){const{data:s,indices:o}=t,a=i.typedBuffer,c=i.typedBufferStride,h=o.length;if(r*=c,e===s.length&&4===e){a[r]=s[0],a[r+1]=s[1],a[r+2]=s[2],a[r+3]=s[3];const t=new Uint32Array(i.typedBuffer.buffer,i.start),e=c/4,o=t[r/=4];r+=e;const l=h*n;for(let i=1;i<l;++i)t[r]=o,r+=e;return}if(1!==n)if(4!==e)for(let t=0;t<h;++t){const e=3*o[t];for(let t=0;t<n;++t)a[r]=s[e],a[r+1]=s[e+1],a[r+2]=s[e+2],a[r+3]=255,r+=c}else for(let t=0;t<h;++t){const e=4*o[t];for(let t=0;t<n;++t)a[r]=s[e],a[r+1]=s[e+1],a[r+2]=s[e+2],a[r+3]=s[e+3],r+=c}else{if(4===e){for(let t=0;t<h;++t){const e=4*o[t];a[r]=s[e],a[r+1]=s[e+1],a[r+2]=s[e+2],a[r+3]=s[e+3],r+=c}return}for(let t=0;t<h;++t){const e=3*o[t];a[r]=s[e],a[r+1]=s[e+1],a[r+2]=s[e+2],a[r+3]=255,r+=c}}}(e,e.size,i,u);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{const i=n.getField(t,o.Y$)??n.getField(t,o.Y$);(0,a.vA)(!!i,`No buffer view for ${t}`),(0,a.vA)(1===e.size),function(t,e,i){const{data:r,indices:n}=t,s=e.typedBuffer,o=e.typedBufferStride,a=n.length,c=r[0];i*=o;for(let t=0;t<a;++t)s[i]=c,i+=o}(e,i,u);break}case"tangent":{(0,a.vA)(4===e.size);const r=n.getField(t,o.Eq);(0,a.vA)(!!r,`No buffer view for ${t}`),function(t,e,i,r,n=1){if(!e)return void l(t,i,r,n);const{data:o,indices:a}=t,c=e,h=i.typedBuffer,u=i.typedBufferStride,d=a.length,p=c[0],f=c[1],m=c[2],g=c[4],_=c[5],v=c[6],y=c[8],x=c[9],b=c[10],w=!(0,s.ut)(c),T=1e-6,A=1-T;if(r*=u,1===n)for(let t=0;t<d;++t){const e=4*a[t],i=o[e],n=o[e+1],s=o[e+2],c=o[e+3];let l=p*i+g*n+y*s,d=f*i+_*n+x*s,M=m*i+v*n+b*s;if(w){const t=l*l+d*d+M*M;if(t<A&&t>T){const e=1/Math.sqrt(t);l*=e,d*=e,M*=e}}h[r]=l,h[r+1]=d,h[r+2]=M,h[r+3]=c,r+=u}else for(let t=0;t<d;++t){const e=4*a[t],i=o[e],s=o[e+1],c=o[e+2],l=o[e+3];let d=p*i+g*s+y*c,M=f*i+_*s+x*c,C=m*i+v*s+b*c;if(w){const t=d*d+M*M+C*C;if(t<A&&t>T){const e=1/Math.sqrt(t);d*=e,M*=e,C*=e}}for(let t=0;t<n;++t)h[r]=d,h[r+1]=M,h[r+2]=C,h[r+3]=l,r+=u}}(e,i,r,u);break}case"profileVertexAndNormal":{(0,a.vA)(4===e.size);const i=n.getField(t,o.jz)??n.getField(t,o.Eq);(0,a.vA)(!!i,`No buffer view for ${t}`),l(e,i,u);break}case"profileAuxData":{(0,a.vA)(3===e.size);const i=n.getField(t,o.EC)??n.getField(t,o.xs);(0,a.vA)(!!i,`No buffer view for ${t}`),h(e,i,u);break}}}},26292(t,e,i){i.d(e,{D:()=>d});var r=i(49255),n=i(22911),s=i(3871),o=i(63365);function a(t){t.code.add("\n vec3 emissionDimming(vec3 srcColor, float srcAlpha) {\n srcColor = clamp(srcColor, vec3(0.0), srcColor);\n return mix(vec3(1.0), srcColor, srcAlpha);\n }\n ")}var c=i(31821),h=i(26934);function l(t,e){e.useFloatBlend?t.code.add(c.H`float ditherNoise(vec4 color) { return 0.0; }`):t.code.add("\n float ditherNoise(vec4 color) {\n vec2 seed = color.rg + color.ba + gl_FragCoord.xy + gl_FragCoord.z;\n return (fract(52.9829189 * fract(dot(seed, vec2(0.06711056, 0.00583715)))) - 0.5) / 255.0;\n }")}var u=i(66211);function d(t,e){t.include(s.Q,e),t.include(n.NL,e);const{fragment:i,outputs:d}=t;i.include(o.a);const{output:p,hasEmission:f,discardInvisibleFragments:m,oitPremultipliedAlpha:g,snowCover:_,useFloatBlend:v,emissionDimmingPass:y}=e,x=11===p,b=(0,r.Sp)(p),w=(0,r.Rb)(p),T=(0,r._o)(p)&&!b;let A=0;(T||b)&&d.add("fragColor","vec4",A++),f&&d.add("fragEmission","vec4",A++),b&&d.add("fragAlpha","float",A++),i.include(h.Q),i.include(u.H,e),i.include(l,e),y&&i.include(a),i.code.add(c.H`
249
+ }`)}function c(t){t.uniforms.add(new s.t("screenSizePerspective",t=>l(t.screenSizePerspective,t.screenSizePerspectiveMinPixelReferenceSize)))}function h(t){t.uniforms.add(new s.t("screenSizePerspectiveAlignment",t=>l(t.screenSizePerspectiveAlignment||t.screenSizePerspective,t.screenSizePerspectiveAlignment?null:t.screenSizePerspectiveMinPixelReferenceSize)))}function l(t,e){const i=null!=e&&null!=t?Math.min(t.minPixelSize/e,1):0;return t?(0,r.hZ)(u,t.divisor,t.offset,i):(0,r.hZ)(u,0,0,0)}const u=(0,n.vt)()},77949(t,e,i){i.d(e,{NB:()=>p,Nz:()=>_,S7:()=>g,yu:()=>d});var r=i(58083),n=i(9093),s=i(35522),o=i(51850),a=i(23205),c=i(40710),h=i(33094),l=i(58029),u=i(97102);function d(t,e){e.instancedDoublePrecision?t.constants.add("cameraPosition","vec3",o.uY):t.uniforms.add(new c.W("cameraPosition",(t,e)=>(0,s.hZ)(m,e.camera.viewInverseTransposeMatrix[3]-t.origin[0],e.camera.viewInverseTransposeMatrix[7]-t.origin[1],e.camera.viewInverseTransposeMatrix[11]-t.origin[2])))}function p(t,e){if(!e.instancedDoublePrecision)return void t.uniforms.add(new l.F("proj",t=>t.camera.projectionMatrix),new u.S("view",(t,e)=>(0,r.Tl)(f,e.camera.viewMatrix,t.origin)),new c.W("localOrigin",t=>t.origin));const i=({camera:t})=>(0,s.hZ)(m,t.viewInverseTransposeMatrix[3],t.viewInverseTransposeMatrix[7],t.viewInverseTransposeMatrix[11]);t.uniforms.add(new l.F("proj",t=>t.camera.projectionMatrix),new l.F("view",t=>(0,r.Tl)(f,t.camera.viewMatrix,i(t))),new a.d("localOrigin",t=>i(t)))}const f=(0,n.vt)(),m=(0,o.vt)();function g(t){t.uniforms.add(new l.F("viewNormal",t=>t.camera.viewInverseTransposeMatrix))}function _(t){t.uniforms.add(new h.U("pixelRatio",t=>t.camera.pixelRatio/t.overlayStretch))}},77108(t,e,i){i.d(e,{E:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"vec2",0,(r,n)=>r.setUniform2fv(t,e(n),i))}}},68259(t,e,i){i.d(e,{t:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"vec2",2,(r,n,s,o)=>r.setUniform2fv(t,e(n,s,o),i))}}},47286(t,e,i){i.d(e,{G:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"vec2",1,(r,n,s)=>r.setUniform2fv(t,e(n,s),i))}}},23205(t,e,i){i.d(e,{d:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"vec3",0,(r,n)=>r.setUniform3fv(t,e(n),i))}}},14314(t,e,i){i.d(e,{I:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"vec4",0,(r,n)=>r.setUniform4fv(t,e(n),i))}}},71988(t,e,i){i.d(e,{E:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"vec4",1,(r,n,s)=>r.setUniform4fv(t,e(n,s),i))}}},33094(t,e,i){i.d(e,{U:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"float",0,(r,n)=>r.setUniform1f(t,e(n),i))}}},44887(t,e,i){i.d(e,{x:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i,r){super(t,"float",1,(e,n,s)=>e.setUniform1fv(t,i(n,s),r),e)}}},35818(t,e,i){i.d(e,{W:()=>n});var r=i(74333);class n extends r.n{constructor(t,e){super(t,"int",0,(i,r)=>i.setUniform1i(t,e(r)))}}},93588(t,e,i){i.d(e,{c:()=>n});var r=i(74333);class n extends r.n{constructor(t,e){super(t,"int",1,(i,r,n)=>i.setUniform1i(t,e(r,n)))}}},35644(t,e,i){i.d(e,{k:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"mat3",1,(r,n,s)=>r.setUniformMatrix3fv(t,e(n,s),i))}}},58029(t,e,i){i.d(e,{F:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"mat4",0,(r,n)=>r.setUniformMatrix4fv(t,e(n),i))}}},97102(t,e,i){i.d(e,{S:()=>n});var r=i(74333);class n extends r.n{constructor(t,e,i){super(t,"mat4",2,(r,n,s)=>r.setUniformMatrix4fv(t,e(n,s),i))}}},12791(t,e,i){i.d(e,{x:()=>n});var r=i(74333);class n extends r.n{constructor(t,e){super(t,"sampler2D",0,(i,r)=>i.bindTexture(t,e(r)))}}},13840(t,e,i){i.d(e,{r:()=>r});class r{constructor(t,e){this._module=t,this._load=e}get(){return this._module}async reload(){return this._module=await this._load(),this._module}}},98958(t,e,i){i.d(e,{w:()=>f});var r=i(5482),n=i(69622),s=i(53966),o=i(91429),a=i(41976),c=(i(44208),i(26857)),h=i(94656);class l{constructor(t,e,i){this._context=t,this.locations=i,this._textures=new Map,this.source=(0,h.en)()?e:null,e.attributeNames.forEach(t=>{i.has(t)||s.A.getLogger("esri.views.3d.webgl-engine.lib.Program").error(`Missing VertexAttributeLocation for ${t} used in shader`)}),this._glProgram=t.programCache.get(e.generate("vertex",!0),e.generate("fragment",!0),i),this._glProgram.stop=()=>{throw new Error("Wrapped _glProgram used directly")},this.bind=e.generateBind(this),this.bindPass=e.generateBindPass(this),this.bindDraw=e.generateBindDraw(this)}get glName(){return this._glProgram.glName}get hasTransformFeedbackVaryings(){return this._glProgram.hasTransformFeedbackVaryings}get compiled(){return this._glProgram.compiled}setUniform1b(t,e){this._glProgram.setUniform1i(t,e?1:0)}setUniform1i(t,e){this._glProgram.setUniform1i(t,e)}setUniform1f(t,e,i){this._glProgram.setUniform1f(t,e,i)}setUniform2fv(t,e,i){this._glProgram.setUniform2fv(t,e,i)}setUniform3fv(t,e,i){this._glProgram.setUniform3fv(t,e,i)}setUniform4fv(t,e,i){this._glProgram.setUniform4fv(t,e,i)}setUniformMatrix3fv(t,e,i){this._glProgram.setUniformMatrix3fv(t,e,!1,i)}setUniformMatrix4fv(t,e,i){this._glProgram.setUniformMatrix4fv(t,e,!1,i)}setUniformMatrices4fv(t,e,i){this._glProgram.setUniformMatrices4fv(t,e,!1,i)}setUniform1fv(t,e,i){this._glProgram.setUniform1fv(t,e,i)}setUniform1iv(t,e){this._glProgram.setUniform1iv(t,e)}setUniform2iv(t,e){this._glProgram.setUniform2iv(t,e)}setUniform3iv(t,e){this._glProgram.setUniform3iv(t,e)}setUniform4iv(t,e){this._glProgram.setUniform4iv(t,e)}assertCompatibleVertexAttributeLocations(t,e){if(c.b.ENABLE_OPTIMIZATIONS)return;let i=t.locations;if(e){const t=new Map(i);e.forEach((e,r)=>t.set(r,i.size+e)),i=t}i.size!==this.locations.size&&console.error(`VertexAttributeLocations are incompatible: ${i}, ${this.locations}`),this.locations.forEach((t,e)=>{i.get(e)!==t&&console.error(`VertexAttributeLocations are incompatible: Program has ${e} at position ${t}, VAO has it at position ${i.get(e)}.`)})}stop(){this._textures.clear()}bindTexture(t,e,i){if(!e?.glName){const i=`Texture sampler ${t} in ${this._context.debugBoundTechnique} has no given Texture in ${(new Error).stack}`;(0,h.en)()&&console.error(i),e=this._context.emptyTexture}const r=this._ensureTextureUnit(t,e);this._context.useProgram(this);const n=r.unit;this.setUniform1i(t,n),this._context.bindTexture(e,n,!1,i)}_ensureTextureUnit(t,e){let i=this._textures.get(t);return null==i?(i={texture:e,unit:this._textures.size},this._textures.set(t,i)):i.texture=e,i}}var u=i(63907),d=i(90644),p=i(85079);let f=class extends n.A{constructor(t,e,i){super({}),this._context=t,this._configuration=e,this.primitiveType=u.WR.TRIANGLES,this._unused=!0,this.ignoreUnused=!1,this.key=e.key,this.locations=(0,p.Xk)(i??a.lK),this._pipeline=this.initializePipeline(e),this.reload=async i=>{if(i&&await this.shader.reload(),!this.key.equals(e.key))return void s.A.getLogger("esri.views.3d.webgl.ShaderTechnique").warn(`Configuration was changed after construction, cannot reload shader for ${this.declaredClass}.`);const r=this.shader.get().build(e);r.debugName=this.declaredClass,this._program=new l(t.rctx,r,this.locations),this._pipeline=this.initializePipeline(e)}}initialize(){const t=this.shader.get().build(this._configuration);t.debugName=this.declaredClass,this._program=new l(this._context.rctx,t,this.locations)}get program(){return this._unused=!1,this._program}get compiled(){return this._unused=!1,this.program.compiled}get unused(){return this._unused}ensureAttributeLocations(t){this.program.assertCompatibleVertexAttributeLocations(t)}getPipeline(t,e){return this._pipeline}initializePipeline(t){return(0,d.Ey)({blending:d.RC,colorWrite:d.kn})}};f=(0,r.Cg)([(0,o.$K)("esri.views.3d.webgl-engine.core.shaderTechnique.ShaderTechnique")],f)},51976(t,e,i){i.d(e,{K:()=>a,W:()=>c});var r=i(49186),n=i(4576);class s{constructor(t){this._bits=[...t]}equals(t){return(0,n.aI)(this._bits,t.bits)}get code(){return this._code??=String.fromCharCode(...this._bits),this._code}get bits(){return this._bits}}var o=i(65786);class a extends o.Y{constructor(){super(),this._parameterBits=this._parameterBits?.map(()=>0)??[],this._parameterNames??=[]}get key(){return this._key??=new s(this._parameterBits),this._key}decode(t=this.key){const e=this._parameterBits;this._parameterBits=[...t.bits];const i=this._parameterNames.map(t=>` ${t}: ${this[t]}`).join("\n");return this._parameterBits=e,i}}function c(t={}){return(e,i)=>{e.hasOwnProperty("_parameterNames")||Object.defineProperty(e,"_parameterNames",{value:e._parameterNames?.slice()??[],configurable:!0,writable:!0}),e.hasOwnProperty("_parameterBits")||Object.defineProperty(e,"_parameterBits",{value:e._parameterBits?.slice()??[0],configurable:!0,writable:!0}),e._parameterNames.push(i);const n=t.count||2,s=Math.ceil(Math.log2(n)),o=e._parameterBits;let a=0;for(;o[a]+s>16;)a++,a>=o.length&&o.push(0);const c=o[a],h=(1<<s)-1<<c;o[a]+=s,t.count?Object.defineProperty(e,i,{get(){return(this._parameterBits[a]&h)>>c},set(e){const n=this._parameterBits[a];if((n&h)>>c!==e){if(this._key=null,this._parameterBits[a]=n&~h|+e<<c&h,"number"!=typeof e)throw new r.A("internal:invalid-shader-configuration",`Configuration value for ${i} must be a number, got ${typeof e}`);if(null==t.count)throw new r.A("internal:invalid-shader-configuration",`Configuration value for ${i} must provide a count option`)}}}):Object.defineProperty(e,i,{get(){return!!((this._parameterBits[a]&h)>>c)},set(t){const e=this._parameterBits[a];if(!!((e&h)>>c)!==t&&(this._key=null,this._parameterBits[a]=e&~h|+t<<c,"boolean"!=typeof t))throw new r.A("internal:invalid-shader-configurationx",`Configuration value for ${i} must be boolean, got ${typeof t}`)}})}}},16943(t,e,i){i.d(e,{E:()=>n});var r=i(44208);function n(){return!!(0,r.A)("enable-feature:objectAndLayerId-rendering")}},41976(t,e,i){i.d(e,{lK:()=>a,wR:()=>o});var r=i(63907),n=i(85079),s=i(74038);const o=[],a=(new s._("position",3,r.pe.FLOAT,0,12),[new s._("position",2,r.pe.FLOAT,0,8)]);(0,n.Xk)(a),new s._("position",2,r.pe.FLOAT,0,12),new s._("uv0",2,r.pe.HALF_FLOAT,8,12),new s._("position",2,r.pe.FLOAT,0,16),new s._("uv0",2,r.pe.FLOAT,8,16)},92130(t,e,i){i.d(e,{A:()=>r});class r{constructor(t){this._material=t.material,this._techniques=t.techniques}dispose(){}get _stippleTextures(){return this._techniques.context?.stippleTextures}get _markerTextures(){return this._techniques.context?.markerTextures}getTechnique(t,e){return this._techniques.get(t,this._material.getConfiguration(e))}ensureResources(t){return 2}}},63500(t,e,i){i.d(e,{V:()=>E});var r=i(9093),n=i(35522),s=i(97146),o=i(46610),a=i(34275),c=i(20498);function h(t){if(t.length<a.y9)return Array.from(t);if(Array.isArray(t))return Float64Array.from(t);if(!("BYTES_PER_ELEMENT"in t))return Array.from(t);switch(t.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(t);case 2:return(0,a.LW)(t)?(0,c.pX)().from(t):(0,a.jq)(t)?Uint16Array.from(t):Int16Array.from(t);case 4:return Float32Array.from(t);default:return Float64Array.from(t)}}var l=i(15142),u=i(51850),d=i(620);class p{get center(){return(0,u.fA)(this._data[0],this._data[1],this._data[2])}get radius(){return this._data[3]}get bbMin(){return(0,u.fA)(this._data[4],this._data[5],this._data[6])}get bbMax(){return(0,u.fA)(this._data[7],this._data[8],this._data[9])}constructor(t,e,i){this.primitiveIndices=t,this._numIndexPerPrimitive=e,this.position=i,this._data=[.1,0,0,0,0,0,0,0,0,0],this._children=void 0,(0,d.vA)(t.length>=1),(0,d.vA)(3===i.size||4===i.size);const{data:r,size:s,indices:o}=i;(0,d.vA)(o.length%this._numIndexPerPrimitive===0),(0,d.vA)(o.length>=t.length*this._numIndexPerPrimitive);const a=t.length;let c=s*o[this._numIndexPerPrimitive*t[0]];f.clear(),f.push(c);const h=(0,u.fA)(r[c],r[c+1],r[c+2]),l=(0,u.o8)(h);for(let e=0;e<a;++e){const i=this._numIndexPerPrimitive*t[e];for(let t=0;t<this._numIndexPerPrimitive;++t){c=s*o[i+t],f.push(c);let e=r[c];h[0]=Math.min(e,h[0]),l[0]=Math.max(e,l[0]),e=r[c+1],h[1]=Math.min(e,h[1]),l[1]=Math.max(e,l[1]),e=r[c+2],h[2]=Math.min(e,h[2]),l[2]=Math.max(e,l[2])}}for(let t=0;t<3;++t)this._data[4+t]=h[t],this._data[7+t]=l[t];const p=(0,n.Cc)((0,u.vt)(),this.bbMin,this.bbMax,.5);let m=.5*Math.max(Math.max(l[0]-h[0],l[1]-h[1]),l[2]-h[2]),g=m*m;for(let t=0;t<f.length;++t){c=f.at(t);const e=r[c]-p[0],i=r[c+1]-p[1],n=r[c+2]-p[2],s=e*e+i*i+n*n;if(s<=g)continue;const o=Math.sqrt(s),a=.5*(o-m);m+=a,g=m*m;const h=a/o;p[0]+=e*h,p[1]+=i*h,p[2]+=n*h}this._data[3]=m;for(let t=0;t<3;++t)this._data[0+t]=p[t];f.clear()}getChildren(){if(this._children||(0,n.hG)(this.bbMin,this.bbMax)<=1)return this._children;const t=(0,n.Cc)((0,u.vt)(),this.bbMin,this.bbMax,.5),e=this.primitiveIndices.length,i=new Uint8Array(e),r=new Array(8);for(let t=0;t<8;++t)r[t]=0;const{data:s,size:o,indices:a}=this.position;for(let n=0;n<e;++n){let e=0;const c=this._numIndexPerPrimitive*this.primitiveIndices[n];let h=o*a[c],l=s[h],u=s[h+1],d=s[h+2];for(let t=1;t<this._numIndexPerPrimitive;++t){h=o*a[c+t];const e=s[h],i=s[h+1],r=s[h+2];e<l&&(l=e),i<u&&(u=i),r<d&&(d=r)}l<t[0]&&(e|=1),u<t[1]&&(e|=2),d<t[2]&&(e|=4),i[n]=e,++r[e]}let c=0;for(let t=0;t<8;++t)r[t]>0&&++c;if(c<2)return;const h=new Array(8);for(let t=0;t<8;++t)h[t]=r[t]>0?new Uint32Array(r[t]):void 0;for(let t=0;t<8;++t)r[t]=0;for(let t=0;t<e;++t){const e=i[t];h[e][r[e]++]=this.primitiveIndices[t]}this._children=new Array;for(let t=0;t<8;++t)void 0!==h[t]&&this._children.push(new p(h[t],this._numIndexPerPrimitive,this.position));return this._children}static prune(){f.prune()}}const f=new l.A({deallocator:null});var m=i(24326);class g{constructor(t){this.id=(0,m.c)(),this._attributes=new Map;for(const[e,i]of t)this._attributes.set(e,{...i,indices:(0,s.Dg)(i.indices)})}get attributes(){return this._attributes}}var _=i(4341),v=i(11964);function y(t,e,i){return(0,n.Re)(x,e,t),(0,n.Re)(b,i,t),.5*(0,n.Bw)((0,n.$A)(x,x,b))}i(32114),new _.I(v.vt),new _.I(()=>{return t?{p0:(0,u.o8)(t.p0),p1:(0,u.o8)(t.p1),p2:(0,u.o8)(t.p2)}:{p0:(0,u.vt)(),p1:(0,u.vt)(),p2:(0,u.vt)()};var t});const x=(0,u.vt)(),b=(0,u.vt)(),w=(0,u.vt)(),T=(0,u.vt)(),A=(0,u.vt)(),M=(0,u.vt)();var C=i(17478),S=i(94656);class E extends g{constructor(t,e,i=null,r=0,n=null,s=-1,o,a){super(e),this.material=t,this.mapPositions=i,this.type=r,this.olidColor=n,this.edgeIndicesLength=s,this.baseGeometry=o,this.drawIndices=a,this._vertexPositionIndicesCache=void 0,this._highlights=null,this._highlightOptionsCounts=null,this.visible=!0,this._boundingInfo=null,(0,d.vA)((t?.useIndexing??!1)===(null!=a),"Material index requirement and Geometry must match");const c=this.positionAttribute;null!=c&&this.edgeIndicesLength<0&&(this.edgeIndicesLength=c.indices.length)}instantiate(t={}){const e=new E(t.material||this.material,[],this.mapPositions,this.type,this.olidColor,this.edgeIndicesLength,this.baseGeometry,this.drawIndices);return this._attributes.forEach((t,i)=>{t.exclusive=!1,e._attributes.set(i,t)}),e._boundingInfo=this._boundingInfo,e.transformation=t.transformation||this.transformation,e}getMutableAttribute(t){let e=this._attributes.get(t);return e&&!e.exclusive&&(e={...e,exclusive:!0,data:h(e.data)},this._attributes.set(t,e)),e}setAttributeData(t,e){const i=this._attributes.get(t);i?this._attributes.set(t,{...i,exclusive:!0,data:e}):(0,S.en)()&&console.warn(`Setting undefined attribute ${t} data`)}get primitivePositionIndices(){if(void 0!==this._vertexPositionIndicesCache)return this._vertexPositionIndicesCache;const{drawIndices:t}=this,e=this.positionAttribute;if(null!=t&&null!=e){const i=new Array;for(const r of t)i.push(e.indices[r]);this._vertexPositionIndicesCache=i}else this._vertexPositionIndicesCache=e?.indices??null;return this._vertexPositionIndicesCache}get positionAttribute(){return this.attributes.get("position")??this.baseGeometry?.attributes.get("position")}get indexCount(){const t=this.drawIndices??this.positionAttribute?.indices;return t?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(t){return!!(0===this.type?this._computeAttachmentOriginTriangles(t):2===this.type?this._computeAttachmentOriginLines(t):this._computeAttachmentOriginPoints(t))&&(null!=this._transformation&&(0,n.Z0)(t,t,this._transformation),!0)}_computeAttachmentOriginTriangles(t){return function(t,e,i=e?.indices){if(!e||!i)return!1;const{size:r,data:s}=e;(0,n.hZ)(t,0,0,0),(0,n.hZ)(M,0,0,0);let o=0,a=0;for(let e=0;e<i.length-2;e+=3){const c=i[e]*r,h=i[e+1]*r,l=i[e+2]*r;(0,n.hZ)(w,s[c],s[c+1],s[c+2]),(0,n.hZ)(T,s[h],s[h+1],s[h+2]),(0,n.hZ)(A,s[l],s[l+1],s[l+2]);const u=y(w,T,A);u?((0,n.WQ)(w,w,T),(0,n.WQ)(w,w,A),(0,n.hs)(w,w,1/3*u),(0,n.WQ)(t,t,w),o+=u):((0,n.WQ)(M,M,w),(0,n.WQ)(M,M,T),(0,n.WQ)(M,M,A),a+=3)}return!(0===a&&0===o||(0!==o?((0,n.hs)(t,t,1/o),0):0===a||((0,n.hs)(t,M,1/a),0)))}(t,this.positionAttribute,this.primitivePositionIndices)}_computeAttachmentOriginLines(t){const e=this.positionAttribute,i=this.primitivePositionIndices;return function(t,e,i,r=e?.indices){if(!e||!r)return!1;(0,n.hZ)(t,0,0,0),(0,n.hZ)(M,0,0,0);let s=0,o=0;const{size:a,data:c}=e,h=r.length-1,l=h+(i?2:0);for(let e=0;e<l;e+=2){const i=e<h?e+1:0,l=r[e<h?e:h]*a,u=r[i]*a;w[0]=c[l],w[1]=c[l+1],w[2]=c[l+2],T[0]=c[u],T[1]=c[u+1],T[2]=c[u+2],(0,n.hs)(w,(0,n.WQ)(w,w,T),.5);const d=(0,n.xg)(w,T);d>0?((0,n.WQ)(t,t,(0,n.hs)(w,w,d)),s+=d):0===s&&((0,n.WQ)(M,M,w),o++)}return 0!==s?((0,n.hs)(t,t,1/s),!0):0!==o&&((0,n.hs)(t,M,1/o),!0)}(t,e,function(t,e){return!(!("isClosed"in t)||!t.isClosed)&&e.indices.length>2}(this.material.parameters,e),i)}_computeAttachmentOriginPoints(t){return function(t,e,i=e?.indices){if(!e||!i)return!1;const{size:r,data:s}=e;(0,n.hZ)(t,0,0,0);let o=-1,a=0;for(let e=0;e<i.length;e++){const n=i[e]*r;o!==n&&(t[0]+=s[n],t[1]+=s[n+1],t[2]+=s[n+2],a++),o=n}return a>1&&(0,n.hs)(t,t,1/a),a>0}(t,this.positionAttribute,this.primitivePositionIndices)}invalidateBoundingInfo(){this._boundingInfo=null,this._vertexPositionIndicesCache=void 0}_calculateBoundingInfo(){const t=this.positionAttribute,e=this.primitivePositionIndices;if(!t||!e||0===e.length)return null;const i=e===t.indices?t:new o.n(t.data,e,t.size,!1,t.stride),r=0===this.type?3:1;(0,d.vA)(e.length%r===0,"Indexing error: "+e.length+" not divisible by "+r);const n=(0,s.tM)(e.length/r);return new p(n,r,i)}get transformation(){return this._transformation??r.zK}set transformation(t){this._transformation=t&&t!==r.zK?(0,r.o8)(t):null}get highlights(){return this._highlights||R}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}foreachHighlightOptions(t){this._highlightOptionsCounts?.forEach((e,i)=>t(i))}allocateIdAndHighlight(t){const e=new C.h(t);return this.addHighlight(e)}addHighlight(t){this._ensureHighlights().add(t);const{highlightName:e}=t,i=(this._highlightOptionsCounts?.get(e)??0)+1;return this._ensureHighlightOptionsCounts().set(e,i),t}_ensureHighlights(){let t=this._highlights;return t||(t=new Set,this._highlights=t),t}_ensureHighlightOptionsCounts(){let t=this._highlightOptionsCounts;return t||(t=new Map,this._highlightOptionsCounts=t),t}removeHighlight(t){if(this._highlights?.delete(t)){const{highlightName:e}=t,i=this._highlightOptionsCounts?.get(e)??0;i<=1?this._highlightOptionsCounts?.delete(e):this._ensureHighlightOptionsCounts().set(e,i-1)}}}const R=new Set},49718(t,e,i){i(51850),i(6867).i},6867(t,e,i){i.d(e,{i:()=>l});var r=i(58083),n=i(9093),s=i(35522),o=i(51850),a=i(78955),c=i(91829),h=i(71351);class l{get ray(){return this._ray}get distanceInRenderSpace(){return null==this.distance?null:((0,s.hs)(d,this.ray.direction,this.distance),(0,s.Bw)(d))}withinDistance(t){return!!u(this)&&this.distanceInRenderSpace<=t}getIntersectionPoint(t){return!!u(this)&&((0,s.hs)(d,this.ray.direction,this.distance),(0,s.WQ)(t,this.ray.origin,d),!0)}getTransformedNormal(t){return(0,s.C)(p,this.normal),p[3]=0,(0,a.Z0)(p,p,this.transformation),(0,s.C)(t,p),(0,s.S8)(t,t)}constructor(t){this.intersector=4,this.normal=(0,o.vt)(),this.transformation=(0,n.vt)(),this._ray=(0,h.vt)(),this.init(t)}init(t){this.distance=this.target=this.drapedLayerOrder=this.renderPriority=null,this.intersector=4,(0,h.C)(t,this._ray)}set(t,e,i,a,c,h,l){this.intersector=t,this.distance=i,(0,s.C)(this.normal,a??o.Cb),(0,r.C)(this.transformation,c??n.zK),this.target=e,this.drapedLayerOrder=h,this.renderPriority=l}copy(t){(0,h.C)(t.ray,this._ray),this.intersector=t.intersector,this.distance=t.distance,this.target=t.target,this.drapedLayerOrder=t.drapedLayerOrder,this.renderPriority=t.renderPriority,(0,s.C)(this.normal,t.normal),(0,r.C)(this.transformation,t.transformation)}}function u(t){return null!=t?.distance}const d=(0,o.vt)(),p=(0,c.vt)()},18845(t,e,i){i.d(e,{h:()=>U});var r=i(49186),n=i(65529),s=i(97768),o=i(17676),a=i(34275),c=i(24326),h=i(84952),l=i(38969),u=i(31217),d=i(95117),p=i(2741);let f;var m=i(63907),g=i(21231),_=i(42293);let v=null,y=null;async function x(){return null==y&&(f??=(async()=>{const t=await i.e(9321).then(i.bind(i,49321)),e=await t.default({locateFile:t=>(0,p.s)(`esri/libs/basisu/${t}`)});return e.initializeBasis(),e})(),y=f,v=await y),y}function b(t,e){if(null==v)return t.byteLength;const i=new v.BasisFile(new Uint8Array(t)),r=A(i)?T(i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),e):0;return i.close(),i.delete(),r}function w(t,e){if(null==v)return t.byteLength;const i=new v.KTX2File(new Uint8Array(t)),r=M(i)?T(i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),e):0;return i.close(),i.delete(),r}function T(t,e,i,r,n){const s=(0,_.MW)(e?m.CQ.COMPRESSED_RGBA8_ETC2_EAC:m.CQ.COMPRESSED_RGB8_ETC2),o=n&&t>1?(4**t-1)/(3*4**(t-1)):1;return Math.ceil(i*r*s*o)}function A(t){return t.getNumImages()>=1&&!t.isUASTC()}function M(t){return t.getFaces()>=1&&(t.isETC1S()||t.isUASTC())}function C(t,e,i,r,n,s,o,a){const{compressedTextureETC:c,compressedTextureS3TC:h}=t.capabilities,[l,u]=c?r?[1,m.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[0,m.CQ.COMPRESSED_RGB8_ETC2]:h?r?[3,m.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[2,m.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[13,6408],d=e.hasMipmap?i:Math.min(1,i),p=[];for(let t=0;t<d;t++)p.push(new Uint8Array(o(t,l))),a(t,l,p[t]);return e.internalFormat=u,e.hasMipmap=p.length>1,e.samplingMode=e.hasMipmap?9987:9729,e.width=n,e.height=s,new g.A(t,e,{type:"compressed",levels:p})}var S=i(53966);const E=()=>S.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function R(t){return t.charCodeAt(0)+(t.charCodeAt(1)<<8)+(t.charCodeAt(2)<<16)+(t.charCodeAt(3)<<24)}const I=R("DXT1"),O=R("DXT3"),D=R("DXT5");function F(t,e){const i=new Int32Array(t.buffer,t.byteOffset,31);if(542327876!==i[0])return E().error("Invalid magic number in DDS header"),null;if(!(4&i[20]))return E().error("Unsupported format, must contain a FourCC code"),null;const r=i[21];let n,s;switch(r){case I:n=8,s=m.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case O:n=16,s=m.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case D:n=16,s=m.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return E().error("Unsupported FourCC code:",function(t){return String.fromCharCode(255&t,t>>8&255,t>>16&255,t>>24&255)}(r)),null}let o=1,a=i[4],c=i[3];(3&a||3&c)&&(E().warn("Rounding up compressed texture size to nearest multiple of 4."),a=a+3&-4,c=c+3&-4);const h=a,l=c;let u,d;131072&i[2]&&!1!==e&&(o=Math.max(1,i[7]));let p=t.byteOffset+i[1]+4;const f=[];for(let e=0;e<o;++e)d=(a+3>>2)*(c+3>>2)*n,u=new Uint8Array(t.buffer,p,d),f.push(u),p+=d,a=Math.max(1,a>>1),c=Math.max(1,c>>1);return{textureData:{type:"compressed",levels:f},internalFormat:s,width:h,height:l}}var P=i(78988),N=i(620),B=i(67171),L=i(12541);class U{constructor(t,e){this._data=t,this.id=(0,c.c)(),this.events=new n.bk,this._parameters={...z,...e},this._startPreload(t)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(t){t instanceof HTMLVideoElement?(this.update=e=>this._update(t,e),this._startPreloadVideoElement(t)):t instanceof HTMLImageElement&&this._startPreloadImageElement(t)}_startPreloadVideoElement(t){if(!((0,h.w8)(t.src)||"auto"===t.preload&&t.crossOrigin)&&(t.preload="auto",t.crossOrigin="anonymous",t.src=t.src,t.paused&&t.autoplay)){const e=[];(0,l.i)(t,t=>e.push(t)).then(()=>{t.play()}).finally(()=>e.forEach(t=>t.remove()))}}_startPreloadImageElement(t){(0,h.DB)(t.src)||(0,h.w8)(t.src)||t.crossOrigin||(t.crossOrigin="anonymous",t.src=t.src)}_createDescriptor(t){const e=new B.R;return e.wrapMode=this._parameters.wrap??10497,e.flipped=!this._parameters.noUnpackFlip,e.samplingMode=this._parameters.mipmap?9987:9729,e.hasMipmap=!!this._parameters.mipmap,e.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,e.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?t.parameters.maxMaxAnisotropy:1),e.dataType=this._parameters.dataType??e.dataType,e.pixelFormat=this._parameters.pixelFormat??e.pixelFormat,e.internalFormat=this._parameters.internalFormat??e.internalFormat,e.isImmutable=!0===this._parameters.immutable&&function(t){return null!=t&&((0,L.tl)(t)||(0,L.tr)(t)||(0,L.CR)(t)||(0,L.QJ)(t))}(this._parameters.internalFormat),e}get texture(){return this._texture??this._emptyTexture}get loaded(){return null!=this._texture}get usedMemory(){return this._texture?.usedMemory||function(t,e){if(null==t)return 0;if((0,a.mw)(t)||(0,a.mg)(t))return"image/ktx2"===e.encoding?w(t,!!e.mipmap):"image/x.basis"===e.encoding?b(t,!!e.mipmap):t.byteLength;const{width:i,height:r}=t instanceof Image||t instanceof ImageData||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement?H(t):e,n=e.pixelFormat??6408,s=(0,_.wH)(n);return(e.mipmap?4/3:1)*i*r*s||0}(this._data,this._parameters)}load(t){if(this._loadingPromise)return this._loadingPromise;if(this._texture)return this._texture;const e=this._data;return null==e?(this._texture=new g.A(t,this._createDescriptor(t),null),this._texture):(this._emptyTexture=t.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof e?this._loadFromURL(t,e):e instanceof Image?this._loadFromImageElement(t,e):e instanceof HTMLVideoElement?this._loadFromVideoElement(t,e):e instanceof ImageData||e instanceof HTMLCanvasElement?this._loadFromImage(t,e):(0,a.mg)(e)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(t,e):(0,a.mw)(e)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(t,new Uint8Array(e)):((0,a.mw)(e)||(0,a.mg)(e))&&"image/ktx2"===this._parameters.encoding?this._loadFromKTX2(t,e):((0,a.mw)(e)||(0,a.mg)(e))&&"image/x.basis"===this._parameters.encoding?this._loadFromBasis(t,e):(0,a.mw)(e)?this._loadFromPixelData(t,new Uint8Array(e)):(0,a.iu)(e)?this._loadFromPixelData(t,e):null)}_update(t,e){return null==this._texture||t.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||e===t.currentTime?e:(this._texture.setData(t),this._texture.descriptor.hasMipmap&&this._texture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),t.currentTime)}_loadFromDDSData(t,e){return this._texture=function(t,e,i){const r=F(i,e.hasMipmap??!1);if(null==r)throw new Error("DDS texture data is null");const{textureData:n,internalFormat:s,width:o,height:a}=r;return e.samplingMode=n.levels.length>1?9987:9729,e.hasMipmap=n.levels.length>1,e.internalFormat=s,e.width=o,e.height=a,new g.A(t,e,n)}(t,this._createDescriptor(t),e),this._emptyTexture=null,this._texture}_loadFromKTX2(t,e){return this._loadAsync(()=>async function(t,e,i){null==v&&(v=await x());const r=new v.KTX2File(new Uint8Array(i));if(!M(r))return null;r.startTranscoding();const n=C(t,e,r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),(t,e)=>r.getImageTranscodedSizeInBytes(t,0,0,e),(t,e,i)=>r.transcodeImage(i,t,0,0,e,0,-1,-1));return r.close(),r.delete(),n}(t,this._createDescriptor(t),e).then(t=>(this._texture=t,t)))}_loadFromBasis(t,e){return this._loadAsync(()=>async function(t,e,i){null==v&&(v=await x());const r=new v.BasisFile(new Uint8Array(i));if(!A(r))return null;r.startTranscoding();const n=C(t,e,r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),(t,e)=>r.getImageTranscodedSizeInBytes(0,t,e),(t,e,i)=>r.transcodeImage(i,0,t,e,0,0));return r.close(),r.delete(),n}(t,this._createDescriptor(t),e).then(t=>(this._texture=t,t)))}_loadFromPixelData(t,e){(0,N.vA)(this._parameters.width>0&&this._parameters.height>0);const i=this._createDescriptor(t);return 6407!==i.pixelFormat&&6408!==i.pixelFormat||(i.compress=this._parameters.compressionOptions),i.width=this._parameters.width??0,i.height=this._parameters.height??0,this._texture=new g.A(t,i,e),this._texture}_loadFromURL(t,e){return this._loadAsync(async i=>{const r=await(0,u.D)(e,{signal:i});return(0,o.Te)(i),this._loadFromImage(t,r)})}_loadFromImageElement(t,e){return e.complete?this._loadFromImage(t,e):this._loadAsync(async i=>{const r=await(0,d.y)(e,e.src,!1,i);return(0,o.Te)(i),this._loadFromImage(t,r)})}_loadFromVideoElement(t,e){return e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(t,e):this._loadFromVideoElementAsync(t,e)}_loadFromVideoElementAsync(t,e){return this._loadAsync(i=>new Promise((n,a)=>{const c=()=>{e.removeEventListener("loadeddata",h),e.removeEventListener("error",l),(0,s.xt)(u)},h=()=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(c(),n(this._loadFromImage(t,e)))},l=t=>{c(),a(t||new r.A("texture:load-error","Failed to load video"))};e.addEventListener("loadeddata",h),e.addEventListener("error",l);const u=(0,o.u7)(i,()=>l((0,o.NK)()))}))}_loadFromImage(t,e){let i=e;i instanceof HTMLVideoElement||(i=(0,P.vM)(i,t.parameters));const r=H(i);this._parameters.width=r.width,this._parameters.height=r.height;const n=this._createDescriptor(t);return n.width=r.width,n.height=r.height,n.compress=this._parameters.compressionOptions,this._texture=new g.A(t,n,i),this._emptyTexture=null,this.events.emit("loaded"),this._texture}_loadAsync(t){const e=new AbortController;this._loadingController=e;const i=t(e.signal);this._loadingPromise=i;const r=()=>{this._loadingController===e&&(this._loadingController=null),this._loadingPromise===i&&(this._loadingPromise=null),this._emptyTexture=null};return i.then(r,r),i}unload(){if(this._texture=(0,s.WD)(this._texture),this._emptyTexture=null,null!=this._loadingController){const t=this._loadingController;this._loadingController=null,this._loadingPromise=null,t.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function H(t){return t instanceof HTMLVideoElement?{width:t.videoWidth,height:t.videoHeight}:t}const z={wrap:{s:10497,t:10497},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1}},11725(t,e,i){i.d(e,{i:()=>a});var r=i(24326),n=i(49255),s=i(43616),o=i(65786);class a{constructor(t,e){this.id=(0,r.c)(),this.supportsEdges=!1,this._renderPriority=0,this._parameters=new e,(0,s.MB)(this._parameters,t),this.validateParameters(this._parameters)}get useIndexing(){return this.parameters.useIndexing??!1}get parameters(){return this._parameters}update(t){return!1}setParameters(t,e=!0){(0,s.MB)(this._parameters,t)&&(this.validateParameters(this._parameters),e&&this._parametersChanged())}validateParameters(t){}shouldRender(t){return this.visible&&this.isVisibleForOutput(t.output)&&(!this.parameters.isDecoration||t.bind.decorations)&&0!==(this.parameters.renderOccluded&t.renderOccludedMask)}isVisibleForOutput(t){return!0}get renderPriority(){return this._renderPriority}set renderPriority(t){t!==this._renderPriority&&(this._renderPriority=t,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}get renderOccludedFlags(){return this.visible?this.parameters.renderOccluded:0}get testsTransparentRenderOrder(){return this.parameters.testsTransparentRenderOrder}get hasEmissions(){return 0}getConfiguration(t){return this.updateConfiguration(t),this._configuration}updateConfiguration(t){this._configuration.output=t.output,this._configuration.hasEmission=t.hasEmission&&(0,n._o)(t.output),this._configuration.hasHighlightMixTexture=10===t.output&&null!=t.highlightMixTexture,this._configuration.useFloatBlend=t.useFloatBlend.value,this._configuration.emissionDimmingPass=t.transparentWithoutDepthEmissionDimmingPass&&(0,n._o)(t.output)}}o.Y},17478(t,e,i){i.d(e,{h:()=>s,p:()=>o});var r=i(24326);class n{constructor(){this.uid=(0,r.c)()}}class s extends n{constructor(t){super(),this.highlightName=t,this.channel=0}}class o extends n{constructor(){super(...arguments),this.channel=1}}},33524(t,e,i){i.d(e,{Yf:()=>o,mt:()=>c,z5:()=>a});var r=i(49255),n=i(90644);const s=(0,n.p3)(1,0,1,771);function o(t,e=!1,i=!1){if(i)return n.uR;switch(t){case 0:return e?n.RC:n.T8;case 1:return s;default:return null}}function a(t){if(t.draped)return null;switch(t.output){case 0:case 2:default:return t.writeDepth?n.Uy:null;case 1:return null}}function c(t,e=513){return{func:(0,r.Sp)(t)?515:e}}},56133(t,e,i){i.d(e,{Ax:()=>h,Q0:()=>u,cP:()=>c,iB:()=>l,m:()=>n,r8:()=>a,sf:()=>s,v0:()=>o});var r=i(90644);const n={func:513},s={func:519},o={mask:255},a={mask:0},c=(0,r.nk)(2,2,{compare:519,fail:7680,zFail:7680,zPass:0}),h=(0,r.nk)(2,2,{compare:519,fail:7680,zFail:7680,zPass:7681}),l=(0,r.nk)(2,2,{compare:514,fail:7680,zFail:7680,zPass:7680}),u=(0,r.nk)(2,2,{compare:517,fail:7680,zFail:7680,zPass:7680})},77194(t,e,i){i.d(e,{PS:()=>n}),i(44208);var r=i(34727);class n{constructor(){this._scale=0,this._angleFactor=0,this._minScale=0}update(t,e,i,r){i?(this._scale=Math.min(i.divisor/(e-i.offset),1),this._angleFactor=function(t){return Math.abs(t)**3}(t),this._minScale=null!=r?Math.min(i.minPixelSize/r,1):0):(this._scale=1,this._minScale=1,this._angleFactor=1)}apply(t){const{_scale:e,_angleFactor:i,_minScale:n}=this;return t*(0,r.qE)((0,r.Cc)(e,1,i),n,1)}applyVec2(t,e){t[0]=this.apply(e[0]),t[1]=this.apply(e[1])}}},78988(t,e,i){i.d(e,{Mv:()=>n,vM:()=>s});var r=i(49186);function n(t,e){return e=16*Math.floor(e/16),Math.min(16*Math.round(t/16),e)}function s(t,e){const[i,r]=o(t,e);return t.width===i&&t.height===r?t:a(t,i,r)}function o({width:t,height:e},{maxPreferredTexturePixels:i,maxTextureSize:r}){const s=Math.max(t,e),o=t*e;if(s<=r&&o<=i)return[t,e];const a=Math.min(Math.sqrt(i/o),r/s);return[n(Math.round(t*a),r),n(Math.round(e*a),r)]}function a(t,e,i){if(t instanceof ImageData)return a(function(t){const e=document.createElement("canvas");e.width=t.width,e.height=t.height;const i=e.getContext("2d");if(null==i)throw new r.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return i.putImageData(t,0,0),e}(t),e,i);const n=document.createElement("canvas");return n.width=e,n.height=i,n.getContext("2d").drawImage(t,0,0,n.width,n.height),n}},16396(t,e,i){i.d(e,{ou:()=>c}),i(77690),i(29242),i(58083),i(9093);var r=i(35522),n=i(51850),s=i(94008),o=i(57005);const a=new class{constructor(t=0){this.offset=t,this.tmpVertex=(0,n.vt)(),this._tmpSphere=new s.iy}applyToVertex(t,e,i){const n=this.objectTransform.transform,s=(0,r.hZ)(h,t,e,i),o=(0,r.Z0)(s,s,n),a=this.offset/(0,r.Bw)(o);(0,r.Ln)(o,o,o,a);const c=this.objectTransform.inverse;return(0,r.Z0)(this.tmpVertex,o,c),this.tmpVertex}applyToMinMax(t,e){const i=this.offset/(0,r.Bw)(t);(0,r.Ln)(t,t,t,i);const n=this.offset/(0,r.Bw)(e);(0,r.Ln)(e,e,e,n)}applyToAabb(t){const e=this.offset/Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]+=t[0]*e,t[1]+=t[1]*e,t[2]+=t[2]*e;const i=this.offset/Math.sqrt(t[3]*t[3]+t[4]*t[4]+t[5]*t[5]);return t[3]+=t[3]*i,t[4]+=t[4]*i,t[5]+=t[5]*i,t}applyToBoundingSphere(t){const e=t.center,i=(0,r.Bw)(e),n=this.offset/i;return(0,r.Ln)(this._tmpSphere.center,e,e,n),this._tmpSphere.radius=t.radius+t.radius*this.offset/i,this._tmpSphere}};function c(t){return null!=t?(a.offset=t,a):null}new class{constructor(t=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpVertex=(0,n.vt)(),this._tmpMbs=new s.iy,this._tmpObb=new o.ab,this._resetOffset(t)}_resetOffset(t){this._offset=t,this._totalOffset=t}set offset(t){this._resetOffset(t)}get offset(){return this._offset}set componentOffset(t){this._totalOffset=this._offset+t}set localOrigin(t){this.componentLocalOriginLength=(0,r.Bw)(t)}applyToVertex(t,e,i){const n=(0,r.hZ)(h,t,e,i),s=(0,r.hZ)(l,t,e,i+this.componentLocalOriginLength),o=this._totalOffset/(0,r.Bw)(s);return(0,r.Ln)(this._tmpVertex,n,s,o),this._tmpVertex}applyToAabb(t){const e=this.componentLocalOriginLength,i=t[0],r=t[1],n=t[2]+e,s=t[3],o=t[4],a=t[5]+e,c=Math.abs(i),h=Math.abs(r),l=Math.abs(n),u=Math.abs(s),d=Math.abs(o),p=Math.abs(a),f=.5*(1+Math.sign(i*s))*Math.min(c,u),m=.5*(1+Math.sign(r*o))*Math.min(h,d),g=.5*(1+Math.sign(n*a))*Math.min(l,p),_=Math.sqrt(f*f+m*m+g*g),v=Math.sign(c+i),y=Math.sign(h+r),x=Math.sign(l+n),b=Math.sign(u+s),w=Math.sign(d+o),T=Math.sign(p+a),A=this._totalOffset;if(_<A)return t[0]-=(1-v)*A,t[1]-=(1-y)*A,t[2]-=(1-x)*A,t[3]+=b*A,t[4]+=w*A,t[5]+=T*A,t;const M=Math.max(c,u),C=Math.max(h,d),S=Math.max(l,p),E=A/Math.sqrt(M*M+C*C+S*S),R=A/_,I=R-E,O=-I;return t[0]+=i*(v*O+R),t[1]+=r*(y*O+R),t[2]+=n*(x*O+R),t[3]+=s*(b*I+E),t[4]+=o*(w*I+E),t[5]+=a*(T*I+E),t}applyToMbs(t){const e=t.center,i=(0,r.Bw)(e),n=this._totalOffset/i;return(0,r.Ln)(this._tmpMbs.center,e,e,n),this._tmpMbs.radius=t.radius+t.radius*this._totalOffset/i,this._tmpMbs}applyToObb(t){return(0,o.gm)(t,this._totalOffset,this._totalOffset,1,this._tmpObb),this._tmpObb}},new class{constructor(t=0){this.offset=t,this.tmpVertex=(0,n.vt)()}applyToVertex(t,e,i){const n=(0,r.hZ)(h,t,e,i),s=(0,r.WQ)(l,n,this.localOrigin),o=this.offset/(0,r.Bw)(s);return(0,r.Ln)(this.tmpVertex,n,s,o),this.tmpVertex}applyToAabb(t){const e=u,i=d,r=p;for(let n=0;n<3;++n)e[n]=t[0+n]+this.localOrigin[n],i[n]=t[3+n]+this.localOrigin[n],r[n]=e[n];const n=this.applyToVertex(e[0],e[1],e[2]);for(let e=0;e<3;++e)t[e]=n[e],t[e+3]=n[e];const s=e=>{const i=this.applyToVertex(e[0],e[1],e[2]);for(let e=0;e<3;++e)t[e]=Math.min(t[e],i[e]),t[e+3]=Math.max(t[e+3],i[e])};for(let t=1;t<8;++t){for(let n=0;n<3;++n)r[n]=t&1<<n?i[n]:e[n];s(r)}let o=0;for(let t=0;t<3;++t)e[t]*i[t]<0&&(o|=1<<t);if(0!==o&&7!==o)for(let t=0;t<8;++t)if(0===(o&t)){for(let n=0;n<3;++n)r[n]=o&1<<n?0:t&1<<n?e[n]:i[n];s(r)}for(let e=0;e<3;++e)t[e]-=this.localOrigin[e],t[e+3]-=this.localOrigin[e];return t}};const h=(0,n.vt)(),l=(0,n.vt)(),u=(0,n.vt)(),d=(0,n.vt)(),p=(0,n.vt)()},75497(t,e,i){i.d(e,{$p:()=>s,Qx:()=>o,e_:()=>a});var r=i(51850),n=i(37957);class s{constructor(t=(0,r.Ul)()){this.intensity=t}}class o{constructor(t=(0,r.Ul)(),e=(0,r.fA)(.57735,.57735,.57735),i=!0,n=1,s=1){this.intensity=t,this.direction=e,this.castShadows=i,this.specularStrength=n,this.environmentStrength=s}}class a{constructor(){this.r=n.P.create(),this.g=n.P.create(),this.b=n.P.create()}clear(){this.r.fill(0),this.g.fill(0),this.b.fill(0)}}},57226(t,e,i){i.d(e,{TA:()=>x,uH:()=>y});var r=i(34727),n=i(35522),s=i(51850),o=i(75497);function a(t,e,i){i.length=t.length;for(let r=0;r<t.length;r++)i[r]=t[r]*e;return i}function c(t,e,i){(i=i||t).length=t.length;for(let r=0;r<t.length;r++)i[r]=t[r]+e[r];return i}var h=i(37957);const l=.28209479177;function u(t,e){(0,n.ze)(m,t.direction),function(t,e){const i=t[0],r=t[1],n=t[2],s=e||h.P.create();s[0]=l,s[1]=.4886025119*i,s[2]=.4886025119*n,s[3]=.4886025119*r,s[4]=1.09254843059*i*r,s[5]=1.09254843059*r*n,s[6]=.31539156525*(3*n*n-1),s[7]=1.09254843059*i*n,s[8]=.54627421529*(i*i-r*r)}(m,p),function(t,e,i){(i=i||t).length=t.length;for(let r=0;r<t.length;r++)i[r]=t[r]*e[r]}(p,g),a(p,t.intensity[0],f),c(e.r,f),a(p,t.intensity[1],f),c(e.g,f),a(p,t.intensity[2],f),c(e.b,f)}function d(t,e){e.r[0]+=l*g[0]*t.intensity[0]*4*Math.PI,e.g[0]+=l*g[0]*t.intensity[1]*4*Math.PI,e.b[0]+=l*g[0]*t.intensity[2]*4*Math.PI}const p=h.P.create(),f=h.P.create(),m=(0,s.vt)(),g=[3.141593,2.094395,2.094395,2.094395,.785398,.785398,.785398,.785398,.785398];class _{constructor(){this.color=(0,s.vt)(),this.intensity=1}}class v{constructor(){this.direction=(0,s.vt)(),this.ambient=new _,this.diffuse=new _}}const y=.4;class x{constructor(){this._legacy=new v,this.globalFactor=.5,this.noonFactor=.5,this._sphericalHarmonics=new o.e_,this._mainLight=new o.Qx((0,s.vt)(),(0,s.fA)(1,0,0),!1)}get legacy(){return this._legacy}get sh(){return this._sphericalHarmonics}get mainLight(){return this._mainLight}set(t){(function(t,e,i){var r;i.clear(),(0,n.hZ)(e.intensity,0,0,0),r=t,Array.isArray(r)?Array.isArray(t)&&((0,n.C)(e.direction,t[0].direction),(0,n.C)(e.intensity,t[0].intensity),e.specularStrength=t[0].specularStrength,e.environmentStrength=t[0].environmentStrength,e.castShadows=t[0].castShadows,u(t[2],i),d(t[1],i)):d(t,i)})(t,this._mainLight,this._sphericalHarmonics),this.updateLegacy()}updateLegacy(){(0,n.C)(this._legacy.direction,this._mainLight.direction);const t=1/Math.PI;this._legacy.ambient.color[0]=.282095*this._sphericalHarmonics.r[0]*t,this._legacy.ambient.color[1]=.282095*this._sphericalHarmonics.g[0]*t,this._legacy.ambient.color[2]=.282095*this._sphericalHarmonics.b[0]*t,(0,n.hs)(this._legacy.diffuse.color,this._mainLight.intensity,t),(0,n.C)(b,this._legacy.diffuse.color),(0,n.hs)(b,b,y*this.globalFactor),(0,n.WQ)(this._legacy.ambient.color,this._legacy.ambient.color,b)}copyFrom(t){h.P.copy(this._sphericalHarmonics.r,t.sh.r),h.P.copy(this._sphericalHarmonics.g,t.sh.g),h.P.copy(this._sphericalHarmonics.b,t.sh.b),(0,n.C)(this._mainLight.direction,t.mainLight.direction),(0,n.C)(this._mainLight.intensity,t.mainLight.intensity),this._mainLight.castShadows=t.mainLight.castShadows,this._mainLight.specularStrength=t.mainLight.specularStrength,this._mainLight.environmentStrength=t.mainLight.environmentStrength,this.globalFactor=t.globalFactor,this.noonFactor=t.noonFactor}lerpLighting(t,e,i){if((0,n.Cc)(this._mainLight.intensity,t.mainLight.intensity,e.mainLight.intensity,i),this._mainLight.environmentStrength=(0,r.Cc)(t.mainLight.environmentStrength,e.mainLight.environmentStrength,i),this._mainLight.specularStrength=(0,r.Cc)(t.mainLight.specularStrength,e.mainLight.specularStrength,i),(0,n.C)(this._mainLight.direction,e.mainLight.direction),this._mainLight.castShadows=e.mainLight.castShadows,this.globalFactor=(0,r.Cc)(t.globalFactor,e.globalFactor,i),this.noonFactor=(0,r.Cc)(t.noonFactor,e.noonFactor,i),t.sh.r.length===e.sh.r.length)for(let n=0;n<e.sh.r.length;n++)this._sphericalHarmonics.r[n]=(0,r.Cc)(t.sh.r[n],e.sh.r[n],i),this._sphericalHarmonics.g[n]=(0,r.Cc)(t.sh.g[n],e.sh.g[n],i),this._sphericalHarmonics.b[n]=(0,r.Cc)(t.sh.b[n],e.sh.b[n],i);else for(let t=0;t<e.sh.r.length;t++)this._sphericalHarmonics.r[t]=e.sh.r[t],this._sphericalHarmonics.g[t]=e.sh.g[t],this._sphericalHarmonics.b[t]=e.sh.b[t];this.updateLegacy()}}const b=(0,s.vt)()},33442(t,e,i){i.d(e,{Tk:()=>_,b6:()=>p,sG:()=>u});var r=i(35522),n=i(51850),s=i(49255);const o=d(-1),a=d(1),c=o,h=new Array;h[0]=null,h[1]=a,h[2]=o,h[3]=d(-2),h[4]=d(-3);const l=h.map(t=>function(t,e){return e?{factor:t.factor+e.factor,units:t.units+e.units}:t}(c,t));function u({output:t,enableOITOffset:e,polygonOffset:i}){return(0,s.Sp)(t)&&e?l[i]:h[i]}function d(t){return{factor:1*t,units:2*t}}function p(t,e,i,n){const s=u(e);if(!s)return t;const o=m*s.units,a=(0,r.S8)(g,(0,r.jb)(g,n,i));return(e,i,n)=>{const c=(i?1-Math.abs((0,r.Om)(a,i)):0)*s.factor*f+o;return t(e+c,i,n)}}h[1]=a;const f=5e-5,m=5e-6,g=(0,n.vt)();function _(t){const e=u(t)??{factor:0,units:0};return{factor:e.factor+o.factor*t.polygonOffsetIndex,units:e.units+o.units*t.polygonOffsetIndex}}},47724(t,e,i){i.d(e,{L:()=>a});var r=i(5482),n=i(51976),s=i(68317);class o extends s.Hz{constructor(){super(...arguments),this.hasHighlightMixTexture=!1,this.emissionDimmingPass=!1,this.bindType=1,this.instanced=!1,this.writeDepth=!0,this.oitPremultipliedAlpha=!1}}(0,r.Cg)([(0,n.W)()],o.prototype,"hasHighlightMixTexture",void 0),(0,r.Cg)([(0,n.W)()],o.prototype,"emissionDimmingPass",void 0);class a extends o{constructor(){super(...arguments),this.polygonOffset=0,this.transparent=!1,this.enableOITOffset=!0}}(0,r.Cg)([(0,n.W)({count:5})],a.prototype,"polygonOffset",void 0),(0,r.Cg)([(0,n.W)()],a.prototype,"transparent",void 0),(0,r.Cg)([(0,n.W)()],a.prototype,"enableOITOffset",void 0)},35622(t,e,i){i.d(e,{S:()=>a,p:()=>c}),i(34727),i(77690),i(29242),i(58083);var r=i(9093),n=(i(35522),i(51850)),s=(i(78955),i(91829),i(31756),i(26857),i(16943),i(65786));class o extends s.Y{constructor(t){super(),this.vvSize=t?.size??null,this.vvColor=t?.color??null,this.vvOpacity=t?.opacity??null}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}(0,r.vt)(),(0,n.vt)(),(0,r.vt)();class a extends o{constructor(){super(...arguments),this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}}const c=8},43616(t,e,i){i.d(e,{MB:()=>c,Um:()=>h,kE:()=>o});var r=i(4576),n=i(34727),s=i(77194);function o(t,e,i,r,s,o){let a=i.screenLength*t.pixelRatio;null!=s&&(l.update(r,e,s,o),a=l.apply(a));const c=a*Math.tan(.5*t.fovY)/(.5*t.fullHeight);return(0,n.qE)(c*e,i.minWorldLength,i.maxWorldLength)}const a=(0,r.VO)();function c(t,e){let i=!1;for(const r in e){const n=e[r];void 0!==n&&(Array.isArray(n)?Array.isArray(t[r])&&a(n,t[r])||(t[r]=n.slice(),i=!0):t[r]!==n&&(i=!0,t[r]=n))}return i}const h={multiply:1,ignore:2,replace:3,tint:4},l=new s.PS},59907(t,e,i){i.d(e,{Wu:()=>u,vJ:()=>f});var r=i(35522),n=i(51850),s=i(58083),o=i(13030),a=i(620);function c(t,e,i){const{data:r,indices:n}=t,s=e.typedBuffer,o=e.typedBufferStride,a=n.length;i*=o;for(let t=0;t<a;++t){const e=2*n[t];s[i]=r[e],s[i+1]=r[e+1],i+=o}}function h(t,e,i,r=1){const{data:n,indices:s}=t,o=e.typedBuffer,a=e.typedBufferStride,c=s.length;if(i*=a,1===r)for(let t=0;t<c;++t){const e=3*s[t];o[i]=n[e],o[i+1]=n[e+1],o[i+2]=n[e+2],i+=a}else for(let t=0;t<c;++t){const e=3*s[t];for(let t=0;t<r;++t)o[i]=n[e],o[i+1]=n[e+1],o[i+2]=n[e+2],i+=a}}function l(t,e,i,r=1){const{data:n,indices:s}=t,o=e.typedBuffer,a=e.typedBufferStride,c=s.length;if(i*=a,1===r)for(let t=0;t<c;++t){const e=4*s[t];o[i]=n[e],o[i+1]=n[e+1],o[i+2]=n[e+2],o[i+3]=n[e+3],i+=a}else for(let t=0;t<c;++t){const e=4*s[t];for(let t=0;t<r;++t)o[i]=n[e],o[i+1]=n[e+1],o[i+2]=n[e+2],o[i+3]=n[e+3],i+=a}}function u(t,e,i,n){(0,r.Re)(d,t,e);const s=Math.max(Math.sqrt((0,r.Bw)(d)),1e-4);(0,r.hs)(d,d,1/s),i[n++]=d[0],i[n++]=d[1],i[n++]=d[2],i[n++]=s}const d=(0,n.vt)();function p(t,e,i,r,n=1){const s=e.typedBuffer,o=e.typedBufferStride;if(r*=o,1===n)for(let e=0;e<i;++e)s[r]=t[0],s[r+1]=t[1],s[r+2]=t[2],s[r+3]=t[3],r+=o;else for(let e=0;e<i;++e)for(let e=0;e<n;++e)s[r]=t[0],s[r+1]=t[1],s[r+2]=t[2],s[r+3]=t[3],r+=o}function f(t,e,i,r,n,s){const{buffer:a,offset:c}=s;for(const s of i.fields.keys()){const i=t.get(s),h=i?.indices;if(i&&h)m(s,i,r,n,a,c);else if("olidColor"===s&&null!=e){const i=t.get("position")?.indices;if(i){const t=i.length;p(e,a.getField(s,o.XP),t,c)}}}}function m(t,e,i,r,n,u){switch(t){case"position":{(0,a.vA)(3===e.size);const r=n.getField(t,o.xs);(0,a.vA)(!!r,`No buffer view for ${t}`),function(t,e,i,r,n=1){if(!e)return void h(t,i,r,n);const{data:o,indices:a}=t,c=i.typedBuffer,l=i.typedBufferStride,u=a.length,d=e[0],p=e[1],f=e[2],m=e[4],g=e[5],_=e[6],v=e[8],y=e[9],x=e[10],b=e[12],w=e[13],T=e[14];r*=l;let A=0,M=0,C=0;const S=(0,s.tZ)(e)?t=>{A=o[t]+b,M=o[t+1]+w,C=o[t+2]+T}:t=>{const e=o[t],i=o[t+1],r=o[t+2];A=d*e+m*i+v*r+b,M=p*e+g*i+y*r+w,C=f*e+_*i+x*r+T};if(1===n)for(let t=0;t<u;++t)S(3*a[t]),c[r]=A,c[r+1]=M,c[r+2]=C,r+=l;else for(let t=0;t<u;++t){S(3*a[t]);for(let t=0;t<n;++t)c[r]=A,c[r+1]=M,c[r+2]=C,r+=l}}(e,i,r,u);break}case"normal":{(0,a.vA)(3===e.size);const i=n.getField(t,o.xs);(0,a.vA)(!!i,`No buffer view for ${t}`),function(t,e,i,r,n=1){if(!e)return void h(t,i,r,n);const{data:o,indices:a}=t,c=e,l=i.typedBuffer,u=i.typedBufferStride,d=a.length,p=c[0],f=c[1],m=c[2],g=c[4],_=c[5],v=c[6],y=c[8],x=c[9],b=c[10],w=!(0,s.ut)(c),T=1e-6,A=1-T;r*=u;let M=0,C=0,S=0;const E=(0,s.tZ)(c)?t=>{M=o[t],C=o[t+1],S=o[t+2]}:t=>{const e=o[t],i=o[t+1],r=o[t+2];M=p*e+g*i+y*r,C=f*e+_*i+x*r,S=m*e+v*i+b*r};if(1===n)if(w)for(let t=0;t<d;++t){E(3*a[t]);const e=M*M+C*C+S*S;if(e<A&&e>T){const t=1/Math.sqrt(e);l[r]=M*t,l[r+1]=C*t,l[r+2]=S*t}else l[r]=M,l[r+1]=C,l[r+2]=S;r+=u}else for(let t=0;t<d;++t)E(3*a[t]),l[r]=M,l[r+1]=C,l[r+2]=S,r+=u;else for(let t=0;t<d;++t){if(E(3*a[t]),w){const t=M*M+C*C+S*S;if(t<A&&t>T){const e=1/Math.sqrt(t);M*=e,C*=e,S*=e}}for(let t=0;t<n;++t)l[r]=M,l[r+1]=C,l[r+2]=S,r+=u}}(e,r,i,u);break}case"normalCompressed":case"profileRight":case"profileUp":{(0,a.vA)(2===e.size);const i=n.getField(t,o.mJ);(0,a.vA)(!!i,`No buffer view for ${t}`),c(e,i,u);break}case"uv0":{(0,a.vA)(2===e.size);const i=n.getField(t,o.ZD)??n.getField(t,o.gH);(0,a.vA)(!!i,`No buffer view for ${t}`),c(e,i,u);break}case"uvi":{(0,a.vA)(2===e.size);const i=n.getField(t,o.mJ);(0,a.vA)(!!i,`No buffer view for ${t}`),c(e,i,u);break}case"color":case"symbolColor":{const i=n.getField(t,o.XP);(0,a.vA)(!!i,`No buffer view for ${t}`),(0,a.vA)(3===e.size||4===e.size),function(t,e,i,r,n=1){const{data:s,indices:o}=t,a=i.typedBuffer,c=i.typedBufferStride,h=o.length;if(r*=c,e===s.length&&4===e){a[r]=s[0],a[r+1]=s[1],a[r+2]=s[2],a[r+3]=s[3];const t=new Uint32Array(i.typedBuffer.buffer,i.start),e=c/4,o=t[r/=4];r+=e;const l=h*n;for(let i=1;i<l;++i)t[r]=o,r+=e;return}if(1!==n)if(4!==e)for(let t=0;t<h;++t){const e=3*o[t];for(let t=0;t<n;++t)a[r]=s[e],a[r+1]=s[e+1],a[r+2]=s[e+2],a[r+3]=255,r+=c}else for(let t=0;t<h;++t){const e=4*o[t];for(let t=0;t<n;++t)a[r]=s[e],a[r+1]=s[e+1],a[r+2]=s[e+2],a[r+3]=s[e+3],r+=c}else{if(4===e){for(let t=0;t<h;++t){const e=4*o[t];a[r]=s[e],a[r+1]=s[e+1],a[r+2]=s[e+2],a[r+3]=s[e+3],r+=c}return}for(let t=0;t<h;++t){const e=3*o[t];a[r]=s[e],a[r+1]=s[e+1],a[r+2]=s[e+2],a[r+3]=255,r+=c}}}(e,e.size,i,u);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{const i=n.getField(t,o.Y$)??n.getField(t,o.Y$);(0,a.vA)(!!i,`No buffer view for ${t}`),(0,a.vA)(1===e.size),function(t,e,i){const{data:r,indices:n}=t,s=e.typedBuffer,o=e.typedBufferStride,a=n.length,c=r[0];i*=o;for(let t=0;t<a;++t)s[i]=c,i+=o}(e,i,u);break}case"tangent":{(0,a.vA)(4===e.size);const r=n.getField(t,o.Eq);(0,a.vA)(!!r,`No buffer view for ${t}`),function(t,e,i,r,n=1){if(!e)return void l(t,i,r,n);const{data:o,indices:a}=t,c=e,h=i.typedBuffer,u=i.typedBufferStride,d=a.length,p=c[0],f=c[1],m=c[2],g=c[4],_=c[5],v=c[6],y=c[8],x=c[9],b=c[10],w=!(0,s.ut)(c),T=1e-6,A=1-T;if(r*=u,1===n)for(let t=0;t<d;++t){const e=4*a[t],i=o[e],n=o[e+1],s=o[e+2],c=o[e+3];let l=p*i+g*n+y*s,d=f*i+_*n+x*s,M=m*i+v*n+b*s;if(w){const t=l*l+d*d+M*M;if(t<A&&t>T){const e=1/Math.sqrt(t);l*=e,d*=e,M*=e}}h[r]=l,h[r+1]=d,h[r+2]=M,h[r+3]=c,r+=u}else for(let t=0;t<d;++t){const e=4*a[t],i=o[e],s=o[e+1],c=o[e+2],l=o[e+3];let d=p*i+g*s+y*c,M=f*i+_*s+x*c,C=m*i+v*s+b*c;if(w){const t=d*d+M*M+C*C;if(t<A&&t>T){const e=1/Math.sqrt(t);d*=e,M*=e,C*=e}}for(let t=0;t<n;++t)h[r]=d,h[r+1]=M,h[r+2]=C,h[r+3]=l,r+=u}}(e,i,r,u);break}case"profileVertexAndNormal":{(0,a.vA)(4===e.size);const i=n.getField(t,o.jz)??n.getField(t,o.Eq);(0,a.vA)(!!i,`No buffer view for ${t}`),l(e,i,u);break}case"profileAuxData":{(0,a.vA)(3===e.size);const i=n.getField(t,o.EC)??n.getField(t,o.xs);(0,a.vA)(!!i,`No buffer view for ${t}`),h(e,i,u);break}}}},26292(t,e,i){i.d(e,{D:()=>d});var r=i(49255),n=i(22911),s=i(3871),o=i(63365);function a(t){t.code.add("\n vec3 emissionDimming(vec3 srcColor, float srcAlpha) {\n srcColor = clamp(srcColor, vec3(0.0), srcColor);\n return mix(vec3(1.0), srcColor, srcAlpha);\n }\n ")}var c=i(31821),h=i(26934);function l(t,e){e.useFloatBlend?t.code.add(c.H`float ditherNoise(vec4 color) { return 0.0; }`):t.code.add("\n float ditherNoise(vec4 color) {\n vec2 seed = color.rg + color.ba + gl_FragCoord.xy + gl_FragCoord.z;\n return (fract(52.9829189 * fract(dot(seed, vec2(0.06711056, 0.00583715)))) - 0.5) / 255.0;\n }")}var u=i(66211);function d(t,e){t.include(s.Q,e),t.include(n.NL,e);const{fragment:i,outputs:d}=t;i.include(o.a);const{output:p,hasEmission:f,discardInvisibleFragments:m,oitPremultipliedAlpha:g,snowCover:_,useFloatBlend:v,emissionDimmingPass:y}=e,x=11===p,b=(0,r.Sp)(p),w=(0,r.Rb)(p),T=(0,r._o)(p)&&!b;let A=0;(T||b)&&d.add("fragColor","vec4",A++),f&&d.add("fragEmission","vec4",A++),b&&d.add("fragAlpha","float",A++),i.include(h.Q),i.include(u.H,e),i.include(l,e),y&&i.include(a),i.code.add(c.H`
250
250
  void outputColorHighlightOLID(vec4 finalColor, vec3 emissiveSymbolColor ${(0,c.If)(_,", float snow")}) {
251
251
  ${(0,c.If)(x,"finalColor.a = 1.0;")}
252
252
  ${(0,c.If)(m,"if (finalColor.a < alphaCutoff) { discard; }")}
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[926,2188],{69540(e,t,i){i.d(t,{OU:()=>c,Pw:()=>h});var n=i(5482),s=i(69622),r=(i(44208),i(4718)),o=(i(53966),i(97768)),a=i(88620),l=i(64108);const u=Symbol("ClonableMixin"),c=e=>{var t;const i=e;let s=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,n=t.store,s={},l=new Map;for(const t in i){const o=i[t],a=n?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==a&&0!==a&&5!==a&&4!==a)continue;const c=this[t];let h=null;if("function"==typeof u)h=u(c,e);else if("reference"===u)h=c;else if(h=(0,r.TU)(c,e),null!=c&&null==h)continue;0===a?l.set(t,h):s[t]=h}const u=new(0,Object.getPrototypeOf(this).constructor)(s);if(l.size){const e=(0,a.oY)(u)?.store;if(e)for(const[t,i]of l)e.set(t,i,0)}return u}};return s=(0,n.Cg)([(0,l.$)("esri.core.Clonable")],s),s},h=c(s.A)},66344(e,t,i){i.d(t,{q:()=>a});const n=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class s{get size(){return this._size}constructor(e=10485760,t=.3){this._maxSize=e,this._maxClientSizeRatio=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(e){this._clients.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._clients.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,s,o){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==i&&this._notifyRemove(t,a.entry,a.size,0)),s>this._maxSize)return void this._notifyRemove(t,i,s,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return n||console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,0,0);const l=1+Math.max(o,-4)- -3;this._db.set(t,new r(i,s,l)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t){t=e.id+t;const i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let n=i.entry.usedMemory;for(;n>this._maxSize;){const e=this._notifyRemove(t,i.entry,n,1);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}i.size=n,this._size+=n,e.size+=n,this._checkSize()}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach((e,n)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._clients.forEach(i=>{const{id:s,name:r}=i;if(n.startsWith(s)){const i=t[r]||0;t[r]=i+e.size}})});const n={};this._clients.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,n[i]=Math.round(100*e.hitRate)+"%"}else n[i]="0%"});const s=Object.keys(t);s.sort((e,i)=>t[i]-t[e]),s.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+n[i]);for(let t=i.length-1;t>=0;--t){const n=i[t];n&&(e["Priority "+(t+-3-1)]=Math.round(n/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._clients.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,n){const s=this._clients.get(e.split(o)[0])?.removeFunc,r=s?.(t,n,i);return"number"==typeof r?r:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._clients.forEach(e=>this._checkSizeLimits(this._maxClientSize,e)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const n=t?.id;let s=!0;for(;s;){s=!1;for(const[r,a]of this._db)if(0===a.lifetime&&(!n||r.startsWith(n))){const n=t??this._clients.get(r.split(o)[0]);if(this._purgeItem(r,a,n),i.size<=.9*e)return;s||=this._db.has(r)}}for(const[s,r]of this._db)if(!n||s.startsWith(n)){const n=t??this._clients.get(s.split(o)[0]);if(this._purgeItem(s,r,n),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const n=this._notifyRemove(e,t.entry,t.size,1);null!=n&&n>0&&(this._size+=n,i&&(i.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new s(0);class r{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class a{constructor(e,t){this.removeFunc=t,this.id="",this.name="",this.size=0,this._storage=new s(e,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},60999(e,t,i){i.d(t,{DZ:()=>m,Ke:()=>f,Tj:()=>c,UT:()=>p,aD:()=>g,jJ:()=>u});var n=i(5482),s=i(69622),r=i(97768),o=i(17676),a=i(10107),l=i(64108);function u(e,t,i){return(0,o.Lx)(e.map((e,n)=>t.apply(i,[e,n])))}async function c(e,t,i){return(await(0,o.Lx)(e.map((e,n)=>t.apply(i,[e,n])))).map(e=>e.value)}function h(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function f(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return h(await e)}catch(e){return d(e)}}async function m(e){try{return h(await e)}catch(e){return(0,o.QP)(e),d(e)}}function p(e,t){return new y(e,t)}let y=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,r.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=h(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.xt)(this._abortHandle),this._abortController=null}};(0,n.Cg)([(0,a.MZ)()],y.prototype,"value",null),(0,n.Cg)([(0,a.MZ)()],y.prototype,"error",null),(0,n.Cg)([(0,a.MZ)()],y.prototype,"finished",null),(0,n.Cg)([(0,a.MZ)()],y.prototype,"promise",void 0),(0,n.Cg)([(0,a.MZ)()],y.prototype,"_result",void 0),y=(0,n.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],y);class g{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,n.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,n.hk)(t)}}}},67482(e,t,i){function n(e){return null!=a(e)||null!=o(e)}function s(e){return l.test(e)}function r(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let i=!0;if(c&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,n=0;for(;!t&&n<=e.length;)t=!u.test(e[n]),n++;i=!t}}return i}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=l.exec(e);if(!t?.groups)return null;const i=t.groups,n=+i.year,s=+i.month-1,r=+i.day,o=+(i.hours??"0"),a=+(i.minutes??"0"),u=+(i.seconds??"0");if(o>23)return null;if(a>59)return null;if(u>59)return null;const c=i.ms??"0",h=c?+c.padEnd(3,"0").slice(0,3):0;let d;if(i.isUTC||!i.offsetSign)d=Date.UTC(n,s,r,o,a,u,h);else{const e=+i.offsetHours,t=+i.offsetMinutes;d=6e4*("+"===i.offsetSign?-1:1)*(60*e+t)+Date.UTC(n,s,r,o,a,u,h)}return Number.isNaN(d)?null:d}i.d(t,{Br:()=>s,Cq:()=>n,_U:()=>r});const l=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,u=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,c=!Number.isNaN(new Date("technology 10").getTime())},75503(e,t,i){i.d(t,{wq:()=>a});var n=i(4576),s=i(21818),r=(i(44208),i(15142)),o=i(11006);class a{constructor(e=9,t){this._compareMinX=d,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),S.prune(),I.prune(),v.prune(),w.prune()}all(e){l(this._data,e)}search(e,t){let i=this._data;const n=this._toBBox;if(x(e,i))for(S.clear();i;){for(let s=0,r=i.children.length;s<r;s++){const r=i.children[s],o=i.leaf?n(r):r;x(e,o)&&(i.leaf?t(r):_(e,o)?l(r,t):S.push(r))}i=S.pop()}}collides(e){let t=this._data;const i=this._toBBox;if(!x(e,t))return!1;for(S.clear();t;){for(let n=0,s=t.children.length;n<s;n++){const s=t.children[n],r=t.leaf?i(s):s;if(x(e,r)){if(t.leaf||_(e,r))return!0;S.push(s)}}t=S.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new z([]),this}remove(e){if(!e)return this;let t,i=this._data,r=null,o=0,a=!1;const l=this._toBBox(e);for(v.clear(),w.clear();i||v.length>0;){if(i||(i=v.pop(),r=v.data[v.length-1],o=w.pop()??0,a=!0),i.leaf&&(t=(0,n.qh)(i.children,(0,s.z)(e),i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),v.push(i),this._condense(v),this;a||i.leaf||!_(i,l)?r?(o++,i=r.children[o],a=!1):i=null:(v.push(i),w.push(o),o=0,r=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,i,n){const s=i-t+1;let r=this._maxEntries;if(s<=r){const n=new z(e.slice(t,i+1));return u(n,this._toBBox),n}n||(n=Math.ceil(Math.log(s)/Math.log(r)),r=Math.ceil(s/r**(n-1)));const o=new B([]);o.height=n;const a=Math.ceil(s/r),l=a*Math.ceil(Math.sqrt(r));b(e,t,i,l,this._compareMinX);for(let s=t;s<=i;s+=l){const t=Math.min(s+l-1,i);b(e,s,t,a,this._compareMinY);for(let i=s;i<=t;i+=a){const s=Math.min(i+a-1,t);o.children.push(this._build(e,i,s,n-1))}}return u(o,this._toBBox),o}_insert(e,t,i){const n=this._toBBox,s=i?e:n(e);v.clear();const r=function(e,t,i,n){for(;n.push(t),!0!==t.leaf&&n.length-1!==i;){let i,n=1/0,s=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=m(o),l=y(e,o)-a;l<s?(s=l,n=a<n?a:n,i=o):l===s&&a<n&&(n=a,i=o)}t=i||t.children[0]}return t}(s,this._data,t,v);for(r.children.push(e),h(r,s);t>=0&&v.data[t].children.length>this._maxEntries;)this._split(v,t),t--;!function(e,t,i){for(let n=i;n>=0;n--)h(t.data[n],e)}(s,v,t)}_split(e,t){const i=e.data[t],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);const r=this._chooseSplitIndex(i,s,n);if(!r)return;const o=i.children.splice(r,i.children.length-r),a=i.leaf?new z(o):new B(o);a.height=i.height,u(i,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this._data=new B([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let n,s,r;n=s=1/0;for(let o=t;o<=i-t;o++){const t=c(e,0,o,this._toBBox),a=c(e,o,i,this._toBBox),l=g(t,a),u=m(t)+m(a);l<n?(n=l,r=o,s=u<s?u:s):l===n&&u<s&&(s=u,r=o)}return r}_chooseSplitAxis(e,t,i){const n=e.leaf?this._compareMinX:d,s=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,i,n)<this._allDistMargin(e,t,i,s)&&e.children.sort(n)}_allDistMargin(e,t,i,n){e.children.sort(n);const s=this._toBBox,r=c(e,0,t,s),o=c(e,i-t,i,s);let a=p(r)+p(o);for(let n=t;n<i-t;n++){const t=e.children[n];h(r,e.leaf?s(t):t),a+=p(r)}for(let n=i-t-1;n>=t;n--){const t=e.children[n];h(o,e.leaf?s(t):t),a+=p(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const i=e.data[t];if(0===i.children.length)if(t>0){const s=e.data[t-1],r=s.children;r.splice((0,n.qh)(r,i,r.length,s.indexHint),1)}else this.clear();else u(i,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let i=e;for(I.clear();i;){if(!0===i.leaf)for(const e of i.children)t((0,s.z)(e));else I.pushArray(i.children);i=I.pop()??null}}function u(e,t){c(e,0,e.children.length,t,e)}function c(e,t,i,n,s){s||(s=new z([])),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(let r,o=t;o<i;o++)r=e.children[o],h(s,e.leaf?n(r):r);return s}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function m(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function p(e){return e.maxX-e.minX+(e.maxY-e.minY)}function y(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const i=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),s=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,s-i)*Math.max(0,r-n)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function x(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function b(e,t,i,n,s){const r=[t,i];for(;r.length;){const t=r.pop(),i=r.pop();if(t-i<=n)continue;const a=i+Math.ceil((t-i)/n/2)*n;(0,o.q)(e,a,i,t,s),r.push(i,a,a,t)}}const S=new r.A,I=new r.A,v=new r.A,w=new r.A({deallocator:void 0});class F{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class M extends F{constructor(){super(...arguments),this.height=1,this.indexHint=new n.vW}}class z extends M{constructor(e){super(),this.children=e,this.leaf=!0}}class B extends M{constructor(e){super(),this.children=e,this.leaf=!1}}},14607(e,t,i){i.d(t,{B:()=>u,GP:()=>a,qg:()=>c});var n=i(799),s=i(73444);const r={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],no:[","," "],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function o(e=(0,s.JK)()){let t=(e=e.toLowerCase())in r;if(!t){const i=e.split("-");i.length>1&&i[0]in r&&(e=i[0],t=!0),t||(e="en")}const[i,n,o="#,##0.###"]=r[e];return{decimal:i,group:n,pattern:o}}function a(e,t){const i=o((t={...t}).locale);t.customs=i;const n=t.pattern||i.pattern;return isNaN(e)||Math.abs(e)===1/0?null:function(e,t,i){const n=(i=i||{}).customs.group,s=i.customs.decimal,r=t.split(";"),o=r[0];if((t=r[e<0?1:0]||"-"+o).includes("%"))e*=100;else if(t.includes("‰"))e*=1e3;else{if(t.includes("¤"))throw new Error("currency notation not supported");if(t.includes("E"))throw new Error("exponential notation not supported")}const a=l,u=o.match(a);if(!u)throw new Error("unable to find a number expression in pattern: "+t);return!1===i.fractional&&(i.places=0),t.replace(a,function(e,t,i){!0===(i=i||{}).places&&(i.places=0),i.places===1/0&&(i.places=6);const n=t.split("."),s="string"==typeof i.places&&i.places.indexOf(",");let r=i.places;s?r=i.places.slice(s+1):+r>=0||(r=(n[1]||[]).length),i.round<0||(e=Number(e.toFixed(Number(r))));const o=String(Math.abs(e)).split("."),a=o[1]||"";if(n[1]||i.places){s&&(i.places=i.places.slice(0,Math.max(0,s)));const e=void 0!==i.places?i.places:n[1]&&n[1].lastIndexOf("0")+1;+e>a.length&&(o[1]=a.padEnd(Number(e),"0")),+r<a.length&&(o[1]=a.slice(0,Math.max(0,Number(r))))}else o[1]&&o.pop();const l=n[0].replace(",","");let u=l.indexOf("0");-1!==u&&(u=l.length-u,u>o[0].length&&(o[0]=o[0].padStart(u,"0")),l.includes("#")||(o[0]=o[0].slice(-u)));let c,h,d=n[0].lastIndexOf(",");if(-1!==d){c=n[0].length-d-1;const e=n[0].slice(0,d);d=e.lastIndexOf(","),-1!==d&&(h=e.length-d-1)}const f=[];for(let e=o[0];e;){const t=e.length-c;f.push(t>0?e.slice(Math.max(0,t)):e),e=t>0?e.slice(0,t):"",h&&(c=h,h=void 0)}return o[0]=f.reverse().join(i.group||","),o.join(i.decimal||".")}(e,u[0],{decimal:s,group:n,places:i.places,round:i.round}))}(e,n,t)}const l=/[#0,]*[#0](?:\.0*#*)?/;function u(e){const t=o((e=e||{}).locale),i=e.pattern||t.pattern,s=t.group,r=t.decimal;let a=1;if(i.includes("%"))a/=100;else if(i.includes("‰"))a/=1e3;else if(i.includes("¤"))throw new Error("currency notation not supported");const u=i.split(";");1===u.length&&u.push("-"+u[0]);const c=d(u,t=>(t="(?:"+(0,n.Cj)(t,".")+")").replace(l,t=>{const i={signed:!1,separator:e.strict?s:[s,""],fractional:e.fractional,decimal:r,exponent:!1},n=t.split(".");let o=e.places;1===n.length&&1!==a&&(n[1]="###"),1===n.length||0===o?i.fractional=!1:(void 0===o&&(o=e.pattern?n[1].lastIndexOf("0")+1:1/0),o&&null==e.fractional&&(i.fractional=!0),!e.places&&+o<n[1].length&&(o+=","+n[1].length),i.places=o);const l=n[0].split(",");return l.length>1&&(i.groupSize=l.pop().length,l.length>1&&(i.groupSize2=l.pop().length)),"("+function(e){"places"in(e=e||{})||(e.places=1/0),"string"!=typeof e.decimal&&(e.decimal="."),"fractional"in e&&!String(e.places).startsWith("0")||(e.fractional=[!0,!1]),"exponent"in e||(e.exponent=[!0,!1]),"eSigned"in e||(e.eSigned=[!0,!1]);const t=h(e),i=d(e.fractional,t=>{let i="";return t&&0!==e.places&&(i="\\"+e.decimal,e.places===1/0?i="(?:"+i+"\\d+)?":i+="\\d{"+e.places+"}"),i},!0);let n=t+i;return i&&(n="(?:(?:"+n+")|(?:"+i+"))"),n+d(e.exponent,t=>t?"([eE]"+h({signed:e.eSigned})+")":"")}(i)+")"}),!0);return{regexp:c.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:s,decimal:r,factor:a}}function c(e,t){const i=u(t),n=new RegExp("^"+i.regexp+"$").exec(e);if(!n)return NaN;let s=n[1];if(!n[1]){if(!n[2])return NaN;s=n[2],i.factor*=-1}return s=s.replaceAll(new RegExp("["+i.group+"\\s\\xa0]","g"),"").replace(i.decimal,"."),Number(s)*i.factor}function h(e){return"signed"in(e=e||{})||(e.signed=[!0,!1]),"separator"in e?"groupSize"in e||(e.groupSize=3):e.separator="",d(e.signed,e=>e?"[-+]":"",!0)+d(e.separator,t=>{if(!t)return"(?:\\d+)";" "===(t=(0,n.Cj)(t))?t="\\s":" "===t&&(t="\\s\\xa0");const i=e.groupSize,s=e.groupSize2;if(s){const e="(?:0|[1-9]\\d{0,"+(s-1)+"}(?:["+t+"]\\d{"+s+"})*["+t+"]\\d{"+i+"})";return i-s>0?"(?:"+e+"|(?:0|[1-9]\\d{0,"+(i-1)+"}))":e}return"(?:0|[1-9]\\d{0,"+(i-1)+"}(?:["+t+"]\\d{"+i+"})*)"},!0)}const d=(e,t,i)=>{if(!Array.isArray(e))return t(e);const n=[];for(let i=0;i<e.length;i++)n.push(t(e[i]));return f(n.join("|"),Boolean(i))},f=(e,t)=>"("+(t?"?:":"")+e+")"},36708(e,t,i){i.d(t,{C_:()=>d,OH:()=>p,Vh:()=>y,on:()=>h,pc:()=>g,wB:()=>l,z7:()=>u});var n=i(37955),s=i(36563),r=i(97768),o=i(17676),a=i(14012);function l(e,t,i={}){return c(e,t,i,f)}function u(e,t,i={}){return c(e,t,i,m)}function c(e,t,i={},n){let s=null;const o=i.once?(e,i)=>{n(e)&&((0,r.xt)(s),t(e,i))}:(e,i)=>{n(e)&&t(e,i)};if(s=(0,a.Cn)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return s}function h(e,t,i,o={}){let a=null,u=null,c=null;function h(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,r.xt)(c),i(e)}const f=l(e,(e,i)=>{h(),(0,n.wb)(e)&&(a=e,u=(0,n.on)(e,t,d),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return c=(0,s.hA)(()=>{f.remove(),h()}),c}function d(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());const n=e();if(t?.(n))return Promise.resolve(n);let a=null;function l(){a=(0,r.xt)(a)}return new Promise((n,r)=>{a=(0,s.vE)([(0,o.u7)(i,()=>{l(),r((0,o.NK)())}),c(e,e=>{l(),n(e)},{sync:!1,once:!0},t??f)])})}(e,m,t)}function f(e){return!0}function m(e){return!!e}i(80559);const p={sync:!0},y={initial:!0},g={sync:!0,initial:!0}},60408(e,t,i){function n(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function s(e){return void 0!==e.points}function r(e){return void 0!==e.x&&void 0!==e.y}function o(e){return void 0!==e.paths||void 0!==e.curvePaths}function a(e){return void 0!==e.rings||void 0!==e.curveRings}function l(e){return"object"==typeof e&&"vertexAttributes"in e}function u(e){return e?r(e)?"esriGeometryPoint":o(e)?"esriGeometryPolyline":a(e)?"esriGeometryPolygon":n(e)?"esriGeometryEnvelope":s(e)?"esriGeometryMultipoint":null:null}function c(e){return null!=e&&("hasZ"in e&&e.hasZ||"z"in e&&null!=e.z)}function h(e){return null!=e&&("hasM"in e&&e.hasM||"m"in e&&null!=e.m)}i.d(t,{$B:()=>u,Bi:()=>a,Pv:()=>c,Rg:()=>o,U9:()=>s,W0:()=>h,ZC:()=>n,fT:()=>r,uW:()=>l})},65864(e,t,i){i.d(t,{rS:()=>c,xD:()=>d});var n=i(5443),s=i(91075),r=i(48526),o=i(86738),a=i(39829),l=i(82799),u=i(60408);function c(e){return null==e?null:e instanceof s.A?e:(0,u.fT)(e)?o.A.fromJSON(e):(0,u.Rg)(e)?l.A.fromJSON(e):(0,u.Bi)(e)?a.A.fromJSON(e):(0,u.U9)(e)?r.A.fromJSON(e):(0,u.ZC)(e)?n.A.fromJSON(e):null}const h={esriGeometryPoint:o.A,esriGeometryPolyline:l.A,esriGeometryPolygon:a.A,esriGeometryEnvelope:n.A,esriGeometryMultipoint:r.A,esriGeometryMultiPatch:a.A};function d(e){return e&&h[e]||null}},6518(e,t,i){i.d(t,{F:()=>a});var n=i(44208),s=i(75503),r=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new s.wq(9,(0,n.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((i,n)=>{e[t++]=n}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,i)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221(e,t,i){i.d(t,{A:()=>m});var n=i(4576),s=i(49186),r=i(65529),o=i(53966),a=i(70328),l=i(19419),u=i(90708),c=i(6518),h=i(51441),d=i(37730);const f=(0,a.vt)();class m{constructor(e){this.geometryInfo=e,this._boundsStore=new c.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.bk,this.featureAdapter=d.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,i,n,s]=this.fullBounds;return{xmin:t,ymin:i,xmax:n,ymax:s,spatialReference:(0,h.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(n.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const i of e){const e=this._boundsStore.get(i.objectId);e&&t((0,a.Jt)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const i=this._featuresById.get(t);let n;if(i?(e.displayId=i.displayId,n=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);n=(0,u.jQ)(null!=n?n:(0,l.vt)(),e.geometry),null!=n&&this._boundsStore.set(t,n),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const i=this._featuresById.get(t);if(!i)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;const{geometry:n,attributes:r}=e;for(const e in r)i.attributes[e]=r[e];return n&&(i.geometry=n,this._boundsStore.set(t,(0,u.jQ)((0,l.vt)(),n)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}},37730(e,t,i){i.d(t,{T:()=>s});var n=i(43334);const s={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,i)=>new n.Om(t,e.attributes,null,e.objectId,e.displayId,e.distance),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)}},25209(e,t,i){i.r(t),i.d(t,{default:()=>$});var n=i(11254),s=i(60999),r=i(67482),o=i(49186),a=i(53966),l=i(17676),u=i(84952),c=i(91218),h=i(16930),d=i(21325),f=i(28735),m=i(43334),p=i(92722),y=i(83221),g=i(31464),_=i(75752),x=i(14607),b=i(30524),S=i(54625);const I=/^\s*"([\S\s]*)"\s*$/,v=/""/g,w=[",",";","|","\t"];function*F(e,t,i){let n=0;for(;n<=e.length;){const s=e.indexOf(t,n),r=e.slice(n,s>-1?s:void 0);n+=r.length+t.length,i&&!r.trim()||(yield r)}}function M(e){const t=e.includes("\r\n")?"\r\n":"\n";return F(e,t,!0)}function z(e,t){return F(e,t,!1)}function B(e,t,i){e=e.trim(),t=t?.trim();const n=[],s=Array.from(new Set([i?.delimiter,...w])).filter(e=>null!=e);for(const i of s){const s=N(e,i).length,r=N(t,i).length??s;s>1&&n.push({weight:Math.min(s,r),delimiter:i})}const r=n.sort(({weight:e},{weight:t})=>t-e).map(({delimiter:e})=>e);for(const t of r){const n=T(e,t).names,s=(0,S.i_)(n,i?.longitudeField,i?.latitudeField);if(s.longitudeFieldName&&s.latitudeFieldName)return{delimiter:t,locationInfo:s}}return{delimiter:r[0],locationInfo:null}}function*A(e,t,i,n=()=>Object.create(null)){const s=M(e);s.next();let r="",o="",a=0,l=n(),u=0;e:for(const e of s){const s=z(e,i);for(const e of s)if(r+=o+e,o="",a+=C(e),a%2==0){if(a>0){const e=I.exec(r);if(!e){l=n(),u=0,r="",a=0;continue e}l[t[u]]=e[1].replaceAll(v,'"'),u++}else l[t[u]]=r,u++;r="",a=0}else o=i;0===a?(yield l,l=n(),u=0):o="\n"}}function T(e,t){const i=N(e,t).filter(e=>null!=e),n=i.map(e=>(0,b.rS)(e));for(let e=n.length-1;e>=0;e--)n[e]||(n.splice(e,1),i.splice(e,1));return{names:n,aliases:i}}function N(e,t){if(!e?.length)return[];const i=[];let n="",s="",r=0;const o=z(e,t);for(const e of o)if(n+=s+e,s="",r+=C(e),r%2==0){if(r>0){const e=I.exec(n);e&&i.push(e[1].replaceAll(v,'"'))}else i.push(n);n="",r=0}else s=t;return i}function C(e){let t=0,i=0;for(i=e.indexOf('"',i);i>=0;)t++,i=e.indexOf('"',i+1);return t}function E(e,t,i,n,s){const r=[],o=A(e,i,t),a=[];for(const e of o){if(10===a.length)break;a.push(e)}for(let e=0;e<i.length;e++){const t=i[e],o=n[e];if(t===s.longitudeFieldName||t===s.latitudeFieldName)r.push({name:t,type:"esriFieldTypeDouble",alias:o});else{let e;switch(O(a.map(e=>e[t]))){case"integer":e="esriFieldTypeInteger";break;case"double":e="esriFieldTypeDouble";break;case"date":e="esriFieldTypeDate";break;default:e="esriFieldTypeString"}r.push({name:t,type:e,alias:o,length:(0,b._b)(e)})}}return r}function O(e){if(!e.length)return"string";const t=/[^+\-.,0-9]/;return e.map(e=>{if(""!==e){if(!t.test(e)){let t=R(e);if(!isNaN(t))return/[.,]/.test(e)||!Number.isInteger(t)||t>214783647||t<-214783648?"double":"integer";if(e.includes("E")){if(t=Number(e),!Number.isNaN(t))return"double";if(e.includes(",")&&(e=e.replace(",","."),t=Number(e),!Number.isNaN(t)))return"double"}}return(0,r.Cq)(e)?"date":"string"}}).reduce((e,t)=>void 0===e?t:void 0===t?e:e===t?t:"string"===e||"string"===t?"string":"double"===e||"double"===t?"double":void 0)}const R=function(){const e=(0,x.B)(),t=new RegExp("^"+e.regexp+"$"),i=new RegExp("["+e.group+"\\s\\xa0]","g"),n=e.factor;return s=>{const r=t.exec(s);if(e.factor=n,!r)return NaN;let o=r[1];if(!r[1]){if(!r[2])return NaN;o=r[2],e.factor*=-1}return o=o.replace(i,"").replace(e.decimal,"."),+o*e.factor}}();function k(e){return JSON.parse(JSON.stringify(e))}var q=i(64714),Y=i(60694),L=i(95466),j=i(54218),X=i(98623);const D=(0,q.F0)("esriGeometryPoint"),P=["csv"],G=[0,0];class U{constructor(e,t){this.x=e,this.y=t}}class ${constructor(){this._queryEngine=null,this._featureIdInfo=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){this._loadOptions=e;const[i]=await Promise.all([this._fetch(t.signal),this._checkProjection(e?.parsingOptions?.spatialReference)]),n=function(e,t){const i=t.parsingOptions||{},n={delimiter:i.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:i.latitudeField,longitudeFieldName:i.longitudeField}},s=n.layerDefinition={name:(0,Y.cr)((0,u.e7)(t.url,P)||"csv"),dateFieldsTimeReference:{timeZoneIANA:X.n$},drawingInfo:D,geometryType:"esriGeometryPoint",objectIdField:null,fields:[],timeInfo:i.timeInfo,extent:{xmin:Number.POSITIVE_INFINITY,ymin:Number.POSITIVE_INFINITY,xmax:Number.NEGATIVE_INFINITY,ymax:Number.NEGATIVE_INFINITY,spatialReference:i.spatialReference||{wkid:4326}}},r=M(e),a=r.next().value?.trim(),l=r.next().value?.trim();if(!a)throw new o.A("csv-layer:empty-csv","CSV is empty",{csv:e});const{delimiter:c,locationInfo:h}=B(a,l,i);if(!c)throw new o.A("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:a,secondLine:l,parsingOptions:i});if(!h)throw new o.A("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:a,secondLine:l,parsingOptions:i});n.locationInfo=h,n.delimiter=c;const{names:d,aliases:f}=T(a,c),m=E(e,n.delimiter,d,f,n.locationInfo);if(i.fields?.length){const e=new L.A(i.fields);for(const t of m){const i=e.get(t.name);i&&Object.assign(t,i)}}if(!m.some(e=>"esriFieldTypeOID"===e.type&&(s.objectIdField=e.name,!0))){const e={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};s.objectIdField=e.name,m.unshift(e)}s.fields=m;const p=new L.A(s.fields);if(n.locationInfo&&(n.locationInfo.latitudeFieldName=p.get(n.locationInfo.latitudeFieldName).name,n.locationInfo.longitudeFieldName=p.get(n.locationInfo.longitudeFieldName).name),s.timeInfo){const e=s.timeInfo;if(e.startTimeField){const t=p.get(e.startTimeField);t?(e.startTimeField=t.name,t.type="esriFieldTypeDate"):e.startTimeField=null}if(e.endTimeField){const t=p.get(e.endTimeField);t?(e.endTimeField=t.name,t.type="esriFieldTypeDate"):e.endTimeField=null}if(e.trackIdField){const t=p.get(e.trackIdField);e.trackIdField=t?t.name:null}e.startTimeField||e.endTimeField||(s.timeInfo=null)}return n}(i,e);this._locationInfo=n.locationInfo,this._delimiter=n.delimiter;const{objectIdField:s,fields:r,extent:{spatialReference:a},timeInfo:l}=n.layerDefinition,c=new y.A({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1});this._featureIdInfo={type:"object-id",fieldName:s},this._queryEngine=new _.do({fieldsIndex:L.A.fromLayerJSON({fields:r,dateFieldsTimeReference:{timeZoneIANA:X.n$}}),geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:l,featureIdInfo:this._featureIdInfo,spatialReference:a||{wkid:4326},featureStore:c});const h=this._createFeatures(i);this._queryEngine.featureStore.addMany(h);const{fullExtent:d,timeExtent:f}=await this._queryEngine.fetchRecomputedExtents();if(n.layerDefinition.extent=d,f){const{start:e,end:t}=f;n.layerDefinition.timeInfo.timeExtent=[e,t]}return n}async applyEdits(){throw new o.A("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),(await this._queryEngine.executeQueryForIds(e,t.signal)).filter(j.Et)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),await this._queryEngine.executeQueryForSnapping(e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,s.UT)(this._snapshotFeatures),this._snapshotTask.promise.then(e=>{this._queryEngine.featureStore.clear(),e&&this._queryEngine.featureStore.addMany(e)},e=>{this._queryEngine.featureStore.clear(),(0,l.zf)(e)||a.A.getLogger("esri.layers.CSVLayer").error(new o.A("csv-layer:refresh","An error occurred during refresh",{error:e}))}),await this._waitSnapshotComplete();const{fullExtent:t,timeExtent:i}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:i}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){const{url:t,customParameters:i}=this._loadOptions;if(!t)throw new o.A("csv-layer:invalid-source","url not defined");const s=(0,u.An)(t);return(await(0,n.A)(s.path,{query:{...s.query,...i},responseType:"text",signal:e})).data}_createFeatures(e){const{latitudeFieldName:t,longitudeFieldName:i}=this._locationInfo,{fieldsIndex:n,spatialReference:s}=this._queryEngine,o=this._featureIdInfo.fieldName;let a=[];const l=[],u=n.fields.filter(e=>e.name!==o).map(e=>e.name);let y=0;const g={};for(const e of n.fields)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,b.lD)(e);void 0!==t&&(g[e.name]=t)}const _=A(e,u,this._delimiter,(0,q.Vx)(g,o));for(const e of _){const s=this._parseCoordinateValue(e[t]),u=this._parseCoordinateValue(e[i]);if(null!=u&&null!=s&&!isNaN(s)&&!isNaN(u)){e[t]=s,e[i]=u;for(const s in e)if(s!==t&&s!==i)if(n.isDateField(s))e[s]=(0,r._U)(e[s]);else if(n.isNumericField(s)){const t=R(e[s]);isNaN(t)?e[s]=null:e[s]=t}else null!=e[s]&&(e[s]=k(e[s]));e[o]=y,y++,a.push(new U(u,s)),l.push(e)}}if(!(0,d.aI)({wkid:4326},s))if((0,d.K8)(s))for(const e of a)[e.x,e.y]=(0,f.je)(e.x,e.y,G);else a=(0,c.projectMany)(a,h.A.WGS84,s);const x=[];for(let e=0;e<a.length;e++){const{x:t,y:i}=a[e],n=l[e];n[o]=e+1,x.push(new m.Om(new p.A([],[t,i]),n,null,n[o]))}return x}_parseCoordinateValue(e){if(null==e||""===e)return null;let t=R(e);return(isNaN(t)||Math.abs(t)>181)&&(t=parseFloat(e)),t}async _checkProjection(e){try{await(0,g.Nk)(d.KK,e)}catch{throw new o.A("csv-layer:projection-not-supported","Projection not supported")}}}},64714(e,t,i){i.d(t,{F0:()=>a,Vx:()=>c,e2:()=>d,f:()=>f});var n=i(44208),s=i(4718),r=i(99352),o=i(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function c(e,t){if((0,n.A)("esri-csp-restrictions"))return()=>t?{[t]:null,...e}:{...e};try{let i="";t&&(i+=`this${h(t)} = null;`);for(const t in e)i+=`this${h(t)} = ${JSON.stringify(e[t])};`;const n=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${i};\n }\n }\n `)();return()=>new n}catch(i){return()=>t?{[t]:null,...e}:{...e}}}function h(e){return l.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function d(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,s.o8)(e)}}]}function f(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:r.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},98453(e,t,i){i.d(t,{m:()=>n});const n=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},54625(e,t,i){i.d(t,{i_:()=>s});var n=i(30524);function s(e,t,i){t=(0,n.rS)(t)?.toLowerCase(),i=(0,n.rS)(i)?.toLowerCase();const s=e.map(e=>e.toLowerCase()),a=t?e[s.indexOf(t)]:null,l=i?e[s.indexOf(i)]:null;return{longitudeFieldName:a||e[s.indexOf(o.find(e=>s.includes(e)))],latitudeFieldName:l||e[s.indexOf(r.find(e=>s.includes(e)))]}}const r=["lat","lat83","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],o=["lon","lng","lng83","long","long83","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"]},2272(e,t,i){i.d(t,{Dl:()=>u,gf:()=>h,jV:()=>l,lF:()=>c});var n=i(92602),s=i(70333),r=i(4718),o=i(84952),a=i(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,o.An)(e):(0,r.o8)(e)}function c(e,t,i){const n={};for(const s in e){if("declaredClass"===s)continue;const r=e[s];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))n[s]=r.map(e=>c(e));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(i?.[s]);n[s]=t?e:JSON.stringify(e)}else n[s]=t?r:JSON.stringify(r);else n[s]=r}return n}async function h(e,t,r){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.getApiKey)(e)??s.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!s.id&&n.A.request.useIdentity&&await Promise.all([i.e(7632),i.e(1431),i.e(148)]).then(i.bind(i,50148));const l=await s.id.getCredential(e,r);return l?.token}},926(e,t,i){i.d(t,{Dd:()=>d,Jn:()=>f,Qc:()=>m,getApiKey:()=>c,getSessionToken:()=>h});var n=i(92602),s=i(11254),r=i(84952);const o=/^https?:\/\/(i?basemaps|basemapstyles)-api\.arcgis\.com\//i,a=new Set(["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"]),l=new Map;let u=null;function c(e){if(!m(e))return null;const t=t=>t instanceof RegExp?t.test(e):"string"==typeof t&&e.startsWith(t),i=n.A.apiKeys;if(Array.isArray(i.scopes))for(const e of i.scopes)if(Array.isArray(e.urls)){if(e.urls.some(t))return e.token}else if(t(e.urls))return e.token;return i.basemapStyles&&o.test(e)?i.basemapStyles:n.A.apiKey&&/^https?:\/\/.+\.arcgis\.com(\/|$)/i.test(e)?n.A.apiKey:null}async function h(e){if(!n.A.sessions?.basemap?.enabled||!o.test(e))return null;const t=c(e);if(!t)return null;u&&await u;const{styleFamily:i="arcgis",autoRefresh:r,duration:a=43200}=n.A.sessions.basemap,h=`${t}:${i}`,d=l.get(h);if(d&&(!r||d.endTime>Date.now()))return d.sessionToken;let f;u=(0,s.A)("https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/sessions/start",{cacheBust:!0,query:{durationSeconds:a,styleFamily:i,token:t}});try{f=(await u).data,f.endTime-=5e3,l.set(h,f)}finally{u=null}return f.sessionToken}function d(){return null!=n.A.apiKey||null!=n.A.apiKeys.basemapStyles}function f(e,t){return t?m(e):null!=c(e)}function m(e){const t=(0,r.$z)(e,!0);return!!t&&!a.has(t)&&!e.endsWith("/sharing/rest/generateToken")}},93470(e,t,i){i.d(t,{Cb:()=>r,HW:()=>c,JR:()=>s,JZ:()=>l,WR:()=>a,b6:()=>h,fT:()=>n,nC:()=>u,yM:()=>o});const n=[252,146,31,255],s=[153,153,153,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:n,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:n},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},u={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},c={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},h={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[926,2188],{69540(e,t,i){i.d(t,{OU:()=>c,Pw:()=>h});var n=i(5482),s=i(69622),r=(i(44208),i(4718)),o=(i(53966),i(97768)),a=i(88620),l=i(64108);const u=Symbol("ClonableMixin"),c=e=>{var t;const i=e;let s=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,n=t.store,s={},l=new Map;for(const t in i){const o=i[t],a=n?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==a&&0!==a&&5!==a&&4!==a)continue;const c=this[t];let h=null;if("function"==typeof u)h=u(c,e);else if("reference"===u)h=c;else if(h=(0,r.TU)(c,e),null!=c&&null==h)continue;0===a?l.set(t,h):s[t]=h}const u=new(0,Object.getPrototypeOf(this).constructor)(s);if(l.size){const e=(0,a.oY)(u)?.store;if(e)for(const[t,i]of l)e.set(t,i,0)}return u}};return s=(0,n.Cg)([(0,l.$)("esri.core.Clonable")],s),s},h=c(s.A)},66344(e,t,i){i.d(t,{q:()=>a});const n=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class s{get size(){return this._size}constructor(e=10485760,t=.3){this._maxSize=e,this._maxClientSizeRatio=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(e){this._clients.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._clients.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,s,o){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==i&&this._notifyRemove(t,a.entry,a.size,0)),s>this._maxSize)return void this._notifyRemove(t,i,s,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return n||console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,0,0);const l=1+Math.max(o,-4)- -3;this._db.set(t,new r(i,s,l)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t){t=e.id+t;const i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let n=i.entry.usedMemory;for(;n>this._maxSize;){const e=this._notifyRemove(t,i.entry,n,1);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}i.size=n,this._size+=n,e.size+=n,this._checkSize()}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach((e,n)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._clients.forEach(i=>{const{id:s,name:r}=i;if(n.startsWith(s)){const i=t[r]||0;t[r]=i+e.size}})});const n={};this._clients.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,n[i]=Math.round(100*e.hitRate)+"%"}else n[i]="0%"});const s=Object.keys(t);s.sort((e,i)=>t[i]-t[e]),s.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+n[i]);for(let t=i.length-1;t>=0;--t){const n=i[t];n&&(e["Priority "+(t+-3-1)]=Math.round(n/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._clients.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,n){const s=this._clients.get(e.split(o)[0])?.removeFunc,r=s?.(t,n,i);return"number"==typeof r?r:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._clients.forEach(e=>this._checkSizeLimits(this._maxClientSize,e)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const n=t?.id;let s=!0;for(;s;){s=!1;for(const[r,a]of this._db)if(0===a.lifetime&&(!n||r.startsWith(n))){const n=t??this._clients.get(r.split(o)[0]);if(this._purgeItem(r,a,n),i.size<=.9*e)return;s||=this._db.has(r)}}for(const[s,r]of this._db)if(!n||s.startsWith(n)){const n=t??this._clients.get(s.split(o)[0]);if(this._purgeItem(s,r,n),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const n=this._notifyRemove(e,t.entry,t.size,1);null!=n&&n>0&&(this._size+=n,i&&(i.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new s(0);class r{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class a{constructor(e,t){this.removeFunc=t,this.id="",this.name="",this.size=0,this._storage=new s(e,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},60999(e,t,i){i.d(t,{DZ:()=>m,Ke:()=>f,Tj:()=>c,UT:()=>p,aD:()=>g,jJ:()=>u});var n=i(5482),s=i(69622),r=i(97768),o=i(17676),a=i(10107),l=i(64108);function u(e,t,i){return(0,o.Lx)(e.map((e,n)=>t.apply(i,[e,n])))}async function c(e,t,i){return(await(0,o.Lx)(e.map((e,n)=>t.apply(i,[e,n])))).map(e=>e.value)}function h(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function f(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return h(await e)}catch(e){return d(e)}}async function m(e){try{return h(await e)}catch(e){return(0,o.QP)(e),d(e)}}function p(e,t){return new y(e,t)}let y=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,r.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=h(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.xt)(this._abortHandle),this._abortController=null}};(0,n.Cg)([(0,a.MZ)()],y.prototype,"value",null),(0,n.Cg)([(0,a.MZ)()],y.prototype,"error",null),(0,n.Cg)([(0,a.MZ)()],y.prototype,"finished",null),(0,n.Cg)([(0,a.MZ)()],y.prototype,"promise",void 0),(0,n.Cg)([(0,a.MZ)()],y.prototype,"_result",void 0),y=(0,n.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],y);class g{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,n.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,n.hk)(t)}}}},67482(e,t,i){function n(e){return null!=a(e)||null!=o(e)}function s(e){return l.test(e)}function r(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let i=!0;if(c&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,n=0;for(;!t&&n<=e.length;)t=!u.test(e[n]),n++;i=!t}}return i}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=l.exec(e);if(!t?.groups)return null;const i=t.groups,n=+i.year,s=+i.month-1,r=+i.day,o=+(i.hours??"0"),a=+(i.minutes??"0"),u=+(i.seconds??"0");if(o>23)return null;if(a>59)return null;if(u>59)return null;const c=i.ms??"0",h=c?+c.padEnd(3,"0").slice(0,3):0;let d;if(i.isUTC||!i.offsetSign)d=Date.UTC(n,s,r,o,a,u,h);else{const e=+i.offsetHours,t=+i.offsetMinutes;d=6e4*("+"===i.offsetSign?-1:1)*(60*e+t)+Date.UTC(n,s,r,o,a,u,h)}return Number.isNaN(d)?null:d}i.d(t,{Br:()=>s,Cq:()=>n,_U:()=>r});const l=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,u=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,c=!Number.isNaN(new Date("technology 10").getTime())},75503(e,t,i){i.d(t,{wq:()=>a});var n=i(4576),s=i(21818),r=(i(44208),i(15142)),o=i(11006);class a{constructor(e=9,t){this._compareMinX=d,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),S.prune(),I.prune(),v.prune(),w.prune()}all(e){l(this._data,e)}search(e,t){let i=this._data;const n=this._toBBox;if(x(e,i))for(S.clear();i;){for(let s=0,r=i.children.length;s<r;s++){const r=i.children[s],o=i.leaf?n(r):r;x(e,o)&&(i.leaf?t(r):_(e,o)?l(r,t):S.push(r))}i=S.pop()}}collides(e){let t=this._data;const i=this._toBBox;if(!x(e,t))return!1;for(S.clear();t;){for(let n=0,s=t.children.length;n<s;n++){const s=t.children[n],r=t.leaf?i(s):s;if(x(e,r)){if(t.leaf||_(e,r))return!0;S.push(s)}}t=S.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new z([]),this}remove(e){if(!e)return this;let t,i=this._data,r=null,o=0,a=!1;const l=this._toBBox(e);for(v.clear(),w.clear();i||v.length>0;){if(i||(i=v.pop(),r=v.data[v.length-1],o=w.pop()??0,a=!0),i.leaf&&(t=(0,n.qh)(i.children,(0,s.z)(e),i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),v.push(i),this._condense(v),this;a||i.leaf||!_(i,l)?r?(o++,i=r.children[o],a=!1):i=null:(v.push(i),w.push(o),o=0,r=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,i,n){const s=i-t+1;let r=this._maxEntries;if(s<=r){const n=new z(e.slice(t,i+1));return u(n,this._toBBox),n}n||(n=Math.ceil(Math.log(s)/Math.log(r)),r=Math.ceil(s/r**(n-1)));const o=new B([]);o.height=n;const a=Math.ceil(s/r),l=a*Math.ceil(Math.sqrt(r));b(e,t,i,l,this._compareMinX);for(let s=t;s<=i;s+=l){const t=Math.min(s+l-1,i);b(e,s,t,a,this._compareMinY);for(let i=s;i<=t;i+=a){const s=Math.min(i+a-1,t);o.children.push(this._build(e,i,s,n-1))}}return u(o,this._toBBox),o}_insert(e,t,i){const n=this._toBBox,s=i?e:n(e);v.clear();const r=function(e,t,i,n){for(;n.push(t),!0!==t.leaf&&n.length-1!==i;){let i,n=1/0,s=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=m(o),l=y(e,o)-a;l<s?(s=l,n=a<n?a:n,i=o):l===s&&a<n&&(n=a,i=o)}t=i||t.children[0]}return t}(s,this._data,t,v);for(r.children.push(e),h(r,s);t>=0&&v.data[t].children.length>this._maxEntries;)this._split(v,t),t--;!function(e,t,i){for(let n=i;n>=0;n--)h(t.data[n],e)}(s,v,t)}_split(e,t){const i=e.data[t],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);const r=this._chooseSplitIndex(i,s,n);if(!r)return;const o=i.children.splice(r,i.children.length-r),a=i.leaf?new z(o):new B(o);a.height=i.height,u(i,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this._data=new B([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let n,s,r;n=s=1/0;for(let o=t;o<=i-t;o++){const t=c(e,0,o,this._toBBox),a=c(e,o,i,this._toBBox),l=g(t,a),u=m(t)+m(a);l<n?(n=l,r=o,s=u<s?u:s):l===n&&u<s&&(s=u,r=o)}return r}_chooseSplitAxis(e,t,i){const n=e.leaf?this._compareMinX:d,s=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,i,n)<this._allDistMargin(e,t,i,s)&&e.children.sort(n)}_allDistMargin(e,t,i,n){e.children.sort(n);const s=this._toBBox,r=c(e,0,t,s),o=c(e,i-t,i,s);let a=p(r)+p(o);for(let n=t;n<i-t;n++){const t=e.children[n];h(r,e.leaf?s(t):t),a+=p(r)}for(let n=i-t-1;n>=t;n--){const t=e.children[n];h(o,e.leaf?s(t):t),a+=p(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const i=e.data[t];if(0===i.children.length)if(t>0){const s=e.data[t-1],r=s.children;r.splice((0,n.qh)(r,i,r.length,s.indexHint),1)}else this.clear();else u(i,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let i=e;for(I.clear();i;){if(!0===i.leaf)for(const e of i.children)t((0,s.z)(e));else I.pushArray(i.children);i=I.pop()??null}}function u(e,t){c(e,0,e.children.length,t,e)}function c(e,t,i,n,s){s||(s=new z([])),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(let r,o=t;o<i;o++)r=e.children[o],h(s,e.leaf?n(r):r);return s}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function m(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function p(e){return e.maxX-e.minX+(e.maxY-e.minY)}function y(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const i=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),s=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,s-i)*Math.max(0,r-n)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function x(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function b(e,t,i,n,s){const r=[t,i];for(;r.length;){const t=r.pop(),i=r.pop();if(t-i<=n)continue;const a=i+Math.ceil((t-i)/n/2)*n;(0,o.q)(e,a,i,t,s),r.push(i,a,a,t)}}const S=new r.A,I=new r.A,v=new r.A,w=new r.A({deallocator:void 0});class F{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class M extends F{constructor(){super(...arguments),this.height=1,this.indexHint=new n.vW}}class z extends M{constructor(e){super(),this.children=e,this.leaf=!0}}class B extends M{constructor(e){super(),this.children=e,this.leaf=!1}}},14607(e,t,i){i.d(t,{B:()=>u,GP:()=>a,qg:()=>c});var n=i(799),s=i(73444);const r={ar:[".",","],bg:[","," "],bs:[",","."],ca:[",","."],cs:[","," "],da:[",","."],de:[",","."],"de-ch":[".","’"],el:[",","."],en:[".",","],"en-au":[".",","],es:[",","."],"es-mx":[".",","],et:[","," "],fi:[","," "],fr:[","," "],"fr-ch":[","," "],he:[".",","],hi:[".",",","#,##,##0.###"],hr:[",","."],hu:[","," "],id:[",","."],it:[",","."],"it-ch":[".","’"],ja:[".",","],ko:[".",","],lt:[","," "],lv:[","," "],mk:[",","."],nb:[","," "],nl:[",","."],no:[","," "],pl:[","," "],pt:[",","."],"pt-pt":[","," "],ro:[",","."],ru:[","," "],sk:[","," "],sl:[",","."],sr:[",","."],sv:[","," "],th:[".",","],tr:[",","."],uk:[","," "],vi:[",","."],zh:[".",","]};function o(e=(0,s.JK)()){let t=(e=e.toLowerCase())in r;if(!t){const i=e.split("-");i.length>1&&i[0]in r&&(e=i[0],t=!0),t||(e="en")}const[i,n,o="#,##0.###"]=r[e];return{decimal:i,group:n,pattern:o}}function a(e,t){const i=o((t={...t}).locale);t.customs=i;const n=t.pattern||i.pattern;return isNaN(e)||Math.abs(e)===1/0?null:function(e,t,i){const n=(i=i||{}).customs.group,s=i.customs.decimal,r=t.split(";"),o=r[0];if((t=r[e<0?1:0]||"-"+o).includes("%"))e*=100;else if(t.includes("‰"))e*=1e3;else{if(t.includes("¤"))throw new Error("currency notation not supported");if(t.includes("E"))throw new Error("exponential notation not supported")}const a=l,u=o.match(a);if(!u)throw new Error("unable to find a number expression in pattern: "+t);return!1===i.fractional&&(i.places=0),t.replace(a,function(e,t,i){!0===(i=i||{}).places&&(i.places=0),i.places===1/0&&(i.places=6);const n=t.split("."),s="string"==typeof i.places&&i.places.indexOf(",");let r=i.places;s?r=i.places.slice(s+1):+r>=0||(r=(n[1]||[]).length),i.round<0||(e=Number(e.toFixed(Number(r))));const o=String(Math.abs(e)).split("."),a=o[1]||"";if(n[1]||i.places){s&&(i.places=i.places.slice(0,Math.max(0,s)));const e=void 0!==i.places?i.places:n[1]&&n[1].lastIndexOf("0")+1;+e>a.length&&(o[1]=a.padEnd(Number(e),"0")),+r<a.length&&(o[1]=a.slice(0,Math.max(0,Number(r))))}else o[1]&&o.pop();const l=n[0].replace(",","");let u=l.indexOf("0");-1!==u&&(u=l.length-u,u>o[0].length&&(o[0]=o[0].padStart(u,"0")),l.includes("#")||(o[0]=o[0].slice(-u)));let c,h,d=n[0].lastIndexOf(",");if(-1!==d){c=n[0].length-d-1;const e=n[0].slice(0,d);d=e.lastIndexOf(","),-1!==d&&(h=e.length-d-1)}const f=[];for(let e=o[0];e;){const t=e.length-c;f.push(t>0?e.slice(Math.max(0,t)):e),e=t>0?e.slice(0,t):"",h&&(c=h,h=void 0)}return o[0]=f.reverse().join(i.group||","),o.join(i.decimal||".")}(e,u[0],{decimal:s,group:n,places:i.places,round:i.round}))}(e,n,t)}const l=/[#0,]*[#0](?:\.0*#*)?/;function u(e){const t=o((e=e||{}).locale),i=e.pattern||t.pattern,s=t.group,r=t.decimal;let a=1;if(i.includes("%"))a/=100;else if(i.includes("‰"))a/=1e3;else if(i.includes("¤"))throw new Error("currency notation not supported");const u=i.split(";");1===u.length&&u.push("-"+u[0]);const c=d(u,t=>(t="(?:"+(0,n.Cj)(t,".")+")").replace(l,t=>{const i={signed:!1,separator:e.strict?s:[s,""],fractional:e.fractional,decimal:r,exponent:!1},n=t.split(".");let o=e.places;1===n.length&&1!==a&&(n[1]="###"),1===n.length||0===o?i.fractional=!1:(void 0===o&&(o=e.pattern?n[1].lastIndexOf("0")+1:1/0),o&&null==e.fractional&&(i.fractional=!0),!e.places&&+o<n[1].length&&(o+=","+n[1].length),i.places=o);const l=n[0].split(",");return l.length>1&&(i.groupSize=l.pop().length,l.length>1&&(i.groupSize2=l.pop().length)),"("+function(e){"places"in(e=e||{})||(e.places=1/0),"string"!=typeof e.decimal&&(e.decimal="."),"fractional"in e&&!String(e.places).startsWith("0")||(e.fractional=[!0,!1]),"exponent"in e||(e.exponent=[!0,!1]),"eSigned"in e||(e.eSigned=[!0,!1]);const t=h(e),i=d(e.fractional,t=>{let i="";return t&&0!==e.places&&(i="\\"+e.decimal,e.places===1/0?i="(?:"+i+"\\d+)?":i+="\\d{"+e.places+"}"),i},!0);let n=t+i;return i&&(n="(?:(?:"+n+")|(?:"+i+"))"),n+d(e.exponent,t=>t?"([eE]"+h({signed:e.eSigned})+")":"")}(i)+")"}),!0);return{regexp:c.replaceAll(/[\xa0 ]/g,"[\\s\\xa0]"),group:s,decimal:r,factor:a}}function c(e,t){const i=u(t),n=new RegExp("^"+i.regexp+"$").exec(e);if(!n)return NaN;let s=n[1];if(!n[1]){if(!n[2])return NaN;s=n[2],i.factor*=-1}return s=s.replaceAll(new RegExp("["+i.group+"\\s\\xa0]","g"),"").replace(i.decimal,"."),Number(s)*i.factor}function h(e){return"signed"in(e=e||{})||(e.signed=[!0,!1]),"separator"in e?"groupSize"in e||(e.groupSize=3):e.separator="",d(e.signed,e=>e?"[-+]":"",!0)+d(e.separator,t=>{if(!t)return"(?:\\d+)";" "===(t=(0,n.Cj)(t))?t="\\s":" "===t&&(t="\\s\\xa0");const i=e.groupSize,s=e.groupSize2;if(s){const e="(?:0|[1-9]\\d{0,"+(s-1)+"}(?:["+t+"]\\d{"+s+"})*["+t+"]\\d{"+i+"})";return i-s>0?"(?:"+e+"|(?:0|[1-9]\\d{0,"+(i-1)+"}))":e}return"(?:0|[1-9]\\d{0,"+(i-1)+"}(?:["+t+"]\\d{"+i+"})*)"},!0)}const d=(e,t,i)=>{if(!Array.isArray(e))return t(e);const n=[];for(let i=0;i<e.length;i++)n.push(t(e[i]));return f(n.join("|"),Boolean(i))},f=(e,t)=>"("+(t?"?:":"")+e+")"},36708(e,t,i){i.d(t,{C_:()=>d,OH:()=>p,Vh:()=>y,on:()=>h,pc:()=>g,wB:()=>l,z7:()=>u});var n=i(37955),s=i(36563),r=i(97768),o=i(17676),a=i(14012);function l(e,t,i={}){return c(e,t,i,f)}function u(e,t,i={}){return c(e,t,i,m)}function c(e,t,i={},n){let s=null;const o=i.once?(e,i)=>{n(e)&&((0,r.xt)(s),t(e,i))}:(e,i)=>{n(e)&&t(e,i)};if(s=(0,a.Cn)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return s}function h(e,t,i,o={}){let a=null,u=null,c=null;function h(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,r.xt)(c),i(e)}const f=l(e,(e,i)=>{h(),(0,n.wb)(e)&&(a=e,u=(0,n.on)(e,t,d),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return c=(0,s.hA)(()=>{f.remove(),h()}),c}function d(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());const n=e();if(t?.(n))return Promise.resolve(n);let a=null;function l(){a=(0,r.xt)(a)}return new Promise((n,r)=>{a=(0,s.vE)([(0,o.u7)(i,()=>{l(),r((0,o.NK)())}),c(e,e=>{l(),n(e)},{sync:!1,once:!0},t??f)])})}(e,m,t)}function f(e){return!0}function m(e){return!!e}i(80559);const p={sync:!0},y={initial:!0},g={sync:!0,initial:!0}},60408(e,t,i){function n(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function s(e){return void 0!==e.points}function r(e){return void 0!==e.x&&void 0!==e.y}function o(e){return void 0!==e.paths||void 0!==e.curvePaths}function a(e){return void 0!==e.rings||void 0!==e.curveRings}function l(e){return"object"==typeof e&&"vertexAttributes"in e}function u(e){return e?r(e)?"esriGeometryPoint":o(e)?"esriGeometryPolyline":a(e)?"esriGeometryPolygon":n(e)?"esriGeometryEnvelope":s(e)?"esriGeometryMultipoint":null:null}function c(e){return null!=e&&("hasZ"in e&&e.hasZ||"z"in e&&null!=e.z)}function h(e){return null!=e&&("hasM"in e&&e.hasM||"m"in e&&null!=e.m)}i.d(t,{$B:()=>u,Bi:()=>a,Pv:()=>c,Rg:()=>o,U9:()=>s,W0:()=>h,ZC:()=>n,fT:()=>r,uW:()=>l})},65864(e,t,i){i.d(t,{rS:()=>c,xD:()=>d});var n=i(5443),s=i(91075),r=i(48526),o=i(86738),a=i(39829),l=i(82799),u=i(60408);function c(e){return null==e?null:e instanceof s.A?e:(0,u.fT)(e)?o.A.fromJSON(e):(0,u.Rg)(e)?l.A.fromJSON(e):(0,u.Bi)(e)?a.A.fromJSON(e):(0,u.U9)(e)?r.A.fromJSON(e):(0,u.ZC)(e)?n.A.fromJSON(e):null}const h={esriGeometryPoint:o.A,esriGeometryPolyline:l.A,esriGeometryPolygon:a.A,esriGeometryEnvelope:n.A,esriGeometryMultipoint:r.A,esriGeometryMultiPatch:a.A};function d(e){return e&&h[e]||null}},6518(e,t,i){i.d(t,{F:()=>a});var n=i(44208),s=i(75503),r=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new s.wq(9,(0,n.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((i,n)=>{e[t++]=n}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,i)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221(e,t,i){i.d(t,{A:()=>m});var n=i(4576),s=i(49186),r=i(65529),o=i(53966),a=i(70328),l=i(19419),u=i(90708),c=i(6518),h=i(51441),d=i(37730);const f=(0,a.vt)();class m{constructor(e){this.geometryInfo=e,this._boundsStore=new c.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.bk,this.featureAdapter=d.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,i,n,s]=this.fullBounds;return{xmin:t,ymin:i,xmax:n,ymax:s,spatialReference:(0,h.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(n.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const i of e){const e=this._boundsStore.get(i.objectId);e&&t((0,a.Jt)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const i=this._featuresById.get(t);let n;if(i?(e.displayId=i.displayId,n=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);n=(0,u.jQ)(null!=n?n:(0,l.vt)(),e.geometry),null!=n&&this._boundsStore.set(t,n),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const i=this._featuresById.get(t);if(!i)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;const{geometry:n,attributes:r}=e;for(const e in r)i.attributes[e]=r[e];return n&&(i.geometry=n,this._boundsStore.set(t,(0,u.jQ)((0,l.vt)(),n)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}},37730(e,t,i){i.d(t,{T:()=>s});var n=i(43334);const s={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,i)=>new n.Om(t,e.attributes,null,e.objectId,e.displayId,e.distance),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)}},25209(e,t,i){i.r(t),i.d(t,{default:()=>$});var n=i(11254),s=i(60999),r=i(67482),o=i(49186),a=i(53966),l=i(17676),u=i(84952),c=i(91218),h=i(16930),d=i(21325),f=i(28735),m=i(43334),p=i(92722),y=i(83221),g=i(31464),_=i(75752),x=i(14607),b=i(30524),S=i(54625);const I=/^\s*"([\S\s]*)"\s*$/,v=/""/g,w=[",",";","|","\t"];function*F(e,t,i){let n=0;for(;n<=e.length;){const s=e.indexOf(t,n),r=e.slice(n,s>-1?s:void 0);n+=r.length+t.length,i&&!r.trim()||(yield r)}}function M(e){const t=e.includes("\r\n")?"\r\n":"\n";return F(e,t,!0)}function z(e,t){return F(e,t,!1)}function B(e,t,i){e=e.trim(),t=t?.trim();const n=[],s=Array.from(new Set([i?.delimiter,...w])).filter(e=>null!=e);for(const i of s){const s=N(e,i).length,r=N(t,i).length??s;s>1&&n.push({weight:Math.min(s,r),delimiter:i})}const r=n.sort(({weight:e},{weight:t})=>t-e).map(({delimiter:e})=>e);for(const t of r){const n=T(e,t).names,s=(0,S.i_)(n,i?.longitudeField,i?.latitudeField);if(s.longitudeFieldName&&s.latitudeFieldName)return{delimiter:t,locationInfo:s}}return{delimiter:r[0],locationInfo:null}}function*A(e,t,i,n=()=>Object.create(null)){const s=M(e);s.next();let r="",o="",a=0,l=n(),u=0;e:for(const e of s){const s=z(e,i);for(const e of s)if(r+=o+e,o="",a+=C(e),a%2==0){if(a>0){const e=I.exec(r);if(!e){l=n(),u=0,r="",a=0;continue e}l[t[u]]=e[1].replaceAll(v,'"'),u++}else l[t[u]]=r,u++;r="",a=0}else o=i;0===a?(yield l,l=n(),u=0):o="\n"}}function T(e,t){const i=N(e,t).filter(e=>null!=e),n=i.map(e=>(0,b.rS)(e));for(let e=n.length-1;e>=0;e--)n[e]||(n.splice(e,1),i.splice(e,1));return{names:n,aliases:i}}function N(e,t){if(!e?.length)return[];const i=[];let n="",s="",r=0;const o=z(e,t);for(const e of o)if(n+=s+e,s="",r+=C(e),r%2==0){if(r>0){const e=I.exec(n);e&&i.push(e[1].replaceAll(v,'"'))}else i.push(n);n="",r=0}else s=t;return i}function C(e){let t=0,i=0;for(i=e.indexOf('"',i);i>=0;)t++,i=e.indexOf('"',i+1);return t}function E(e,t,i,n,s){const r=[],o=A(e,i,t),a=[];for(const e of o){if(10===a.length)break;a.push(e)}for(let e=0;e<i.length;e++){const t=i[e],o=n[e];if(t===s.longitudeFieldName||t===s.latitudeFieldName)r.push({name:t,type:"esriFieldTypeDouble",alias:o});else{let e;switch(O(a.map(e=>e[t]))){case"integer":e="esriFieldTypeInteger";break;case"double":e="esriFieldTypeDouble";break;case"date":e="esriFieldTypeDate";break;default:e="esriFieldTypeString"}r.push({name:t,type:e,alias:o,length:(0,b._b)(e)})}}return r}function O(e){if(!e.length)return"string";const t=/[^+\-.,0-9]/;return e.map(e=>{if(""!==e){if(!t.test(e)){let t=R(e);if(!isNaN(t))return/[.,]/.test(e)||!Number.isInteger(t)||t>214783647||t<-214783648?"double":"integer";if(e.includes("E")){if(t=Number(e),!Number.isNaN(t))return"double";if(e.includes(",")&&(e=e.replace(",","."),t=Number(e),!Number.isNaN(t)))return"double"}}return(0,r.Cq)(e)?"date":"string"}}).reduce((e,t)=>void 0===e?t:void 0===t?e:e===t?t:"string"===e||"string"===t?"string":"double"===e||"double"===t?"double":void 0)}const R=function(){const e=(0,x.B)(),t=new RegExp("^"+e.regexp+"$"),i=new RegExp("["+e.group+"\\s\\xa0]","g"),n=e.factor;return s=>{const r=t.exec(s);if(e.factor=n,!r)return NaN;let o=r[1];if(!r[1]){if(!r[2])return NaN;o=r[2],e.factor*=-1}return o=o.replace(i,"").replace(e.decimal,"."),+o*e.factor}}();function k(e){return JSON.parse(JSON.stringify(e))}var q=i(64714),Y=i(60694),L=i(95466),j=i(54218),X=i(98623);const D=(0,q.F0)("esriGeometryPoint"),P=["csv"],G=[0,0];class U{constructor(e,t){this.x=e,this.y=t}}class ${constructor(){this._queryEngine=null,this._featureIdInfo=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){this._loadOptions=e;const[i]=await Promise.all([this._fetch(t.signal),this._checkProjection(e?.parsingOptions?.spatialReference)]),n=function(e,t){const i=t.parsingOptions||{},n={delimiter:i.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:i.latitudeField,longitudeFieldName:i.longitudeField}},s=n.layerDefinition={name:(0,Y.cr)((0,u.e7)(t.url,P)||"csv"),dateFieldsTimeReference:{timeZoneIANA:X.n$},drawingInfo:D,geometryType:"esriGeometryPoint",objectIdField:null,fields:[],timeInfo:i.timeInfo,extent:{xmin:Number.POSITIVE_INFINITY,ymin:Number.POSITIVE_INFINITY,xmax:Number.NEGATIVE_INFINITY,ymax:Number.NEGATIVE_INFINITY,spatialReference:i.spatialReference||{wkid:4326}}},r=M(e),a=r.next().value?.trim(),l=r.next().value?.trim();if(!a)throw new o.A("csv-layer:empty-csv","CSV is empty",{csv:e});const{delimiter:c,locationInfo:h}=B(a,l,i);if(!c)throw new o.A("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:a,secondLine:l,parsingOptions:i});if(!h)throw new o.A("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:a,secondLine:l,parsingOptions:i});n.locationInfo=h,n.delimiter=c;const{names:d,aliases:f}=T(a,c),m=E(e,n.delimiter,d,f,n.locationInfo);if(i.fields?.length){const e=new L.A(i.fields);for(const t of m){const i=e.get(t.name);i&&Object.assign(t,i)}}if(!m.some(e=>"esriFieldTypeOID"===e.type&&(s.objectIdField=e.name,!0))){const e={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};s.objectIdField=e.name,m.unshift(e)}s.fields=m;const p=new L.A(s.fields);if(n.locationInfo&&(n.locationInfo.latitudeFieldName=p.get(n.locationInfo.latitudeFieldName).name,n.locationInfo.longitudeFieldName=p.get(n.locationInfo.longitudeFieldName).name),s.timeInfo){const e=s.timeInfo;if(e.startTimeField){const t=p.get(e.startTimeField);t?(e.startTimeField=t.name,t.type="esriFieldTypeDate"):e.startTimeField=null}if(e.endTimeField){const t=p.get(e.endTimeField);t?(e.endTimeField=t.name,t.type="esriFieldTypeDate"):e.endTimeField=null}if(e.trackIdField){const t=p.get(e.trackIdField);e.trackIdField=t?t.name:null}e.startTimeField||e.endTimeField||(s.timeInfo=null)}return n}(i,e);this._locationInfo=n.locationInfo,this._delimiter=n.delimiter;const{objectIdField:s,fields:r,extent:{spatialReference:a},timeInfo:l}=n.layerDefinition,c=new y.A({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1});this._featureIdInfo={type:"object-id",fieldName:s},this._queryEngine=new _.do({fieldsIndex:L.A.fromLayerJSON({fields:r,dateFieldsTimeReference:{timeZoneIANA:X.n$}}),geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:l,featureIdInfo:this._featureIdInfo,spatialReference:a||{wkid:4326},featureStore:c});const h=this._createFeatures(i);this._queryEngine.featureStore.addMany(h);const{fullExtent:d,timeExtent:f}=await this._queryEngine.fetchRecomputedExtents();if(n.layerDefinition.extent=d,f){const{start:e,end:t}=f;n.layerDefinition.timeInfo.timeExtent=[e,t]}return n}async applyEdits(){throw new o.A("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),(await this._queryEngine.executeQueryForIds(e,t.signal)).filter(j.Et)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),await this._queryEngine.executeQueryForSnapping(e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,s.UT)(this._snapshotFeatures),this._snapshotTask.promise.then(e=>{this._queryEngine.featureStore.clear(),e&&this._queryEngine.featureStore.addMany(e)},e=>{this._queryEngine.featureStore.clear(),(0,l.zf)(e)||a.A.getLogger("esri.layers.CSVLayer").error(new o.A("csv-layer:refresh","An error occurred during refresh",{error:e}))}),await this._waitSnapshotComplete();const{fullExtent:t,timeExtent:i}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:i}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){const{url:t,customParameters:i}=this._loadOptions;if(!t)throw new o.A("csv-layer:invalid-source","url not defined");const s=(0,u.An)(t);return(await(0,n.A)(s.path,{query:{...s.query,...i},responseType:"text",signal:e})).data}_createFeatures(e){const{latitudeFieldName:t,longitudeFieldName:i}=this._locationInfo,{fieldsIndex:n,spatialReference:s}=this._queryEngine,o=this._featureIdInfo.fieldName;let a=[];const l=[],u=n.fields.filter(e=>e.name!==o).map(e=>e.name);let y=0;const g={};for(const e of n.fields)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,b.lD)(e);void 0!==t&&(g[e.name]=t)}const _=A(e,u,this._delimiter,(0,q.Vx)(g,o));for(const e of _){const s=this._parseCoordinateValue(e[t]),u=this._parseCoordinateValue(e[i]);if(null!=u&&null!=s&&!isNaN(s)&&!isNaN(u)){e[t]=s,e[i]=u;for(const s in e)if(s!==t&&s!==i)if(n.isDateField(s))e[s]=(0,r._U)(e[s]);else if(n.isNumericField(s)){const t=R(e[s]);isNaN(t)?e[s]=null:e[s]=t}else null!=e[s]&&(e[s]=k(e[s]));e[o]=y,y++,a.push(new U(u,s)),l.push(e)}}if(!(0,d.aI)({wkid:4326},s))if((0,d.K8)(s))for(const e of a)[e.x,e.y]=(0,f.je)(e.x,e.y,G);else a=(0,c.projectMany)(a,h.A.WGS84,s);const x=[];for(let e=0;e<a.length;e++){const{x:t,y:i}=a[e],n=l[e];n[o]=e+1,x.push(new m.Om(new p.A([],[t,i]),n,null,n[o]))}return x}_parseCoordinateValue(e){if(null==e||""===e)return null;let t=R(e);return(isNaN(t)||Math.abs(t)>181)&&(t=parseFloat(e)),t}async _checkProjection(e){try{await(0,g.Nk)(d.KK,e)}catch{throw new o.A("csv-layer:projection-not-supported","Projection not supported")}}}},64714(e,t,i){i.d(t,{F0:()=>a,Vx:()=>c,e2:()=>d,f:()=>f});var n=i(44208),s=i(4718),r=i(99352),o=i(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function c(e,t){if((0,n.A)("esri-csp-restrictions"))return()=>t?{[t]:null,...e}:{...e};try{let i="";t&&(i+=`this${h(t)} = null;`);for(const t in e)i+=`this${h(t)} = ${JSON.stringify(e[t])};`;const n=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${i};\n }\n }\n `)();return()=>new n}catch(i){return()=>t?{[t]:null,...e}:{...e}}}function h(e){return l.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function d(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,s.o8)(e)}}]}function f(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:r.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},98453(e,t,i){i.d(t,{m:()=>n});const n=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},54625(e,t,i){i.d(t,{i_:()=>s});var n=i(30524);function s(e,t,i){t=(0,n.rS)(t)?.toLowerCase(),i=(0,n.rS)(i)?.toLowerCase();const s=e.map(e=>e.toLowerCase()),a=t?e[s.indexOf(t)]:null,l=i?e[s.indexOf(i)]:null;return{longitudeFieldName:a||e[s.indexOf(o.find(e=>s.includes(e)))],latitudeFieldName:l||e[s.indexOf(r.find(e=>s.includes(e)))]}}const r=["lat","lat83","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],o=["lon","lng","lng83","long","long83","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"]},2272(e,t,i){i.d(t,{Dl:()=>u,gf:()=>h,jV:()=>l,lF:()=>c});var n=i(92602),s=i(70333),r=i(4718),o=i(84952),a=i(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,o.An)(e):(0,r.o8)(e)}function c(e,t,i){const n={};for(const s in e){if("declaredClass"===s)continue;const r=e[s];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))n[s]=r.map(e=>c(e));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(i?.[s]);n[s]=t?e:JSON.stringify(e)}else n[s]=t?r:JSON.stringify(r);else n[s]=r}return n}async function h(e,t,r){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.getApiKey)(e)??s.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!s.id&&n.A.request.useIdentity&&await Promise.all([i.e(7632),i.e(477),i.e(148)]).then(i.bind(i,50148));const l=await s.id.getCredential(e,r);return l?.token}},926(e,t,i){i.d(t,{Dd:()=>d,Jn:()=>f,Qc:()=>m,getApiKey:()=>c,getSessionToken:()=>h});var n=i(92602),s=i(11254),r=i(84952);const o=/^https?:\/\/(i?basemaps|basemapstyles)-api\.arcgis\.com\//i,a=new Set(["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"]),l=new Map;let u=null;function c(e){if(!m(e))return null;const t=t=>t instanceof RegExp?t.test(e):"string"==typeof t&&e.startsWith(t),i=n.A.apiKeys;if(Array.isArray(i.scopes))for(const e of i.scopes)if(Array.isArray(e.urls)){if(e.urls.some(t))return e.token}else if(t(e.urls))return e.token;return i.basemapStyles&&o.test(e)?i.basemapStyles:n.A.apiKey&&/^https?:\/\/.+\.arcgis\.com(\/|$)/i.test(e)?n.A.apiKey:null}async function h(e){if(!n.A.sessions?.basemap?.enabled||!o.test(e))return null;const t=c(e);if(!t)return null;u&&await u;const{styleFamily:i="arcgis",autoRefresh:r,duration:a=43200}=n.A.sessions.basemap,h=`${t}:${i}`,d=l.get(h);if(d&&(!r||d.endTime>Date.now()))return d.sessionToken;let f;u=(0,s.A)("https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/sessions/start",{cacheBust:!0,query:{durationSeconds:a,styleFamily:i,token:t}});try{f=(await u).data,f.endTime-=5e3,l.set(h,f)}finally{u=null}return f.sessionToken}function d(){return null!=n.A.apiKey||null!=n.A.apiKeys.basemapStyles}function f(e,t){return t?m(e):null!=c(e)}function m(e){const t=(0,r.$z)(e,!0);return!!t&&!a.has(t)&&!e.endsWith("/sharing/rest/generateToken")}},93470(e,t,i){i.d(t,{Cb:()=>r,HW:()=>c,JR:()=>s,JZ:()=>l,WR:()=>a,b6:()=>h,fT:()=>n,nC:()=>u,yM:()=>o});const n=[252,146,31,255],s=[153,153,153,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:n,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:n},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},u={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},c={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},h={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);