@arcgis/core 4.31.0-next.20240708 → 4.31.0-next.20240710

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 (239) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{0975e54c50383375cc09.js → 14cf7411e8318a1bccb9.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{71852b8437ec66b9ef06.js → 2123ab24163a532ebc8d.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{c91b3800cf3891bf2d59.js → 252ff37bf5e12dae0b18.js} +1 -1
  5. package/assets/esri/core/workers/chunks/2799007b5f3f4a2e364c.js +51 -0
  6. package/assets/esri/core/workers/chunks/{ff5e6d823d512f87a527.js → 2dddb8a989b9c96572fe.js} +1 -1
  7. package/assets/esri/core/workers/chunks/34b5bab6239c7277f854.js +1 -0
  8. package/assets/esri/core/workers/chunks/543f9db420c99d429637.js +1 -0
  9. package/assets/esri/core/workers/chunks/{5089a12084a8a8fb93d8.js → 61e5179fb49866241128.js} +1 -1
  10. package/assets/esri/core/workers/chunks/632e3ba2b8a881df29a0.js +1 -0
  11. package/assets/esri/core/workers/chunks/63eb1cc923bb8dcb3cb3.js +1 -0
  12. package/assets/esri/core/workers/chunks/{380e2654bc7e07163df0.js → 725a0eae5248a933db05.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{1cc4a89c96a36d6b3d52.js → 7767559d56d16b644655.js} +1 -1
  14. package/assets/esri/core/workers/chunks/7baf288a07401f9e972d.js +1 -0
  15. package/assets/esri/core/workers/chunks/{43e83f4d827f59ff556a.js → 8087288f00dfdcc479b9.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{a5fbe1c95e49093e5af4.js → 8cce4b218568638e6e64.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{c7e2a97cb7bcd153bcef.js → 8e326def543268f8a08e.js} +1 -1
  18. package/assets/esri/core/workers/chunks/92cb45b18e151db007dc.js +1 -0
  19. package/assets/esri/core/workers/chunks/b2e8cc76381077b78d4c.js +1 -0
  20. package/assets/esri/core/workers/chunks/b6a8132708afcd988fa9.js +1 -0
  21. package/assets/esri/core/workers/chunks/{b4d850e82a8ae902d684.js → c44cc686774ff53c0a94.js} +1 -1
  22. package/assets/esri/core/workers/chunks/c52701477405c1fb2072.js +1 -0
  23. package/assets/esri/core/workers/chunks/{9ed11b9202013ca001ee.js → cfc2a1858a8bbb284979.js} +2 -2
  24. package/assets/esri/core/workers/chunks/{9ed11b9202013ca001ee.js.LICENSE.txt → cfc2a1858a8bbb284979.js.LICENSE.txt} +1 -1
  25. package/assets/esri/core/workers/chunks/d9863289c69d2550cd49.js +1 -0
  26. package/assets/esri/core/workers/chunks/e1f4df3a5b0b31521b3c.js +1 -0
  27. package/assets/esri/core/workers/chunks/ee72a006e25e94a4cd4a.js +1039 -0
  28. package/assets/esri/core/workers/chunks/{61505947371cebab9cbe.js → fdebfe55cd097714ec11.js} +1 -1
  29. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +13 -18
  30. package/assets/esri/themes/dark/main.css +1 -1
  31. package/assets/esri/themes/light/main.css +1 -1
  32. package/assets/esri/themes/light/view.css +1 -1
  33. package/chunks/AtmosphereCompositing.glsl.js +6 -9
  34. package/chunks/BlendLayers.glsl.js +1 -7
  35. package/chunks/BlendWeights.glsl.js +81 -86
  36. package/chunks/Blur.glsl.js +1 -3
  37. package/chunks/ChapmanAtmosphere.glsl.js +3 -8
  38. package/chunks/CheckerBoard.glsl.js +3 -9
  39. package/chunks/Clouds.glsl.js +21 -10
  40. package/chunks/CloudsComposition.glsl.js +3 -7
  41. package/chunks/ColorMaterial.glsl.js +3 -9
  42. package/chunks/ComponentShader.glsl.js +41 -75
  43. package/chunks/Compositing.glsl.js +5 -7
  44. package/chunks/DefaultMaterial.glsl.js +68 -73
  45. package/chunks/EdgeDetect.glsl.js +29 -39
  46. package/chunks/EdgeShader.glsl.js +37 -60
  47. package/chunks/Fog.glsl.js +4 -9
  48. package/chunks/HUDCompositing.glsl.js +1 -3
  49. package/chunks/HUDMaterial.glsl.js +11 -20
  50. package/chunks/Heatmap.glsl.js +3 -11
  51. package/chunks/HeatmapDensity.glsl.js +12 -15
  52. package/chunks/HighlightApply.glsl.js +130 -174
  53. package/chunks/HighlightDownsample.glsl.js +29 -32
  54. package/chunks/ImageMaterial.glsl.js +11 -21
  55. package/chunks/LaserlinePath.glsl.js +6 -10
  56. package/chunks/Laserlines.glsl.js +8 -20
  57. package/chunks/LineCallout.glsl.js +91 -108
  58. package/chunks/LineMarker.glsl.js +62 -53
  59. package/chunks/Magnifier.glsl.js +4 -9
  60. package/chunks/MeasurementArrow.glsl.js +9 -15
  61. package/chunks/NativeLine.glsl.js +8 -12
  62. package/chunks/NoiseTextureAtlas.glsl.js +89 -86
  63. package/chunks/OITCompositing.glsl.js +8 -12
  64. package/chunks/OverlayCompositing.glsl.js +2 -4
  65. package/chunks/Path.glsl.js +31 -55
  66. package/chunks/Pattern.glsl.js +16 -20
  67. package/chunks/PointRenderer.glsl.js +39 -48
  68. package/chunks/Precipitation.glsl.js +22 -39
  69. package/chunks/RasterColorizer.glsl.js +25 -33
  70. package/chunks/RealisticTree.glsl.js +53 -65
  71. package/chunks/RibbonLine.glsl.js +31 -36
  72. package/chunks/SSAO.glsl.js +7 -10
  73. package/chunks/SSAOBlur.glsl.js +10 -14
  74. package/chunks/ShadedColorMaterial.glsl.js +12 -15
  75. package/chunks/ShadowCastAccumulate.glsl.js +6 -8
  76. package/chunks/ShadowCastVisualize.glsl.js +12 -18
  77. package/chunks/ShadowHighlight.glsl.js +49 -51
  78. package/chunks/SimpleAtmosphere.glsl.js +4 -13
  79. package/chunks/SlicePlaneMaterial.glsl.js +3 -7
  80. package/chunks/Stars.glsl.js +3 -7
  81. package/chunks/Terrain.glsl.js +20 -61
  82. package/chunks/TextureOnly.glsl.js +2 -4
  83. package/chunks/Viewshed.glsl.js +20 -38
  84. package/chunks/WaterSurface.glsl.js +34 -60
  85. package/core/accessorSupport/tracking.js +1 -1
  86. package/core/workers/registry.js +1 -1
  87. package/geometry/Circle.js +1 -1
  88. package/geometry/Polygon.js +1 -1
  89. package/geometry/Polyline.js +1 -1
  90. package/geometry/support/geodesicUtils.js +1 -1
  91. package/interfaces.d.ts +34 -4
  92. package/layers/WCSLayer.js +1 -1
  93. package/layers/mixins/ArcGISImageService.js +1 -1
  94. package/layers/orientedImagery/transformations/imageToGroundUtils.js +1 -1
  95. package/layers/support/SubtypeSublayer.js +1 -1
  96. package/layers/support/rasterDatasets/WCSRaster.js +1 -1
  97. package/layers/support/rasterDatasets/multidimensionalUtils.js +1 -1
  98. package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
  99. package/package.json +3 -3
  100. package/support/revision.js +1 -1
  101. package/views/2d/engine/flow/styles/Imagery.js +1 -1
  102. package/views/2d/engine/flow/styles/Particles.js +1 -1
  103. package/views/2d/engine/flow/styles/Streamlines.js +1 -1
  104. package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
  105. package/views/2d/engine/vectorTiles/RenderBucket.js +1 -1
  106. package/views/2d/engine/vectorTiles/shaders/VTLMaterial.js +1 -1
  107. package/views/2d/engine/webgl/BitBlitRenderer.js +1 -1
  108. package/views/2d/engine/webgl/DefaultVertexAttributeLayouts.js +1 -1
  109. package/views/2d/engine/webgl/Mesh2D.js +1 -1
  110. package/views/2d/engine/webgl/Overlay.js +1 -1
  111. package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
  112. package/views/2d/engine/webgl/Utils.js +1 -1
  113. package/views/2d/engine/webgl/VertexStream.js +1 -1
  114. package/views/2d/engine/webgl/brushes/WGLBrushStencil.js +1 -1
  115. package/views/2d/engine/webgl/brushes/WGLBrushTileDebugInfo.js +1 -1
  116. package/views/2d/engine/webgl/brushes/WGLBrushVTLBackground.js +1 -1
  117. package/views/2d/engine/webgl/cpuMapped/MappedMesh.js +1 -1
  118. package/views/2d/engine/webgl/effects/highlight/HighlightRenderer.js +1 -1
  119. package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
  120. package/views/2d/engine/webgl/meshing/Mesh.js +1 -1
  121. package/views/2d/engine/webgl/shaderGraph/ShaderBuilder2D.js +1 -1
  122. package/views/2d/engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js +1 -1
  123. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
  124. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
  125. package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
  126. package/views/2d/layers/support/DebugOverlay.js +1 -1
  127. package/views/2d/magnifier/MagnifierView2D.js +1 -1
  128. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  129. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  130. package/views/3d/environment/LocalAtmosphere.js +1 -1
  131. package/views/3d/environment/MarsAtmosphere.js +1 -1
  132. package/views/3d/environment/Precipitation.js +1 -1
  133. package/views/3d/environment/Stars.js +1 -1
  134. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  135. package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
  136. package/views/3d/interactive/editingTools/reshape/edgeOffsetUtils.js +1 -1
  137. package/views/3d/interactive/editingTools/reshape/reshapeTooltipUtils.js +1 -1
  138. package/views/3d/interactive/editingTools/transform/extentTransform/extentUtils.js +1 -1
  139. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  140. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  141. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  142. package/views/3d/layers/StreamLayerView3D.js +1 -1
  143. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  144. package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
  145. package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +5 -0
  146. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +5 -0
  147. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +5 -0
  148. package/views/3d/layers/graphics/pipeline/PBFPointFeaturesView.js +5 -0
  149. package/views/3d/layers/graphics/pipeline/TestSymbol.js +5 -0
  150. package/views/3d/layers/graphics/pipeline/Tile.js +5 -0
  151. package/views/3d/layers/graphics/pipeline/Tile3DFetcher.js +5 -0
  152. package/views/3d/layers/graphics/pipeline/Tile3DProcessor.js +5 -0
  153. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  154. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  155. package/views/3d/layers/support/projectExtentUtils.js +1 -1
  156. package/views/3d/terrain/OverlayRenderer.js +1 -1
  157. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  158. package/views/3d/terrain/PatchRenderData.js +1 -1
  159. package/views/3d/terrain/TerrainRenderer.js +1 -1
  160. package/views/3d/terrain/TileCompositor.js +1 -1
  161. package/views/3d/webgl/ManagedFBObject.js +1 -1
  162. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  163. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  164. package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
  165. package/views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js +3 -5
  166. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +3 -3
  167. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +29 -59
  168. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js +6 -12
  169. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +11 -11
  170. package/views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js +1 -1
  171. package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl.js +4 -7
  172. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +1 -1
  173. package/views/3d/webgl-engine/core/shaderLibrary/shading/TextureTransformUV.glsl.js +6 -6
  174. package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +4 -4
  175. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileComposite.glsl.js +2 -4
  176. package/views/3d/webgl-engine/core/shaderLibrary/util/LocalFromScreenSpace.glsl.js +2 -2
  177. package/views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js +1 -1
  178. package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
  179. package/views/3d/webgl-engine/effects/ScreenSpaceGeometry.js +1 -1
  180. package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
  181. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  182. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  183. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  184. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathData.js +1 -1
  185. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechnique.js +1 -1
  186. package/views/3d/webgl-engine/effects/magnifier/MagnifierRenderNode.js +1 -1
  187. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  188. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  189. package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
  190. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  191. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  192. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  193. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  194. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  195. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  196. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  197. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  198. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  199. package/views/3d/webgl-engine/lib/glUtil3D.js +1 -1
  200. package/views/3d/webgl-engine/lib/lodRendering/LodComponentData.js +1 -1
  201. package/views/3d/webgl-engine/materials/DrawParameters.js +1 -1
  202. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  203. package/views/3d/webgl-engine/materials/renderers/VaoCache.js +1 -1
  204. package/views/3d/webgl-engine/shaders/Heatmap.glsl.js +1 -1
  205. package/views/3d/webgl-engine/shaders/HighlightApply.glsl.js +1 -1
  206. package/views/3d/webgl-engine/shaders/OITCompositing.glsl.js +1 -1
  207. package/views/SceneView.js +1 -1
  208. package/views/draw/support/Box.js +1 -1
  209. package/views/interactive/tooltip/Tooltip.js +1 -1
  210. package/views/interactive/tooltip/fields/fields.js +1 -1
  211. package/views/webgl/RenderingContext.js +1 -1
  212. package/views/webgl/Util.js +1 -1
  213. package/views/webgl/VertexArrayObject.js +1 -1
  214. package/views/webgl/enums.js +1 -1
  215. package/views/webgl/heatmapTextureUtils.js +1 -1
  216. package/views/webgl/testDoublePrecisionArithmetic.js +1 -1
  217. package/views/webgl/testFloatBufferBlend.js +1 -1
  218. package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
  219. package/widgets/ElevationProfile/ElevationProfileController.js +1 -1
  220. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  221. package/widgets/Feature/support/relatedFeatureUtils.js +1 -1
  222. package/widgets/FeatureForm.js +1 -1
  223. package/widgets/OrientedImageryViewer/constants.js +1 -1
  224. package/widgets/OrientedImageryViewer.js +1 -1
  225. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  226. package/widgets/UtilityNetworkTrace.js +1 -1
  227. package/widgets/support/TimezonePicker.js +1 -1
  228. package/assets/esri/core/workers/chunks/0cb2eb96ffb1dbed00eb.js +0 -1
  229. package/assets/esri/core/workers/chunks/0d6ed27fc9948f4ea061.js +0 -1
  230. package/assets/esri/core/workers/chunks/225b947ba4b2fcfd5630.js +0 -1
  231. package/assets/esri/core/workers/chunks/7c7c3068da3bf7467685.js +0 -1
  232. package/assets/esri/core/workers/chunks/812e18c65aa6e398c338.js +0 -1
  233. package/assets/esri/core/workers/chunks/85e5cdd723f68dec8c25.js +0 -1
  234. package/assets/esri/core/workers/chunks/a7e2ca5ede46395f0787.js +0 -1
  235. package/assets/esri/core/workers/chunks/aed0db145187d9eb52f2.js +0 -51
  236. package/assets/esri/core/workers/chunks/cf9a32a03b3d3b66effb.js +0 -1
  237. package/assets/esri/core/workers/chunks/d85c51abde781660b1f5.js +0 -1
  238. package/assets/esri/core/workers/chunks/e840e54455eb500b501d.js +0 -1098
  239. package/assets/esri/core/workers/chunks/fec53ce15ae52f8cb802.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8096],{8096:(e,t,s)=>{s.r(t),s.d(t,{toBinaryGLTF:()=>K});var n,i=s(74887);!function(e){e[e.JSON=1313821514]="JSON",e[e.BIN=5130562]="BIN"}(n||(n={}));class r{constructor(e,t){if(!e)throw new Error("GLB requires a JSON gltf chunk");this._length=r.HEADER_SIZE,this._length+=r.CHUNK_HEADER_SIZE;const s=function(e){return(new TextEncoder).encode(e).buffer}(e);if(this._length+=_(s.byteLength,4),t&&(this._length+=r.CHUNK_HEADER_SIZE,this._length+=t.byteLength,t.byteLength%4))throw new Error("Expected BIN chunk length to be divisible by 4 at this point");this.buffer=new ArrayBuffer(this._length),this._outView=new DataView(this.buffer),this._writeHeader();const i=this._writeChunk(s,12,n.JSON,32);t&&this._writeChunk(t,i,n.BIN)}_writeHeader(){this._outView.setUint32(0,r.MAGIC,!0),this._outView.setUint32(4,r.VERSION,!0),this._outView.setUint32(8,this._length,!0)}_writeChunk(e,t,s,n=0){const i=_(e.byteLength,4);for(this._outView.setUint32(t,i,!0),this._outView.setUint32(t+=4,s,!0),function(e,t,s,n,i){new Uint8Array(e,s,i).set(new Uint8Array(t,0,i),0)}(this._outView.buffer,e,t+=4,0,e.byteLength),t+=e.byteLength;t%4;)n&&this._outView.setUint8(t,n),t++;return t}}function _(e,t){return t*Math.ceil(e/t)}r.HEADER_SIZE=12,r.CHUNK_HEADER_SIZE=8,r.MAGIC=1179937895,r.VERSION=2;var E,a,o,T,A,R,c,N,u=s(53966),f=s(91869),h=s(34727),l=s(67026),O=s(82534),S=s(38954),C=s(51850),I=s(80882),L=s(72258);(N=E||(E={}))[N.External=0]="External",N[N.DataURI=1]="DataURI",N[N.GLB=2]="GLB",function(e){e[e.External=0]="External",e[e.DataURI=1]="DataURI",e[e.GLB=2]="GLB"}(a||(a={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER"}(o||(o={})),function(e){e.SCALAR="SCALAR",e.VEC2="VEC2",e.VEC3="VEC3",e.VEC4="VEC4",e.MAT2="MAT2",e.MAT3="MAT3",e.MAT4="MAT4"}(T||(T={})),function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(A||(A={})),function(e){e.OPAQUE="OPAQUE",e.MASK="MASK",e.BLEND="BLEND"}(R||(R={})),function(e){e[e.NoColor=0]="NoColor",e[e.FaceColor=1]="FaceColor",e[e.VertexColor=2]="VertexColor"}(c||(c={}));var d=s(63907);class M{constructor(e,t,s,n,i){this._buffer=e,this._componentType=s,this._dataType=n,this._data=[],this._isFinalized=!1,this._accessorIndex=-1,this._accessorAttribute=null,this._accessorMin=null,this._accessorMax=null,t.bufferViews||(t.bufferViews=[]),this.index=t.bufferViews.length,this._bufferView={buffer:e.index,byteLength:-1,target:i};const r=this._getElementSize();r>=4&&i!==o.ELEMENT_ARRAY_BUFFER&&(this._bufferView.byteStride=r),t.bufferViews.push(this._bufferView),this._numComponentsForDataType=this._calculateNumComponentsForDataType()}push(e){const t=this._data.length;if(this._data.push(e),this._accessorIndex>=0){const s=t%this._numComponentsForDataType,n=this._accessorMin[s];this._accessorMin[s]="number"!=typeof n?e:Math.min(n,e);const i=this._accessorMax[s];this._accessorMax[s]="number"!=typeof i?e:Math.max(i,e)}}get dataSize(){return this._data.length*this._sizeComponentType()}get byteSize(){return function(e,t){return 4*Math.ceil(e/4)}(this.dataSize)}getByteOffset(){if(!this._isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this._buffer.getByteOffset(this)}get byteOffset(){if(!this._isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this._buffer.getByteOffset(this)}_createTypedArray(e,t){switch(this._componentType){case d.pe.BYTE:return new Int8Array(e,t);case d.pe.FLOAT:return new Float32Array(e,t);case d.pe.SHORT:return new Int16Array(e,t);case d.pe.UNSIGNED_BYTE:return new Uint8Array(e,t);case d.pe.UNSIGNED_INT:return new Uint32Array(e,t);case d.pe.UNSIGNED_SHORT:return new Uint16Array(e,t)}}writeOutToBuffer(e,t){this._createTypedArray(e,t).set(this._data)}writeAsync(e){if(this._asyncWritePromise)throw new Error("Can't write multiple bufferView values asynchronously");return this._asyncWritePromise=e.then((e=>{const t=new Uint8Array(e);for(let e=0;e<t.length;++e)this._data.push(t[e]);delete this._asyncWritePromise})),this._asyncWritePromise}startAccessor(e){if(this._accessorIndex>=0)throw new Error("Accessor was started without ending the previous one");this._accessorIndex=this._data.length,this._accessorAttribute=e;const t=this._numComponentsForDataType;this._accessorMin=new Array(t),this._accessorMax=new Array(t)}endAccessor(){if(this._accessorIndex<0)throw new Error("An accessor was not started, but was attempted to be ended");const e=this._getElementSize(),t=this._numComponentsForDataType,s=(this._data.length-this._accessorIndex)/t;if(s%1)throw new Error("An accessor was ended with missing component values");for(let e=0;e<this._accessorMin.length;++e)"number"!=typeof this._accessorMin[e]&&(this._accessorMin[e]=0),"number"!=typeof this._accessorMax[e]&&(this._accessorMax[e]=0);const n={byteOffset:e*(this._accessorIndex/t),componentType:this._componentType,count:s,type:this._dataType,min:this._accessorMin,max:this._accessorMax,name:this._accessorAttribute};switch(this._accessorAttribute){case"TEXCOORD_0":case"TEXCOORD_1":case"COLOR_0":case"WEIGHTS_0":switch(this._componentType){case d.pe.UNSIGNED_BYTE:case d.pe.UNSIGNED_SHORT:n.normalized=!0}}return this._accessorIndex=-1,this._accessorAttribute=null,this._accessorMin=null,this._accessorMax=null,n}get finalized(){return this._finalizedPromise?this._finalizedPromise:this._isFinalized?this._finalizedPromise=Promise.resolve():this._finalizedPromise=new Promise((e=>this._finalizedPromiseResolve=e))}async finalize(){const e=this._bufferView,t=this._buffer.getViewFinalizePromises(this);this._asyncWritePromise&&t.push(this._asyncWritePromise),await Promise.allSettled(t),this._isFinalized=!0,e.byteOffset=this.getByteOffset(),e.byteLength=this.dataSize,this._finalizedPromiseResolve&&this._finalizedPromiseResolve()}_getElementSize(){return this._sizeComponentType()*this._numComponentsForDataType}_sizeComponentType(){switch(this._componentType){case d.pe.BYTE:case d.pe.UNSIGNED_BYTE:return 1;case d.pe.SHORT:case d.pe.UNSIGNED_SHORT:return 2;case d.pe.UNSIGNED_INT:case d.pe.FLOAT:return 4}}_calculateNumComponentsForDataType(){switch(this._dataType){case T.SCALAR:return 1;case T.VEC2:return 2;case T.VEC3:return 3;case T.VEC4:case T.MAT2:return 4;case T.MAT3:return 9;case T.MAT4:return 16}}}class D{constructor(e){this._gltf=e,this._bufferViews=[],this._isFinalized=!1,e.buffers||(e.buffers=[]),this.index=e.buffers.length;const t={byteLength:-1};e.buffers.push(t),this._buffer=t}addBufferView(e,t,s){if(this._finalizePromise)throw new Error("Cannot add buffer view after fiinalizing buffer");const n=new M(this,this._gltf,e,t,s);return this._bufferViews.push(n),n}getByteOffset(e){let t=0;for(const s of this._bufferViews){if(s===e)return t;t+=s.byteSize}throw new Error("Given bufferView was not present in this buffer")}getViewFinalizePromises(e){const t=[];for(const s of this._bufferViews){if(e&&s===e)return t;t.push(s.finalized)}return t}getArrayBuffer(){if(!this._isFinalized)throw new Error("Cannot get ArrayBuffer from Buffer before it is finalized");const e=this._getTotalSize(),t=new ArrayBuffer(e);let s=0;for(const e of this._bufferViews)e.writeOutToBuffer(t,s),s+=e.byteSize;return t}finalize(){if(this._finalizePromise)throw new Error(`Buffer ${this.index} was already finalized`);return this._finalizePromise=Promise.allSettled(this.getViewFinalizePromises()).then((()=>{this._isFinalized=!0;const e=this.getArrayBuffer();this._buffer.byteLength=e.byteLength,this._buffer.uri=e})),this._gltf.extras.promises.push(this._finalizePromise),this._finalizePromise}_getTotalSize(){let e=0;for(const t of this._bufferViews)e+=t.byteSize;return e}}function p(e,t){null==t.normal&&(t.normal=new Float32Array(t.position.length));const s=e.faces,{position:n,normal:i}=t,r=s.length/3;for(let e=0;e<r;++e){const t=3*s[3*e],r=3*s[3*e+1],_=3*s[3*e+2],E=(0,S.s)(U,n[t],n[t+1],n[t+2]),a=(0,S.s)(B,n[r],n[r+1],n[r+2]),o=(0,S.s)(m,n[_],n[_+1],n[_+2]),T=(0,S.f)(a,a,E),A=(0,S.f)(o,o,E),R=(0,S.b)(T,T,A);i[t]+=R[0],i[t+1]+=R[1],i[t+2]+=R[2],i[r]+=R[0],i[r+1]+=R[1],i[r+2]+=R[2],i[_]+=R[0],i[_+1]+=R[1],i[_+2]+=R[2]}for(let e=0;e<i.length;e+=3)(0,S.s)(G,i[e],i[e+1],i[e+2]),(0,S.n)(G,G),i[e]=G[0],i[e+1]=G[1],i[e+2]=G[2]}const U=(0,C.vt)(),B=(0,C.vt)(),m=(0,C.vt)(),G=(0,C.vt)();s(44208);var P=s(49186),g=s(84952);async function F(e,t){const s=w(e);if(null==s)throw new P.A("imageToArrayBuffer","Unsupported image type");const n=function(e){if(!(e instanceof HTMLImageElement))return"image/png";const t=e.src;if((0,g.DB)(t)){const e=(0,g.r$)(t);return"image/jpeg"===e?.mediaType?e.mediaType:"image/png"}return/\.png$/i.test(t)?"image/png":/\.(jpg|jpeg)$/i.test(t)?"image/jpeg":"image/png"}(e),r=await new Promise((e=>s.toBlob(e,n)));if((0,i.Te)(t),!r)throw new P.A("imageToArrayBuffer","Failed to encode image");const _=await r.arrayBuffer();return(0,i.Te)(t),{data:_,type:n}}function w(e){if(e instanceof HTMLCanvasElement)return e;if(e instanceof HTMLVideoElement)return null;const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const s=t.getContext("2d");return e instanceof HTMLImageElement?s.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&s.putImageData(e,0,0),t}var b=s(51530);const H=()=>u.A.getLogger("esri.geometry.support.meshUtils.exporters.gltf.gltf");class x{constructor(e,t){this.options=t,this._materialMap=new Array,this._imageMap=new Map,this._textureMap=new Map,this.gltf={asset:{version:"2.0",copyright:e.copyright,generator:e.generator},extras:{output:t.output,binChunkBuffer:null,promises:[]}},this._addScenes(e)}_addScenes(e){this.gltf.scene=e.defaultScene;const t=this.gltf.extras,s=t.output.buffer===E.GLB||t.output.image===a.GLB;s&&(t.binChunkBuffer=new D(this.gltf)),e.forEachScene((e=>{this._addScene(e)})),s&&t.binChunkBuffer.finalize()}_addScene(e){this.gltf.scenes||(this.gltf.scenes=[]);const t={};e.name&&(t.name=e.name),e.forEachNode((e=>{t.nodes||(t.nodes=[]),t.nodes.push(...this._addNodes(e))})),this.gltf.scenes.push(t)}_addNodes(e){this.gltf.nodes||(this.gltf.nodes=[]);const t={};e.name&&(t.name=e.name);const s=e.translation;(0,S.e)(s,C.uY)||(t.translation=(0,C.o8)(s));const n=e.rotation;(0,l.t2)(n,O.zK)||(t.rotation=(0,O.o8)(n));const i=e.scale;(0,S.e)(i,C.Un)||(t.scale=(0,C.o8)(i));const r=this.gltf.nodes.length;if(this.gltf.nodes.push(t),e.mesh&&e.mesh.vertexAttributes.position){const s=this._createMeshes(e.mesh),n=[r];if(1===s.length)this._addMesh(t,s[0]);else for(const e of s){const t={};this._addMesh(t,e),n.push(this.gltf.nodes.length),this.gltf.nodes.push(t)}return n}return e.forEachNode((e=>{t.children||(t.children=[]),t.children.push(...this._addNodes(e))})),[r]}_addMesh(e,t){this.gltf.meshes??=[];const s=this.gltf.meshes.length;this.gltf.meshes.push(t),e.mesh=s}_createMeshes(e){const t=this.gltf.extras,s=t.output.buffer===E.GLB;let n;n=s?t.binChunkBuffer:new D(this.gltf);const i=this.options.origin,r=e.vertexSpace.clone();r.origin=[i.x,i.y,i.z??0];const _=(0,L.UR)({vertexAttributes:e.vertexAttributes,vertexSpace:e.vertexSpace,transform:this.options?.ignoreLocalTransform?null:e.transform,spatialReference:e.spatialReference},r,{targetUnit:"meters"});if(!_)return[];(function(e,t){if(e.components)for(const s of e.components)s.faces&&"smooth"===s.shading&&p(s,t)})(e,_),function({position:e,normal:t,tangent:s}){y(e,3),y(t,3),y(s,4)}(_);const{position:a,normal:A,tangent:R}=_,{uv:c,color:N}=e.vertexAttributes,u=n.addBufferView(d.pe.FLOAT,T.VEC3,o.ARRAY_BUFFER);let f,h,l,O;A&&(f=n.addBufferView(d.pe.FLOAT,T.VEC3,o.ARRAY_BUFFER)),c&&(h=n.addBufferView(d.pe.FLOAT,T.VEC2,o.ARRAY_BUFFER)),R&&(l=n.addBufferView(d.pe.FLOAT,T.VEC4,o.ARRAY_BUFFER)),N&&(O=n.addBufferView(d.pe.UNSIGNED_BYTE,T.VEC4,o.ARRAY_BUFFER)),u.startAccessor("POSITION"),f&&f.startAccessor("NORMAL"),h&&h.startAccessor("TEXCOORD_0"),l&&l.startAccessor("TANGENT"),O&&O.startAccessor("COLOR_0");const S=_.position.length/3;for(let e=0;e<S;++e)u.push(a[3*e]),u.push(a[3*e+1]),u.push(a[3*e+2]),f&&null!=A&&(f.push(A[3*e]),f.push(A[3*e+1]),f.push(A[3*e+2])),h&&null!=c&&(h.push(c[2*e]),h.push(c[2*e+1])),l&&null!=R&&(l.push(R[4*e]),l.push(R[4*e+1]),l.push(R[4*e+2]),l.push(R[4*e+3])),O&&null!=N&&(O.push(N[4*e]),O.push(N[4*e+1]),O.push(N[4*e+2]),O.push(N[4*e+3]));const C=u.endAccessor(),I=this._addAccessor(u.index,C);let M,U,B,m,G;if(f){const e=f.endAccessor();M=this._addAccessor(f.index,e)}if(h){const e=h.endAccessor();U=this._addAccessor(h.index,e)}if(l){const e=l.endAccessor();B=this._addAccessor(l.index,e)}if(O){const e=O.endAccessor();m=this._addAccessor(O.index,e)}const P=[];return e.components&&e.components.length>0&&e.components[0].faces?(G=n.addBufferView(d.pe.UNSIGNED_INT,T.SCALAR,o.ELEMENT_ARRAY_BUFFER),this._addMeshVertexIndexed(G,e.components,P,I,M,U,B,m)):this._addMeshVertexNonIndexed(e.components,P,I,M,U,B,m),u.finalize(),f&&f.finalize(),h&&h.finalize(),l&&l.finalize(),G&&G.finalize(),O&&O.finalize(),s||n.finalize(),P}_addMaterial(e){if(null===e)return;const t=this._materialMap.indexOf(e);if(-1!==t)return t;this.gltf.materials||(this.gltf.materials=[]);const s={};switch(e.alphaMode){case"mask":s.alphaMode=R.MASK;break;case"auto":case"blend":s.alphaMode=R.BLEND}s.alphaCutoff=e.alphaCutoff,e.doubleSided&&(s.doubleSided=e.doubleSided),s.pbrMetallicRoughness={};const n=e=>e**2.1,i=e=>{const t=e.toRgba();return t[0]=n(t[0]/255),t[1]=n(t[1]/255),t[2]=n(t[2]/255),t};if(null!=e.color&&(s.pbrMetallicRoughness.baseColorFactor=i(e.color)),null!=e.colorTexture&&(s.pbrMetallicRoughness.baseColorTexture=this._createTextureInfo(e.colorTexture,e.colorTextureTransform)),null!=e.normalTexture&&(s.normalTexture=this._createTextureInfo(e.normalTexture,e.normalTextureTransform)),e instanceof I.A){if(null!=e.emissiveTexture&&(s.emissiveTexture=this._createTextureInfo(e.emissiveTexture,e.emissiveTextureTransform)),null!=e.emissiveColor){const t=i(e.emissiveColor);s.emissiveFactor=[t[0],t[1],t[2]]}null!=e.occlusionTexture&&(s.occlusionTexture=this._createTextureInfo(e.occlusionTexture,e.occlusionTextureTransform)),null!=e.metallicRoughnessTexture&&(s.pbrMetallicRoughness.metallicRoughnessTexture=this._createTextureInfo(e.metallicRoughnessTexture,e.metallicRoughnessTextureTransform)),s.pbrMetallicRoughness.metallicFactor=e.metallic,s.pbrMetallicRoughness.roughnessFactor=e.roughness}else s.pbrMetallicRoughness.metallicFactor=1,s.pbrMetallicRoughness.roughnessFactor=1,H().warnOnce("Meshes exported to GLTF without MeshMaterialMetallicRoughness material will appear different when imported back.");const r=this.gltf.materials.length;return this.gltf.materials.push(s),this._materialMap.push(e),r}_createTextureInfo(e,t){const s={index:this._addTexture(e)};return t?(s.extensions||(s.extensions={}),s.extensions.KHR_texture_transform={scale:t.scale,offset:t.offset,rotation:(0,h.kU)(t.rotation)},s):s}_addTexture(e){const t=this.gltf.textures??[];return this.gltf.textures=t,(0,f.tE)(this._textureMap,e,(()=>{const s={sampler:this._addSampler(e),source:this._addImage(e)},n=t.length;return t.push(s),n}))}_addImage(e){const t=this._imageMap.get(e);if(null!=t)return t;this.gltf.images||(this.gltf.images=[]);const s={};if(e.url)s.uri=e.url;else{const t=e.data;s.extras=t;for(let e=0;e<this.gltf.images.length;++e)if(t===this.gltf.images[e].extras)return e;const n=this.gltf.extras;switch(n.output.image){case a.GLB:{const e=n.binChunkBuffer.addBufferView(d.pe.UNSIGNED_BYTE,T.SCALAR);if((0,b.x3)(t))null!=t.data&&e.writeOutToBuffer(t.data,0);else{const i=F(t,this.options.signal).then((({data:e,type:t})=>(s.mimeType=t,e)));n.promises.push(e.writeAsync(i).then((()=>{e.finalize()})))}s.bufferView=e.index;break}case a.DataURI:if((0,b.x3)(t)){H().warnOnce("Image export for basis compressed textures not available.");break}s.uri=function(e){const t=w(e);return null!=t?t.toDataURL():""}(t);break;default:if((0,b.x3)(t)){H().warnOnce("Image export for basis compressed textures not available.");break}n.promises.push(F(t,this.options.signal).then((({data:e,type:t})=>{s.uri=e,s.mimeType=t})))}}const n=this.gltf.images.length;return this.gltf.images.push(s),this._imageMap.set(e,n),n}_addSampler(e){this.gltf.samplers||(this.gltf.samplers=[]);let t=d.pF.REPEAT,s=d.pF.REPEAT;if("string"==typeof e.wrap)switch(e.wrap){case"clamp":t=d.pF.CLAMP_TO_EDGE,s=d.pF.CLAMP_TO_EDGE;break;case"mirror":t=d.pF.MIRRORED_REPEAT,s=d.pF.MIRRORED_REPEAT}else{switch(e.wrap.vertical){case"clamp":s=d.pF.CLAMP_TO_EDGE;break;case"mirror":s=d.pF.MIRRORED_REPEAT}switch(e.wrap.horizontal){case"clamp":t=d.pF.CLAMP_TO_EDGE;break;case"mirror":t=d.pF.MIRRORED_REPEAT}}const n={wrapS:t,wrapT:s};for(let e=0;e<this.gltf.samplers.length;++e)if(JSON.stringify(n)===JSON.stringify(this.gltf.samplers[e]))return e;const i=this.gltf.samplers.length;return this.gltf.samplers.push(n),i}_addAccessor(e,t){this.gltf.accessors||(this.gltf.accessors=[]);const s={bufferView:e,byteOffset:t.byteOffset,componentType:t.componentType,count:t.count,type:t.type,min:t.min,max:t.max,name:t.name};t.normalized&&(s.normalized=!0);const n=this.gltf.accessors.length;return this.gltf.accessors.push(s),n}_addMeshVertexIndexed(e,t,s,n,i,r,_,E){const a=new Map;for(const o of t){e.startAccessor("INDICES");for(let t=0;t<o.faces.length;++t)e.push(o.faces[t]);const t=e.endAccessor(),T={attributes:{POSITION:n},indices:this._addAccessor(e.index,t),material:this._addMaterial(o.material)};i&&"flat"!==o.shading&&(T.attributes.NORMAL=i),r&&(T.attributes.TEXCOORD_0=r),_&&"flat"!==o.shading&&(T.attributes.TANGENT=_),E&&(T.attributes.COLOR_0=E);const A=a.get(o.name);if(A)A.primitives.push(T);else{const e={name:o.name,primitives:[T]};a.set(o.name,e),s.push(e)}}}_addMeshVertexNonIndexed(e,t,s,n,i,r,_){const E={primitives:[]};t.push(E);const a={attributes:{POSITION:s}};n&&(a.attributes.NORMAL=n),i&&(a.attributes.TEXCOORD_0=i),r&&(a.attributes.TANGENT=r),_&&(a.attributes.COLOR_0=_),e&&(a.material=this._addMaterial(e[0].material)),E.primitives.push(a)}}function y(e,t){if(null!=e)for(let s=1,n=2;s<e.length;s+=t,n+=t){const t=e[s],i=e[n];e[s]=i,e[n]=-t}}var V=s(4576);class Y{constructor(){this.copyright="",this.defaultScene=0,this.generator="",this._scenes=[]}addScene(e){if(this._scenes.includes(e))throw new Error("Scene already added");this._scenes.push(e)}removeScene(e){(0,V.TF)(this._scenes,e)}forEachScene(e){this._scenes.forEach(e)}}class v{constructor(e){this.mesh=e,this.name="",this.translation=(0,C.vt)(),this.rotation=(0,O.vt)(),this.scale=(0,C.o8)(C.Un),this._nodes=[]}addNode(e){if(this._nodes.includes(e))throw new Error("Node already added");this._nodes.push(e)}forEachNode(e){this._nodes.forEach(e)}set rotationAngles(e){(0,l.A6)(this.rotation,e[0],e[1],e[2])}}const z="model.gltf",X="model.glb";async function k(e,t){const s=new x(e,t).gltf,n=s.extras.promises;let _=1,o=1,T=null;await Promise.allSettled(n),(0,i.Te)(t.signal);const A=t.jsonSpacing??4,R=new Map,c=JSON.stringify(s,((e,s)=>{if("extras"!==e){if(s instanceof ArrayBuffer){if(function(e){if(e.byteLength<8)return!1;const t=new Uint8Array(e);return 137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]&&13===t[4]&&10===t[5]&&26===t[6]&&10===t[7]}(s))switch(t.output?.image){case a.DataURI:case a.GLB:break;case a.External:default:{const e=`img${o}.png`;return o++,R.set(e,s),e}}switch(t.output?.buffer){case E.DataURI:return function(e){const t=[],s=new Uint8Array(e);for(let e=0;e<s.length;e++)t.push(String.fromCharCode(s[e]));return"data:application/octet-stream;base64,"+btoa(t.join(""))}(s);case E.GLB:if(T)throw new Error("Already encountered an ArrayBuffer, there should only be one in the GLB format.");return void(T=s);case E.External:default:{const e=`data${_}.bin`;return _++,R.set(e,s),e}}}return s}}),A);return t.output?.buffer===E.GLB||t.output?.image===a.GLB?R.set(X,new r(c,T).buffer):R.set(z,c),R}class W{constructor(){this.name="",this._nodes=[]}addNode(e){if(this._nodes.includes(e))throw new Error("Node already added");this._nodes.push(e)}forEachNode(e){this._nodes.forEach(e)}}async function K(e,t){const s=new Y,n=new W;return s.addScene(n),n.addNode(new v(e)),await async function(e,t){const s=(await k(e,{output:{buffer:E.GLB,image:a.GLB},jsonSpacing:0,...t})).get(X);if(!(s&&s instanceof ArrayBuffer))throw new Error("failed to export to glb");return s}(s,{origin:e.origin,...t})}},51530:(e,t,s)=>{s.d(t,{KB:()=>E,Xi:()=>r,pn:()=>a,x3:()=>_});var n=s(44208),i=s(89192);class r{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding=i.JS.KTX2_ENCODING}}function _(e){return"encoded-mesh-texture"===e?.type}async function E(e){const t=new Blob([e]),s=await t.text();return JSON.parse(s)}async function a(e,t){if(t===i.JS.KTX2_ENCODING)return new r(e);const s=new Blob([e],{type:t}),_=URL.createObjectURL(s),E=new Image;if((0,n.A)("esri-iPhone"))return new Promise(((e,t)=>{const s=()=>{i(),e(E)},n=e=>{i(),t(e)},i=()=>{URL.revokeObjectURL(_),E.removeEventListener("load",s),E.removeEventListener("error",n)};E.addEventListener("load",s),E.addEventListener("error",n),E.src=_}));try{E.src=_,await E.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(_),E}},89192:(e,t,s)=>{var n,i,r,_,E,a,o,T,A;s.d(t,{Am:()=>_,C7:()=>r,ID:()=>T,JS:()=>A,Mg:()=>a,dd:()=>E,it:()=>i,s2:()=>n,sf:()=>o}),function(e){e[e.None=0]="None",e[e.Front=1]="Front",e[e.Back=2]="Back",e[e.COUNT=3]="COUNT"}(n||(n={})),function(e){e[e.Less=0]="Less",e[e.Lequal=1]="Lequal",e[e.COUNT=2]="COUNT"}(i||(i={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.UPDATE=1]="UPDATE"}(r||(r={})),function(e){e[e.NOT_LOADED=0]="NOT_LOADED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED"}(_||(_={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(E||(E={})),function(e){e[e.Highlight=0]="Highlight",e[e.MaskOccludee=1]="MaskOccludee",e[e.COUNT=2]="COUNT"}(a||(a={})),function(e){e[e.Blend=0]="Blend",e[e.Opaque=1]="Opaque",e[e.Mask=2]="Mask",e[e.MaskBlend=3]="MaskBlend",e[e.COUNT=4]="COUNT"}(o||(o={})),function(e){e[e.OFF=0]="OFF",e[e.ON=1]="ON"}(T||(T={})),function(e){e.DDS_ENCODING="image/vnd-ms.dds",e.KTX2_ENCODING="image/ktx2",e.BASIS_ENCODING="image/x.basis"}(A||(A={}))},63907:(e,t,s)=>{var n,i,r,_,E,a,o,T,A,R,c,N,u,f,h,l,O,S,C,I,L,d,M;s.d(t,{Ab:()=>f,Ac:()=>o,Ap:()=>u,CQ:()=>p,Cj:()=>c,Co:()=>C,H0:()=>h,Hr:()=>M,MT:()=>A,NZ:()=>E,Nm:()=>d,R:()=>I,Tb:()=>_,WR:()=>i,Y7:()=>a,_U:()=>S,dn:()=>r,eA:()=>R,hn:()=>n,ld:()=>l,nI:()=>D,pF:()=>N,pe:()=>T,vt:()=>L,yQ:()=>O}),function(e){e[e.DEPTH_BUFFER_BIT=256]="DEPTH_BUFFER_BIT",e[e.STENCIL_BUFFER_BIT=1024]="STENCIL_BUFFER_BIT",e[e.COLOR_BUFFER_BIT=16384]="COLOR_BUFFER_BIT"}(n||(n={})),function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(i||(i={})),function(e){e[e.ZERO=0]="ZERO",e[e.ONE=1]="ONE",e[e.SRC_COLOR=768]="SRC_COLOR",e[e.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",e[e.SRC_ALPHA=770]="SRC_ALPHA",e[e.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",e[e.DST_ALPHA=772]="DST_ALPHA",e[e.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",e[e.DST_COLOR=774]="DST_COLOR",e[e.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",e[e.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",e[e.CONSTANT_COLOR=32769]="CONSTANT_COLOR",e[e.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",e[e.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",e[e.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA"}(r||(r={})),function(e){e[e.ADD=32774]="ADD",e[e.MIN=32775]="MIN",e[e.MAX=32776]="MAX",e[e.SUBTRACT=32778]="SUBTRACT",e[e.REVERSE_SUBTRACT=32779]="REVERSE_SUBTRACT"}(_||(_={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e[e.PIXEL_PACK_BUFFER=35051]="PIXEL_PACK_BUFFER",e[e.PIXEL_UNPACK_BUFFER=35052]="PIXEL_UNPACK_BUFFER",e[e.COPY_READ_BUFFER=36662]="COPY_READ_BUFFER",e[e.COPY_WRITE_BUFFER=36663]="COPY_WRITE_BUFFER",e[e.TRANSFORM_FEEDBACK_BUFFER=35982]="TRANSFORM_FEEDBACK_BUFFER"}(E||(E={})),function(e){e[e.FRONT=1028]="FRONT",e[e.BACK=1029]="BACK",e[e.FRONT_AND_BACK=1032]="FRONT_AND_BACK"}(a||(a={})),function(e){e[e.CW=2304]="CW",e[e.CCW=2305]="CCW"}(o||(o={})),function(e){e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.INT=5124]="INT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.FLOAT=5126]="FLOAT",e[e.HALF_FLOAT=5131]="HALF_FLOAT"}(T||(T={})),function(e){e[e.NEVER=512]="NEVER",e[e.LESS=513]="LESS",e[e.EQUAL=514]="EQUAL",e[e.LEQUAL=515]="LEQUAL",e[e.GREATER=516]="GREATER",e[e.NOTEQUAL=517]="NOTEQUAL",e[e.GEQUAL=518]="GEQUAL",e[e.ALWAYS=519]="ALWAYS"}(A||(A={})),function(e){e[e.ZERO=0]="ZERO",e[e.KEEP=7680]="KEEP",e[e.REPLACE=7681]="REPLACE",e[e.INCR=7682]="INCR",e[e.DECR=7683]="DECR",e[e.INVERT=5386]="INVERT",e[e.INCR_WRAP=34055]="INCR_WRAP",e[e.DECR_WRAP=34056]="DECR_WRAP"}(R||(R={})),function(e){e[e.NEAREST=9728]="NEAREST",e[e.LINEAR=9729]="LINEAR",e[e.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",e[e.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",e[e.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",e[e.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR"}(c||(c={})),function(e){e[e.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(N||(N={})),function(e){e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_3D=32879]="TEXTURE_3D",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY"}(u||(u={})),function(e){e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",e[e.ALPHA=6406]="ALPHA",e[e.RGB=6407]="RGB",e[e.RGBA=6408]="RGBA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.RED=6403]="RED",e[e.RG=33319]="RG",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER"}(f||(f={})),function(e){e[e.RGBA4=32854]="RGBA4",e[e.R16F=33325]="R16F",e[e.RG16F=33327]="RG16F",e[e.RGB32F=34837]="RGB32F",e[e.RGBA16F=34842]="RGBA16F",e[e.R32F=33326]="R32F",e[e.RG32F=33328]="RG32F",e[e.RGBA32F=34836]="RGBA32F",e[e.R11F_G11F_B10F=35898]="R11F_G11F_B10F",e[e.RGB8=32849]="RGB8",e[e.RGBA8=32856]="RGBA8",e[e.RGB5_A1=32855]="RGB5_A1",e[e.R8=33321]="R8",e[e.RG8=33323]="RG8",e[e.R8I=33329]="R8I",e[e.R8UI=33330]="R8UI",e[e.R16I=33331]="R16I",e[e.R16UI=33332]="R16UI",e[e.R32I=33333]="R32I",e[e.R32UI=33334]="R32UI",e[e.RG8I=33335]="RG8I",e[e.RG8UI=33336]="RG8UI",e[e.RG16I=33337]="RG16I",e[e.RG16UI=33338]="RG16UI",e[e.RG32I=33339]="RG32I",e[e.RG32UI=33340]="RG32UI",e[e.RGB16F=34843]="RGB16F",e[e.RGB9_E5=35901]="RGB9_E5",e[e.SRGB8=35905]="SRGB8",e[e.SRGB8_ALPHA8=35907]="SRGB8_ALPHA8",e[e.RGB565=36194]="RGB565",e[e.RGBA32UI=36208]="RGBA32UI",e[e.RGB32UI=36209]="RGB32UI",e[e.RGBA16UI=36214]="RGBA16UI",e[e.RGB16UI=36215]="RGB16UI",e[e.RGBA8UI=36220]="RGBA8UI",e[e.RGB8UI=36221]="RGB8UI",e[e.RGBA32I=36226]="RGBA32I",e[e.RGB32I=36227]="RGB32I",e[e.RGBA16I=36232]="RGBA16I",e[e.RGB16I=36233]="RGB16I",e[e.RGBA8I=36238]="RGBA8I",e[e.RGB8I=36239]="RGB8I",e[e.R8_SNORM=36756]="R8_SNORM",e[e.RG8_SNORM=36757]="RG8_SNORM",e[e.RGB8_SNORM=36758]="RGB8_SNORM",e[e.RGBA8_SNORM=36759]="RGBA8_SNORM",e[e.RGB10_A2=32857]="RGB10_A2",e[e.RGB10_A2UI=36975]="RGB10_A2UI"}(h||(h={})),function(e){e[e.FLOAT=5126]="FLOAT",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.INT=5124]="INT",e[e.HALF_FLOAT=5131]="HALF_FLOAT",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV"}(l||(l={})),function(e){e[e.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",e[e.STENCIL_INDEX8=36168]="STENCIL_INDEX8",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.DEPTH_COMPONENT24=33190]="DEPTH_COMPONENT24",e[e.DEPTH_COMPONENT32F=36012]="DEPTH_COMPONENT32F",e[e.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",e[e.DEPTH32F_STENCIL8=36013]="DEPTH32F_STENCIL8"}(O||(O={})),function(e){e[e.STATIC_DRAW=35044]="STATIC_DRAW",e[e.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",e[e.STREAM_DRAW=35040]="STREAM_DRAW",e[e.STATIC_READ=35045]="STATIC_READ",e[e.DYNAMIC_READ=35049]="DYNAMIC_READ",e[e.STREAM_READ=35041]="STREAM_READ",e[e.STATIC_COPY=35046]="STATIC_COPY",e[e.DYNAMIC_COPY=35050]="DYNAMIC_COPY",e[e.STREAM_COPY=35042]="STREAM_COPY"}(S||(S={})),function(e){e[e.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",e[e.VERTEX_SHADER=35633]="VERTEX_SHADER"}(C||(C={})),function(e){e[e.FRAMEBUFFER=36160]="FRAMEBUFFER",e[e.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER",e[e.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER"}(I||(I={})),function(e){e[e.Texture=0]="Texture",e[e.BufferObject=1]="BufferObject",e[e.VertexArrayObject=2]="VertexArrayObject",e[e.Shader=3]="Shader",e[e.Program=4]="Program",e[e.FramebufferObject=5]="FramebufferObject",e[e.Renderbuffer=6]="Renderbuffer",e[e.TransformFeedback=7]="TransformFeedback",e[e.Sync=8]="Sync",e[e.UNCOUNTED=9]="UNCOUNTED",e[e.LinesOfCode=9]="LinesOfCode",e[e.Uniform=10]="Uniform",e[e.COUNT=11]="COUNT"}(L||(L={})),function(e){e[e.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",e[e.COLOR_ATTACHMENT1=36065]="COLOR_ATTACHMENT1",e[e.COLOR_ATTACHMENT2=36066]="COLOR_ATTACHMENT2",e[e.COLOR_ATTACHMENT3=36067]="COLOR_ATTACHMENT3",e[e.COLOR_ATTACHMENT4=36068]="COLOR_ATTACHMENT4",e[e.COLOR_ATTACHMENT5=36069]="COLOR_ATTACHMENT5",e[e.COLOR_ATTACHMENT6=36070]="COLOR_ATTACHMENT6",e[e.COLOR_ATTACHMENT7=36071]="COLOR_ATTACHMENT7",e[e.COLOR_ATTACHMENT8=36072]="COLOR_ATTACHMENT8",e[e.COLOR_ATTACHMENT9=36073]="COLOR_ATTACHMENT9",e[e.COLOR_ATTACHMENT10=36074]="COLOR_ATTACHMENT10",e[e.COLOR_ATTACHMENT11=36075]="COLOR_ATTACHMENT11",e[e.COLOR_ATTACHMENT12=36076]="COLOR_ATTACHMENT12",e[e.COLOR_ATTACHMENT13=36077]="COLOR_ATTACHMENT13",e[e.COLOR_ATTACHMENT14=36078]="COLOR_ATTACHMENT14",e[e.COLOR_ATTACHMENT15=36079]="COLOR_ATTACHMENT15"}(d||(d={})),function(e){e[e.NONE=0]="NONE",e[e.BACK=1029]="BACK"}(M||(M={}));const D=33306;var p,U,B,m,G,P,g;!function(e){e[e.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",e[e.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",e[e.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",e[e.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",e[e.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",e[e.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",e[e.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",e[e.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",e[e.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"}(p||(p={})),function(e){e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_VEC2=35664]="FLOAT_VEC2",e[e.FLOAT_VEC3=35665]="FLOAT_VEC3",e[e.FLOAT_VEC4=35666]="FLOAT_VEC4",e[e.INT=5124]="INT",e[e.INT_VEC2=35667]="INT_VEC2",e[e.INT_VEC3=35668]="INT_VEC3",e[e.INT_VEC4=35669]="INT_VEC4",e[e.BOOL=35670]="BOOL",e[e.BOOL_VEC2=35671]="BOOL_VEC2",e[e.BOOL_VEC3=35672]="BOOL_VEC3",e[e.BOOL_VEC4=35673]="BOOL_VEC4",e[e.FLOAT_MAT2=35674]="FLOAT_MAT2",e[e.FLOAT_MAT3=35675]="FLOAT_MAT3",e[e.FLOAT_MAT4=35676]="FLOAT_MAT4",e[e.SAMPLER_2D=35678]="SAMPLER_2D",e[e.SAMPLER_CUBE=35680]="SAMPLER_CUBE",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_VEC2=36294]="UNSIGNED_INT_VEC2",e[e.UNSIGNED_INT_VEC3=36295]="UNSIGNED_INT_VEC3",e[e.UNSIGNED_INT_VEC4=36296]="UNSIGNED_INT_VEC4",e[e.FLOAT_MAT2x3=35685]="FLOAT_MAT2x3",e[e.FLOAT_MAT2x4=35686]="FLOAT_MAT2x4",e[e.FLOAT_MAT3x2=35687]="FLOAT_MAT3x2",e[e.FLOAT_MAT3x4=35688]="FLOAT_MAT3x4",e[e.FLOAT_MAT4x2=35689]="FLOAT_MAT4x2",e[e.FLOAT_MAT4x3=35690]="FLOAT_MAT4x3",e[e.SAMPLER_3D=35679]="SAMPLER_3D",e[e.SAMPLER_2D_SHADOW=35682]="SAMPLER_2D_SHADOW",e[e.SAMPLER_2D_ARRAY=36289]="SAMPLER_2D_ARRAY",e[e.SAMPLER_2D_ARRAY_SHADOW=36292]="SAMPLER_2D_ARRAY_SHADOW",e[e.SAMPLER_CUBE_SHADOW=36293]="SAMPLER_CUBE_SHADOW",e[e.INT_SAMPLER_2D=36298]="INT_SAMPLER_2D",e[e.INT_SAMPLER_3D=36299]="INT_SAMPLER_3D",e[e.INT_SAMPLER_CUBE=36300]="INT_SAMPLER_CUBE",e[e.INT_SAMPLER_2D_ARRAY=36303]="INT_SAMPLER_2D_ARRAY",e[e.UNSIGNED_INT_SAMPLER_2D=36306]="UNSIGNED_INT_SAMPLER_2D",e[e.UNSIGNED_INT_SAMPLER_3D=36307]="UNSIGNED_INT_SAMPLER_3D",e[e.UNSIGNED_INT_SAMPLER_CUBE=36308]="UNSIGNED_INT_SAMPLER_CUBE",e[e.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311]="UNSIGNED_INT_SAMPLER_2D_ARRAY"}(U||(U={})),function(e){e[e.OBJECT_TYPE=37138]="OBJECT_TYPE",e[e.SYNC_CONDITION=37139]="SYNC_CONDITION",e[e.SYNC_STATUS=37140]="SYNC_STATUS",e[e.SYNC_FLAGS=37141]="SYNC_FLAGS"}(B||(B={})),function(e){e[e.UNSIGNALED=37144]="UNSIGNALED",e[e.SIGNALED=37145]="SIGNALED"}(m||(m={})),function(e){e[e.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED",e[e.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED",e[e.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED",e[e.WAIT_FAILED=37149]="WAIT_FAILED"}(G||(G={})),function(e){e[e.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE"}(P||(P={})),function(e){e[e.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT"}(g||(g={}))}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8096],{8096:(e,t,s)=>{s.r(t),s.d(t,{toBinaryGLTF:()=>K});var n,i=s(74887);!function(e){e[e.JSON=1313821514]="JSON",e[e.BIN=5130562]="BIN"}(n||(n={}));class r{constructor(e,t){if(!e)throw new Error("GLB requires a JSON gltf chunk");this._length=r.HEADER_SIZE,this._length+=r.CHUNK_HEADER_SIZE;const s=function(e){return(new TextEncoder).encode(e).buffer}(e);if(this._length+=_(s.byteLength,4),t&&(this._length+=r.CHUNK_HEADER_SIZE,this._length+=t.byteLength,t.byteLength%4))throw new Error("Expected BIN chunk length to be divisible by 4 at this point");this.buffer=new ArrayBuffer(this._length),this._outView=new DataView(this.buffer),this._writeHeader();const i=this._writeChunk(s,12,n.JSON,32);t&&this._writeChunk(t,i,n.BIN)}_writeHeader(){this._outView.setUint32(0,r.MAGIC,!0),this._outView.setUint32(4,r.VERSION,!0),this._outView.setUint32(8,this._length,!0)}_writeChunk(e,t,s,n=0){const i=_(e.byteLength,4);for(this._outView.setUint32(t,i,!0),this._outView.setUint32(t+=4,s,!0),function(e,t,s,n,i){new Uint8Array(e,s,i).set(new Uint8Array(t,0,i),0)}(this._outView.buffer,e,t+=4,0,e.byteLength),t+=e.byteLength;t%4;)n&&this._outView.setUint8(t,n),t++;return t}}function _(e,t){return t*Math.ceil(e/t)}r.HEADER_SIZE=12,r.CHUNK_HEADER_SIZE=8,r.MAGIC=1179937895,r.VERSION=2;var E,a,o,T,A,R,c,N,u=s(53966),f=s(91869),h=s(34727),l=s(67026),O=s(82534),S=s(38954),C=s(51850),I=s(80882),L=s(72258);(N=E||(E={}))[N.External=0]="External",N[N.DataURI=1]="DataURI",N[N.GLB=2]="GLB",function(e){e[e.External=0]="External",e[e.DataURI=1]="DataURI",e[e.GLB=2]="GLB"}(a||(a={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER"}(o||(o={})),function(e){e.SCALAR="SCALAR",e.VEC2="VEC2",e.VEC3="VEC3",e.VEC4="VEC4",e.MAT2="MAT2",e.MAT3="MAT3",e.MAT4="MAT4"}(T||(T={})),function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(A||(A={})),function(e){e.OPAQUE="OPAQUE",e.MASK="MASK",e.BLEND="BLEND"}(R||(R={})),function(e){e[e.NoColor=0]="NoColor",e[e.FaceColor=1]="FaceColor",e[e.VertexColor=2]="VertexColor"}(c||(c={}));var d=s(63907);class M{constructor(e,t,s,n,i){this._buffer=e,this._componentType=s,this._dataType=n,this._data=[],this._isFinalized=!1,this._accessorIndex=-1,this._accessorAttribute=null,this._accessorMin=null,this._accessorMax=null,t.bufferViews||(t.bufferViews=[]),this.index=t.bufferViews.length,this._bufferView={buffer:e.index,byteLength:-1,target:i};const r=this._getElementSize();r>=4&&i!==o.ELEMENT_ARRAY_BUFFER&&(this._bufferView.byteStride=r),t.bufferViews.push(this._bufferView),this._numComponentsForDataType=this._calculateNumComponentsForDataType()}push(e){const t=this._data.length;if(this._data.push(e),this._accessorIndex>=0){const s=t%this._numComponentsForDataType,n=this._accessorMin[s];this._accessorMin[s]="number"!=typeof n?e:Math.min(n,e);const i=this._accessorMax[s];this._accessorMax[s]="number"!=typeof i?e:Math.max(i,e)}}get dataSize(){return this._data.length*this._sizeComponentType()}get byteSize(){return function(e,t){return 4*Math.ceil(e/4)}(this.dataSize)}getByteOffset(){if(!this._isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this._buffer.getByteOffset(this)}get byteOffset(){if(!this._isFinalized)throw new Error("Cannot get BufferView offset until it is finalized");return this._buffer.getByteOffset(this)}_createTypedArray(e,t){switch(this._componentType){case d.pe.BYTE:return new Int8Array(e,t);case d.pe.FLOAT:return new Float32Array(e,t);case d.pe.SHORT:return new Int16Array(e,t);case d.pe.UNSIGNED_BYTE:return new Uint8Array(e,t);case d.pe.UNSIGNED_INT:return new Uint32Array(e,t);case d.pe.UNSIGNED_SHORT:return new Uint16Array(e,t)}}writeOutToBuffer(e,t){this._createTypedArray(e,t).set(this._data)}writeAsync(e){if(this._asyncWritePromise)throw new Error("Can't write multiple bufferView values asynchronously");return this._asyncWritePromise=e.then((e=>{const t=new Uint8Array(e);for(let e=0;e<t.length;++e)this._data.push(t[e]);delete this._asyncWritePromise})),this._asyncWritePromise}startAccessor(e){if(this._accessorIndex>=0)throw new Error("Accessor was started without ending the previous one");this._accessorIndex=this._data.length,this._accessorAttribute=e;const t=this._numComponentsForDataType;this._accessorMin=new Array(t),this._accessorMax=new Array(t)}endAccessor(){if(this._accessorIndex<0)throw new Error("An accessor was not started, but was attempted to be ended");const e=this._getElementSize(),t=this._numComponentsForDataType,s=(this._data.length-this._accessorIndex)/t;if(s%1)throw new Error("An accessor was ended with missing component values");for(let e=0;e<this._accessorMin.length;++e)"number"!=typeof this._accessorMin[e]&&(this._accessorMin[e]=0),"number"!=typeof this._accessorMax[e]&&(this._accessorMax[e]=0);const n={byteOffset:e*(this._accessorIndex/t),componentType:this._componentType,count:s,type:this._dataType,min:this._accessorMin,max:this._accessorMax,name:this._accessorAttribute};switch(this._accessorAttribute){case"TEXCOORD_0":case"TEXCOORD_1":case"COLOR_0":case"WEIGHTS_0":switch(this._componentType){case d.pe.UNSIGNED_BYTE:case d.pe.UNSIGNED_SHORT:n.normalized=!0}}return this._accessorIndex=-1,this._accessorAttribute=null,this._accessorMin=null,this._accessorMax=null,n}get finalized(){return this._finalizedPromise?this._finalizedPromise:this._isFinalized?this._finalizedPromise=Promise.resolve():this._finalizedPromise=new Promise((e=>this._finalizedPromiseResolve=e))}async finalize(){const e=this._bufferView,t=this._buffer.getViewFinalizePromises(this);this._asyncWritePromise&&t.push(this._asyncWritePromise),await Promise.allSettled(t),this._isFinalized=!0,e.byteOffset=this.getByteOffset(),e.byteLength=this.dataSize,this._finalizedPromiseResolve&&this._finalizedPromiseResolve()}_getElementSize(){return this._sizeComponentType()*this._numComponentsForDataType}_sizeComponentType(){switch(this._componentType){case d.pe.BYTE:case d.pe.UNSIGNED_BYTE:return 1;case d.pe.SHORT:case d.pe.UNSIGNED_SHORT:return 2;case d.pe.UNSIGNED_INT:case d.pe.FLOAT:return 4}}_calculateNumComponentsForDataType(){switch(this._dataType){case T.SCALAR:return 1;case T.VEC2:return 2;case T.VEC3:return 3;case T.VEC4:case T.MAT2:return 4;case T.MAT3:return 9;case T.MAT4:return 16}}}class D{constructor(e){this._gltf=e,this._bufferViews=[],this._isFinalized=!1,e.buffers||(e.buffers=[]),this.index=e.buffers.length;const t={byteLength:-1};e.buffers.push(t),this._buffer=t}addBufferView(e,t,s){if(this._finalizePromise)throw new Error("Cannot add buffer view after fiinalizing buffer");const n=new M(this,this._gltf,e,t,s);return this._bufferViews.push(n),n}getByteOffset(e){let t=0;for(const s of this._bufferViews){if(s===e)return t;t+=s.byteSize}throw new Error("Given bufferView was not present in this buffer")}getViewFinalizePromises(e){const t=[];for(const s of this._bufferViews){if(e&&s===e)return t;t.push(s.finalized)}return t}getArrayBuffer(){if(!this._isFinalized)throw new Error("Cannot get ArrayBuffer from Buffer before it is finalized");const e=this._getTotalSize(),t=new ArrayBuffer(e);let s=0;for(const e of this._bufferViews)e.writeOutToBuffer(t,s),s+=e.byteSize;return t}finalize(){if(this._finalizePromise)throw new Error(`Buffer ${this.index} was already finalized`);return this._finalizePromise=Promise.allSettled(this.getViewFinalizePromises()).then((()=>{this._isFinalized=!0;const e=this.getArrayBuffer();this._buffer.byteLength=e.byteLength,this._buffer.uri=e})),this._gltf.extras.promises.push(this._finalizePromise),this._finalizePromise}_getTotalSize(){let e=0;for(const t of this._bufferViews)e+=t.byteSize;return e}}function p(e,t){null==t.normal&&(t.normal=new Float32Array(t.position.length));const s=e.faces,{position:n,normal:i}=t,r=s.length/3;for(let e=0;e<r;++e){const t=3*s[3*e],r=3*s[3*e+1],_=3*s[3*e+2],E=(0,S.s)(U,n[t],n[t+1],n[t+2]),a=(0,S.s)(m,n[r],n[r+1],n[r+2]),o=(0,S.s)(G,n[_],n[_+1],n[_+2]),T=(0,S.f)(a,a,E),A=(0,S.f)(o,o,E),R=(0,S.b)(T,T,A);i[t]+=R[0],i[t+1]+=R[1],i[t+2]+=R[2],i[r]+=R[0],i[r+1]+=R[1],i[r+2]+=R[2],i[_]+=R[0],i[_+1]+=R[1],i[_+2]+=R[2]}for(let e=0;e<i.length;e+=3)(0,S.s)(B,i[e],i[e+1],i[e+2]),(0,S.n)(B,B),i[e]=B[0],i[e+1]=B[1],i[e+2]=B[2]}const U=(0,C.vt)(),m=(0,C.vt)(),G=(0,C.vt)(),B=(0,C.vt)();s(44208);var P=s(49186),g=s(84952);async function F(e,t){const s=w(e);if(null==s)throw new P.A("imageToArrayBuffer","Unsupported image type");const n=function(e){if(!(e instanceof HTMLImageElement))return"image/png";const t=e.src;if((0,g.DB)(t)){const e=(0,g.r$)(t);return"image/jpeg"===e?.mediaType?e.mediaType:"image/png"}return/\.png$/i.test(t)?"image/png":/\.(jpg|jpeg)$/i.test(t)?"image/jpeg":"image/png"}(e),r=await new Promise((e=>s.toBlob(e,n)));if((0,i.Te)(t),!r)throw new P.A("imageToArrayBuffer","Failed to encode image");const _=await r.arrayBuffer();return(0,i.Te)(t),{data:_,type:n}}function w(e){if(e instanceof HTMLCanvasElement)return e;if(e instanceof HTMLVideoElement)return null;const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const s=t.getContext("2d");return e instanceof HTMLImageElement?s.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&s.putImageData(e,0,0),t}var b=s(51530);const H=()=>u.A.getLogger("esri.geometry.support.meshUtils.exporters.gltf.gltf");class x{constructor(e,t){this.options=t,this._materialMap=new Array,this._imageMap=new Map,this._textureMap=new Map,this.gltf={asset:{version:"2.0",copyright:e.copyright,generator:e.generator},extras:{output:t.output,binChunkBuffer:null,promises:[]}},this._addScenes(e)}_addScenes(e){this.gltf.scene=e.defaultScene;const t=this.gltf.extras,s=t.output.buffer===E.GLB||t.output.image===a.GLB;s&&(t.binChunkBuffer=new D(this.gltf)),e.forEachScene((e=>{this._addScene(e)})),s&&t.binChunkBuffer.finalize()}_addScene(e){this.gltf.scenes||(this.gltf.scenes=[]);const t={};e.name&&(t.name=e.name),e.forEachNode((e=>{t.nodes||(t.nodes=[]),t.nodes.push(...this._addNodes(e))})),this.gltf.scenes.push(t)}_addNodes(e){this.gltf.nodes||(this.gltf.nodes=[]);const t={};e.name&&(t.name=e.name);const s=e.translation;(0,S.e)(s,C.uY)||(t.translation=(0,C.o8)(s));const n=e.rotation;(0,l.t2)(n,O.zK)||(t.rotation=(0,O.o8)(n));const i=e.scale;(0,S.e)(i,C.Un)||(t.scale=(0,C.o8)(i));const r=this.gltf.nodes.length;if(this.gltf.nodes.push(t),e.mesh&&e.mesh.vertexAttributes.position){const s=this._createMeshes(e.mesh),n=[r];if(1===s.length)this._addMesh(t,s[0]);else for(const e of s){const t={};this._addMesh(t,e),n.push(this.gltf.nodes.length),this.gltf.nodes.push(t)}return n}return e.forEachNode((e=>{t.children||(t.children=[]),t.children.push(...this._addNodes(e))})),[r]}_addMesh(e,t){this.gltf.meshes??=[];const s=this.gltf.meshes.length;this.gltf.meshes.push(t),e.mesh=s}_createMeshes(e){const t=this.gltf.extras,s=t.output.buffer===E.GLB;let n;n=s?t.binChunkBuffer:new D(this.gltf);const i=this.options.origin,r=e.vertexSpace.clone();r.origin=[i.x,i.y,i.z??0];const _=(0,L.UR)({vertexAttributes:e.vertexAttributes,vertexSpace:e.vertexSpace,transform:this.options?.ignoreLocalTransform?null:e.transform,spatialReference:e.spatialReference},r,{targetUnit:"meters"});if(!_)return[];(function(e,t){if(e.components)for(const s of e.components)s.faces&&"smooth"===s.shading&&p(s,t)})(e,_),function({position:e,normal:t,tangent:s}){y(e,3),y(t,3),y(s,4)}(_);const{position:a,normal:A,tangent:R}=_,{uv:c,color:N}=e.vertexAttributes,u=n.addBufferView(d.pe.FLOAT,T.VEC3,o.ARRAY_BUFFER);let f,h,l,O;A&&(f=n.addBufferView(d.pe.FLOAT,T.VEC3,o.ARRAY_BUFFER)),c&&(h=n.addBufferView(d.pe.FLOAT,T.VEC2,o.ARRAY_BUFFER)),R&&(l=n.addBufferView(d.pe.FLOAT,T.VEC4,o.ARRAY_BUFFER)),N&&(O=n.addBufferView(d.pe.UNSIGNED_BYTE,T.VEC4,o.ARRAY_BUFFER)),u.startAccessor("POSITION"),f&&f.startAccessor("NORMAL"),h&&h.startAccessor("TEXCOORD_0"),l&&l.startAccessor("TANGENT"),O&&O.startAccessor("COLOR_0");const S=_.position.length/3;for(let e=0;e<S;++e)u.push(a[3*e]),u.push(a[3*e+1]),u.push(a[3*e+2]),f&&null!=A&&(f.push(A[3*e]),f.push(A[3*e+1]),f.push(A[3*e+2])),h&&null!=c&&(h.push(c[2*e]),h.push(c[2*e+1])),l&&null!=R&&(l.push(R[4*e]),l.push(R[4*e+1]),l.push(R[4*e+2]),l.push(R[4*e+3])),O&&null!=N&&(O.push(N[4*e]),O.push(N[4*e+1]),O.push(N[4*e+2]),O.push(N[4*e+3]));const C=u.endAccessor(),I=this._addAccessor(u.index,C);let M,U,m,G,B;if(f){const e=f.endAccessor();M=this._addAccessor(f.index,e)}if(h){const e=h.endAccessor();U=this._addAccessor(h.index,e)}if(l){const e=l.endAccessor();m=this._addAccessor(l.index,e)}if(O){const e=O.endAccessor();G=this._addAccessor(O.index,e)}const P=[];return e.components&&e.components.length>0&&e.components[0].faces?(B=n.addBufferView(d.pe.UNSIGNED_INT,T.SCALAR,o.ELEMENT_ARRAY_BUFFER),this._addMeshVertexIndexed(B,e.components,P,I,M,U,m,G)):this._addMeshVertexNonIndexed(e.components,P,I,M,U,m,G),u.finalize(),f&&f.finalize(),h&&h.finalize(),l&&l.finalize(),B&&B.finalize(),O&&O.finalize(),s||n.finalize(),P}_addMaterial(e){if(null===e)return;const t=this._materialMap.indexOf(e);if(-1!==t)return t;this.gltf.materials||(this.gltf.materials=[]);const s={};switch(e.alphaMode){case"mask":s.alphaMode=R.MASK;break;case"auto":case"blend":s.alphaMode=R.BLEND}s.alphaCutoff=e.alphaCutoff,e.doubleSided&&(s.doubleSided=e.doubleSided),s.pbrMetallicRoughness={};const n=e=>e**2.1,i=e=>{const t=e.toRgba();return t[0]=n(t[0]/255),t[1]=n(t[1]/255),t[2]=n(t[2]/255),t};if(null!=e.color&&(s.pbrMetallicRoughness.baseColorFactor=i(e.color)),null!=e.colorTexture&&(s.pbrMetallicRoughness.baseColorTexture=this._createTextureInfo(e.colorTexture,e.colorTextureTransform)),null!=e.normalTexture&&(s.normalTexture=this._createTextureInfo(e.normalTexture,e.normalTextureTransform)),e instanceof I.A){if(null!=e.emissiveTexture&&(s.emissiveTexture=this._createTextureInfo(e.emissiveTexture,e.emissiveTextureTransform)),null!=e.emissiveColor){const t=i(e.emissiveColor);s.emissiveFactor=[t[0],t[1],t[2]]}null!=e.occlusionTexture&&(s.occlusionTexture=this._createTextureInfo(e.occlusionTexture,e.occlusionTextureTransform)),null!=e.metallicRoughnessTexture&&(s.pbrMetallicRoughness.metallicRoughnessTexture=this._createTextureInfo(e.metallicRoughnessTexture,e.metallicRoughnessTextureTransform)),s.pbrMetallicRoughness.metallicFactor=e.metallic,s.pbrMetallicRoughness.roughnessFactor=e.roughness}else s.pbrMetallicRoughness.metallicFactor=1,s.pbrMetallicRoughness.roughnessFactor=1,H().warnOnce("Meshes exported to GLTF without MeshMaterialMetallicRoughness material will appear different when imported back.");const r=this.gltf.materials.length;return this.gltf.materials.push(s),this._materialMap.push(e),r}_createTextureInfo(e,t){const s={index:this._addTexture(e)};return t?(s.extensions||(s.extensions={}),s.extensions.KHR_texture_transform={scale:t.scale,offset:t.offset,rotation:(0,h.kU)(t.rotation)},s):s}_addTexture(e){const t=this.gltf.textures??[];return this.gltf.textures=t,(0,f.tE)(this._textureMap,e,(()=>{const s={sampler:this._addSampler(e),source:this._addImage(e)},n=t.length;return t.push(s),n}))}_addImage(e){const t=this._imageMap.get(e);if(null!=t)return t;this.gltf.images||(this.gltf.images=[]);const s={};if(e.url)s.uri=e.url;else{const t=e.data;s.extras=t;for(let e=0;e<this.gltf.images.length;++e)if(t===this.gltf.images[e].extras)return e;const n=this.gltf.extras;switch(n.output.image){case a.GLB:{const e=n.binChunkBuffer.addBufferView(d.pe.UNSIGNED_BYTE,T.SCALAR);if((0,b.x3)(t))null!=t.data&&e.writeOutToBuffer(t.data,0);else{const i=F(t,this.options.signal).then((({data:e,type:t})=>(s.mimeType=t,e)));n.promises.push(e.writeAsync(i).then((()=>{e.finalize()})))}s.bufferView=e.index;break}case a.DataURI:if((0,b.x3)(t)){H().warnOnce("Image export for basis compressed textures not available.");break}s.uri=function(e){const t=w(e);return null!=t?t.toDataURL():""}(t);break;default:if((0,b.x3)(t)){H().warnOnce("Image export for basis compressed textures not available.");break}n.promises.push(F(t,this.options.signal).then((({data:e,type:t})=>{s.uri=e,s.mimeType=t})))}}const n=this.gltf.images.length;return this.gltf.images.push(s),this._imageMap.set(e,n),n}_addSampler(e){this.gltf.samplers||(this.gltf.samplers=[]);let t=d.pF.REPEAT,s=d.pF.REPEAT;if("string"==typeof e.wrap)switch(e.wrap){case"clamp":t=d.pF.CLAMP_TO_EDGE,s=d.pF.CLAMP_TO_EDGE;break;case"mirror":t=d.pF.MIRRORED_REPEAT,s=d.pF.MIRRORED_REPEAT}else{switch(e.wrap.vertical){case"clamp":s=d.pF.CLAMP_TO_EDGE;break;case"mirror":s=d.pF.MIRRORED_REPEAT}switch(e.wrap.horizontal){case"clamp":t=d.pF.CLAMP_TO_EDGE;break;case"mirror":t=d.pF.MIRRORED_REPEAT}}const n={wrapS:t,wrapT:s};for(let e=0;e<this.gltf.samplers.length;++e)if(JSON.stringify(n)===JSON.stringify(this.gltf.samplers[e]))return e;const i=this.gltf.samplers.length;return this.gltf.samplers.push(n),i}_addAccessor(e,t){this.gltf.accessors||(this.gltf.accessors=[]);const s={bufferView:e,byteOffset:t.byteOffset,componentType:t.componentType,count:t.count,type:t.type,min:t.min,max:t.max,name:t.name};t.normalized&&(s.normalized=!0);const n=this.gltf.accessors.length;return this.gltf.accessors.push(s),n}_addMeshVertexIndexed(e,t,s,n,i,r,_,E){const a=new Map;for(const o of t){e.startAccessor("INDICES");for(let t=0;t<o.faces.length;++t)e.push(o.faces[t]);const t=e.endAccessor(),T={attributes:{POSITION:n},indices:this._addAccessor(e.index,t),material:this._addMaterial(o.material)};i&&"flat"!==o.shading&&(T.attributes.NORMAL=i),r&&(T.attributes.TEXCOORD_0=r),_&&"flat"!==o.shading&&(T.attributes.TANGENT=_),E&&(T.attributes.COLOR_0=E);const A=a.get(o.name);if(A)A.primitives.push(T);else{const e={name:o.name,primitives:[T]};a.set(o.name,e),s.push(e)}}}_addMeshVertexNonIndexed(e,t,s,n,i,r,_){const E={primitives:[]};t.push(E);const a={attributes:{POSITION:s}};n&&(a.attributes.NORMAL=n),i&&(a.attributes.TEXCOORD_0=i),r&&(a.attributes.TANGENT=r),_&&(a.attributes.COLOR_0=_),e&&(a.material=this._addMaterial(e[0].material)),E.primitives.push(a)}}function y(e,t){if(null!=e)for(let s=1,n=2;s<e.length;s+=t,n+=t){const t=e[s],i=e[n];e[s]=i,e[n]=-t}}var V=s(4576);class Y{constructor(){this.copyright="",this.defaultScene=0,this.generator="",this._scenes=[]}addScene(e){if(this._scenes.includes(e))throw new Error("Scene already added");this._scenes.push(e)}removeScene(e){(0,V.TF)(this._scenes,e)}forEachScene(e){this._scenes.forEach(e)}}class v{constructor(e){this.mesh=e,this.name="",this.translation=(0,C.vt)(),this.rotation=(0,O.vt)(),this.scale=(0,C.o8)(C.Un),this._nodes=[]}addNode(e){if(this._nodes.includes(e))throw new Error("Node already added");this._nodes.push(e)}forEachNode(e){this._nodes.forEach(e)}set rotationAngles(e){(0,l.A6)(this.rotation,e[0],e[1],e[2])}}const z="model.gltf",X="model.glb";async function k(e,t){const s=new x(e,t).gltf,n=s.extras.promises;let _=1,o=1,T=null;await Promise.allSettled(n),(0,i.Te)(t.signal);const A=t.jsonSpacing??4,R=new Map,c=JSON.stringify(s,((e,s)=>{if("extras"!==e){if(s instanceof ArrayBuffer){if(function(e){if(e.byteLength<8)return!1;const t=new Uint8Array(e);return 137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]&&13===t[4]&&10===t[5]&&26===t[6]&&10===t[7]}(s))switch(t.output?.image){case a.DataURI:case a.GLB:break;case a.External:default:{const e=`img${o}.png`;return o++,R.set(e,s),e}}switch(t.output?.buffer){case E.DataURI:return function(e){const t=[],s=new Uint8Array(e);for(let e=0;e<s.length;e++)t.push(String.fromCharCode(s[e]));return"data:application/octet-stream;base64,"+btoa(t.join(""))}(s);case E.GLB:if(T)throw new Error("Already encountered an ArrayBuffer, there should only be one in the GLB format.");return void(T=s);case E.External:default:{const e=`data${_}.bin`;return _++,R.set(e,s),e}}}return s}}),A);return t.output?.buffer===E.GLB||t.output?.image===a.GLB?R.set(X,new r(c,T).buffer):R.set(z,c),R}class W{constructor(){this.name="",this._nodes=[]}addNode(e){if(this._nodes.includes(e))throw new Error("Node already added");this._nodes.push(e)}forEachNode(e){this._nodes.forEach(e)}}async function K(e,t){const s=new Y,n=new W;return s.addScene(n),n.addNode(new v(e)),await async function(e,t){const s=(await k(e,{output:{buffer:E.GLB,image:a.GLB},jsonSpacing:0,...t})).get(X);if(!(s&&s instanceof ArrayBuffer))throw new Error("failed to export to glb");return s}(s,{origin:e.origin,...t})}},51530:(e,t,s)=>{s.d(t,{KB:()=>E,Xi:()=>r,pn:()=>a,x3:()=>_});var n=s(44208),i=s(89192);class r{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding=i.JS.KTX2_ENCODING}}function _(e){return"encoded-mesh-texture"===e?.type}async function E(e){const t=new Blob([e]),s=await t.text();return JSON.parse(s)}async function a(e,t){if(t===i.JS.KTX2_ENCODING)return new r(e);const s=new Blob([e],{type:t}),_=URL.createObjectURL(s),E=new Image;if((0,n.A)("esri-iPhone"))return new Promise(((e,t)=>{const s=()=>{i(),e(E)},n=e=>{i(),t(e)},i=()=>{URL.revokeObjectURL(_),E.removeEventListener("load",s),E.removeEventListener("error",n)};E.addEventListener("load",s),E.addEventListener("error",n),E.src=_}));try{E.src=_,await E.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(_),E}},89192:(e,t,s)=>{var n,i,r,_,E,a,o,T,A;s.d(t,{Am:()=>_,C7:()=>r,ID:()=>T,JS:()=>A,Mg:()=>a,dd:()=>E,it:()=>i,s2:()=>n,sf:()=>o}),function(e){e[e.None=0]="None",e[e.Front=1]="Front",e[e.Back=2]="Back",e[e.COUNT=3]="COUNT"}(n||(n={})),function(e){e[e.Less=0]="Less",e[e.Lequal=1]="Lequal",e[e.COUNT=2]="COUNT"}(i||(i={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.UPDATE=1]="UPDATE"}(r||(r={})),function(e){e[e.NOT_LOADED=0]="NOT_LOADED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED"}(_||(_={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(E||(E={})),function(e){e[e.Highlight=0]="Highlight",e[e.MaskOccludee=1]="MaskOccludee",e[e.COUNT=2]="COUNT"}(a||(a={})),function(e){e[e.Blend=0]="Blend",e[e.Opaque=1]="Opaque",e[e.Mask=2]="Mask",e[e.MaskBlend=3]="MaskBlend",e[e.COUNT=4]="COUNT"}(o||(o={})),function(e){e[e.OFF=0]="OFF",e[e.ON=1]="ON"}(T||(T={})),function(e){e.DDS_ENCODING="image/vnd-ms.dds",e.KTX2_ENCODING="image/ktx2",e.BASIS_ENCODING="image/x.basis"}(A||(A={}))},63907:(e,t,s)=>{var n,i,r,_,E,a,o,T,A,R,c,N,u,f,h,l,O,S,C,I,L,d,M;s.d(t,{Ab:()=>f,Ac:()=>o,Ap:()=>u,CQ:()=>p,Cj:()=>c,Co:()=>C,H0:()=>h,Hr:()=>M,MT:()=>A,NV:()=>n,NZ:()=>E,Nm:()=>d,R:()=>I,Tb:()=>_,WR:()=>i,Y7:()=>a,_U:()=>S,dn:()=>r,eA:()=>R,ld:()=>l,nI:()=>D,pF:()=>N,pe:()=>T,vt:()=>L,yQ:()=>O}),function(e){e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL",e[e.COLOR=16384]="COLOR"}(n||(n={})),function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(i||(i={})),function(e){e[e.ZERO=0]="ZERO",e[e.ONE=1]="ONE",e[e.SRC_COLOR=768]="SRC_COLOR",e[e.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",e[e.SRC_ALPHA=770]="SRC_ALPHA",e[e.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",e[e.DST_ALPHA=772]="DST_ALPHA",e[e.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",e[e.DST_COLOR=774]="DST_COLOR",e[e.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",e[e.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",e[e.CONSTANT_COLOR=32769]="CONSTANT_COLOR",e[e.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",e[e.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",e[e.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA"}(r||(r={})),function(e){e[e.ADD=32774]="ADD",e[e.MIN=32775]="MIN",e[e.MAX=32776]="MAX",e[e.SUBTRACT=32778]="SUBTRACT",e[e.REVERSE_SUBTRACT=32779]="REVERSE_SUBTRACT"}(_||(_={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e[e.PIXEL_PACK_BUFFER=35051]="PIXEL_PACK_BUFFER",e[e.PIXEL_UNPACK_BUFFER=35052]="PIXEL_UNPACK_BUFFER",e[e.COPY_READ_BUFFER=36662]="COPY_READ_BUFFER",e[e.COPY_WRITE_BUFFER=36663]="COPY_WRITE_BUFFER",e[e.TRANSFORM_FEEDBACK_BUFFER=35982]="TRANSFORM_FEEDBACK_BUFFER"}(E||(E={})),function(e){e[e.FRONT=1028]="FRONT",e[e.BACK=1029]="BACK",e[e.FRONT_AND_BACK=1032]="FRONT_AND_BACK"}(a||(a={})),function(e){e[e.CW=2304]="CW",e[e.CCW=2305]="CCW"}(o||(o={})),function(e){e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.INT=5124]="INT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.FLOAT=5126]="FLOAT",e[e.HALF_FLOAT=5131]="HALF_FLOAT"}(T||(T={})),function(e){e[e.NEVER=512]="NEVER",e[e.LESS=513]="LESS",e[e.EQUAL=514]="EQUAL",e[e.LEQUAL=515]="LEQUAL",e[e.GREATER=516]="GREATER",e[e.NOTEQUAL=517]="NOTEQUAL",e[e.GEQUAL=518]="GEQUAL",e[e.ALWAYS=519]="ALWAYS"}(A||(A={})),function(e){e[e.ZERO=0]="ZERO",e[e.KEEP=7680]="KEEP",e[e.REPLACE=7681]="REPLACE",e[e.INCR=7682]="INCR",e[e.DECR=7683]="DECR",e[e.INVERT=5386]="INVERT",e[e.INCR_WRAP=34055]="INCR_WRAP",e[e.DECR_WRAP=34056]="DECR_WRAP"}(R||(R={})),function(e){e[e.NEAREST=9728]="NEAREST",e[e.LINEAR=9729]="LINEAR",e[e.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",e[e.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",e[e.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",e[e.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR"}(c||(c={})),function(e){e[e.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(N||(N={})),function(e){e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_3D=32879]="TEXTURE_3D",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY"}(u||(u={})),function(e){e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",e[e.ALPHA=6406]="ALPHA",e[e.RGB=6407]="RGB",e[e.RGBA=6408]="RGBA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.RED=6403]="RED",e[e.RG=33319]="RG",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER"}(f||(f={})),function(e){e[e.RGBA4=32854]="RGBA4",e[e.R16F=33325]="R16F",e[e.RG16F=33327]="RG16F",e[e.RGB32F=34837]="RGB32F",e[e.RGBA16F=34842]="RGBA16F",e[e.R32F=33326]="R32F",e[e.RG32F=33328]="RG32F",e[e.RGBA32F=34836]="RGBA32F",e[e.R11F_G11F_B10F=35898]="R11F_G11F_B10F",e[e.RGB8=32849]="RGB8",e[e.RGBA8=32856]="RGBA8",e[e.RGB5_A1=32855]="RGB5_A1",e[e.R8=33321]="R8",e[e.RG8=33323]="RG8",e[e.R8I=33329]="R8I",e[e.R8UI=33330]="R8UI",e[e.R16I=33331]="R16I",e[e.R16UI=33332]="R16UI",e[e.R32I=33333]="R32I",e[e.R32UI=33334]="R32UI",e[e.RG8I=33335]="RG8I",e[e.RG8UI=33336]="RG8UI",e[e.RG16I=33337]="RG16I",e[e.RG16UI=33338]="RG16UI",e[e.RG32I=33339]="RG32I",e[e.RG32UI=33340]="RG32UI",e[e.RGB16F=34843]="RGB16F",e[e.RGB9_E5=35901]="RGB9_E5",e[e.SRGB8=35905]="SRGB8",e[e.SRGB8_ALPHA8=35907]="SRGB8_ALPHA8",e[e.RGB565=36194]="RGB565",e[e.RGBA32UI=36208]="RGBA32UI",e[e.RGB32UI=36209]="RGB32UI",e[e.RGBA16UI=36214]="RGBA16UI",e[e.RGB16UI=36215]="RGB16UI",e[e.RGBA8UI=36220]="RGBA8UI",e[e.RGB8UI=36221]="RGB8UI",e[e.RGBA32I=36226]="RGBA32I",e[e.RGB32I=36227]="RGB32I",e[e.RGBA16I=36232]="RGBA16I",e[e.RGB16I=36233]="RGB16I",e[e.RGBA8I=36238]="RGBA8I",e[e.RGB8I=36239]="RGB8I",e[e.R8_SNORM=36756]="R8_SNORM",e[e.RG8_SNORM=36757]="RG8_SNORM",e[e.RGB8_SNORM=36758]="RGB8_SNORM",e[e.RGBA8_SNORM=36759]="RGBA8_SNORM",e[e.RGB10_A2=32857]="RGB10_A2",e[e.RGB10_A2UI=36975]="RGB10_A2UI"}(h||(h={})),function(e){e[e.FLOAT=5126]="FLOAT",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.INT=5124]="INT",e[e.HALF_FLOAT=5131]="HALF_FLOAT",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV"}(l||(l={})),function(e){e[e.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",e[e.STENCIL_INDEX8=36168]="STENCIL_INDEX8",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.DEPTH_COMPONENT24=33190]="DEPTH_COMPONENT24",e[e.DEPTH_COMPONENT32F=36012]="DEPTH_COMPONENT32F",e[e.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",e[e.DEPTH32F_STENCIL8=36013]="DEPTH32F_STENCIL8"}(O||(O={})),function(e){e[e.STATIC_DRAW=35044]="STATIC_DRAW",e[e.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",e[e.STREAM_DRAW=35040]="STREAM_DRAW",e[e.STATIC_READ=35045]="STATIC_READ",e[e.DYNAMIC_READ=35049]="DYNAMIC_READ",e[e.STREAM_READ=35041]="STREAM_READ",e[e.STATIC_COPY=35046]="STATIC_COPY",e[e.DYNAMIC_COPY=35050]="DYNAMIC_COPY",e[e.STREAM_COPY=35042]="STREAM_COPY"}(S||(S={})),function(e){e[e.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",e[e.VERTEX_SHADER=35633]="VERTEX_SHADER"}(C||(C={})),function(e){e[e.FRAMEBUFFER=36160]="FRAMEBUFFER",e[e.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER",e[e.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER"}(I||(I={})),function(e){e[e.Texture=0]="Texture",e[e.BufferObject=1]="BufferObject",e[e.VertexArrayObject=2]="VertexArrayObject",e[e.Shader=3]="Shader",e[e.Program=4]="Program",e[e.FramebufferObject=5]="FramebufferObject",e[e.Renderbuffer=6]="Renderbuffer",e[e.TransformFeedback=7]="TransformFeedback",e[e.Sync=8]="Sync",e[e.UNCOUNTED=9]="UNCOUNTED",e[e.LinesOfCode=9]="LinesOfCode",e[e.Uniform=10]="Uniform",e[e.COUNT=11]="COUNT"}(L||(L={})),function(e){e[e.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",e[e.COLOR_ATTACHMENT1=36065]="COLOR_ATTACHMENT1",e[e.COLOR_ATTACHMENT2=36066]="COLOR_ATTACHMENT2",e[e.COLOR_ATTACHMENT3=36067]="COLOR_ATTACHMENT3",e[e.COLOR_ATTACHMENT4=36068]="COLOR_ATTACHMENT4",e[e.COLOR_ATTACHMENT5=36069]="COLOR_ATTACHMENT5",e[e.COLOR_ATTACHMENT6=36070]="COLOR_ATTACHMENT6",e[e.COLOR_ATTACHMENT7=36071]="COLOR_ATTACHMENT7",e[e.COLOR_ATTACHMENT8=36072]="COLOR_ATTACHMENT8",e[e.COLOR_ATTACHMENT9=36073]="COLOR_ATTACHMENT9",e[e.COLOR_ATTACHMENT10=36074]="COLOR_ATTACHMENT10",e[e.COLOR_ATTACHMENT11=36075]="COLOR_ATTACHMENT11",e[e.COLOR_ATTACHMENT12=36076]="COLOR_ATTACHMENT12",e[e.COLOR_ATTACHMENT13=36077]="COLOR_ATTACHMENT13",e[e.COLOR_ATTACHMENT14=36078]="COLOR_ATTACHMENT14",e[e.COLOR_ATTACHMENT15=36079]="COLOR_ATTACHMENT15"}(d||(d={})),function(e){e[e.NONE=0]="NONE",e[e.BACK=1029]="BACK"}(M||(M={}));const D=33306;var p,U,m,G,B,P,g;!function(e){e[e.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",e[e.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",e[e.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",e[e.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",e[e.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",e[e.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",e[e.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",e[e.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",e[e.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"}(p||(p={})),function(e){e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_VEC2=35664]="FLOAT_VEC2",e[e.FLOAT_VEC3=35665]="FLOAT_VEC3",e[e.FLOAT_VEC4=35666]="FLOAT_VEC4",e[e.INT=5124]="INT",e[e.INT_VEC2=35667]="INT_VEC2",e[e.INT_VEC3=35668]="INT_VEC3",e[e.INT_VEC4=35669]="INT_VEC4",e[e.BOOL=35670]="BOOL",e[e.BOOL_VEC2=35671]="BOOL_VEC2",e[e.BOOL_VEC3=35672]="BOOL_VEC3",e[e.BOOL_VEC4=35673]="BOOL_VEC4",e[e.FLOAT_MAT2=35674]="FLOAT_MAT2",e[e.FLOAT_MAT3=35675]="FLOAT_MAT3",e[e.FLOAT_MAT4=35676]="FLOAT_MAT4",e[e.SAMPLER_2D=35678]="SAMPLER_2D",e[e.SAMPLER_CUBE=35680]="SAMPLER_CUBE",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_VEC2=36294]="UNSIGNED_INT_VEC2",e[e.UNSIGNED_INT_VEC3=36295]="UNSIGNED_INT_VEC3",e[e.UNSIGNED_INT_VEC4=36296]="UNSIGNED_INT_VEC4",e[e.FLOAT_MAT2x3=35685]="FLOAT_MAT2x3",e[e.FLOAT_MAT2x4=35686]="FLOAT_MAT2x4",e[e.FLOAT_MAT3x2=35687]="FLOAT_MAT3x2",e[e.FLOAT_MAT3x4=35688]="FLOAT_MAT3x4",e[e.FLOAT_MAT4x2=35689]="FLOAT_MAT4x2",e[e.FLOAT_MAT4x3=35690]="FLOAT_MAT4x3",e[e.SAMPLER_3D=35679]="SAMPLER_3D",e[e.SAMPLER_2D_SHADOW=35682]="SAMPLER_2D_SHADOW",e[e.SAMPLER_2D_ARRAY=36289]="SAMPLER_2D_ARRAY",e[e.SAMPLER_2D_ARRAY_SHADOW=36292]="SAMPLER_2D_ARRAY_SHADOW",e[e.SAMPLER_CUBE_SHADOW=36293]="SAMPLER_CUBE_SHADOW",e[e.INT_SAMPLER_2D=36298]="INT_SAMPLER_2D",e[e.INT_SAMPLER_3D=36299]="INT_SAMPLER_3D",e[e.INT_SAMPLER_CUBE=36300]="INT_SAMPLER_CUBE",e[e.INT_SAMPLER_2D_ARRAY=36303]="INT_SAMPLER_2D_ARRAY",e[e.UNSIGNED_INT_SAMPLER_2D=36306]="UNSIGNED_INT_SAMPLER_2D",e[e.UNSIGNED_INT_SAMPLER_3D=36307]="UNSIGNED_INT_SAMPLER_3D",e[e.UNSIGNED_INT_SAMPLER_CUBE=36308]="UNSIGNED_INT_SAMPLER_CUBE",e[e.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311]="UNSIGNED_INT_SAMPLER_2D_ARRAY"}(U||(U={})),function(e){e[e.OBJECT_TYPE=37138]="OBJECT_TYPE",e[e.SYNC_CONDITION=37139]="SYNC_CONDITION",e[e.SYNC_STATUS=37140]="SYNC_STATUS",e[e.SYNC_FLAGS=37141]="SYNC_FLAGS"}(m||(m={})),function(e){e[e.UNSIGNALED=37144]="UNSIGNALED",e[e.SIGNALED=37145]="SIGNALED"}(G||(G={})),function(e){e[e.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED",e[e.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED",e[e.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED",e[e.WAIT_FAILED=37149]="WAIT_FAILED"}(B||(B={})),function(e){e[e.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE"}(P||(P={})),function(e){e[e.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT"}(g||(g={}))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2177],{69540:(e,t,n)=>{n.d(t,{O:()=>c,P:()=>u});var r=n(90237),a=n(69622),i=(n(44208),n(4718)),o=(n(53966),n(97768)),s=n(35666),l=n(88620),d=n(40608);const c=e=>{let t=class extends e{clone(){const e=(0,l.oY)(this);(0,o.Lw)(e,"unable to clone instance of non-accessor class");const t=e.metadata,n=e.store,r={},a=new Map;for(const e in t){const o=t[e],l=n?.originOf(e),d=o.clonable;if(o.readOnly||!1===d||l!==s.Gr.USER&&l!==s.Gr.DEFAULTS&&l!==s.Gr.WEB_MAP&&l!==s.Gr.WEB_SCENE)continue;const c=this[e];let u=null;u="function"==typeof d?d(c):"reference"===d?c:(0,i.TU)(c),null!=c&&null==u||(l===s.Gr.DEFAULTS?a.set(e,u):r[e]=u)}const d=new(0,Object.getPrototypeOf(this).constructor)(r);if(a.size){const e=(0,l.oY)(d)?.store;if(e)for(const[t,n]of a)e.set(t,n,s.Gr.DEFAULTS)}return d}};return t=(0,r._)([(0,d.$)("esri.core.Clonable")],t),t};let u=class extends(c(a.A)){};u=(0,r._)([(0,d.$)("esri.core.Clonable")],u)},95488:(e,t,n)=>{n.d(t,{I:()=>a});var r=n(11406);class a extends r.T{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},60999:(e,t,n)=>{n.d(t,{DZ:()=>p,Ke:()=>m,Tj:()=>c,UT:()=>g,jJ:()=>d});var r=n(90237),a=n(69622),i=n(97768),o=n(74887),s=n(10107),l=n(40608);function d(e,t,n){return(0,o.Lx)(e.map(((e,r)=>t.apply(n,[e,r]))))}async function c(e,t,n){return(await(0,o.Lx)(e.map(((e,r)=>t.apply(n,[e,r]))))).map((e=>e.value))}function u(e){return{ok:!0,value:e}}function h(e){return{ok:!1,error:e}}async function m(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return u(await e)}catch(e){return h(e)}}async function p(e){try{return u(await e)}catch(e){return(0,o.QP)(e),h(e)}}function g(e,t){return new y(e,t)}let y=class extends a.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,i.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:n}=this._abortController;this.promise=e(n),this.promise.then((e=>{this._result=u(e),this._cleanup()}),(e=>{this._result=h(e),this._cleanup()})),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,i.xt)(this._abortHandle),this._abortController=null}};(0,r._)([(0,s.MZ)()],y.prototype,"value",null),(0,r._)([(0,s.MZ)()],y.prototype,"error",null),(0,r._)([(0,s.MZ)()],y.prototype,"finished",null),(0,r._)([(0,s.MZ)()],y.prototype,"promise",void 0),(0,r._)([(0,s.MZ)()],y.prototype,"_result",void 0),y=(0,r._)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],y)},88930:(e,t,n)=>{n.d(t,{S1:()=>s,lL:()=>d,mi:()=>l,t:()=>c,vf:()=>o});var r=n(97770),a=n(56400),i=n(96285);const o={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8};function s(e,t,n,o=a.qU){const s=new i.oh((0,r.wj)(o)),l=i.c9.fromJSDate(e,{zone:s}),d="decades"===n||"centuries"===n?"year":u(n);return"decades"===n&&(t*=10),"centuries"===n&&(t*=100),l.plus({[d]:t}).toJSDate()}function l(e,t,n="milliseconds"){const r=e.getTime(),a=c(t,n,"milliseconds");return new Date(r+a)}function d(e,t,n=a.qU){const o=new i.oh((0,r.wj)(n)),s=i.c9.fromJSDate(e,{zone:o});if("decades"===t||"centuries"===t){const e=s.startOf("year"),{year:n}=e,r=n-n%("decades"===t?10:100);return e.set({year:r}).toJSDate()}const l=u(t);return s.startOf(l).toJSDate()}function c(e,t,n){return 0===e?0:e*o[t]/o[n]}function u(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}},59456:(e,t,n)=>{n.d(t,{yR:()=>c});var r=n(56507),a=n(5443),i=n(91075),o=n(48526),s=n(86738),l=n(39829),d=n(82799);n(16930),n(50498),n(65864);const c={base:i.A,key:"type",typeMap:{extent:a.A,multipoint:o.A,point:s.A,polyline:d.A,polygon:l.A}};(0,r.aq)(c)},65806:(e,t,n)=>{n.d(t,{g:()=>o});var r=n(51850),a=n(57251),i=n(9762);function o(e,t,n,r){if((0,a.canProjectWithoutEngine)(e.spatialReference,n)){s[0]=e.x,s[1]=e.y;const a=e.z;return s[2]=a??r??0,(0,i.projectBuffer)(s,e.spatialReference,0,t,n,0,1)}const o=(0,a.tryProjectWithZConversion)(e,n);return!!o&&(t[0]=o?.x,t[1]=o?.y,t[2]=o?.z??r??0,!0)}const s=(0,r.vt)()},27993:(e,t,n)=>{n.d(t,{F:()=>i}),n(57251);var r=n(16930),a=n(65806);function i(e,t,n,r,i){return!(null==t||null==r||e.length<2)&&(o.x=e[0],o.y=e[1],o.z=e[2],o.spatialReference=t,(0,a.g)(o,n,r,i))}const o=function(e,t,n,r){return{x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:r,type:"point"}}(0,0,0,r.A.WGS84)},65864:(e,t,n)=>{n.d(t,{$B:()=>g,Bi:()=>m,Rg:()=>h,U9:()=>c,ZC:()=>d,fT:()=>u,rS:()=>p,xD:()=>T});var r=n(5443),a=n(91075),i=n(48526),o=n(86738),s=n(39829),l=n(82799);function d(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function c(e){return void 0!==e.points}function u(e){return void 0!==e.x&&void 0!==e.y}function h(e){return void 0!==e.paths}function m(e){return void 0!==e.rings}function p(e){return null==e?null:e instanceof a.A?e:u(e)?o.A.fromJSON(e):h(e)?l.A.fromJSON(e):m(e)?s.A.fromJSON(e):c(e)?i.A.fromJSON(e):d(e)?r.A.fromJSON(e):null}function g(e){return e?u(e)?"esriGeometryPoint":h(e)?"esriGeometryPolyline":m(e)?"esriGeometryPolygon":d(e)?"esriGeometryEnvelope":c(e)?"esriGeometryMultipoint":null:null}const y={esriGeometryPoint:o.A,esriGeometryPolyline:l.A,esriGeometryPolygon:s.A,esriGeometryEnvelope:r.A,esriGeometryMultipoint:i.A};function T(e){return e&&y[e]||null}},62577:(e,t,n)=>{function r(e){return e?{originPosition:"upper-left"===e.originPosition?"upperLeft":"lower-left"===e.originPosition?"lowerLeft":e.originPosition,scale:e.tolerance?[e.tolerance,e.tolerance,1,1]:[1,1,1,1],translate:null!=e.extent?[e.extent.xmin,e.extent.ymax,e.extent.zmin??0,e.extent.mmin??0]:[0,0,0,0]}:null}function a(e){if(function(e){return"lowerLeft"===e.originPosition&&4===e.scale.length&&4===e.translate.length}(e))return e;const{originPosition:t,scale:n,translate:r}=e,a=n[0]??1,i=n[1]??1;return{originPosition:"lowerLeft",scale:[a,"lowerLeft"===t?i:-i,n[2]??1,n[3]??1],translate:[r[0]??0,r[1]??0,r[2]??0,r[3]??0]}}function i({scale:e,translate:t},n){return n*e[0]+t[0]}function o({scale:e,translate:t},n){return n*e[1]+t[1]}function s({scale:e,translate:t},n){return(n??0)*e[2]+t[2]}function l({scale:e,translate:t},n){return n?n*e[3]+t[3]:0}function d(e,t){return e&&t?m:e&&!t?u:!e&&t?h:c}n.d(t,{$X:()=>f,Gy:()=>g,P5:()=>S,Q1:()=>a,SW:()=>y,Tr:()=>T,VV:()=>r}),n(65864);const c=(e,t)=>{const n=new Array(t.length);if(!t.length)return n;const r=t[0];let a=i(e,r[0]),s=o(e,r[1]);n[0]=[a,s];const{scale:l,originPosition:d}=e,c=l[0],u="lowerLeft"===d?l[1]:-l[1];for(let e=1;e<t.length;e++){const[r,i]=t[e];a+=c*r,s+=u*i,n[e]=[a,s]}return n},u=(e,t)=>{const n=new Array(t.length);if(!t.length)return n;const r=t[0];let a=i(e,r[0]),l=o(e,r[1]);n[0]=[a,l,s(e,r[2])];const{scale:d,originPosition:c}=e,u=d[0],h="lowerLeft"===c?d[1]:-d[1];for(let r=1;r<t.length;r++){const[i,o,d]=t[r];a+=u*i,l+=h*o,n[r]=[a,l,s(e,d)]}return n},h=(e,t)=>{const n=new Array(t.length);if(!t.length)return n;const r=t[0];let a=i(e,r[0]),s=o(e,r[1]);n[0]=[a,s,l(e,r[2])];const{scale:d,originPosition:c}=e,u=d[0],h="lowerLeft"===c?d[1]:-d[1];for(let r=1;r<t.length;r++){const[i,o,d]=t[r];a+=u*i,s+=h*o,n[r]=[a,s,l(e,d)]}return n},m=(e,t)=>{const n=new Array(t.length);if(!t.length)return n;const r=t[0];let a=i(e,r[0]),d=o(e,r[1]);n[0]=[a,d,s(e,r[2]),l(e,r[3])];const{scale:c,originPosition:u}=e,h=c[0],m="lowerLeft"===u?c[1]:-c[1];for(let r=1;r<t.length;r++){const[i,o,c,u]=t[r];a+=h*i,d+=m*o,n[r]=[a,d,s(e,c),l(e,u)]}return n};function p(e,t,n){const r=new Array(n.length);for(let a=0;a<n.length;a++)r[a]=t(e,n[a]);return r}function g(e,t,n){const r=a(e);return t.x=function({scale:e,translate:t},n){return Math.round((n-t[0])/e[0])}(r,n.x),t.y=function({scale:e,translate:t},n){return Math.round((n-t[1])/e[1])}(r,n.y),null!=n.z&&(t.z=function({scale:e,translate:t},n){return Math.round(((n??0)-t[2])/e[2])}(r,n.z)),null!=n.m&&(t.m=function({scale:e,translate:t},n){return n?Math.round((n-t[3])/e[3]):0}(r,n.m)),t}function y(e,t,n,r=n?.hasZ??!1,i=n?.hasM??!1){if(null!=n){const o=a(e);t.points=d(r,i)(o,n.points),t.hasZ=r,t.hasM=i}return t}function T(e,t,n,r=null!=n?.z,d=null!=n?.m){if(null==n)return t;const c=a(e);return t.x=i(c,n.x),t.y=o(c,n.y),r&&(t.z=s(c,n.z)),d&&(t.m=l(c,n.m)),t}function f(e,t,n,r=n?.hasZ??!1,i=n?.hasM??!1){if(null!=n){const o=a(e);t.rings=p(o,d(r,i),n.rings),t.hasZ=r,t.hasM=i}return t}function S(e,t,n,r=n?.hasZ??!1,i=n?.hasM??!1){if(null!=n){const o=a(e);t.paths=p(o,d(r,i),n.paths),t.hasZ=r,t.hasM=i}return t}},50498:(e,t,n)=>{n.d(t,{Y:()=>i,g:()=>a});var r=n(66552);const a=(0,r.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),i=(0,r.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"})},97770:(e,t,n)=>{n.d(t,{J2:()=>A,Yq:()=>w,_v:()=>y,wj:()=>M});var r=n(66552),a=n(73444),i=n(56400);n(96285),i.n$;const o={year:"numeric",month:"numeric",day:"numeric"},s={year:"numeric",month:"long",day:"numeric"},l={year:"numeric",month:"short",day:"numeric"},d={year:"numeric",month:"long",weekday:"long",day:"numeric"},c={hour:"numeric",minute:"numeric"},u={...c,second:"numeric"},h={hourCycle:"h23"},m={...c,...h},p={...u,...h},g={"short-date":o,"short-date-short-time":{...o,...c},"short-date-short-time-24":{...o,...m},"short-date-long-time":{...o,...u},"short-date-long-time-24":{...o,...p},"short-date-le":o,"short-date-le-short-time":{...o,...c},"short-date-le-short-time-24":{...o,...m},"short-date-le-long-time":{...o,...u},"short-date-le-long-time-24":{...o,...p},"long-month-day-year":s,"long-month-day-year-short-time":{...s,...c},"long-month-day-year-short-time-24":{...s,...m},"long-month-day-year-long-time":{...s,...u},"long-month-day-year-long-time-24":{...s,...p},"day-short-month-year":l,"day-short-month-year-short-time":{...l,...c},"day-short-month-year-short-time-24":{...l,...m},"day-short-month-year-long-time":{...l,...u},"day-short-month-year-long-time-24":{...l,...p},"long-date":d,"long-date-short-time":{...d,...c},"long-date-short-time-24":{...d,...m},"long-date-long-time":{...d,...u},"long-date-long-time-24":{...d,...p},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":c,"long-time":u},y=(0,r.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),T={ar:"ar-u-nu-latn-ca-gregory"};let f=new WeakMap;const S=g["short-date-short-time"];function A(e){return g[e]}function w(e,t=S){return function(e){let t=f.get(e);if(!t){const n=(0,a.JK)(),r=T[n]||n,o=M(e.timeZone??i.qU),s={...e,timeZone:o};t=new Intl.DateTimeFormat(r,s),f.set(e,t)}return t}(t).format(e)}function M(e){switch(e){case i.qU:return i.N5;case i.L5:return i.n$;default:return e}}(0,a.Ml)((()=>{f=new WeakMap}))},73444:(e,t,n)=>{n.d(t,{JK:()=>s,Ml:()=>h,Z0:()=>l,oQ:()=>c});var r=n(36563);let a;const i=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;function o(){return i??globalThis.navigator?.language??"en"}function s(){return void 0===a&&(a=o()),a}function l(e=s()){const t=/^([a-zA-Z]{2,3})(?:[_-][a-zA-Z0-9]+)*$/.exec(e);return t?.[1].toLowerCase()}const d=[];function c(e){return d.push(e),(0,r.hA)((()=>d.splice(d.indexOf(e),1)))}const u=[];function h(e){return u.push(e),(0,r.hA)((()=>u.splice(u.indexOf(e),1)))}globalThis.addEventListener?.("languagechange",(function(){const e=o();a!==e&&([...u].forEach((t=>t(e))),a=e,[...d].forEach((t=>t(e))))}))},43334:(e,t,n)=>{n.d(t,{N3:()=>i,Om:()=>a});var r=n(92722);class a{constructor(e=null,t={},n,r){this.geometry=e,this.attributes=t,this.centroid=n,this.objectId=r,this.displayId=0,this.geohashX=0,this.geohashY=0}static fromJSON(e,t){const n=e.geometry?r.A.fromJSON(e.geometry):null,i=e.centroid?r.A.fromJSON(e.centroid):null,o=e.attributes[t];return new a(n,e.attributes,i,o)}weakClone(){const e=new a(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new a(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function i(e){return!!e.geometry?.coords?.length}},58512:(e,t,n)=>{n.d(t,{A:()=>r});class r{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new r;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722:(e,t,n)=>{n.d(t,{A:()=>r});class r{constructor(e=[],t=[],n=!1){this.lengths=e??[],this.coords=t??[],this.hasIndeterminateRingOrder=n}static fromJSON(e){return new r(e.lengths,e.coords,e.hasIndeterminateRingOrder)}static fromRect(e){const[t,n,a,i]=e,o=a-t,s=i-n;return new r([5],[t,n,o,0,0,s,-o,0,0,-s])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let n=0;n<this.lengths.length;n++){const r=this.lengths[n];for(let n=0;n<r;n++)e(this.coords[2*(n+t)],this.coords[2*(n+t)+1]);t+=r}}deltaDecode(){const e=this.clone(),{coords:t,lengths:n}=e;let r=0;for(const e of n){for(let n=1;n<e;n++)t[2*(r+n)]+=t[2*(r+n)-2],t[2*(r+n)+1]+=t[2*(r+n)-1];r+=e}return e}clone(e){if(0===this.lengths.length)return new r([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),n=this.coords.slice(0,t);return e?(e.set(n),new r(this.lengths,e,this.hasIndeterminateRingOrder)):new r(Array.from(this.lengths),Array.from(n),this.hasIndeterminateRingOrder)}}},20437:(e,t,n)=>{n.d(t,{A:()=>y});var r,a=n(90237),i=n(66552),o=n(25482),s=n(10107),l=n(56507),d=(n(87811),n(44208),n(93223)),c=n(36005),u=n(40608),h=n(72088),m=n(98453);const p=new i.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let g=r=class extends o.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?.value??null}readValueType(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?p.fromJSON(n.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],g.prototype,"alias",void 0),(0,a._)([(0,s.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],g.prototype,"defaultValue",void 0),(0,a._)([(0,s.MZ)()],g.prototype,"description",void 0),(0,a._)([(0,c.w)("description")],g.prototype,"readDescription",null),(0,a._)([(0,s.MZ)({types:h.gK,json:{read:{reader:h.rS},write:!0}})],g.prototype,"domain",void 0),(0,a._)([(0,s.MZ)({type:Boolean,json:{write:!0}})],g.prototype,"editable",void 0),(0,a._)([(0,s.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],g.prototype,"length",void 0),(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],g.prototype,"name",void 0),(0,a._)([(0,s.MZ)({type:Boolean,json:{write:!0}})],g.prototype,"nullable",void 0),(0,a._)([(0,d.e)(m.m)],g.prototype,"type",void 0),(0,a._)([(0,s.MZ)()],g.prototype,"valueType",void 0),(0,a._)([(0,c.w)("valueType",["description"])],g.prototype,"readValueType",null),(0,a._)([(0,s.MZ)({type:Boolean,json:{read:!1}})],g.prototype,"visible",void 0),g=r=(0,a._)([(0,u.$)("esri.layers.support.Field")],g);const y=g},72088:(e,t,n)=>{n.d(t,{rS:()=>v,gK:()=>b}),n(44208);var r,a=n(90237),i=n(4718),o=n(10107),s=(n(53966),n(93223)),l=n(40608),d=n(25482);n(87811);let c=r=class extends d.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,a._)([(0,o.MZ)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,a._)([(0,o.MZ)({type:[String,Number],json:{write:!0}})],c.prototype,"code",void 0),c=r=(0,a._)([(0,l.$)("esri.layers.support.CodedValue")],c);const u=new(n(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let h=class extends d.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,a._)([(0,o.MZ)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,a._)([(0,s.e)(u)],h.prototype,"type",void 0),h=(0,a._)([(0,l.$)("esri.layers.support.Domain")],h);const m=h;var p;let g=p=class extends m{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const n=String(e);this.codedValues.some((e=>(String(e.code)===n&&(t=e.name),!!t)))}return t}clone(){return new p({codedValues:(0,i.o8)(this.codedValues),name:this.name})}};(0,a._)([(0,o.MZ)({type:[c],json:{write:!0}})],g.prototype,"codedValues",void 0),(0,a._)([(0,s.e)({codedValue:"coded-value"})],g.prototype,"type",void 0),g=p=(0,a._)([(0,l.$)("esri.layers.support.CodedValueDomain")],g);const y=g;var T;n(49186);let f=T=class extends m{constructor(e){super(e),this.type="inherited"}clone(){return new T}};(0,a._)([(0,s.e)({inherited:"inherited"})],f.prototype,"type",void 0),f=T=(0,a._)([(0,l.$)("esri.layers.support.InheritedDomain")],f);const S=f;var A;let w=A=class extends m{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new A({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,a._)([(0,o.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,n){t[n]=[this.minValue||0,e]}}}})],w.prototype,"maxValue",void 0),(0,a._)([(0,o.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]}}}})],w.prototype,"minValue",void 0),(0,a._)([(0,s.e)({range:"range"})],w.prototype,"type",void 0),w=A=(0,a._)([(0,l.$)("esri.layers.support.RangeDomain")],w);const M=w,b={key:"type",base:m,typeMap:{range:w,"coded-value":y,inherited:S}};function v(e){if(!e?.type)return null;switch(e.type){case"range":return M.fromJSON(e);case"codedValue":return y.fromJSON(e);case"inherited":return S.fromJSON(e)}return null}},98453:(e,t,n)=>{n.d(t,{m:()=>r});const r=new(n(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"})},58501:(e,t,n)=>{n.d(t,{q:()=>a});var r=n(62815);function a(e,t,n){if(!n?.features||!n.hasZ)return;const a=(0,r.N)(n.geometryType,t,e.outSpatialReference);if(null!=a)for(const e of n.features)a(e.geometry)}},79677:(e,t,n)=>{n.d(t,{A:()=>m});var r,a=n(90237),i=n(25482),o=n(88930),s=n(10107),l=(n(44208),n(53966),n(87811),n(36005)),d=n(40608),c=n(43937),u=n(56400);let h=r=class extends i.oY{static get allTime(){return p}static get empty(){return g}static fromArray(e){return new r({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,n=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,a=e.end?.getTime()??e.end;return t===r&&n===a}expandTo(e,t=u.qU){if(this.isEmpty||this.isAllTime)return this.clone();let n=this.start;n&&(n=(0,o.lL)(n,e,t));let a=this.end;if(a){const n=(0,o.lL)(a,e,t);a=a.getTime()===n.getTime()?n:(0,o.S1)(n,1,e,t)}return new r({start:n,end:a})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,a=e.start?.getTime()??-1/0,i=e.end?.getTime()??1/0;let o,s;return a>=t&&a<=n?o=a:t>=a&&t<=i&&(o=t),n>=a&&n<=i?s=n:i>=t&&i<=n&&(s=i),null==o||null==s||isNaN(o)||isNaN(s)?r.empty:new r({start:o===-1/0?null:new Date(o),end:s===1/0?null:new Date(s)})}offset(e,t,n=u.qU){if(this.isEmpty||this.isAllTime)return this.clone();const a=new r,{start:i,end:s}=this;return null!=i&&(a.start=(0,o.S1)(i,e,t,n)),null!=s&&(a.end=(0,o.S1)(s,e,t,n)),a}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,n=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:n})}};(0,a._)([(0,s.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,a._)([(0,l.w)("end")],h.prototype,"readEnd",null),(0,a._)([(0,c.K)("end")],h.prototype,"writeEnd",null),(0,a._)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,a._)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,a._)([(0,s.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,a._)([(0,l.w)("start")],h.prototype,"readStart",null),(0,a._)([(0,c.K)("start")],h.prototype,"writeStart",null),h=r=(0,a._)([(0,d.$)("esri.time.TimeExtent")],h);const m=h,p=new h,g=new h({start:void 0,end:void 0})},56400:(e,t,n)=>{n.d(t,{ZS:()=>c,qU:()=>i,N5:()=>l,P6:()=>d,L5:()=>o,n$:()=>s});const r=new Map([["AUS Central Standard Time","Australia/Darwin"],["AUS Eastern Standard Time","Australia/Sydney"],["Afghanistan Standard Time","Asia/Kabul"],["Alaskan Standard Time","America/Anchorage"],["Aleutian Standard Time","America/Adak"],["Altai Standard Time","Asia/Barnaul"],["Arab Standard Time","Asia/Riyadh"],["Arabian Standard Time","Asia/Dubai"],["Arabic Standard Time","Asia/Baghdad"],["Argentina Standard Time","America/Buenos_Aires"],["Astrakhan Standard Time","Europe/Astrakhan"],["Atlantic Standard Time","America/Halifax"],["Aus Central W. Standard Time","Australia/Eucla"],["Azerbaijan Standard Time","Asia/Baku"],["Azores Standard Time","Atlantic/Azores"],["Bahia Standard Time","America/Bahia"],["Bangladesh Standard Time","Asia/Dhaka"],["Belarus Standard Time","Europe/Minsk"],["Bougainville Standard Time","Pacific/Bougainville"],["Canada Central Standard Time","America/Regina"],["Cape Verde Standard Time","Atlantic/Cape_Verde"],["Caucasus Standard Time","Asia/Yerevan"],["Cen. Australia Standard Time","Australia/Adelaide"],["Central America Standard Time","America/Guatemala"],["Central Asia Standard Time","Asia/Bishkek"],["Central Brazilian Standard Time","America/Cuiaba"],["Central Europe Standard Time","Europe/Budapest"],["Central European Standard Time","Europe/Warsaw"],["Central Pacific Standard Time","Pacific/Guadalcanal"],["Central Standard Time","America/Chicago"],["Central Standard Time (Mexico)","America/Mexico_City"],["Chatham Islands Standard Time","Pacific/Chatham"],["China Standard Time","Asia/Shanghai"],["Cuba Standard Time","America/Havana"],["Dateline Standard Time","Etc/GMT+12"],["E. Africa Standard Time","Africa/Nairobi"],["E. Australia Standard Time","Australia/Brisbane"],["E. Europe Standard Time","Europe/Chisinau"],["E. South America Standard Time","America/Sao_Paulo"],["Easter Island Standard Time","Pacific/Easter"],["Eastern Standard Time","America/New_York"],["Eastern Standard Time (Mexico)","America/Cancun"],["Egypt Standard Time","Africa/Cairo"],["Ekaterinburg Standard Time","Asia/Yekaterinburg"],["FLE Standard Time","Europe/Kiev"],["Fiji Standard Time","Pacific/Fiji"],["GMT Standard Time","Europe/London"],["GTB Standard Time","Europe/Bucharest"],["Georgian Standard Time","Asia/Tbilisi"],["Greenland Standard Time","America/Godthab"],["Greenwich Standard Time","Atlantic/Reykjavik"],["Haiti Standard Time","America/Port-au-Prince"],["Hawaiian Standard Time","Pacific/Honolulu"],["India Standard Time","Asia/Calcutta"],["Iran Standard Time","Asia/Tehran"],["Israel Standard Time","Asia/Jerusalem"],["Jordan Standard Time","Asia/Amman"],["Kaliningrad Standard Time","Europe/Kaliningrad"],["Korea Standard Time","Asia/Seoul"],["Libya Standard Time","Africa/Tripoli"],["Line Islands Standard Time","Pacific/Kiritimati"],["Lord Howe Standard Time","Australia/Lord_Howe"],["Magadan Standard Time","Asia/Magadan"],["Magallanes Standard Time","America/Punta_Arenas"],["Marquesas Standard Time","Pacific/Marquesas"],["Mauritius Standard Time","Indian/Mauritius"],["Middle East Standard Time","Asia/Beirut"],["Montevideo Standard Time","America/Montevideo"],["Morocco Standard Time","Africa/Casablanca"],["Mountain Standard Time","America/Denver"],["Mountain Standard Time (Mexico)","America/Mazatlan"],["Myanmar Standard Time","Asia/Rangoon"],["N. Central Asia Standard Time","Asia/Novosibirsk"],["Namibia Standard Time","Africa/Windhoek"],["Nepal Standard Time","Asia/Katmandu"],["New Zealand Standard Time","Pacific/Auckland"],["Newfoundland Standard Time","America/St_Johns"],["Norfolk Standard Time","Pacific/Norfolk"],["North Asia East Standard Time","Asia/Irkutsk"],["North Asia Standard Time","Asia/Krasnoyarsk"],["North Korea Standard Time","Asia/Pyongyang"],["Omsk Standard Time","Asia/Omsk"],["Pacific SA Standard Time","America/Santiago"],["Pacific Standard Time","America/Los_Angeles"],["Pacific Standard Time (Mexico)","America/Tijuana"],["Pakistan Standard Time","Asia/Karachi"],["Paraguay Standard Time","America/Asuncion"],["Qyzylorda Standard Time","Asia/Qyzylorda"],["Romance Standard Time","Europe/Paris"],["Russia Time Zone 10","Asia/Srednekolymsk"],["Russia Time Zone 11","Asia/Kamchatka"],["Russia Time Zone 3","Europe/Samara"],["Russian Standard Time","Europe/Moscow"],["SA Eastern Standard Time","America/Cayenne"],["SA Pacific Standard Time","America/Bogota"],["SA Western Standard Time","America/La_Paz"],["SE Asia Standard Time","Asia/Bangkok"],["Saint Pierre Standard Time","America/Miquelon"],["Sakhalin Standard Time","Asia/Sakhalin"],["Samoa Standard Time","Pacific/Apia"],["Sao Tome Standard Time","Africa/Sao_Tome"],["Saratov Standard Time","Europe/Saratov"],["Singapore Standard Time","Asia/Singapore"],["South Africa Standard Time","Africa/Johannesburg"],["South Sudan Standard Time","Africa/Juba"],["Sri Lanka Standard Time","Asia/Colombo"],["Sudan Standard Time","Africa/Khartoum"],["Syria Standard Time","Asia/Damascus"],["Taipei Standard Time","Asia/Taipei"],["Tasmania Standard Time","Australia/Hobart"],["Tocantins Standard Time","America/Araguaina"],["Tokyo Standard Time","Asia/Tokyo"],["Tomsk Standard Time","Asia/Tomsk"],["Tonga Standard Time","Pacific/Tongatapu"],["Transbaikal Standard Time","Asia/Chita"],["Turkey Standard Time","Europe/Istanbul"],["Turks And Caicos Standard Time","America/Grand_Turk"],["US Eastern Standard Time","America/Indianapolis"],["US Mountain Standard Time","America/Phoenix"],["UTC","Etc/GMT"],["UTC+01","Etc/GMT-1"],["UTC+02","Etc/GMT-2"],["UTC+03","Etc/GMT-3"],["UTC+04","Etc/GMT-4"],["UTC+05","Etc/GMT-5"],["UTC+06","Etc/GMT-6"],["UTC+07","Etc/GMT-7"],["UTC+08","Etc/GMT-8"],["UTC+09","Etc/GMT-9"],["UTC+10","Etc/GMT-10"],["UTC+11","Etc/GMT-11"],["UTC+12","Etc/GMT-12"],["UTC+13","Etc/GMT-13"],["UTC+14","Etc/GMT-14"],["UTC-01","Etc/GMT+1"],["UTC-02","Etc/GMT+2"],["UTC-03","Etc/GMT+3"],["UTC-04","Etc/GMT+4"],["UTC-05","Etc/GMT+5"],["UTC-06","Etc/GMT+6"],["UTC-07","Etc/GMT+7"],["UTC-08","Etc/GMT+8"],["UTC-09","Etc/GMT+9"],["UTC-10","Etc/GMT+10"],["UTC-11","Etc/GMT+11"],["UTC-12","Etc/GMT+12"],["Ulaanbaatar Standard Time","Asia/Ulaanbaatar"],["Venezuela Standard Time","America/Caracas"],["Vladivostok Standard Time","Asia/Vladivostok"],["Volgograd Standard Time","Europe/Volgograd"],["W. Australia Standard Time","Australia/Perth"],["W. Central Africa Standard Time","Africa/Lagos"],["W. Europe Standard Time","Europe/Berlin"],["W. Mongolia Standard Time","Asia/Hovd"],["West Asia Standard Time","Asia/Tashkent"],["West Bank Standard Time","Asia/Hebron"],["West Pacific Standard Time","Pacific/Port_Moresby"],["Yakutsk Standard Time","Asia/Yakutsk"],["Yukon Standard Time","America/Whitehorse"]]);var a=n(96285);const i="system",o="unknown",s="UTC",l=Intl.DateTimeFormat().resolvedOptions().timeZone;function d(e,t=!1){return{json:{read:{source:e,reader:(t,n)=>n[e]?c(n[e]):null},write:!!t&&{allowNull:!0,writer(t,n){n[e]=t?function(e){return{timeZoneIANA:e}}(t):null}}}}}function c(e,t=i){return e?function(e){return"timeZoneIANA"in e}(e)?e.timeZoneIANA:function(e,t=i){if(!e||!r.has(e.timeZone))return t;const n=r.get(e.timeZone);return function(e){return e.startsWith("UTC")}(e.timeZone)||e.respectsDaylightSaving?n:function(e){const t=a.c9.local().setZone(e),n=Math.min(t.set({month:1,day:1}).offset,t.set({month:5}).offset);return 0===n?"Etc/UTC":`Etc/GMT${a.mQ.instance(-n).formatOffset(0,"narrow")}`}(n)}(e,t):t}},76929:(e,t,n)=>{n.r(t),n.d(t,{default:()=>C});var r=n(90237),a=(n(59456),n(69622)),i=n(60999),o=n(74887),s=(n(53966),n(44208),n(87811),n(49186)),l=n(40608),d=n(61956),c=n(19419),u=n(80893),h=n(51624),m=n(62577),p=n(53655);class g{constructor(e){const t=new h.A(new Uint8Array(e),new DataView(e));this._index=function(e){for(;e.next();){if(2===e.tag())return y(e.getMessage());e.skip()}f()}(t),this._reader=t}get featureCount(){return this._index.featureIndices.length}get exceededTransferLimit(){return this._index.exceededTransferLimit}fieldIndex(e){return this._index.fields.find((t=>t.name===e))?.index??-1}readAttribute(e,t){const{featureCount:n,_index:r}=this;if(e<0||e>=n)return;const a=r.fields.length;if(e<0||t>=a)return;const i=r.attributeIndices[e*a+t],o=this._reader;return o.move(i),function(e){const t=e.getLength(),n=e.pos()+t;for(;e.pos()<n&&e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getSInt32();case 5:return e.getUInt32();case 6:return e.getInt64();case 7:return e.getUInt64();case 8:return e.getSInt64();case 9:return e.getBool();default:return e.skip(),null}return null}(o)}readAllCoordinates(e,t=0){const n=this._reader,{transform:r}=this._index,{scale:a,translate:i}=r,[o,s,l]=a,[d,c,u]=i;for(const r of this._index.featureIndices){n.move(r);const a=n.getLength(),i=n.pos()+a;for(;n.pos()<i&&n.next();)switch(n.tag()){case 2:{const r=n.getLength(),a=n.pos()+r;for(;n.pos()<a&&n.next();)3===n.tag()?(n.getUInt32(),e[t++]=d+o*n.getSInt64(),e[t++]=c+s*n.getSInt64(),e[t++]=u+l*n.getSInt64()):n.skip();break}default:n.skip()}}return t}}function y(e){for(;e.next();){if(1===e.tag())return T(e.getMessage());e.skip()}f()}function T(e){let t,n=!1,r=!1,a=0;const i=new Array,o=new Array,s=new Array;for(;e.next();)switch(e.tag()){case 7:0!==e.getEnum()&&f();break;case 9:n=e.getBool()??!1;break;case 12:t=(0,m.Q1)(e.processMessage(p.ae));break;case 13:{const t=e.processMessage(p.cn);t.index=a++,i.push(t);break}case 15:{o.push(e.pos());const t=e.getUInt32(),n=e.pos()+t;for(;e.pos()<n&&e.next();)1===e.tag()?(s.push(e.pos()),e.skip()):e.skip();break}case 10:r=e.getBool()??!1;break;default:e.skip()}return null!=t&&r||f(),{transform:t,exceededTransferLimit:n,fields:i,featureIndices:o,attributeIndices:s}}function f(){const e=new s.A("pbf-parsing-failed","Error while parsing PBF",new Error);throw console.error(e),e}class S{constructor(e,t){this.descriptor=e,this.pages=t}}class A{constructor(e,t,n,r,a){this.spatialReference=e,this.url=n,this.objectIdField=r,this.capabilities=a;const{supportsMaxRecordCountFactor:i,maxRecordCount:o}=this.capabilities.query,s=o??8e3,l=(i?4:null)??1,d=s*l;this._pageSize=Math.min(8e3,d);const c=t.clone();c.cacheHint=!0,c.resultType="tile",c.outSpatialReference=e,c.returnGeometry=!0,c.returnZ=!0,c.maxRecordCountFactor=l,c.num=s,c.outFields=[r],this._baseQuery=c}async fetch(e,t){const{spatialReference:n}=this,r=(0,c.w1)(e.extent,n),a=this._baseQuery.clone();a.geometry=r;const i=new Array;let s=0,l=!1,d=1;for(;!l;){const e=[];for(let n=0;n<d;++n)e.push(this._fetchPage(a,s++,t));const n=await Promise.all(e);(0,o.Te)(t);for(const e of n){const t=0!==e.featureCount;l||=!e.exceededTransferLimit||!t,t&&i.push(e)}d=Math.min(d+1,4)}return new S(e,i)}async _fetchPage(e,t,n){const r=e.clone();r.start=t*this._pageSize;const a=(await(0,u.kS)(this.url,r,{signal:n})).data;return(0,o.Te)(n),new g(a)}}var w=n(51850),M=n(9762),b=n(27993);class v{constructor(e,t,n){this.objectIdField=e,this.spatialReference=t,this.renderSpatialReference=n}process(e){const{pages:t}=e;if(0===t.length)return null;const n=t.reduce(((e,{featureCount:t})=>e+t),0);if(0===n)return null;const r=this.objectIdField,a=this.spatialReference,i=this.renderSpatialReference,o=new Float64Array(3*n),s=new Uint32Array(n);let l=0;for(const e of t){l=e.readAllCoordinates(o,l);const t=e.fieldIndex(r);if(t<0)throw new Error("Failed to find object id field");for(let r=0;r<n;++r)s[r]=e.readAttribute(r,t)}const d=new Float64Array(o.length);if(!(0,M.projectBuffer)(o,a,0,d,i,0,n))throw new Error("Failed to project coordinates");const u=e.descriptor.extent,h=(0,c.gX)(u),m=(0,w.vt)();(0,b.F)([h[0],h[1],0],a,m,i);const p=new Uint32Array(n);for(let e=0;e<n;++e)p[e]=e;const g=new Uint32Array(n);for(let e=0;e<n;++e)g[e]=0;return{coordinates:d,indicesCoordinates:p,indicesShared:g,objectIds:s,tileId:e.descriptor.id,localOrigin:m}}}var _=n(16930);let E=class extends a.A{constructor(){super(...arguments),this.remoteClient=null,this._pendingTiles=new Map,this._loadedTiles=new Map,this._processor=null,this._fetcher=null}destroy(){for(const e of this._pendingTiles.values())e.abort();this._pendingTiles.clear(),this._loadedTiles.clear()}setup({spatialReference:e,renderSpatialReference:t,baseQuery:n,url:r,objectIdField:a,capabilities:i}){const o=_.A.fromJSON(e);this._fetcher=new A(o,d.A.fromJSON(n),r,a,i),this._processor=new v(a,o,_.A.fromJSON(t))}async onTileTreeChange(e){const{added:t,removed:n}=e;for(const e of n){this._loadedTiles.delete(e);const t=this._pendingTiles.get(e);t?.abort(),this._pendingTiles.delete(e)}for(const e of t){const t=this._pendingTiles.get(e.id);t?.abort(),this._pendingTiles.set(e.id,(0,i.UT)((t=>this._addTile(e,t))))}if(n.length>0){const e={tileIds:n};await this.remoteClient.invoke("onRemoveTiles",e)}}async _addTile(e,t){const n=await this._fetcher.fetch(e,t);(0,o.Te)(t);const r=this._processor.process(n);if(null==r)return void this._pendingTiles.delete(e.id);const{coordinates:a,objectIds:i,indicesCoordinates:s,indicesShared:l}=r;await this.remoteClient.invoke("onAddTile",r,{signal:t,transferList:[a.buffer,i.buffer,s.buffer,l.buffer]}),this._pendingTiles.delete(e.id),this._loadedTiles.set(e.id,n)}};E=(0,r._)([(0,l.$)("esri.views.3d.layers.graphics.pipeline.Feature3DPipelineWorker")],E);const C=E}}]);