@arcgis/core 5.2.0-next.35 → 5.2.0-next.37

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 (294) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/02b043a3c5fa8bcb4c5b.js +1 -0
  3. package/assets/esri/core/workers/chunks/{acbc14395c31f6da509e.js → 03437a8ef35c200dbf17.js} +1 -1
  4. package/assets/esri/core/workers/chunks/034dd8ee5152a12412cd.js +1 -0
  5. package/assets/esri/core/workers/chunks/0a6e03263ab0906d8bcf.js +1 -0
  6. package/assets/esri/core/workers/chunks/0edd250159ec259601b3.js +1 -0
  7. package/assets/esri/core/workers/chunks/{401ee7fa500adad77db1.js → 1079914101d69a40b3eb.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{bbcb213d20693fcad5be.js → 1599dc5309a4e60017ce.js} +2 -2
  9. package/assets/esri/core/workers/chunks/181e98399732f425305d.js +1 -0
  10. package/assets/esri/core/workers/chunks/{47d88e1b003c4519b7b6.js → 18f4b2099299942aaf97.js} +1 -1
  11. package/assets/esri/core/workers/chunks/196e7515a43bd0026f49.js +1 -0
  12. package/assets/esri/core/workers/chunks/1aa7496a7dc95aae11ac.js +1 -0
  13. package/assets/esri/core/workers/chunks/1d524690c4b66289bd20.js +1 -0
  14. package/assets/esri/core/workers/chunks/{f72f38e7609756a7f8ea.js → 20fa2c3d4360afa5e136.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{03350a56f840cffe5459.js → 2757c4bf0280e27f3484.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{93ceb74ac88ef460fe5f.js → 278409028bc5af45b507.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{2c61bb25578f73ba49bc.js → 29a1d0659bbc5a039864.js} +1 -1
  18. package/assets/esri/core/workers/chunks/29df3f829006719b2680.js +1 -0
  19. package/assets/esri/core/workers/chunks/30cf84a47ebefd180bb7.js +1 -0
  20. package/assets/esri/core/workers/chunks/{71a593fa116770e58832.js → 37a95f097533bad1b338.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{7335a762412bc8c15a2f.js → 37e823202424c11076cb.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{ee446250a40e5d89bb5a.js → 3a76fffa2016c16d7989.js} +3 -3
  23. package/assets/esri/core/workers/chunks/{58ce4bcfb15f378b1b9f.js → 3d6d2b42ba2ad7086d5d.js} +1 -1
  24. package/assets/esri/core/workers/chunks/3ec91474658eae87b832.js +1 -0
  25. package/assets/esri/core/workers/chunks/448e0596005cba9a4225.js +1 -0
  26. package/assets/esri/core/workers/chunks/{f148666308071bdb185a.js → 45530a49fa1f09d1682e.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{155940ef3d1888272d73.js → 459e89d1b94a3b204d20.js} +2 -2
  28. package/assets/esri/core/workers/chunks/{f71f5778e03f68f27482.js → 45b2e58051f42ebd236e.js} +1 -1
  29. package/assets/esri/core/workers/chunks/4611cf051c3c396fdf96.js +1 -0
  30. package/assets/esri/core/workers/chunks/{efaa1d05705f6b450e8f.js → 46e3d33e44e5398221e2.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{866950e9ab96aebc6b32.js → 4a8201e09bc3ad5cc00b.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{110135b0562a3b5708b9.js → 4abe820bbe4f7ffccc09.js} +1 -1
  33. package/assets/esri/core/workers/chunks/4ad86d6b1be07c97b6f6.js +1 -0
  34. package/assets/esri/core/workers/chunks/{20ffeb09bb30400de110.js → 4e28f49d0be20ea50fd7.js} +1 -1
  35. package/assets/esri/core/workers/chunks/4f25aac84d9eb10cac83.js +1 -0
  36. package/assets/esri/core/workers/chunks/{0197e459fdb04dfb28ef.js → 51838d55d8ec4ce70398.js} +1 -1
  37. package/assets/esri/core/workers/chunks/542d8a6c415098b9857c.js +1 -0
  38. package/assets/esri/core/workers/chunks/57abf838fcff0f0e2c5e.js +1 -0
  39. package/assets/esri/core/workers/chunks/57dd017fed2943d24e3d.js +1 -0
  40. package/assets/esri/core/workers/chunks/59801b2ccaaf4b394e02.js +1 -0
  41. package/assets/esri/core/workers/chunks/5a62c9f64db4fcae5e52.js +1 -0
  42. package/assets/esri/core/workers/chunks/{e84c13ac59e5381b77e2.js → 5aebecb5c2b3e7887127.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{c19fe4f31e4ef84bbcf6.js → 5e68b74fd548c7cdba36.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{9dcb2cbf89dcb7558432.js → 5f360492560ae07083a6.js} +1 -1
  45. package/assets/esri/core/workers/chunks/6022f43ebd58e21c737a.js +1 -0
  46. package/assets/esri/core/workers/chunks/62b137a795e487fa06a1.js +1 -0
  47. package/assets/esri/core/workers/chunks/{007485862ce95928717a.js → 632de34ebd2f44b4423d.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{1ad5fcae6d6a9801cf58.js → 63ca17f569407c89bde1.js} +2 -2
  49. package/assets/esri/core/workers/chunks/6896a6dd36fa91a27151.js +1 -0
  50. package/assets/esri/core/workers/chunks/{e6263e1983e703befe48.js → 68bc674affe2f7269c40.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{759686b896f51f0fe6a9.js → 6a51499c6623ddce5f00.js} +1 -1
  52. package/assets/esri/core/workers/chunks/6cdf1db30793133294dd.js +1 -0
  53. package/assets/esri/core/workers/chunks/{b0e4af49fc968b0a910f.js → 6ff6783f89ecd3a5e752.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{857532de88f21e8c3466.js → 70763c7b68d8abe8d5fe.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{e67a9f9298d63026e7f6.js → 716b1f073e3cd807abd3.js} +1 -1
  56. package/assets/esri/core/workers/chunks/71a3f05cb86ae2920f8d.js +1 -0
  57. package/assets/esri/core/workers/chunks/723bb56de2324b41df4e.js +1 -0
  58. package/assets/esri/core/workers/chunks/73f61107cb7e6d30bf03.js +1 -0
  59. package/assets/esri/core/workers/chunks/752c34cee981862add89.js +1 -0
  60. package/assets/esri/core/workers/chunks/760dfd585b6c2c1937ce.js +1 -0
  61. package/assets/esri/core/workers/chunks/{595401947e74a0a67144.js → 76449e50222111ba0eb1.js} +1 -1
  62. package/assets/esri/core/workers/chunks/76bed5497f42f23a27ed.js +1 -0
  63. package/assets/esri/core/workers/chunks/832ecc1f7d45774c4726.js +1 -0
  64. package/assets/esri/core/workers/chunks/860a0f9d20f53db1caf4.js +1 -0
  65. package/assets/esri/core/workers/chunks/867e39bb444947c93586.js +1 -0
  66. package/assets/esri/core/workers/chunks/8a8b7ac6693bdfbebf07.js +1 -0
  67. package/assets/esri/core/workers/chunks/8fce15ce4cfdccf407f3.js +1 -0
  68. package/assets/esri/core/workers/chunks/{5260f623438bd84f2caa.js → 937cf55b3b9d324eea73.js} +1 -1
  69. package/assets/esri/core/workers/chunks/93df864c2e829f0fd5ce.js +1 -0
  70. package/assets/esri/core/workers/chunks/{3dd8145ef89f32920177.js → 966d002acec8c72be56a.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{367a3031abbeff0c0090.js → 9aef0b87f471626abd66.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{f1d211904d5a1de93cb3.js → 9ba9a3705623679bc305.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{aec82b94787821153d2b.js → a188d0767825d322f96d.js} +1 -1
  74. package/assets/esri/core/workers/chunks/a638de0102c3990403d1.js +1 -0
  75. package/assets/esri/core/workers/chunks/b09935d0105d50a0971b.js +1 -0
  76. package/assets/esri/core/workers/chunks/b2c0262c4a76b8a86200.js +1 -0
  77. package/assets/esri/core/workers/chunks/{599bd80379423c99799d.js → b4323e69e624c6b51754.js} +1 -1
  78. package/assets/esri/core/workers/chunks/b5141f240ca79729686d.js +1 -0
  79. package/assets/esri/core/workers/chunks/b549a4d4b1a34bee8beb.js +1 -0
  80. package/assets/esri/core/workers/chunks/bb89b6fd93513c61b2d3.js +1 -0
  81. package/assets/esri/core/workers/chunks/{3bd32387af52fa48d747.js → bc553ecc8cbcc1b02717.js} +1 -1
  82. package/assets/esri/core/workers/chunks/bcba02f61cf0abcb5600.js +1 -0
  83. package/assets/esri/core/workers/chunks/bccc199af4e2e49f7acd.js +1 -0
  84. package/assets/esri/core/workers/chunks/{f63e7b01c70352538b1e.js → bd0f488e228a75fbefb3.js} +2 -2
  85. package/assets/esri/core/workers/chunks/c48dfda8dcb9551606fb.js +1 -0
  86. package/assets/esri/core/workers/chunks/c4e44fde4bc4ff89e2bc.js +1 -0
  87. package/assets/esri/core/workers/chunks/c93a68618674b38b932e.js +1 -0
  88. package/assets/esri/core/workers/chunks/d2745886ba5a86fd5c4c.js +680 -0
  89. package/assets/esri/core/workers/chunks/d4c341b15d9244276fb9.js +1 -0
  90. package/assets/esri/core/workers/chunks/d5faab9799891e5da5a8.js +1 -0
  91. package/assets/esri/core/workers/chunks/d811924acc9c0be95bba.js +1 -0
  92. package/assets/esri/core/workers/chunks/{4b96aa2dc5b88846bb53.js → e0a4d0288abd334b0673.js} +1 -1
  93. package/assets/esri/core/workers/chunks/{b22a1c98271c2e4d8808.js → e1ddb8e4977b317fd40c.js} +1 -1
  94. package/assets/esri/core/workers/chunks/e961c6140c39921816a8.js +1 -0
  95. package/assets/esri/core/workers/chunks/eb7daa0f6610983ff8db.js +1 -0
  96. package/assets/esri/core/workers/chunks/eb842cf470ce28a73187.js +1 -0
  97. package/assets/esri/core/workers/chunks/ed1d4ebf487c7dcd5c33.js +1 -0
  98. package/assets/esri/core/workers/chunks/f565e203d8fed2672112.js +1 -0
  99. package/assets/esri/core/workers/chunks/f80cadcc2a588da63b38.js +1 -0
  100. package/assets/esri/core/workers/chunks/f8bbb52b865a0a242140.js +1 -0
  101. package/assets/esri/core/workers/chunks/f9592bcdd9988199a7ea.js +1 -0
  102. package/assets/esri/core/workers/chunks/ff7e1eb2366d4301d288.js +1 -0
  103. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  104. package/chunks/NavigationDepth.glsl.js +18 -0
  105. package/chunks/Path.glsl.js +20 -16
  106. package/config.js +1 -1
  107. package/core/accessorSupport/diffUtils.js +1 -1
  108. package/core/has.js +1 -1
  109. package/geometry/FlatGeometry.js +1 -1
  110. package/geometry/support/Indices.js +1 -1
  111. package/geometry/support/ShortArray.js +1 -1
  112. package/geometry/support/UintArray.js +1 -1
  113. package/geometry/support/meshUtils/geographicUtils.js +1 -1
  114. package/kernel.js +1 -1
  115. package/layers/MapImageLayer.js +1 -1
  116. package/layers/mixins/PublishableLayer.js +1 -1
  117. package/layers/mixins/RefreshableLayer.js +1 -1
  118. package/layers/raster/functions/pixelUtils.js +1 -1
  119. package/layers/support/kustoUtils.js +1 -1
  120. package/layers/types.d.ts +9 -2
  121. package/package.json +1 -1
  122. package/popup/Feature.js +1 -1
  123. package/portal/support/resourceUtils.js +1 -1
  124. package/renderers/support/rasterTypeUtils.js +1 -1
  125. package/rest/query/operations/pbfFeatureSetUtils.js +1 -1
  126. package/support/revision.js +1 -1
  127. package/symbols/cim/utils.js +1 -1
  128. package/tables/support/tablesUtils.js +1 -1
  129. package/views/2d/engine/flow/utils.js +1 -1
  130. package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
  131. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
  132. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
  133. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  134. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/AlignedVertexSpec.js +1 -1
  135. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  136. package/views/2d/layers/features/layerAdapters/labelingUtils.js +1 -1
  137. package/views/2d/layers/support/ExportStrategy.js +1 -1
  138. package/views/2d/layers/support/annodime/dimensionUtils.js +1 -1
  139. package/views/2d/layers/support/annodime/utils.js +1 -1
  140. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  141. package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
  142. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  143. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  144. package/views/3d/layers/Lyr3DWasm.js +1 -1
  145. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  146. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  147. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  148. package/views/3d/layers/i3s/PointCloudRendererUtil.js +1 -1
  149. package/views/3d/layers/i3s/PointCloudWorkerUtil.js +1 -1
  150. package/views/3d/layers/support/lyr3dTypeConversions.js +1 -1
  151. package/views/3d/state/utils/navigationUtils.js +1 -1
  152. package/views/3d/support/gaussianSplatting/GaussianSplatAtlasPages.js +1 -1
  153. package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
  154. package/views/3d/support/orientedBoundingBox.js +1 -1
  155. package/views/3d/terrain/Tile.js +1 -1
  156. package/views/3d/terrain/TileRenderer.js +1 -1
  157. package/views/3d/terrain/terrainUtils.js +1 -1
  158. package/views/3d/webgl-engine/core/material/MaterialBase.js +1 -1
  159. package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
  160. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +32 -16
  161. package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +1 -1
  162. package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadowFromDepth.glsl.js +2 -2
  163. package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
  164. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  165. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  166. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  167. package/views/3d/webgl-engine/lib/NavigationDepthCache.js +2 -0
  168. package/views/3d/webgl-engine/lib/PathEvaluator.js +1 -1
  169. package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
  170. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  171. package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
  172. package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
  173. package/views/3d/webgl-engine/lib/lodRendering/LodComponentData.js +1 -1
  174. package/views/3d/webgl-engine/lib/lodRendering/LodLevel.js +1 -1
  175. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  176. package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
  177. package/views/3d/webgl-engine/lib/screenPolygonOverlapUtils.js +1 -1
  178. package/views/3d/webgl-engine/lib/screenPolygonTriangleIntersections.js +1 -1
  179. package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
  180. package/views/3d/webgl-engine/materials/PathLayouts.js +1 -1
  181. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  182. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  183. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  184. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  185. package/views/3d/webgl-engine/shaders/NavigationDepth.glsl.js +2 -0
  186. package/views/3d/webgl-engine/shaders/NavigationDepthTechnique.js +2 -0
  187. package/views/3d/webgl-engine/shaders/oitResolution.glsl.js +1 -1
  188. package/views/View2D.js +1 -1
  189. package/views/draw/support/Reshape.js +1 -1
  190. package/views/interactive/tooltip/fields/fields.js +1 -1
  191. package/views/interactive/tooltip/fields/parsingAndFormattingUtils.js +1 -1
  192. package/views/layers/CatalogDynamicGroupLayerView.js +1 -1
  193. package/views/support/euclideanLengthMeasurementUtils.js +1 -1
  194. package/views/support/selectionUtils.js +1 -1
  195. package/views/webgl/BufferObject.js +1 -1
  196. package/views/webgl/FramebufferObject.js +1 -1
  197. package/views/webgl/RenderingContext.js +1 -1
  198. package/views/webgl/Texture.js +1 -1
  199. package/views/webgl/VertexAttributeLayouts.js +1 -1
  200. package/webscene/spec-certification/utils.js +1 -1
  201. package/widgets/Editor/legacy/workflowUtils.js +1 -1
  202. package/widgets/Editor/workflowUtils.js +1 -1
  203. package/widgets/Editor.d.ts +6 -0
  204. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  205. package/widgets/OrientedImageryViewer/navigation/errors.js +1 -1
  206. package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
  207. package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
  208. package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
  209. package/widgets/OrientedImageryViewer/utils.js +1 -1
  210. package/widgets/OrientedImageryViewer.js +1 -1
  211. package/widgets/PanoramicViewer/constants.js +1 -1
  212. package/widgets/PanoramicViewer/support/importUtils.js +1 -1
  213. package/widgets/PanoramicViewer/utils.js +1 -1
  214. package/widgets/support/dateUtils.js +1 -1
  215. package/assets/esri/core/workers/chunks/0a2f08298a3c932614f2.js +0 -1
  216. package/assets/esri/core/workers/chunks/0df978697328b6453c94.js +0 -1
  217. package/assets/esri/core/workers/chunks/168c15cf462f9abcbdd2.js +0 -1
  218. package/assets/esri/core/workers/chunks/22c447fcc9a28afeb6e3.js +0 -1
  219. package/assets/esri/core/workers/chunks/24aa98cb2021ddd789ce.js +0 -1
  220. package/assets/esri/core/workers/chunks/2509da565e5a2b43ac7f.js +0 -1
  221. package/assets/esri/core/workers/chunks/256cc116e3be4feee593.js +0 -1
  222. package/assets/esri/core/workers/chunks/2bb3494659609594c4ca.js +0 -1
  223. package/assets/esri/core/workers/chunks/2c017eae434254610c8e.js +0 -1
  224. package/assets/esri/core/workers/chunks/303e723e829ea7088d43.js +0 -1
  225. package/assets/esri/core/workers/chunks/368db1420b8520beae05.js +0 -1
  226. package/assets/esri/core/workers/chunks/38a6a7c56c592f336a12.js +0 -1
  227. package/assets/esri/core/workers/chunks/39ff5b2a05a90e1cb214.js +0 -1
  228. package/assets/esri/core/workers/chunks/3b914ca36e7e2b00cfe6.js +0 -1
  229. package/assets/esri/core/workers/chunks/3d1021f7ea9617a76ccf.js +0 -1
  230. package/assets/esri/core/workers/chunks/3e8fa2a7a36881234479.js +0 -1
  231. package/assets/esri/core/workers/chunks/451331f69d21c61ec93b.js +0 -1
  232. package/assets/esri/core/workers/chunks/4656a4bf430d7eed1465.js +0 -1
  233. package/assets/esri/core/workers/chunks/472ec242cd3070e6acfe.js +0 -1
  234. package/assets/esri/core/workers/chunks/51d7145f748b4865de7f.js +0 -1
  235. package/assets/esri/core/workers/chunks/54f54623532f633dc0e2.js +0 -1
  236. package/assets/esri/core/workers/chunks/570a4725b2a4a19c5148.js +0 -1
  237. package/assets/esri/core/workers/chunks/586ca90e46f5cbdfeece.js +0 -1
  238. package/assets/esri/core/workers/chunks/59c22bab85f9cdbb9948.js +0 -1
  239. package/assets/esri/core/workers/chunks/5dfeefee96659832398a.js +0 -1
  240. package/assets/esri/core/workers/chunks/6c746ac4bd2e57b8cb41.js +0 -1
  241. package/assets/esri/core/workers/chunks/6d72a1bdc2664df62c4c.js +0 -1
  242. package/assets/esri/core/workers/chunks/7085b4c655a19694da04.js +0 -1
  243. package/assets/esri/core/workers/chunks/777b16b76db406c99c69.js +0 -1
  244. package/assets/esri/core/workers/chunks/818a481ce579f519de1c.js +0 -1
  245. package/assets/esri/core/workers/chunks/85a280ee915010a8da3c.js +0 -1
  246. package/assets/esri/core/workers/chunks/86731e276b31453bc235.js +0 -1
  247. package/assets/esri/core/workers/chunks/87b86375f8557418dbe6.js +0 -1
  248. package/assets/esri/core/workers/chunks/8817d25c7f4cf0e6c6bd.js +0 -1
  249. package/assets/esri/core/workers/chunks/8a9b2efa0603e9fa4e8b.js +0 -1
  250. package/assets/esri/core/workers/chunks/8aa5bbf9a9b09815725a.js +0 -1
  251. package/assets/esri/core/workers/chunks/8b68a69ab8fb1679e7b2.js +0 -1
  252. package/assets/esri/core/workers/chunks/98685bd149dee1d6dc99.js +0 -1
  253. package/assets/esri/core/workers/chunks/9de673a04c70bd47047e.js +0 -1
  254. package/assets/esri/core/workers/chunks/9de9cec5c644bc452294.js +0 -1
  255. package/assets/esri/core/workers/chunks/9fb0431b0628dcb53004.js +0 -680
  256. package/assets/esri/core/workers/chunks/a2a688dd2ed4565e01ff.js +0 -1
  257. package/assets/esri/core/workers/chunks/a3ae7c41832c7a8b0570.js +0 -1
  258. package/assets/esri/core/workers/chunks/a3e86830460e52706a4d.js +0 -1
  259. package/assets/esri/core/workers/chunks/a58b8903ae17acf117d6.js +0 -1
  260. package/assets/esri/core/workers/chunks/a99ce2f12c8204ee542a.js +0 -1
  261. package/assets/esri/core/workers/chunks/ab3d1c00ef514b61ce0b.js +0 -1
  262. package/assets/esri/core/workers/chunks/ae5363956b4467208e04.js +0 -1
  263. package/assets/esri/core/workers/chunks/b24b7411a73d1da87c30.js +0 -1
  264. package/assets/esri/core/workers/chunks/b97b83159fec34f383af.js +0 -1
  265. package/assets/esri/core/workers/chunks/bec660ee2e7828f965e2.js +0 -1
  266. package/assets/esri/core/workers/chunks/c7316fd2bdb7ac9eada3.js +0 -1
  267. package/assets/esri/core/workers/chunks/ca7d4d76a6bf5a3046cd.js +0 -1
  268. package/assets/esri/core/workers/chunks/cffef41791f0cfa6c26c.js +0 -1
  269. package/assets/esri/core/workers/chunks/d26b1a9f47b4b2744c89.js +0 -1
  270. package/assets/esri/core/workers/chunks/d4a96f0402172787823a.js +0 -1
  271. package/assets/esri/core/workers/chunks/d9fcc63df008f687848a.js +0 -1
  272. package/assets/esri/core/workers/chunks/e3a4695c31d3f9d55213.js +0 -1
  273. package/assets/esri/core/workers/chunks/e65d291bab13f7f5323b.js +0 -1
  274. package/assets/esri/core/workers/chunks/eeee7421f64a52074ff4.js +0 -1
  275. package/assets/esri/core/workers/chunks/eef7e0bee19c4258ba55.js +0 -1
  276. package/assets/esri/core/workers/chunks/efaf998d18479a0380ae.js +0 -1
  277. package/assets/esri/core/workers/chunks/f0573db9a3d3e1499a7e.js +0 -1
  278. package/assets/esri/core/workers/chunks/f07722efd7fa2b75d4dd.js +0 -1
  279. package/assets/esri/core/workers/chunks/f137e544076482e348ad.js +0 -1
  280. package/assets/esri/core/workers/chunks/fd53ef66176ae164e221.js +0 -1
  281. package/assets/esri/core/workers/chunks/fd956a58787020d610af.js +0 -1
  282. package/rest/sharedTemplates/addSharedTemplates.js +0 -2
  283. package/support/featureFlags.js +0 -2
  284. package/views/2d/engine/webgl/ClippingInfo.js +0 -2
  285. package/views/2d/engine/webgl/Mesh2D.js +0 -2
  286. package/views/2d/engine/webgl/shaderGraph/GLSLShaderModule.js +0 -2
  287. package/views/2d/layers/features/ProcessorTileMessageQueue.js +0 -2
  288. package/views/3d/support/AsyncWorkerQueue.js +0 -2
  289. package/views/3d/webgl-engine/lib/PathGeometryData.js +0 -2
  290. package/widgets/BatchAttributeForm/templates/support/contingentValuesUtils.js +0 -2
  291. package/widgets/OrientedImageryViewer/components/NavigationAction.js +0 -2
  292. package/widgets/OrientedImageryViewer/components/NavigationActions.js +0 -2
  293. package/widgets/OrientedImageryViewer/support/NonPanoramicMediaCollection.js +0 -2
  294. package/widgets/PanoramicViewer/support/PanoramicMediaCollection.js +0 -2
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6247],{69052(e,t,n){n.d(t,{hr:()=>s,ie:()=>l,uC:()=>o});var a=n(34727);class s{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,n=!1){return r(this.range,this.min,this.max,e,t,n)}clamp(e,t=0){return(0,a.qE)(e-t,this.min,this.max)+t}monotonic(e,t,n){return e<t?t:t+i(this.range,e-t,n)}minimalMonotonic(e,t,n){return r(this.range,e,e+this.range,t,n)}center(e,t,n){return t=this.monotonic(e,t,n),this.normalize((e+t)/2,n)}diff(e,t,n){return this.monotonic(e,t,n)-e}shortestSignedDiff(e,t){e=this.normalize(e);const n=(t=this.normalize(t))-e,a=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(n)<Math.abs(a)?n:a}contains(e,t,n){return t=this.minimalMonotonic(e,t),(n=this.minimalMonotonic(e,n))>e&&n<t}}function r(e,t,n,a,s=0,r=!1){return(a-=s)<t?a+=i(e,t-a):a>n&&(a-=i(e,a-n)),r&&a===n&&(a=t),a+s}function i(e,t,n=0){return Math.ceil((t-n)/e)*e+n}const o=new s(0,2*Math.PI),l=(new s(-Math.PI,Math.PI),new s(0,360))},31411(e,t,n){n.d(t,{GS:()=>F,gh:()=>R});var a=n(49186),s=n(56512),r=n(65864),i=n(4305),o=n(50954),l=n(52006),u=n(49663),c=n(46068),d=n(15507);const p=1e-6,h=[0,0];function f(e){return{maxSegmentLength:e.maxSegmentLength??0,maxDeviation:e.maxDeviation??0,maxSegmentsPerCurve:e.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(e.minSegmentsPerCurve??1,1)}}class m{constructor(e,t){this.curveStart=e,this.curveEnd=t,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(e,t){this.tStart=0,this.arcStart=e,this.tEndStack.push(1),this.arcEndStack.push(t)}splitAt(e){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(e),this.arcEndStack.push(this.interpolate(e))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(e,{maxDeviation:t,maxSegmentLength:n,maxSegmentsPerCurve:a,minSegmentsPerCurve:s}){const r=n*n,i=t*t,o=1/a,l=this.interpolate(0),u=this.interpolate(1);(0,d.kb)(this.curveStart,l)>p&&e.push(l),this.initialize(l,u);const c=1/s;for(let e=s-1;e>0;e--){const t=e*c;this.pop(),this.splitAt(t)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<o||(0===r||!isFinite(r)||(0,d.kb)(this.arcStart,this.arcEnd)<r)&&(0===i||!isFinite(i)||this.getDeviation2()<i)?(e.push(this.arcEnd),this.next()):this.splitInHalf();return(0,d.kb)(this.curveEnd,u)>p&&e.push([...this.curveEnd]),e}}class g extends m{constructor(e,t){const[n,a,s]=t.b;super(e,n),this._controlPointsStack=[],this._curveControlPoints=[a,s],this._arcControlPoints=[a,s],this._controlPointsStack.push(this._arcControlPoints)}splitAt(e){const{arcStart:t,arcEnd:n,tStart:a,tEnd:s}=this,[r,i]=this._arcControlPoints,o=(e-a)/(s-a),l=(0,d.RS)([],t,r,o),u=(0,d.RS)(h,r,i,o),c=(0,d.RS)([],i,n,o),p=(0,d.RS)([],l,u,o),f=(0,d.RS)([],u,c,o),m=(0,d.RS)([],p,f,o);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([f,c]),this.tEndStack.push(e),this.arcEndStack.push(m),this._arcControlPoints[0]=l,this._arcControlPoints[1]=p,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(e){const{curveStart:t,curveEnd:n}=this,[a,s]=this._curveControlPoints;return(0,i.B4)(t,a,s,n,e)}getDeviation2(){const{arcStart:e,arcEnd:t}=this,[n,a]=this._arcControlPoints;return Math.max((0,d.yE)(n,e,t),(0,d.yE)(a,e,t))}}class y extends m{constructor(e,t){const[n]=t.a;super(e,n),this._derivedEllipse=(0,c.SW)(e,t)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(e){return(0,c.Uk)(this._derivedEllipse,e)}getDeviation2(){return(0,d.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function w(e,t,n,{cx:a,cy:s,radius:r,thetaStart:i,thetaEnd:o,isInvalid:l},{maxDeviation:u,maxSegmentLength:c,maxSegmentsPerCurve:h,minSegmentsPerCurve:f}){if(l)return e.push([...n]),e;const m=2*r,g=[a+r*Math.cos(i),s+r*Math.sin(i)],y=[a+r*Math.cos(o),s+r*Math.sin(o)];(0,d.kb)(t,g)>p&&e.push(g);const w=Math.abs(o-i),S=c>0&&c<m?2*Math.asin(c/m):w,b=u>0&&u<=r?2*Math.acos(1-u/r):w,A=Math.min(S,b),v=Math.min(h,Math.max(f,Math.ceil(Math.abs(w/A)))),E=1/v;for(let t=1;t<v;t++){const n=t*E,l=i*(1-n)+o*n;e.push([a+r*Math.cos(l),s+r*Math.sin(l)])}return e.push(y),(0,d.kb)(n,y)>p&&e.push([...n]),e}function S(e,t,n,a){return new g(t,n).densify(e,a)}function b(e,t,n,a){const s=(0,o.pM)(t,n),[r]=n.c;return w(e,t,r,s,a)}function A(e,t,n,a){const s=(0,u.io)(t,n),[r]=n.a;return w(e,t,r,s,a)}function v(e,t,n,a){const[s,r,i,o,l,u,c]=n.a;return 0===u||0===c?(e.push([...s]),e):new y(t,n).densify(e,a)}function E(e,t,n,a){return(0,l.Xq)(n)?(e.push([...n]),e):(0,l.n1)(n)?S(e,t,n,a):(0,l.aO)(n)?b(e,t,n,a):(0,l.DA)(n)?A(e,t,n,a):v(e,t,n,a)}function F(e,t={}){if(!(0,l.Ed)(e))return e;const n=f(t),a=(0,l.FD)(e),s=[];for(const e of a){const t=[];for(let a=0;a<e.length-1;a++){const s=a+1,r=[...(0,l.yP)(e[a])];0===a&&t.push(r),E(t,r,e[s],n)}s.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},paths:s,spatialReference:e.spatialReference}:{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},rings:s,spatialReference:e.spatialReference}}const k=(0,s.B)(e=>({maxDeviation:0,maxSegmentLength:100*e,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function R(e,t,s){const i=new Set(t);return await async function(e,t,s){let r=null;for(const i of e)if(i&&(0,l.Ed)(i)&&null==i.spatialReference.xyTolerance&&(0,l.V8)(i,t)){const e=i.spatialReference;if(!e)throw new a.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const t=M(e);if(s.has(t))i.spatialReference=s.get(t);else{r||(r=await Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(3299),n.e(6312)]).then(n.bind(n,78125)));const o=r.fromSpatialReference(e),l=o?.getTolerance();if(null==l)throw new a.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const u=i.spatialReference.clone();u.read({xyTolerance:l}),i.spatialReference=u,s.set(t,u)}}}(e,i,s),e.map(e=>{if(!e||!(0,l.Ed)(e))return e;const n=e.spatialReference.xyTolerance;if(null==n)return e;const a=k(n);return(0,r.rS)(function(e,t,n){if(!(0,l.Ed)(e))return e;const a=new Set(t),s=f(n),r=(0,l.FD)(e),i=[];let o=!1;for(const e of r){const t=[];for(let n=0;n<e.length-1;n++){const r=n+1,i=[...(0,l.yP)(e[n])];0===n&&t.push(i);const u=e[r];(0,l.Xq)(u)?t.push([...u]):(0,l.n1)(u)&&!a.has("cubic-bezier")?S(t,i,u,s):(0,l.aO)(u)&&!a.has("circular-arc")?b(t,i,u,s):(0,l.DA)(u)&&!a.has("elliptic-arc")?A(t,i,u,s):(0,l.wY)(u)&&!a.has("elliptic-arc")?v(t,i,u,s):(t.push((0,l.tk)(u)),o=!0)}i.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},spatialReference:e.spatialReference,...o?{curvePaths:i}:{paths:i}}:{hasZ:e.hasZ,hasM:e.hasM,spatialReference:e.spatialReference,...o?{curveRings:i}:{rings:i}}}(e,t,a))})}function M(e){if(null!=e.wkid)return`${e.wkid}`;if(null!=e.wkt)return e.wkt;const t="toJSON"in e&&"function"==typeof e.toJSON?e.toJSON():e;return JSON.stringify(t)}},17136(e,t,n){n.d(t,{Y_:()=>$,O7:()=>x,el:()=>M});var a=n(92602),s=n(69052),r=n(49186),i=n(53966),o=n(39829),l=n(82799),u=n(16930),c=n(80754),d=n(21325),p=n(28735),h=n(52006),f=n(31411),m=n(11254),g=n(60408),y=n(65864),w=n(2272),S=n(84952),b=n(92300);const A=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function v(e){return"polygon"===e[0].type}function E(e){return"polyline"===e[0].type}function F(e,t,n){const a=1e6;if(t){const t=(0,h.Ed)(e)?(0,f.GS)(e,{maxSegmentLength:a}):function(e,t){if(!(e instanceof l.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw A().error(e),new r.A("internal:geometry",e)}const n=(0,c.r8)(e),a=[];for(const e of n){const n=[];a.push(n),n.push([e[0][0],e[0][1]]);for(let a=0;a<e.length-1;a++){const s=e[a][0],r=e[a][1],i=e[a+1][0],o=e[a+1][1],l=Math.sqrt((i-s)*(i-s)+(o-r)*(o-r)),u=(o-r)/l,c=(i-s)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const a=e*t,i=c*a+s,o=u*a+r;n.push([i,o])}const e=(l+Math.floor(d-1)*t)/2,a=c*e+s,i=u*e+r;n.push([a,i])}n.push([i,o])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:a,spatialReference:e.spatialReference}):new l.A({paths:a,spatialReference:e.spatialReference})}(e,a);e=(0,p.ci)(t,!0)}return n&&(e=(0,c.kS)(e,n)),e}function k(e,t,n){if(Array.isArray(e)){const a=e[0];if(a>t){const n=(0,c.kd)(a,t);e[0]=a+n*(-2*t)}else if(a<n){const t=(0,c.kd)(a,n);e[0]=a+t*(-2*n)}}else{const a=e.x;if(a>t){const n=(0,c.kd)(a,t);e=e.clone().offset(n*(-2*t),0)}else if(a<n){const t=(0,c.kd)(a,n);e=e.clone().offset(t*(-2*n),0)}}return e}function R(e,t){let n=-1;for(let a=0;a<t.cutIndexes.length;a++){const s=t.cutIndexes[a],r=t.geometries[a],i=(0,c.r8)(r);for(let e=0;e<i.length;e++){const t=i[e];t.some(n=>{if(n[0]<180)return!0;{let n=0;for(let e=0;e<t.length;e++){const a=t[e][0];n=a>n?a:n}n=Number(n.toFixed(9));const a=-360*(0,c.kd)(n,180);for(let n=0;n<t.length;n++){const t=r.getPoint(e,n);r.setPoint(e,n,t.clone().offset(a,0))}return!0}})}if(s===n){if(v(e))for(const t of(0,c.r8)(r))e[s]=e[s].addRing(t);else if(E(e))for(const t of(0,c.r8)(r))e[s]=e[s].addPath(t)}else n=s,e[s]=r}return e}async function M(e,t,n){if(!Array.isArray(e))return M([e],t);t&&"string"!=typeof t&&A().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const s="string"==typeof t?t:t?.url??a.A.geometryServiceUrl;let r,i,u,h,f,v,E,x,I=0;const $=[],P=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,i=(0,d.Vp)(r),u=r.isWebMercator,v=u?102100:4326,h=c.j7[v].maxX,f=c.j7[v].minX,E=c.j7[v].plus180Line,x=c.j7[v].minus180Line),i)if("mesh"===t.type)P.push(t);else if("point"===t.type)P.push(k(t.clone(),h,f));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>k(e,h,f)),P.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,i);P.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,n=(0,c.kd)(e.xmin,f)*(2*h);let a=0===n?t.clone():(0,c.kS)(t.clone(),n);e.offset(n,0);let{xmin:s,xmax:r}=e;s=Number(s.toFixed(9)),r=Number(r.toFixed(9)),e.intersects(E)&&r!==h?(I=r>I?r:I,a=F(a,u),$.push(a),P.push("cut")):e.intersects(x)&&s!==f?(I=r*(2*h)>I?r*(2*h):I,a=F(a,u,360),$.push(a),P.push("cut")):P.push(a)}else P.push(t.clone());else P.push(t);else P.push(t);let O=(0,c.kd)(I,h),C=-90;const L=O,_=new l.A;for(;O>0;){const e=360*O-180;_.addPath([[e,C],[e,-1*C]]),C*=-1,O--}if($.length>0&&L>0){const t=R($,await async function(e,t,n,a){const s=(0,w.Dl)(e),r=t[0].spatialReference,i={...a,responseType:"json",query:{...s.query,f:"json",sr:(0,d.YX)(r),target:JSON.stringify({geometryType:(0,g.$B)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},o=await(0,m.A)(s.path+"/cut",i),{cutIndexes:l,geometries:u=[]}=o.data;return{cutIndexes:l,geometries:u.map(e=>{const t=(0,y.rS)(e);return t.spatialReference=r,t})}}(s,$,_,n)),a=[],r=[];for(let n=0;n<P.length;n++){const s=P[n];if("cut"!==s)r.push(s);else{const s=t.shift(),i=e[n];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&s.rings.length>=i.rings.length?(a.push(s),r.push("simplify")):r.push(u?(0,p.Gh)(s):s)}}if(!a.length)return r;const i=await async function(e,t,n){const a="string"==typeof e?(0,S.An)(e):e,s=t[0].spatialReference,r=(0,g.$B)(t[0]),i={...n,query:{...a.query,f:"json",sr:(0,d.YX)(s),geometries:JSON.stringify((0,b.X)(t))}},{data:o}=await(0,m.A)(a.path+"/simplify",i);return(0,b.V)(o.geometries,r,s)}(s,a,n),o=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?o.push(t):o.push(u?(0,p.Gh)(i.shift()):i.shift())}return o}const D=[];for(let e=0;e<P.length;e++){const t=P[e];if("cut"!==t)D.push(t);else{const e=$.shift();D.push(!0===u?(0,p.Gh)(e):e)}}return D}function x(e,t,n){const a=(0,d.Vp)(n);if(null==a)return e;const[s,r]=a.valid,i=2*r;let o=0,l=0;t>r?o=Math.ceil(Math.abs(t-r)/i):t<s&&(o=-Math.ceil(Math.abs(t-s)/i)),e>r?l=Math.ceil(Math.abs(e-r)/i):e<s&&(l=-Math.ceil(Math.abs(e-s)/i));let u=e+(o-l)*i;const c=u-t;return c>r?u-=i:c<s&&(u+=i),u}function I(e){const t=(0,d.Vp)(e);if(null==t)return null;const[n,a]=t.valid;return new s.hr(n,a)}const $=I(u.A.WGS84);I(u.A.WebMercator)},80754(e,t,n){n.d(t,{j7:()=>o,kS:()=>u,kd:()=>l,r8:()=>c});var a=n(82799),s=n(16930),r=n(60408),i=n(52006);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new a.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator}),minus180Line:new a.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new a.A({paths:[[[180,-180],[180,180]]],spatialReference:s.A.WGS84}),minus180Line:new a.A({paths:[[[-180,-180],[-180,180]]],spatialReference:s.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){if((0,i.Ed)(e))for(const n of function(e){return(0,r.Bi)(e)?e.curveRings:e.curvePaths}(e))for(const e of n){if((0,i.aO)(e)){const[n,a]=e.c;n[0]+=t,a[0]+=t;continue}if((0,i.FG)(e)){const[n,a]=e.a;n[0]+=t,a[0]+=t;continue}if((0,i.n1)(e)){const[n,a,s]=e.b;n[0]+=t,a[0]+=t,s[0]+=t;continue}e[0]+=t}for(const n of c(e))for(const e of n)e[0]+=t;return e}function c(e){return(0,r.Bi)(e)?e.rings:e.paths}},78628(e,t,n){n.d(t,{applyEdits:()=>b,uploadAssets:()=>M});var a=n(52106),s=n(7762),r=n(49186),i=n(4718),o=n(53966),l=n(91869),u=n(84952),c=n(13069),d=n(17136),p=n(21325),h=n(31411),f=n(47685),m=n(30524),g=n(20557),y=n(77548);function w(e){return null!=e?.applyEdits}const S=new WeakMap;async function b(e,t,n,a={}){let u;const d="gdbVersion"in e?e.gdbVersion:null,p=a.gdbVersion??d;if((0,f.Mk)(e)&&e.url)u=(0,f.Zk)(e.url,e.layerId,p,"original-and-current-features"===a.returnServiceEditsOption);else{u=Promise.withResolvers(),u.promise.then(t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)},()=>{});const t={result:u.promise};e.emit("apply-edits",t)}try{const{results:d,edits:p}=await async function(e,t,n,a){if(await e.load(),!w(t))throw new r.A(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,y.tk)(e))throw new r.A(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:u}=await async function(e,t,n){const a=(0,y.BR)(e),i=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),u=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),d=null!=e.infoFor3D;if(function(e,t,n,a,s,i){if(!(e&&(a||s)||n?.usingTelecomOperations))throw new r.A(`${i}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");const o=t.editing.supportsGlobalId||n?.usingFeatureServiceEndpoint;if(!o&&n?.globalIdUsed)throw new r.A(`${i}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!o&&s)throw new r.A(`${i}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!n?.globalIdUsed&&s)throw new r.A(`${i}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}(t,a,n,!!i,!!u,`${e.type}-layer`),!a.data.isVersioned&&n?.gdbVersion)throw new r.A(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!a.editing.supportsRollbackOnFailure&&n?.rollbackOnFailureEnabled)throw new r.A(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const p={...n};if(null!=p.rollbackOnFailureEnabled||a.editing.supportsRollbackOnFailure||(p.rollbackOnFailureEnabled=!0),p.rollbackOnFailureEnabled||"original-and-current-features"!==p.returnServiceEditsOption||(!1===p.rollbackOnFailureEnabled&&o.A.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwritten and set to true."),p.rollbackOnFailureEnabled=!0),!a.editing.supportsReturnServiceEditsInSourceSpatialReference&&p.returnServiceEditsInSourceSR)throw new r.A(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(p.returnServiceEditsInSourceSR&&"original-and-current-features"!==p.returnServiceEditsOption)throw new r.A(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const h=function(e,t,n){const a=function(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&s.A.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}(e);if(a.addFeatures?.length&&!t.operations.supportsAdd)throw new r.A(`${n}:unsupported-operation`,"Layer does not support adding features.");if(a.updateFeatures?.length&&!t.operations.supportsUpdate)throw new r.A(`${n}:unsupported-operation`,"Layer does not support updating features.");if(a.deleteFeatures?.length&&!t.operations.supportsDelete)throw new r.A(`${n}:unsupported-operation`,"Layer does not support deleting features.");return a.addFeatures=a.addFeatures.map(k),a.updateFeatures=a.updateFeatures.map(k),a.addAssetFeatures=[],a}(t,a,`${e.type}-layer`),f=n?.globalIdUsed||d,m=e.fields.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(f){const{globalIdField:t}=e;if(null==t)throw new r.A(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");h.addFeatures.forEach(e=>function(e,t){const{attributes:n}=e;null==n[t]&&(n[t]=(0,c.yS)())}(e,t))}h.addFeatures.forEach(t=>function(e,t,n,a){A(e,t,n,a),v(e,t)}(t,e,f,m)),h.updateFeatures.forEach(t=>function(e,t,n,a){A(e,t,n,a),v(e,t);const s=(0,y.BR)(t);if("geometry"in e&&null!=e.geometry&&!s?.editing.supportsGeometryUpdate)throw new r.A(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,f,m)),h.deleteFeatures.forEach(t=>function(e,t,n,a){A(e,t,n,a)}(t,e,f,m)),h.addAttachments.forEach(t=>E(t,e)),h.updateAttachments.forEach(t=>E(t,e)),d&&await async function(e,t){const{infoFor3D:n}=t;if(null==n)return;if(!(0,g.JQ)(n))throw new r.A(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:a}=e;for(const t of e.addFeatures??[])R(t)&&a.push(t);for(const t of e.updateFeatures??[])R(t)&&a.push(t)}(h,e);const w=(0,l.tE)(S,e,()=>new Map);return{edits:await F(h,a.data.supportedCurveTypes??[],w),options:p}}(e,n,a);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await t.applyEdits(i,u)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,n,a),h=e=>e.filter(e=>!e.error).map(i.o8),f={edits:p,addedFeatures:h(d.addFeatureResults),updatedFeatures:h(d.updateFeatureResults),deletedFeatures:h(d.deleteFeatureResults),addedAttachments:h(d.addAttachmentResults),updatedAttachments:h(d.updateAttachmentResults),deletedAttachments:h(d.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:d.editMoment?new Date(d.editMoment):null,globalIdToObjectId:a.globalIdToObjectId};return d.editedFeatureResults?.length&&(f.editedFeatures=d.editedFeatureResults),u.resolve(f),d}catch(e){throw u.reject(e),e}}function A(e,t,n,a){if(n){if("attributes"in e&&!e.attributes[t.globalIdField])throw new r.A(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new r.A(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(a.length&&"attributes"in e)for(const n of a){const a=e.attributes[n.name];if(void 0!==a&&!(0,m.OG)(n,a))throw new r.A(`${t.type}-layer:invalid-parameter`,`Big-integer field '${n.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:e})}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new r.A(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new r.A(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function v(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D&&null!=t.spatialReference){const{geometry:n}=e,{spatialReference:a,vertexSpace:s}=n,i=t.spatialReference,o="local"===s.type,l=(0,p.EA)(i),u=(0,p.aI)(i,a),c=u||(0,p.oT)(i)&&((0,p.oT)(a)||(0,p.K8)(a));if(!(o&&l&&c||!o&&!l&&u))throw new r.A(`${t.type}-layer:mesh-unsupported`,`Uploading a mesh with a ${s.type} vertex space and a spatial reference wkid:${a.wkid} to a layer with a spatial reference wkid:${i.wkid} is not supported.`)}}function E(e,t){const{feature:n,attachment:a}=e;if(!n||"attributes"in n&&!n.attributes[t.globalIdField])throw new r.A(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in n)&&!n.globalId)throw new r.A(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!a.globalId)throw new r.A(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!a.data&&!a.uploadId)throw new r.A(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(a.data instanceof File&&a.data.name||a.name))throw new r.A(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&a.uploadId)throw new r.A(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof a.data){const e=(0,u.r$)(a.data);if(e&&!e.isBase64)throw new r.A(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function F(e,t,n){const a=e.addFeatures??[],s=e.updateFeatures??[],r=a.concat(s).map(e=>e.geometry),i=await(0,h.gh)(r,t,n),o=await(0,d.el)(i),l=a.length,u=s.length;return o.slice(0,l).forEach((e,t)=>a[t].geometry=e),o.slice(l,l+u).forEach((e,t)=>s[t].geometry=e),e}function k(e){const t=new a.A;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function R(e){return"mesh"===e?.geometry?.type}function M(e,t,n,a){if(!w(t))throw new r.A(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new r.A(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(n,a)}},92300(e,t,n){n.d(t,{V:()=>i,X:()=>r});var a=n(60408),s=n(65864);function r(e){return{geometryType:(0,a.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function i(e,t,n){const a=(0,s.xD)(t);return e.map(e=>{const t=a.fromJSON(e);return t.spatialReference=n,t})}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6247],{69052(e,t,n){n.d(t,{hr:()=>s,ie:()=>l,uC:()=>o});var a=n(34727);class s{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,n=!1){return r(this.range,this.min,this.max,e,t,n)}clamp(e,t=0){return(0,a.qE)(e-t,this.min,this.max)+t}monotonic(e,t,n){return e<t?t:t+i(this.range,e-t,n)}minimalMonotonic(e,t,n){return r(this.range,e,e+this.range,t,n)}center(e,t,n){return t=this.monotonic(e,t,n),this.normalize((e+t)/2,n)}diff(e,t,n){return this.monotonic(e,t,n)-e}shortestSignedDiff(e,t){e=this.normalize(e);const n=(t=this.normalize(t))-e,a=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(n)<Math.abs(a)?n:a}contains(e,t,n){return t=this.minimalMonotonic(e,t),(n=this.minimalMonotonic(e,n))>e&&n<t}}function r(e,t,n,a,s=0,r=!1){return(a-=s)<t?a+=i(e,t-a):a>n&&(a-=i(e,a-n)),r&&a===n&&(a=t),a+s}function i(e,t,n=0){return Math.ceil((t-n)/e)*e+n}const o=new s(0,2*Math.PI),l=(new s(-Math.PI,Math.PI),new s(0,360))},31411(e,t,n){n.d(t,{GS:()=>F,gh:()=>R});var a=n(49186),s=n(56512),r=n(65864),i=n(4305),o=n(50954),l=n(52006),u=n(49663),c=n(46068),d=n(15507);const p=1e-6,h=[0,0];function f(e){return{maxSegmentLength:e.maxSegmentLength??0,maxDeviation:e.maxDeviation??0,maxSegmentsPerCurve:e.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(e.minSegmentsPerCurve??1,1)}}class m{constructor(e,t){this.curveStart=e,this.curveEnd=t,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(e,t){this.tStart=0,this.arcStart=e,this.tEndStack.push(1),this.arcEndStack.push(t)}splitAt(e){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(e),this.arcEndStack.push(this.interpolate(e))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(e,{maxDeviation:t,maxSegmentLength:n,maxSegmentsPerCurve:a,minSegmentsPerCurve:s}){const r=n*n,i=t*t,o=1/a,l=this.interpolate(0),u=this.interpolate(1);(0,d.kb)(this.curveStart,l)>p&&e.push(l),this.initialize(l,u);const c=1/s;for(let e=s-1;e>0;e--){const t=e*c;this.pop(),this.splitAt(t)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<o||(0===r||!isFinite(r)||(0,d.kb)(this.arcStart,this.arcEnd)<r)&&(0===i||!isFinite(i)||this.getDeviation2()<i)?(e.push(this.arcEnd),this.next()):this.splitInHalf();return(0,d.kb)(this.curveEnd,u)>p&&e.push([...this.curveEnd]),e}}class g extends m{constructor(e,t){const[n,a,s]=t.b;super(e,n),this._controlPointsStack=[],this._curveControlPoints=[a,s],this._arcControlPoints=[a,s],this._controlPointsStack.push(this._arcControlPoints)}splitAt(e){const{arcStart:t,arcEnd:n,tStart:a,tEnd:s}=this,[r,i]=this._arcControlPoints,o=(e-a)/(s-a),l=(0,d.RS)([],t,r,o),u=(0,d.RS)(h,r,i,o),c=(0,d.RS)([],i,n,o),p=(0,d.RS)([],l,u,o),f=(0,d.RS)([],u,c,o),m=(0,d.RS)([],p,f,o);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([f,c]),this.tEndStack.push(e),this.arcEndStack.push(m),this._arcControlPoints[0]=l,this._arcControlPoints[1]=p,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(e){const{curveStart:t,curveEnd:n}=this,[a,s]=this._curveControlPoints;return(0,i.B4)(t,a,s,n,e)}getDeviation2(){const{arcStart:e,arcEnd:t}=this,[n,a]=this._arcControlPoints;return Math.max((0,d.yE)(n,e,t),(0,d.yE)(a,e,t))}}class y extends m{constructor(e,t){const[n]=t.a;super(e,n),this._derivedEllipse=(0,c.SW)(e,t)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(e){return(0,c.Uk)(this._derivedEllipse,e)}getDeviation2(){return(0,d.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function w(e,t,n,{cx:a,cy:s,radius:r,thetaStart:i,thetaEnd:o,isInvalid:l},{maxDeviation:u,maxSegmentLength:c,maxSegmentsPerCurve:h,minSegmentsPerCurve:f}){if(l)return e.push([...n]),e;const m=2*r,g=[a+r*Math.cos(i),s+r*Math.sin(i)],y=[a+r*Math.cos(o),s+r*Math.sin(o)];(0,d.kb)(t,g)>p&&e.push(g);const w=Math.abs(o-i),S=c>0&&c<m?2*Math.asin(c/m):w,b=u>0&&u<=r?2*Math.acos(1-u/r):w,A=Math.min(S,b),v=Math.min(h,Math.max(f,Math.ceil(Math.abs(w/A)))),E=1/v;for(let t=1;t<v;t++){const n=t*E,l=i*(1-n)+o*n;e.push([a+r*Math.cos(l),s+r*Math.sin(l)])}return e.push(y),(0,d.kb)(n,y)>p&&e.push([...n]),e}function S(e,t,n,a){return new g(t,n).densify(e,a)}function b(e,t,n,a){const s=(0,o.pM)(t,n),[r]=n.c;return w(e,t,r,s,a)}function A(e,t,n,a){const s=(0,u.io)(t,n),[r]=n.a;return w(e,t,r,s,a)}function v(e,t,n,a){const[s,r,i,o,l,u,c]=n.a;return 0===u||0===c?(e.push([...s]),e):new y(t,n).densify(e,a)}function E(e,t,n,a){return(0,l.Xq)(n)?(e.push([...n]),e):(0,l.n1)(n)?S(e,t,n,a):(0,l.aO)(n)?b(e,t,n,a):(0,l.DA)(n)?A(e,t,n,a):v(e,t,n,a)}function F(e,t={}){if(!(0,l.Ed)(e))return e;const n=f(t),a=(0,l.FD)(e),s=[];for(const e of a){const t=[];for(let a=0;a<e.length-1;a++){const s=a+1,r=[...(0,l.yP)(e[a])];0===a&&t.push(r),E(t,r,e[s],n)}s.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},paths:s,spatialReference:e.spatialReference}:{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},rings:s,spatialReference:e.spatialReference}}const k=(0,s.B)(e=>({maxDeviation:0,maxSegmentLength:100*e,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function R(e,t,s){const i=new Set(t);return await async function(e,t,s){let r=null;for(const i of e)if(i&&(0,l.Ed)(i)&&null==i.spatialReference.xyTolerance&&(0,l.V8)(i,t)){const e=i.spatialReference;if(!e)throw new a.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const t=M(e);if(s.has(t))i.spatialReference=s.get(t);else{r||(r=await Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(3299),n.e(1550)]).then(n.bind(n,78125)));const o=r.fromSpatialReference(e),l=o?.getTolerance();if(null==l)throw new a.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const u=i.spatialReference.clone();u.read({xyTolerance:l}),i.spatialReference=u,s.set(t,u)}}}(e,i,s),e.map(e=>{if(!e||!(0,l.Ed)(e))return e;const n=e.spatialReference.xyTolerance;if(null==n)return e;const a=k(n);return(0,r.rS)(function(e,t,n){if(!(0,l.Ed)(e))return e;const a=new Set(t),s=f(n),r=(0,l.FD)(e),i=[];let o=!1;for(const e of r){const t=[];for(let n=0;n<e.length-1;n++){const r=n+1,i=[...(0,l.yP)(e[n])];0===n&&t.push(i);const u=e[r];(0,l.Xq)(u)?t.push([...u]):(0,l.n1)(u)&&!a.has("cubic-bezier")?S(t,i,u,s):(0,l.aO)(u)&&!a.has("circular-arc")?b(t,i,u,s):(0,l.DA)(u)&&!a.has("elliptic-arc")?A(t,i,u,s):(0,l.wY)(u)&&!a.has("elliptic-arc")?v(t,i,u,s):(t.push((0,l.tk)(u)),o=!0)}i.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},spatialReference:e.spatialReference,...o?{curvePaths:i}:{paths:i}}:{hasZ:e.hasZ,hasM:e.hasM,spatialReference:e.spatialReference,...o?{curveRings:i}:{rings:i}}}(e,t,a))})}function M(e){if(null!=e.wkid)return`${e.wkid}`;if(null!=e.wkt)return e.wkt;const t="toJSON"in e&&"function"==typeof e.toJSON?e.toJSON():e;return JSON.stringify(t)}},17136(e,t,n){n.d(t,{Y_:()=>$,O7:()=>x,el:()=>M});var a=n(92602),s=n(69052),r=n(49186),i=n(53966),o=n(39829),l=n(82799),u=n(16930),c=n(80754),d=n(21325),p=n(28735),h=n(52006),f=n(31411),m=n(11254),g=n(60408),y=n(65864),w=n(2272),S=n(84952),b=n(92300);const A=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function v(e){return"polygon"===e[0].type}function E(e){return"polyline"===e[0].type}function F(e,t,n){const a=1e6;if(t){const t=(0,h.Ed)(e)?(0,f.GS)(e,{maxSegmentLength:a}):function(e,t){if(!(e instanceof l.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw A().error(e),new r.A("internal:geometry",e)}const n=(0,c.r8)(e),a=[];for(const e of n){const n=[];a.push(n),n.push([e[0][0],e[0][1]]);for(let a=0;a<e.length-1;a++){const s=e[a][0],r=e[a][1],i=e[a+1][0],o=e[a+1][1],l=Math.sqrt((i-s)*(i-s)+(o-r)*(o-r)),u=(o-r)/l,c=(i-s)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const a=e*t,i=c*a+s,o=u*a+r;n.push([i,o])}const e=(l+Math.floor(d-1)*t)/2,a=c*e+s,i=u*e+r;n.push([a,i])}n.push([i,o])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:a,spatialReference:e.spatialReference}):new l.A({paths:a,spatialReference:e.spatialReference})}(e,a);e=(0,p.ci)(t,!0)}return n&&(e=(0,c.kS)(e,n)),e}function k(e,t,n){if(Array.isArray(e)){const a=e[0];if(a>t){const n=(0,c.kd)(a,t);e[0]=a+n*(-2*t)}else if(a<n){const t=(0,c.kd)(a,n);e[0]=a+t*(-2*n)}}else{const a=e.x;if(a>t){const n=(0,c.kd)(a,t);e=e.clone().offset(n*(-2*t),0)}else if(a<n){const t=(0,c.kd)(a,n);e=e.clone().offset(t*(-2*n),0)}}return e}function R(e,t){let n=-1;for(let a=0;a<t.cutIndexes.length;a++){const s=t.cutIndexes[a],r=t.geometries[a],i=(0,c.r8)(r);for(let e=0;e<i.length;e++){const t=i[e];t.some(n=>{if(n[0]<180)return!0;{let n=0;for(let e=0;e<t.length;e++){const a=t[e][0];n=a>n?a:n}n=Number(n.toFixed(9));const a=-360*(0,c.kd)(n,180);for(let n=0;n<t.length;n++){const t=r.getPoint(e,n);r.setPoint(e,n,t.clone().offset(a,0))}return!0}})}if(s===n){if(v(e))for(const t of(0,c.r8)(r))e[s]=e[s].addRing(t);else if(E(e))for(const t of(0,c.r8)(r))e[s]=e[s].addPath(t)}else n=s,e[s]=r}return e}async function M(e,t,n){if(!Array.isArray(e))return M([e],t);t&&"string"!=typeof t&&A().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const s="string"==typeof t?t:t?.url??a.A.geometryServiceUrl;let r,i,u,h,f,v,E,x,I=0;const $=[],P=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,i=(0,d.Vp)(r),u=r.isWebMercator,v=u?102100:4326,h=c.j7[v].maxX,f=c.j7[v].minX,E=c.j7[v].plus180Line,x=c.j7[v].minus180Line),i)if("mesh"===t.type)P.push(t);else if("point"===t.type)P.push(k(t.clone(),h,f));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>k(e,h,f)),P.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,i);P.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,n=(0,c.kd)(e.xmin,f)*(2*h);let a=0===n?t.clone():(0,c.kS)(t.clone(),n);e.offset(n,0);let{xmin:s,xmax:r}=e;s=Number(s.toFixed(9)),r=Number(r.toFixed(9)),e.intersects(E)&&r!==h?(I=r>I?r:I,a=F(a,u),$.push(a),P.push("cut")):e.intersects(x)&&s!==f?(I=r*(2*h)>I?r*(2*h):I,a=F(a,u,360),$.push(a),P.push("cut")):P.push(a)}else P.push(t.clone());else P.push(t);else P.push(t);let O=(0,c.kd)(I,h),C=-90;const L=O,_=new l.A;for(;O>0;){const e=360*O-180;_.addPath([[e,C],[e,-1*C]]),C*=-1,O--}if($.length>0&&L>0){const t=R($,await async function(e,t,n,a){const s=(0,w.Dl)(e),r=t[0].spatialReference,i={...a,responseType:"json",query:{...s.query,f:"json",sr:(0,d.YX)(r),target:JSON.stringify({geometryType:(0,g.$B)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},o=await(0,m.A)(s.path+"/cut",i),{cutIndexes:l,geometries:u=[]}=o.data;return{cutIndexes:l,geometries:u.map(e=>{const t=(0,y.rS)(e);return t.spatialReference=r,t})}}(s,$,_,n)),a=[],r=[];for(let n=0;n<P.length;n++){const s=P[n];if("cut"!==s)r.push(s);else{const s=t.shift(),i=e[n];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&s.rings.length>=i.rings.length?(a.push(s),r.push("simplify")):r.push(u?(0,p.Gh)(s):s)}}if(!a.length)return r;const i=await async function(e,t,n){const a="string"==typeof e?(0,S.An)(e):e,s=t[0].spatialReference,r=(0,g.$B)(t[0]),i={...n,query:{...a.query,f:"json",sr:(0,d.YX)(s),geometries:JSON.stringify((0,b.X)(t))}},{data:o}=await(0,m.A)(a.path+"/simplify",i);return(0,b.V)(o.geometries,r,s)}(s,a,n),o=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?o.push(t):o.push(u?(0,p.Gh)(i.shift()):i.shift())}return o}const D=[];for(let e=0;e<P.length;e++){const t=P[e];if("cut"!==t)D.push(t);else{const e=$.shift();D.push(!0===u?(0,p.Gh)(e):e)}}return D}function x(e,t,n){const a=(0,d.Vp)(n);if(null==a)return e;const[s,r]=a.valid,i=2*r;let o=0,l=0;t>r?o=Math.ceil(Math.abs(t-r)/i):t<s&&(o=-Math.ceil(Math.abs(t-s)/i)),e>r?l=Math.ceil(Math.abs(e-r)/i):e<s&&(l=-Math.ceil(Math.abs(e-s)/i));let u=e+(o-l)*i;const c=u-t;return c>r?u-=i:c<s&&(u+=i),u}function I(e){const t=(0,d.Vp)(e);if(null==t)return null;const[n,a]=t.valid;return new s.hr(n,a)}const $=I(u.A.WGS84);I(u.A.WebMercator)},80754(e,t,n){n.d(t,{j7:()=>o,kS:()=>u,kd:()=>l,r8:()=>c});var a=n(82799),s=n(16930),r=n(60408),i=n(52006);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new a.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator}),minus180Line:new a.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new a.A({paths:[[[180,-180],[180,180]]],spatialReference:s.A.WGS84}),minus180Line:new a.A({paths:[[[-180,-180],[-180,180]]],spatialReference:s.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){if((0,i.Ed)(e))for(const n of function(e){return(0,r.Bi)(e)?e.curveRings:e.curvePaths}(e))for(const e of n){if((0,i.aO)(e)){const[n,a]=e.c;n[0]+=t,a[0]+=t;continue}if((0,i.FG)(e)){const[n,a]=e.a;n[0]+=t,a[0]+=t;continue}if((0,i.n1)(e)){const[n,a,s]=e.b;n[0]+=t,a[0]+=t,s[0]+=t;continue}e[0]+=t}for(const n of c(e))for(const e of n)e[0]+=t;return e}function c(e){return(0,r.Bi)(e)?e.rings:e.paths}},78628(e,t,n){n.d(t,{applyEdits:()=>b,uploadAssets:()=>M});var a=n(52106),s=n(7762),r=n(49186),i=n(4718),o=n(53966),l=n(91869),u=n(84952),c=n(13069),d=n(17136),p=n(21325),h=n(31411),f=n(47685),m=n(30524),g=n(20557),y=n(77548);function w(e){return null!=e?.applyEdits}const S=new WeakMap;async function b(e,t,n,a={}){let u;const d="gdbVersion"in e?e.gdbVersion:null,p=a.gdbVersion??d;if((0,f.Mk)(e)&&e.url)u=(0,f.Zk)(e.url,e.layerId,p,"original-and-current-features"===a.returnServiceEditsOption);else{u=Promise.withResolvers(),u.promise.then(t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)},()=>{});const t={result:u.promise};e.emit("apply-edits",t)}try{const{results:d,edits:p}=await async function(e,t,n,a){if(await e.load(),!w(t))throw new r.A(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,y.tk)(e))throw new r.A(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:u}=await async function(e,t,n){const a=(0,y.BR)(e),i=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),u=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),d=null!=e.infoFor3D;if(function(e,t,n,a,s,i){if(!(e&&(a||s)||n?.usingTelecomOperations))throw new r.A(`${i}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");const o=t.editing.supportsGlobalId||n?.usingFeatureServiceEndpoint;if(!o&&n?.globalIdUsed)throw new r.A(`${i}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!o&&s)throw new r.A(`${i}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!n?.globalIdUsed&&s)throw new r.A(`${i}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}(t,a,n,!!i,!!u,`${e.type}-layer`),!a.data.isVersioned&&n?.gdbVersion)throw new r.A(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!a.editing.supportsRollbackOnFailure&&n?.rollbackOnFailureEnabled)throw new r.A(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const p={...n};if(null!=p.rollbackOnFailureEnabled||a.editing.supportsRollbackOnFailure||(p.rollbackOnFailureEnabled=!0),p.rollbackOnFailureEnabled||"original-and-current-features"!==p.returnServiceEditsOption||(!1===p.rollbackOnFailureEnabled&&o.A.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwritten and set to true."),p.rollbackOnFailureEnabled=!0),!a.editing.supportsReturnServiceEditsInSourceSpatialReference&&p.returnServiceEditsInSourceSR)throw new r.A(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(p.returnServiceEditsInSourceSR&&"original-and-current-features"!==p.returnServiceEditsOption)throw new r.A(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const h=function(e,t,n){const a=function(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&s.A.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}(e);if(a.addFeatures?.length&&!t.operations.supportsAdd)throw new r.A(`${n}:unsupported-operation`,"Layer does not support adding features.");if(a.updateFeatures?.length&&!t.operations.supportsUpdate)throw new r.A(`${n}:unsupported-operation`,"Layer does not support updating features.");if(a.deleteFeatures?.length&&!t.operations.supportsDelete)throw new r.A(`${n}:unsupported-operation`,"Layer does not support deleting features.");return a.addFeatures=a.addFeatures.map(k),a.updateFeatures=a.updateFeatures.map(k),a.addAssetFeatures=[],a}(t,a,`${e.type}-layer`),f=n?.globalIdUsed||d,m=e.fields.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(f){const{globalIdField:t}=e;if(null==t)throw new r.A(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");h.addFeatures.forEach(e=>function(e,t){const{attributes:n}=e;null==n[t]&&(n[t]=(0,c.yS)())}(e,t))}h.addFeatures.forEach(t=>function(e,t,n,a){A(e,t,n,a),v(e,t)}(t,e,f,m)),h.updateFeatures.forEach(t=>function(e,t,n,a){A(e,t,n,a),v(e,t);const s=(0,y.BR)(t);if("geometry"in e&&null!=e.geometry&&!s?.editing.supportsGeometryUpdate)throw new r.A(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,f,m)),h.deleteFeatures.forEach(t=>function(e,t,n,a){A(e,t,n,a)}(t,e,f,m)),h.addAttachments.forEach(t=>E(t,e)),h.updateAttachments.forEach(t=>E(t,e)),d&&await async function(e,t){const{infoFor3D:n}=t;if(null==n)return;if(!(0,g.JQ)(n))throw new r.A(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:a}=e;for(const t of e.addFeatures??[])R(t)&&a.push(t);for(const t of e.updateFeatures??[])R(t)&&a.push(t)}(h,e);const w=(0,l.tE)(S,e,()=>new Map);return{edits:await F(h,a.data.supportedCurveTypes??[],w),options:p}}(e,n,a);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await t.applyEdits(i,u)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,n,a),h=e=>e.filter(e=>!e.error).map(i.o8),f={edits:p,addedFeatures:h(d.addFeatureResults),updatedFeatures:h(d.updateFeatureResults),deletedFeatures:h(d.deleteFeatureResults),addedAttachments:h(d.addAttachmentResults),updatedAttachments:h(d.updateAttachmentResults),deletedAttachments:h(d.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:d.editMoment?new Date(d.editMoment):null,globalIdToObjectId:a.globalIdToObjectId};return d.editedFeatureResults?.length&&(f.editedFeatures=d.editedFeatureResults),u.resolve(f),d}catch(e){throw u.reject(e),e}}function A(e,t,n,a){if(n){if("attributes"in e&&!e.attributes[t.globalIdField])throw new r.A(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new r.A(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(a.length&&"attributes"in e)for(const n of a){const a=e.attributes[n.name];if(void 0!==a&&!(0,m.OG)(n,a))throw new r.A(`${t.type}-layer:invalid-parameter`,`Big-integer field '${n.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:e})}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new r.A(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new r.A(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function v(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D&&null!=t.spatialReference){const{geometry:n}=e,{spatialReference:a,vertexSpace:s}=n,i=t.spatialReference,o="local"===s.type,l=(0,p.EA)(i),u=(0,p.aI)(i,a),c=u||(0,p.oT)(i)&&((0,p.oT)(a)||(0,p.K8)(a));if(!(o&&l&&c||!o&&!l&&u))throw new r.A(`${t.type}-layer:mesh-unsupported`,`Uploading a mesh with a ${s.type} vertex space and a spatial reference wkid:${a.wkid} to a layer with a spatial reference wkid:${i.wkid} is not supported.`)}}function E(e,t){const{feature:n,attachment:a}=e;if(!n||"attributes"in n&&!n.attributes[t.globalIdField])throw new r.A(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in n)&&!n.globalId)throw new r.A(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!a.globalId)throw new r.A(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!a.data&&!a.uploadId)throw new r.A(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(a.data instanceof File&&a.data.name||a.name))throw new r.A(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&a.uploadId)throw new r.A(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof a.data){const e=(0,u.r$)(a.data);if(e&&!e.isBase64)throw new r.A(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function F(e,t,n){const a=e.addFeatures??[],s=e.updateFeatures??[],r=a.concat(s).map(e=>e.geometry),i=await(0,h.gh)(r,t,n),o=await(0,d.el)(i),l=a.length,u=s.length;return o.slice(0,l).forEach((e,t)=>a[t].geometry=e),o.slice(l,l+u).forEach((e,t)=>s[t].geometry=e),e}function k(e){const t=new a.A;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function R(e){return"mesh"===e?.geometry?.type}function M(e,t,n,a){if(!w(t))throw new r.A(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new r.A(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(n,a)}},92300(e,t,n){n.d(t,{V:()=>i,X:()=>r});var a=n(60408),s=n(65864);function r(e){return{geometryType:(0,a.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function i(e,t,n){const a=(0,s.xD)(t);return e.map(e=>{const t=a.fromJSON(e);return t.spatialReference=n,t})}}}]);
@@ -623,7 +623,7 @@ return fallOffFunction(vv, vn, 0.1);
623
623
  vec2 uvOffset = uv + rf * blurSize;
624
624
  blurFunction(uvOffset, rf, center_d, sharpness, w_total, b);
625
625
  }
626
- fragBlur = b / w_total;`),e}const h=Object.freeze(Object.defineProperty({__proto__:null,build:d},Symbol.toStringTag,{value:"Module"}))},43609(e,t,r){r.d(t,{a:()=>n,f:()=>i,n:()=>a});var o=r(34275);function a(e,t){n(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r=2,a=r){const n=t.length/2;let i=0,s=0;if(!(0,o.iu)(t)||(0,o.dk)(t)){for(let o=0;o<n;++o)e[i]=t[s],e[i+1]=t[s+1],i+=r,s+=a;return}const l=(0,o.a3)(t);if((0,o.JI)(t))for(let o=0;o<n;++o)e[i]=Math.max(t[s]/l,-1),e[i+1]=Math.max(t[s+1]/l,-1),i+=r,s+=a;else for(let o=0;o<n;++o)e[i]=t[s]/l,e[i+1]=t[s+1]/l,i+=r,s+=a}function i(e,t,r,o){const a=e.typedBuffer,n=e.typedBufferStride,i=o?.count??e.count;let s=(o?.dstIndex??0)*n;for(let e=0;e<i;++e)a[s]=t,a[s+1]=r,s+=n}Object.freeze(Object.defineProperty({__proto__:null,fill:i,normalizeIntegerBuffer:n,normalizeIntegerBufferView:a},Symbol.toStringTag,{value:"Module"}))},73354(e,t,r){r.d(t,{a:()=>i,b:()=>l,c:()=>n,d:()=>s,e:()=>m,f:()=>d,l:()=>u,n:()=>f,t:()=>h});var o=r(40876),a=(r(44208),r(72727));function n(e,t,r){i(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function i(e,t,r,o=3,n=o){const i=(0,a.k)(e.length,o,3),s=(0,a.k)(t.length,n,3),l=Math.min(i,s),c=r[0],u=r[1],d=r[2],h=r[4],m=r[5],f=r[6],p=r[8],v=r[9],g=r[10],x=r[12],b=r[13],y=r[14];let w=0,M=0;for(let r=0;r<l;r++){const r=t[w],a=t[w+1],i=t[w+2];e[M]=c*r+h*a+p*i+x,e[M+1]=u*r+m*a+v*i+b,e[M+2]=d*r+f*a+g*i+y,w+=n,M+=o}return e}function s(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function l(e,t,r,o=3,n=o){const i=(0,a.k)(e.length,o,3),s=(0,a.k)(t.length,n,3),l=Math.min(i,s),c=r[0],u=r[1],d=r[2],h=r[3],m=r[4],f=r[5],p=r[6],v=r[7],g=r[8];let x=0,b=0;for(let r=0;r<l;r++){const r=t[x],a=t[x+1],i=t[x+2];e[b]=c*r+h*a+p*i,e[b+1]=u*r+m*a+v*i,e[b+2]=d*r+f*a+g*i,x+=n,b+=o}}function c(e,t,r,o=3,a=o){const n=Math.min(e.length/o,t.length/a);let i=0,s=0;for(let l=0;l<n;l++)e[s]=r*t[i],e[s+1]=r*t[i+1],e[s+2]=r*t[i+2],i+=a,s+=o;return e}function u(e,t,r,o){d(e.typedBuffer,t.typedBuffer,r,o,e.typedBufferStride,t.typedBufferStride)}function d(e,t,r,a,n=3,i=n){const s=Math.min(e.length/n,t.length/i);let l=0,c=0;const u=1/o.Tf;for(let o=0;o<s;o++)e[c]=a*(r*t[l])**u,e[c+1]=a*(r*t[l+1])**u,e[c+2]=a*(r*t[l+2])**u,l+=i,c+=n}function h(e,t,r,o=3,n=o){const i=(0,a.k)(e.length,o,3),s=(0,a.k)(t.length,n,3),l=Math.min(i,s);let c=0,u=0;for(let a=0;a<l;a++)e[u]=t[c]+r[0],e[u+1]=t[c+1]+r[1],e[u+2]=t[c+2]+r[2],c+=n,u+=o;return e}function m(e,t){f(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function f(e,t,r=3,o=r){const a=Math.min(e.length/r,t.length/o);let n=0,i=0;for(let s=0;s<a;s++){const a=t[n],s=t[n+1],l=t[n+2],c=a*a+s*s+l*l;if(c>0){const t=1/Math.sqrt(c);e[i]=t*a,e[i+1]=t*s,e[i+2]=t*l}n+=o,i+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:d,linearToSRGBView:u,normalize:f,normalizeView:m,scale:c,scaleView:function(e,t,r){c(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const o=Math.min(e.count,t.count),a=e.typedBuffer,n=e.typedBufferStride,i=t.typedBuffer,s=t.typedBufferStride;let l=0,c=0;for(let e=0;e<o;e++)a[c]=i[l]>>r,a[c+1]=i[l+1]>>r,a[c+2]=i[l+2]>>r,l+=s,c+=n},transformMat3:l,transformMat3View:s,transformMat4:i,transformMat4View:n,translate:h},Symbol.toStringTag,{value:"Module"}))},69052(e,t,r){r.d(t,{hr:()=>a,ie:()=>l,uC:()=>s});var o=r(34727);class a{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return n(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,o.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+i(this.range,e-t,r)}minimalMonotonic(e,t,r){return n(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,o=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(o)?r:o}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function n(e,t,r,o,a=0,n=!1){return(o-=a)<t?o+=i(e,t-o):o>r&&(o-=i(e,o-r)),n&&o===r&&(o=t),o+a}function i(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const s=new a(0,2*Math.PI),l=(new a(-Math.PI,Math.PI),new a(0,360))},46140(e,t,r){r.d(t,{A:()=>a});var o=r(49186);class a{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new o.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new a(this.major,this.minor,this._context)}static parse(e,t=""){const[r,n]=e.split("."),i=/^\s*\d+\s*$/;if(!r?.match||!i.test(r))throw new o.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!n?.match||!i.test(n))throw new o.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const s=parseInt(r,10),l=parseInt(n,10);return new a(s,l,t)}}},61473(e,t,r){function o(e){return e=e||globalThis.location.hostname,c.some(t=>null!=e?.match(t))}function a(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(n)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(i)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}r.d(t,{EM:()=>a,b5:()=>o});const n=/^devext\.arcgis\.com$/,i=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,l=/^[\w-]*\.mapsqa\.arcgis\.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,n,i,/^jsapps\.esri\.com$/,s,l]},82534(e,t,r){function o(){return[0,0,0,1]}function a(e){return[e[0],e[1],e[2],e[3]]}r.d(t,{o8:()=>a,vt:()=>o,zK:()=>n});const n=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:n,clone:a,create:o,fromValues:function(e,t,r,o){return[e,t,r,o]}},Symbol.toStringTag,{value:"Module"}))},88340(e,t,r){function o(){return new Float32Array(2)}function a(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function n(){return o()}function i(){return a(1,1)}function s(){return a(1,0)}function l(){return a(0,1)}r.d(t,{Un:()=>u,fA:()=>a,uY:()=>c,vt:()=>o});const c=n(),u=i(),d=s(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:d,UNIT_Y:h,ZEROS:c,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:o,fromValues:a,ones:i,unitX:s,unitY:l,zeros:n},Symbol.toStringTag,{value:"Module"}))},48163(e,t,r){function o(){return[0,0]}function a(e){return[e[0],e[1]]}function n(e,t){return[e,t]}function i(){return n(1,1)}function s(){return n(-1,-1)}function l(){return n(1,0)}function c(){return n(0,1)}r.d(t,{IA:()=>d,Un:()=>u,fA:()=>n,o8:()=>a,vt:()=>o});const u=i(),d=s(),h=l(),m=c();Object.freeze(Object.defineProperty({__proto__:null,NEGATIVE_ONES:d,ONES:u,UNIT_X:h,UNIT_Y:m,ZEROS:[0,0],clone:a,create:o,freeze:function(e,t){return[e,t]},fromArray:function(e,t=[0,0]){const r=Math.min(2,e.length);for(let o=0;o<r;++o)t[o]=e[o];return t},fromValues:n,negativeOnes:s,ones:i,unitX:l,unitY:c,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},91829(e,t,r){function o(){return[0,0,0,0]}function a(e,t,r,o){return[e,t,r,o]}function n(e,t,r,o){return[e,t,r,o]}function i(){return a(1,1,1,1)}function s(){return a(1,0,0,0)}function l(){return a(0,1,0,0)}function c(){return a(0,0,1,0)}function u(){return a(0,0,0,1)}r.d(t,{CN:()=>n,Un:()=>h,_Y:()=>u,fA:()=>a,uY:()=>d,vt:()=>o});const d=[0,0,0,0],h=i(),m=s(),f=l(),p=c(),v=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_W:v,UNIT_X:m,UNIT_Y:f,UNIT_Z:p,ZEROS:d,clone:function(e){return[e[0],e[1],e[2],e[3]]},create:o,freeze:n,fromArray:function(e,t=[0,0,0,0]){const r=Math.min(4,e.length);for(let o=0;o<r;++o)t[o]=e[o];return t},fromValues:a,ones:i,unitW:u,unitX:s,unitY:l,unitZ:c,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},78955(e,t,r){r.d(t,{Bw:()=>v,C:()=>a,Cc:()=>y,LI:()=>h,Om:()=>b,S8:()=>x,T9:()=>d,WQ:()=>i,Z0:()=>w,aI:()=>S,hG:()=>p,hZ:()=>n,hs:()=>m,jk:()=>u,m3:()=>g,t2:()=>M});var o=r(34304);function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function n(e,t,r,o,a){return e[0]=t,e[1]=r,e[2]=o,e[3]=a,e}function i(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function s(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function l(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function c(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function u(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}function d(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}function h(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function m(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function f(e,t){const r=t[0]-e[0],o=t[1]-e[1],a=t[2]-e[2],n=t[3]-e[3];return Math.sqrt(r*r+o*o+a*a+n*n)}function p(e,t){const r=t[0]-e[0],o=t[1]-e[1],a=t[2]-e[2],n=t[3]-e[3];return r*r+o*o+a*a+n*n}function v(e){const t=e[0],r=e[1],o=e[2],a=e[3];return Math.sqrt(t*t+r*r+o*o+a*a)}function g(e){const t=e[0],r=e[1],o=e[2],a=e[3];return t*t+r*r+o*o+a*a}function x(e,t){const r=t[0],o=t[1],a=t[2],n=t[3];let i=r*r+o*o+a*a+n*n;return i>0&&(i=1/Math.sqrt(i),e[0]=r*i,e[1]=o*i,e[2]=a*i,e[3]=n*i),e}function b(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function y(e,t,r,o){const a=t[0],n=t[1],i=t[2],s=t[3];return e[0]=a+o*(r[0]-a),e[1]=n+o*(r[1]-n),e[2]=i+o*(r[2]-i),e[3]=s+o*(r[3]-s),e}function w(e,t,r){const o=t[0],a=t[1],n=t[2],i=t[3];return e[0]=r[0]*o+r[4]*a+r[8]*n+r[12]*i,e[1]=r[1]*o+r[5]*a+r[9]*n+r[13]*i,e[2]=r[2]*o+r[6]*a+r[10]*n+r[14]*i,e[3]=r[3]*o+r[7]*a+r[11]*n+r[15]*i,e}function M(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function S(e,t){const r=e[0],a=e[1],n=e[2],i=e[3],s=t[0],l=t[1],c=t[2],u=t[3],d=(0,o.FD)();return Math.abs(r-s)<=d*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(a-l)<=d*Math.max(1,Math.abs(a),Math.abs(l))&&Math.abs(n-c)<=d*Math.max(1,Math.abs(n),Math.abs(c))&&Math.abs(i-u)<=d*Math.max(1,Math.abs(i),Math.abs(u))}const T=s,C=l,_=c,I=f,P=p,z=v,R=g;Object.freeze(Object.defineProperty({__proto__:null,add:i,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:a,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:I,distance:f,div:_,divide:c,dot:b,equals:S,exactEquals:M,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:z,length:v,lerp:y,max:d,min:u,mul:C,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:x,random:function(e,t=1){const r=o.Ov;let a,n,i,s,l,c;do{a=2*r()-1,n=2*r()-1,l=a*a+n*n}while(l>=1);do{i=2*r()-1,s=2*r()-1,c=i*i+s*s}while(c>=1);const u=Math.sqrt((1-l)/c);return e[0]=t*a,e[1]=t*n,e[2]=t*i*u,e[3]=t*s*u,e},round:h,scale:m,scaleAndAdd:function(e,t,r,o){return e[0]=t[0]+r[0]*o,e[1]=t[1]+r[1]*o,e[2]=t[2]+r[2]*o,e[3]=t[3]+r[3]*o,e},set:n,sqrDist:P,sqrLen:R,squaredDistance:p,squaredLength:g,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:T,subtract:s,transformMat4:w,transformQuat:function(e,t,r){const o=t[0],a=t[1],n=t[2],i=r[0],s=r[1],l=r[2],c=r[3],u=c*o+s*n-l*a,d=c*a+l*o-i*n,h=c*n+i*a-s*o,m=-i*o-s*a-l*n;return e[0]=u*c+m*-i+d*-l-h*-s,e[1]=d*c+m*-s+h*-i-u*-l,e[2]=h*c+m*-l+u*-s-d*-i,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},56512(e,t,r){function o(e){let t,r,o=[],a=!1;return function(...n){return a&&t===this&&function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0}(n,o)||(r=e.apply(this,n),t=this,o=n,a=!0),r}}r.d(t,{B:()=>o})},69397(e,t,r){r.d(t,{Qf:()=>l,Qh:()=>i,RS:()=>a,Ul:()=>m,i5:()=>h,lM:()=>n,qK:()=>u});var o=r(34275);const a=16;function n(e){if(!e)return 0;let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=s(e[r],!1));return t}function i(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return c(e,8);let r=d;for(let o=0;o<t;o++)r+=s(e[o]);return r}(e);let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=s(e[r]));return t}function s(e,t=!0){switch(typeof e){case"object":return t?i(e):u;case"string":return function(e){return 32+e.length}(e);case"number":return a;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+(t?(0,o.iu)(t)?t.byteLength+h:Array.isArray(t)?c(t,a):0:0),0)}function c(e,t){return d+e.length*t}const u=32,d=16,h=145,m=64},65806(e,t,r){r.d(t,{g:()=>i});var o=r(51850),a=r(91218),n=r(9762);function i(e,t,r,o){if((0,a.canProjectWithoutEngine)(e.spatialReference,r))return s[0]=e.x,s[1]=e.y,s[2]=e.z??0,(0,n.projectBuffer)(s,e.spatialReference,0,t,r,0);const i=(0,a.tryProject)(e,r,o);return!!i&&(t[0]=i.x,t[1]=i.y,t[2]=i.z??0,!0)}const s=(0,o.vt)()},27993(e,t,r){r.d(t,{F:()=>s});var o=r(91218),a=r(16930),n=r(9762),i=r(65806);function s(e,t,r,a){return!(null==t||null==a||e.length<2)&&((0,o.canProjectWithoutEngine)(t,a)?(0,n.projectBuffer)(e,t,0,r,a,0,1):(l.x=e[0],l.y=e[1],l.z=e[2],l.spatialReference=t,(0,i.g)(l,r,a)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:a.A.WGS84,type:"point"}},72727(e,t,r){function o(e,t,r){if(t<=0)return 0;const o=e-r;return o<0?0:Math.floor(o/t)+1}r.d(t,{k:()=>o}),r(53966)},31411(e,t,r){r.d(t,{GS:()=>T,gh:()=>_});var o=r(49186),a=r(56512),n=r(65864),i=r(4305),s=r(50954),l=r(52006),c=r(49663),u=r(46068),d=r(15507);const h=1e-6,m=[0,0];function f(e){return{maxSegmentLength:e.maxSegmentLength??0,maxDeviation:e.maxDeviation??0,maxSegmentsPerCurve:e.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(e.minSegmentsPerCurve??1,1)}}class p{constructor(e,t){this.curveStart=e,this.curveEnd=t,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(e,t){this.tStart=0,this.arcStart=e,this.tEndStack.push(1),this.arcEndStack.push(t)}splitAt(e){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(e),this.arcEndStack.push(this.interpolate(e))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(e,{maxDeviation:t,maxSegmentLength:r,maxSegmentsPerCurve:o,minSegmentsPerCurve:a}){const n=r*r,i=t*t,s=1/o,l=this.interpolate(0),c=this.interpolate(1);(0,d.kb)(this.curveStart,l)>h&&e.push(l),this.initialize(l,c);const u=1/a;for(let e=a-1;e>0;e--){const t=e*u;this.pop(),this.splitAt(t)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<s||(0===n||!isFinite(n)||(0,d.kb)(this.arcStart,this.arcEnd)<n)&&(0===i||!isFinite(i)||this.getDeviation2()<i)?(e.push(this.arcEnd),this.next()):this.splitInHalf();return(0,d.kb)(this.curveEnd,c)>h&&e.push([...this.curveEnd]),e}}class v extends p{constructor(e,t){const[r,o,a]=t.b;super(e,r),this._controlPointsStack=[],this._curveControlPoints=[o,a],this._arcControlPoints=[o,a],this._controlPointsStack.push(this._arcControlPoints)}splitAt(e){const{arcStart:t,arcEnd:r,tStart:o,tEnd:a}=this,[n,i]=this._arcControlPoints,s=(e-o)/(a-o),l=(0,d.RS)([],t,n,s),c=(0,d.RS)(m,n,i,s),u=(0,d.RS)([],i,r,s),h=(0,d.RS)([],l,c,s),f=(0,d.RS)([],c,u,s),p=(0,d.RS)([],h,f,s);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([f,u]),this.tEndStack.push(e),this.arcEndStack.push(p),this._arcControlPoints[0]=l,this._arcControlPoints[1]=h,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(e){const{curveStart:t,curveEnd:r}=this,[o,a]=this._curveControlPoints;return(0,i.B4)(t,o,a,r,e)}getDeviation2(){const{arcStart:e,arcEnd:t}=this,[r,o]=this._arcControlPoints;return Math.max((0,d.yE)(r,e,t),(0,d.yE)(o,e,t))}}class g extends p{constructor(e,t){const[r]=t.a;super(e,r),this._derivedEllipse=(0,u.SW)(e,t)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(e){return(0,u.Uk)(this._derivedEllipse,e)}getDeviation2(){return(0,d.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function x(e,t,r,{cx:o,cy:a,radius:n,thetaStart:i,thetaEnd:s,isInvalid:l},{maxDeviation:c,maxSegmentLength:u,maxSegmentsPerCurve:m,minSegmentsPerCurve:f}){if(l)return e.push([...r]),e;const p=2*n,v=[o+n*Math.cos(i),a+n*Math.sin(i)],g=[o+n*Math.cos(s),a+n*Math.sin(s)];(0,d.kb)(t,v)>h&&e.push(v);const x=Math.abs(s-i),b=u>0&&u<p?2*Math.asin(u/p):x,y=c>0&&c<=n?2*Math.acos(1-c/n):x,w=Math.min(b,y),M=Math.min(m,Math.max(f,Math.ceil(Math.abs(x/w)))),S=1/M;for(let t=1;t<M;t++){const r=t*S,l=i*(1-r)+s*r;e.push([o+n*Math.cos(l),a+n*Math.sin(l)])}return e.push(g),(0,d.kb)(r,g)>h&&e.push([...r]),e}function b(e,t,r,o){return new v(t,r).densify(e,o)}function y(e,t,r,o){const a=(0,s.pM)(t,r),[n]=r.c;return x(e,t,n,a,o)}function w(e,t,r,o){const a=(0,c.io)(t,r),[n]=r.a;return x(e,t,n,a,o)}function M(e,t,r,o){const[a,n,i,s,l,c,u]=r.a;return 0===c||0===u?(e.push([...a]),e):new g(t,r).densify(e,o)}function S(e,t,r,o){return(0,l.Xq)(r)?(e.push([...r]),e):(0,l.n1)(r)?b(e,t,r,o):(0,l.aO)(r)?y(e,t,r,o):(0,l.DA)(r)?w(e,t,r,o):M(e,t,r,o)}function T(e,t={}){if(!(0,l.Ed)(e))return e;const r=f(t),o=(0,l.FD)(e),a=[];for(const e of o){const t=[];for(let o=0;o<e.length-1;o++){const a=o+1,n=[...(0,l.yP)(e[o])];0===o&&t.push(n),S(t,n,e[a],r)}a.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},paths:a,spatialReference:e.spatialReference}:{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},rings:a,spatialReference:e.spatialReference}}const C=(0,a.B)(e=>({maxDeviation:0,maxSegmentLength:100*e,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function _(e,t,a){const i=new Set(t);return await async function(e,t,a){let n=null;for(const i of e)if(i&&(0,l.Ed)(i)&&null==i.spatialReference.xyTolerance&&(0,l.V8)(i,t)){const e=i.spatialReference;if(!e)throw new o.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const t=I(e);if(a.has(t))i.spatialReference=a.get(t);else{n||(n=await Promise.all([r.e(3661),r.e(1878),r.e(8885),r.e(5756),r.e(3299),r.e(6312)]).then(r.bind(r,78125)));const s=n.fromSpatialReference(e),l=s?.getTolerance();if(null==l)throw new o.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const c=i.spatialReference.clone();c.read({xyTolerance:l}),i.spatialReference=c,a.set(t,c)}}}(e,i,a),e.map(e=>{if(!e||!(0,l.Ed)(e))return e;const r=e.spatialReference.xyTolerance;if(null==r)return e;const o=C(r);return(0,n.rS)(function(e,t,r){if(!(0,l.Ed)(e))return e;const o=new Set(t),a=f(r),n=(0,l.FD)(e),i=[];let s=!1;for(const e of n){const t=[];for(let r=0;r<e.length-1;r++){const n=r+1,i=[...(0,l.yP)(e[r])];0===r&&t.push(i);const c=e[n];(0,l.Xq)(c)?t.push([...c]):(0,l.n1)(c)&&!o.has("cubic-bezier")?b(t,i,c,a):(0,l.aO)(c)&&!o.has("circular-arc")?y(t,i,c,a):(0,l.DA)(c)&&!o.has("elliptic-arc")?w(t,i,c,a):(0,l.wY)(c)&&!o.has("elliptic-arc")?M(t,i,c,a):(t.push((0,l.tk)(c)),s=!0)}i.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},spatialReference:e.spatialReference,...s?{curvePaths:i}:{paths:i}}:{hasZ:e.hasZ,hasM:e.hasM,spatialReference:e.spatialReference,...s?{curveRings:i}:{rings:i}}}(e,t,o))})}function I(e){if(null!=e.wkid)return`${e.wkid}`;if(null!=e.wkt)return e.wkt;const t="toJSON"in e&&"function"==typeof e.toJSON?e.toJSON():e;return JSON.stringify(t)}},17136(e,t,r){r.d(t,{Y_:()=>R,O7:()=>P,el:()=>I});var o=r(92602),a=r(69052),n=r(49186),i=r(53966),s=r(39829),l=r(82799),c=r(16930),u=r(80754),d=r(21325),h=r(28735),m=r(52006),f=r(31411),p=r(11254),v=r(60408),g=r(65864),x=r(2272),b=r(84952),y=r(92300);const w=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function M(e){return"polygon"===e[0].type}function S(e){return"polyline"===e[0].type}function T(e,t,r){const o=1e6;if(t){const t=(0,m.Ed)(e)?(0,f.GS)(e,{maxSegmentLength:o}):function(e,t){if(!(e instanceof l.A||e instanceof s.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw w().error(e),new n.A("internal:geometry",e)}const r=(0,u.r8)(e),o=[];for(const e of r){const r=[];o.push(r),r.push([e[0][0],e[0][1]]);for(let o=0;o<e.length-1;o++){const a=e[o][0],n=e[o][1],i=e[o+1][0],s=e[o+1][1],l=Math.sqrt((i-a)*(i-a)+(s-n)*(s-n)),c=(s-n)/l,u=(i-a)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const o=e*t,i=u*o+a,s=c*o+n;r.push([i,s])}const e=(l+Math.floor(d-1)*t)/2,o=u*e+a,i=c*e+n;r.push([o,i])}r.push([i,s])}}return function(e){return"polygon"===e.type}(e)?new s.A({rings:o,spatialReference:e.spatialReference}):new l.A({paths:o,spatialReference:e.spatialReference})}(e,o);e=(0,h.ci)(t,!0)}return r&&(e=(0,u.kS)(e,r)),e}function C(e,t,r){if(Array.isArray(e)){const o=e[0];if(o>t){const r=(0,u.kd)(o,t);e[0]=o+r*(-2*t)}else if(o<r){const t=(0,u.kd)(o,r);e[0]=o+t*(-2*r)}}else{const o=e.x;if(o>t){const r=(0,u.kd)(o,t);e=e.clone().offset(r*(-2*t),0)}else if(o<r){const t=(0,u.kd)(o,r);e=e.clone().offset(t*(-2*r),0)}}return e}function _(e,t){let r=-1;for(let o=0;o<t.cutIndexes.length;o++){const a=t.cutIndexes[o],n=t.geometries[o],i=(0,u.r8)(n);for(let e=0;e<i.length;e++){const t=i[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const o=t[e][0];r=o>r?o:r}r=Number(r.toFixed(9));const o=-360*(0,u.kd)(r,180);for(let r=0;r<t.length;r++){const t=n.getPoint(e,r);n.setPoint(e,r,t.clone().offset(o,0))}return!0}})}if(a===r){if(M(e))for(const t of(0,u.r8)(n))e[a]=e[a].addRing(t);else if(S(e))for(const t of(0,u.r8)(n))e[a]=e[a].addPath(t)}else r=a,e[a]=n}return e}async function I(e,t,r){if(!Array.isArray(e))return I([e],t);t&&"string"!=typeof t&&w().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const a="string"==typeof t?t:t?.url??o.A.geometryServiceUrl;let n,i,c,m,f,M,S,P,z=0;const R=[],F=[];for(const t of e)if(null!=t)if(n||(n=t.spatialReference,i=(0,d.Vp)(n),c=n.isWebMercator,M=c?102100:4326,m=u.j7[M].maxX,f=u.j7[M].minX,S=u.j7[M].plus180Line,P=u.j7[M].minus180Line),i)if("mesh"===t.type)F.push(t);else if("point"===t.type)F.push(C(t.clone(),m,f));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>C(e,m,f)),F.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,i);F.push(e.rings?new s.A(e):e)}else if(t.extent){const e=t.extent,r=(0,u.kd)(e.xmin,f)*(2*m);let o=0===r?t.clone():(0,u.kS)(t.clone(),r);e.offset(r,0);let{xmin:a,xmax:n}=e;a=Number(a.toFixed(9)),n=Number(n.toFixed(9)),e.intersects(S)&&n!==m?(z=n>z?n:z,o=T(o,c),R.push(o),F.push("cut")):e.intersects(P)&&a!==f?(z=n*(2*m)>z?n*(2*m):z,o=T(o,c,360),R.push(o),F.push("cut")):F.push(o)}else F.push(t.clone());else F.push(t);else F.push(t);let D=(0,u.kd)(z,m),O=-90;const j=D,E=new l.A;for(;D>0;){const e=360*D-180;E.addPath([[e,O],[e,-1*O]]),O*=-1,D--}if(R.length>0&&j>0){const t=_(R,await async function(e,t,r,o){const a=(0,x.Dl)(e),n=t[0].spatialReference,i={...o,responseType:"json",query:{...a.query,f:"json",sr:(0,d.YX)(n),target:JSON.stringify({geometryType:(0,v.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},s=await(0,p.A)(a.path+"/cut",i),{cutIndexes:l,geometries:c=[]}=s.data;return{cutIndexes:l,geometries:c.map(e=>{const t=(0,g.rS)(e);return t.spatialReference=n,t})}}(a,R,E,r)),o=[],n=[];for(let r=0;r<F.length;r++){const a=F[r];if("cut"!==a)n.push(a);else{const a=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&a.rings.length>=i.rings.length?(o.push(a),n.push("simplify")):n.push(c?(0,h.Gh)(a):a)}}if(!o.length)return n;const i=await async function(e,t,r){const o="string"==typeof e?(0,b.An)(e):e,a=t[0].spatialReference,n=(0,v.$B)(t[0]),i={...r,query:{...o.query,f:"json",sr:(0,d.YX)(a),geometries:JSON.stringify((0,y.X)(t))}},{data:s}=await(0,p.A)(o.path+"/simplify",i);return(0,y.V)(s.geometries,n,a)}(a,o,r),s=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?s.push(t):s.push(c?(0,h.Gh)(i.shift()):i.shift())}return s}const B=[];for(let e=0;e<F.length;e++){const t=F[e];if("cut"!==t)B.push(t);else{const e=R.shift();B.push(!0===c?(0,h.Gh)(e):e)}}return B}function P(e,t,r){const o=(0,d.Vp)(r);if(null==o)return e;const[a,n]=o.valid,i=2*n;let s=0,l=0;t>n?s=Math.ceil(Math.abs(t-n)/i):t<a&&(s=-Math.ceil(Math.abs(t-a)/i)),e>n?l=Math.ceil(Math.abs(e-n)/i):e<a&&(l=-Math.ceil(Math.abs(e-a)/i));let c=e+(s-l)*i;const u=c-t;return u>n?c-=i:u<a&&(c+=i),c}function z(e){const t=(0,d.Vp)(e);if(null==t)return null;const[r,o]=t.valid;return new a.hr(r,o)}const R=z(c.A.WGS84);z(c.A.WebMercator)},80754(e,t,r){r.d(t,{j7:()=>s,kS:()=>c,kd:()=>l,r8:()=>u});var o=r(82799),a=r(16930),n=r(60408),i=r(52006);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new o.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator}),minus180Line:new o.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new o.A({paths:[[[180,-180],[180,180]]],spatialReference:a.A.WGS84}),minus180Line:new o.A({paths:[[[-180,-180],[-180,180]]],spatialReference:a.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){if((0,i.Ed)(e))for(const r of function(e){return(0,n.Bi)(e)?e.curveRings:e.curvePaths}(e))for(const e of r){if((0,i.aO)(e)){const[r,o]=e.c;r[0]+=t,o[0]+=t;continue}if((0,i.FG)(e)){const[r,o]=e.a;r[0]+=t,o[0]+=t;continue}if((0,i.n1)(e)){const[r,o,a]=e.b;r[0]+=t,o[0]+=t,a[0]+=t;continue}e[0]+=t}for(const r of u(e))for(const e of r)e[0]+=t;return e}function u(e){return(0,n.Bi)(e)?e.rings:e.paths}},27921(e,t,r){r.d(t,{$Q:()=>y,C:()=>s,Cr:()=>u,H:()=>M,O_:()=>c,Qj:()=>l,T7:()=>x,Tj:()=>b,lU:()=>d,mN:()=>S,vE:()=>T,vt:()=>i});var o=r(34727),a=r(35522),n=r(51850);function i(e=C){return[e[0],e[1],e[2],e[3]]}function s(e,t){return function(e,t,r,o,a=i()){return a[0]=e,a[1]=t,a[2]=r,a[3]=o,a}(t[0],t[1],t[2],t[3],e)}function l(e){return e}function c(e,t,r){const o=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],a=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return r[0]=t[0]*a,r[1]=t[1]*a,r[2]=t[2]*a,r[3]=-(r[0]*e[0]+r[1]*e[1]+r[2]*e[2]),r}function u(e,t,r,o=i()){const a=r[0]-t[0],n=r[1]-t[1],s=r[2]-t[2],l=e[0]-t[0],c=e[1]-t[1],u=e[2]-t[2],d=n*u-s*c,h=s*l-a*u,m=a*c-n*l,f=d*d+h*h+m*m,p=Math.abs(f-1)>1e-5&&f>1e-12?1/Math.sqrt(f):1;return o[0]=d*p,o[1]=h*p,o[2]=m*p,o[3]=-(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]),o}function d(e,t,r,o=0,n=Math.floor(r*(1/3)),i=Math.floor(r*(2/3))){if(r<3)return!1;t(m,o);let s=n,l=!1;for(;s<r-1&&!l;)t(f,s),s++,l=!(0,a.t2)(m,f);if(!l)return!1;for(s=Math.max(s,i),l=!1;s<r&&!l;)t(p,s),s++,(0,a.Re)(v,m,f),(0,a.S8)(v,v),(0,a.Re)(g,f,p),(0,a.S8)(g,g),l=!(0,a.t2)(m,p)&&!(0,a.t2)(f,p)&&Math.abs((0,a.Om)(v,g))<h;return l?(u(m,f,p,e),!0):(0!==o||1!==n||2!==i)&&d(e,t,r,0,1,2)}r(78955),r(44280),r(32114),r(32728);const h=.99619469809,m=(0,n.vt)(),f=(0,n.vt)(),p=(0,n.vt)(),v=(0,n.vt)(),g=(0,n.vt)();function x(e,t,r){return function(e){return 0===e||1===e}(T(e,t.origin,t.vector,0,r))}function b(e,t){return S(e,t)>=0}function y(e,t){return function(e,t,r,o,n,i,s){const l=(0,a.Om)(e,r),c=S(e,t);if(l>-1e-6&&l<1e-6)return w(c,n,i);const u=-c/l,d=w(l,n,!1);return!(s&&!d&&!w(c,n,i))&&(d?u>o.c0&&(o.c0=u):u<o.c1&&(o.c1=u),o.c0<=o.c1)}(e,t.ray.origin,t.ray.direction,t,!1,!1,!0)}function w(e,t,r){return r?t?e>=0:e<=0:t?e>0:e<0}function M(e,t,r,o,n=!1){let i=0,s=t[r-1],l=S(e,s),c=n?l>0:l<=0;for(let u=0;u<r;u++){const r=t[u],d=S(e,r),h=n?d>0:d<=0;c!==h&&(0,a.Cc)(o[i++],s,r,l/(l-d)),h&&(0,a.C)(o[i++],r),s=r,l=d,c=h}return i}function S(e,t){return(0,a.Om)(e,t)+e[3]}function T(e,t,r,n,i){const s=(0,a.Om)(e,r),l=S(e,t);if(0===s)return l>=0?2:3;let c=-l/s;return 1&n&&(c=(0,o.qE)(c,0,1)),!(4&n)&&c<0||!(8&n)&&c>1?l>=0?2:3:((0,a.WQ)(i,t,(0,a.hs)(i,r,c)),l>=0?0:1)}const C=[0,0,1,0];(0,n.vt)()},44280(e,t,r){r.d(t,{g7:()=>s,gr:()=>i});var o=r(34727),a=r(35522),n=r(51850);function i(e,t){return(0,a.Om)(e,t)/(0,a.Bw)(e)}function s(e,t){const r=(0,a.Om)(e,t)/((0,a.Bw)(e)*(0,a.Bw)(t));return-(0,o.XM)(r)}(0,n.vt)(),(0,n.vt)()},32114(e,t,r){r.d(t,{Rc:()=>m,rq:()=>d,Km:()=>h}),r(44208);var o=r(26390),a=r(29242),n=r(9093),i=r(82534),s=r(48163),l=r(51850),c=r(91829);class u{constructor(e){this._create=e,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,o.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const e=2*this._itemsPtr;this._items.length>e&&(this._items.length=e),this._itemsPtr=0}static createVec2f64(){return new u(s.vt)}static createVec3f64(){return new u(l.vt)}static createVec4f64(){return new u(c.vt)}static createMat3f64(){return new u(a.vt)}static createMat4f64(){return new u(n.vt)}static createQuatf64(){return new u(i.vt)}get test(){}}u.createVec2f64();const d=u.createVec3f64(),h=u.createVec4f64(),m=(u.createMat3f64(),u.createMat4f64());u.createQuatf64()},38969(e,t,r){r.d(t,{i:()=>a});var o=r(37955);function a(e,t){return new Promise((r,a)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,o.Oo)(e,"canplay",r)),t((0,o.Oo)(e,"error",a)))})}},92300(e,t,r){r.d(t,{V:()=>i,X:()=>n});var o=r(60408),a=r(65864);function n(e){return{geometryType:(0,o.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function i(e,t,r){const o=(0,a.xD)(t);return e.map(e=>{const t=o.fromJSON(e);return t.spatialReference=r,t})}},21015(e,t,r){r.d(t,{R:()=>l});var o=r(11254),a=r(60999),n=r(49186),i=r(17676),s=r(84952);class l{constructor(e=e=>e){this._resolveURI=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,s.DB)(e)?((0,i.Te)(t),(0,s.lJ)(e)):this._load("array-buffer",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){t=this._resolveURI(t);const s=await(0,a.Ke)((0,o.A)(t,{responseType:e,...r}));if(s.ok)return s.value.data;throw(0,i.QP)(s.error),new n.A("gltf-loader-request-error",`Request for resource failed: ${s.error}`)}}},84498(e,t,r){r.d(t,{x:()=>i});var o=r(34275),a=r(97146),n=r(63907);function i(e,t){switch(t){case n.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,a.tM)(e):(0,o.mg)(e)?new Uint16Array(e):e}(e);case n.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,o=(0,a.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(o[e++]=t,o[e++]=t+1,o[e++]=t+2):(o[e++]=t+1,o[e++]=t,o[e++]=t+2)}else{let t=0;for(let a=0;a<r;a+=1)a%2==0?(o[t++]=e[a],o[t++]=e[a+1],o[t++]=e[a+2]):(o[t++]=e[a+1],o[t++]=e[a],o[t++]=e[a+2])}return o}(e);case n.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,o=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)o[e++]=0,o[e++]=t+1,o[e++]=t+2;return o}const a=e[0];let n=e[1],i=0;for(let t=0;t<r;++t){const r=e[t+2];o[i++]=a,o[i++]=n,o[i++]=r,n=r}return o}(e)}}},51530(e,t,r){r.d(t,{KB:()=>i,Xi:()=>a,pn:()=>s,x3:()=>n});var o=r(44208);class a{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function n(e){return"encoded-mesh-texture"===e?.type}async function i(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function s(e,t){if("image/ktx2"===t)return new a(e);const r=new Blob([e],{type:t});let n=URL.createObjectURL(r);switch(t){case"image/jpeg":n+="#.jpg";break;case"image/png":n+="#.png"}const i=new Image;if((0,o.A)("esri-iPhone"))return new Promise((e,t)=>{const r=()=>{a(),e(i)},o=e=>{a(),t(e)},a=()=>{URL.revokeObjectURL(n),i.removeEventListener("load",r),i.removeEventListener("error",o)};i.addEventListener("load",r),i.addEventListener("error",o),i.src=n});try{i.src=n,await i.decode()}catch{}return URL.revokeObjectURL(n),i}},49261(e,t,r){r.d(t,{fetch:()=>Ft});var o=r(40876),a=r(61473),n=r(34727),i=r(77690),s=r(29242),l=r(58083),c=r(9093),u=r(48163),d=r(35522),h=r(51850),m=r(70328),f=r(34275);function p(e,t=!1){return e<=f.y9?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}var v=r(13030),g=r(73354),x=r(50867),b=r(43609),y=r(21015),w=r(84498),M=r(51530),S=r(88340);function T(e){if(null==e)return null;const t=null!=e.offset?e.offset:S.uY,r=null!=e.rotation?e.rotation:0,o=null!=e.scale?e.scale:S.Un,a=(0,s.fA)(1,0,0,0,1,0,t[0],t[1],1),n=(0,s.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,s.fA)(o[0],0,0,0,o[1],0,0,0,1),c=(0,s.vt)();return(0,i.lw)(c,n,l),(0,i.lw)(c,a,c),c}class C{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class _{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new C,this.numberOfVertices=0}}var I=r(11254),P=r(60999),z=r(49186),R=r(53966),F=r(69397);class D{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get size(){let e=0;for(const t of this._outer.values())e+=t.size;return e}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){const o=this._outer.get(e);o?o.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}pop(e,t){const r=this.get(e,t);return this.delete(e,t),r}*outerMap(){for(const e of this._outer)yield e}*values(){for(const e of this._outer.values())yield*e.values()}*[Symbol.iterator](){for(const[e,t]of this._outer)for(const[r,o]of t)yield[e,r,o]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,o)=>e(t,r,o)))}copy(){const e=new D;return this.forAll((t,r,o)=>e.set(r,o,t)),e}}var O=r(17676),j=r(46140),E=r(97146),B=r(31217),H=r(46610),N=r(16613),W=r(18845),A=r(49255),G=r(97768),L=r(92130),V=r(65786);class k extends L.A{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,e=>this._textureNormal=e),this._acquire(e.emissiveTextureId,e=>this._textureEmissive=e),this._acquire(e.occlusionTextureId,e=>this._textureOcclusion=e),this._acquire(e.metallicRoughnessTextureId,e=>this._textureMetallicRoughness=e)}dispose(){super.dispose(),this._texture=(0,G.Gz)(this._texture),this._textureNormal=(0,G.Gz)(this._textureNormal),this._textureEmissive=(0,G.Gz)(this._textureEmissive),this._textureOcclusion=(0,G.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,G.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new $(this._texture?.texture??null,this._textureNormal?.texture??null,this._textureEmissive?.texture??null,this._textureOcclusion?.texture??null,this._textureMetallicRoughness?.texture??null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,G.Gz)(this._texture),this._acquire(e,e=>this._texture=e))}_acquire(e,t){if(null==e)return void t(null);const r=this._textures.acquire(e);if((0,O.$X)(r))return++this._numLoading,void r.then(e=>{if(this._disposed)return(0,G.Gz)(e),void t(null);t(e)}).finally(()=>--this._numLoading);t(r)}}class U extends V.Y{constructor(e=null){super(),this.textureEmissive=e}}class $ extends U{constructor(e,t,r,o,a,n,i){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=o,this.textureMetallicRoughness=a,this.scale=n,this.normalTextureTransformMatrix=i}}var q=r(11725),Z=r(83252),Y=r(620);class J{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const X=(0,m.vt)();function K(e,t,r,o,a,n){if(!e.visible)return;const i=(0,d.jb)(ue,o,r),{tolerance:s}=t,l=new J(s,!1,t.options.normalRequired);if(e.boundingInfo)(0,Y.vA)(0===e.type),ee(e.boundingInfo,r,i,s,a,l,n);else{const t=e.positionAttribute,o=e.primitivePositionIndices;!function(e,t,r,o,a,n,i,s,l,c){const u=t,h=de,m=Math.abs(u[0]),f=Math.abs(u[1]),p=Math.abs(u[2]),v=m>=f?m>=p?0:2:f>=p?1:2,g=v,x=u[g]<0?2:1,b=(v+x)%3,y=(v+(3-x))%3,w=u[b]/u[g],M=u[y]/u[g],S=1/u[g],T=re,C=oe,_=ae,{normalRequired:I}=l;for(let t=r;t<o;++t){const r=3*t,o=i*a[r];(0,d.hZ)(h[0],n[o+0],n[o+1],n[o+2]);const l=i*a[r+1];(0,d.hZ)(h[1],n[l+0],n[l+1],n[l+2]);const u=i*a[r+2];(0,d.hZ)(h[2],n[u+0],n[u+1],n[u+2]),s&&(s.applyToVertex(h[0],h[0][0],h[0][1],h[0][2],t),s.applyToVertex(h[1],h[1][0],h[1][1],h[1][2],t),s.applyToVertex(h[2],h[2][0],h[2][1],h[2][2],t)),(0,d.jb)(T,h[0],e),(0,d.jb)(C,h[1],e),(0,d.jb)(_,h[2],e);const m=T[b]-w*T[g],f=T[y]-M*T[g],p=C[b]-w*C[g],v=C[y]-M*C[g],x=_[b]-w*_[g],P=_[y]-M*_[g],z=x*v-P*p,R=m*P-f*x,F=p*f-v*m;if((z<0||R<0||F<0)&&(z>0||R>0||F>0))continue;const D=z+R+F;if(0===D)continue;const O=z*(S*T[g])+R*(S*C[g])+F*(S*_[g]);if(O*Math.sign(D)<0)continue;const j=O/D;j>=0&&c(j,I?ie(h):null,t)}}(r,i,0,o.length/3,o,t.data,t.stride,a,l,n)}}const Q=(0,h.vt)();function ee(e,t,r,o,a,n,i){if(null==e)return;const s=function(e,t){return(0,d.hZ)(t,1/e[0],1/e[1],1/e[2])}(r,Q);if((0,m.Ne)(X,e.bbMin),(0,m.vI)(X,e.bbMax),null!=a&&a.applyToAabb(X),function(e,t,r,o){return function(e,t,r,o){const a=(e[0]-o-t[0])*r[0],n=(e[3]+o-t[0])*r[0];let i=Math.min(a,n),s=Math.max(a,n);const l=(e[1]-o-t[1])*r[1],c=(e[4]+o-t[1])*r[1];if(s=Math.min(s,Math.max(l,c)),s<0)return!1;if(i=Math.max(i,Math.min(l,c)),i>s)return!1;const u=(e[2]-o-t[2])*r[2],d=(e[5]+o-t[2])*r[2];return s=Math.min(s,Math.max(u,d)),!(s<0)&&(i=Math.max(i,Math.min(u,d)),!(i>s)&&i<1/0)}(e,t,r,o)}(X,t,s,o)){const{primitiveIndices:s,position:l}=e,c=s?s.length:l.indices.length/3;if(c>Z.F){const s=e.getChildren();if(void 0!==s){for(const e of s)ee(e,t,r,o,a,n,i);return}}!function(e,t,r,o,a,n,i,s,l,c,u){const d=e[0],h=e[1],m=e[2],f=t[0],p=t[1],v=t[2],{normalRequired:g}=c;for(let e=0;e<o;++e){const t=s[e],r=3*t,o=i*a[r];let c=n[o],x=n[o+1],b=n[o+2];const y=i*a[r+1];let w=n[y],M=n[y+1],S=n[y+2];const T=i*a[r+2];let C=n[T],_=n[T+1],I=n[T+2];null!=l&&([c,x,b]=l.applyToVertex(he,c,x,b,e),[w,M,S]=l.applyToVertex(he,w,M,S,e),[C,_,I]=l.applyToVertex(he,C,_,I,e));const P=w-c,z=M-x,R=S-b,F=C-c,D=_-x,O=I-b,j=p*O-D*v,E=v*F-O*f,B=f*D-F*p,H=P*j+z*E+R*B,N=H*H;if(N<=ce)continue;const W=d-c,A=h-x,G=m-b,L=(W*j+A*E+G*B)*H;if(L<0||L>N)continue;const V=A*R-z*G,k=G*P-R*W,U=W*z-P*A,$=(f*V+p*k+v*U)*H;if($<0||L+$>N)continue;const q=(F*V+D*k+O*U)/H;q>=0&&u(q,g?ne(P,z,R,F,D,O,te):null,t)}}(t,r,0,c,l.indices,l.data,l.stride,s,a,n,i)}}const te=(0,h.vt)();const re=(0,h.vt)(),oe=(0,h.vt)(),ae=(0,h.vt)();function ne(e,t,r,o,a,n,i){return(0,d.hZ)(se,e,t,r),(0,d.hZ)(le,o,a,n),(0,d.$A)(i,se,le),(0,d.S8)(i,i),i}function ie(e){return(0,d.jb)(se,e[1],e[0]),(0,d.jb)(le,e[2],e[0]),(0,d.$A)(te,se,le),(0,d.S8)(te,te),te}const se=(0,h.vt)(),le=(0,h.vt)(),ce=1e-7*1e-7,ue=(0,h.vt)(),de=[(0,h.vt)(),(0,h.vt)(),(0,h.vt)()],he=(0,h.vt)();var me=r(75956),fe=r(16396);function pe(e,t,r){const{data:o,indices:a}=e,n=t.typedBuffer,i=t.typedBufferStride,s=a.length;r*=i;for(let e=0;e<s;++e){const t=2*a[e];n[r]=o[t],n[r+1]=o[t+1],r+=i}}function ve(e,t,r,o=1){const{data:a,indices:n}=e,i=t.typedBuffer,s=t.typedBufferStride,l=n.length;if(r*=s,1===o)for(let e=0;e<l;++e){const t=3*n[e];i[r]=a[t],i[r+1]=a[t+1],i[r+2]=a[t+2],r+=s}else for(let e=0;e<l;++e){const t=3*n[e];for(let e=0;e<o;++e)i[r]=a[t],i[r+1]=a[t+1],i[r+2]=a[t+2],r+=s}}function ge(e,t,r,o,a=1){const n=t.typedBuffer,i=t.typedBufferStride;if(o*=i,1===a)for(let t=0;t<r;++t)n[o]=e[0],n[o+1]=e[1],n[o+2]=e[2],n[o+3]=e[3],o+=i;else for(let t=0;t<r;++t)for(let t=0;t<a;++t)n[o]=e[0],n[o+1]=e[1],n[o+2]=e[2],n[o+3]=e[3],o+=i}function xe(e,t,r,o,a,n){switch(e){case"position":{(0,Y.vA)(3===t.size);const o=a.getField(e,v.xs);(0,Y.vA)(!!o,`No buffer view for ${e}`),function(e,t,r,o,a=1){if(!t)return void ve(e,r,o,a);const{data:n,indices:i}=e,s=r.typedBuffer,c=r.typedBufferStride,u=i.length,d=t[0],h=t[1],m=t[2],f=t[4],p=t[5],v=t[6],g=t[8],x=t[9],b=t[10],y=t[12],w=t[13],M=t[14];o*=c;let S=0,T=0,C=0;const _=(0,l.tZ)(t)?e=>{S=n[e]+y,T=n[e+1]+w,C=n[e+2]+M}:e=>{const t=n[e],r=n[e+1],o=n[e+2];S=d*t+f*r+g*o+y,T=h*t+p*r+x*o+w,C=m*t+v*r+b*o+M};if(1===a)for(let e=0;e<u;++e)_(3*i[e]),s[o]=S,s[o+1]=T,s[o+2]=C,o+=c;else for(let e=0;e<u;++e){_(3*i[e]);for(let e=0;e<a;++e)s[o]=S,s[o+1]=T,s[o+2]=C,o+=c}}(t,r,o,n);break}case"normal":{(0,Y.vA)(3===t.size);const r=a.getField(e,v.xs);(0,Y.vA)(!!r,`No buffer view for ${e}`),function(e,t,r,o,a=1){if(!t)return void ve(e,r,o,a);const{data:n,indices:i}=e,s=t,c=r.typedBuffer,u=r.typedBufferStride,d=i.length,h=s[0],m=s[1],f=s[2],p=s[4],v=s[5],g=s[6],x=s[8],b=s[9],y=s[10],w=!(0,l.ut)(s),M=1e-6,S=1-M;o*=u;let T=0,C=0,_=0;const I=(0,l.tZ)(s)?e=>{T=n[e],C=n[e+1],_=n[e+2]}:e=>{const t=n[e],r=n[e+1],o=n[e+2];T=h*t+p*r+x*o,C=m*t+v*r+b*o,_=f*t+g*r+y*o};if(1===a)if(w)for(let e=0;e<d;++e){I(3*i[e]);const t=T*T+C*C+_*_;if(t<S&&t>M){const e=1/Math.sqrt(t);c[o]=T*e,c[o+1]=C*e,c[o+2]=_*e}else c[o]=T,c[o+1]=C,c[o+2]=_;o+=u}else for(let e=0;e<d;++e)I(3*i[e]),c[o]=T,c[o+1]=C,c[o+2]=_,o+=u;else for(let e=0;e<d;++e){if(I(3*i[e]),w){const e=T*T+C*C+_*_;if(e<S&&e>M){const t=1/Math.sqrt(e);T*=t,C*=t,_*=t}}for(let e=0;e<a;++e)c[o]=T,c[o+1]=C,c[o+2]=_,o+=u}}(t,o,r,n);break}case"normalCompressed":case"profileRight":case"profileUp":{(0,Y.vA)(2===t.size);const r=a.getField(e,v.mJ);(0,Y.vA)(!!r,`No buffer view for ${e}`),pe(t,r,n);break}case"uv0":{(0,Y.vA)(2===t.size);const r=a.getField(e,v.ZD)??a.getField(e,v.gH);(0,Y.vA)(!!r,`No buffer view for ${e}`),pe(t,r,n);break}case"uvi":{(0,Y.vA)(2===t.size);const r=a.getField(e,v.mJ);(0,Y.vA)(!!r,`No buffer view for ${e}`),pe(t,r,n);break}case"color":case"symbolColor":{const r=a.getField(e,v.XP);(0,Y.vA)(!!r,`No buffer view for ${e}`),(0,Y.vA)(3===t.size||4===t.size),function(e,t,r,o,a=1){const{data:n,indices:i}=e,s=r.typedBuffer,l=r.typedBufferStride,c=i.length;if(o*=l,t===n.length&&4===t){s[o]=n[0],s[o+1]=n[1],s[o+2]=n[2],s[o+3]=n[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=l/4,i=e[o/=4];o+=t;const u=c*a;for(let r=1;r<u;++r)e[o]=i,o+=t;return}if(1!==a)if(4!==t)for(let e=0;e<c;++e){const t=3*i[e];for(let e=0;e<a;++e)s[o]=n[t],s[o+1]=n[t+1],s[o+2]=n[t+2],s[o+3]=255,o+=l}else for(let e=0;e<c;++e){const t=4*i[e];for(let e=0;e<a;++e)s[o]=n[t],s[o+1]=n[t+1],s[o+2]=n[t+2],s[o+3]=n[t+3],o+=l}else{if(4===t){for(let e=0;e<c;++e){const t=4*i[e];s[o]=n[t],s[o+1]=n[t+1],s[o+2]=n[t+2],s[o+3]=n[t+3],o+=l}return}for(let e=0;e<c;++e){const t=3*i[e];s[o]=n[t],s[o+1]=n[t+1],s[o+2]=n[t+2],s[o+3]=255,o+=l}}}(t,t.size,r,n);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{const r=a.getField(e,v.Y$)??a.getField(e,v.Y$);(0,Y.vA)(!!r,`No buffer view for ${e}`),(0,Y.vA)(1===t.size),function(e,t,r){const{data:o,indices:a}=e,n=t.typedBuffer,i=t.typedBufferStride,s=a.length,l=o[0];r*=i;for(let e=0;e<s;++e)n[r]=l,r+=i}(t,r,n);break}case"tangent":{(0,Y.vA)(4===t.size);const o=a.getField(e,v.Eq);(0,Y.vA)(!!o,`No buffer view for ${e}`),function(e,t,r,o,a=1){if(!t)return void function(e,t,r,o=1){const{data:a,indices:n}=e,i=t.typedBuffer,s=t.typedBufferStride,l=n.length;if(r*=s,1===o)for(let e=0;e<l;++e){const t=4*n[e];i[r]=a[t],i[r+1]=a[t+1],i[r+2]=a[t+2],i[r+3]=a[t+3],r+=s}else for(let e=0;e<l;++e){const t=4*n[e];for(let e=0;e<o;++e)i[r]=a[t],i[r+1]=a[t+1],i[r+2]=a[t+2],i[r+3]=a[t+3],r+=s}}(e,r,o,a);const{data:n,indices:i}=e,s=t,c=r.typedBuffer,u=r.typedBufferStride,d=i.length,h=s[0],m=s[1],f=s[2],p=s[4],v=s[5],g=s[6],x=s[8],b=s[9],y=s[10],w=!(0,l.ut)(s),M=1e-6,S=1-M;if(o*=u,1===a)for(let e=0;e<d;++e){const t=4*i[e],r=n[t],a=n[t+1],s=n[t+2],l=n[t+3];let d=h*r+p*a+x*s,T=m*r+v*a+b*s,C=f*r+g*a+y*s;if(w){const e=d*d+T*T+C*C;if(e<S&&e>M){const t=1/Math.sqrt(e);d*=t,T*=t,C*=t}}c[o]=d,c[o+1]=T,c[o+2]=C,c[o+3]=l,o+=u}else for(let e=0;e<d;++e){const t=4*i[e],r=n[t],s=n[t+1],l=n[t+2],d=n[t+3];let T=h*r+p*s+x*l,C=m*r+v*s+b*l,_=f*r+g*s+y*l;if(w){const e=T*T+C*C+_*_;if(e<S&&e>M){const t=1/Math.sqrt(e);T*=t,C*=t,_*=t}}for(let e=0;e<a;++e)c[o]=T,c[o+1]=C,c[o+2]=_,c[o+3]=d,o+=u}}(t,r,o,n);break}}}(0,h.vt)();class be{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,o,a){!function(e,t,r,o,a,n){const{buffer:i,offset:s}=n;for(const n of r.fields.keys()){const r=e.get(n),l=r?.indices;if(r&&l)xe(n,r,o,a,i,s);else if("olidColor"===n&&null!=t){const r=e.get("position")?.indices;if(r){const e=r.length;ge(t,i.getField(n,v.XP),e,s)}}}}(r,o,this.layout,e,t,a)}}var ye=r(33442),we=r(47724);function Me({units:e,factor:t},r,o,a){const n=Ce*e;return o+((a?1-Math.abs((0,d.Om)(r,a)):0)*t*Te+n)}const Se=new we.L,Te=2e-5,Ce=2e-6,_e=(0,h.vt)();var Ie=r(43616),Pe=r(5482),ze=r(91429),Re=r(91829),Fe=r(4431),De=r(1843),Oe=r(72824),je=r(13840),Ee=r(98958),Be=r(16943),He=r(33524),Ne=r(56133),We=r(4576);r(66289);var Ae=r(69622),Ge=r(65529),Le=r(32728);class Ve{constructor(e){this.localTransform=e.localTransform,this.globalTransform=e.globalTransform,this.modelOrigin=e.modelOrigin,this.model=e.instanceModel,this.modelNormal=e.instanceModelNormal,this.modelScaleFactors=e.modelScaleFactors,this.boundingSphere=e.boundingSphere,this.featureAttribute=e.getField("instanceFeatureAttribute",v.Eq),this.color=e.getField("instanceColor",v.XP),this.olidColor=e.getField("instanceOlidColor",v.XP),this.state=e.getField("state",v.SL),this.lodLevel=e.getField("lodLevel",v.SL)}}let ke=class extends Ae.A{constructor(e,t){super(e),this.events=new Ge.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return $e(Ue.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=Xe,this._buffer=this._layout.createBuffer(this._capacity),this._view=new Ve(this._buffer)}get capacity(){return this._capacity}get size(){return this._size}get view(){return this._view}addInstance(){this._size+1>this._capacity&&this._grow();const e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){const t=this._view.state;(0,Y.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),this._getStateFlag(e,18)?this._setStateFlags(e,32):this.freeInstance(e),this.events.emit("instances-changed")}freeInstance(e){const t=this._view.state;(0,Y.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),t.set(e,0),this._size--}setLocalTransform(e,t,r=!0){this._view.localTransform.setMat(e,t),r&&this.updateModelTransform(e)}getLocalTransform(e,t){this._view.localTransform.getMat(e,t)}setGlobalTransform(e,t,r=!0){this._view.globalTransform.setMat(e,t),r&&this.updateModelTransform(e)}getGlobalTransform(e,t){this._view.globalTransform.getMat(e,t)}updateModelTransform(e){const t=this._view,r=qe,o=Ze;t.localTransform.getMat(e,Ye),t.globalTransform.getMat(e,Je);const a=(0,l.lw)(Je,Je,Ye);(0,d.hZ)(r,a[12],a[13],a[14]),t.modelOrigin.setVec(e,r),(0,i.z0)(o,a),t.model.setMat(e,o);const n=(0,Le.wp)(qe,a);n.sort(),t.modelScaleFactors.set(e,0,n[1]),t.modelScaleFactors.set(e,1,n[2]),(0,i.B8)(o,o),(0,i.mg)(o,o),t.modelNormal.setMat(e,o),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){const r=this._view;r.model.getMat(e,Ze),r.modelOrigin.getVec(e,qe),t[0]=Ze[0],t[1]=Ze[1],t[2]=Ze[2],t[3]=0,t[4]=Ze[3],t[5]=Ze[4],t[6]=Ze[5],t[7]=0,t[8]=Ze[6],t[9]=Ze[7],t[10]=Ze[8],t[11]=0,t[12]=qe[0],t[13]=qe[1],t[14]=qe[2],t[15]=1}applyShaderTransformation(e,t){null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedModelTransform(e,t){return this.getModelTransform(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t),t}getCombinedLocalTransform(e,t){this._view.localTransform.getMat(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedMaxScaleFactor(e){let t=this._view.modelScaleFactors.get(e,1);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(qe,this,e),t*=Math.max(qe[0],qe[1],qe[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(qe,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(qe[0],qe[1],qe[2])),t}getModel(e,t){this._view.model.getMat(e,t)}setFeatureAttribute(e,t){this._view.featureAttribute?.setVec(e,t)}getFeatureAttribute(e,t){this._view.featureAttribute?.getVec(e,t)}setColor(e,t){this._view.color?.setVec(e,t)}setObjectAndLayerIdColor(e,t){this._view.olidColor?.setVec(e,t)}setVisible(e,t){t!==this.getVisible(e)&&(this._setStateFlag(e,4,t),this.events.emit("instance-visibility-changed",{index:e}))}getVisible(e){return this._getStateFlag(e,4)}setHighlight(e,t){const{_highlightOptionsMap:r}=this,o=r.get(e);t?t!==o&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):o&&(r.delete(e),this._setStateFlag(e,8,!1),this.events.emit("instance-highlight-changed"))}get highlightOptionsMap(){return this._highlightOptionsMap}getHighlightStateFlag(e){return this._getStateFlag(e,8)}geHighlightOptionsPrev(e){const t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){const t=this.highlightOptionsMap.get(e)??null;return t?this._highlightOptionsMapPrev.set(e,t):this._highlightOptionsMapPrev.delete(e),t}getState(e){return this._view.state.get(e)}getLodLevel(e){return this._view.lodLevel.get(e)}countFlags(e){let t=0;for(let r=0;r<this._capacity;++r)this.getState(r)&e&&++t;return t}_setStateFlags(e,t){const r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){const r=this._view.state;t=r.get(e)&~t,r.set(e,t)}_setStateFlag(e,t,r){r?this._setStateFlags(e,t):this._clearStateFlags(e,t)}_getStateFlag(e,t){return!!(this._view.state.get(e)&t)}_grow(){this._capacity=Math.max(Xe,Math.floor(this._capacity*We.Ji)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new Ve(this._buffer)}_findSlot(){const e=this._view.state;let t=this._next;for(;1&e.get(t);)t=t+1===this._capacity?0:t+1;return this._next=t+1===this._capacity?0:t+1,t}};(0,Pe.Cg)([(0,ze.MZ)({constructOnly:!0})],ke.prototype,"shaderTransformation",void 0),(0,Pe.Cg)([(0,ze.MZ)()],ke.prototype,"_size",void 0),(0,Pe.Cg)([(0,ze.MZ)({readOnly:!0})],ke.prototype,"size",null),ke=(0,Pe.Cg)([(0,ze.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],ke);const Ue=(0,De.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function $e(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,Be.E)()&&e.vec4u8("instanceOlidColor"),e}const qe=(0,h.vt)(),Ze=(0,s.vt)(),Ye=(0,c.vt)(),Je=(0,c.vt)(),Xe=64,Ke=(0,De.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var Qe=r(74810),et=r(28491),tt=r(90644),rt=r(49788);class ot extends Oe.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=Qe.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=h.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,h.CN)(.2,.2,.2),this.diffuse=(0,h.CN)(.8,.8,.8),this.externalColor=(0,Re.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,h.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=rt.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}Oe.gy;let at=class extends Ee.w{constructor(e,t){let o=(0,Fe.U)(st(t));t.instanced&&t.instancedDoublePrecision&&(o=o.concat((0,Fe.U)(function(e){return $e(Ke.clone(),e)}(t)))),super(e,t,o),this.shader=new je.r(et.D,()=>r.e(5141).then(r.bind(r,5141))),this.ignoreUnused=!0}_makePipeline(e,t){const{output:r,transparent:o,cullFace:a,customDepthTest:n,hasOccludees:i}=e;return(0,tt.Ey)({blending:o?(0,He.Yf)(r,!1,e.emissionDimmingPass):null,culling:it(e)?(0,tt.Xt)(a):null,depthTest:(0,He.mt)(r,nt(n)),depthWrite:(0,He.z5)(e),colorWrite:tt.kn,stencilWrite:i?Ne.v0:null,stencilTest:i?t?Ne.Ax:Ne.cP:null,polygonOffset:(0,ye.s)(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t,r){return r?this._occludeePipelineState:super.getPipeline(e,t,r)}};function nt(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function it(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function st(e){const t=(0,De.BP)().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&(0,Be.E)()&&t.vec4u8("olidColor"),t}at=(0,Pe.Cg)([(0,ze.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],at);var lt=r(51976);class ct extends we.L{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1,this.renderOccluded=!1}get textureCoordinateType(){return this.hasTextures?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}}(0,Pe.Cg)([(0,lt.W)({count:4})],ct.prototype,"alphaDiscardMode",void 0),(0,Pe.Cg)([(0,lt.W)({count:3})],ct.prototype,"doubleSidedMode",void 0),(0,Pe.Cg)([(0,lt.W)({count:7})],ct.prototype,"pbrMode",void 0),(0,Pe.Cg)([(0,lt.W)({count:3})],ct.prototype,"cullFace",void 0),(0,Pe.Cg)([(0,lt.W)({count:3})],ct.prototype,"normalType",void 0),(0,Pe.Cg)([(0,lt.W)({count:3})],ct.prototype,"customDepthTest",void 0),(0,Pe.Cg)([(0,lt.W)({count:8})],ct.prototype,"emissionSource",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasVertexColors",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasSymbolColors",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasVerticalOffset",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasColorTexture",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasMetallicRoughnessTexture",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasOcclusionTexture",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasNormalTexture",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasScreenSizePerspective",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasVertexTangents",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasOccludees",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"instanced",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"instancedDoublePrecision",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasModelTransformation",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"offsetBackfaces",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasVVSize",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasVVColor",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"receiveShadows",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasShadowHighlights",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"receiveAmbientOcclusion",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"receiveGlobalIllumination",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"textureAlphaPremultiplied",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"instancedFeatureAttribute",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"instancedColor",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"writeDepth",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"snowCover",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasColorTextureTransform",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasEmissionTextureTransform",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasNormalTextureTransform",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasOcclusionTextureTransform",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasMetallicRoughnessTextureTransform",void 0);var ut=r(57323);let dt=class extends at{constructor(){super(...arguments),this.shader=new je.r(ut.R,()=>r.e(2314).then(r.bind(r,39933)))}};dt=(0,Pe.Cg)([(0,ze.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],dt);class ht extends lt.K{constructor(){super(...arguments),this.receiveShadows=!0}}(0,Pe.Cg)([(0,lt.W)()],ht.prototype,"receiveShadows",void 0);class mt extends q.i{constructor(e,t){super(e,pt),this.materialType="default",this.supportsEdges=!0,this.intersectRayDraped=void 0,this.produces=new Map([[2,e=>(0,A.uw)(e)&&!this.transparent],[4,e=>(0,A.uw)(e)&&this.transparent]]),this._layout=st(this.parameters),this._configuration=new ct(t.spherical)}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:o}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(o[3])?1:o[3])>=rt.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,d.t2)(this.parameters.emissiveBaseColor,h.uY)}get emissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)?this.transparent?2:1:0}updateConfiguration(e){super.updateConfiguration(e);const{parameters:t,_configuration:r}=this;r.hasNormalTexture=t.hasNormalTexture,r.hasColorTexture=t.hasColorTexture,r.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,r.hasOcclusionTexture=t.hasOcclusionTexture;const{treeRendering:o,doubleSided:a,doubleSidedType:n}=t;r.hasVertexTangents=!o&&t.hasVertexTangents,r.instanced=t.instanced,r.instancedDoublePrecision=t.instancedDoublePrecision,r.hasVVColor=!!t.vvColor,r.hasVVSize=!!t.vvSize,r.hasVerticalOffset=null!=t.verticalOffset,r.hasScreenSizePerspective=null!=t.screenSizePerspective,r.hasSlicePlane=t.hasSlicePlane,r.alphaDiscardMode=t.textureAlphaMode,r.normalType=o?0:t.normalType,r.transparent=this.transparent,r.enableOITOffset=e.enableOITOffset,r.customDepthTest=t.customDepthTest??0,r.hasOccludees=e.hasOccludees,r.cullFace=t.hasSlicePlane?0:t.cullFace,r.hasModelTransformation=!o&&null!=t.modelTransformation,r.hasVertexColors=t.hasVertexColors,r.hasSymbolColors=t.hasSymbolColors,r.doubleSidedMode=o?2:a&&"normal"===n?1:a&&"winding-order"===n?2:0,r.instancedFeatureAttribute=t.instancedFeatureAttribute,r.instancedColor=t.instancedColor,(0,A._o)(e.output)?(r.receiveShadows=t.receiveShadows,r.hasShadowHighlights=function(e,t){return e.receiveShadows&&null!=t.shadowHighlight?.getTexture()}(r,e),r.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=e.ssao,r.receiveGlobalIllumination=t.receiveAmbientOcclusion&&e.globalIlluminationEnabled):r.receiveShadows=r.hasShadowHighlights=r.receiveAmbientOcclusion=!1,r.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,r.pbrMode=t.usePBR?t.isSchematic?2:1:0,r.emissionSource=t.emissionSource,r.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),r.snowCover=e.snowCover>0,r.hasColorTextureTransform=!!t.colorTextureTransformMatrix,r.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,r.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,r.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,r.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix}intersectRay(e,t,r,o,a,n){const i=this._getMaterialVerticalOffset(t,r);null!=i&&(o=(0,d.Re)(vt,o,i),a=(0,d.Re)(gt,a,i)),n=function(e,t,r,o){Se.output=t.transparent?1:0,Se.polygonOffset=t.polygonOffset,Se.enableOITOffset=t.enableOITOffset;const a=(0,ye.s)(Se);if(!a)return e;const n=(0,d.oW)(_e,o,r);return(t,r,o)=>e(Me(a,n,t,r),r,o)}(n,this._configuration,o,a),K(e,r,o,a,(0,fe.ou)(r.verticalOffset),n)}intersectScreenPolygon(e,t,r,o){return function(e,t,r){return null==e?null:(e.distance=function(e,t,r,o,a){const n=(0,ye.s)(r);return n?Me(n,(0,d.oW)(_e,a,o),e,t):e}(e.distance,e.hasNormal?e.normal:null,t,r,e.point),e)}((0,me.MJ)(e,r,t,o,this._createScreenPolygonVertexDisplacement(t,r)),this._configuration,r.camera.eye)}createGLMaterial(e){return new ft(e)}createBufferWriter(){return new be(this._layout)}get transparent(){const{drivenOpacity:e,opacity:t,externalColor:r,layerOpacity:o,texture:a,textureId:n,textureAlphaMode:i,colorMixMode:s}=this.parameters,l=r[3];return e||t<1&&"replace"!==s||l<1&&"ignore"!==s||o<1||(null!=a||null!=n)&&1!==i&&2!==i&&"replace"!==s}_createScreenPolygonVertexDisplacement(e,t){const r=this._getMaterialVerticalOffset(e,t);return null==r?null:{applyToVertex:(e,t,o,a)=>(e[0]=t+r[0],e[1]=o+r[1],e[2]=a+r[2],e),applyToAabb:e=>((0,m.Ne)(e,(0,d.WQ)(St,(0,m.pg)(e,St),r)),(0,m.vI)(e,(0,d.WQ)(St,(0,m.Lu)(e,St),r)),e)}}_getMaterialVerticalOffset(e,t){if(null==this.parameters.verticalOffset)return null;const r=t.camera;(0,d.hZ)(yt,e[12],e[13],e[14]);let o=null;switch(t.viewingMode){case 1:o=(0,d.S8)(bt,yt);break;case 2:o=(0,d.C)(bt,xt)}const a=(0,d.Re)(wt,yt,r.eye),n=(0,d.Bw)(a),i=(0,d.hs)(a,a,1/n);let s=null;this.parameters.screenSizePerspective&&(s=(0,d.Om)(o,i));const l=(0,Ie.kE)(r,n,this.parameters.verticalOffset,s??0,this.parameters.screenSizePerspective,null);return(0,d.hs)(o,o,l),(0,d.ei)(Mt,o,t.transform.inverseRotation)}}class ft extends k{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,d.hZ)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?dt:at,e)}}class pt extends ot{constructor(){super(...arguments),this.treeRendering=!1,this.useIndexing=!1,this.hasVertexTangents=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get emissionSource(){return null!=this.emissiveTextureId&&0===this.emissiveSource?3:0===this.emissiveSource?2:1}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}const vt=(0,h.vt)(),gt=(0,h.vt)(),xt=(0,h.fA)(0,0,1),bt=(0,h.vt)(),yt=(0,h.vt)(),wt=(0,h.vt)(),Mt=(0,h.vt)(),St=(0,h.vt)(),Tt=()=>R.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class Ct{constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function _t(e){const t=e.params,r=t.topology;let o=!0;switch(t.vertexAttributes||(Tt().warn("Geometry must specify vertex attributes"),o=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(Tt().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),o=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(Tt().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),o=!1)):(Tt().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),o=!1)}}else Tt().warn("Indexed geometries must specify faces"),o=!1;break}default:Tt().warn(`Unsupported topology '${r}'`),o=!1}e.params.material||(Tt().warn("Geometry requires material"),o=!1);const a=e.params.vertexAttributes;for(const e in a)a[e].values||(Tt().warn("Geometries with externally defined attributes are not yet supported"),o=!1);return o}function It(e){const t=(0,m.Ie)();return e.forEach(e=>{const r=e.boundingInfo;null!=r&&((0,m.iT)(t,r.bbMin),(0,m.iT)(t,r.bbMax))}),t}function Pt(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function zt(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const Rt=new j.A(1,2,"wosr");async function Ft(e,t){const s=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:{fileType:e.match(/(.*\.(json|json\.gz))$/)?"wosr":"unknown",url:e,specifiedLodIndex:null}}((0,a.EM)(e));if("wosr"===s.fileType){const e=await(t.cache?t.cache.loadWOSR(s.url,t):async function(e,t){const r=await async function(e,t){const r=await(0,P.Ke)((0,I.A)(e,t));if(r.ok)return r.value.data;(0,O.QP)(r.error),function(e){throw new z.A("",`Request for object resource failed: ${e}`)}(r.error)}(e,t),o=await async function(e,t){const r=new Array;for(const o in e){const a=e[o],n=a.images[0].data;if(!n){Tt().warn("Externally referenced texture data is not yet supported");continue}const i=a.encoding+";base64,"+n,s="/textureDefinitions/"+o,l="rgba"===a.channels?a.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==Pt(l)},u=t?.disableTextures?Promise.resolve(null):(0,B.D)(i,t);r.push(u.then(e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l})))}const o=await Promise.all(r),a={};for(const e of o)a[e.refId]=e;return a}(r.textureDefinitions??{},t);let a=0;for(const e in o)if(o.hasOwnProperty(e)){const t=o[e];a+=t?.image?t.image.width*t.image.height*4:0}return new Ct(r,o,a+(0,F.Qh)(r))}(s.url,t)),{engineResources:r,referenceBoundingBox:o}=function(e,t){const r=new Array,o=new Array,a=new Array,n=new D,i=e.resource,s=j.A.parse(i.version||"1.0","wosr");Rt.validate(s);const l=i.model.name,c=i.model.geometries,u=i.materialDefinitions??{},d=e.textures;let m=0;const f=new Map;for(let e=0;e<c.length;e++){const i=c[e];if(!_t(i))continue;const s=zt(i),l=i.params.vertexAttributes,p=[],v=e=>{if("PerAttributeArray"===i.params.topology)return null;const t=i.params.faces;for(const r in t)if(r===e)return t[r].values;return null},g=l.position,x=g.values.length/g.valuesPerElement;for(const e in l){const t=l[e],r=t.values,o=v(e)??(0,E.tM)(x);p.push([e,new H.n(r,o,t.valuesPerElement,!0)])}const b=s.texture,y=d&&d[b];if(y&&!f.has(b)){const{image:e,parameters:t}=y,r=new W.h(e,t);o.push(r),f.set(b,r)}const w=f.get(b),M=w?w.id:void 0,S=s.material;let T=n.get(S,b);if(null==T){const e=u[S.slice(S.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=y?Pt(y.alphaChannelUsage):void 0,o={ambient:(0,h.ci)(e.diffuse),diffuse:(0,h.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:M,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:y?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(o,t.materialParameters),T=new mt(o,t),n.set(S,b,T)}a.push(T);const C=new N.V(T,p);m+=p.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(C)}return{engineResources:[{name:l,stageResources:{textures:o,materials:a,geometries:r},pivotOffset:i.model.pivotOffset,numberOfVertices:m,lodThreshold:null}],referenceBoundingBox:It(r)}}(e,t);return{lods:r,referenceBoundingBox:o,isEsriSymbolResource:!1,isWosr:!0}}let f;if(t.cache)f=await t.cache.loadGLTF(s.url,t,!!t.usePBR,!!t.useEmissive);else{const{loadGLTF:e}=await r.e(5669).then(r.bind(r,51698));f=await e(new y.R,s.url,t,t.usePBR,t.useEmissive)}const{engineResources:S,referenceBoundingBox:C}=function(e,t,r){const a=e.model,s=e.meta,f=a.meta?.ESRI_proxyEllipsoid,y=s.isEsriSymbolResource&&null!=f&&"EsriRealisticTreesStyle"===s.ESRI_webstyle;y&&!e.customMeta.esriTreeRendering&&(e.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const a=e.model.lods[r];for(const n of a.parts){const a=n.attributes.normal;if(null==a)return;const i=n.attributes.position,s=i.count,u=(0,h.vt)(),m=(0,h.vt)(),f=(0,h.vt)(),p=new Float32Array(4*s),g=new Float32Array(3*s),x=(0,l.B8)((0,c.vt)(),n.transform);let b=0,y=0;for(let l=0;l<s;l++){i.getVec(l,m),a.getVec(l,u),(0,d.Z0)(m,m,n.transform),(0,d.Re)(f,m,t.center),(0,d.Qr)(f,f,t.radius);const s=f[2],c=(0,d.Bw)(f),h=Math.min(.45+.55*c*c,1)**o.Tf;(0,d.Qr)(f,f,t.radius),null!==x&&(0,d.Z0)(f,f,x),(0,d.S8)(f,f),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,d.Cc)(f,f,u,s>-1?.2:Math.min(-4*s-3.8,1)),g[b]=f[0],g[b+1]=f[1],g[b+2]=f[2],b+=3,p[y]=h,p[y+1]=h,p[y+2]=h,p[y+3]=1,y+=4}n.attributes.normal=new v.xs(g.buffer),n.attributes.color=new v.Eq(p.buffer)}}}(e,f));const S=!!t.usePBR,C=s.isEsriSymbolResource?{usePBR:S,isSchematic:!1,treeRendering:y,mrrFactors:Qe.SY}:{usePBR:S,isSchematic:!1,treeRendering:!1,mrrFactors:Qe.mb},I={...t.materialParameters,treeRendering:y},P=new Array,z=new Map,R=new Map,F=a.lods.length,D=(0,m.Ie)();return a.lods.forEach((e,s)=>{const l=!0===t.skipHighLods&&(F>1&&0===s||F>3&&1===s)||!1===t.skipHighLods&&null!=r&&s!==r;if(l&&0!==s)return;const c=new _(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{const r=l?new mt({},t):function(e,t,r,a,n,i,s,l,c){const d=e.materials.get(t.material);if(null==d)return null;const{normal:h,color:m,texCoord0:f,tangent:p}=t.attributes,v=t.material+(h?"_normal":"")+(m?"_color":"")+(f?"_texCoord0":"")+(p?"_tangent":""),g=null!=t.attributes.texCoord0,x=null!=t.attributes.normal,b=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(d.alphaMode);if(!i.has(v)){if(g){const t=(t,r=!1,o=!1)=>{if(null!=t&&!s.has(t)){const a=e.textures.get(t);if(a){const e=a.data,n=r&&!(0,M.x3)(e)?l.compressionOptions:void 0;s.set(t,new W.h((0,M.x3)(e)?e.data:e,{...a.parameters,preMultiplyAlpha:!(0,M.x3)(e)&&o,encoding:(0,M.x3)(e)?e.encoding:void 0,compressionOptions:n}))}}},r=1!==b&&!c;t(d.colorTexture,r,1!==b),t(d.normalTexture),t(d.occlusionTexture,!0),t(d.emissiveTexture),t(d.metallicRoughnessTexture,!0)}const r=(0,o.xV)(d.color[0]),h=(0,o.xV)(d.color[1]),m=(0,o.xV)(d.color[2]),f=null!=d.colorTexture&&g?s.get(d.colorTexture):null,p=(0,Qe.Jr)(d),y=null!=d.normalTextureTransform?.scale?d.normalTextureTransform?.scale:u.Un;i.set(v,new mt({...a,customDepthTest:1,textureAlphaMode:b,textureAlphaCutoff:d.alphaCutoff,diffuse:[r,h,m],ambient:[r,h,m],opacity:"OPAQUE"===d.alphaMode?1:d.opacity,doubleSided:d.doubleSided,doubleSidedType:"winding-order",cullFace:d.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:x?0:2,castShadows:!0,receiveShadows:d.receiveShadows,receiveAmbientOcclusion:d.receiveAmbientOcclusion,textureId:null!=f?f.id:void 0,colorMixMode:d.colorMixMode,normalTextureId:null!=d.normalTexture&&g?s.get(d.normalTexture).id:void 0,textureAlphaPremultiplied:null!=f&&!!f.parameters.preMultiplyAlpha,occlusionTextureId:null!=d.occlusionTexture&&g?s.get(d.occlusionTexture).id:void 0,emissiveTextureId:null!=d.emissiveTexture&&g?s.get(d.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=d.metallicRoughnessTexture&&g?s.get(d.metallicRoughnessTexture).id:void 0,emissiveBaseColor:[d.emissiveFactor[0],d.emissiveFactor[1],d.emissiveFactor[2]],emissiveStrengthKHR:null!=d.emissiveStrengthKHR?d.emissiveStrengthKHR:1,emissiveStrengthFromSymbol:null!=n.emissiveStrengthFromSymbol?n.emissiveStrengthFromSymbol:void 0,mrrFactors:p?Qe.Bt:[d.metallicFactor,d.roughnessFactor,a.mrrFactors[2]],isSchematic:p,colorTextureTransformMatrix:T(d.colorTextureTransform),normalTextureTransformMatrix:T(d.normalTextureTransform),scale:[y[0],y[1]],occlusionTextureTransformMatrix:T(d.occlusionTextureTransform),emissiveTextureTransformMatrix:T(d.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:T(d.metallicRoughnessTextureTransform),...n},l))}const y=i.get(v);if(r.stageResources.materials.push(y),g){const e=e=>{null!=e&&r.stageResources.textures.push(s.get(e))};e(d.colorTexture),e(d.normalTexture),e(d.occlusionTexture),e(d.emissiveTexture),e(d.metallicRoughnessTexture)}return y}(a,e,c,C,I,z,R,t,y),{geometry:d,vertexCount:h}=function(e,t){const r=e.attributes.position.count,o=(0,w.x)(e.indices||r,e.primitiveType),a=p(3*r),{typedBuffer:s,typedBufferStride:l}=e.attributes.position;(0,g.a)(a,s,e.transform,3,l);const c=[["position",new H.n(a,o,3,!0)]];if(null!=e.attributes.normal){const t=p(3*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.normal;(0,i.Ge)(Dt,e.transform),(0,g.b)(t,a,Dt,3,s),(0,n.or)(Dt)&&(0,g.n)(t,t),c.push(["normal",new H.n(t,o,3,!0)])}if(null!=e.attributes.tangent){const t=p(4*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.tangent;(0,i.z0)(Dt,e.transform),(0,x.t)(t,a,Dt,4,s),(0,n.or)(Dt)&&(0,g.n)(t,t,4),c.push(["tangent",new H.n(t,o,4,!0)])}if(null!=e.attributes.texCoord0){const t=p(2*r),{typedBuffer:a,typedBufferStride:n}=e.attributes.texCoord0;(0,b.a)(t,a,2,n),c.push(["uv0",new H.n(t,o,2,!0)])}const u=e.attributes.color;if(null!=u){const t=new Uint8Array(4*r);4===u.elementCount?u instanceof v.Eq?(0,x.b)(t,u,1,255):(u instanceof v.XP||u instanceof v.Uz)&&(0,x.b)(t,u,1/255,255):(t.fill(255),u instanceof v.xs?(0,g.f)(t,u.typedBuffer,1,255,4,u.typedBufferStride):(e.attributes.color instanceof v.eI||e.attributes.color instanceof v.nS)&&(0,g.f)(t,u.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),c.push(["color",new H.n(t,o,4,!0)])}return{geometry:new N.V(t,c),vertexCount:r}}(e,r??new mt({},t)),f=d.boundingInfo;null!=f&&0===s&&((0,m.iT)(D,f.bbMin),(0,m.iT)(D,f.bbMax)),null!=r&&(c.stageResources.geometries.push(d),c.numberOfVertices+=h)}),l||P.push(c)}),{engineResources:P,referenceBoundingBox:D}}(f,t,s.specifiedLodIndex);return{lods:S,referenceBoundingBox:C,isEsriSymbolResource:f.meta.isEsriSymbolResource,isWosr:!1}}const Dt=(0,s.vt)()},32728(e,t,r){r.d(t,{YH:()=>s,hG:()=>n,nu:()=>l,wp:()=>i}),r(34727);var o=r(35522),a=r(51850);function n(e){const t=e[0]*e[0]+e[4]*e[4]+e[8]*e[8],r=e[1]*e[1]+e[5]*e[5]+e[9]*e[9],o=e[2]*e[2]+e[6]*e[6]+e[10]*e[10];return Math.sqrt(Math.max(t,r,o))}function i(e,t){const r=Math.sqrt(t[0]*t[0]+t[4]*t[4]+t[8]*t[8]),a=Math.sqrt(t[1]*t[1]+t[5]*t[5]+t[9]*t[9]),n=Math.sqrt(t[2]*t[2]+t[6]*t[6]+t[10]*t[10]);return(0,o.hZ)(e,r,a,n),e}function s(e,t,r){r=r||e;const a=(0,o.Om)(e,t);(0,o.hZ)(r,e[0]-a*t[0],e[1]-a*t[1],e[2]-a*t[2]),(0,o.S8)(r,r)}function l(e,t,r,n=(0,a.vt)()){const i=(0,o.Bw)(e),s=(0,o.Bw)(t),l=(0,o.Om)(e,t)/(i*s);if(l<.9999999999999999){const a=Math.acos(l),d=((1-r)*i+r*s)/Math.sin(a),h=d/i*Math.sin((1-r)*a),m=d/s*Math.sin(r*a);return(0,o.hs)(c,e,h),(0,o.hs)(u,t,m),(0,o.WQ)(n,c,u)}return(0,o.Cc)(n,e,t,r)}(0,a.vt)(),(0,a.vt)(),(0,a.vt)();const c=(0,a.vt)(),u=(0,a.vt)()},46686(e,t,r){r.d(t,{o:()=>a});var o=r(31821);function a(e,t){t&&e.varyings.add("linearDepth","float",{invariant:!0}),e.vertex.code.add(o.H`
626
+ fragBlur = b / w_total;`),e}const h=Object.freeze(Object.defineProperty({__proto__:null,build:d},Symbol.toStringTag,{value:"Module"}))},43609(e,t,r){r.d(t,{a:()=>n,f:()=>i,n:()=>a});var o=r(34275);function a(e,t){n(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r=2,a=r){const n=t.length/2;let i=0,s=0;if(!(0,o.iu)(t)||(0,o.dk)(t)){for(let o=0;o<n;++o)e[i]=t[s],e[i+1]=t[s+1],i+=r,s+=a;return}const l=(0,o.a3)(t);if((0,o.JI)(t))for(let o=0;o<n;++o)e[i]=Math.max(t[s]/l,-1),e[i+1]=Math.max(t[s+1]/l,-1),i+=r,s+=a;else for(let o=0;o<n;++o)e[i]=t[s]/l,e[i+1]=t[s+1]/l,i+=r,s+=a}function i(e,t,r,o){const a=e.typedBuffer,n=e.typedBufferStride,i=o?.count??e.count;let s=(o?.dstIndex??0)*n;for(let e=0;e<i;++e)a[s]=t,a[s+1]=r,s+=n}Object.freeze(Object.defineProperty({__proto__:null,fill:i,normalizeIntegerBuffer:n,normalizeIntegerBufferView:a},Symbol.toStringTag,{value:"Module"}))},73354(e,t,r){r.d(t,{a:()=>i,b:()=>l,c:()=>n,d:()=>s,e:()=>m,f:()=>d,l:()=>u,n:()=>f,t:()=>h});var o=r(40876),a=(r(44208),r(72727));function n(e,t,r){i(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function i(e,t,r,o=3,n=o){const i=(0,a.k)(e.length,o,3),s=(0,a.k)(t.length,n,3),l=Math.min(i,s),c=r[0],u=r[1],d=r[2],h=r[4],m=r[5],f=r[6],p=r[8],v=r[9],g=r[10],x=r[12],b=r[13],y=r[14];let w=0,M=0;for(let r=0;r<l;r++){const r=t[w],a=t[w+1],i=t[w+2];e[M]=c*r+h*a+p*i+x,e[M+1]=u*r+m*a+v*i+b,e[M+2]=d*r+f*a+g*i+y,w+=n,M+=o}return e}function s(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function l(e,t,r,o=3,n=o){const i=(0,a.k)(e.length,o,3),s=(0,a.k)(t.length,n,3),l=Math.min(i,s),c=r[0],u=r[1],d=r[2],h=r[3],m=r[4],f=r[5],p=r[6],v=r[7],g=r[8];let x=0,b=0;for(let r=0;r<l;r++){const r=t[x],a=t[x+1],i=t[x+2];e[b]=c*r+h*a+p*i,e[b+1]=u*r+m*a+v*i,e[b+2]=d*r+f*a+g*i,x+=n,b+=o}}function c(e,t,r,o=3,a=o){const n=Math.min(e.length/o,t.length/a);let i=0,s=0;for(let l=0;l<n;l++)e[s]=r*t[i],e[s+1]=r*t[i+1],e[s+2]=r*t[i+2],i+=a,s+=o;return e}function u(e,t,r,o){d(e.typedBuffer,t.typedBuffer,r,o,e.typedBufferStride,t.typedBufferStride)}function d(e,t,r,a,n=3,i=n){const s=Math.min(e.length/n,t.length/i);let l=0,c=0;const u=1/o.Tf;for(let o=0;o<s;o++)e[c]=a*(r*t[l])**u,e[c+1]=a*(r*t[l+1])**u,e[c+2]=a*(r*t[l+2])**u,l+=i,c+=n}function h(e,t,r,o=3,n=o){const i=(0,a.k)(e.length,o,3),s=(0,a.k)(t.length,n,3),l=Math.min(i,s);let c=0,u=0;for(let a=0;a<l;a++)e[u]=t[c]+r[0],e[u+1]=t[c+1]+r[1],e[u+2]=t[c+2]+r[2],c+=n,u+=o;return e}function m(e,t){f(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function f(e,t,r=3,o=r){const a=Math.min(e.length/r,t.length/o);let n=0,i=0;for(let s=0;s<a;s++){const a=t[n],s=t[n+1],l=t[n+2],c=a*a+s*s+l*l;if(c>0){const t=1/Math.sqrt(c);e[i]=t*a,e[i+1]=t*s,e[i+2]=t*l}n+=o,i+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:d,linearToSRGBView:u,normalize:f,normalizeView:m,scale:c,scaleView:function(e,t,r){c(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const o=Math.min(e.count,t.count),a=e.typedBuffer,n=e.typedBufferStride,i=t.typedBuffer,s=t.typedBufferStride;let l=0,c=0;for(let e=0;e<o;e++)a[c]=i[l]>>r,a[c+1]=i[l+1]>>r,a[c+2]=i[l+2]>>r,l+=s,c+=n},transformMat3:l,transformMat3View:s,transformMat4:i,transformMat4View:n,translate:h},Symbol.toStringTag,{value:"Module"}))},69052(e,t,r){r.d(t,{hr:()=>a,ie:()=>l,uC:()=>s});var o=r(34727);class a{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return n(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,o.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+i(this.range,e-t,r)}minimalMonotonic(e,t,r){return n(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,o=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(o)?r:o}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function n(e,t,r,o,a=0,n=!1){return(o-=a)<t?o+=i(e,t-o):o>r&&(o-=i(e,o-r)),n&&o===r&&(o=t),o+a}function i(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const s=new a(0,2*Math.PI),l=(new a(-Math.PI,Math.PI),new a(0,360))},46140(e,t,r){r.d(t,{A:()=>a});var o=r(49186);class a{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new o.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new a(this.major,this.minor,this._context)}static parse(e,t=""){const[r,n]=e.split("."),i=/^\s*\d+\s*$/;if(!r?.match||!i.test(r))throw new o.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!n?.match||!i.test(n))throw new o.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const s=parseInt(r,10),l=parseInt(n,10);return new a(s,l,t)}}},61473(e,t,r){function o(e){return e=e||globalThis.location.hostname,c.some(t=>null!=e?.match(t))}function a(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(n)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(i)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}r.d(t,{EM:()=>a,b5:()=>o});const n=/^devext\.arcgis\.com$/,i=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,l=/^[\w-]*\.mapsqa\.arcgis\.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,n,i,/^jsapps\.esri\.com$/,s,l]},82534(e,t,r){function o(){return[0,0,0,1]}function a(e){return[e[0],e[1],e[2],e[3]]}r.d(t,{o8:()=>a,vt:()=>o,zK:()=>n});const n=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:n,clone:a,create:o,fromValues:function(e,t,r,o){return[e,t,r,o]}},Symbol.toStringTag,{value:"Module"}))},88340(e,t,r){function o(){return new Float32Array(2)}function a(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function n(){return o()}function i(){return a(1,1)}function s(){return a(1,0)}function l(){return a(0,1)}r.d(t,{Un:()=>u,fA:()=>a,uY:()=>c,vt:()=>o});const c=n(),u=i(),d=s(),h=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:d,UNIT_Y:h,ZEROS:c,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:o,fromValues:a,ones:i,unitX:s,unitY:l,zeros:n},Symbol.toStringTag,{value:"Module"}))},48163(e,t,r){function o(){return[0,0]}function a(e){return[e[0],e[1]]}function n(e,t){return[e,t]}function i(){return n(1,1)}function s(){return n(-1,-1)}function l(){return n(1,0)}function c(){return n(0,1)}r.d(t,{IA:()=>d,Un:()=>u,fA:()=>n,o8:()=>a,vt:()=>o});const u=i(),d=s(),h=l(),m=c();Object.freeze(Object.defineProperty({__proto__:null,NEGATIVE_ONES:d,ONES:u,UNIT_X:h,UNIT_Y:m,ZEROS:[0,0],clone:a,create:o,freeze:function(e,t){return[e,t]},fromArray:function(e,t=[0,0]){const r=Math.min(2,e.length);for(let o=0;o<r;++o)t[o]=e[o];return t},fromValues:n,negativeOnes:s,ones:i,unitX:l,unitY:c,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},91829(e,t,r){function o(){return[0,0,0,0]}function a(e,t,r,o){return[e,t,r,o]}function n(e,t,r,o){return[e,t,r,o]}function i(){return a(1,1,1,1)}function s(){return a(1,0,0,0)}function l(){return a(0,1,0,0)}function c(){return a(0,0,1,0)}function u(){return a(0,0,0,1)}r.d(t,{CN:()=>n,Un:()=>h,_Y:()=>u,fA:()=>a,uY:()=>d,vt:()=>o});const d=[0,0,0,0],h=i(),m=s(),f=l(),p=c(),v=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:h,UNIT_W:v,UNIT_X:m,UNIT_Y:f,UNIT_Z:p,ZEROS:d,clone:function(e){return[e[0],e[1],e[2],e[3]]},create:o,freeze:n,fromArray:function(e,t=[0,0,0,0]){const r=Math.min(4,e.length);for(let o=0;o<r;++o)t[o]=e[o];return t},fromValues:a,ones:i,unitW:u,unitX:s,unitY:l,unitZ:c,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},78955(e,t,r){r.d(t,{Bw:()=>v,C:()=>a,Cc:()=>y,LI:()=>h,Om:()=>b,S8:()=>x,T9:()=>d,WQ:()=>i,Z0:()=>w,aI:()=>S,hG:()=>p,hZ:()=>n,hs:()=>m,jk:()=>u,m3:()=>g,t2:()=>M});var o=r(34304);function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function n(e,t,r,o,a){return e[0]=t,e[1]=r,e[2]=o,e[3]=a,e}function i(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function s(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function l(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function c(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function u(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}function d(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}function h(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function m(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function f(e,t){const r=t[0]-e[0],o=t[1]-e[1],a=t[2]-e[2],n=t[3]-e[3];return Math.sqrt(r*r+o*o+a*a+n*n)}function p(e,t){const r=t[0]-e[0],o=t[1]-e[1],a=t[2]-e[2],n=t[3]-e[3];return r*r+o*o+a*a+n*n}function v(e){const t=e[0],r=e[1],o=e[2],a=e[3];return Math.sqrt(t*t+r*r+o*o+a*a)}function g(e){const t=e[0],r=e[1],o=e[2],a=e[3];return t*t+r*r+o*o+a*a}function x(e,t){const r=t[0],o=t[1],a=t[2],n=t[3];let i=r*r+o*o+a*a+n*n;return i>0&&(i=1/Math.sqrt(i),e[0]=r*i,e[1]=o*i,e[2]=a*i,e[3]=n*i),e}function b(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function y(e,t,r,o){const a=t[0],n=t[1],i=t[2],s=t[3];return e[0]=a+o*(r[0]-a),e[1]=n+o*(r[1]-n),e[2]=i+o*(r[2]-i),e[3]=s+o*(r[3]-s),e}function w(e,t,r){const o=t[0],a=t[1],n=t[2],i=t[3];return e[0]=r[0]*o+r[4]*a+r[8]*n+r[12]*i,e[1]=r[1]*o+r[5]*a+r[9]*n+r[13]*i,e[2]=r[2]*o+r[6]*a+r[10]*n+r[14]*i,e[3]=r[3]*o+r[7]*a+r[11]*n+r[15]*i,e}function M(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function S(e,t){const r=e[0],a=e[1],n=e[2],i=e[3],s=t[0],l=t[1],c=t[2],u=t[3],d=(0,o.FD)();return Math.abs(r-s)<=d*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(a-l)<=d*Math.max(1,Math.abs(a),Math.abs(l))&&Math.abs(n-c)<=d*Math.max(1,Math.abs(n),Math.abs(c))&&Math.abs(i-u)<=d*Math.max(1,Math.abs(i),Math.abs(u))}const T=s,C=l,_=c,I=f,P=p,z=v,R=g;Object.freeze(Object.defineProperty({__proto__:null,add:i,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:a,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:I,distance:f,div:_,divide:c,dot:b,equals:S,exactEquals:M,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:z,length:v,lerp:y,max:d,min:u,mul:C,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:x,random:function(e,t=1){const r=o.Ov;let a,n,i,s,l,c;do{a=2*r()-1,n=2*r()-1,l=a*a+n*n}while(l>=1);do{i=2*r()-1,s=2*r()-1,c=i*i+s*s}while(c>=1);const u=Math.sqrt((1-l)/c);return e[0]=t*a,e[1]=t*n,e[2]=t*i*u,e[3]=t*s*u,e},round:h,scale:m,scaleAndAdd:function(e,t,r,o){return e[0]=t[0]+r[0]*o,e[1]=t[1]+r[1]*o,e[2]=t[2]+r[2]*o,e[3]=t[3]+r[3]*o,e},set:n,sqrDist:P,sqrLen:R,squaredDistance:p,squaredLength:g,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:T,subtract:s,transformMat4:w,transformQuat:function(e,t,r){const o=t[0],a=t[1],n=t[2],i=r[0],s=r[1],l=r[2],c=r[3],u=c*o+s*n-l*a,d=c*a+l*o-i*n,h=c*n+i*a-s*o,m=-i*o-s*a-l*n;return e[0]=u*c+m*-i+d*-l-h*-s,e[1]=d*c+m*-s+h*-i-u*-l,e[2]=h*c+m*-l+u*-s-d*-i,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},56512(e,t,r){function o(e){let t,r,o=[],a=!1;return function(...n){return a&&t===this&&function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(e[r]!==t[r])return!1;return!0}(n,o)||(r=e.apply(this,n),t=this,o=n,a=!0),r}}r.d(t,{B:()=>o})},69397(e,t,r){r.d(t,{Qf:()=>l,Qh:()=>i,RS:()=>a,Ul:()=>m,i5:()=>h,lM:()=>n,qK:()=>u});var o=r(34275);const a=16;function n(e){if(!e)return 0;let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=s(e[r],!1));return t}function i(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return c(e,8);let r=d;for(let o=0;o<t;o++)r+=s(e[o]);return r}(e);let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=s(e[r]));return t}function s(e,t=!0){switch(typeof e){case"object":return t?i(e):u;case"string":return function(e){return 32+e.length}(e);case"number":return a;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+(t?(0,o.iu)(t)?t.byteLength+h:Array.isArray(t)?c(t,a):0:0),0)}function c(e,t){return d+e.length*t}const u=32,d=16,h=145,m=64},65806(e,t,r){r.d(t,{g:()=>i});var o=r(51850),a=r(91218),n=r(9762);function i(e,t,r,o){if((0,a.canProjectWithoutEngine)(e.spatialReference,r))return s[0]=e.x,s[1]=e.y,s[2]=e.z??0,(0,n.projectBuffer)(s,e.spatialReference,0,t,r,0);const i=(0,a.tryProject)(e,r,o);return!!i&&(t[0]=i.x,t[1]=i.y,t[2]=i.z??0,!0)}const s=(0,o.vt)()},27993(e,t,r){r.d(t,{F:()=>s});var o=r(91218),a=r(16930),n=r(9762),i=r(65806);function s(e,t,r,a){return!(null==t||null==a||e.length<2)&&((0,o.canProjectWithoutEngine)(t,a)?(0,n.projectBuffer)(e,t,0,r,a,0,1):(l.x=e[0],l.y=e[1],l.z=e[2],l.spatialReference=t,(0,i.g)(l,r,a)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:a.A.WGS84,type:"point"}},72727(e,t,r){function o(e,t,r){if(t<=0)return 0;const o=e-r;return o<0?0:Math.floor(o/t)+1}r.d(t,{k:()=>o}),r(53966)},31411(e,t,r){r.d(t,{GS:()=>T,gh:()=>_});var o=r(49186),a=r(56512),n=r(65864),i=r(4305),s=r(50954),l=r(52006),c=r(49663),u=r(46068),d=r(15507);const h=1e-6,m=[0,0];function f(e){return{maxSegmentLength:e.maxSegmentLength??0,maxDeviation:e.maxDeviation??0,maxSegmentsPerCurve:e.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(e.minSegmentsPerCurve??1,1)}}class p{constructor(e,t){this.curveStart=e,this.curveEnd=t,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(e,t){this.tStart=0,this.arcStart=e,this.tEndStack.push(1),this.arcEndStack.push(t)}splitAt(e){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(e),this.arcEndStack.push(this.interpolate(e))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(e,{maxDeviation:t,maxSegmentLength:r,maxSegmentsPerCurve:o,minSegmentsPerCurve:a}){const n=r*r,i=t*t,s=1/o,l=this.interpolate(0),c=this.interpolate(1);(0,d.kb)(this.curveStart,l)>h&&e.push(l),this.initialize(l,c);const u=1/a;for(let e=a-1;e>0;e--){const t=e*u;this.pop(),this.splitAt(t)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<s||(0===n||!isFinite(n)||(0,d.kb)(this.arcStart,this.arcEnd)<n)&&(0===i||!isFinite(i)||this.getDeviation2()<i)?(e.push(this.arcEnd),this.next()):this.splitInHalf();return(0,d.kb)(this.curveEnd,c)>h&&e.push([...this.curveEnd]),e}}class v extends p{constructor(e,t){const[r,o,a]=t.b;super(e,r),this._controlPointsStack=[],this._curveControlPoints=[o,a],this._arcControlPoints=[o,a],this._controlPointsStack.push(this._arcControlPoints)}splitAt(e){const{arcStart:t,arcEnd:r,tStart:o,tEnd:a}=this,[n,i]=this._arcControlPoints,s=(e-o)/(a-o),l=(0,d.RS)([],t,n,s),c=(0,d.RS)(m,n,i,s),u=(0,d.RS)([],i,r,s),h=(0,d.RS)([],l,c,s),f=(0,d.RS)([],c,u,s),p=(0,d.RS)([],h,f,s);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([f,u]),this.tEndStack.push(e),this.arcEndStack.push(p),this._arcControlPoints[0]=l,this._arcControlPoints[1]=h,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(e){const{curveStart:t,curveEnd:r}=this,[o,a]=this._curveControlPoints;return(0,i.B4)(t,o,a,r,e)}getDeviation2(){const{arcStart:e,arcEnd:t}=this,[r,o]=this._arcControlPoints;return Math.max((0,d.yE)(r,e,t),(0,d.yE)(o,e,t))}}class g extends p{constructor(e,t){const[r]=t.a;super(e,r),this._derivedEllipse=(0,u.SW)(e,t)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(e){return(0,u.Uk)(this._derivedEllipse,e)}getDeviation2(){return(0,d.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function x(e,t,r,{cx:o,cy:a,radius:n,thetaStart:i,thetaEnd:s,isInvalid:l},{maxDeviation:c,maxSegmentLength:u,maxSegmentsPerCurve:m,minSegmentsPerCurve:f}){if(l)return e.push([...r]),e;const p=2*n,v=[o+n*Math.cos(i),a+n*Math.sin(i)],g=[o+n*Math.cos(s),a+n*Math.sin(s)];(0,d.kb)(t,v)>h&&e.push(v);const x=Math.abs(s-i),b=u>0&&u<p?2*Math.asin(u/p):x,y=c>0&&c<=n?2*Math.acos(1-c/n):x,w=Math.min(b,y),M=Math.min(m,Math.max(f,Math.ceil(Math.abs(x/w)))),S=1/M;for(let t=1;t<M;t++){const r=t*S,l=i*(1-r)+s*r;e.push([o+n*Math.cos(l),a+n*Math.sin(l)])}return e.push(g),(0,d.kb)(r,g)>h&&e.push([...r]),e}function b(e,t,r,o){return new v(t,r).densify(e,o)}function y(e,t,r,o){const a=(0,s.pM)(t,r),[n]=r.c;return x(e,t,n,a,o)}function w(e,t,r,o){const a=(0,c.io)(t,r),[n]=r.a;return x(e,t,n,a,o)}function M(e,t,r,o){const[a,n,i,s,l,c,u]=r.a;return 0===c||0===u?(e.push([...a]),e):new g(t,r).densify(e,o)}function S(e,t,r,o){return(0,l.Xq)(r)?(e.push([...r]),e):(0,l.n1)(r)?b(e,t,r,o):(0,l.aO)(r)?y(e,t,r,o):(0,l.DA)(r)?w(e,t,r,o):M(e,t,r,o)}function T(e,t={}){if(!(0,l.Ed)(e))return e;const r=f(t),o=(0,l.FD)(e),a=[];for(const e of o){const t=[];for(let o=0;o<e.length-1;o++){const a=o+1,n=[...(0,l.yP)(e[o])];0===o&&t.push(n),S(t,n,e[a],r)}a.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},paths:a,spatialReference:e.spatialReference}:{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},rings:a,spatialReference:e.spatialReference}}const C=(0,a.B)(e=>({maxDeviation:0,maxSegmentLength:100*e,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function _(e,t,a){const i=new Set(t);return await async function(e,t,a){let n=null;for(const i of e)if(i&&(0,l.Ed)(i)&&null==i.spatialReference.xyTolerance&&(0,l.V8)(i,t)){const e=i.spatialReference;if(!e)throw new o.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const t=I(e);if(a.has(t))i.spatialReference=a.get(t);else{n||(n=await Promise.all([r.e(3661),r.e(1878),r.e(8885),r.e(5756),r.e(3299),r.e(1550)]).then(r.bind(r,78125)));const s=n.fromSpatialReference(e),l=s?.getTolerance();if(null==l)throw new o.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const c=i.spatialReference.clone();c.read({xyTolerance:l}),i.spatialReference=c,a.set(t,c)}}}(e,i,a),e.map(e=>{if(!e||!(0,l.Ed)(e))return e;const r=e.spatialReference.xyTolerance;if(null==r)return e;const o=C(r);return(0,n.rS)(function(e,t,r){if(!(0,l.Ed)(e))return e;const o=new Set(t),a=f(r),n=(0,l.FD)(e),i=[];let s=!1;for(const e of n){const t=[];for(let r=0;r<e.length-1;r++){const n=r+1,i=[...(0,l.yP)(e[r])];0===r&&t.push(i);const c=e[n];(0,l.Xq)(c)?t.push([...c]):(0,l.n1)(c)&&!o.has("cubic-bezier")?b(t,i,c,a):(0,l.aO)(c)&&!o.has("circular-arc")?y(t,i,c,a):(0,l.DA)(c)&&!o.has("elliptic-arc")?w(t,i,c,a):(0,l.wY)(c)&&!o.has("elliptic-arc")?M(t,i,c,a):(t.push((0,l.tk)(c)),s=!0)}i.push(t)}return"curvePaths"in e?{...void 0!==e.hasZ?{hasZ:e.hasZ}:{},...void 0!==e.hasM?{hasM:e.hasM}:{},spatialReference:e.spatialReference,...s?{curvePaths:i}:{paths:i}}:{hasZ:e.hasZ,hasM:e.hasM,spatialReference:e.spatialReference,...s?{curveRings:i}:{rings:i}}}(e,t,o))})}function I(e){if(null!=e.wkid)return`${e.wkid}`;if(null!=e.wkt)return e.wkt;const t="toJSON"in e&&"function"==typeof e.toJSON?e.toJSON():e;return JSON.stringify(t)}},17136(e,t,r){r.d(t,{Y_:()=>R,O7:()=>P,el:()=>I});var o=r(92602),a=r(69052),n=r(49186),i=r(53966),s=r(39829),l=r(82799),c=r(16930),u=r(80754),d=r(21325),h=r(28735),m=r(52006),f=r(31411),p=r(11254),v=r(60408),g=r(65864),x=r(2272),b=r(84952),y=r(92300);const w=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function M(e){return"polygon"===e[0].type}function S(e){return"polyline"===e[0].type}function T(e,t,r){const o=1e6;if(t){const t=(0,m.Ed)(e)?(0,f.GS)(e,{maxSegmentLength:o}):function(e,t){if(!(e instanceof l.A||e instanceof s.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw w().error(e),new n.A("internal:geometry",e)}const r=(0,u.r8)(e),o=[];for(const e of r){const r=[];o.push(r),r.push([e[0][0],e[0][1]]);for(let o=0;o<e.length-1;o++){const a=e[o][0],n=e[o][1],i=e[o+1][0],s=e[o+1][1],l=Math.sqrt((i-a)*(i-a)+(s-n)*(s-n)),c=(s-n)/l,u=(i-a)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const o=e*t,i=u*o+a,s=c*o+n;r.push([i,s])}const e=(l+Math.floor(d-1)*t)/2,o=u*e+a,i=c*e+n;r.push([o,i])}r.push([i,s])}}return function(e){return"polygon"===e.type}(e)?new s.A({rings:o,spatialReference:e.spatialReference}):new l.A({paths:o,spatialReference:e.spatialReference})}(e,o);e=(0,h.ci)(t,!0)}return r&&(e=(0,u.kS)(e,r)),e}function C(e,t,r){if(Array.isArray(e)){const o=e[0];if(o>t){const r=(0,u.kd)(o,t);e[0]=o+r*(-2*t)}else if(o<r){const t=(0,u.kd)(o,r);e[0]=o+t*(-2*r)}}else{const o=e.x;if(o>t){const r=(0,u.kd)(o,t);e=e.clone().offset(r*(-2*t),0)}else if(o<r){const t=(0,u.kd)(o,r);e=e.clone().offset(t*(-2*r),0)}}return e}function _(e,t){let r=-1;for(let o=0;o<t.cutIndexes.length;o++){const a=t.cutIndexes[o],n=t.geometries[o],i=(0,u.r8)(n);for(let e=0;e<i.length;e++){const t=i[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const o=t[e][0];r=o>r?o:r}r=Number(r.toFixed(9));const o=-360*(0,u.kd)(r,180);for(let r=0;r<t.length;r++){const t=n.getPoint(e,r);n.setPoint(e,r,t.clone().offset(o,0))}return!0}})}if(a===r){if(M(e))for(const t of(0,u.r8)(n))e[a]=e[a].addRing(t);else if(S(e))for(const t of(0,u.r8)(n))e[a]=e[a].addPath(t)}else r=a,e[a]=n}return e}async function I(e,t,r){if(!Array.isArray(e))return I([e],t);t&&"string"!=typeof t&&w().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const a="string"==typeof t?t:t?.url??o.A.geometryServiceUrl;let n,i,c,m,f,M,S,P,z=0;const R=[],F=[];for(const t of e)if(null!=t)if(n||(n=t.spatialReference,i=(0,d.Vp)(n),c=n.isWebMercator,M=c?102100:4326,m=u.j7[M].maxX,f=u.j7[M].minX,S=u.j7[M].plus180Line,P=u.j7[M].minus180Line),i)if("mesh"===t.type)F.push(t);else if("point"===t.type)F.push(C(t.clone(),m,f));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>C(e,m,f)),F.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,i);F.push(e.rings?new s.A(e):e)}else if(t.extent){const e=t.extent,r=(0,u.kd)(e.xmin,f)*(2*m);let o=0===r?t.clone():(0,u.kS)(t.clone(),r);e.offset(r,0);let{xmin:a,xmax:n}=e;a=Number(a.toFixed(9)),n=Number(n.toFixed(9)),e.intersects(S)&&n!==m?(z=n>z?n:z,o=T(o,c),R.push(o),F.push("cut")):e.intersects(P)&&a!==f?(z=n*(2*m)>z?n*(2*m):z,o=T(o,c,360),R.push(o),F.push("cut")):F.push(o)}else F.push(t.clone());else F.push(t);else F.push(t);let D=(0,u.kd)(z,m),O=-90;const j=D,E=new l.A;for(;D>0;){const e=360*D-180;E.addPath([[e,O],[e,-1*O]]),O*=-1,D--}if(R.length>0&&j>0){const t=_(R,await async function(e,t,r,o){const a=(0,x.Dl)(e),n=t[0].spatialReference,i={...o,responseType:"json",query:{...a.query,f:"json",sr:(0,d.YX)(n),target:JSON.stringify({geometryType:(0,v.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},s=await(0,p.A)(a.path+"/cut",i),{cutIndexes:l,geometries:c=[]}=s.data;return{cutIndexes:l,geometries:c.map(e=>{const t=(0,g.rS)(e);return t.spatialReference=n,t})}}(a,R,E,r)),o=[],n=[];for(let r=0;r<F.length;r++){const a=F[r];if("cut"!==a)n.push(a);else{const a=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&a.rings.length>=i.rings.length?(o.push(a),n.push("simplify")):n.push(c?(0,h.Gh)(a):a)}}if(!o.length)return n;const i=await async function(e,t,r){const o="string"==typeof e?(0,b.An)(e):e,a=t[0].spatialReference,n=(0,v.$B)(t[0]),i={...r,query:{...o.query,f:"json",sr:(0,d.YX)(a),geometries:JSON.stringify((0,y.X)(t))}},{data:s}=await(0,p.A)(o.path+"/simplify",i);return(0,y.V)(s.geometries,n,a)}(a,o,r),s=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?s.push(t):s.push(c?(0,h.Gh)(i.shift()):i.shift())}return s}const B=[];for(let e=0;e<F.length;e++){const t=F[e];if("cut"!==t)B.push(t);else{const e=R.shift();B.push(!0===c?(0,h.Gh)(e):e)}}return B}function P(e,t,r){const o=(0,d.Vp)(r);if(null==o)return e;const[a,n]=o.valid,i=2*n;let s=0,l=0;t>n?s=Math.ceil(Math.abs(t-n)/i):t<a&&(s=-Math.ceil(Math.abs(t-a)/i)),e>n?l=Math.ceil(Math.abs(e-n)/i):e<a&&(l=-Math.ceil(Math.abs(e-a)/i));let c=e+(s-l)*i;const u=c-t;return u>n?c-=i:u<a&&(c+=i),c}function z(e){const t=(0,d.Vp)(e);if(null==t)return null;const[r,o]=t.valid;return new a.hr(r,o)}const R=z(c.A.WGS84);z(c.A.WebMercator)},80754(e,t,r){r.d(t,{j7:()=>s,kS:()=>c,kd:()=>l,r8:()=>u});var o=r(82799),a=r(16930),n=r(60408),i=r(52006);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new o.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator}),minus180Line:new o.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new o.A({paths:[[[180,-180],[180,180]]],spatialReference:a.A.WGS84}),minus180Line:new o.A({paths:[[[-180,-180],[-180,180]]],spatialReference:a.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){if((0,i.Ed)(e))for(const r of function(e){return(0,n.Bi)(e)?e.curveRings:e.curvePaths}(e))for(const e of r){if((0,i.aO)(e)){const[r,o]=e.c;r[0]+=t,o[0]+=t;continue}if((0,i.FG)(e)){const[r,o]=e.a;r[0]+=t,o[0]+=t;continue}if((0,i.n1)(e)){const[r,o,a]=e.b;r[0]+=t,o[0]+=t,a[0]+=t;continue}e[0]+=t}for(const r of u(e))for(const e of r)e[0]+=t;return e}function u(e){return(0,n.Bi)(e)?e.rings:e.paths}},27921(e,t,r){r.d(t,{$Q:()=>y,C:()=>s,Cr:()=>u,H:()=>M,O_:()=>c,Qj:()=>l,T7:()=>x,Tj:()=>b,lU:()=>d,mN:()=>S,vE:()=>T,vt:()=>i});var o=r(34727),a=r(35522),n=r(51850);function i(e=C){return[e[0],e[1],e[2],e[3]]}function s(e,t){return function(e,t,r,o,a=i()){return a[0]=e,a[1]=t,a[2]=r,a[3]=o,a}(t[0],t[1],t[2],t[3],e)}function l(e){return e}function c(e,t,r){const o=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],a=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return r[0]=t[0]*a,r[1]=t[1]*a,r[2]=t[2]*a,r[3]=-(r[0]*e[0]+r[1]*e[1]+r[2]*e[2]),r}function u(e,t,r,o=i()){const a=r[0]-t[0],n=r[1]-t[1],s=r[2]-t[2],l=e[0]-t[0],c=e[1]-t[1],u=e[2]-t[2],d=n*u-s*c,h=s*l-a*u,m=a*c-n*l,f=d*d+h*h+m*m,p=Math.abs(f-1)>1e-5&&f>1e-12?1/Math.sqrt(f):1;return o[0]=d*p,o[1]=h*p,o[2]=m*p,o[3]=-(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]),o}function d(e,t,r,o=0,n=Math.floor(r*(1/3)),i=Math.floor(r*(2/3))){if(r<3)return!1;t(m,o);let s=n,l=!1;for(;s<r-1&&!l;)t(f,s),s++,l=!(0,a.t2)(m,f);if(!l)return!1;for(s=Math.max(s,i),l=!1;s<r&&!l;)t(p,s),s++,(0,a.Re)(v,m,f),(0,a.S8)(v,v),(0,a.Re)(g,f,p),(0,a.S8)(g,g),l=!(0,a.t2)(m,p)&&!(0,a.t2)(f,p)&&Math.abs((0,a.Om)(v,g))<h;return l?(u(m,f,p,e),!0):(0!==o||1!==n||2!==i)&&d(e,t,r,0,1,2)}r(78955),r(44280),r(32114),r(32728);const h=.99619469809,m=(0,n.vt)(),f=(0,n.vt)(),p=(0,n.vt)(),v=(0,n.vt)(),g=(0,n.vt)();function x(e,t,r){return function(e){return 0===e||1===e}(T(e,t.origin,t.vector,0,r))}function b(e,t){return S(e,t)>=0}function y(e,t){return function(e,t,r,o,n,i,s){const l=(0,a.Om)(e,r),c=S(e,t);if(l>-1e-6&&l<1e-6)return w(c,n,i);const u=-c/l,d=w(l,n,!1);return!(s&&!d&&!w(c,n,i))&&(d?u>o.c0&&(o.c0=u):u<o.c1&&(o.c1=u),o.c0<=o.c1)}(e,t.ray.origin,t.ray.direction,t,!1,!1,!0)}function w(e,t,r){return r?t?e>=0:e<=0:t?e>0:e<0}function M(e,t,r,o,n=!1){let i=0,s=t[r-1],l=S(e,s),c=n?l>0:l<=0;for(let u=0;u<r;u++){const r=t[u],d=S(e,r),h=n?d>0:d<=0;c!==h&&(0,a.Cc)(o[i++],s,r,l/(l-d)),h&&(0,a.C)(o[i++],r),s=r,l=d,c=h}return i}function S(e,t){return(0,a.Om)(e,t)+e[3]}function T(e,t,r,n,i){const s=(0,a.Om)(e,r),l=S(e,t);if(0===s)return l>=0?2:3;let c=-l/s;return 1&n&&(c=(0,o.qE)(c,0,1)),!(4&n)&&c<0||!(8&n)&&c>1?l>=0?2:3:((0,a.WQ)(i,t,(0,a.hs)(i,r,c)),l>=0?0:1)}const C=[0,0,1,0];(0,n.vt)()},44280(e,t,r){r.d(t,{g7:()=>s,gr:()=>i});var o=r(34727),a=r(35522),n=r(51850);function i(e,t){return(0,a.Om)(e,t)/(0,a.Bw)(e)}function s(e,t){const r=(0,a.Om)(e,t)/((0,a.Bw)(e)*(0,a.Bw)(t));return-(0,o.XM)(r)}(0,n.vt)(),(0,n.vt)()},32114(e,t,r){r.d(t,{Rc:()=>m,rq:()=>d,Km:()=>h}),r(44208);var o=r(26390),a=r(29242),n=r(9093),i=r(82534),s=r(48163),l=r(51850),c=r(91829);class u{constructor(e){this._create=e,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,o.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const e=2*this._itemsPtr;this._items.length>e&&(this._items.length=e),this._itemsPtr=0}static createVec2f64(){return new u(s.vt)}static createVec3f64(){return new u(l.vt)}static createVec4f64(){return new u(c.vt)}static createMat3f64(){return new u(a.vt)}static createMat4f64(){return new u(n.vt)}static createQuatf64(){return new u(i.vt)}get test(){}}u.createVec2f64();const d=u.createVec3f64(),h=u.createVec4f64(),m=(u.createMat3f64(),u.createMat4f64());u.createQuatf64()},38969(e,t,r){r.d(t,{i:()=>a});var o=r(37955);function a(e,t){return new Promise((r,a)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,o.Oo)(e,"canplay",r)),t((0,o.Oo)(e,"error",a)))})}},92300(e,t,r){r.d(t,{V:()=>i,X:()=>n});var o=r(60408),a=r(65864);function n(e){return{geometryType:(0,o.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function i(e,t,r){const o=(0,a.xD)(t);return e.map(e=>{const t=o.fromJSON(e);return t.spatialReference=r,t})}},21015(e,t,r){r.d(t,{R:()=>l});var o=r(11254),a=r(60999),n=r(49186),i=r(17676),s=r(84952);class l{constructor(e=e=>e){this._resolveURI=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,s.DB)(e)?((0,i.Te)(t),(0,s.lJ)(e)):this._load("array-buffer",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){t=this._resolveURI(t);const s=await(0,a.Ke)((0,o.A)(t,{responseType:e,...r}));if(s.ok)return s.value.data;throw(0,i.QP)(s.error),new n.A("gltf-loader-request-error",`Request for resource failed: ${s.error}`)}}},84498(e,t,r){r.d(t,{x:()=>i});var o=r(34275),a=r(97146),n=r(63907);function i(e,t){switch(t){case n.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,a.tM)(e):(0,o.mg)(e)?new Uint16Array(e):e}(e);case n.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,o=(0,a.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(o[e++]=t,o[e++]=t+1,o[e++]=t+2):(o[e++]=t+1,o[e++]=t,o[e++]=t+2)}else{let t=0;for(let a=0;a<r;a+=1)a%2==0?(o[t++]=e[a],o[t++]=e[a+1],o[t++]=e[a+2]):(o[t++]=e[a+1],o[t++]=e[a],o[t++]=e[a+2])}return o}(e);case n.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,o=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)o[e++]=0,o[e++]=t+1,o[e++]=t+2;return o}const a=e[0];let n=e[1],i=0;for(let t=0;t<r;++t){const r=e[t+2];o[i++]=a,o[i++]=n,o[i++]=r,n=r}return o}(e)}}},51530(e,t,r){r.d(t,{KB:()=>i,Xi:()=>a,pn:()=>s,x3:()=>n});var o=r(44208);class a{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function n(e){return"encoded-mesh-texture"===e?.type}async function i(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function s(e,t){if("image/ktx2"===t)return new a(e);const r=new Blob([e],{type:t});let n=URL.createObjectURL(r);switch(t){case"image/jpeg":n+="#.jpg";break;case"image/png":n+="#.png"}const i=new Image;if((0,o.A)("esri-iPhone"))return new Promise((e,t)=>{const r=()=>{a(),e(i)},o=e=>{a(),t(e)},a=()=>{URL.revokeObjectURL(n),i.removeEventListener("load",r),i.removeEventListener("error",o)};i.addEventListener("load",r),i.addEventListener("error",o),i.src=n});try{i.src=n,await i.decode()}catch{}return URL.revokeObjectURL(n),i}},49261(e,t,r){r.d(t,{fetch:()=>Ft});var o=r(40876),a=r(61473),n=r(34727),i=r(77690),s=r(29242),l=r(58083),c=r(9093),u=r(48163),d=r(35522),h=r(51850),m=r(70328),f=r(34275);function p(e,t=!1){return e<=f.y9?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}var v=r(13030),g=r(73354),x=r(50867),b=r(43609),y=r(21015),w=r(84498),M=r(51530),S=r(88340);function T(e){if(null==e)return null;const t=null!=e.offset?e.offset:S.uY,r=null!=e.rotation?e.rotation:0,o=null!=e.scale?e.scale:S.Un,a=(0,s.fA)(1,0,0,0,1,0,t[0],t[1],1),n=(0,s.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,s.fA)(o[0],0,0,0,o[1],0,0,0,1),c=(0,s.vt)();return(0,i.lw)(c,n,l),(0,i.lw)(c,a,c),c}class C{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class _{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new C,this.numberOfVertices=0}}var I=r(11254),P=r(60999),z=r(49186),R=r(53966),F=r(69397);class D{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get size(){let e=0;for(const t of this._outer.values())e+=t.size;return e}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){const o=this._outer.get(e);o?o.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}pop(e,t){const r=this.get(e,t);return this.delete(e,t),r}*outerMap(){for(const e of this._outer)yield e}*values(){for(const e of this._outer.values())yield*e.values()}*[Symbol.iterator](){for(const[e,t]of this._outer)for(const[r,o]of t)yield[e,r,o]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,o)=>e(t,r,o)))}copy(){const e=new D;return this.forAll((t,r,o)=>e.set(r,o,t)),e}}var O=r(17676),j=r(46140),E=r(97146),B=r(31217),H=r(46610),N=r(16613),W=r(18845),A=r(49255),G=r(97768),L=r(92130),V=r(65786);class k extends L.A{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,e=>this._textureNormal=e),this._acquire(e.emissiveTextureId,e=>this._textureEmissive=e),this._acquire(e.occlusionTextureId,e=>this._textureOcclusion=e),this._acquire(e.metallicRoughnessTextureId,e=>this._textureMetallicRoughness=e)}dispose(){super.dispose(),this._texture=(0,G.Gz)(this._texture),this._textureNormal=(0,G.Gz)(this._textureNormal),this._textureEmissive=(0,G.Gz)(this._textureEmissive),this._textureOcclusion=(0,G.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,G.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new $(this._texture?.texture??null,this._textureNormal?.texture??null,this._textureEmissive?.texture??null,this._textureOcclusion?.texture??null,this._textureMetallicRoughness?.texture??null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,G.Gz)(this._texture),this._acquire(e,e=>this._texture=e))}_acquire(e,t){if(null==e)return void t(null);const r=this._textures.acquire(e);if((0,O.$X)(r))return++this._numLoading,void r.then(e=>{if(this._disposed)return(0,G.Gz)(e),void t(null);t(e)}).finally(()=>--this._numLoading);t(r)}}class U extends V.Y{constructor(e=null){super(),this.textureEmissive=e}}class $ extends U{constructor(e,t,r,o,a,n,i){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=o,this.textureMetallicRoughness=a,this.scale=n,this.normalTextureTransformMatrix=i}}var q=r(11725),Z=r(83252),Y=r(620);class J{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const X=(0,m.vt)();function K(e,t,r,o,a,n){if(!e.visible)return;const i=(0,d.jb)(ue,o,r),{tolerance:s}=t,l=new J(s,!1,t.options.normalRequired);if(e.boundingInfo)(0,Y.vA)(0===e.type),ee(e.boundingInfo,r,i,s,a,l,n);else{const t=e.positionAttribute,o=e.primitivePositionIndices;!function(e,t,r,o,a,n,i,s,l,c){const u=t,h=de,m=Math.abs(u[0]),f=Math.abs(u[1]),p=Math.abs(u[2]),v=m>=f?m>=p?0:2:f>=p?1:2,g=v,x=u[g]<0?2:1,b=(v+x)%3,y=(v+(3-x))%3,w=u[b]/u[g],M=u[y]/u[g],S=1/u[g],T=re,C=oe,_=ae,{normalRequired:I}=l;for(let t=r;t<o;++t){const r=3*t,o=i*a[r];(0,d.hZ)(h[0],n[o+0],n[o+1],n[o+2]);const l=i*a[r+1];(0,d.hZ)(h[1],n[l+0],n[l+1],n[l+2]);const u=i*a[r+2];(0,d.hZ)(h[2],n[u+0],n[u+1],n[u+2]),s&&(s.applyToVertex(h[0],h[0][0],h[0][1],h[0][2],t),s.applyToVertex(h[1],h[1][0],h[1][1],h[1][2],t),s.applyToVertex(h[2],h[2][0],h[2][1],h[2][2],t)),(0,d.jb)(T,h[0],e),(0,d.jb)(C,h[1],e),(0,d.jb)(_,h[2],e);const m=T[b]-w*T[g],f=T[y]-M*T[g],p=C[b]-w*C[g],v=C[y]-M*C[g],x=_[b]-w*_[g],P=_[y]-M*_[g],z=x*v-P*p,R=m*P-f*x,F=p*f-v*m;if((z<0||R<0||F<0)&&(z>0||R>0||F>0))continue;const D=z+R+F;if(0===D)continue;const O=z*(S*T[g])+R*(S*C[g])+F*(S*_[g]);if(O*Math.sign(D)<0)continue;const j=O/D;j>=0&&c(j,I?ie(h):null,t)}}(r,i,0,o.length/3,o,t.data,t.stride,a,l,n)}}const Q=(0,h.vt)();function ee(e,t,r,o,a,n,i){if(null==e)return;const s=function(e,t){return(0,d.hZ)(t,1/e[0],1/e[1],1/e[2])}(r,Q);if((0,m.Ne)(X,e.bbMin),(0,m.vI)(X,e.bbMax),null!=a&&a.applyToAabb(X),function(e,t,r,o){return function(e,t,r,o){const a=(e[0]-o-t[0])*r[0],n=(e[3]+o-t[0])*r[0];let i=Math.min(a,n),s=Math.max(a,n);const l=(e[1]-o-t[1])*r[1],c=(e[4]+o-t[1])*r[1];if(s=Math.min(s,Math.max(l,c)),s<0)return!1;if(i=Math.max(i,Math.min(l,c)),i>s)return!1;const u=(e[2]-o-t[2])*r[2],d=(e[5]+o-t[2])*r[2];return s=Math.min(s,Math.max(u,d)),!(s<0)&&(i=Math.max(i,Math.min(u,d)),!(i>s)&&i<1/0)}(e,t,r,o)}(X,t,s,o)){const{primitiveIndices:s,position:l}=e,c=s?s.length:l.indices.length/3;if(c>Z.F){const s=e.getChildren();if(void 0!==s){for(const e of s)ee(e,t,r,o,a,n,i);return}}!function(e,t,r,o,a,n,i,s,l,c,u){const d=e[0],h=e[1],m=e[2],f=t[0],p=t[1],v=t[2],{normalRequired:g}=c;for(let e=0;e<o;++e){const t=s[e],r=3*t,o=i*a[r];let c=n[o],x=n[o+1],b=n[o+2];const y=i*a[r+1];let w=n[y],M=n[y+1],S=n[y+2];const T=i*a[r+2];let C=n[T],_=n[T+1],I=n[T+2];null!=l&&([c,x,b]=l.applyToVertex(he,c,x,b,e),[w,M,S]=l.applyToVertex(he,w,M,S,e),[C,_,I]=l.applyToVertex(he,C,_,I,e));const P=w-c,z=M-x,R=S-b,F=C-c,D=_-x,O=I-b,j=p*O-D*v,E=v*F-O*f,B=f*D-F*p,H=P*j+z*E+R*B,N=H*H;if(N<=ce)continue;const W=d-c,A=h-x,G=m-b,L=(W*j+A*E+G*B)*H;if(L<0||L>N)continue;const V=A*R-z*G,k=G*P-R*W,U=W*z-P*A,$=(f*V+p*k+v*U)*H;if($<0||L+$>N)continue;const q=(F*V+D*k+O*U)/H;q>=0&&u(q,g?ne(P,z,R,F,D,O,te):null,t)}}(t,r,0,c,l.indices,l.data,l.stride,s,a,n,i)}}const te=(0,h.vt)();const re=(0,h.vt)(),oe=(0,h.vt)(),ae=(0,h.vt)();function ne(e,t,r,o,a,n,i){return(0,d.hZ)(se,e,t,r),(0,d.hZ)(le,o,a,n),(0,d.$A)(i,se,le),(0,d.S8)(i,i),i}function ie(e){return(0,d.jb)(se,e[1],e[0]),(0,d.jb)(le,e[2],e[0]),(0,d.$A)(te,se,le),(0,d.S8)(te,te),te}const se=(0,h.vt)(),le=(0,h.vt)(),ce=1e-7*1e-7,ue=(0,h.vt)(),de=[(0,h.vt)(),(0,h.vt)(),(0,h.vt)()],he=(0,h.vt)();var me=r(75956),fe=r(16396);function pe(e,t,r){const{data:o,indices:a}=e,n=t.typedBuffer,i=t.typedBufferStride,s=a.length;r*=i;for(let e=0;e<s;++e){const t=2*a[e];n[r]=o[t],n[r+1]=o[t+1],r+=i}}function ve(e,t,r,o=1){const{data:a,indices:n}=e,i=t.typedBuffer,s=t.typedBufferStride,l=n.length;if(r*=s,1===o)for(let e=0;e<l;++e){const t=3*n[e];i[r]=a[t],i[r+1]=a[t+1],i[r+2]=a[t+2],r+=s}else for(let e=0;e<l;++e){const t=3*n[e];for(let e=0;e<o;++e)i[r]=a[t],i[r+1]=a[t+1],i[r+2]=a[t+2],r+=s}}function ge(e,t,r,o,a=1){const n=t.typedBuffer,i=t.typedBufferStride;if(o*=i,1===a)for(let t=0;t<r;++t)n[o]=e[0],n[o+1]=e[1],n[o+2]=e[2],n[o+3]=e[3],o+=i;else for(let t=0;t<r;++t)for(let t=0;t<a;++t)n[o]=e[0],n[o+1]=e[1],n[o+2]=e[2],n[o+3]=e[3],o+=i}function xe(e,t,r,o,a,n){switch(e){case"position":{(0,Y.vA)(3===t.size);const o=a.getField(e,v.xs);(0,Y.vA)(!!o,`No buffer view for ${e}`),function(e,t,r,o,a=1){if(!t)return void ve(e,r,o,a);const{data:n,indices:i}=e,s=r.typedBuffer,c=r.typedBufferStride,u=i.length,d=t[0],h=t[1],m=t[2],f=t[4],p=t[5],v=t[6],g=t[8],x=t[9],b=t[10],y=t[12],w=t[13],M=t[14];o*=c;let S=0,T=0,C=0;const _=(0,l.tZ)(t)?e=>{S=n[e]+y,T=n[e+1]+w,C=n[e+2]+M}:e=>{const t=n[e],r=n[e+1],o=n[e+2];S=d*t+f*r+g*o+y,T=h*t+p*r+x*o+w,C=m*t+v*r+b*o+M};if(1===a)for(let e=0;e<u;++e)_(3*i[e]),s[o]=S,s[o+1]=T,s[o+2]=C,o+=c;else for(let e=0;e<u;++e){_(3*i[e]);for(let e=0;e<a;++e)s[o]=S,s[o+1]=T,s[o+2]=C,o+=c}}(t,r,o,n);break}case"normal":{(0,Y.vA)(3===t.size);const r=a.getField(e,v.xs);(0,Y.vA)(!!r,`No buffer view for ${e}`),function(e,t,r,o,a=1){if(!t)return void ve(e,r,o,a);const{data:n,indices:i}=e,s=t,c=r.typedBuffer,u=r.typedBufferStride,d=i.length,h=s[0],m=s[1],f=s[2],p=s[4],v=s[5],g=s[6],x=s[8],b=s[9],y=s[10],w=!(0,l.ut)(s),M=1e-6,S=1-M;o*=u;let T=0,C=0,_=0;const I=(0,l.tZ)(s)?e=>{T=n[e],C=n[e+1],_=n[e+2]}:e=>{const t=n[e],r=n[e+1],o=n[e+2];T=h*t+p*r+x*o,C=m*t+v*r+b*o,_=f*t+g*r+y*o};if(1===a)if(w)for(let e=0;e<d;++e){I(3*i[e]);const t=T*T+C*C+_*_;if(t<S&&t>M){const e=1/Math.sqrt(t);c[o]=T*e,c[o+1]=C*e,c[o+2]=_*e}else c[o]=T,c[o+1]=C,c[o+2]=_;o+=u}else for(let e=0;e<d;++e)I(3*i[e]),c[o]=T,c[o+1]=C,c[o+2]=_,o+=u;else for(let e=0;e<d;++e){if(I(3*i[e]),w){const e=T*T+C*C+_*_;if(e<S&&e>M){const t=1/Math.sqrt(e);T*=t,C*=t,_*=t}}for(let e=0;e<a;++e)c[o]=T,c[o+1]=C,c[o+2]=_,o+=u}}(t,o,r,n);break}case"normalCompressed":case"profileRight":case"profileUp":{(0,Y.vA)(2===t.size);const r=a.getField(e,v.mJ);(0,Y.vA)(!!r,`No buffer view for ${e}`),pe(t,r,n);break}case"uv0":{(0,Y.vA)(2===t.size);const r=a.getField(e,v.ZD)??a.getField(e,v.gH);(0,Y.vA)(!!r,`No buffer view for ${e}`),pe(t,r,n);break}case"uvi":{(0,Y.vA)(2===t.size);const r=a.getField(e,v.mJ);(0,Y.vA)(!!r,`No buffer view for ${e}`),pe(t,r,n);break}case"color":case"symbolColor":{const r=a.getField(e,v.XP);(0,Y.vA)(!!r,`No buffer view for ${e}`),(0,Y.vA)(3===t.size||4===t.size),function(e,t,r,o,a=1){const{data:n,indices:i}=e,s=r.typedBuffer,l=r.typedBufferStride,c=i.length;if(o*=l,t===n.length&&4===t){s[o]=n[0],s[o+1]=n[1],s[o+2]=n[2],s[o+3]=n[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=l/4,i=e[o/=4];o+=t;const u=c*a;for(let r=1;r<u;++r)e[o]=i,o+=t;return}if(1!==a)if(4!==t)for(let e=0;e<c;++e){const t=3*i[e];for(let e=0;e<a;++e)s[o]=n[t],s[o+1]=n[t+1],s[o+2]=n[t+2],s[o+3]=255,o+=l}else for(let e=0;e<c;++e){const t=4*i[e];for(let e=0;e<a;++e)s[o]=n[t],s[o+1]=n[t+1],s[o+2]=n[t+2],s[o+3]=n[t+3],o+=l}else{if(4===t){for(let e=0;e<c;++e){const t=4*i[e];s[o]=n[t],s[o+1]=n[t+1],s[o+2]=n[t+2],s[o+3]=n[t+3],o+=l}return}for(let e=0;e<c;++e){const t=3*i[e];s[o]=n[t],s[o+1]=n[t+1],s[o+2]=n[t+2],s[o+3]=255,o+=l}}}(t,t.size,r,n);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{const r=a.getField(e,v.Y$)??a.getField(e,v.Y$);(0,Y.vA)(!!r,`No buffer view for ${e}`),(0,Y.vA)(1===t.size),function(e,t,r){const{data:o,indices:a}=e,n=t.typedBuffer,i=t.typedBufferStride,s=a.length,l=o[0];r*=i;for(let e=0;e<s;++e)n[r]=l,r+=i}(t,r,n);break}case"tangent":{(0,Y.vA)(4===t.size);const o=a.getField(e,v.Eq);(0,Y.vA)(!!o,`No buffer view for ${e}`),function(e,t,r,o,a=1){if(!t)return void function(e,t,r,o=1){const{data:a,indices:n}=e,i=t.typedBuffer,s=t.typedBufferStride,l=n.length;if(r*=s,1===o)for(let e=0;e<l;++e){const t=4*n[e];i[r]=a[t],i[r+1]=a[t+1],i[r+2]=a[t+2],i[r+3]=a[t+3],r+=s}else for(let e=0;e<l;++e){const t=4*n[e];for(let e=0;e<o;++e)i[r]=a[t],i[r+1]=a[t+1],i[r+2]=a[t+2],i[r+3]=a[t+3],r+=s}}(e,r,o,a);const{data:n,indices:i}=e,s=t,c=r.typedBuffer,u=r.typedBufferStride,d=i.length,h=s[0],m=s[1],f=s[2],p=s[4],v=s[5],g=s[6],x=s[8],b=s[9],y=s[10],w=!(0,l.ut)(s),M=1e-6,S=1-M;if(o*=u,1===a)for(let e=0;e<d;++e){const t=4*i[e],r=n[t],a=n[t+1],s=n[t+2],l=n[t+3];let d=h*r+p*a+x*s,T=m*r+v*a+b*s,C=f*r+g*a+y*s;if(w){const e=d*d+T*T+C*C;if(e<S&&e>M){const t=1/Math.sqrt(e);d*=t,T*=t,C*=t}}c[o]=d,c[o+1]=T,c[o+2]=C,c[o+3]=l,o+=u}else for(let e=0;e<d;++e){const t=4*i[e],r=n[t],s=n[t+1],l=n[t+2],d=n[t+3];let T=h*r+p*s+x*l,C=m*r+v*s+b*l,_=f*r+g*s+y*l;if(w){const e=T*T+C*C+_*_;if(e<S&&e>M){const t=1/Math.sqrt(e);T*=t,C*=t,_*=t}}for(let e=0;e<a;++e)c[o]=T,c[o+1]=C,c[o+2]=_,c[o+3]=d,o+=u}}(t,r,o,n);break}}}(0,h.vt)();class be{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,o,a){!function(e,t,r,o,a,n){const{buffer:i,offset:s}=n;for(const n of r.fields.keys()){const r=e.get(n),l=r?.indices;if(r&&l)xe(n,r,o,a,i,s);else if("olidColor"===n&&null!=t){const r=e.get("position")?.indices;if(r){const e=r.length;ge(t,i.getField(n,v.XP),e,s)}}}}(r,o,this.layout,e,t,a)}}var ye=r(33442),we=r(47724);function Me({units:e,factor:t},r,o,a){const n=Ce*e;return o+((a?1-Math.abs((0,d.Om)(r,a)):0)*t*Te+n)}const Se=new we.L,Te=2e-5,Ce=2e-6,_e=(0,h.vt)();var Ie=r(43616),Pe=r(5482),ze=r(91429),Re=r(91829),Fe=r(4431),De=r(1843),Oe=r(72824),je=r(13840),Ee=r(98958),Be=r(16943),He=r(33524),Ne=r(56133),We=r(4576);r(66289);var Ae=r(69622),Ge=r(65529),Le=r(32728);class Ve{constructor(e){this.localTransform=e.localTransform,this.globalTransform=e.globalTransform,this.modelOrigin=e.modelOrigin,this.model=e.instanceModel,this.modelNormal=e.instanceModelNormal,this.modelScaleFactors=e.modelScaleFactors,this.boundingSphere=e.boundingSphere,this.featureAttribute=e.getField("instanceFeatureAttribute",v.Eq),this.color=e.getField("instanceColor",v.XP),this.olidColor=e.getField("instanceOlidColor",v.XP),this.state=e.getField("state",v.SL),this.lodLevel=e.getField("lodLevel",v.SL)}}let ke=class extends Ae.A{constructor(e,t){super(e),this.events=new Ge.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return $e(Ue.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=Xe,this._buffer=this._layout.createBuffer(this._capacity),this._view=new Ve(this._buffer)}get capacity(){return this._capacity}get size(){return this._size}get view(){return this._view}addInstance(){this._size+1>this._capacity&&this._grow();const e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){const t=this._view.state;(0,Y.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),this._getStateFlag(e,18)?this._setStateFlags(e,32):this.freeInstance(e),this.events.emit("instances-changed")}freeInstance(e){const t=this._view.state;(0,Y.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),t.set(e,0),this._size--}setLocalTransform(e,t,r=!0){this._view.localTransform.setMat(e,t),r&&this.updateModelTransform(e)}getLocalTransform(e,t){this._view.localTransform.getMat(e,t)}setGlobalTransform(e,t,r=!0){this._view.globalTransform.setMat(e,t),r&&this.updateModelTransform(e)}getGlobalTransform(e,t){this._view.globalTransform.getMat(e,t)}updateModelTransform(e){const t=this._view,r=qe,o=Ze;t.localTransform.getMat(e,Ye),t.globalTransform.getMat(e,Je);const a=(0,l.lw)(Je,Je,Ye);(0,d.hZ)(r,a[12],a[13],a[14]),t.modelOrigin.setVec(e,r),(0,i.z0)(o,a),t.model.setMat(e,o);const n=(0,Le.wp)(qe,a);n.sort(),t.modelScaleFactors.set(e,0,n[1]),t.modelScaleFactors.set(e,1,n[2]),(0,i.B8)(o,o),(0,i.mg)(o,o),t.modelNormal.setMat(e,o),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){const r=this._view;r.model.getMat(e,Ze),r.modelOrigin.getVec(e,qe),t[0]=Ze[0],t[1]=Ze[1],t[2]=Ze[2],t[3]=0,t[4]=Ze[3],t[5]=Ze[4],t[6]=Ze[5],t[7]=0,t[8]=Ze[6],t[9]=Ze[7],t[10]=Ze[8],t[11]=0,t[12]=qe[0],t[13]=qe[1],t[14]=qe[2],t[15]=1}applyShaderTransformation(e,t){null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedModelTransform(e,t){return this.getModelTransform(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t),t}getCombinedLocalTransform(e,t){this._view.localTransform.getMat(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedMaxScaleFactor(e){let t=this._view.modelScaleFactors.get(e,1);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(qe,this,e),t*=Math.max(qe[0],qe[1],qe[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(qe,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(qe[0],qe[1],qe[2])),t}getModel(e,t){this._view.model.getMat(e,t)}setFeatureAttribute(e,t){this._view.featureAttribute?.setVec(e,t)}getFeatureAttribute(e,t){this._view.featureAttribute?.getVec(e,t)}setColor(e,t){this._view.color?.setVec(e,t)}setObjectAndLayerIdColor(e,t){this._view.olidColor?.setVec(e,t)}setVisible(e,t){t!==this.getVisible(e)&&(this._setStateFlag(e,4,t),this.events.emit("instance-visibility-changed",{index:e}))}getVisible(e){return this._getStateFlag(e,4)}setHighlight(e,t){const{_highlightOptionsMap:r}=this,o=r.get(e);t?t!==o&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):o&&(r.delete(e),this._setStateFlag(e,8,!1),this.events.emit("instance-highlight-changed"))}get highlightOptionsMap(){return this._highlightOptionsMap}getHighlightStateFlag(e){return this._getStateFlag(e,8)}geHighlightOptionsPrev(e){const t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){const t=this.highlightOptionsMap.get(e)??null;return t?this._highlightOptionsMapPrev.set(e,t):this._highlightOptionsMapPrev.delete(e),t}getState(e){return this._view.state.get(e)}getLodLevel(e){return this._view.lodLevel.get(e)}countFlags(e){let t=0;for(let r=0;r<this._capacity;++r)this.getState(r)&e&&++t;return t}_setStateFlags(e,t){const r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){const r=this._view.state;t=r.get(e)&~t,r.set(e,t)}_setStateFlag(e,t,r){r?this._setStateFlags(e,t):this._clearStateFlags(e,t)}_getStateFlag(e,t){return!!(this._view.state.get(e)&t)}_grow(){this._capacity=Math.max(Xe,Math.floor(this._capacity*We.Ji)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new Ve(this._buffer)}_findSlot(){const e=this._view.state;let t=this._next;for(;1&e.get(t);)t=t+1===this._capacity?0:t+1;return this._next=t+1===this._capacity?0:t+1,t}};(0,Pe.Cg)([(0,ze.MZ)({constructOnly:!0})],ke.prototype,"shaderTransformation",void 0),(0,Pe.Cg)([(0,ze.MZ)()],ke.prototype,"_size",void 0),(0,Pe.Cg)([(0,ze.MZ)({readOnly:!0})],ke.prototype,"size",null),ke=(0,Pe.Cg)([(0,ze.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],ke);const Ue=(0,De.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function $e(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,Be.E)()&&e.vec4u8("instanceOlidColor"),e}const qe=(0,h.vt)(),Ze=(0,s.vt)(),Ye=(0,c.vt)(),Je=(0,c.vt)(),Xe=64,Ke=(0,De.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var Qe=r(74810),et=r(28491),tt=r(90644),rt=r(49788);class ot extends Oe.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=Qe.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=h.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,h.CN)(.2,.2,.2),this.diffuse=(0,h.CN)(.8,.8,.8),this.externalColor=(0,Re.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,h.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=rt.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}Oe.gy;let at=class extends Ee.w{constructor(e,t){let o=(0,Fe.U)(st(t));t.instanced&&t.instancedDoublePrecision&&(o=o.concat((0,Fe.U)(function(e){return $e(Ke.clone(),e)}(t)))),super(e,t,o),this.shader=new je.r(et.D,()=>r.e(5141).then(r.bind(r,5141))),this.ignoreUnused=!0}_makePipeline(e,t){const{output:r,transparent:o,cullFace:a,customDepthTest:n,hasOccludees:i}=e;return(0,tt.Ey)({blending:o?(0,He.Yf)(r,!1,e.emissionDimmingPass):null,culling:it(e)?(0,tt.Xt)(a):null,depthTest:(0,He.mt)(r,nt(n)),depthWrite:(0,He.z5)(e),colorWrite:tt.kn,stencilWrite:i?Ne.v0:null,stencilTest:i?t?Ne.Ax:Ne.cP:null,polygonOffset:(0,ye.s)(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t,r){return r?this._occludeePipelineState:super.getPipeline(e,t,r)}};function nt(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function it(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function st(e){const t=(0,De.BP)().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&(0,Be.E)()&&t.vec4u8("olidColor"),t}at=(0,Pe.Cg)([(0,ze.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],at);var lt=r(51976);class ct extends we.L{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1,this.renderOccluded=!1}get textureCoordinateType(){return this.hasTextures?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}}(0,Pe.Cg)([(0,lt.W)({count:4})],ct.prototype,"alphaDiscardMode",void 0),(0,Pe.Cg)([(0,lt.W)({count:3})],ct.prototype,"doubleSidedMode",void 0),(0,Pe.Cg)([(0,lt.W)({count:7})],ct.prototype,"pbrMode",void 0),(0,Pe.Cg)([(0,lt.W)({count:3})],ct.prototype,"cullFace",void 0),(0,Pe.Cg)([(0,lt.W)({count:3})],ct.prototype,"normalType",void 0),(0,Pe.Cg)([(0,lt.W)({count:3})],ct.prototype,"customDepthTest",void 0),(0,Pe.Cg)([(0,lt.W)({count:8})],ct.prototype,"emissionSource",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasVertexColors",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasSymbolColors",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasVerticalOffset",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasColorTexture",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasMetallicRoughnessTexture",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasOcclusionTexture",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasNormalTexture",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasScreenSizePerspective",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasVertexTangents",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasOccludees",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"instanced",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"instancedDoublePrecision",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasModelTransformation",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"offsetBackfaces",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasVVSize",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasVVColor",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"receiveShadows",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasShadowHighlights",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"receiveAmbientOcclusion",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"receiveGlobalIllumination",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"textureAlphaPremultiplied",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"instancedFeatureAttribute",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"instancedColor",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"writeDepth",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"snowCover",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasColorTextureTransform",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasEmissionTextureTransform",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasNormalTextureTransform",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasOcclusionTextureTransform",void 0),(0,Pe.Cg)([(0,lt.W)()],ct.prototype,"hasMetallicRoughnessTextureTransform",void 0);var ut=r(57323);let dt=class extends at{constructor(){super(...arguments),this.shader=new je.r(ut.R,()=>r.e(2314).then(r.bind(r,39933)))}};dt=(0,Pe.Cg)([(0,ze.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],dt);class ht extends lt.K{constructor(){super(...arguments),this.receiveShadows=!0}}(0,Pe.Cg)([(0,lt.W)()],ht.prototype,"receiveShadows",void 0);class mt extends q.i{constructor(e,t){super(e,pt),this.materialType="default",this.supportsEdges=!0,this.intersectRayDraped=void 0,this.produces=new Map([[2,e=>(0,A.uw)(e)&&!this.transparent],[4,e=>(0,A.uw)(e)&&this.transparent]]),this._layout=st(this.parameters),this._configuration=new ct(t.spherical)}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:o}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(o[3])?1:o[3])>=rt.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,d.t2)(this.parameters.emissiveBaseColor,h.uY)}get emissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)?this.transparent?2:1:0}updateConfiguration(e){super.updateConfiguration(e);const{parameters:t,_configuration:r}=this;r.hasNormalTexture=t.hasNormalTexture,r.hasColorTexture=t.hasColorTexture,r.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,r.hasOcclusionTexture=t.hasOcclusionTexture;const{treeRendering:o,doubleSided:a,doubleSidedType:n}=t;r.hasVertexTangents=!o&&t.hasVertexTangents,r.instanced=t.instanced,r.instancedDoublePrecision=t.instancedDoublePrecision,r.hasVVColor=!!t.vvColor,r.hasVVSize=!!t.vvSize,r.hasVerticalOffset=null!=t.verticalOffset,r.hasScreenSizePerspective=null!=t.screenSizePerspective,r.hasSlicePlane=t.hasSlicePlane,r.alphaDiscardMode=t.textureAlphaMode,r.normalType=o?0:t.normalType,r.transparent=this.transparent,r.enableOITOffset=e.enableOITOffset,r.customDepthTest=t.customDepthTest??0,r.hasOccludees=e.hasOccludees,r.cullFace=t.hasSlicePlane?0:t.cullFace,r.hasModelTransformation=!o&&null!=t.modelTransformation,r.hasVertexColors=t.hasVertexColors,r.hasSymbolColors=t.hasSymbolColors,r.doubleSidedMode=o?2:a&&"normal"===n?1:a&&"winding-order"===n?2:0,r.instancedFeatureAttribute=t.instancedFeatureAttribute,r.instancedColor=t.instancedColor,(0,A._o)(e.output)?(r.receiveShadows=t.receiveShadows,r.hasShadowHighlights=function(e,t){return e.receiveShadows&&null!=t.shadowHighlight?.getTexture()}(r,e),r.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=e.ssao,r.receiveGlobalIllumination=t.receiveAmbientOcclusion&&e.globalIlluminationEnabled):r.receiveShadows=r.hasShadowHighlights=r.receiveAmbientOcclusion=!1,r.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,r.pbrMode=t.usePBR?t.isSchematic?2:1:0,r.emissionSource=t.emissionSource,r.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),r.snowCover=e.snowCover>0,r.hasColorTextureTransform=!!t.colorTextureTransformMatrix,r.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,r.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,r.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,r.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix}intersectRay(e,t,r,o,a,n){const i=this._getMaterialVerticalOffset(t,r);null!=i&&(o=(0,d.Re)(vt,o,i),a=(0,d.Re)(gt,a,i)),n=function(e,t,r,o){Se.output=t.transparent?1:0,Se.polygonOffset=t.polygonOffset,Se.enableOITOffset=t.enableOITOffset;const a=(0,ye.s)(Se);if(!a)return e;const n=(0,d.oW)(_e,o,r);return(t,r,o)=>e(Me(a,n,t,r),r,o)}(n,this._configuration,o,a),K(e,r,o,a,(0,fe.ou)(r.verticalOffset),n)}intersectScreenPolygon(e,t,r,o){return function(e,t,r){return null==e?null:(e.distance=function(e,t,r,o,a){const n=(0,ye.s)(r);return n?Me(n,(0,d.oW)(_e,a,o),e,t):e}(e.distance,e.hasNormal?e.normal:null,t,r,e.point),e)}((0,me.MJ)(e,r,t,o,this._createScreenPolygonVertexDisplacement(t,r)),this._configuration,r.camera.eye)}createGLMaterial(e){return new ft(e)}createBufferWriter(){return new be(this._layout)}get transparent(){const{drivenOpacity:e,opacity:t,externalColor:r,layerOpacity:o,texture:a,textureId:n,textureAlphaMode:i,colorMixMode:s}=this.parameters,l=r[3];return e||t<1&&"replace"!==s||l<1&&"ignore"!==s||o<1||(null!=a||null!=n)&&1!==i&&2!==i&&"replace"!==s}_createScreenPolygonVertexDisplacement(e,t){const r=this._getMaterialVerticalOffset(e,t);return null==r?null:{applyToVertex:(e,t,o,a)=>(e[0]=t+r[0],e[1]=o+r[1],e[2]=a+r[2],e),applyToAabb:e=>((0,m.Ne)(e,(0,d.WQ)(St,(0,m.pg)(e,St),r)),(0,m.vI)(e,(0,d.WQ)(St,(0,m.Lu)(e,St),r)),e)}}_getMaterialVerticalOffset(e,t){if(null==this.parameters.verticalOffset)return null;const r=t.camera;(0,d.hZ)(yt,e[12],e[13],e[14]);let o=null;switch(t.viewingMode){case 1:o=(0,d.S8)(bt,yt);break;case 2:o=(0,d.C)(bt,xt)}const a=(0,d.Re)(wt,yt,r.eye),n=(0,d.Bw)(a),i=(0,d.hs)(a,a,1/n);let s=null;this.parameters.screenSizePerspective&&(s=(0,d.Om)(o,i));const l=(0,Ie.kE)(r,n,this.parameters.verticalOffset,s??0,this.parameters.screenSizePerspective,null);return(0,d.hs)(o,o,l),(0,d.ei)(Mt,o,t.transform.inverseRotation)}}class ft extends k{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,d.hZ)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?dt:at,e)}}class pt extends ot{constructor(){super(...arguments),this.treeRendering=!1,this.useIndexing=!1,this.hasVertexTangents=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get emissionSource(){return null!=this.emissiveTextureId&&0===this.emissiveSource?3:0===this.emissiveSource?2:1}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}const vt=(0,h.vt)(),gt=(0,h.vt)(),xt=(0,h.fA)(0,0,1),bt=(0,h.vt)(),yt=(0,h.vt)(),wt=(0,h.vt)(),Mt=(0,h.vt)(),St=(0,h.vt)(),Tt=()=>R.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class Ct{constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function _t(e){const t=e.params,r=t.topology;let o=!0;switch(t.vertexAttributes||(Tt().warn("Geometry must specify vertex attributes"),o=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(Tt().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),o=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(Tt().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),o=!1)):(Tt().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),o=!1)}}else Tt().warn("Indexed geometries must specify faces"),o=!1;break}default:Tt().warn(`Unsupported topology '${r}'`),o=!1}e.params.material||(Tt().warn("Geometry requires material"),o=!1);const a=e.params.vertexAttributes;for(const e in a)a[e].values||(Tt().warn("Geometries with externally defined attributes are not yet supported"),o=!1);return o}function It(e){const t=(0,m.Ie)();return e.forEach(e=>{const r=e.boundingInfo;null!=r&&((0,m.iT)(t,r.bbMin),(0,m.iT)(t,r.bbMax))}),t}function Pt(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function zt(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const Rt=new j.A(1,2,"wosr");async function Ft(e,t){const s=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:{fileType:e.match(/(.*\.(json|json\.gz))$/)?"wosr":"unknown",url:e,specifiedLodIndex:null}}((0,a.EM)(e));if("wosr"===s.fileType){const e=await(t.cache?t.cache.loadWOSR(s.url,t):async function(e,t){const r=await async function(e,t){const r=await(0,P.Ke)((0,I.A)(e,t));if(r.ok)return r.value.data;(0,O.QP)(r.error),function(e){throw new z.A("",`Request for object resource failed: ${e}`)}(r.error)}(e,t),o=await async function(e,t){const r=new Array;for(const o in e){const a=e[o],n=a.images[0].data;if(!n){Tt().warn("Externally referenced texture data is not yet supported");continue}const i=a.encoding+";base64,"+n,s="/textureDefinitions/"+o,l="rgba"===a.channels?a.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==Pt(l)},u=t?.disableTextures?Promise.resolve(null):(0,B.D)(i,t);r.push(u.then(e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l})))}const o=await Promise.all(r),a={};for(const e of o)a[e.refId]=e;return a}(r.textureDefinitions??{},t);let a=0;for(const e in o)if(o.hasOwnProperty(e)){const t=o[e];a+=t?.image?t.image.width*t.image.height*4:0}return new Ct(r,o,a+(0,F.Qh)(r))}(s.url,t)),{engineResources:r,referenceBoundingBox:o}=function(e,t){const r=new Array,o=new Array,a=new Array,n=new D,i=e.resource,s=j.A.parse(i.version||"1.0","wosr");Rt.validate(s);const l=i.model.name,c=i.model.geometries,u=i.materialDefinitions??{},d=e.textures;let m=0;const f=new Map;for(let e=0;e<c.length;e++){const i=c[e];if(!_t(i))continue;const s=zt(i),l=i.params.vertexAttributes,p=[],v=e=>{if("PerAttributeArray"===i.params.topology)return null;const t=i.params.faces;for(const r in t)if(r===e)return t[r].values;return null},g=l.position,x=g.values.length/g.valuesPerElement;for(const e in l){const t=l[e],r=t.values,o=v(e)??(0,E.tM)(x);p.push([e,new H.n(r,o,t.valuesPerElement,!0)])}const b=s.texture,y=d&&d[b];if(y&&!f.has(b)){const{image:e,parameters:t}=y,r=new W.h(e,t);o.push(r),f.set(b,r)}const w=f.get(b),M=w?w.id:void 0,S=s.material;let T=n.get(S,b);if(null==T){const e=u[S.slice(S.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=y?Pt(y.alphaChannelUsage):void 0,o={ambient:(0,h.ci)(e.diffuse),diffuse:(0,h.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:M,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:y?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(o,t.materialParameters),T=new mt(o,t),n.set(S,b,T)}a.push(T);const C=new N.V(T,p);m+=p.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(C)}return{engineResources:[{name:l,stageResources:{textures:o,materials:a,geometries:r},pivotOffset:i.model.pivotOffset,numberOfVertices:m,lodThreshold:null}],referenceBoundingBox:It(r)}}(e,t);return{lods:r,referenceBoundingBox:o,isEsriSymbolResource:!1,isWosr:!0}}let f;if(t.cache)f=await t.cache.loadGLTF(s.url,t,!!t.usePBR,!!t.useEmissive);else{const{loadGLTF:e}=await r.e(5669).then(r.bind(r,51698));f=await e(new y.R,s.url,t,t.usePBR,t.useEmissive)}const{engineResources:S,referenceBoundingBox:C}=function(e,t,r){const a=e.model,s=e.meta,f=a.meta?.ESRI_proxyEllipsoid,y=s.isEsriSymbolResource&&null!=f&&"EsriRealisticTreesStyle"===s.ESRI_webstyle;y&&!e.customMeta.esriTreeRendering&&(e.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const a=e.model.lods[r];for(const n of a.parts){const a=n.attributes.normal;if(null==a)return;const i=n.attributes.position,s=i.count,u=(0,h.vt)(),m=(0,h.vt)(),f=(0,h.vt)(),p=new Float32Array(4*s),g=new Float32Array(3*s),x=(0,l.B8)((0,c.vt)(),n.transform);let b=0,y=0;for(let l=0;l<s;l++){i.getVec(l,m),a.getVec(l,u),(0,d.Z0)(m,m,n.transform),(0,d.Re)(f,m,t.center),(0,d.Qr)(f,f,t.radius);const s=f[2],c=(0,d.Bw)(f),h=Math.min(.45+.55*c*c,1)**o.Tf;(0,d.Qr)(f,f,t.radius),null!==x&&(0,d.Z0)(f,f,x),(0,d.S8)(f,f),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,d.Cc)(f,f,u,s>-1?.2:Math.min(-4*s-3.8,1)),g[b]=f[0],g[b+1]=f[1],g[b+2]=f[2],b+=3,p[y]=h,p[y+1]=h,p[y+2]=h,p[y+3]=1,y+=4}n.attributes.normal=new v.xs(g.buffer),n.attributes.color=new v.Eq(p.buffer)}}}(e,f));const S=!!t.usePBR,C=s.isEsriSymbolResource?{usePBR:S,isSchematic:!1,treeRendering:y,mrrFactors:Qe.SY}:{usePBR:S,isSchematic:!1,treeRendering:!1,mrrFactors:Qe.mb},I={...t.materialParameters,treeRendering:y},P=new Array,z=new Map,R=new Map,F=a.lods.length,D=(0,m.Ie)();return a.lods.forEach((e,s)=>{const l=!0===t.skipHighLods&&(F>1&&0===s||F>3&&1===s)||!1===t.skipHighLods&&null!=r&&s!==r;if(l&&0!==s)return;const c=new _(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{const r=l?new mt({},t):function(e,t,r,a,n,i,s,l,c){const d=e.materials.get(t.material);if(null==d)return null;const{normal:h,color:m,texCoord0:f,tangent:p}=t.attributes,v=t.material+(h?"_normal":"")+(m?"_color":"")+(f?"_texCoord0":"")+(p?"_tangent":""),g=null!=t.attributes.texCoord0,x=null!=t.attributes.normal,b=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(d.alphaMode);if(!i.has(v)){if(g){const t=(t,r=!1,o=!1)=>{if(null!=t&&!s.has(t)){const a=e.textures.get(t);if(a){const e=a.data,n=r&&!(0,M.x3)(e)?l.compressionOptions:void 0;s.set(t,new W.h((0,M.x3)(e)?e.data:e,{...a.parameters,preMultiplyAlpha:!(0,M.x3)(e)&&o,encoding:(0,M.x3)(e)?e.encoding:void 0,compressionOptions:n}))}}},r=1!==b&&!c;t(d.colorTexture,r,1!==b),t(d.normalTexture),t(d.occlusionTexture,!0),t(d.emissiveTexture),t(d.metallicRoughnessTexture,!0)}const r=(0,o.xV)(d.color[0]),h=(0,o.xV)(d.color[1]),m=(0,o.xV)(d.color[2]),f=null!=d.colorTexture&&g?s.get(d.colorTexture):null,p=(0,Qe.Jr)(d),y=null!=d.normalTextureTransform?.scale?d.normalTextureTransform?.scale:u.Un;i.set(v,new mt({...a,customDepthTest:1,textureAlphaMode:b,textureAlphaCutoff:d.alphaCutoff,diffuse:[r,h,m],ambient:[r,h,m],opacity:"OPAQUE"===d.alphaMode?1:d.opacity,doubleSided:d.doubleSided,doubleSidedType:"winding-order",cullFace:d.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:x?0:2,castShadows:!0,receiveShadows:d.receiveShadows,receiveAmbientOcclusion:d.receiveAmbientOcclusion,textureId:null!=f?f.id:void 0,colorMixMode:d.colorMixMode,normalTextureId:null!=d.normalTexture&&g?s.get(d.normalTexture).id:void 0,textureAlphaPremultiplied:null!=f&&!!f.parameters.preMultiplyAlpha,occlusionTextureId:null!=d.occlusionTexture&&g?s.get(d.occlusionTexture).id:void 0,emissiveTextureId:null!=d.emissiveTexture&&g?s.get(d.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=d.metallicRoughnessTexture&&g?s.get(d.metallicRoughnessTexture).id:void 0,emissiveBaseColor:[d.emissiveFactor[0],d.emissiveFactor[1],d.emissiveFactor[2]],emissiveStrengthKHR:null!=d.emissiveStrengthKHR?d.emissiveStrengthKHR:1,emissiveStrengthFromSymbol:null!=n.emissiveStrengthFromSymbol?n.emissiveStrengthFromSymbol:void 0,mrrFactors:p?Qe.Bt:[d.metallicFactor,d.roughnessFactor,a.mrrFactors[2]],isSchematic:p,colorTextureTransformMatrix:T(d.colorTextureTransform),normalTextureTransformMatrix:T(d.normalTextureTransform),scale:[y[0],y[1]],occlusionTextureTransformMatrix:T(d.occlusionTextureTransform),emissiveTextureTransformMatrix:T(d.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:T(d.metallicRoughnessTextureTransform),...n},l))}const y=i.get(v);if(r.stageResources.materials.push(y),g){const e=e=>{null!=e&&r.stageResources.textures.push(s.get(e))};e(d.colorTexture),e(d.normalTexture),e(d.occlusionTexture),e(d.emissiveTexture),e(d.metallicRoughnessTexture)}return y}(a,e,c,C,I,z,R,t,y),{geometry:d,vertexCount:h}=function(e,t){const r=e.attributes.position.count,o=(0,w.x)(e.indices||r,e.primitiveType),a=p(3*r),{typedBuffer:s,typedBufferStride:l}=e.attributes.position;(0,g.a)(a,s,e.transform,3,l);const c=[["position",new H.n(a,o,3,!0)]];if(null!=e.attributes.normal){const t=p(3*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.normal;(0,i.Ge)(Dt,e.transform),(0,g.b)(t,a,Dt,3,s),(0,n.or)(Dt)&&(0,g.n)(t,t),c.push(["normal",new H.n(t,o,3,!0)])}if(null!=e.attributes.tangent){const t=p(4*r),{typedBuffer:a,typedBufferStride:s}=e.attributes.tangent;(0,i.z0)(Dt,e.transform),(0,x.t)(t,a,Dt,4,s),(0,n.or)(Dt)&&(0,g.n)(t,t,4),c.push(["tangent",new H.n(t,o,4,!0)])}if(null!=e.attributes.texCoord0){const t=p(2*r),{typedBuffer:a,typedBufferStride:n}=e.attributes.texCoord0;(0,b.a)(t,a,2,n),c.push(["uv0",new H.n(t,o,2,!0)])}const u=e.attributes.color;if(null!=u){const t=new Uint8Array(4*r);4===u.elementCount?u instanceof v.Eq?(0,x.b)(t,u,1,255):(u instanceof v.XP||u instanceof v.Uz)&&(0,x.b)(t,u,1/255,255):(t.fill(255),u instanceof v.xs?(0,g.f)(t,u.typedBuffer,1,255,4,u.typedBufferStride):(e.attributes.color instanceof v.eI||e.attributes.color instanceof v.nS)&&(0,g.f)(t,u.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),c.push(["color",new H.n(t,o,4,!0)])}return{geometry:new N.V(t,c),vertexCount:r}}(e,r??new mt({},t)),f=d.boundingInfo;null!=f&&0===s&&((0,m.iT)(D,f.bbMin),(0,m.iT)(D,f.bbMax)),null!=r&&(c.stageResources.geometries.push(d),c.numberOfVertices+=h)}),l||P.push(c)}),{engineResources:P,referenceBoundingBox:D}}(f,t,s.specifiedLodIndex);return{lods:S,referenceBoundingBox:C,isEsriSymbolResource:f.meta.isEsriSymbolResource,isWosr:!1}}const Dt=(0,s.vt)()},32728(e,t,r){r.d(t,{YH:()=>s,hG:()=>n,nu:()=>l,wp:()=>i}),r(34727);var o=r(35522),a=r(51850);function n(e){const t=e[0]*e[0]+e[4]*e[4]+e[8]*e[8],r=e[1]*e[1]+e[5]*e[5]+e[9]*e[9],o=e[2]*e[2]+e[6]*e[6]+e[10]*e[10];return Math.sqrt(Math.max(t,r,o))}function i(e,t){const r=Math.sqrt(t[0]*t[0]+t[4]*t[4]+t[8]*t[8]),a=Math.sqrt(t[1]*t[1]+t[5]*t[5]+t[9]*t[9]),n=Math.sqrt(t[2]*t[2]+t[6]*t[6]+t[10]*t[10]);return(0,o.hZ)(e,r,a,n),e}function s(e,t,r){r=r||e;const a=(0,o.Om)(e,t);(0,o.hZ)(r,e[0]-a*t[0],e[1]-a*t[1],e[2]-a*t[2]),(0,o.S8)(r,r)}function l(e,t,r,n=(0,a.vt)()){const i=(0,o.Bw)(e),s=(0,o.Bw)(t),l=(0,o.Om)(e,t)/(i*s);if(l<.9999999999999999){const a=Math.acos(l),d=((1-r)*i+r*s)/Math.sin(a),h=d/i*Math.sin((1-r)*a),m=d/s*Math.sin(r*a);return(0,o.hs)(c,e,h),(0,o.hs)(u,t,m),(0,o.WQ)(n,c,u)}return(0,o.Cc)(n,e,t,r)}(0,a.vt)(),(0,a.vt)(),(0,a.vt)();const c=(0,a.vt)(),u=(0,a.vt)()},46686(e,t,r){r.d(t,{o:()=>a});var o=r(31821);function a(e,t){t&&e.varyings.add("linearDepth","float",{invariant:!0}),e.vertex.code.add(o.H`
627
627
  void forwardLinearDepth(float _linearDepth) { ${(0,o.If)(t,"linearDepth = _linearDepth;")} }
628
628
  `)}},33120(e,t,r){r.d(t,{i$:()=>i,xJ:()=>n}),r(46686),r(28682);var o=r(77108),a=r(31821);function n(e){e.vertex.uniforms.add(new o.E("nearFar",e=>e.camera.nearFar))}function i(e){e.vertex.code.add(a.H`float calculateLinearDepth(vec2 nearFar,float z) {
629
629
  return (-z - nearFar[0]) / (nearFar[1] - nearFar[0]);
@@ -772,7 +772,7 @@ forwardTextureCoordinates();`),g.include(a.HQ,t),e.include(f.SS,t),e.include(h.Q
772
772
  discardBySlice(vpos);
773
773
  ${(0,u.If)(w,u.H`vec4 texColor = texture(tex, ${T?"colorUV":"vuv0"});
774
774
  discardOrAdjustAlpha(texColor);`)}
775
- calculateOcclusionAndOutputHighlight();`)}}},22911(e,t,r){r.d(t,{NL:()=>p});var o=r(34727),a=r(49255),n=r(99208),i=r(65261),s=r(40710),l=r(33079),c=r(28421),u=r(20304),d=r(31821),h=r(15976),m=r(63761),f=r(66211);function p(e,t){if(!(0,a._o)(t.output))return;e.fragment.include(i.C);const{emissionSource:r,hasEmissiveTextureTransform:p,bindType:v}=t,g=3===r||4===r||5===r;g&&(e.include(n.r,t),e.fragment.uniforms.add(1===v?new m.N("texEmission",e=>e.textureEmissive):new h.o("texEmission",e=>e.textureEmissive)));const x=2===r||g;x&&e.fragment.uniforms.add(1===v?new l.t("emissiveBaseColor",e=>e.emissiveBaseColor):new s.W("emissiveBaseColor",e=>e.emissiveBaseColor));const b=0!==r;if(b&&7!==r&&6!==r&&4!==r&&5!==r){const t=e=>(0,o.qE)(e??0,0,f.bS);e.fragment.uniforms.add(1===v?new u.m("emissiveStrength",e=>t(e.emissiveStrength)):new c.J("emissiveStrength",e=>t(e.emissiveStrength)))}const y=7===r,w=5===r,M=1===r||6===r||y;e.fragment.code.add(d.H`
775
+ calculateOcclusionAndOutputHighlight();`)}}},22911(e,t,r){r.d(t,{NL:()=>p});var o=r(34727),a=r(49255),n=r(99208),i=r(65261),s=r(40710),l=r(33079),c=r(28421),u=r(20304),d=r(31821),h=r(15976),m=r(63761),f=r(66211);function p(e,t){if(!(0,a._o)(t.output))return;e.fragment.include(i.C);const{emissionSource:r,hasEmissiveTextureTransform:p,bindType:v}=t,g=3===r||4===r||5===r;g&&(e.include(n.r,t),e.fragment.uniforms.add(1===v?new m.N("texEmission",e=>e.textureEmissive):new h.o("texEmission",e=>e.textureEmissive)));const x=2===r||g;x&&e.fragment.uniforms.add(1===v?new l.t("emissiveBaseColor",e=>e.emissiveBaseColor):new s.W("emissiveBaseColor",e=>e.emissiveBaseColor));const b=0!==r;if(b&&7!==r&&6!==r&&4!==r&&5!==r){const t=e=>(0,o.qE)(e??0,0,f.mx);e.fragment.uniforms.add(1===v?new u.m("emissiveStrength",e=>t(e.emissiveStrength)):new c.J("emissiveStrength",e=>t(e.emissiveStrength)))}const y=7===r,w=5===r,M=1===r||6===r||y;e.fragment.code.add(d.H`
776
776
  vec4 getEmissions(vec3 symbolColor) {
777
777
  vec4 emissions = ${x?w?"emissiveSource == 0 ? vec4(emissiveBaseColor, 1.0): vec4(linearizeGamma(symbolColor), 1.0)":"vec4(emissiveBaseColor, 1.0)":M?y?"emissiveSource == 0 ? vec4(0.0): vec4(linearizeGamma(symbolColor), 1.0)":"vec4(linearizeGamma(symbolColor), 1.0)":"vec4(0.0)"};
778
778
  ${(0,d.If)(g,`${(0,d.If)(w,`if(emissiveSource == 0) {\n vec4 emissiveFromTex = textureLookup(texEmission, ${p?"emissiveUV":"vuv0"});\n emissions *= vec4(linearizeGamma(emissiveFromTex.rgb), emissiveFromTex.a);\n }`,`vec4 emissiveFromTex = textureLookup(texEmission, ${p?"emissiveUV":"vuv0"});\n emissions *= vec4(linearizeGamma(emissiveFromTex.rgb), emissiveFromTex.a);`)}\n emissions.a = emissions.rgb == vec3(0.0) ? 0.0: emissions.a;`)}
@@ -1395,4 +1395,4 @@ smoothstep(0.0, 0.1, dot(shadingNormal, groundNormal)));
1395
1395
  return snow * snowCover;
1396
1396
  }`),e.code.add(a.H`vec3 applySnowToMRR(vec3 mrr, float snow) {
1397
1397
  return mix(mrr, vec3(0.0, 1.0, 0.04), snow);
1398
- }`))}},74810(e,t,r){r.d(t,{Bt:()=>s,Jr:()=>n,SY:()=>l,mb:()=>i});var o=r(35522),a=r(51850);function n({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:n,emissiveTexture:i,emissiveFactor:s,occlusionTexture:l}){return null==e&&null==t&&null==i&&(null==s||(0,o.t2)(s,a.uY))&&null==l&&(null==n||1===n)&&(null==r||1===r)}const i=(0,a.CN)(1,1,.5),s=(0,a.CN)(0,.6,.2),l=(0,a.CN)(0,1,.2)},66211(e,t,r){r.d(t,{Hp:()=>s,Tt:()=>n,bS:()=>i});var o=r(5482),a=r(51976);class n extends a.K{constructor(){super(...arguments),this.useFloatBlend=!0}}(0,o.Cg)([(0,a.W)()],n.prototype,"useFloatBlend",void 0);const i=16;function s(e,t){t.useFloatBlend?(e.constants.add("floatBlendOutputScale","float",1),e.constants.add("floatBlendInputScale","float",1)):(e.constants.add("floatBlendOutputScale","float",1/16),e.constants.add("floatBlendInputScale","float",16)),e.constants.add("maxEmissiveStrength","float",i)}},65786(e,t,r){r.d(t,{Y:()=>o});const o=class{};new o},74333(e,t,r){r.d(t,{n:()=>o});class o{constructor(e,t,r,o,a=null){if(this.name=e,this.type=t,this.arraySize=a,this.bind={0:null,1:null,2:null},o)switch(r){case void 0:break;case 0:this.bind[0]=o;break;case 1:this.bind[1]=o;break;case 2:this.bind[2]=o}}equals(e){return this.type===e.type&&this.name===e.name&&this.arraySize===e.arraySize}}}}]);
1398
+ }`))}},74810(e,t,r){r.d(t,{Bt:()=>s,Jr:()=>n,SY:()=>l,mb:()=>i});var o=r(35522),a=r(51850);function n({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:n,emissiveTexture:i,emissiveFactor:s,occlusionTexture:l}){return null==e&&null==t&&null==i&&(null==s||(0,o.t2)(s,a.uY))&&null==l&&(null==n||1===n)&&(null==r||1===r)}const i=(0,a.CN)(1,1,.5),s=(0,a.CN)(0,.6,.2),l=(0,a.CN)(0,1,.2)},66211(e,t,r){r.d(t,{Hp:()=>l,Tt:()=>n,mx:()=>i});var o=r(5482),a=r(51976);class n extends a.K{constructor(){super(...arguments),this.useFloatBlend=!0}}(0,o.Cg)([(0,a.W)()],n.prototype,"useFloatBlend",void 0);const i=16,s=i;function l(e,t){t.useFloatBlend?(e.constants.add("floatBlendOutputScale","float",1),e.constants.add("floatBlendInputScale","float",1)):(e.constants.add("floatBlendOutputScale","float",1/i),e.constants.add("floatBlendInputScale","float",i)),e.constants.add("maxEmissiveStrength","float",s)}},65786(e,t,r){r.d(t,{Y:()=>o});const o=class{};new o},74333(e,t,r){r.d(t,{n:()=>o});class o{constructor(e,t,r,o,a=null){if(this.name=e,this.type=t,this.arraySize=a,this.bind={0:null,1:null,2:null},o)switch(r){case void 0:break;case 0:this.bind[0]=o;break;case 1:this.bind[1]=o;break;case 2:this.bind[2]=o}}equals(e){return this.type===e.type&&this.name===e.name&&this.arraySize===e.arraySize}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6061,8377],{61691(e,t,n){n.d(t,{G:()=>o});class o{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}},76061(e,t,n){n.d(t,{S:()=>r});var o=n(61691);class r extends o.G{m_aGeoms;m_iGeom=-1;constructor(e){super(),this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},4144(e,t,n){n.d(t,{Hh:()=>c,fz:()=>f,g7:()=>a,s1:()=>s,zo:()=>l});var o=n(76061),r=n(83290);let i;function s(){return!!i&&(0,r.i)()}async function c(){if(!s()){const[e,t]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(9192)]).then(n.bind(n,9192)),Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756)]).then(n.bind(n,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,r.l)()]);i=new e.OperatorProject,t(r.p)}}function a(e,t){return i.execute(e,t,null)}function l(e,t){const n=i.executeMany(new o.S(e),t,null);return Array.from(n)}function f(){return i.supportsCurves()}},8377(e,t,n){n.r(t),n.d(t,{execute:()=>p,executeMany:()=>y,isLoaded:()=>m,load:()=>h});var o=n(4144),r=n(17499),i=n(60408);let s,c,a,l,f,u;function m(){return!!s&&(0,o.s1)()}async function h(){if(!m()){const[e,t]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(3299),n.e(5611)]).then(n.bind(n,83299)),Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(6129)]).then(n.bind(n,86129)),(0,o.Hh)()]);s=e.fromGeometries,c=e.fromGeometry,a=e.fromSpatialReference,l=e.toGeometry,f=e.getSpatialReference,u=t.createProjectionTransformation}}function p(e,t,n){const s=c(e),f=a(t),m=u(s.getSpatialReference(),f,n),h=l((0,o.g7)(s.getGeometry(),m),f);return!n?.zConversionDisabled&&h&&!(0,i.uW)(h)&&e.spatialReference&&(0,r.g)([h],e.spatialReference,t),h}function y(e,t,n){const[i,c]=s(e),m=a(t),h=u(c,m,n),p=(0,o.zo)(i,h).map(e=>l(e,m));if(!n?.zConversionDisabled&&p){const n=f(e);n&&(0,r.g)(p,n,t)}return p}},17499(e,t,n){n.d(t,{g:()=>i});var o=n(60408),r=n(62815);function i(e,t,n){let i;for(const s of e)if(s&&(0,o.Pv)(s)&&!("vertexAttributes"in s)){if(!i){const e="type"in s?s.type:(0,o.$B)(s);if(i=(0,r.N)(e,t,n),!i)return}i(s)}}},62815(e,t,n){n.d(t,{N:()=>c,d:()=>a});var o=n(86211),r=n(73941),i=n(21325),s=n(52006);function c(e,t,n){const o=a(t,n);if(1!==o)switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e){if(e.curvePaths)for(const n of e.curvePaths)for(const e of n){const n=(0,s.yP)(e);n.length>2&&(n[2]*=t)}if(e.paths)for(const n of e.paths)for(const e of n)e.length>2&&(e[2]*=t)}}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e){if(e.curveRings)for(const n of e.curveRings)for(const e of n){const n=(0,s.yP)(e);n.length>2&&(n[2]*=t)}if(e.rings)for(const n of e.rings)for(const e of n)e.length>2&&(e[2]*=t)}}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const n of e.points)n.length>2&&(n[2]*=t)}(e,o);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return}}function a(e,t){return null==e||null==t||(0,i.aI)(e,t)||(0,r.xP)(e)||(0,r.xP)(t)?1:(0,o.G9)(e)/(0,o.G9)(t)}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6061,8377],{61691(e,t,n){n.d(t,{G:()=>o});class o{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}},76061(e,t,n){n.d(t,{S:()=>r});var o=n(61691);class r extends o.G{m_aGeoms;m_iGeom=-1;constructor(e){super(),this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},4144(e,t,n){n.d(t,{Hh:()=>c,fz:()=>f,g7:()=>a,s1:()=>s,zo:()=>l});var o=n(76061),r=n(83290);let i;function s(){return!!i&&(0,r.i)()}async function c(){if(!s()){const[e,t]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(9192)]).then(n.bind(n,9192)),Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756)]).then(n.bind(n,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,r.l)()]);i=new e.OperatorProject,t(r.p)}}function a(e,t){return i.execute(e,t,null)}function l(e,t){const n=i.executeMany(new o.S(e),t,null);return Array.from(n)}function f(){return i.supportsCurves()}},8377(e,t,n){n.r(t),n.d(t,{execute:()=>p,executeMany:()=>y,isLoaded:()=>m,load:()=>h});var o=n(4144),r=n(17499),i=n(60408);let s,c,a,l,f,u;function m(){return!!s&&(0,o.s1)()}async function h(){if(!m()){const[e,t]=await Promise.all([Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(3299),n.e(7992)]).then(n.bind(n,83299)),Promise.all([n.e(3661),n.e(1878),n.e(8885),n.e(5756),n.e(6129)]).then(n.bind(n,86129)),(0,o.Hh)()]);s=e.fromGeometries,c=e.fromGeometry,a=e.fromSpatialReference,l=e.toGeometry,f=e.getSpatialReference,u=t.createProjectionTransformation}}function p(e,t,n){const s=c(e),f=a(t),m=u(s.getSpatialReference(),f,n),h=l((0,o.g7)(s.getGeometry(),m),f);return!n?.zConversionDisabled&&h&&!(0,i.uW)(h)&&e.spatialReference&&(0,r.g)([h],e.spatialReference,t),h}function y(e,t,n){const[i,c]=s(e),m=a(t),h=u(c,m,n),p=(0,o.zo)(i,h).map(e=>l(e,m));if(!n?.zConversionDisabled&&p){const n=f(e);n&&(0,r.g)(p,n,t)}return p}},17499(e,t,n){n.d(t,{g:()=>i});var o=n(60408),r=n(62815);function i(e,t,n){let i;for(const s of e)if(s&&(0,o.Pv)(s)&&!("vertexAttributes"in s)){if(!i){const e="type"in s?s.type:(0,o.$B)(s);if(i=(0,r.N)(e,t,n),!i)return}i(s)}}},62815(e,t,n){n.d(t,{N:()=>c,d:()=>a});var o=n(86211),r=n(73941),i=n(21325),s=n(52006);function c(e,t,n){const o=a(t,n);if(1!==o)switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e){if(e.curvePaths)for(const n of e.curvePaths)for(const e of n){const n=(0,s.yP)(e);n.length>2&&(n[2]*=t)}if(e.paths)for(const n of e.paths)for(const e of n)e.length>2&&(e[2]*=t)}}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e){if(e.curveRings)for(const n of e.curveRings)for(const e of n){const n=(0,s.yP)(e);n.length>2&&(n[2]*=t)}if(e.rings)for(const n of e.rings)for(const e of n)e.length>2&&(e[2]*=t)}}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const n of e.points)n.length>2&&(n[2]*=t)}(e,o);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return}}function a(e,t){return null==e||null==t||(0,i.aI)(e,t)||(0,r.xP)(e)||(0,r.xP)(t)?1:(0,o.G9)(e)/(0,o.G9)(t)}}}]);