@arcgis/core 6.0.0-next.33 → 6.0.0-next.35

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 (317) hide show
  1. package/Basemap.d.ts +2 -2
  2. package/README.md +2 -2
  3. package/analysis/ShadowCastAnalysis.d.ts +11 -5
  4. package/applications/Urban/meshUtils.d.ts +1 -0
  5. package/applications/Urban/meshUtils.js +1 -1
  6. package/arcgisGlobal.d.ts +1 -0
  7. package/assets/esri/core/libs/libtess/libtess-f32.wasm +0 -0
  8. package/assets/esri/core/libs/libtess/libtess-f64.wasm +0 -0
  9. package/assets/esri/core/workers/RemoteClient.js +1 -1
  10. package/assets/esri/core/workers/chunks/01f55004d64309f8538b.js +1 -0
  11. package/assets/esri/core/workers/chunks/0202eb8c2b2865f99981.js +1 -0
  12. package/assets/esri/core/workers/chunks/{67e533748435253aaba6.js → 0284f608d25c654fcc11.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{f3dc0bc0e00635855a7a.js → 03daf6f235c6edef6268.js} +1 -1
  14. package/assets/esri/core/workers/chunks/04a1d08c3b5b1dc7628f.js +1 -0
  15. package/assets/esri/core/workers/chunks/{1eaf8bfdd3765a90ccc2.js → 0523f893870a1546d7d9.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{1ee4df0fd61440cb5f02.js → 06102715e9a8f218e07c.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{6029773458ab98600f67.js → 07e5482e1fc69be5de09.js} +1 -1
  18. package/assets/esri/core/workers/chunks/08140725277de5d2e41a.js +1 -0
  19. package/assets/esri/core/workers/chunks/{72d20d3957d612f86431.js → 0a508e25ec05363e1f04.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{2d9a1f23ec6ce90723ac.js → 0d99bfb75dcb9fa29080.js} +1 -1
  21. package/assets/esri/core/workers/chunks/10ad7b35b6800d40444e.js +1 -0
  22. package/assets/esri/core/workers/chunks/1132e28aaa5825b10b6e.js +1 -0
  23. package/assets/esri/core/workers/chunks/{84038dd85005fea413eb.js → 139e753d95cfc9470e74.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{dd30b02c5978c1c5f511.js → 155861fbd0e5fc2db80c.js} +1 -1
  25. package/assets/esri/core/workers/chunks/15950c2fb173b62ee0ec.js +1 -0
  26. package/assets/esri/core/workers/chunks/165ca7a97b611c8f26c4.js +1 -0
  27. package/assets/esri/core/workers/chunks/{418addce122dbb8897b4.js → 1a614bac5db42c6263f8.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{0cc7fba402a93e6d2455.js → 1ae0c9345626e70affd3.js} +2 -2
  29. package/assets/esri/core/workers/chunks/{58c3ae6030def2ed5f31.js → 1b17f5f720f6cf3f6d73.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{cd355baab983033c3ef0.js → 1ec772eaa63eb6937231.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{f9dc38761b314d33890f.js → 1f51567f47c2e2fc8a23.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{5c04835b0b52461183cd.js → 1fd82fcba2758741996a.js} +1 -1
  33. package/assets/esri/core/workers/chunks/21e1d423ee33f916547e.js +1 -0
  34. package/assets/esri/core/workers/chunks/2211ff0a1f1ae8100231.js +1 -0
  35. package/assets/esri/core/workers/chunks/{096b2bf1c0d69d27f20c.js → 247617c0dbae2386ab3b.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{97ec46605f16333144b7.js → 26ea39dfdf887f357fce.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{85de980c5b296ec69323.js → 279089a6a3f08022c678.js} +1 -1
  38. package/assets/esri/core/workers/chunks/29c610ce1c81ebb84a6b.js +1 -0
  39. package/assets/esri/core/workers/chunks/2b4dd42920d37b1ff0a9.js +2 -0
  40. package/assets/esri/core/workers/chunks/{8da2a10318f49d0dc73a.js → 31ef7b7074b3e3829763.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{b657363113f4a37e634b.js → 3223f9fbc76ba9ef8d13.js} +1 -1
  42. package/assets/esri/core/workers/chunks/322b22a5d54e404bebd5.js +1 -0
  43. package/assets/esri/core/workers/chunks/{122e75b21699a4e83b15.js → 338d800d4efcc91cead1.js} +1 -1
  44. package/assets/esri/core/workers/chunks/3537fe95b83a13b156cc.js +1 -0
  45. package/assets/esri/core/workers/chunks/{360c944c610efa2051fc.js → 379db67f78161ebd5468.js} +2 -2
  46. package/assets/esri/core/workers/chunks/{f09bc86cd52224febfcb.js → 3b380e64566a6cce59e2.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{be55771758e4bcef0976.js → 3e406043a374ee17475b.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{e3b212f8af448ec29eef.js → 3fe4c89acd325d36618d.js} +1 -1
  49. package/assets/esri/core/workers/chunks/449a2dee17b54946f245.js +1 -0
  50. package/assets/esri/core/workers/chunks/46c290108a90518ef695.js +1 -0
  51. package/assets/esri/core/workers/chunks/{a596779eaeec7310671d.js → 478a89317a12e9b4d146.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{fcc3902d6d9eda6f09f5.js → 48b8b57f559a53c6c513.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{55a9eaeb152a3abada67.js → 4e5405134d079bdf9b7a.js} +1 -1
  54. package/assets/esri/core/workers/chunks/4f3e0d583cfa9d1d6727.js +2 -0
  55. package/assets/esri/core/workers/chunks/{d070fcb73ce274ab80e4.js → 5504ec9bd9ee4d10af07.js} +1 -1
  56. package/assets/esri/core/workers/chunks/552c36b40e5a5ec117fb.js +1 -0
  57. package/assets/esri/core/workers/chunks/5622f3faa59434772857.js +1 -0
  58. package/assets/esri/core/workers/chunks/{bd46a04a9ee4ea9e6ef1.js → 5864bce1498a13ee5b7e.js} +2 -2
  59. package/assets/esri/core/workers/chunks/59a1b637d2c107504a04.js +1 -0
  60. package/assets/esri/core/workers/chunks/59a88dd53f8806bbec06.js +1 -0
  61. package/assets/esri/core/workers/chunks/{f4d91d470ca5fea0bd26.js → 5bd1414220e42cb8ebcf.js} +1 -1
  62. package/assets/esri/core/workers/chunks/5c2fe67527c9d7b4dba3.js +1 -0
  63. package/assets/esri/core/workers/chunks/5c3aa8386705c5e40358.js +1 -0
  64. package/assets/esri/core/workers/chunks/5d781c2c6204cffffd0d.js +1 -0
  65. package/assets/esri/core/workers/chunks/{176d75e76318bfc25a53.js → 60c8eedd06080edab3e3.js} +1 -1
  66. package/assets/esri/core/workers/chunks/61d36730564c5ac5edab.js +1 -0
  67. package/assets/esri/core/workers/chunks/6604272ef6fe85279032.js +1 -0
  68. package/assets/esri/core/workers/chunks/{29cc6b1705418b1be5d7.js → 687deb918eb48a963c8f.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{0694c7bcfe71692e2ccf.js → 723df53cfa0189837d01.js} +1 -1
  70. package/assets/esri/core/workers/chunks/{90c1d10eae7ae71889b0.js → 7400b8c454b47ee4fb3c.js} +1 -1
  71. package/assets/esri/core/workers/chunks/796c6195b6bf59dcc9bd.js +1 -0
  72. package/assets/esri/core/workers/chunks/7b45ac83e279fe9516a5.js +1 -0
  73. package/assets/esri/core/workers/chunks/{2de077c7b971f2c215a6.js → 7ddbde8fdd1cf3c53f50.js} +1 -1
  74. package/assets/esri/core/workers/chunks/804606b194dc9e71d088.js +1 -0
  75. package/assets/esri/core/workers/chunks/8102f0bf5707c3be3310.js +1 -0
  76. package/assets/esri/core/workers/chunks/{1a8d8274df292d65f82e.js → 81bcc495e6eaf2cf7474.js} +1 -1
  77. package/assets/esri/core/workers/chunks/90360c0bd053d3e3fd77.js +1 -0
  78. package/assets/esri/core/workers/chunks/{d1d6154b4af1c9cc497b.js → 934e1f2153e6fad6ed23.js} +1 -1
  79. package/assets/esri/core/workers/chunks/{e096c1d9d53af74d3207.js → 990e96139b5a1dccb061.js} +1 -1
  80. package/assets/esri/core/workers/chunks/9c3de54513bf8619271c.js +1 -0
  81. package/assets/esri/core/workers/chunks/{f28b63c1179366dac8a2.js → 9e2c30b67bab5795306e.js} +1 -1
  82. package/assets/esri/core/workers/chunks/{9184c947cdefe06bf551.js → a18c3cbe505a19d29569.js} +1 -1
  83. package/assets/esri/core/workers/chunks/aa6ee2aa4ff6e6d41efb.js +1 -0
  84. package/assets/esri/core/workers/chunks/{3fd5c3cd8457ddc68798.js → aa779896fd9e5c341349.js} +1 -1
  85. package/assets/esri/core/workers/chunks/ac10c7d2c4829a150037.js +1 -0
  86. package/assets/esri/core/workers/chunks/{fe6dcb21570395e46ce8.js → afc8a9847f31bb66b13b.js} +1 -1
  87. package/assets/esri/core/workers/chunks/c5bf19da62a3d31009fe.js +2 -0
  88. package/assets/esri/core/workers/chunks/{2226c20c38e20713bcb5.js.LICENSE.txt → c5bf19da62a3d31009fe.js.LICENSE.txt} +1 -1
  89. package/assets/esri/core/workers/chunks/c7adb7b77721c75891f4.js +1 -0
  90. package/assets/esri/core/workers/chunks/cd55cad81accf51d2989.js +1 -0
  91. package/assets/esri/core/workers/chunks/{bead830a677690eeb6fb.js → ce8ef2eec290e1df6b2a.js} +1 -1
  92. package/assets/esri/core/workers/chunks/d3369ffed19f4c264dcd.js +1 -0
  93. package/assets/esri/core/workers/chunks/d3412518a7b518860fbb.js +1 -0
  94. package/assets/esri/core/workers/chunks/{3048e74e6246324ce6fc.js → d5916500514a41a4758f.js} +1 -1
  95. package/assets/esri/core/workers/chunks/{89dc49e784f7ba3b93ea.js → dac69c0047488fdf986d.js} +1 -1
  96. package/assets/esri/core/workers/chunks/db1f7b2562de495b3401.js +2 -0
  97. package/assets/esri/core/workers/chunks/dcc782e4bf9e8a8202f9.js +1 -0
  98. package/assets/esri/core/workers/chunks/dcdf837a452dc0cac582.js +1 -0
  99. package/assets/esri/core/workers/chunks/e0a37d3bcb9a944e53dd.js +1 -0
  100. package/assets/esri/core/workers/chunks/{19a4fa965b70fc6f78f6.js → e209cb1f3f14bf576ebe.js} +1 -1
  101. package/assets/esri/core/workers/chunks/e67ea2f1714e5abeae44.js +1 -0
  102. package/assets/esri/core/workers/chunks/e8fb2ba7b7a4f0916325.js +1 -0
  103. package/assets/esri/core/workers/chunks/{636e9c4ac1f9ae98f9d1.js → ea81f9d71b0842a4be26.js} +1 -1
  104. package/assets/esri/core/workers/chunks/{164c8eeefa8232b2b191.js → eaa0e906b46ae4c84d72.js} +2 -2
  105. package/assets/esri/core/workers/chunks/efcd38aad9aa667001b2.js +1 -0
  106. package/assets/esri/core/workers/chunks/{3aafdb905c697bc9b1ad.js → f372f4eb5527238c46f5.js} +1 -1
  107. package/assets/esri/core/workers/chunks/f497968055af459c5da4.js +1 -0
  108. package/assets/esri/core/workers/chunks/f7123ba1286f64e13e91.js +1 -0
  109. package/assets/esri/core/workers/chunks/fcb4707c2e95099b9f30.js +1 -0
  110. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  111. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  112. package/chunks/BlurEmission.glsl.js +9 -4
  113. package/chunks/GlobalIllumination.glsl.js +55 -46
  114. package/chunks/GlobalIlluminationBlur.glsl.js +13 -9
  115. package/chunks/RibbonLine.glsl.js +90 -88
  116. package/chunks/Terrain.glsl.js +9 -9
  117. package/chunks/libtess-f32.js +1 -1
  118. package/chunks/libtess-f64.js +1 -1
  119. package/chunks/lyr3DMain.js +1 -1
  120. package/chunks/lyr3DWorker.js +2 -2
  121. package/config.d.ts +3 -3
  122. package/config.js +1 -1
  123. package/core/has.js +1 -1
  124. package/core/mathUtils.js +1 -1
  125. package/core/workers.d.ts +1 -0
  126. package/form/FormTemplate.d.ts +1 -1
  127. package/geometry/libtess.js +1 -1
  128. package/geometry/projection/projectors.js +1 -1
  129. package/geometry/support/MeshLocalVertexSpace.d.ts +3 -3
  130. package/geometry/support/aaBoundingRect.js +1 -1
  131. package/geometry/support/meshUtils/convertMeshVertexSpace.js +1 -1
  132. package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
  133. package/identity/Credential.d.ts +1 -1
  134. package/identity/IdentityManager.d.ts +1 -1
  135. package/identity/IdentityManagerBase.js +1 -1
  136. package/identity/OAuthInfo.d.ts +1 -1
  137. package/identity/ServerInfo.d.ts +1 -1
  138. package/kernel.d.ts +3 -3
  139. package/kernel.js +1 -1
  140. package/layers/CSVLayer.js +1 -1
  141. package/layers/GaussianSplatLayer.js +1 -1
  142. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  143. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  144. package/layers/VectorTileLayer.d.ts +2 -2
  145. package/layers/VideoLayer.js +1 -1
  146. package/layers/VoxelWasmPerSceneView.js +1 -1
  147. package/layers/WFSLayer.d.ts +8 -4
  148. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  149. package/layers/graphics/sources/CSVSource.js +1 -1
  150. package/layers/graphics/sources/GeoJSONSource.js +1 -1
  151. package/layers/graphics/sources/MemorySource.js +2 -2
  152. package/layers/graphics/sources/WFSSource.js +1 -1
  153. package/layers/graphics/sources/geojson/geojson.js +1 -1
  154. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  155. package/layers/graphics/sources/support/QueryTask.js +1 -1
  156. package/layers/graphics/sources/support/timeQueryUtils.js +2 -0
  157. package/layers/mixins/APIKeyMixin.d.ts +1 -1
  158. package/layers/mixins/ArcGISMapService.d.ts +17 -0
  159. package/layers/mixins/ArcGISMapService.js +1 -1
  160. package/layers/ogc/types.d.ts +1 -1
  161. package/layers/ogc/wfsUtils.d.ts +7 -2
  162. package/layers/ogc/wfsUtils.js +1 -1
  163. package/layers/ogc/xmlUtils.js +1 -1
  164. package/layers/support/TelemetryData.d.ts +28 -4
  165. package/layers/support/TimeInformation.js +1 -1
  166. package/layers/support/tiles3DUtils.js +1 -1
  167. package/layers/support/timeInfoUtils.js +2 -0
  168. package/layers/video/videoUtils.js +1 -1
  169. package/package.json +4 -4
  170. package/rest/query/executeAttributeBinsQuery.js +1 -1
  171. package/rest/query/executeForExtent.js +1 -1
  172. package/rest/query/executeForTopCount.js +1 -1
  173. package/rest/query/executeForTopExtents.js +1 -1
  174. package/rest/query/executeForTopIds.js +1 -1
  175. package/rest/query/executeTopFeaturesQuery.js +1 -1
  176. package/rest/query/operations/query.js +1 -1
  177. package/rest/query/operations/queryAttributeBins.js +1 -1
  178. package/rest/query/operations/queryTopFeatures.js +1 -1
  179. package/rest/route.d.ts +1 -1
  180. package/rest/support/AreasAndLengthsParameters.d.ts +1 -1
  181. package/rest/support/LengthsParameters.d.ts +1 -1
  182. package/rest/support/timeUtils.js +1 -1
  183. package/symbols/TextSymbol.d.ts +0 -1
  184. package/views/2d/engine/webgl/FeatureDisplayList.js +1 -1
  185. package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
  186. package/views/2d/engine/webgl/GlyphWorker.js +1 -1
  187. package/views/2d/engine/webgl/TextureManager.js +1 -1
  188. package/views/2d/engine/webgl/materialKeyUtils.js +2 -0
  189. package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
  190. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  191. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  192. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +1 -1
  193. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js +1 -1
  194. package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js +1 -1
  195. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js +1 -1
  196. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js +1 -1
  197. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  198. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js +1 -1
  199. package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js +1 -1
  200. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
  201. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  202. package/views/2d/layers/VideoLayerView2D.js +1 -1
  203. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  204. package/views/3d/FocusAreasView.js +1 -1
  205. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  206. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
  207. package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
  208. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  209. package/views/3d/analysis/ShadowCast/ShadowCastError.d.ts +40 -0
  210. package/views/3d/analysis/ShadowCast/ShadowCastError.js +2 -0
  211. package/views/3d/analysis/ShadowCast/sunlightUtils.js +2 -0
  212. package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +16 -1
  213. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  214. package/views/3d/camera/constraintUtils/surfaceCollision.js +1 -1
  215. package/views/3d/camera/intersectionUtils.js +1 -1
  216. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  217. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  218. package/views/3d/layers/Lyr3DWorker.js +1 -1
  219. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  220. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  221. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  222. package/views/3d/layers/graphics/Graphics3DMeshObject3DGraphicLayer.js +1 -1
  223. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  224. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  225. package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
  226. package/views/3d/layers/graphics/MeshFastUpdateProcessor.js +1 -1
  227. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  228. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  229. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  230. package/views/3d/layers/support/FeatureMemory.js +1 -1
  231. package/views/3d/layers/support/FeatureTile.js +1 -1
  232. package/views/3d/navigation/modes/GroundNavigationMode3D.js +1 -1
  233. package/views/3d/state/Constraints.js +1 -1
  234. package/views/3d/state/NearFarHeuristic.js +1 -1
  235. package/views/3d/state/ScreenSizePerspective.js +1 -1
  236. package/views/3d/state/ViewStateManager.js +1 -1
  237. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  238. package/views/3d/state/utils/groundNavigationUtils.js +1 -1
  239. package/views/3d/support/RenderCoordsHelper.js +1 -1
  240. package/views/3d/support/orientedBoundingBox.js +1 -1
  241. package/views/3d/support/sphereExtentUtils.js +1 -1
  242. package/views/3d/terrain/TerrainRenderer.js +1 -1
  243. package/views/3d/terrain/TerrainSurface.js +1 -1
  244. package/views/3d/terrain/TileRenderer.js +1 -1
  245. package/views/3d/terrain/tileUtils.js +1 -1
  246. package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
  247. package/views/3d/webgl-engine/lib/NavigationDepthCache.js +1 -1
  248. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  249. package/views/3d/webgl-engine/lib/RibbonLineVertexInfo.js +1 -1
  250. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  251. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  252. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  253. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  254. package/views/3d/webgl.d.ts +1 -1
  255. package/views/SceneView.js +1 -1
  256. package/views/support/Scheduler.js +1 -1
  257. package/views/webgl/BufferObject.js +1 -1
  258. package/views/webgl/FramebufferObject.js +1 -1
  259. package/widgets/Directions.d.ts +1 -1
  260. package/widgets/ElevationProfile/ElevationProfileLineView.js +1 -1
  261. package/widgets/HistogramRangeSlider.d.ts +1 -1
  262. package/assets/esri/core/workers/chunks/0e445ec3523de9f2dfa2.js +0 -1
  263. package/assets/esri/core/workers/chunks/0f6c0d42100c21367e5c.js +0 -1
  264. package/assets/esri/core/workers/chunks/131185d26343a997495e.js +0 -1
  265. package/assets/esri/core/workers/chunks/176d0a06ebff5a29dedf.js +0 -1
  266. package/assets/esri/core/workers/chunks/18776a130d96879a68b1.js +0 -1
  267. package/assets/esri/core/workers/chunks/1a3f71c4d97c36050030.js +0 -1
  268. package/assets/esri/core/workers/chunks/20a698709c3c11ff2c16.js +0 -1
  269. package/assets/esri/core/workers/chunks/2226c20c38e20713bcb5.js +0 -2
  270. package/assets/esri/core/workers/chunks/277263466837e1673f56.js +0 -1
  271. package/assets/esri/core/workers/chunks/2981e904ab62f3ed80d0.js +0 -2
  272. package/assets/esri/core/workers/chunks/32cc59e126df8c96a0cf.js +0 -2
  273. package/assets/esri/core/workers/chunks/379ef56f6b32494832a6.js +0 -1
  274. package/assets/esri/core/workers/chunks/38d852676677e5697864.js +0 -1
  275. package/assets/esri/core/workers/chunks/46453ebfee17b5421d9d.js +0 -1
  276. package/assets/esri/core/workers/chunks/5a9b7eb26f936f03d02e.js +0 -1
  277. package/assets/esri/core/workers/chunks/5bb6c255bdc8aa9ba23e.js +0 -1
  278. package/assets/esri/core/workers/chunks/5f07f52bb8b7721f08d3.js +0 -1
  279. package/assets/esri/core/workers/chunks/654f5441227579d2b6b4.js +0 -1
  280. package/assets/esri/core/workers/chunks/6b5c073dddd89d06ed80.js +0 -1
  281. package/assets/esri/core/workers/chunks/6bb191b19ce43a27f205.js +0 -1
  282. package/assets/esri/core/workers/chunks/6ddc29a144640acb1192.js +0 -1
  283. package/assets/esri/core/workers/chunks/6ebe73f69ae822053b70.js +0 -1
  284. package/assets/esri/core/workers/chunks/6f6d1873753a9c6994aa.js +0 -1
  285. package/assets/esri/core/workers/chunks/7084dd6e10c6c1393e92.js +0 -1
  286. package/assets/esri/core/workers/chunks/7566321c6a2913f2852b.js +0 -1
  287. package/assets/esri/core/workers/chunks/7b5cd150a4d0139850be.js +0 -1
  288. package/assets/esri/core/workers/chunks/7cc9d7a88b64e25fce14.js +0 -1
  289. package/assets/esri/core/workers/chunks/7e211d8a8ad6c6a7cf3e.js +0 -1
  290. package/assets/esri/core/workers/chunks/844eedda8f749972f707.js +0 -2
  291. package/assets/esri/core/workers/chunks/849f446c718e892f39ce.js +0 -1
  292. package/assets/esri/core/workers/chunks/87177e0f82e8a6ae3189.js +0 -1
  293. package/assets/esri/core/workers/chunks/9976eaa81085c0d17e14.js +0 -1
  294. package/assets/esri/core/workers/chunks/a2196a49f89d57a0a1c7.js +0 -1
  295. package/assets/esri/core/workers/chunks/a504a5e06cb89a620799.js +0 -1
  296. package/assets/esri/core/workers/chunks/a65951f1d5702cfd996e.js +0 -1
  297. package/assets/esri/core/workers/chunks/aba259a70bee68d2edb7.js +0 -1
  298. package/assets/esri/core/workers/chunks/b8fd7c3b36981261378b.js +0 -1
  299. package/assets/esri/core/workers/chunks/b9cb92858a576eb6aa06.js +0 -1
  300. package/assets/esri/core/workers/chunks/c33a9635c294c8774977.js +0 -1
  301. package/assets/esri/core/workers/chunks/c570b90995c65bbb2e14.js +0 -1
  302. package/assets/esri/core/workers/chunks/c576bef77e34920af188.js +0 -1
  303. package/assets/esri/core/workers/chunks/cf1ec61eb2ad147bb931.js +0 -1
  304. package/assets/esri/core/workers/chunks/daae21cf77864f3293ef.js +0 -1
  305. package/assets/esri/core/workers/chunks/dc2f93453dfa40f623ab.js +0 -1
  306. package/assets/esri/core/workers/chunks/e81173724e8de8c1e65b.js +0 -1
  307. package/assets/esri/core/workers/chunks/e83f9abee611c5b80009.js +0 -1
  308. package/assets/esri/core/workers/chunks/f39c700f3db7db52b522.js +0 -1
  309. package/assets/esri/core/workers/chunks/f45064066e1ab041a0b2.js +0 -1
  310. package/assets/esri/core/workers/chunks/ffe49d9e7df081bef4a5.js +0 -1
  311. package/views/2d/engine/webgl/hashMosaic.js +0 -2
  312. /package/assets/esri/core/workers/chunks/{0cc7fba402a93e6d2455.js.LICENSE.txt → 1ae0c9345626e70affd3.js.LICENSE.txt} +0 -0
  313. /package/assets/esri/core/workers/chunks/{844eedda8f749972f707.js.LICENSE.txt → 2b4dd42920d37b1ff0a9.js.LICENSE.txt} +0 -0
  314. /package/assets/esri/core/workers/chunks/{32cc59e126df8c96a0cf.js.LICENSE.txt → 4f3e0d583cfa9d1d6727.js.LICENSE.txt} +0 -0
  315. /package/assets/esri/core/workers/chunks/{bd46a04a9ee4ea9e6ef1.js.LICENSE.txt → 5864bce1498a13ee5b7e.js.LICENSE.txt} +0 -0
  316. /package/assets/esri/core/workers/chunks/{2981e904ab62f3ed80d0.js.LICENSE.txt → db1f7b2562de495b3401.js.LICENSE.txt} +0 -0
  317. /package/assets/esri/core/workers/chunks/{164c8eeefa8232b2b191.js.LICENSE.txt → eaa0e906b46ae4c84d72.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../Camera.js";import n from"../Viewpoint.js";import r from"../core/Collection.js";import{byId as i}from"../core/domUtils.js";import a from"../core/Error.js";import{on as o}from"../core/events.js";import{destroyHandle as s,makeHandle as c}from"../core/handleUtils.js";import has from"../core/has.js";import l from"../core/Logger.js";import{mapCollectionAsync as ee}from"../core/mapCollectionUtils.js";import{destroyMaybe as u,maybeProperty as te}from"../core/maybe.js";import{throwIfDestroyed as ne,throwIfAborted as d,createAbortError as re}from"../core/promiseUtils.js";import ie from"../core/ReactiveSet.js";import{on as f,watch as p,initial as m,sync as h,whenOnce as ae,syncAndInitial as g}from"../core/reactiveUtils.js";import{setFrameDuration as oe,cleanupScheduling as se}from"../core/scheduling.js";import{createScreenPoint as ce,createScreenPointArray as le}from"../core/screenUtils.js";import{cleanupWhereClauseCache as ue}from"../core/sql.js";import{getDefaultVerticalUnitStringForSR as de,getMetersPerUnitForSR as fe}from"../core/units.js";import{property as _,cast as v,subclass as pe}from"../core/accessorSupport/decorators.js";import{ensureType as y,ensureClass as b}from"../core/accessorSupport/ensureType.js";import{overrideDefaultsFrom as me}from"../core/accessorSupport/overrideDefaultsFrom.js";import{runUntracked as he}from"../core/accessorSupport/tracking.js";import{drainNotificationQueue as ge}from"../core/accessorSupport/trackingUtils.js";import{create as _e}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{cleanupPooledRBush as ve}from"../core/libs/rbush/PooledRBush.js";import{initialize as ye}from"../core/workers/workers.js";import x from"../geometry/Extent.js";import be from"../geometry/HeightModelInfo.js";import S from"../geometry/Point.js";import{project as C,canProjectWithoutEngine as xe}from"../geometry/projectionUtils.js";import w from"../geometry/SpatialReference.js";import{cleanupSpatialReferenceEllipsoidUtils as Se}from"../geometry/spatialReferenceEllipsoidUtils.js";import{projectBoundingRect as Ce}from"../geometry/projection/projectBoundingRect.js";import{projectPointToVector as T}from"../geometry/projection/projectPointToVector.js";import{toExtent as we,create as Te}from"../geometry/support/aaBoundingRect.js";import{renderSRFromViewSR as Ee}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as De}from"../geometry/support/scaleUtils.js";import{wgs84 as Oe,webMercator as ke}from"../geometry/support/spatialReferenceUtils.js";import{makeDehydratedPoint as Ae}from"../layers/graphics/dehydratedPoint.js";import{isImageryTileLayer as E,isTiledLayer as D,isVoxelLayer as O,isIntegratedMeshLayer as k,isGaussianSplatLayer as je}from"../layers/support/layerUtils.js";import{TilemapCache as Me}from"../layers/support/TilemapCache.js";import{clearDefaultPortalInstance as Ne}from"../portal/portalDefault.js";import{WebSceneTag as Pe}from"../support/tagSymbols.js";import{BreakpointsOwner as Fe}from"./BreakpointsOwner.js";import{DOMContainer as Ie}from"./DOMContainer.js";import{PopupView as Le}from"./PopupView.js";import A from"./View.js";import Re from"./ViewAnimation.js";import{stringFromViewingMode as j,viewingModeFromString as M}from"./ViewingMode.js";import{GroundView3D as ze}from"./3d/GroundView3D.js";import{layerView3DImporter as N}from"./3d/layerViewModuleImportUtils.js";import{importAnalysisViewModule as Be}from"./3d/analysis/analysisViewModuleImportUtils.js";import{cleanupIntersectionUtils as Ve}from"./3d/camera/intersectionUtils.js";import P from"./3d/constraints/Constraints.js";import F from"./3d/environment/Environment.js";import{EnvironmentView as He}from"./3d/environment/EnvironmentView.js";import Ue from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as We}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as Ge}from"./3d/layers/graphics/Labeler.js";import Ke from"./3d/layers/i3s/I3SLodHandling.js";import{Navigation3D as qe}from"./3d/navigation/Navigation3D.js";import{ScreenSizePerspective as Je}from"./3d/state/ScreenSizePerspective.js";import I from"./3d/state/ViewState.js";import{ViewStateManager as Ye,cleanupViewStateManager as Xe}from"./3d/state/ViewStateManager.js";import{cleanupPointToPointAnimationController as Ze}from"./3d/state/controllers/PointToPointAnimationController.js";import{SceneIntersectionHelper as Qe}from"./3d/state/helpers/SceneIntersectionHelper.js";import{cleanupNavigationUtils as $e}from"./3d/state/utils/navigationUtils.js";import et from"./3d/support/Attribution3D.js";import{CombinedElevationProvider as tt}from"./3d/support/CombinedElevationProvider.js";import{debugFlags as L}from"./3d/support/debugFlags.js";import{getElevationAtPoint as nt}from"./3d/support/ElevationProvider.js";import{GroundAndIMSurface as rt}from"./3d/support/GroundAndIMSurface.js";import{toMap as it,hitTest as at}from"./3d/support/hitTest.js";import{popupHitTest as ot}from"./3d/support/popupHitTest.js";import{getDefaultQualityProfileName as st,getQualityProfileSettings as R}from"./3d/support/QualityProfile.js";import z from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as ct}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as lt}from"./3d/support/ResourceController.js";import ut from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as dt}from"./3d/support/SharedSymbolResources.js";import{ViewSlice as ft}from"./3d/support/ViewSlice.js";import{PointsOfInterest as B}from"./3d/support/pointsOfInterest/PointsOfInterest.js";import V from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as pt,getTiledLayerInfo as mt,checkIfTileInfoSupportedForView as ht}from"./3d/terrain/terrainUtils.js";import{clearTilePerLayerInfo as gt}from"./3d/terrain/TilePerLayerInfo.js";import{cleanupTileRenderer as _t}from"./3d/terrain/TileRenderer.js";import{Stage as vt}from"./3d/webgl-engine/Stage.js";import{olidEnabled as yt}from"./3d/webgl-engine/effects/geometry/olidUtils.js";import{cleanupRenderOccluded as bt}from"./3d/webgl-engine/effects/geometry/RenderOccluded.js";import{defaultTolerance as H}from"./3d/webgl-engine/lib/Intersector.js";import{cleanupShadowmap as xt}from"./3d/webgl-engine/lib/ShadowMap.js";import{terrainId as U}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{cleanupEdgeProcessing as St}from"./3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js";import W from"./interactive/options/ViewOptions.js";import Ct from"./support/AnalysisViewManager.js";import{cleanupDrapedUtils as wt}from"./support/drapedUtils.js";import{occludeesSupported as Tt}from"./support/layerViewUtils.js";import{isSupportedScreenPointEvent as G,createScreenPointFromSupportedEvent as K}from"./support/screenUtils.js";import{isSpatialReferenceSupported as Et}from"./support/spatialReferenceSupport.js";import{initializeTextureCompressionWorker as Dt,destroyTextureCompressionWorker as Ot}from"./support/TextureCompressionHelper.js";import kt from"./ui/DefaultUI.js";import At from"./ui/3d/DefaultUI3D.js";import jt from"../webscene/Environment.js";import{clearVNodeCache as Mt}from"../widgets/support/vnodeCache.js";var q;const Nt=Symbol(),J=Symbol();function Pt(e){let t=b(W,e);return t!==e&&e.snapping?.enabled==null&&(t.snapping.enabled=!0),t}let Y=class extends Fe(Le(Ie(A))){static{q=this}get timeZone(){return super.timeZone}set timeZone(e){super.timeZone=e}constructor(e){super(e),this.options=new W({snapping:{enabled:!0}}),this._userClippingArea=null,this._clippingArea=null,this._overrideDefaultEnvironmentOnly=!0,this._resolveWhenReady=[],this._resourceController=lt(this),this.deconflictor=new We({view:this}),this.attribution3D=new et({view:this}),this.labeler=new Ge({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.navigation=new qe({view:this}),this.basemapTerrain=null,this.elevationProvider=new tt({view:this}),this._canvas=null,this.constraints=new P,this._environment=new F,this.environmentView=new He,this.floors=new r,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new Ct({importAnalysisViewModule:e=>Be(e),view:this}),this.groundView=null,this.groundAndIMSurface=null,this.map=null,this._featureTileTreeClients=new ie,this._featureTiles=null,this._featureTreeDebugger=null,this.state=new I({view:this}),this.slice=new ft,this.spatialReference=null,this.preserveDrawingBufferEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type=`3d`,this.ui=new At,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this._importControllers=new Map,ye();let t=()=>this._updatingChanged();this.addHandles(s(ee(()=>this.map?.allLayers,async e=>{try{await e.when()}catch{}finally{t()}}))),this.addHandles([f(()=>this.map?.allLayers,`after-changes`,t,{onListenerAdd:t,onListenerRemove:t,sync:!0}),this.allLayerViews.on(`after-changes`,e=>this._updateUpdatingMonitors(e)),p(()=>this.scene,e=>e?.load().catch(()=>{}))]),this.inputManager=new Ue({view:this}),this.stateManager=new Ye({view:this}),this.screenSizePerspective=new Je({view:this})}initialize(){if(has(`enable-feature:esri-compress-textures`)&&has(`wasm-simd`)){let e=Dt(this,this.resourceController);this.addResolvingPromise(e.promise)}this.groundView=new ze({view:this}),this.groundAndIMSurface=new rt({view:this}),this._updateUpdatingMonitors(),this.updatingHandles.add(()=>this.qualitySettings.memoryLimit,e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)},m),this.updatingHandles.add(()=>this.qualitySettings.additionalCacheMemory,e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)},m),this.updatingHandles.add(()=>this.qualitySettings.frameRate??0,e=>oe(e>0?1e3/Math.ceil(e):0),m),this.addHandles([p(()=>this.spatialReference,()=>this.notifyChange(`clippingArea`),h),p(()=>({plane:this.slice.plane,isDecoration:this.slice.isDecoration}),()=>this._updateSlice(),h)])}destroy(){this.destroyed||(Ot(this),this.updatingHandles.removeAll(),this.basemapTerrain?.clearHandles(),this.elevationProvider.destroy(),this.ui.removeAllHandles(),this.layerViewManager.clearHandles(),this.invalidate(),this.layerViewManager.clear(),this._set(`analysisViewManager`,u(this.analysisViewManager)),this._exitSurface(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this.sharedSymbolResources=u(this.sharedSymbolResources),this._set(`labeler`,u(this.labeler)),this._set(`deconflictor`,u(this.deconflictor)),this._resourceController=u(this._resourceController),this._set(`stateManager`,u(this.stateManager)),this._set(`inputManager`,u(this.inputManager)),this.state.destroy(),this.highlights.destroy(),this.removeHandles(`updatingMonitors`),this._set(`environmentView`,u(this.environmentView)),this._set(`environment`,u(this.environment)),this.groundView=u(this.groundView),this.groundAndIMSurface.destroy(),this.slice.destroy(),this._updatingObjectsWithProgress.length=0,this._updatingObjects.length=0,this.ui?.destroy(),this._set(`ui`,null),this._set(`renderCanvas`,null),this._set(`canvas`,null),this._canvas=null,this.screenSizePerspective.destroy(),this.attribution3D.destroy())}get stage(){return this._stage}get renderSpatialReference(){return this.renderCoordsHelper?.spatialReference}get groundSpatialReference(){return this.groundView?.spatialReference}get analyses(){return super.analyses}set analyses(e){super.analyses=e}get animation(){return this.state?.animation}get overlayManager(){return this.basemapTerrain?.overlayManager}get camera(){return this.stateManager?.camera}set camera(e){this.stateManager&&(this.stateManager.camera=e)}get contentCamera(){return this.stateManager?.contentCamera}set contentCamera(e){this.stateManager&&(this.stateManager.contentCamera=e)}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get canvas(){return this._canvas}get center(){return this.stateManager?.center}set center(e){this.stateManager&&(this.stateManager.center=y(S,e))}get clippingArea(){if(this.viewingMode===`global`)return null;let e=this.map,t=this._userClippingArea||te(e,`clippingArea`);return!(this._userClippingArea||te(e,`clippingEnabled`))||t==null?(this._clippingArea=null,null):t instanceof x?this.spatialReference&&(t=X(t,this.spatialReference),t==null)?(l.getLogger(this).error(`#clippingArea`,`setting clippingArea with incompatible SpatialReference`),this._clippingArea):(t=t.clone(),t.intersection(this._groundAndLayersExtent)??(t.xmin=t.xmax,t.ymin=t.ymax),t.zmin=void 0,t.zmax=void 0,t.equals(this._clippingArea)||(this._clippingArea=t),this._clippingArea):(l.getLogger(this).error(`#clippingArea`,`only clippingArea geometries of type Extent are supported`),this._clippingArea)}set clippingArea(e){this.ready&&this.viewingMode===`global`&&e!=null?l.getLogger(this).error(`#clippingArea=`,`Clipping area is only supported in local viewingMode`):this._userClippingArea=e}get renderDataExtent(){if(this.state.viewingMode===1)return null;let e=this.renderSpatialReference,t=this.dataExtent;return t==null||e==null||t.spatialReference.equals(e)?t:X(t,e)}get tileInfo(){return this.basemapTerrain?.tilingScheme?.toTileInfo()}get dataExtent(){let e=this._groundAndLayersExtent,t=this.spatialReference||w.WGS84,n=X(this.clippingArea,t);n!=null&&(e=e==null?n:e.intersection(n));let r=this._get(`dataExtent`);return e!=null&&e.equals(r)?r:e}get _groundAndLayersExtent(){let e=this.spatialReference||w.WGS84,t,n=n=>{let r=X(n,e);r!=null&&(t==null?t=r.clone():t.union(r))},{groundView:r}=this,i=r?.spatialReference,a=r?.fullGroundExtent;i&&a&&n(new x({xmin:a[0],ymin:a[1],zmin:0,xmax:a[2],ymax:a[3],zmax:0,spatialReference:i}));let o=e=>{e.fullExtent==null||e.type===`graphics`&&e.internal||n(e.fullExtent)};if(this.map?.allLayers.forEach(e=>o(e)),t==null)return null;t.hasZ?(t.zmin=Math.min(0,t.zmin??0),t.zmax=Math.max(0,t.zmax??0)):(t.zmin=0,t.zmax=0);let s=this._get(`_groundAndLayersExtent`);return t.equals(s)?s:t}get environment(){return this._environment}set environment(e){if(this._environment===e)return;let{_environment:t}=this;this._environment=null,t?.destroy(),this._environment=e,this.notifyChange(`environment`)}castEnvironment(e){return e?e instanceof F?e:e instanceof jt?this.environment?.cloneWithWebsceneEnvironment(e)??F.fromWebsceneEnvironment(e):y(F,e):new F}get extent(){return this.stateManager?.extent}set extent(e){this.stateManager&&(this.stateManager.extent=e)}get screenCenter(){return this.stateManager?.screenCenter}get frustum(){return this.stateManager?.frustum}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.groundView?.layerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get _layerToLayerviewMapping(){return q._layerToLayerview}static{this._layerToLayerview=A._layerToLayerview.concat([[`view.map.ground.layers`,`view.groundView.layerViews`]])}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||(this.toolViewManager?.interacting??!1)}get stationary(){return!this.animation&&!this.resizing&&(this.state?.stationary??!0)}get navigating(){return this.state?.navigating??!1}get scene(){return this.map&&Pe in this.map?this.map:null}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get featureTiles(){return this._featureTiles}set qualityProfile(e){let t=R(e);t&&this._get(`qualityProfile`)!==e&&(this.qualitySettings=new z(t),this.stage?.renderView.updateQualitySettings(this.qualitySettings),this._set(`qualityProfile`,e))}get qualityProfile(){return this._get(`qualityProfile`)||st()}_updateSlice(){this.stage!=null&&(this.stage.renderer.slice=this.slice)}get typeSpecificPreconditionsReady(){return this.viewingMode?!!this.stateManager?.preinit(this.spatialReference):!1}get resolution(){let{scale:e,spatialReference:t}=this;return t?he(()=>De(e,t)):0}get scale(){return this.stateManager?.scale}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get terrainLevel(){let e=this.basemapTerrain?.tilingScheme,t=this.scale;if(!e||!t)return null;let n=e.levelAtScale(t)+this.qualitySettings.tiledSurface.lodBias,r=e.getMaxLod();return n<=0?null:Math.max(0,Math.min(n,r||1/0))}get heightModelInfo(){let e=this.getDefaultHeightModelInfo();if(!e)return null;let t=de(this.spatialReference);if(t&&e.heightUnit!==t)return new be({heightModel:e.heightModel,heightUnit:t,vertCRS:e.vertCRS,associatedSpatialReference:e.associatedSpatialReference});if(!e.associatedSpatialReference){let t=e.clone();return t.associatedSpatialReference=this.spatialReference,t}return e}get alphaCompositingEnabled(){return this._get(`alphaCompositingEnabled`)}set alphaCompositingEnabled(e){this._stage&&l.getLogger(this).warn(`alphaCompositingEnabled cannot be changed after the view has become ready`),this._set(`alphaCompositingEnabled`,e)}get updating(){if(this.destroying||this.destroyed)return!1;if(!this.initialized)return!0;let e=0,t=this.layerViewManager.updating,n=t?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach(r=>{if(!r.isFulfilled())++n;else if(r.updating){if(t=!0,r.suspended||pt(r))return;++n,e+=r.updatingProgress}});let r=.1;for(let t of this._updatingObjects)t?.updating&&(n+=r,e+=.5*r);for(let t of this._updatingObjectsWithProgress)t?.updating&&(++n,e+=t.updatingProgress);let i=!this.stateManager.test.updatingIgnoreRenderState&&this.state.updating;if(t=!!(t||n>0||this.updatingHandles.updating||!this.ready||!this.stationary||i||this._importControllers.size>0||this.inputManager?.updating||this.map?.allLayers?.some(e=>!e.isFulfilled())),t?(this._numUpdating=Math.max(n,this._numUpdating),e+=this._numUpdating-n):this._numUpdating=0,this._numUpdating>0?e/=this._numUpdating:e=+!t,this._get(`updatingProgress`)!==e){let n=performance.now();if(e<1){let t=Math.min((n-this._lastUpdateTime)/2e3,1);e=this.updatingProgress*(1-t)+e*t}this._set(`updatingProgress`,e),this._lastUpdateTime=t&&e<1?n:0}return L.UPDATING&&console.log(`Updating:`,this._updatingObjectsToDebug.filter(e=>e!=null&&e.updating).map(({declaredClass:e})=>e)),t}get _updatingObjects(){return[this.graphicsView,this.basemapView,this.groundView,this._resourceController,this.stage,this.featureTiles,this.pointsOfInterest,this.environmentView,this.overlay,this._featureTreeDebugger,this.toolViewManager,this.analysisViewManager,this.focusAreasView]}get _updatingObjectsWithProgress(){return[this.deconflictor,this.labeler,this.basemapTerrain]}get _updatingObjectsToDebug(){return L.UPDATING?this._updatingObjects.concat(this._updatingObjectsWithProgress).concat(this.allLayerViews.toArray()):[]}get viewingMode(){let e=this._predeterminedViewingMode;if(e!=null)return j(e);let t=this.spatialReference;return t?this.defaultsFromMap?.viewingMode!=null&&t.equals(this.defaultsFromMap.spatialReference)?j(this.defaultsFromMap.viewingMode):Et(t,1)?`global`:`local`:`global`}set viewingMode(e){this.ready?l.getLogger(this).error(`#viewingMode`,`viewingMode cannot be set once view is ready`):this._overrideIfSome(`viewingMode`,e)}get viewpoint(){return this.stateManager?.viewpoint}set viewpoint(e){this.stateManager&&(this.stateManager.viewpoint=e)}get visibleArea(){return this.stateManager?.visibleArea}get zoom(){return this.stateManager.zoom}set zoom(e){this.stateManager&&(this.stateManager.zoom=e)}get resourceController(){return this._resourceController}get quality(){return this._resourceController?.memoryController?.memoryFactor??1}get resolutionScale(){return Math.sqrt(Math.min(1,this.quality/.75))}get performanceInfo(){return new ut(this)}on(e,t,n,r){return this.viewEvents.on(e,t,n,r)||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return l.getLogger(this).error(`#toMap()`,`Scene view cannot be used before it is ready`),null;let n=G(e)?K(this,e):e;return it(this,n,t,this._defaultToMapOptions)}toScreen(e){if(!this.ready)return l.getLogger(this).error(`#toScreen()`,`Scene view cannot be used before it is ready`),null;let t=e;return e.z??(t=Ft,t.x=e.x,t.y=e.y,t.z=nt(this.elevationProvider,e)??0,t.spatialReference=e.spatialReference),T(t,Z,this.renderSpatialReference),this.state.camera.projectToScreen(Z,Q),ce(Q[0],Q[1])}pixelSizeAt(e,t){if(!this.ready)return l.getLogger(this).error(`#pixelSizeAt()`,`Scene view cannot be used before it is ready`),null;if(!e)return 0;let n=this.renderSpatialReference;T(e,Z,n);let r=this.state.camera.computeScreenPixelSizeAt(Z);return t&&n!==t?r*fe(n)/fe(t):r}overlayPixelSizeInMapUnits(e){return this.overlayManager?.overlayPixelSizeInMapUnits(e,()=>this.pixelSizeAt(e))??1}hitTest(e,t){if(!this.ready)return l.getLogger(this).error(`#hitTest()`,`Scene view cannot be used before it is ready`),null;let n=G(e)?K(this,e):e;return at(this,n,t,this._defaultHitTestOptions)}async popupHitTest(e){return ot(this,e)}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async zoomIn(){if(this.canZoomIn)return this.navigation.zoom(!0)}async zoomOut(){if(this.canZoomOut)return this.navigation.zoom(!1)}async whenAnalysisView(e){if(e.parent==null)throw new a(`view:no-analysisview-for-analysis`,`The analysis does not exist in view.analyses`,{analysis:e});switch(e.parent.type){case`line-of-sight`:case`dimension`:case`viewshed`:return(await this.whenLayerView(e.parent)).whenAnalysisView();default:return this.analysisViewManager.whenAnalysisView(e)}}whenLayerView(e){return super.whenLayerView(e)}async takeScreenshot(e){let t=await this._completeSettings(e);await this.whenReady();let n=(await this.stage.renderView.takeScreenshot(t))[0];return(await import(`./support/screenshotUtils.js`)).encode(n,t,this._pixelFormat())}async _takeScreenshot(e){let t=await this._completeSettings(e);await this.whenReady();let n=(await this.stage.renderView.takeScreenshot(t))[0];return(await import(`./support/screenshotUtils.js`)).encodeData(n,this._pixelFormat())}async _takeScreenshotWithObjectAndLayerId(e){let t=await this._completeSettings(e);t.olidColor=!0,await this.whenReady();let n=await this.stage.renderView.takeScreenshot(t),{encodeData:r}=await import(`./support/screenshotUtils.js`);return[r(n[0],this._pixelFormat()),r(n[1],this._pixelFormat())]}async _completeSettings(e){let{toRenderSettings:t,screenshotSuperSampleSettings:n}=await import(`./support/screenshotUtils.js`),r=t(e,this);return r.pixelRatio/=this.state.pixelRatio,n(r,this.supersampleScreenshotsEnabled,this.padding)}_pixelFormat(){return{flipY:!0,premultipliedAlpha:this.stage?.renderView.getAlpha()??!1}}get test(){}async takeScreenshotWithObjectAndLayerId(e){if(!yt())throw new a(`360vr:objectAndLayerId-rendering-disabled`,`has enable-feature:objectAndLayerId-rendering must be true`);let{encode:t}=await import(`./support/screenshotUtils.js`),n=await this._completeSettings(e);n.olidColor=!0,await this.whenReady();let r=await this.stage.renderView.takeScreenshot(n),i=t(r[0],n,this._pixelFormat()),o=await this._completeSettings(e);return o.format=`png`,[i,t(r[1],o,this._pixelFormat())]}getColorToObjectAndLayerIdMapping(){let e=this.stage.renderView.olidRenderHelper;if(e)return e.getColorToObjectAndLayerIdMapping();throw new a(`360vr:objectAndLayerId-rendering-disabled`,`has enable-feature:objectAndLayerId-rendering must be true`)}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}getAttributionItems(){return super.getAttributionItems().concat(this.attribution3D.attributionItems)}importLayerView(e){return N.importLayerView(e)}hasLayerViewModule(e){return N.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getWebDocumentSpatialReference(){return this.scene?.initialViewProperties?.spatialReference}getDefaultTimeZone(){return this.scene?.initialViewProperties?.timeZone??null}getSurface(){return this.surface}get _predeterminedViewingMode(){let e=this._isOverridden(`viewingMode`)?this._get(`viewingMode`):this.scene?.initialViewProperties?.viewingMode;return e==null?null:M(e)}getSpatialReferenceSupport(e,t){let n=this._predeterminedViewingMode,r=r=>this._validateSpatialReferenceForViewingMode(e,t,r)?this._makeSpatialReferenceConstraints(e,t,r,n):null,i=n?r(n):[...r(1)??[],...r(2)??[]];return i?.length?{constraints:i}:null}_validateSpatialReferenceForViewingMode(e,t,n){return Et(e,n)?t==null||E(t)?!0:!(D(t)&&mt(t,e,n)==null||O(t)&&n===1):!1}_makeSpatialReferenceConstraints(e,t,n,r){if(t==null)return[{spatialReference:e,viewingMode:n}];let{isWebMercator:i,isWGS84:a,vcsWkid:o,latestVcsWkid:s}=e,c=()=>o==null?i?w.WGS84:w.WebMercator:new w({...i?Oe:ke,vcsWkid:o,latestVcsWkid:s});return E(t)&&(i||a)?!(a&&r!==2)||ht(t.tileInfo,t.fullExtent,e,1)===null?[{spatialReference:e,viewingMode:n},{spatialReference:c(),viewingMode:n}]:[{spatialReference:c(),viewingMode:n}]:!D(t)&&!O(t)&&(i||a)?[{spatialReference:e,viewingMode:n},{spatialReference:c(),viewingMode:n}]:D(t)&&i&&n!==1?[{spatialReference:e,viewingMode:n},{spatialReference:c(),viewingMode:2}]:[{spatialReference:e,viewingMode:n}]}_validateSpatialReference(e){let t=this.getSpatialReferenceSupport(e)!=null,n=this._predeterminedViewingMode;return t||(n==null?e.isGeographic&&l.getLogger(this).warnOnce(`Spatial reference is geographic but not supported.`):l.getLogger(this).warnOnce(`Spatial reference defined on view not supported in ${j(n)} viewing mode.`)),t}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}trackGraphicState(e){if(!e.graphic)return l.getLogger(this).error(`trackGraphicState`,`GraphicState.graphic must not be null or undefined to start tracking`),null;let t=this.getViewForGraphic(e.graphic),n=null,r=!1,i=t=>{!r&&t!=null&&`processor`in t&&t.processor?.type===`graphics-3d`&&t.processor.graphicsCore&&(n=t.processor.graphicsCore.trackGraphicState(e))};return t==null?this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then(e=>i(e),()=>{}).catch(()=>{}):i(t),c(()=>{r=!0,n!=null&&(n.remove(),n=null)})}maskOccludee(e){if(!e)return l.getLogger(this).error(`maskOccludee`,`GraphicState.graphic must not be null or undefined to mask an occludee`),null;let t=this.getViewForGraphic(e),n=null,r=!1,i=t=>{!r&&t!=null&&Tt(t)&&(n=t.maskOccludee(e))};return t==null?this.whenViewForGraphic(e,{waitForLayer:!0}).then(e=>i(e),()=>{}).catch(()=>{}):i(t),c(()=>{r=!0,n!=null&&(n.remove(),n=null)})}getViewForGraphic(e){return e.layer===this?this.graphicsView:e.layer?this.allLayerViews.filter(e=>e.type!==`media-3d`).find(t=>t.layer===e.layer):null}graphicChanged(e){this.graphicsView!=null&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){return e.layer===this?(await ae(()=>this.graphicsView),this.graphicsView):!e.layer||!this.map?null:!t||!t.waitForLayer||this.map.allLayers.includes(e.layer)?this.whenLayerView(e.layer):new Promise((t,n)=>{let r=this.map.allLayers.on(`change`,i=>{i.added.includes(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,n))})})}enableFeatureTiles(){let e=Symbol();return this._featureTileTreeClients.add(e),c(()=>this._featureTileTreeClients.delete(e))}async _importModule(e,t){let n=new AbortController;this._importControllers.set(e,n),this._updatingChanged();try{let r=await It[e]();if(t&&(ne(this),d(n.signal),await t(n.signal)),this.destroyed)throw re();return d(n.signal),r}catch{return null}finally{this._importControllers.delete(e),this._updatingChanged()}}_abortImport(e){this._importControllers.get(e)?.abort(),this._importControllers.delete(e),this._updatingChanged()}_initBasemapTerrain(){this._set(`basemapTerrain`,new V({view:this})),this.elevationProvider.register(0,this.basemapTerrain)}_exitBasemapTerrain(){let{basemapTerrain:e,elevationProvider:t}=this;e&&(this._set(`basemapTerrain`,null),t.unregister(e),e.destroy())}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set(`pointsOfInterest`,new B({view:this})),this.addHandles([this.updatingHandles.add(()=>L.FEATURE_TILE_TREE_SHOW_TILES,e=>{e&&!this._featureTreeDebugger?this.updatingHandles.addPromise(import(`./3d/layers/support/FeatureTileTree3DDebugger.js`)).then(({FeatureTileTree3DDebugger:e})=>{!this._featureTreeDebugger&&L.FEATURE_TILE_TREE_SHOW_TILES&&(this._featureTreeDebugger=new e({view:this}))}):e||(this._featureTreeDebugger=u(this._featureTreeDebugger))},g),this.updatingHandles.add(()=>({basemapExtent:this.groundView?.groundExtent,basemapSpatialReference:this.groundView?.spatialReference,clippingArea:this.clippingArea,featureTiles:this._featureTiles}),({basemapExtent:e,basemapSpatialReference:t,clippingArea:n,featureTiles:r})=>{if(!r)return;let i=!!e;if(!n&&!i)r.filterExtent=null;else if(!i||!t)r.filterExtent=n;else{let i=e&&t?C(we(e,t),this.spatialReference):null;r.filterExtent=n?n.intersection(i):i}},g),this.updatingHandles.add(()=>this._featureTileTreeClients.size>0,e=>{e?this.updatingHandles.consumePromise(this._ensureFeatureTileTree()):this._featureTiles=u(this._featureTiles)},h)],Nt),this.stateManager.init()}async _ensureFeatureTileTree(){if(this._featureTiles||this._importControllers.has(`FeatureTileTree3D`))return;let e=(await this.updatingHandles.addPromise(this._importModule(`FeatureTileTree3D`)))?.FeatureTileTree3D;e&&(this._featureTiles=new e({renderCoordsHelper:this.renderCoordsHelper,pointsOfInterest:this.pointsOfInterest,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}),this._updatingChanged())}_exitTerrain(){this.stateManager.exit(),this.removeHandles(J),this.removeHandles(Nt),this._featureTiles=u(this.featureTiles),this._set(`pointsOfInterest`,u(this.pointsOfInterest)),this._exitBasemapTerrain(),this.state.reset(),this._exitCoordinateSystem()}_initCoordinateSystem(){if(this.spatialReference){let e=this.spatialReference,t=this.state.isGlobal,n=Ee(t,e);n!==this.renderSpatialReference&&(this._set(`renderCoordsHelper`,ct.create(this.state.viewingMode,n)),t||this.addHandles(p(()=>this.groundView?.groundExtent,e=>{let t=this.renderCoordsHelper.spatialReference;e!=null&&(e[0]!==0||e[1]!==0||e[2]!==0||e[3]!==0)&&Ce(e,this.groundView.spatialReference,$,t)&&(this.renderCoordsHelper.extent=$)},h),J),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(H/this.renderCoordsHelper.unitInMeters))}else this._set(`renderCoordsHelper`,null)}_exitCoordinateSystem(){this.removeHandles(J),this._set(`renderCoordsHelper`,null)}_updatingChanged(){this.notifyChange(`updating`)}_updateUpdatingMonitors(e=null){(e==null||e.type!==4)&&(this.removeHandles(`updatingMonitors`),this.allLayerViews.forEach(e=>{e.destroyed||(this.addHandles(p(()=>[e.updating,e.updatingProgress],()=>this._updatingChanged(),h),`updatingMonitors`),e.when(()=>this._updatingChanged(),()=>this._updatingChanged()))}),this._updatingChanged())}async _prepareScreenshotOverlay(){this.overlay&&await this.overlay.prepare()}_renderScreenshotOverlay(e,t,n){if(!this.overlay||!this.overlay.hasVisibleItems)return n;let r=e.getContext(`2d`,{willReadFrequently:!0});return r.putImageData(n,0,0),this.overlay.renderCanvas(e,{disableDecorations:t}),r.getImageData(0,0,n.width,n.height)}_initStage(){let e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,preserveDrawingBuffer:this.preserveDrawingBufferEnabled,canvas:this.renderCanvas,screenshot:{prepareOverlay:()=>this._prepareScreenshotOverlay(),renderOverlay:(e,t,n)=>this._renderScreenshotOverlay(e,t,n)}},t=new Qe(this.state.viewingMode,e=>this.stage.layers.forEach(e),this);this._set(`sceneIntersectionHelper`,t);let n=i(this.surface);this._stage=new vt({view:this,options:e,container:n}),this.notifyChange(`stage`),this._updateSlice(),this.addHandles([this.on(`pointer-move`,()=>this.stage?.renderer.resetAnimation()),o(this.stage.renderView.canvas,`webglcontextlost`,e=>{this.fatalError=new a(`webgl-context-lost`,e.statusMessage||`WebGL context lost`)})],`stage`),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(H/this.renderCoordsHelper.unitInMeters),this._set(`canvas`,this.stage.renderView.canvas)}_exitStage(){this.sceneIntersectionHelper?.destroy(),this._set(`sceneIntersectionHelper`,null),this._stage=u(this.stage),this._set(`stage`,null),this.removeHandles(`stage`),this._set(`canvas`,null)}_initSurface(){this._exitSurface(),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new dt({view:this,resourceController:this._resourceController})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitTerrain(),this._exitStage())}async _ensureGraphicsView(){if(this.graphicsView||this._importControllers.has(`GraphicsView3D`)||this.graphics.length===0)return;this.removeHandles(`GraphicsView3D`);let e=(await this.updatingHandles.addPromise(this._importModule(`GraphicsView3D`,e=>ae(()=>this.groundView?.ready,e))))?.default;e&&this._set(`graphicsView`,new e({view:this,getGraphics:()=>this.graphics})),this._updatingChanged()}_disposeGraphicsView(){this._abortImport(`GraphicsView3D`),this.removeHandles(`GraphicsView3D`),this.graphicsView&&(this.removeHandles(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set(`graphicsView`,null))}_disposeFocusAreasView(){this._abortImport(`FocusAreasView`),this.removeHandles(`FocusAreasView`),this.focusAreasView=u(this.focusAreasView)}async _ensureFocusAreasView(e){if(this.focusAreasView||this._importControllers.has(`FocusAreasView`)||e===0)return;this.removeHandles(`FocusAreasView`);let t=(await this.updatingHandles.addPromise(this._importModule(`FocusAreasView`)))?.FocusAreasView;t&&(this.focusAreasView=new t({view:this})),this._updatingChanged()}_startup(){M(this.viewingMode)===1&&(this._clippingArea=null),this._initSurface(),this._set(`ready`,!0),this.addHandles(f(()=>this.graphics,`after-changes`,()=>this._ensureGraphicsView()),`GraphicsView3D`),this._ensureGraphicsView(),this.addHandles(this.updatingHandles.add(()=>this.map?.focusAreas?.areas.length??0,e=>this._ensureFocusAreasView(e),{initial:!0}),`FocusAreasView`);let e=this.scene?.initialViewProperties??null,t=e?.environment;t&&(this._overrideDefaultEnvironmentOnly?me(this.environment,t):this.environment=this.environment.cloneWithWebsceneEnvironment(t)),this.timeExtent=e?.timeExtent,e?.analyses.applyTo(this),this.labeler.setup(),this.environmentView.connectView(this),this.inputManager.connect();let n=this._resolveWhenReady;this._resolveWhenReady=[],n.forEach(e=>e(this))}_teardown(){this.inputManager.disconnect(),this.environmentView.disconnectView(),this._overrideDefaultEnvironmentOnly=!1,this.labeler.dispose(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this._exitSurface(),this._set(`ready`,!1)}get _defaultToMapOptions(){let e={include:new Set};if(!this.map)return e;this.map.ground&&e.include.add(U);for(let t of this.allLayerViews)(k(t.layer)&&(!has(`enable-feature:im-as-ground`)||t.layer.isUsedAsGroundLayer)||je(t.layer))&&e.include.add(t.uid);return e}get _defaultHitTestOptions(){let e={exclude:new Set};if(!this.map)return e;this.map.ground&&this.map.ground.opacity<1&&e.exclude.add(U);for(let t of this.allLayerViews)(has(`enable-feature:im-as-ground`)?k(t.layer)&&t.layer.isUsedAsGroundLayer:k(t.layer))&&t.fullOpacity<1&&e.exclude.add(t.uid);return e}static{this.type=`3d`}static clearStatics(){Mt(),ge(),ue(),St(),Xe(),Ve(),Se(),wt(),Ne(),_t(),xt(),Ze(),$e(),ve(),se(),bt(),gt(),Ke.cleanupI3SLodHandling(),Me.cleanupTilemapCache(),I.cleanupViewstate(),V.cleanupTerrainSurface()}};e([_({nonNullable:!0}),v(Pt)],Y.prototype,`options`,void 0),e([_()],Y.prototype,`_userClippingArea`,void 0),e([_()],Y.prototype,`_resourceController`,void 0),e([_()],Y.prototype,`stage`,null),e([_({readOnly:!0})],Y.prototype,`deconflictor`,void 0),e([_({readOnly:!0})],Y.prototype,`labeler`,void 0),e([_()],Y.prototype,`navigation`,void 0),e([_({type:Re,readOnly:!0})],Y.prototype,`animation`,null),e([_({readOnly:!0})],Y.prototype,`basemapTerrain`,void 0),e([_({readOnly:!0})],Y.prototype,`overlayManager`,null),e([_({readOnly:!0})],Y.prototype,`elevationProvider`,void 0),e([_()],Y.prototype,`camera`,null),e([_({type:t})],Y.prototype,`contentCamera`,null),e([_({readOnly:!0})],Y.prototype,`canvas`,null),e([_({type:S,useTypeForAutocast:!1})],Y.prototype,`center`,null),e([_({type:x})],Y.prototype,`clippingArea`,null),e([_({type:P,nonNullable:!0})],Y.prototype,`constraints`,void 0),e([_({type:x,readOnly:!0})],Y.prototype,`renderDataExtent`,null),e([_({readOnly:!0})],Y.prototype,`tileInfo`,null),e([_({type:x,readOnly:!0})],Y.prototype,`dataExtent`,null),e([_({type:x,readOnly:!0})],Y.prototype,`_groundAndLayersExtent`,null),e([_({type:F})],Y.prototype,`environment`,null),e([v(`environment`)],Y.prototype,`castEnvironment`,null),e([_({readOnly:!0})],Y.prototype,`environmentView`,void 0),e([_({type:x})],Y.prototype,`extent`,null),e([_({type:r})],Y.prototype,`floors`,void 0),e([_()],Y.prototype,`screenCenter`,null),e([_()],Y.prototype,`frustum`,null),e([_({type:Number,readOnly:!0})],Y.prototype,`fullOpacity`,void 0),e([_({readOnly:!0})],Y.prototype,`graphicsView`,void 0),e([_()],Y.prototype,`analysisViewManager`,void 0),e([_()],Y.prototype,`groundView`,void 0),e([_({readOnly:!0})],Y.prototype,`layerviewCollections`,null),e([_({type:Boolean})],Y.prototype,`initialExtentRequired`,null),e([_()],Y.prototype,`defaultsFromMapSettings`,null),e([_()],Y.prototype,`interacting`,null),e([_()],Y.prototype,`stationary`,null),e([_()],Y.prototype,`navigating`,null),e([_()],Y.prototype,`map`,void 0),e([_()],Y.prototype,`padding`,null),e([_({type:B,readOnly:!0})],Y.prototype,`pointsOfInterest`,void 0),e([_()],Y.prototype,`_featureTiles`,void 0),e([_()],Y.prototype,`featureTiles`,null),e([_()],Y.prototype,`_featureTreeDebugger`,void 0),e([_({constructOnly:!0})],Y.prototype,`deactivatedWebGLExtensions`,void 0),e([_({constructOnly:!0})],Y.prototype,`debugWebGLExtensions`,void 0),e([_({constructOnly:!0})],Y.prototype,`renderCanvas`,void 0),e([_({constructOnly:!0})],Y.prototype,`state`,void 0),e([_()],Y.prototype,`screenSizePerspective`,void 0),e([_({readOnly:!0})],Y.prototype,`inputManager`,void 0),e([_({readOnly:!0})],Y.prototype,`stateManager`,void 0),e([_({type:[`low`,`medium`,`high`]})],Y.prototype,`qualityProfile`,null),e([_({type:z,get(){let e=this._get(`qualitySettings`);if(!e){let t=R(this.qualityProfile);e=new z(t)}return e}})],Y.prototype,`qualitySettings`,void 0),e([_()],Y.prototype,`slice`,void 0),e([_({readOnly:!0})],Y.prototype,`typeSpecificPreconditionsReady`,null),e([_({readOnly:!0})],Y.prototype,`renderCoordsHelper`,void 0),e([_({readOnly:!0})],Y.prototype,`sceneIntersectionHelper`,void 0),e([_({type:Number,readOnly:!0})],Y.prototype,`resolution`,null),e([_({type:Number})],Y.prototype,`scale`,null),e([_({readOnly:!0,type:Number})],Y.prototype,`terrainLevel`,null),e([_()],Y.prototype,`heightModelInfo`,null),e([_({type:w})],Y.prototype,`spatialReference`,void 0),e([_({type:Boolean,value:!1})],Y.prototype,`alphaCompositingEnabled`,null),e([_({constructOnly:!0})],Y.prototype,`preserveDrawingBufferEnabled`,void 0),e([_({type:Boolean})],Y.prototype,`supersampleScreenshotsEnabled`,void 0),e([_({readOnly:!0})],Y.prototype,`type`,void 0),e([_(),v(e=>e instanceof kt?e:b(At,e))],Y.prototype,`ui`,void 0),e([_({type:Boolean,readOnly:!0})],Y.prototype,`updating`,null),e([_()],Y.prototype,`_updatingObjects`,null),e([_()],Y.prototype,`_updatingObjectsWithProgress`,null),e([_()],Y.prototype,`_updatingObjectsToDebug`,null),e([_({type:Number,readOnly:!0})],Y.prototype,`updatingProgress`,void 0),e([_({type:[`global`,`local`]})],Y.prototype,`viewingMode`,null),e([_({type:n})],Y.prototype,`viewpoint`,null),e([_({readOnly:!0})],Y.prototype,`visibleArea`,null),e([_({type:Number})],Y.prototype,`zoom`,null),e([_({readOnly:!0})],Y.prototype,`quality`,null),e([_({readOnly:!0})],Y.prototype,`resolutionScale`,null),e([_()],Y.prototype,`focusAreasView`,void 0),e([_()],Y.prototype,`_defaultToMapOptions`,null),e([_()],Y.prototype,`_defaultHitTestOptions`,null),Y=q=e([pe(`esri.views.SceneView`)],Y);function X(e,t){return e!=null&&xe(e.spatialReference,t)?C(e,t):null}const Z=_e(),Q=le(),$=Te(),Ft=Ae(0,0,0,w.WebMercator),It={GraphicsView3D:()=>import(`./3d/layers/GraphicsView3D.js`),FocusAreasView:()=>import(`./3d/FocusAreasView.js`),FeatureTileTree3D:()=>import(`./3d/layers/support/FeatureTileTree3D.js`)},Lt=Y;export{Lt as default};
2
+ import{__decorate as e}from"tslib";import t from"../Camera.js";import n from"../Viewpoint.js";import r from"../core/Collection.js";import{byId as i}from"../core/domUtils.js";import a from"../core/Error.js";import{on as o}from"../core/events.js";import{destroyHandle as s,makeHandle as c}from"../core/handleUtils.js";import has from"../core/has.js";import l from"../core/Logger.js";import{mapCollectionAsync as ee}from"../core/mapCollectionUtils.js";import{destroyMaybe as u,maybeProperty as te}from"../core/maybe.js";import{throwIfDestroyed as ne,throwIfAborted as d,createAbortError as re}from"../core/promiseUtils.js";import ie from"../core/ReactiveSet.js";import{on as f,watch as p,initial as m,sync as h,whenOnce as ae,syncAndInitial as g}from"../core/reactiveUtils.js";import{setFrameDuration as oe,cleanupScheduling as se}from"../core/scheduling.js";import{createScreenPoint as ce,createScreenPointArray as le}from"../core/screenUtils.js";import{cleanupWhereClauseCache as ue}from"../core/sql.js";import{getDefaultVerticalUnitStringForSR as de,getMetersPerUnitForSR as fe}from"../core/units.js";import{property as _,cast as v,subclass as pe}from"../core/accessorSupport/decorators.js";import{ensureType as y,ensureClass as b}from"../core/accessorSupport/ensureType.js";import{overrideDefaultsFrom as me}from"../core/accessorSupport/overrideDefaultsFrom.js";import{runUntracked as he}from"../core/accessorSupport/tracking.js";import{drainNotificationQueue as ge}from"../core/accessorSupport/trackingUtils.js";import{create as _e}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{cleanupPooledRBush as ve}from"../core/libs/rbush/PooledRBush.js";import{initialize as ye}from"../core/workers/workers.js";import x from"../geometry/Extent.js";import be from"../geometry/HeightModelInfo.js";import S from"../geometry/Point.js";import{project as C,canProjectWithoutEngine as xe}from"../geometry/projectionUtils.js";import w from"../geometry/SpatialReference.js";import{cleanupSpatialReferenceEllipsoidUtils as Se}from"../geometry/spatialReferenceEllipsoidUtils.js";import{projectBoundingRect as Ce}from"../geometry/projection/projectBoundingRect.js";import{projectPointToVector as T}from"../geometry/projection/projectPointToVector.js";import{toExtent as we,create as Te}from"../geometry/support/aaBoundingRect.js";import{renderSRFromViewSR as Ee}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as De}from"../geometry/support/scaleUtils.js";import{wgs84 as Oe,webMercator as ke}from"../geometry/support/spatialReferenceUtils.js";import{makeDehydratedPoint as Ae}from"../layers/graphics/dehydratedPoint.js";import{isImageryTileLayer as E,isTiledLayer as D,isVoxelLayer as O,isIntegratedMeshLayer as k,isGaussianSplatLayer as je}from"../layers/support/layerUtils.js";import{TilemapCache as Me}from"../layers/support/TilemapCache.js";import{clearDefaultPortalInstance as Ne}from"../portal/portalDefault.js";import{WebSceneTag as Pe}from"../support/tagSymbols.js";import{BreakpointsOwner as Fe}from"./BreakpointsOwner.js";import{DOMContainer as Ie}from"./DOMContainer.js";import{PopupView as Le}from"./PopupView.js";import A from"./View.js";import Re from"./ViewAnimation.js";import{stringFromViewingMode as j,viewingModeFromString as M}from"./ViewingMode.js";import{GroundView3D as ze}from"./3d/GroundView3D.js";import{layerView3DImporter as N}from"./3d/layerViewModuleImportUtils.js";import{importAnalysisViewModule as Be}from"./3d/analysis/analysisViewModuleImportUtils.js";import{cleanupIntersectionUtils as Ve}from"./3d/camera/intersectionUtils.js";import P from"./3d/constraints/Constraints.js";import F from"./3d/environment/Environment.js";import{EnvironmentView as He}from"./3d/environment/EnvironmentView.js";import Ue from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as We}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as Ge}from"./3d/layers/graphics/Labeler.js";import Ke from"./3d/layers/i3s/I3SLodHandling.js";import{Navigation3D as qe}from"./3d/navigation/Navigation3D.js";import{ScreenSizePerspective as Je}from"./3d/state/ScreenSizePerspective.js";import I from"./3d/state/ViewState.js";import{ViewStateManager as Ye,cleanupViewStateManager as Xe}from"./3d/state/ViewStateManager.js";import{cleanupPointToPointAnimationController as Ze}from"./3d/state/controllers/PointToPointAnimationController.js";import{SceneIntersectionHelper as Qe}from"./3d/state/helpers/SceneIntersectionHelper.js";import{cleanupNavigationUtils as $e}from"./3d/state/utils/navigationUtils.js";import et from"./3d/support/Attribution3D.js";import{CombinedElevationProvider as tt}from"./3d/support/CombinedElevationProvider.js";import{debugFlags as L}from"./3d/support/debugFlags.js";import{getElevationAtPoint as nt}from"./3d/support/ElevationProvider.js";import{GroundAndIMSurface as rt}from"./3d/support/GroundAndIMSurface.js";import{toMap as it,hitTest as at}from"./3d/support/hitTest.js";import{popupHitTest as ot}from"./3d/support/popupHitTest.js";import{getDefaultQualityProfileName as st,getQualityProfileSettings as R}from"./3d/support/QualityProfile.js";import z from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as ct}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as lt}from"./3d/support/ResourceController.js";import ut from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as dt}from"./3d/support/SharedSymbolResources.js";import{ViewSlice as ft}from"./3d/support/ViewSlice.js";import{PointsOfInterest as B}from"./3d/support/pointsOfInterest/PointsOfInterest.js";import V from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as pt,getTiledLayerInfo as mt,checkIfTileInfoSupportedForView as ht}from"./3d/terrain/terrainUtils.js";import{clearTilePerLayerInfo as gt}from"./3d/terrain/TilePerLayerInfo.js";import{cleanupTileRenderer as _t}from"./3d/terrain/TileRenderer.js";import{Stage as vt}from"./3d/webgl-engine/Stage.js";import{olidEnabled as yt}from"./3d/webgl-engine/effects/geometry/olidUtils.js";import{cleanupRenderOccluded as bt}from"./3d/webgl-engine/effects/geometry/RenderOccluded.js";import{defaultTolerance as H}from"./3d/webgl-engine/lib/Intersector.js";import{cleanupShadowmap as xt}from"./3d/webgl-engine/lib/ShadowMap.js";import{terrainId as U}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{cleanupEdgeProcessing as St}from"./3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js";import W from"./interactive/options/ViewOptions.js";import Ct from"./support/AnalysisViewManager.js";import{cleanupDrapedUtils as wt}from"./support/drapedUtils.js";import{occludeesSupported as Tt}from"./support/layerViewUtils.js";import{isSupportedScreenPointEvent as G,createScreenPointFromSupportedEvent as K}from"./support/screenUtils.js";import{isSpatialReferenceSupported as Et}from"./support/spatialReferenceSupport.js";import{initializeTextureCompressionWorker as Dt,destroyTextureCompressionWorker as Ot}from"./support/TextureCompressionHelper.js";import kt from"./ui/DefaultUI.js";import At from"./ui/3d/DefaultUI3D.js";import jt from"../webscene/Environment.js";import{clearVNodeCache as Mt}from"../widgets/support/vnodeCache.js";var q;const Nt=Symbol(),J=Symbol();function Pt(e){let t=b(W,e);return t!==e&&e.snapping?.enabled==null&&(t.snapping.enabled=!0),t}let Y=class extends Fe(Le(Ie(A))){static{q=this}get timeZone(){return super.timeZone}set timeZone(e){super.timeZone=e}constructor(e){super(e),this.options=new W({snapping:{enabled:!0}}),this._userClippingArea=null,this._clippingArea=null,this._overrideDefaultEnvironmentOnly=!0,this._resolveWhenReady=[],this._resourceController=lt(this),this.deconflictor=new We({view:this}),this.attribution3D=new et({view:this}),this.labeler=new Ge({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.navigation=new qe({view:this}),this.basemapTerrain=null,this.elevationProvider=new tt({view:this}),this._canvas=null,this.constraints=new P,this._environment=new F,this.environmentView=new He,this.floors=new r,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new Ct({importAnalysisViewModule:e=>Be(e),view:this}),this.groundView=null,this.groundAndIMSurface=null,this.map=null,this._featureTileTreeClients=new ie,this._featureTiles=null,this._featureTreeDebugger=null,this.state=new I({view:this}),this.slice=new ft,this.renderCoordsHelper=new ct,this.spatialReference=null,this.preserveDrawingBufferEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type=`3d`,this.ui=new At,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this._importControllers=new Map,ye();let t=()=>this._updatingChanged();this.addHandles(s(ee(()=>this.map?.allLayers,async e=>{try{await e.when()}catch{}finally{t()}}))),this.addHandles([f(()=>this.map?.allLayers,`after-changes`,t,{onListenerAdd:t,onListenerRemove:t,sync:!0}),this.allLayerViews.on(`after-changes`,e=>this._updateUpdatingMonitors(e)),p(()=>this.scene,e=>e?.load().catch(()=>{}))]),this.inputManager=new Ue({view:this}),this.stateManager=new Ye({view:this}),this.screenSizePerspective=new Je({view:this})}initialize(){if(has(`enable-feature:esri-compress-textures`)&&has(`wasm-simd`)){let e=Dt(this,this.resourceController);this.addResolvingPromise(e.promise)}this.groundView=new ze({view:this}),this.groundAndIMSurface=new rt({view:this}),this._updateUpdatingMonitors(),this.updatingHandles.add(()=>this.qualitySettings.memoryLimit,e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)},m),this.updatingHandles.add(()=>this.qualitySettings.additionalCacheMemory,e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)},m),this.updatingHandles.add(()=>this.qualitySettings.frameRate??0,e=>oe(e>0?1e3/Math.ceil(e):0),m),this.addHandles([p(()=>this.spatialReference,()=>this.notifyChange(`clippingArea`),h),p(()=>({plane:this.slice.plane,isDecoration:this.slice.isDecoration}),()=>this._updateSlice(),h)])}destroy(){this.destroyed||(Ot(this),this.updatingHandles.removeAll(),this.basemapTerrain?.clearHandles(),this.elevationProvider.destroy(),this.ui.removeAllHandles(),this.layerViewManager.clearHandles(),this.invalidate(),this.layerViewManager.clear(),this._set(`analysisViewManager`,u(this.analysisViewManager)),this._exitSurface(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this.sharedSymbolResources=u(this.sharedSymbolResources),this._set(`labeler`,u(this.labeler)),this._set(`deconflictor`,u(this.deconflictor)),this._resourceController=u(this._resourceController),this._set(`stateManager`,u(this.stateManager)),this._set(`inputManager`,u(this.inputManager)),this.state.destroy(),this.highlights.destroy(),this.removeHandles(`updatingMonitors`),this._set(`environmentView`,u(this.environmentView)),this._set(`environment`,u(this.environment)),this.groundView=u(this.groundView),this.groundAndIMSurface.destroy(),this.slice.destroy(),this._updatingObjectsWithProgress.length=0,this._updatingObjects.length=0,this.ui?.destroy(),this._set(`ui`,null),this._set(`renderCanvas`,null),this._set(`canvas`,null),this._canvas=null,this.screenSizePerspective.destroy(),this.attribution3D.destroy())}get stage(){return this._stage}get renderSpatialReference(){return this.renderCoordsHelper.spatialReference}get groundSpatialReference(){return this.groundView?.spatialReference}get analyses(){return super.analyses}set analyses(e){super.analyses=e}get animation(){return this.state?.animation}get overlayManager(){return this.basemapTerrain?.overlayManager}get camera(){return this.stateManager?.camera}set camera(e){this.stateManager&&(this.stateManager.camera=e)}get contentCamera(){return this.stateManager?.contentCamera}set contentCamera(e){this.stateManager&&(this.stateManager.contentCamera=e)}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get canvas(){return this._canvas}get center(){return this.stateManager?.center}set center(e){this.stateManager&&(this.stateManager.center=y(S,e))}get clippingArea(){if(this.viewingMode===`global`)return null;let e=this.map,t=this._userClippingArea||te(e,`clippingArea`);return!(this._userClippingArea||te(e,`clippingEnabled`))||t==null?(this._clippingArea=null,null):t instanceof x?this.spatialReference&&(t=X(t,this.spatialReference),t==null)?(l.getLogger(this).error(`#clippingArea`,`setting clippingArea with incompatible SpatialReference`),this._clippingArea):(t=t.clone(),t.intersection(this._groundAndLayersExtent)??(t.xmin=t.xmax,t.ymin=t.ymax),t.zmin=void 0,t.zmax=void 0,t.equals(this._clippingArea)||(this._clippingArea=t),this._clippingArea):(l.getLogger(this).error(`#clippingArea`,`only clippingArea geometries of type Extent are supported`),this._clippingArea)}set clippingArea(e){this.ready&&this.viewingMode===`global`&&e!=null?l.getLogger(this).error(`#clippingArea=`,`Clipping area is only supported in local viewingMode`):this._userClippingArea=e}get renderDataExtent(){if(this.state.viewingMode===1)return null;let e=this.renderSpatialReference,t=this.dataExtent;return t==null||e==null||t.spatialReference.equals(e)?t:X(t,e)}get tileInfo(){return this.basemapTerrain?.tilingScheme?.toTileInfo()}get dataExtent(){let e=this._groundAndLayersExtent,t=this.spatialReference||w.WGS84,n=X(this.clippingArea,t);n!=null&&(e=e==null?n:e.intersection(n));let r=this._get(`dataExtent`);return e!=null&&e.equals(r)?r:e}get _groundAndLayersExtent(){let e=this.spatialReference||w.WGS84,t,n=n=>{let r=X(n,e);r!=null&&(t==null?t=r.clone():t.union(r))},{groundView:r}=this,i=r?.spatialReference,a=r?.fullGroundExtent;i&&a&&n(new x({xmin:a[0],ymin:a[1],zmin:0,xmax:a[2],ymax:a[3],zmax:0,spatialReference:i}));let o=e=>{e.fullExtent==null||e.type===`graphics`&&e.internal||n(e.fullExtent)};if(this.map?.allLayers.forEach(e=>o(e)),t==null)return null;t.hasZ?(t.zmin=Math.min(0,t.zmin??0),t.zmax=Math.max(0,t.zmax??0)):(t.zmin=0,t.zmax=0);let s=this._get(`_groundAndLayersExtent`);return t.equals(s)?s:t}get environment(){return this._environment}set environment(e){if(this._environment===e)return;let{_environment:t}=this;this._environment=null,t?.destroy(),this._environment=e,this.notifyChange(`environment`)}castEnvironment(e){return e?e instanceof F?e:e instanceof jt?this.environment?.cloneWithWebsceneEnvironment(e)??F.fromWebsceneEnvironment(e):y(F,e):new F}get extent(){return this.stateManager?.extent}set extent(e){this.stateManager&&(this.stateManager.extent=e)}get screenCenter(){return this.stateManager?.screenCenter}get frustum(){return this.stateManager?.frustum}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.groundView?.layerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get _layerToLayerviewMapping(){return q._layerToLayerview}static{this._layerToLayerview=A._layerToLayerview.concat([[`view.map.ground.layers`,`view.groundView.layerViews`]])}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||(this.toolViewManager?.interacting??!1)}get stationary(){return!this.animation&&!this.resizing&&(this.state?.stationary??!0)}get navigating(){return this.state?.navigating??!1}get scene(){return this.map&&Pe in this.map?this.map:null}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get featureTiles(){return this._featureTiles}set qualityProfile(e){let t=R(e);t&&this._get(`qualityProfile`)!==e&&(this.qualitySettings=new z(t),this.stage?.renderView.updateQualitySettings(this.qualitySettings),this._set(`qualityProfile`,e))}get qualityProfile(){return this._get(`qualityProfile`)||st()}_updateSlice(){this.stage!=null&&(this.stage.renderer.slice=this.slice)}get typeSpecificPreconditionsReady(){return this.viewingMode?!!this.stateManager?.preinit(this.spatialReference):!1}get resolution(){let{scale:e,spatialReference:t}=this;return t?he(()=>De(e,t)):0}get scale(){return this.stateManager?.scale}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get terrainLevel(){let e=this.basemapTerrain?.tilingScheme,t=this.scale;if(!e||!t)return null;let n=e.levelAtScale(t)+this.qualitySettings.tiledSurface.lodBias,r=e.getMaxLod();return n<=0?null:Math.max(0,Math.min(n,r||1/0))}get heightModelInfo(){let e=this.getDefaultHeightModelInfo();if(!e)return null;let t=de(this.spatialReference);if(t&&e.heightUnit!==t)return new be({heightModel:e.heightModel,heightUnit:t,vertCRS:e.vertCRS,associatedSpatialReference:e.associatedSpatialReference});if(!e.associatedSpatialReference){let t=e.clone();return t.associatedSpatialReference=this.spatialReference,t}return e}get alphaCompositingEnabled(){return this._get(`alphaCompositingEnabled`)}set alphaCompositingEnabled(e){this._stage&&l.getLogger(this).warn(`alphaCompositingEnabled cannot be changed after the view has become ready`),this._set(`alphaCompositingEnabled`,e)}get updating(){if(this.destroying||this.destroyed)return!1;if(!this.initialized)return!0;let e=0,t=this.layerViewManager.updating,n=t?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach(r=>{if(!r.isFulfilled())++n;else if(r.updating){if(t=!0,r.suspended||pt(r))return;++n,e+=r.updatingProgress}});let r=.1;for(let t of this._updatingObjects)t?.updating&&(n+=r,e+=.5*r);for(let t of this._updatingObjectsWithProgress)t?.updating&&(++n,e+=t.updatingProgress);let i=!this.stateManager.test.updatingIgnoreRenderState&&this.state.updating;if(t=!!(t||n>0||this.updatingHandles.updating||!this.ready||!this.stationary||i||this._importControllers.size>0||this.inputManager?.updating||this.map?.allLayers?.some(e=>!e.isFulfilled())),t?(this._numUpdating=Math.max(n,this._numUpdating),e+=this._numUpdating-n):this._numUpdating=0,this._numUpdating>0?e/=this._numUpdating:e=+!t,this._get(`updatingProgress`)!==e){let n=performance.now();if(e<1){let t=Math.min((n-this._lastUpdateTime)/2e3,1);e=this.updatingProgress*(1-t)+e*t}this._set(`updatingProgress`,e),this._lastUpdateTime=t&&e<1?n:0}return L.UPDATING&&console.log(`Updating:`,this._updatingObjectsToDebug.filter(e=>e!=null&&e.updating).map(({declaredClass:e})=>e)),t}get _updatingObjects(){return[this.graphicsView,this.basemapView,this.groundView,this._resourceController,this.stage,this.featureTiles,this.pointsOfInterest,this.environmentView,this.overlay,this._featureTreeDebugger,this.toolViewManager,this.analysisViewManager,this.focusAreasView]}get _updatingObjectsWithProgress(){return[this.deconflictor,this.labeler,this.basemapTerrain]}get _updatingObjectsToDebug(){return L.UPDATING?this._updatingObjects.concat(this._updatingObjectsWithProgress).concat(this.allLayerViews.toArray()):[]}get viewingMode(){let e=this._predeterminedViewingMode;if(e!=null)return j(e);let t=this.spatialReference;return t?this.defaultsFromMap?.viewingMode!=null&&t.equals(this.defaultsFromMap.spatialReference)?j(this.defaultsFromMap.viewingMode):Et(t,1)?`global`:`local`:`global`}set viewingMode(e){this.ready?l.getLogger(this).error(`#viewingMode`,`viewingMode cannot be set once view is ready`):this._overrideIfSome(`viewingMode`,e)}get viewpoint(){return this.stateManager?.viewpoint}set viewpoint(e){this.stateManager&&(this.stateManager.viewpoint=e)}get visibleArea(){return this.stateManager?.visibleArea}get zoom(){return this.stateManager.zoom}set zoom(e){this.stateManager&&(this.stateManager.zoom=e)}get resourceController(){return this._resourceController}get quality(){return this._resourceController?.memoryController?.memoryFactor??1}get resolutionScale(){return Math.sqrt(Math.min(1,this.quality/.75))}get performanceInfo(){return new ut(this)}on(e,t,n,r){return this.viewEvents.on(e,t,n,r)||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return l.getLogger(this).error(`#toMap()`,`Scene view cannot be used before it is ready`),null;let n=G(e)?K(this,e):e;return it(this,n,t,this._defaultToMapOptions)}toScreen(e){if(!this.ready)return l.getLogger(this).error(`#toScreen()`,`Scene view cannot be used before it is ready`),null;let t=e;return e.z??(t=Ft,t.x=e.x,t.y=e.y,t.z=nt(this.elevationProvider,e)??0,t.spatialReference=e.spatialReference),T(t,Z,this.renderSpatialReference),this.state.camera.projectToScreen(Z,Q),ce(Q[0],Q[1])}pixelSizeAt(e,t){if(!this.ready)return l.getLogger(this).error(`#pixelSizeAt()`,`Scene view cannot be used before it is ready`),null;if(!e)return 0;let n=this.renderSpatialReference;T(e,Z,n);let r=this.state.camera.computeScreenPixelSizeAt(Z);return t&&n!==t?r*fe(n)/fe(t):r}overlayPixelSizeInMapUnits(e){return this.overlayManager?.overlayPixelSizeInMapUnits(e,()=>this.pixelSizeAt(e))??1}hitTest(e,t){if(!this.ready)return l.getLogger(this).error(`#hitTest()`,`Scene view cannot be used before it is ready`),null;let n=G(e)?K(this,e):e;return at(this,n,t,this._defaultHitTestOptions)}async popupHitTest(e){return ot(this,e)}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async zoomIn(){if(this.canZoomIn)return this.navigation.zoom(!0)}async zoomOut(){if(this.canZoomOut)return this.navigation.zoom(!1)}async whenAnalysisView(e){if(e.parent==null)throw new a(`view:no-analysisview-for-analysis`,`The analysis does not exist in view.analyses`,{analysis:e});switch(e.parent.type){case`line-of-sight`:case`dimension`:case`viewshed`:return(await this.whenLayerView(e.parent)).whenAnalysisView();default:return this.analysisViewManager.whenAnalysisView(e)}}whenLayerView(e){return super.whenLayerView(e)}async takeScreenshot(e){let t=await this._completeSettings(e);await this.whenReady();let n=(await this.stage.renderView.takeScreenshot(t))[0];return(await import(`./support/screenshotUtils.js`)).encode(n,t,this._pixelFormat())}async _takeScreenshot(e){let t=await this._completeSettings(e);await this.whenReady();let n=(await this.stage.renderView.takeScreenshot(t))[0];return(await import(`./support/screenshotUtils.js`)).encodeData(n,this._pixelFormat())}async _takeScreenshotWithObjectAndLayerId(e){let t=await this._completeSettings(e);t.olidColor=!0,await this.whenReady();let n=await this.stage.renderView.takeScreenshot(t),{encodeData:r}=await import(`./support/screenshotUtils.js`);return[r(n[0],this._pixelFormat()),r(n[1],this._pixelFormat())]}async _completeSettings(e){let{toRenderSettings:t,screenshotSuperSampleSettings:n}=await import(`./support/screenshotUtils.js`),r=t(e,this);return r.pixelRatio/=this.state.pixelRatio,n(r,this.supersampleScreenshotsEnabled,this.padding)}_pixelFormat(){return{flipY:!0,premultipliedAlpha:this.stage?.renderView.getAlpha()??!1}}get test(){}async takeScreenshotWithObjectAndLayerId(e){if(!yt())throw new a(`360vr:objectAndLayerId-rendering-disabled`,`has enable-feature:objectAndLayerId-rendering must be true`);let{encode:t}=await import(`./support/screenshotUtils.js`),n=await this._completeSettings(e);n.olidColor=!0,await this.whenReady();let r=await this.stage.renderView.takeScreenshot(n),i=t(r[0],n,this._pixelFormat()),o=await this._completeSettings(e);return o.format=`png`,[i,t(r[1],o,this._pixelFormat())]}getColorToObjectAndLayerIdMapping(){let e=this.stage.renderView.olidRenderHelper;if(e)return e.getColorToObjectAndLayerIdMapping();throw new a(`360vr:objectAndLayerId-rendering-disabled`,`has enable-feature:objectAndLayerId-rendering must be true`)}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}getAttributionItems(){return super.getAttributionItems().concat(this.attribution3D.attributionItems)}importLayerView(e){return N.importLayerView(e)}hasLayerViewModule(e){return N.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getWebDocumentSpatialReference(){return this.scene?.initialViewProperties?.spatialReference}getDefaultTimeZone(){return this.scene?.initialViewProperties?.timeZone??null}getSurface(){return this.surface}get _predeterminedViewingMode(){let e=this._isOverridden(`viewingMode`)?this._get(`viewingMode`):this.scene?.initialViewProperties?.viewingMode;return e==null?null:M(e)}getSpatialReferenceSupport(e,t){let n=this._predeterminedViewingMode,r=r=>this._validateSpatialReferenceForViewingMode(e,t,r)?this._makeSpatialReferenceConstraints(e,t,r,n):null,i=n?r(n):[...r(1)??[],...r(2)??[]];return i?.length?{constraints:i}:null}_validateSpatialReferenceForViewingMode(e,t,n){return Et(e,n)?t==null||E(t)?!0:!(D(t)&&mt(t,e,n)==null||O(t)&&n===1):!1}_makeSpatialReferenceConstraints(e,t,n,r){if(t==null)return[{spatialReference:e,viewingMode:n}];let{isWebMercator:i,isWGS84:a,vcsWkid:o,latestVcsWkid:s}=e,c=()=>o==null?i?w.WGS84:w.WebMercator:new w({...i?Oe:ke,vcsWkid:o,latestVcsWkid:s});return E(t)&&(i||a)?!(a&&r!==2)||ht(t.tileInfo,t.fullExtent,e,1)===null?[{spatialReference:e,viewingMode:n},{spatialReference:c(),viewingMode:n}]:[{spatialReference:c(),viewingMode:n}]:!D(t)&&!O(t)&&(i||a)?[{spatialReference:e,viewingMode:n},{spatialReference:c(),viewingMode:n}]:D(t)&&i&&n!==1?[{spatialReference:e,viewingMode:n},{spatialReference:c(),viewingMode:2}]:[{spatialReference:e,viewingMode:n}]}_validateSpatialReference(e){let t=this.getSpatialReferenceSupport(e)!=null,n=this._predeterminedViewingMode;return t||(n==null?e.isGeographic&&l.getLogger(this).warnOnce(`Spatial reference is geographic but not supported.`):l.getLogger(this).warnOnce(`Spatial reference defined on view not supported in ${j(n)} viewing mode.`)),t}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}trackGraphicState(e){if(!e.graphic)return l.getLogger(this).error(`trackGraphicState`,`GraphicState.graphic must not be null or undefined to start tracking`),null;let t=this.getViewForGraphic(e.graphic),n=null,r=!1,i=t=>{!r&&t!=null&&`processor`in t&&t.processor?.type===`graphics-3d`&&t.processor.graphicsCore&&(n=t.processor.graphicsCore.trackGraphicState(e))};return t==null?this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then(e=>i(e),()=>{}).catch(()=>{}):i(t),c(()=>{r=!0,n!=null&&(n.remove(),n=null)})}maskOccludee(e){if(!e)return l.getLogger(this).error(`maskOccludee`,`GraphicState.graphic must not be null or undefined to mask an occludee`),null;let t=this.getViewForGraphic(e),n=null,r=!1,i=t=>{!r&&t!=null&&Tt(t)&&(n=t.maskOccludee(e))};return t==null?this.whenViewForGraphic(e,{waitForLayer:!0}).then(e=>i(e),()=>{}).catch(()=>{}):i(t),c(()=>{r=!0,n!=null&&(n.remove(),n=null)})}getViewForGraphic(e){return e.layer===this?this.graphicsView:e.layer?this.allLayerViews.filter(e=>e.type!==`media-3d`).find(t=>t.layer===e.layer):null}graphicChanged(e){this.graphicsView!=null&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){return e.layer===this?(await ae(()=>this.graphicsView),this.graphicsView):!e.layer||!this.map?null:!t||!t.waitForLayer||this.map.allLayers.includes(e.layer)?this.whenLayerView(e.layer):new Promise((t,n)=>{let r=this.map.allLayers.on(`change`,i=>{i.added.includes(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,n))})})}enableFeatureTiles(){let e=Symbol();return this._featureTileTreeClients.add(e),c(()=>this._featureTileTreeClients.delete(e))}async _importModule(e,t){let n=new AbortController;this._importControllers.set(e,n),this._updatingChanged();try{let r=await It[e]();if(t&&(ne(this),d(n.signal),await t(n.signal)),this.destroyed)throw re();return d(n.signal),r}catch{return null}finally{this._importControllers.delete(e),this._updatingChanged()}}_abortImport(e){this._importControllers.get(e)?.abort(),this._importControllers.delete(e),this._updatingChanged()}_initBasemapTerrain(){this._set(`basemapTerrain`,new V({view:this})),this.elevationProvider.register(0,this.basemapTerrain)}_exitBasemapTerrain(){let{basemapTerrain:e,elevationProvider:t}=this;e&&(this._set(`basemapTerrain`,null),t.unregister(e),e.destroy())}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set(`pointsOfInterest`,new B({view:this})),this.addHandles([this.updatingHandles.add(()=>L.FEATURE_TILE_TREE_SHOW_TILES,e=>{e&&!this._featureTreeDebugger?this.updatingHandles.addPromise(import(`./3d/layers/support/FeatureTileTree3DDebugger.js`)).then(({FeatureTileTree3DDebugger:e})=>{!this._featureTreeDebugger&&L.FEATURE_TILE_TREE_SHOW_TILES&&(this._featureTreeDebugger=new e({view:this}))}):e||(this._featureTreeDebugger=u(this._featureTreeDebugger))},g),this.updatingHandles.add(()=>({basemapExtent:this.groundView?.groundExtent,basemapSpatialReference:this.groundView?.spatialReference,clippingArea:this.clippingArea,featureTiles:this._featureTiles}),({basemapExtent:e,basemapSpatialReference:t,clippingArea:n,featureTiles:r})=>{if(!r)return;let i=!!e;if(!n&&!i)r.filterExtent=null;else if(!i||!t)r.filterExtent=n;else{let i=e&&t?C(we(e,t),this.spatialReference):null;r.filterExtent=n?n.intersection(i):i}},g),this.updatingHandles.add(()=>this._featureTileTreeClients.size>0,e=>{e?this.updatingHandles.consumePromise(this._ensureFeatureTileTree()):this._featureTiles=u(this._featureTiles)},h)],Nt),this.stateManager.init()}async _ensureFeatureTileTree(){if(this._featureTiles||this._importControllers.has(`FeatureTileTree3D`))return;let e=(await this.updatingHandles.addPromise(this._importModule(`FeatureTileTree3D`)))?.FeatureTileTree3D;e&&(this._featureTiles=new e({renderCoordsHelper:this.renderCoordsHelper,pointsOfInterest:this.pointsOfInterest,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}),this._updatingChanged())}_exitTerrain(){this.stateManager.exit(),this.removeHandles(J),this.removeHandles(Nt),this._featureTiles=u(this.featureTiles),this._set(`pointsOfInterest`,u(this.pointsOfInterest)),this._exitBasemapTerrain(),this.state.reset(),this._exitCoordinateSystem()}_initCoordinateSystem(){if(this.spatialReference){let e=this.spatialReference,t=this.state.isGlobal,n=Ee(t,e);n!==this.renderSpatialReference&&(this.renderCoordsHelper.viewingMode=this.state.viewingMode,this.renderCoordsHelper.spatialReference=n,t||this.addHandles(p(()=>this.groundView?.groundExtent,e=>{let t=this.renderCoordsHelper.spatialReference;e!=null&&(e[0]!==0||e[1]!==0||e[2]!==0||e[3]!==0)&&Ce(e,this.groundView.spatialReference,$,t)&&(this.renderCoordsHelper.extent=$)},h),J),this.sceneIntersectionHelper?.setTolerance(H/this.renderCoordsHelper.unitInMeters))}}_exitCoordinateSystem(){this.removeHandles(J)}_updatingChanged(){this.notifyChange(`updating`)}_updateUpdatingMonitors(e=null){(e==null||e.type!==4)&&(this.removeHandles(`updatingMonitors`),this.allLayerViews.forEach(e=>{e.destroyed||(this.addHandles(p(()=>[e.updating,e.updatingProgress],()=>this._updatingChanged(),h),`updatingMonitors`),e.when(()=>this._updatingChanged(),()=>this._updatingChanged()))}),this._updatingChanged())}async _prepareScreenshotOverlay(){this.overlay&&await this.overlay.prepare()}_renderScreenshotOverlay(e,t,n){if(!this.overlay||!this.overlay.hasVisibleItems)return n;let r=e.getContext(`2d`,{willReadFrequently:!0});return r.putImageData(n,0,0),this.overlay.renderCanvas(e,{disableDecorations:t}),r.getImageData(0,0,n.width,n.height)}_initStage(){let e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,preserveDrawingBuffer:this.preserveDrawingBufferEnabled,canvas:this.renderCanvas,screenshot:{prepareOverlay:()=>this._prepareScreenshotOverlay(),renderOverlay:(e,t,n)=>this._renderScreenshotOverlay(e,t,n)}},t=new Qe(this.state.viewingMode,e=>this.stage.layers.forEach(e),this);this._set(`sceneIntersectionHelper`,t);let n=i(this.surface);this._stage=new vt({view:this,options:e,container:n}),this.notifyChange(`stage`),this._updateSlice(),this.addHandles([this.on(`pointer-move`,()=>this.stage?.renderer.resetAnimation()),o(this.stage.renderView.canvas,`webglcontextlost`,e=>{this.fatalError=new a(`webgl-context-lost`,e.statusMessage||`WebGL context lost`)})],`stage`),this.sceneIntersectionHelper.setTolerance(H/this.renderCoordsHelper.unitInMeters),this._set(`canvas`,this.stage.renderView.canvas)}_exitStage(){this.sceneIntersectionHelper?.destroy(),this._set(`sceneIntersectionHelper`,null),this._stage=u(this.stage),this._set(`stage`,null),this.removeHandles(`stage`),this._set(`canvas`,null)}_initSurface(){this._exitSurface(),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new dt({view:this,resourceController:this._resourceController})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitTerrain(),this._exitStage())}async _ensureGraphicsView(){if(this.graphicsView||this._importControllers.has(`GraphicsView3D`)||this.graphics.length===0)return;this.removeHandles(`GraphicsView3D`);let e=(await this.updatingHandles.addPromise(this._importModule(`GraphicsView3D`,e=>ae(()=>this.groundView?.ready,e))))?.default;e&&this._set(`graphicsView`,new e({view:this,getGraphics:()=>this.graphics})),this._updatingChanged()}_disposeGraphicsView(){this._abortImport(`GraphicsView3D`),this.removeHandles(`GraphicsView3D`),this.graphicsView&&(this.removeHandles(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set(`graphicsView`,null))}_disposeFocusAreasView(){this._abortImport(`FocusAreasView`),this.removeHandles(`FocusAreasView`),this.focusAreasView=u(this.focusAreasView)}async _ensureFocusAreasView(e){if(this.focusAreasView||this._importControllers.has(`FocusAreasView`)||e===0)return;this.removeHandles(`FocusAreasView`);let t=(await this.updatingHandles.addPromise(this._importModule(`FocusAreasView`)))?.FocusAreasView;t&&(this.focusAreasView=new t({view:this})),this._updatingChanged()}_startup(){M(this.viewingMode)===1&&(this._clippingArea=null),this._initSurface(),this._set(`ready`,!0),this.addHandles(f(()=>this.graphics,`after-changes`,()=>this._ensureGraphicsView()),`GraphicsView3D`),this._ensureGraphicsView(),this.addHandles(this.updatingHandles.add(()=>this.map?.focusAreas?.areas.length??0,e=>this._ensureFocusAreasView(e),{initial:!0}),`FocusAreasView`);let e=this.scene?.initialViewProperties??null,t=e?.environment;t&&(this._overrideDefaultEnvironmentOnly?me(this.environment,t):this.environment=this.environment.cloneWithWebsceneEnvironment(t)),this.timeExtent=e?.timeExtent,e?.analyses.applyTo(this),this.labeler.setup(),this.environmentView.connectView(this),this.inputManager.connect();let n=this._resolveWhenReady;this._resolveWhenReady=[],n.forEach(e=>e(this))}_teardown(){this.inputManager.disconnect(),this.environmentView.disconnectView(),this._overrideDefaultEnvironmentOnly=!1,this.labeler.dispose(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this._exitSurface(),this._set(`ready`,!1)}get _defaultToMapOptions(){let e={include:new Set};if(!this.map)return e;this.map.ground&&e.include.add(U);for(let t of this.allLayerViews)(k(t.layer)&&(!has(`enable-feature:im-as-ground`)||t.layer.isUsedAsGroundLayer)||je(t.layer))&&e.include.add(t.uid);return e}get _defaultHitTestOptions(){let e={exclude:new Set};if(!this.map)return e;this.map.ground&&this.map.ground.opacity<1&&e.exclude.add(U);for(let t of this.allLayerViews)(has(`enable-feature:im-as-ground`)?k(t.layer)&&t.layer.isUsedAsGroundLayer:k(t.layer))&&t.fullOpacity<1&&e.exclude.add(t.uid);return e}static{this.type=`3d`}static clearStatics(){Mt(),ge(),ue(),St(),Xe(),Ve(),Se(),wt(),Ne(),_t(),xt(),Ze(),$e(),ve(),se(),bt(),gt(),Ke.cleanupI3SLodHandling(),Me.cleanupTilemapCache(),I.cleanupViewstate(),V.cleanupTerrainSurface()}};e([_({nonNullable:!0}),v(Pt)],Y.prototype,`options`,void 0),e([_()],Y.prototype,`_userClippingArea`,void 0),e([_()],Y.prototype,`_resourceController`,void 0),e([_()],Y.prototype,`stage`,null),e([_({readOnly:!0})],Y.prototype,`deconflictor`,void 0),e([_({readOnly:!0})],Y.prototype,`labeler`,void 0),e([_()],Y.prototype,`navigation`,void 0),e([_({type:Re,readOnly:!0})],Y.prototype,`animation`,null),e([_({readOnly:!0})],Y.prototype,`basemapTerrain`,void 0),e([_({readOnly:!0})],Y.prototype,`overlayManager`,null),e([_({readOnly:!0})],Y.prototype,`elevationProvider`,void 0),e([_()],Y.prototype,`camera`,null),e([_({type:t})],Y.prototype,`contentCamera`,null),e([_({readOnly:!0})],Y.prototype,`canvas`,null),e([_({type:S,useTypeForAutocast:!1})],Y.prototype,`center`,null),e([_({type:x})],Y.prototype,`clippingArea`,null),e([_({type:P,nonNullable:!0})],Y.prototype,`constraints`,void 0),e([_({type:x,readOnly:!0})],Y.prototype,`renderDataExtent`,null),e([_({readOnly:!0})],Y.prototype,`tileInfo`,null),e([_({type:x,readOnly:!0})],Y.prototype,`dataExtent`,null),e([_({type:x,readOnly:!0})],Y.prototype,`_groundAndLayersExtent`,null),e([_({type:F})],Y.prototype,`environment`,null),e([v(`environment`)],Y.prototype,`castEnvironment`,null),e([_({readOnly:!0})],Y.prototype,`environmentView`,void 0),e([_({type:x})],Y.prototype,`extent`,null),e([_({type:r})],Y.prototype,`floors`,void 0),e([_()],Y.prototype,`screenCenter`,null),e([_()],Y.prototype,`frustum`,null),e([_({type:Number,readOnly:!0})],Y.prototype,`fullOpacity`,void 0),e([_({readOnly:!0})],Y.prototype,`graphicsView`,void 0),e([_()],Y.prototype,`analysisViewManager`,void 0),e([_()],Y.prototype,`groundView`,void 0),e([_({readOnly:!0})],Y.prototype,`layerviewCollections`,null),e([_({type:Boolean})],Y.prototype,`initialExtentRequired`,null),e([_()],Y.prototype,`defaultsFromMapSettings`,null),e([_()],Y.prototype,`interacting`,null),e([_()],Y.prototype,`stationary`,null),e([_()],Y.prototype,`navigating`,null),e([_()],Y.prototype,`map`,void 0),e([_()],Y.prototype,`padding`,null),e([_({type:B,readOnly:!0})],Y.prototype,`pointsOfInterest`,void 0),e([_()],Y.prototype,`_featureTiles`,void 0),e([_()],Y.prototype,`featureTiles`,null),e([_()],Y.prototype,`_featureTreeDebugger`,void 0),e([_({constructOnly:!0})],Y.prototype,`deactivatedWebGLExtensions`,void 0),e([_({constructOnly:!0})],Y.prototype,`debugWebGLExtensions`,void 0),e([_({constructOnly:!0})],Y.prototype,`renderCanvas`,void 0),e([_({constructOnly:!0})],Y.prototype,`state`,void 0),e([_()],Y.prototype,`screenSizePerspective`,void 0),e([_({readOnly:!0})],Y.prototype,`inputManager`,void 0),e([_({readOnly:!0})],Y.prototype,`stateManager`,void 0),e([_({type:[`low`,`medium`,`high`]})],Y.prototype,`qualityProfile`,null),e([_({type:z,get(){let e=this._get(`qualitySettings`);if(!e){let t=R(this.qualityProfile);e=new z(t)}return e}})],Y.prototype,`qualitySettings`,void 0),e([_()],Y.prototype,`slice`,void 0),e([_({readOnly:!0})],Y.prototype,`typeSpecificPreconditionsReady`,null),e([_({readOnly:!0})],Y.prototype,`sceneIntersectionHelper`,void 0),e([_({type:Number,readOnly:!0})],Y.prototype,`resolution`,null),e([_({type:Number})],Y.prototype,`scale`,null),e([_({readOnly:!0,type:Number})],Y.prototype,`terrainLevel`,null),e([_()],Y.prototype,`heightModelInfo`,null),e([_({type:w})],Y.prototype,`spatialReference`,void 0),e([_({type:Boolean,value:!1})],Y.prototype,`alphaCompositingEnabled`,null),e([_({constructOnly:!0})],Y.prototype,`preserveDrawingBufferEnabled`,void 0),e([_({type:Boolean})],Y.prototype,`supersampleScreenshotsEnabled`,void 0),e([_({readOnly:!0})],Y.prototype,`type`,void 0),e([_(),v(e=>e instanceof kt?e:b(At,e))],Y.prototype,`ui`,void 0),e([_({type:Boolean,readOnly:!0})],Y.prototype,`updating`,null),e([_()],Y.prototype,`_updatingObjects`,null),e([_()],Y.prototype,`_updatingObjectsWithProgress`,null),e([_()],Y.prototype,`_updatingObjectsToDebug`,null),e([_({type:Number,readOnly:!0})],Y.prototype,`updatingProgress`,void 0),e([_({type:[`global`,`local`]})],Y.prototype,`viewingMode`,null),e([_({type:n})],Y.prototype,`viewpoint`,null),e([_({readOnly:!0})],Y.prototype,`visibleArea`,null),e([_({type:Number})],Y.prototype,`zoom`,null),e([_({readOnly:!0})],Y.prototype,`quality`,null),e([_({readOnly:!0})],Y.prototype,`resolutionScale`,null),e([_()],Y.prototype,`focusAreasView`,void 0),e([_()],Y.prototype,`_defaultToMapOptions`,null),e([_()],Y.prototype,`_defaultHitTestOptions`,null),Y=q=e([pe(`esri.views.SceneView`)],Y);function X(e,t){return e!=null&&xe(e.spatialReference,t)?C(e,t):null}const Z=_e(),Q=le(),$=Te(),Ft=Ae(0,0,0,w.WebMercator),It={GraphicsView3D:()=>import(`./3d/layers/GraphicsView3D.js`),FocusAreasView:()=>import(`./3d/FocusAreasView.js`),FeatureTileTree3D:()=>import(`./3d/layers/support/FeatureTileTree3D.js`)},Lt=Y;export{Lt as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{removeUnordered as e,filterInPlace as t}from"../../core/arrayUtils.js";import n from"../../core/Handles.js";import"../../core/has.js";import r from"../../core/Logger.js";import{removeMaybe as i}from"../../core/maybe.js";import{recordPerformance as a}from"../../core/performance.js";import o from"../../core/PerformanceSampler.js";import{isAborted as s,createAbortError as c,when as l,isPromiseLike as u,ignoreAbortErrors as d}from"../../core/promiseUtils.js";import{watch as f,initial as p,when as m}from"../../core/reactiveUtils.js";import{signal as h}from"../../core/signal.js";import{Milliseconds as g}from"../../core/time.js";import _ from"./debugFlags.js";import{PromiseQueue as v}from"./PromiseQueue.js";import{Yield as y}from"./Yield.js";function b(){return new k}const x={RESOURCE_CONTROLLER_IMMEDIATE:`immediate`,RESOURCE_CONTROLLER:`schedule`,SLIDE:`slide`,STREAM_DATA_LOADER:`stream loader`,ELEVATION_QUERY:`elevation query`,TERRAIN_SURFACE:`terrain`,SURFACE_GEOMETRY_UPDATES:`surface geometry updates`,LOD_RENDERER:`LoD renderer`,GRAPHICS_CORE:`Graphics3D`,I3S:`I3S`,LYR3D:`Lyr3D`,TILES3D:`3DTiles`,POINT_CLOUD_LAYER:`point cloud`,FEATURE_TILE_FETCHER:`feature fetcher`,STREAM_CONTROLLER:`stream controller`,SCREEN_POLYGON_INTERSECTION:`screen polygon intersection`,OCCLUSION_QUERY:`occlusion query`,OVERLAY:`overlay`,OVERLAY_RENDERER:`overlay renderer`,STAGE:`stage`,GRAPHICS_DECONFLICTOR:`graphics deconflictor`,FILTER_VISIBILITY:`graphics filter visibility`,SCALE_VISIBILITY:`graphics scale visibility`,FRUSTUM_VISIBILITY:`graphics frustum visibility`,POINT_OF_INTEREST_FREQUENT:`POI frequent`,POINT_OF_INTEREST_INFREQUENT:`POI infrequent`,LABELER:`labeler`,FEATURE_QUERY_ENGINE:`feature query`,FEATURE_TILE_TREE:`feature tile tree`,FEATURE_TILE_TREE_ACTIVE:`fast feature tile tree`,ELEVATION_ALIGNMENT:`elevation alignment`,ELEVATION_ALIGNMENT_SCENE:`elevation alignment scene`,TEXT_TEXTURE_ATLAS:`text texture atlas`,TEXTURE_UNLOAD:`texture unload`,LINE_OF_SIGHT_TOOL:`line of sight tool`,LINE_OF_SIGHT_TOOL_INTERACTIVE:`interactive line of sight tool`,VOLUME_MEASUREMENT:`volume measurement`,ELEVATION_PROFILE:`elevation profile`,SNAPPING:`snapping`,SHADOW_ACCUMULATOR:`shadow accumulator`,CLOUDS_GENERATOR:`clouds generator`,FLOW_GENERATOR:`flow generator`,GAUSSIAN_SPLAT_SORTING:`gaussian splat sorting`,GAUSSIAN_SPLAT_TEXTURE_ATLAS:`gaussian splat texture atlas`,MAPVIEW_FETCH_QUEUE:`mapview fetch queue`,MAPVIEW_LAYERVIEW_UPDATE:`mapview layerview update`,MAPVIEW_VECTOR_TILE_PARSING_QUEUE:`mapview vector tile parsing queue`,NONE:0,TEST_PRIO:1},S=new Map([[x.RESOURCE_CONTROLLER_IMMEDIATE,0],[x.RESOURCE_CONTROLLER,4],[x.SLIDE,0],[x.STREAM_DATA_LOADER,0],[x.ELEVATION_QUERY,0],[x.TERRAIN_SURFACE,1],[x.SURFACE_GEOMETRY_UPDATES,1],[x.LOD_RENDERER,2],[x.GRAPHICS_CORE,2],[x.I3S,2],[x.LYR3D,2],[x.TILES3D,3],[x.POINT_CLOUD_LAYER,2],[x.FEATURE_TILE_FETCHER,2],[x.STREAM_CONTROLLER,2],[x.SCREEN_POLYGON_INTERSECTION,0],[x.CLOUDS_GENERATOR,2],[x.OCCLUSION_QUERY,2],[x.OVERLAY,4],[x.OVERLAY_RENDERER,4],[x.STAGE,4],[x.GRAPHICS_DECONFLICTOR,4],[x.FILTER_VISIBILITY,4],[x.SCALE_VISIBILITY,4],[x.FRUSTUM_VISIBILITY,4],[x.POINT_OF_INTEREST_FREQUENT,6],[x.POINT_OF_INTEREST_INFREQUENT,30],[x.LABELER,8],[x.FEATURE_QUERY_ENGINE,8],[x.FEATURE_TILE_TREE,16],[x.FEATURE_TILE_TREE_ACTIVE,0],[x.ELEVATION_ALIGNMENT,12],[x.ELEVATION_ALIGNMENT_SCENE,14],[x.TEXT_TEXTURE_ATLAS,12],[x.TEXTURE_UNLOAD,12],[x.LINE_OF_SIGHT_TOOL,16],[x.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[x.VOLUME_MEASUREMENT,4],[x.SNAPPING,0],[x.SHADOW_ACCUMULATOR,30],[x.FLOW_GENERATOR,12],[x.GAUSSIAN_SPLAT_SORTING,2],[x.GAUSSIAN_SPLAT_TEXTURE_ATLAS,12],[x.MAPVIEW_FETCH_QUEUE,0],[x.MAPVIEW_LAYERVIEW_UPDATE,2],[x.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,0]]);function C(e){return S.has(e)?S.get(e):typeof e==`number`?e:1}const w=g(6.5),T=g(1),E=g(30),D=g(1e3/30),O=g(100);class k{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some(e=>e.needsUpdate)}constructor(){this._updating=h(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new o(`total`),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new j,this.state=1,this._tasks=[],this._runQueue=[],this._load=0,this._forceTask=!1,this._debug=!1,this._debugHandle=f(()=>_.SCHEDULER_LOG_SLOW_TASKS,e=>this._debug=e,p);for(let e of Object.keys(x))this.performanceInfo.tasks.set(x[e],new o(String(x[e])))}destroy(){this._tasks.forEach(e=>e.remove()),this._tasks.length=0,this._runQueue.length=0,i(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask(()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this._runFrame())}))}registerTask(e,t){let n=new A(this,e,t);return this._tasks.push(n),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new o(e)),n}get load(){return this._load}frame(e){if(this._startFrameTaskTimes(),this._updateBudget(e)){let e=this._budget.now();this._runFrame();let t=this._budget.now();this._recordFrameTaskTimes(t-e);let n=this.state===2?`Idle`:this.state===1?`Interacting`:`Animating`;return a(`${n} Frame Tasks`,e,t,`Maps SDK`,`Scheduling`),!0}return this._recordFrameTaskTimes(0),!1}_updateBudget(e){this._test&&(this._test.usedBudget=0),++this._frameNumber;let t=w,n=e.frameDuration,r=T;switch(this.state){case 2:t=g(0),n=g(Math.max(O,e.frameDuration)),r=E;break;case 1:n=g(Math.max(D,e.frameDuration))}return n=g(n-e.elapsedFrameTime-t),this.state!==2&&n<T&&!this._forceTask?(this._forceTask=!0,!1):(n=g(Math.max(n,r)),this._budget.reset(n),this._updateLoad(),this._schedule())}_runFrame(){this._forceTask=!1,this._microTaskQueued=!1,this._run(),this._test&&(this._test.usedBudget=this._budget.elapsed)}stopFrame(){this._budget.reset(g(0)),this._budget.madeProgress()}removeTask(t){e(this._tasks,t),e(this._runQueue,t),this._updatingChanged()}_updateTask(e){this._tasks.forEach(t=>{t.name===e&&t.setPriority(e)})}_getState(e){if(this._runQueue.some(t=>t.name===e))return`s`;let t=`i`;return this._tasks.forEach(n=>{n.name===e&&n.needsUpdate&&(n.schedulePriority<=1?t=`r`:t!==`r`&&(t=`w`))}),t}_getRuntime(e){let t=0;return this._tasks.forEach(n=>{n.name===e&&(t+=n.runtime)}),t}_resetRuntimes(){this._tasks.forEach(e=>e.runtime=0)}_getRunning(){let e=new Map;if(this._tasks.forEach(t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)}),e.size===0)return null;let t=``;return e.forEach((e,n)=>{t+=e>1?` ${e}x ${n}`:` ${n}`}),t}_updateLoad(){let e=this._tasks.reduce((e,t)=>t.needsUpdate?++e:e,0);this._load=this._load*.9+e*.09999999999999998}_schedule(){for(t(this._runQueue,e=>e.needsUpdate?!0:(e.schedulePriority=e.basePriority,!1)),this._tasks.forEach(e=>{e.basePriority===0&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)});this._runQueue.length===0;){let e=!1,t=0;if(this._tasks.forEach(n=>{if(n.needsUpdate&&n.schedulePriority!==0&&n.basePriority!==0&&n.blockFrame!==this._frameNumber)switch(e=!0,t=Math.max(t,n.basePriority),n.schedulePriority){case 1:n.schedulePriority=0,this._runQueue.push(n);break;default:--n.schedulePriority}}),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){do for(;this._runQueue.length>0;){let e=this._budget.now(),t=this._runQueue.pop();this._budget.resetProgress();try{t.task.runTask(this._budget)===y&&(t.blockFrame=this._frameNumber)}catch(e){r.getLogger(`esri.views.support.Scheduler`).error(`Exception in task "${t.name}"`,e),t.blockFrame=this._frameNumber}!this._budget.hasProgressed&&t.blockFrame!==this._frameNumber&&t.needsUpdate&&(t.name,x.I3S,t.blockFrame=this._frameNumber),t.schedulePriority=t.basePriority;let n=this._budget.now(),i=n-e;if(a(`${t.name}`,e,n,`Maps SDK`,`Scheduling`),t.runtime+=i,this._frameTaskTimes.set(t.priority,this._frameTaskTimes.get(t.priority)+i),this._budget.remaining<=0){this._updatingChanged();return}}while(this._schedule());this._updatingChanged()}_startFrameTaskTimes(){for(let e of Object.keys(x))this._frameTaskTimes.set(x[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach((e,t)=>this.performanceInfo.tasks.get(t).push(e)),this.performanceInfo.total.push(e)}get test(){return this._test}}class A{get task(){return this._task.value}get readyToRun(){return this._queue.readyToRun}get updating(){return this._queue.updating}constructor(e,t,r){this._scheduler=e,this.name=t,this.blockFrame=0,this.runtime=0,this._queue=new v,this._handles=new n,this._basePriority=C(t),this.schedulePriority=this._basePriority,this._task=h(r??this._queue),this._handles.add(m(()=>this.task.readyToRun,t=>e.taskRunningChanged(t)))}remove(){this._queue.drain(M),this._scheduler.removeTask(this),this.schedule=F.schedule,this.reschedule=F.reschedule,this.scheduleGenerator=F.scheduleGenerator,this._handles.destroy()}[Symbol.dispose](){this.remove()}get basePriority(){return this._basePriority}setPriority(e){if(this.name===e)return;this.name=e;let t=C(e);(this._basePriority===0||this.schedulePriority!==0)&&(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.readyToRun||!this.task.destroyed&&this.task.readyToRun}schedule(e,t,n){return this._queue.push(e,t,n)}reschedule(e,t,n){return this._queue.unshift(e,t,n)}scheduleGenerator(e,t,n){return this._queue.pushGenerator(e,t,n)}processQueue(e){return this._queue.runTask(e)}}class j{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(e()===!0&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}const M=new j;M.enabled=!1;function N(e){let t=new j;return t.reset(e),t}class P{remove(){}[Symbol.dispose](){this.remove()}processQueue(){}schedule(e,t,n){try{if(s(t)){let e=c();return n?Promise.resolve(n(e)):Promise.reject(e)}return l(e(M))}catch(e){return Promise.reject(e)}}reschedule(e,t,n){return this.schedule(e,t,n)}async scheduleGenerator(e,t,n){if(s(t)){let e=c();if(n)return n(e);throw e}let r=e(M);for(;;){let e=r.next(M),i=u(e)?await e:e;if(s(t)){let e=c();if(n){let t=n(e),i=r.return(null);return u(i)&&await d(i),t}let t=r.throw(e);throw u(t)&&await d(t),e}if(i.done)return i.value}}}const F=new P;export{F as ImmediateTask,x as TaskPriority,C as getTaskPriority,N as makeBudget,b as newScheduler,M as noBudget,S as taskPriorities};
2
+ import{removeUnordered as e,filterInPlace as t}from"../../core/arrayUtils.js";import n from"../../core/Handles.js";import"../../core/has.js";import r from"../../core/Logger.js";import{removeMaybe as i}from"../../core/maybe.js";import{recordPerformance as a}from"../../core/performance.js";import o from"../../core/PerformanceSampler.js";import{isAborted as s,createAbortError as c,when as l,isPromiseLike as u,ignoreAbortErrors as d}from"../../core/promiseUtils.js";import{watch as f,initial as p,when as m}from"../../core/reactiveUtils.js";import{signal as h}from"../../core/signal.js";import{Milliseconds as g}from"../../core/time.js";import _ from"./debugFlags.js";import{PromiseQueue as v}from"./PromiseQueue.js";import{Yield as y}from"./Yield.js";function b(){return new k}const x={RESOURCE_CONTROLLER_IMMEDIATE:`immediate`,RESOURCE_CONTROLLER:`schedule`,SLIDE:`slide`,STREAM_DATA_LOADER:`stream loader`,ELEVATION_QUERY:`elevation query`,TERRAIN_SURFACE:`terrain`,SURFACE_GEOMETRY_UPDATES:`surface geometry updates`,LOD_RENDERER:`LoD renderer`,GRAPHICS_CORE:`Graphics3D`,I3S:`I3S`,LYR3D:`Lyr3D`,TILES3D:`3DTiles`,POINT_CLOUD_LAYER:`point cloud`,FEATURE_TILE_FETCHER:`feature fetcher`,STREAM_CONTROLLER:`stream controller`,SCREEN_POLYGON_INTERSECTION:`screen polygon intersection`,OCCLUSION_QUERY:`occlusion query`,OVERLAY:`overlay`,OVERLAY_RENDERER:`overlay renderer`,STAGE:`stage`,GRAPHICS_DECONFLICTOR:`graphics deconflictor`,FILTER_VISIBILITY:`graphics filter visibility`,SCALE_VISIBILITY:`graphics scale visibility`,FRUSTUM_VISIBILITY:`graphics frustum visibility`,POINT_OF_INTEREST_FREQUENT:`POI frequent`,POINT_OF_INTEREST_INFREQUENT:`POI infrequent`,LABELER:`labeler`,FEATURE_QUERY_ENGINE:`feature query`,FEATURE_TILE_TREE:`feature tile tree`,FEATURE_TILE_TREE_ACTIVE:`fast feature tile tree`,ELEVATION_ALIGNMENT:`elevation alignment`,ELEVATION_ALIGNMENT_SCENE:`elevation alignment scene`,TEXT_TEXTURE_ATLAS:`text texture atlas`,TEXTURE_UNLOAD:`texture unload`,LINE_OF_SIGHT_TOOL:`line of sight tool`,LINE_OF_SIGHT_TOOL_INTERACTIVE:`interactive line of sight tool`,VOLUME_MEASUREMENT:`volume measurement`,ELEVATION_PROFILE:`elevation profile`,SNAPPING:`snapping`,SHADOW_ACCUMULATOR:`shadow accumulator`,CLOUDS_GENERATOR:`clouds generator`,FLOW_GENERATOR:`flow generator`,GAUSSIAN_SPLAT_SORTING:`gaussian splat sorting`,GAUSSIAN_SPLAT_TEXTURE_ATLAS:`gaussian splat texture atlas`,MAPVIEW_FETCH_QUEUE:`mapview fetch queue`,MAPVIEW_LAYERVIEW_UPDATE:`mapview layerview update`,MAPVIEW_VECTOR_TILE_PARSING_QUEUE:`mapview vector tile parsing queue`,NONE:0,TEST_PRIO:1},S=new Map([[x.RESOURCE_CONTROLLER_IMMEDIATE,0],[x.RESOURCE_CONTROLLER,4],[x.SLIDE,0],[x.STREAM_DATA_LOADER,0],[x.ELEVATION_QUERY,0],[x.TERRAIN_SURFACE,1],[x.SURFACE_GEOMETRY_UPDATES,1],[x.LOD_RENDERER,2],[x.GRAPHICS_CORE,2],[x.I3S,2],[x.LYR3D,2],[x.TILES3D,3],[x.POINT_CLOUD_LAYER,2],[x.FEATURE_TILE_FETCHER,2],[x.STREAM_CONTROLLER,2],[x.SCREEN_POLYGON_INTERSECTION,0],[x.CLOUDS_GENERATOR,2],[x.OCCLUSION_QUERY,2],[x.OVERLAY,4],[x.OVERLAY_RENDERER,4],[x.STAGE,4],[x.GRAPHICS_DECONFLICTOR,4],[x.FILTER_VISIBILITY,4],[x.SCALE_VISIBILITY,4],[x.FRUSTUM_VISIBILITY,4],[x.POINT_OF_INTEREST_FREQUENT,6],[x.POINT_OF_INTEREST_INFREQUENT,30],[x.LABELER,8],[x.FEATURE_QUERY_ENGINE,8],[x.FEATURE_TILE_TREE,16],[x.FEATURE_TILE_TREE_ACTIVE,0],[x.ELEVATION_ALIGNMENT,12],[x.ELEVATION_ALIGNMENT_SCENE,14],[x.TEXT_TEXTURE_ATLAS,12],[x.TEXTURE_UNLOAD,12],[x.LINE_OF_SIGHT_TOOL,16],[x.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[x.VOLUME_MEASUREMENT,4],[x.SNAPPING,0],[x.SHADOW_ACCUMULATOR,30],[x.FLOW_GENERATOR,12],[x.GAUSSIAN_SPLAT_SORTING,2],[x.GAUSSIAN_SPLAT_TEXTURE_ATLAS,12],[x.MAPVIEW_FETCH_QUEUE,0],[x.MAPVIEW_LAYERVIEW_UPDATE,2],[x.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,0]]);function C(e){return S.has(e)?S.get(e):typeof e==`number`?e:1}const w=g(6.5),T=g(1),E=g(30),D=g(1e3/30),O=g(100);class k{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some(e=>e.needsUpdate)}constructor(){this._updating=h(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new o(`total`),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new j,this.state=1,this._tasks=[],this._runQueue=[],this._load=0,this._forceTask=!1,this._debug=!1,this._debugHandle=f(()=>_.SCHEDULER_LOG_SLOW_TASKS,e=>this._debug=e,p);for(let e of Object.keys(x))this.performanceInfo.tasks.set(x[e],new o(String(x[e])))}destroy(){this._tasks.forEach(e=>e.remove()),this._tasks.length=0,this._runQueue.length=0,i(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask(()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this._runFrame())}))}registerTask(e,t){let n=new A(this,e,t);return this._tasks.push(n),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new o(e)),n}get load(){return this._load}frame(e){if(this._startFrameTaskTimes(),this._updateBudget(e)){let e=this._budget.now();this._runFrame();let t=this._budget.now();this._recordFrameTaskTimes(t-e);let n=this.state===2?`Idle`:this.state===1?`Interacting`:`Animating`;return a(`${n} Frame Tasks`,e,t,`Maps SDK`,`Scheduling`),!0}return this._recordFrameTaskTimes(0),!1}_updateBudget(e){this._test&&(this._test.usedBudget=0),++this._frameNumber;let t=w,n=e.frameDuration,r=T;switch(this.state){case 2:t=g(0),n=g(Math.max(O,e.frameDuration)),r=E;break;case 1:n=g(Math.max(D,e.frameDuration))}return n=g(n-e.elapsedFrameTime-t),this.state!==2&&n<T&&!this._forceTask?(this._forceTask=!0,!1):(n=g(Math.max(n,r)),this._budget.reset(n),this._updateLoad(),this._schedule())}_runFrame(){this._forceTask=!1,this._microTaskQueued=!1,this._run(),this._test&&(this._test.usedBudget=this._budget.elapsed)}stopFrame(){this._budget.reset(g(0)),this._budget.madeProgress()}removeTask(t){e(this._tasks,t),e(this._runQueue,t),this._updatingChanged()}_updateTask(e){this._tasks.forEach(t=>{t.name===e&&t.setPriority(e)})}_getState(e){if(this._runQueue.some(t=>t.name===e))return`s`;let t=`i`;return this._tasks.forEach(n=>{n.name===e&&n.needsUpdate&&(n.schedulePriority<=1?t=`r`:t!==`r`&&(t=`w`))}),t}_getRuntime(e){let t=0;return this._tasks.forEach(n=>{n.name===e&&(t+=n.runtime)}),t}_resetRuntimes(){this._tasks.forEach(e=>e.runtime=0)}_getRunning(){let e=new Map;if(this._tasks.forEach(t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)}),e.size===0)return null;let t=``;return e.forEach((e,n)=>{t+=e>1?` ${e}x ${n}`:` ${n}`}),t}_updateLoad(){let e=this._tasks.reduce((e,t)=>t.needsUpdate?++e:e,0);this._load=this._load*.9+e*.09999999999999998}_schedule(){for(t(this._runQueue,e=>e.needsUpdate?!0:(e.schedulePriority=e.basePriority,!1)),this._tasks.forEach(e=>{e.basePriority===0&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)});this._runQueue.length===0;){let e=!1,t=0;if(this._tasks.forEach(n=>{if(n.needsUpdate&&n.schedulePriority!==0&&n.basePriority!==0&&n.blockFrame!==this._frameNumber)switch(e=!0,t=Math.max(t,n.basePriority),n.schedulePriority){case 1:n.schedulePriority=0,this._runQueue.push(n);break;default:--n.schedulePriority}}),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){do for(;this._runQueue.length>0;){let e=this._budget.now(),t=this._runQueue.pop();this._budget.resetProgress();try{t.task.runTask(this._budget)===y&&(t.blockFrame=this._frameNumber)}catch(e){r.getLogger(`esri.views.support.Scheduler`).error(`Exception in task "${t.name}"`,e),t.blockFrame=this._frameNumber}!this._budget.hasProgressed&&t.blockFrame!==this._frameNumber&&t.needsUpdate&&(t.name,x.I3S,t.blockFrame=this._frameNumber),t.schedulePriority=t.basePriority;let n=this._budget.now(),i=n-e;if(a(`${t.name}`,e,n,`Maps SDK`,`Scheduling`),t.runtime+=i,this._frameTaskTimes.set(t.priority,this._frameTaskTimes.get(t.priority)+i),this._budget.remaining<=0){this._updatingChanged();return}}while(this._schedule());this._updatingChanged()}_startFrameTaskTimes(){for(let e of Object.keys(x))this._frameTaskTimes.set(x[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach((e,t)=>this.performanceInfo.tasks.get(t).push(e)),this.performanceInfo.total.push(e)}get test(){return this._test}}class A{get task(){return this._task.value}get readyToRun(){return this._queue.readyToRun}get updating(){return this._queue.updating}constructor(e,t,r){this._scheduler=e,this.name=t,this.blockFrame=0,this.runtime=0,this._queue=new v,this._handles=new n,this._basePriority=C(t),this.schedulePriority=this._basePriority,this._task=h(r??this._queue),this._handles.add(m(()=>this.task.readyToRun,t=>e.taskRunningChanged(t)))}remove(){this._queue.drain(M),this._scheduler.removeTask(this),this.schedule=F.schedule,this.reschedule=F.reschedule,this.scheduleGenerator=F.scheduleGenerator,this._handles.destroy()}[Symbol.dispose](){this.remove()}get basePriority(){return this._basePriority}setPriority(e){if(this.name===e)return;this.name=e;let t=C(e);(this._basePriority===0||this.schedulePriority!==0)&&(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.readyToRun||!this.task.destroyed&&this.task.readyToRun}schedule(e,t,n){return this._queue.push(e,t,n)}reschedule(e,t,n){return this._queue.unshift(e,t,n)}scheduleGenerator(e,t,n){return this._queue.pushGenerator(e,t,n)}processQueue(e){return this._queue.runTask(e)}}class j{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(e()===!0&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this._enabled&&this._budget!==1/0&&this.elapsed>=this._budget,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}const M=new j;M.enabled=!1;function N(e){let t=new j;return t.reset(e),t}class P{remove(){}[Symbol.dispose](){this.remove()}processQueue(){}schedule(e,t,n){try{if(s(t)){let e=c();return n?Promise.resolve(n(e)):Promise.reject(e)}return l(e(M))}catch(e){return Promise.reject(e)}}reschedule(e,t,n){return this.schedule(e,t,n)}async scheduleGenerator(e,t,n){if(s(t)){let e=c();if(n)return n(e);throw e}let r=e(M);for(;;){let e=r.next(M),i=u(e)?await e:e;if(s(t)){let e=c();if(n){let t=n(e),i=r.return(null);return u(i)&&await d(i),t}let t=r.throw(e);throw u(t)&&await d(t),e}if(i.done)return i.value}}}const F=new P;export{F as ImmediateTask,x as TaskPriority,C as getTaskPriority,N as makeBudget,b as newScheduler,M as noBudget,S as taskPriorities};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{isArrayLike as e}from"../../core/arrayUtils.js";import has from"../../core/has.js";import t from"../../core/Logger.js";import{createAbortError as n}from"../../core/promiseUtils.js";import{Milliseconds as r}from"../../core/time.js";import{isUint8Array as i,isUint16Array as a,isUint32Array as o}from"../../core/typedArrayUtil.js";import{checkWebGLError as s}from"./checkWebGLError.js";import{ResourceType as c,DataType as l}from"./enums.js";const u=()=>t.getLogger(`esri.views.webgl.BufferObject`),d=null,f=!!has(`esri-tests-disable-gpu-memory-measurements`);class p{static createIndex(e,t,n){return new p(e,34963,t,n)}static createUniform(e,t,n){return new p(e,35345,t,n)}static createPixelPack(e,t=35041,n){let r=new p(e,35051,t);return n&&r.setSize(n),r}static createPixelUnpack(e,t=35040,n){return new p(e,35052,t,n)}static createTransformFeedback(e,t=35044,n){let r=new p(e,35982,t);return r.setSize(n),r}constructor(e,t,n,r){this._context=e,this.bufferType=t,this.usage=n,this._glName=null,this._sizeBytes=-1,this._indexType=void 0,e.instanceCounter.increment(c.BufferObject,this),this._glName=this._context.gl.createBuffer(),s(this._context.gl),r&&this.setData(r)}get glName(){return this._glName}get size(){if(this.bufferType===34963)switch(this._indexType){case l.UNSIGNED_INT:return this._sizeBytes/4;case l.UNSIGNED_SHORT:return this._sizeBytes/2;case l.UNSIGNED_BYTE:case void 0:case null:break;default:this._indexType}return this._sizeBytes}get indexType(){return this._indexType}get sizeBytes(){return this._sizeBytes}get usedMemory(){return f?0:this.sizeBytes}get _isVAOAware(){return this.bufferType===34963||this.bufferType===34962}dispose(){this._context?.gl?(this._glName&&=(this._context.gl.deleteBuffer(this._glName),null),this._context.instanceCounter.decrement(c.BufferObject,this),this._context=null):this._glName&&u().warn(`Leaked WebGL buffer object`)}setSize(e,t=null){if(this.bufferType===34963&&t!=null)switch(this._indexType=t,t){case l.UNSIGNED_SHORT:e*=2;break;case l.UNSIGNED_INT:e*=4;break;case l.UNSIGNED_BYTE:}this._setBufferData(e)}setData(e){if(!e)return;let t=e.byteLength;this.bufferType===34963&&(i(e)?this._indexType=l.UNSIGNED_BYTE:a(e)?this._indexType=l.UNSIGNED_SHORT:o(e)&&(this._indexType=l.UNSIGNED_INT)),this._setBufferData(t,e)}setIndexType(e){this.bufferType===34963&&(this._indexType=e)}_setBufferData(e,t=null){this._sizeBytes=e;let n=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);let r=this._context.gl;t==null?r.bufferData(this.bufferType,e,this.usage):r.bufferData(this.bufferType,t,this.usage),s(r),this._isVAOAware&&this._context.bindVAO(n)}setSubData(e,t,n,r){if(!e)return;let i=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);let{gl:a}=this._context;a.bufferSubData(this.bufferType,t*e.BYTES_PER_ELEMENT,e,n,r-n),s(a),this._isVAOAware&&this._context.bindVAO(i)}getSubData(e,t=0,n,r){if(n<0||r<0)return;let i=m(e)?e.BYTES_PER_ELEMENT:1;if(i*((n??0)+(r??0))>e.byteLength)return;t+i*(r??0)>this.usedMemory&&u().warn(`Potential problem getting subdata: requested data exceeds buffer size!`);let a=this._context.gl;this.bufferType===35982?(this._context.bindBuffer(this,35982),a.getBufferSubData(35982,t,e,n,r),this._context.unbindBuffer(35982)):(this._context.bindBuffer(this,36662),a.getBufferSubData(36662,t,e,n,r),this._context.unbindBuffer(36662))}async getSubDataAsync(e,t=0,i,a,o){if(await this._context.clientWaitAsync(r(10),o),!this._context||!this._glName)throw n();this.getSubData(e,t,i,a)}}function m(t){return e(t)}export{p as BufferObject,d as tracer};
2
+ import{isArrayLike as e}from"../../core/arrayUtils.js";import has from"../../core/has.js";import t from"../../core/Logger.js";import{createAbortError as n}from"../../core/promiseUtils.js";import{Milliseconds as r}from"../../core/time.js";import{isUint8Array as i,isUint16Array as a,isUint32Array as o}from"../../core/typedArrayUtil.js";import{checkWebGLError as s}from"./checkWebGLError.js";import{ResourceType as c,DataType as l}from"./enums.js";const u=()=>t.getLogger(`esri.views.webgl.BufferObject`),d=null,f=!!has(`esri-tests-disable-gpu-memory-measurements`);class p{static createIndex(e,t,n){return new p(e,34963,t,n)}static createUniform(e,t,n){return new p(e,35345,t,n)}static createPixelPack(e,t=35041,n){let r=new p(e,35051,t);return n&&r.setSize(n),r}static createPixelUnpack(e,t=35040,n){return new p(e,35052,t,n)}static createTransformFeedback(e,t=35044,n){let r=new p(e,35982,t);return r.setSize(n),r}constructor(e,t,n,r){this._context=e,this.bufferType=t,this.usage=n,this._glName=null,this._sizeBytes=-1,this._indexType=void 0,e.instanceCounter.increment(c.BufferObject,this),this._glName=this._context.gl.createBuffer(),s(this._context.gl),r&&this.setData(r)}get glName(){return this._glName}get size(){if(this.bufferType===34963)switch(this._indexType){case l.UNSIGNED_INT:return this._sizeBytes/4;case l.UNSIGNED_SHORT:return this._sizeBytes/2;case l.UNSIGNED_BYTE:case void 0:case null:break;default:this._indexType}return this._sizeBytes}get indexType(){return this._indexType}get sizeBytes(){return this._sizeBytes}get usedMemory(){return f?0:this.sizeBytes}get _isVAOAware(){return this.bufferType===34963||this.bufferType===34962}dispose(){this._context?.gl?(this._glName&&=(this._context.gl.deleteBuffer(this._glName),null),this._context.instanceCounter.decrement(c.BufferObject,this),this._context=null):this._glName&&u().warn(`Leaked WebGL buffer object`)}setSize(e,t=null){if(this.bufferType===34963&&t!=null)switch(this._indexType=t,t){case l.UNSIGNED_SHORT:e*=2;break;case l.UNSIGNED_INT:e*=4;break;case l.UNSIGNED_BYTE:}this._setBufferData(e)}setData(e){if(!e)return;let t=e.byteLength;this.bufferType===34963&&(i(e)?this._indexType=l.UNSIGNED_BYTE:a(e)?this._indexType=l.UNSIGNED_SHORT:o(e)&&(this._indexType=l.UNSIGNED_INT)),this._setBufferData(t,e)}setIndexType(e){this.bufferType===34963&&(this._indexType=e)}_setBufferData(e,t=null){this._sizeBytes=e;let n=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);let r=this._context.gl;t==null?r.bufferData(this.bufferType,e,this.usage):r.bufferData(this.bufferType,t,this.usage),s(r),this._isVAOAware&&this._context.bindVAO(n)}setSubData(e,t,n,r){if(!e)return;let i=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);let{gl:a}=this._context;a.bufferSubData(this.bufferType,t*e.BYTES_PER_ELEMENT,e,n,r-n),s(a),this._isVAOAware&&this._context.bindVAO(i)}getSubData(e,t=0,n,r){if(n<0||r<0)return;let i=m(e)?e.BYTES_PER_ELEMENT:1;if(i*((n??0)+(r??0))>e.byteLength)return;t+i*(r??0)>this.usedMemory&&u().warn(`Potential problem getting subdata: requested data exceeds buffer size!`);let a=this._context.gl,o=this.bufferType===35982?35982:36662;this._context.bindBuffer(this,o);try{a.getBufferSubData(o,t,e,n,r)}finally{this._context.unbindBuffer(o)}}async getSubDataAsync(e,t=0,i,a,o){if(await this._context.clientWaitAsync(r(10),o),!this._context||!this._glName)throw n();this.getSubData(e,t,i,a)}}function m(t){return e(t)}export{p as BufferObject,d as tracer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"../../core/Logger.js";import{disposeMaybe as t}from"../../core/maybe.js";import{BufferObject as n}from"./BufferObject.js";import{webglDebugEnabled as r}from"./checkWebGLError.js";import{ResourceType as i,ColorAttachment0 as a,PixelType as o,StencilAttachment as s,SizedDepthStencilFormat as c,DepthStencilAttachment as l,SizedDepthFormat as u,DepthAttachment as d}from"./enums.js";import{Renderbuffer as f}from"./Renderbuffer.js";import p from"./Texture.js";const m=()=>e.getLogger(`esri.views.webgl.FramebufferObject`);class h{constructor(e,t,n){if(this._context=e,this._level=0,this._glName=null,this._colorAttachments=new Map,this._depthStencilBuffer=null,this._depthStencilTexture=null,e.instanceCounter.increment(i.FramebufferObject,this),t!=null){let n=C(e,t);n!=null&&(this._colorAttachments.set(a,n),_(n)?this._validateTextureDescriptor(n.descriptor):this._validateRenderbufferDescriptor(n.descriptor)),this._validateColorAttachmentPoint(a)}if(n!=null){if(y(n))this._depthStencilTexture=_(n)?n:new p(e,n),this._validateTextureDescriptor(this._depthStencilTexture.descriptor);else{let t=v(n)?n:new f(e,n);this._depthStencilBuffer=t,this._validateRenderbufferDescriptor(t.descriptor)}}}get glName(){return this._glName}get colorTexture(){let e=this._colorAttachments.get(a);return _(e)?e:null}get depthStencil(){return this._depthStencilTexture||this._depthStencilBuffer}get depthStencilTexture(){return this._depthStencilTexture}get width(){return(this._colorAttachments.get(a)??this._depthStencilTexture??this._depthStencilBuffer)?.descriptor?.width??0}get height(){return(this._colorAttachments.get(a)??this._depthStencilTexture??this._depthStencilBuffer)?.descriptor?.height??0}get usedMemory(){return this._colorAttachments.values().reduce((e,t)=>e+t.usedMemory,this.depthStencil?.usedMemory??0)}get level(){return this._level}set level(e){this._level!==e&&(this._level=e,this._glName&&this._context.temporaryBindFramebuffer(this,()=>this._initializeAttachments()))}static{this._MAX_COLOR_ATTACHMENTS=-1}getColorTexture(e){let t=this._colorAttachments.get(e);return!t||!_(t)?null:t}get colorAttachments(){return Array.from(this._colorAttachments.keys())}attachColorTexture(e,t=a){if(!e)return;this._validateColorAttachmentPoint(t);let{descriptor:n}=e;this._validateTextureDescriptor(n),this.detachColorTexture(t)?.dispose(),this._colorAttachments.set(t,e),this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,t))}detachColorTexture(e=a){let t=this._colorAttachments.get(e);if(!t)return;let n=_(t);return this._glName&&this._context.temporaryBindFramebuffer(this,()=>{if(n)this._framebufferTexture2D(null,e);else{let t=this._context.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)}}),this._colorAttachments.delete(e),n?t:void 0}detachColorTextures(...e){if(e.length!==0){if(this._glName){let t=this._context.gl;this._context.temporaryBindFramebuffer(this,()=>{e.forEach(e=>{_(this._colorAttachments.get(e))?this._framebufferTexture2D(null,e):t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)})})}e.forEach(e=>this._colorAttachments.delete(e))}}setColorTextureTarget(e,t=a,n=0){let r=this._colorAttachments.get(t);r&&(e===35866?this._framebufferTextureLayer(r.glName,t,36160,n):this._framebufferTexture2D(r.glName,t,e,36160))}attachDepthStencil(e){if(e)switch(e.type){case 1:return this._attachDepthStencilTexture(e);case 2:return this._attachDepthStencilBuffer(e)}}_attachDepthStencilTexture(e){if(e==null)return;let{descriptor:t}=e,{pixelFormat:n,dataType:r}=t;n!==34041&&n!==6402?console.error(`Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!`):n===34041&&r!==o.UNSIGNED_INT_24_8?console.error(`Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!`):n===6402&&r!==o.UNSIGNED_INT&&r!==o.UNSIGNED_SHORT?console.error(`Depth texture must have data type of UNSIGNED_INT or UNSIGNED_SHORT!`):(this._validateTextureDescriptor(t),this._disposeDepthStencilAttachments(),this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,E(n))),this._depthStencilTexture?.dispose(),this._depthStencilTexture=e)}detachDepthStencilTexture(){let e=this._depthStencilTexture;return e&&this._glName&&this._context.temporaryBindFramebuffer(this,()=>{this._framebufferTexture2D(null,E(e.descriptor.pixelFormat))}),this._depthStencilTexture=null,e}_attachDepthStencilBuffer(e){if(e==null)return;let t=e.descriptor;if(this._validateRenderbufferDescriptor(t),this._disposeDepthStencilAttachments(),this._glName){this._context.bindFramebuffer(this);let{gl:n}=this._context,r=this._getGLAttachmentPoint(t);n.framebufferRenderbuffer(36160,r,n.RENDERBUFFER,e.glName)}this._depthStencilBuffer=e}detachDepthStencilBuffer(){let e=this._depthStencilBuffer;if(e&&this._glName){let{_context:t}=this,n=t.boundFramebuffer;t.bindFramebuffer(this);let{gl:r}=t,i=this._getGLAttachmentPoint(e.descriptor);r.framebufferRenderbuffer(36160,i,r.RENDERBUFFER,null),t.bindFramebuffer(n)}return this._depthStencilBuffer=null,e}invalidateAttachments(e){let{_context:t}=this;t.temporaryBindFramebuffer(this,()=>t.gl.invalidateFramebuffer(36160,e),!0)}copyToTexture(e,t,n,r,i,a,o){(e<0||t<0||i<0||a<0)&&console.error(`Offsets cannot be negative!`),(n<=0||r<=0)&&console.error(`Copy width and height must be greater than zero!`);let s=o.descriptor;o.descriptor.target!==3553&&console.error(`Texture target must be TEXTURE_2D!`),(s?.width==null||s?.height==null||e+n>this.width||t+r>this.height||i+n>s.width||a+r>s.height)&&console.error(`Bad dimensions, the current input values will attempt to read or copy out of bounds!`);let c=this._context,l=c.bindTexture(o,p.TEXTURE_UNIT_FOR_UPDATES);c.setActiveTexture(p.TEXTURE_UNIT_FOR_UPDATES),c.bindFramebuffer(this),c.gl.copyTexSubImage2D(3553,0,i,a,e,t,n,r),c.bindTexture(l,p.TEXTURE_UNIT_FOR_UPDATES)}readPixels(e,t,n,r,i,a,o){(n<=0||r<=0)&&console.error(`Copy width and height must be greater than zero!`),o||console.error(`Target memory is not initialized!`),this._context.bindFramebuffer(this),this._context.gl.readPixels(e,t,n,r,i,a,o)}async readPixelsAsync(e,t,r,i,a,o,s,c){let{gl:l}=this._context,u=n.createPixelPack(this._context,35041,s.byteLength);this._context.bindBuffer(u);let d=this._context.boundFramebuffer;this._context.bindFramebuffer(this),l.readPixels(e,t,r,i,a,o,0),this._context.unbindBuffer(35051),this._context.bindFramebuffer(d);try{await u.getSubDataAsync(s,void 0,void 0,void 0,c)}finally{u.dispose()}}resize(e,t){if(this.width===e&&this.height===t)return;let n={width:e,height:t};if(w(n,this._context.parameters.maxTextureSize),this._colorAttachments.forEach(e=>e.resize(n.width,n.height)),this._depthStencilTexture?.resize(n.width,n.height),this._glName&&(w(n,this._context.parameters.maxRenderbufferSize),this._depthStencilBuffer?.resize(n.width,n.height),r())){let{gl:e}=this._context;e.checkFramebufferStatus(36160)!==e.FRAMEBUFFER_COMPLETE&&console.error(`Framebuffer is incomplete!`)}}initializeAndBind(e=36160){let{gl:t}=this._context;this._glName?t.bindFramebuffer(e,this._glName):(this._glName&&t.deleteFramebuffer(this._glName),this._glName=t.createFramebuffer(),t.bindFramebuffer(e,this._glName),this._initializeAttachments(e))}_initializeAttachments(e=36160){let{gl:t}=this._context;if(this._colorAttachments.forEach((t,n)=>{if(_(t)){let r=T(t);r===35866?this._framebufferTextureLayer(t.glName,n,e):this._framebufferTexture2D(t.glName,n,r,e)}else if(v(t)){let r=this._context.gl;r.framebufferRenderbuffer(e,n,r.RENDERBUFFER,t.glName)}}),this._depthStencilBuffer){let n=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);t.framebufferRenderbuffer(e,n,t.RENDERBUFFER,this._depthStencilBuffer.glName)}else if(this._depthStencilTexture){let t=E(this._depthStencilTexture.descriptor.pixelFormat);this._framebufferTexture2D(this._depthStencilTexture.glName,t,T(this._depthStencilTexture),e)}r()&&t.checkFramebufferStatus(e)!==t.FRAMEBUFFER_COMPLETE&&console.error(`Framebuffer is incomplete!`)}_framebufferTexture2D(e,t=a,n=3553,r=36160){this._context.gl.framebufferTexture2D(r,t,n,e,this._level)}_framebufferTextureLayer(e,t=a,n=36160,r=0){this._context.gl.framebufferTextureLayer(n,t,e,this._level,r)}_disposeDepthStencilAttachments(){let e=this._context.gl;if(this._depthStencilBuffer){if(this._glName){this._context.bindFramebuffer(this);let t=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);e.framebufferRenderbuffer(36160,t,e.RENDERBUFFER,null)}this._depthStencilBuffer=t(this._depthStencilBuffer)}this._depthStencilTexture&&=(this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,E(this._depthStencilTexture.descriptor.pixelFormat))),t(this._depthStencilTexture))}_validateTextureDescriptor(e){e.target!==3553&&e.target!==34067&&e.target!==35866&&console.error(`Texture type must be TEXTURE_2D, TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP!`),w(e,this._context.parameters.maxTextureSize),this._validateBufferDimensions(e)}_validateRenderbufferDescriptor(e){w(e,this._context.parameters.maxRenderbufferSize),this._validateBufferDimensions(e)}_validateBufferDimensions(e){e.width<=0&&(e.width=this.width),e.height<=0&&(e.height=this.height),this.width>0&&this.height>0&&(this.width!==e.width||this.height!==e.height)&&console.error(`Attachment size must match framebuffer size!`)}_getGLAttachmentPoint(e){switch(e.internalFormat){case u.DEPTH_COMPONENT16:case u.DEPTH_COMPONENT24:case u.DEPTH_COMPONENT32F:return d;case c.DEPTH24_STENCIL8:case c.DEPTH32F_STENCIL8:return l;case 36168:return s;default:return a}}_validateColorAttachmentPoint(t){if(h._MAX_COLOR_ATTACHMENTS===-1){let{gl:e}=this._context;h._MAX_COLOR_ATTACHMENTS=e.getParameter(e.MAX_COLOR_ATTACHMENTS)}let n=t-a;n+1>h._MAX_COLOR_ATTACHMENTS&&e.getLogger(`esri.views.webgl.FrameBufferObject`).error(`esri.FrameBufferObject`,`illegal attachment point for color attachment: ${n+1}. Implementation supports up to ${h._MAX_COLOR_ATTACHMENTS} color attachments`)}}class g extends h{constructor(e,t,n){super(e,t,n)}dispose(){let{_colorAttachments:e,_glName:t,_context:n}=this;if(n.instanceCounter.decrement(i.FramebufferObject,this),e.size===0&&!this._depthStencilBuffer&&!this._depthStencilTexture&&!t)return;let r=n.boundFramebuffer,a=Array.from(e.values());this.detachColorTextures(...e.keys()),a.forEach(e=>e.dispose()),this.detachDepthStencilBuffer()?.dispose(),this.detachDepthStencilTexture()?.dispose(),n.gl.deleteFramebuffer(this._glName),this._glName=null,n.bindFramebuffer(r===this?null:r)}}function _(e){return S(e)===1}function v(e){return S(e)===2}function y(e){return _(e)||b(e)}function b(e){return S(e)===0}function x(e){return S(e)===3||e!=null&&`samples`in e}function S(e){return e!=null&&`type`in e?e.type:null}function C(e,t){return _(t)||v(t)?t:b(t)?new p(e,t):x(t)?new f(e,t):null}function w(e,t){let n=Math.max(e.width,e.height);if(n>t){m().warnOnce(`Resizing FBO attachment size ${e.width}x${e.height} to device limit ${t}`);let r=t/n;return e.width=Math.round(e.width*r),e.height=Math.round(e.height*r),!1}return!0}function T(e){return e.descriptor.target===34067?34069:e.descriptor.target===35866?35866:3553}function E(e){return e===6402?d:l}export{g as DisposableFramebufferObject,h as FramebufferObject,w as ensureAttachmentMaxSize};
2
+ import e from"../../core/Logger.js";import{disposeMaybe as t}from"../../core/maybe.js";import{BufferObject as n}from"./BufferObject.js";import{webglDebugEnabled as r}from"./checkWebGLError.js";import{ResourceType as i,ColorAttachment0 as a,PixelType as o,StencilAttachment as s,SizedDepthStencilFormat as c,DepthStencilAttachment as l,SizedDepthFormat as u,DepthAttachment as d}from"./enums.js";import{Renderbuffer as f}from"./Renderbuffer.js";import p from"./Texture.js";const m=()=>e.getLogger(`esri.views.webgl.FramebufferObject`);class h{constructor(e,t,n){if(this._context=e,this._level=0,this._glName=null,this._colorAttachments=new Map,this._depthStencilBuffer=null,this._depthStencilTexture=null,e.instanceCounter.increment(i.FramebufferObject,this),t!=null){let n=C(e,t);n!=null&&(this._colorAttachments.set(a,n),_(n)?this._validateTextureDescriptor(n.descriptor):this._validateRenderbufferDescriptor(n.descriptor)),this._validateColorAttachmentPoint(a)}if(n!=null){if(y(n))this._depthStencilTexture=_(n)?n:new p(e,n),this._validateTextureDescriptor(this._depthStencilTexture.descriptor);else{let t=v(n)?n:new f(e,n);this._depthStencilBuffer=t,this._validateRenderbufferDescriptor(t.descriptor)}}}get glName(){return this._glName}get colorTexture(){let e=this._colorAttachments.get(a);return _(e)?e:null}get depthStencil(){return this._depthStencilTexture||this._depthStencilBuffer}get depthStencilTexture(){return this._depthStencilTexture}get width(){return(this._colorAttachments.get(a)??this._depthStencilTexture??this._depthStencilBuffer)?.descriptor?.width??0}get height(){return(this._colorAttachments.get(a)??this._depthStencilTexture??this._depthStencilBuffer)?.descriptor?.height??0}get usedMemory(){return this._colorAttachments.values().reduce((e,t)=>e+t.usedMemory,this.depthStencil?.usedMemory??0)}get level(){return this._level}set level(e){this._level!==e&&(this._level=e,this._glName&&this._context.temporaryBindFramebuffer(this,()=>this._initializeAttachments()))}static{this._MAX_COLOR_ATTACHMENTS=-1}getColorTexture(e){let t=this._colorAttachments.get(e);return!t||!_(t)?null:t}get colorAttachments(){return Array.from(this._colorAttachments.keys())}attachColorTexture(e,t=a){if(!e)return;this._validateColorAttachmentPoint(t);let{descriptor:n}=e;this._validateTextureDescriptor(n),this.detachColorTexture(t)?.dispose(),this._colorAttachments.set(t,e),this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,t))}detachColorTexture(e=a){let t=this._colorAttachments.get(e);if(!t)return;let n=_(t);return this._glName&&this._context.temporaryBindFramebuffer(this,()=>{if(n)this._framebufferTexture2D(null,e);else{let t=this._context.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)}}),this._colorAttachments.delete(e),n?t:void 0}detachColorTextures(...e){if(e.length!==0){if(this._glName){let t=this._context.gl;this._context.temporaryBindFramebuffer(this,()=>{e.forEach(e=>{_(this._colorAttachments.get(e))?this._framebufferTexture2D(null,e):t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)})})}e.forEach(e=>this._colorAttachments.delete(e))}}setColorTextureTarget(e,t=a,n=0){let r=this._colorAttachments.get(t);r&&(e===35866?this._framebufferTextureLayer(r.glName,t,36160,n):this._framebufferTexture2D(r.glName,t,e,36160))}attachDepthStencil(e){if(e)switch(e.type){case 1:return this._attachDepthStencilTexture(e);case 2:return this._attachDepthStencilBuffer(e)}}_attachDepthStencilTexture(e){if(e==null)return;let{descriptor:t}=e,{pixelFormat:n,dataType:r}=t;n!==34041&&n!==6402?console.error(`Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!`):n===34041&&r!==o.UNSIGNED_INT_24_8?console.error(`Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!`):n===6402&&r!==o.UNSIGNED_INT&&r!==o.UNSIGNED_SHORT?console.error(`Depth texture must have data type of UNSIGNED_INT or UNSIGNED_SHORT!`):(this._validateTextureDescriptor(t),this._disposeDepthStencilAttachments(),this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,E(n))),this._depthStencilTexture?.dispose(),this._depthStencilTexture=e)}detachDepthStencilTexture(){let e=this._depthStencilTexture;return e&&this._glName&&this._context.temporaryBindFramebuffer(this,()=>{this._framebufferTexture2D(null,E(e.descriptor.pixelFormat))}),this._depthStencilTexture=null,e}_attachDepthStencilBuffer(e){if(e==null)return;let t=e.descriptor;if(this._validateRenderbufferDescriptor(t),this._disposeDepthStencilAttachments(),this._glName){this._context.bindFramebuffer(this);let{gl:n}=this._context,r=this._getGLAttachmentPoint(t);n.framebufferRenderbuffer(36160,r,n.RENDERBUFFER,e.glName)}this._depthStencilBuffer=e}detachDepthStencilBuffer(){let e=this._depthStencilBuffer;if(e&&this._glName){let{_context:t}=this,n=t.boundFramebuffer;t.bindFramebuffer(this);let{gl:r}=t,i=this._getGLAttachmentPoint(e.descriptor);r.framebufferRenderbuffer(36160,i,r.RENDERBUFFER,null),t.bindFramebuffer(n)}return this._depthStencilBuffer=null,e}invalidateAttachments(e){let{_context:t}=this;t.temporaryBindFramebuffer(this,()=>t.gl.invalidateFramebuffer(36160,e),!0)}copyToTexture(e,t,n,r,i,a,o){(e<0||t<0||i<0||a<0)&&console.error(`Offsets cannot be negative!`),(n<=0||r<=0)&&console.error(`Copy width and height must be greater than zero!`);let s=o.descriptor;o.descriptor.target!==3553&&console.error(`Texture target must be TEXTURE_2D!`),(s?.width==null||s?.height==null||e+n>this.width||t+r>this.height||i+n>s.width||a+r>s.height)&&console.error(`Bad dimensions, the current input values will attempt to read or copy out of bounds!`);let c=this._context,l=c.bindTexture(o,p.TEXTURE_UNIT_FOR_UPDATES);c.setActiveTexture(p.TEXTURE_UNIT_FOR_UPDATES),c.bindFramebuffer(this),c.gl.copyTexSubImage2D(3553,0,i,a,e,t,n,r),c.bindTexture(l,p.TEXTURE_UNIT_FOR_UPDATES)}readPixels(e,t,n,r,i,a,o){(n<=0||r<=0)&&console.error(`Copy width and height must be greater than zero!`),o||console.error(`Target memory is not initialized!`),this._context.bindFramebuffer(this),this._context.gl.readPixels(e,t,n,r,i,a,o)}async readPixelsAsync(e,t,r,i,a,o,s,c){let{gl:l}=this._context,u=n.createPixelPack(this._context,35041,s.byteLength);try{this._context.bindBuffer(u);let n=this._context.boundFramebuffer;try{this._context.bindFramebuffer(this),l.readPixels(e,t,r,i,a,o,0)}finally{this._context.unbindBuffer(35051),this._context.bindFramebuffer(n)}await u.getSubDataAsync(s,void 0,void 0,void 0,c)}finally{u.dispose()}}resize(e,t){if(this.width===e&&this.height===t)return;let n={width:e,height:t};if(w(n,this._context.parameters.maxTextureSize),this._colorAttachments.forEach(e=>e.resize(n.width,n.height)),this._depthStencilTexture?.resize(n.width,n.height),this._glName&&(w(n,this._context.parameters.maxRenderbufferSize),this._depthStencilBuffer?.resize(n.width,n.height),r())){let{gl:e}=this._context;e.checkFramebufferStatus(36160)!==e.FRAMEBUFFER_COMPLETE&&console.error(`Framebuffer is incomplete!`)}}initializeAndBind(e=36160){let{gl:t}=this._context;this._glName?t.bindFramebuffer(e,this._glName):(this._glName&&t.deleteFramebuffer(this._glName),this._glName=t.createFramebuffer(),t.bindFramebuffer(e,this._glName),this._initializeAttachments(e))}_initializeAttachments(e=36160){let{gl:t}=this._context;if(this._colorAttachments.forEach((t,n)=>{if(_(t)){let r=T(t);r===35866?this._framebufferTextureLayer(t.glName,n,e):this._framebufferTexture2D(t.glName,n,r,e)}else if(v(t)){let r=this._context.gl;r.framebufferRenderbuffer(e,n,r.RENDERBUFFER,t.glName)}}),this._depthStencilBuffer){let n=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);t.framebufferRenderbuffer(e,n,t.RENDERBUFFER,this._depthStencilBuffer.glName)}else if(this._depthStencilTexture){let t=E(this._depthStencilTexture.descriptor.pixelFormat);this._framebufferTexture2D(this._depthStencilTexture.glName,t,T(this._depthStencilTexture),e)}r()&&t.checkFramebufferStatus(e)!==t.FRAMEBUFFER_COMPLETE&&console.error(`Framebuffer is incomplete!`)}_framebufferTexture2D(e,t=a,n=3553,r=36160){this._context.gl.framebufferTexture2D(r,t,n,e,this._level)}_framebufferTextureLayer(e,t=a,n=36160,r=0){this._context.gl.framebufferTextureLayer(n,t,e,this._level,r)}_disposeDepthStencilAttachments(){let e=this._context.gl;if(this._depthStencilBuffer){if(this._glName){this._context.bindFramebuffer(this);let t=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);e.framebufferRenderbuffer(36160,t,e.RENDERBUFFER,null)}this._depthStencilBuffer=t(this._depthStencilBuffer)}this._depthStencilTexture&&=(this._glName&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,E(this._depthStencilTexture.descriptor.pixelFormat))),t(this._depthStencilTexture))}_validateTextureDescriptor(e){e.target!==3553&&e.target!==34067&&e.target!==35866&&console.error(`Texture type must be TEXTURE_2D, TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP!`),w(e,this._context.parameters.maxTextureSize),this._validateBufferDimensions(e)}_validateRenderbufferDescriptor(e){w(e,this._context.parameters.maxRenderbufferSize),this._validateBufferDimensions(e)}_validateBufferDimensions(e){e.width<=0&&(e.width=this.width),e.height<=0&&(e.height=this.height),this.width>0&&this.height>0&&(this.width!==e.width||this.height!==e.height)&&console.error(`Attachment size must match framebuffer size!`)}_getGLAttachmentPoint(e){switch(e.internalFormat){case u.DEPTH_COMPONENT16:case u.DEPTH_COMPONENT24:case u.DEPTH_COMPONENT32F:return d;case c.DEPTH24_STENCIL8:case c.DEPTH32F_STENCIL8:return l;case 36168:return s;default:return a}}_validateColorAttachmentPoint(t){if(h._MAX_COLOR_ATTACHMENTS===-1){let{gl:e}=this._context;h._MAX_COLOR_ATTACHMENTS=e.getParameter(e.MAX_COLOR_ATTACHMENTS)}let n=t-a;n+1>h._MAX_COLOR_ATTACHMENTS&&e.getLogger(`esri.views.webgl.FrameBufferObject`).error(`esri.FrameBufferObject`,`illegal attachment point for color attachment: ${n+1}. Implementation supports up to ${h._MAX_COLOR_ATTACHMENTS} color attachments`)}}class g extends h{constructor(e,t,n){super(e,t,n)}dispose(){let{_colorAttachments:e,_glName:t,_context:n}=this;if(n.instanceCounter.decrement(i.FramebufferObject,this),e.size===0&&!this._depthStencilBuffer&&!this._depthStencilTexture&&!t)return;let r=n.boundFramebuffer,a=Array.from(e.values());this.detachColorTextures(...e.keys()),a.forEach(e=>e.dispose()),this.detachDepthStencilBuffer()?.dispose(),this.detachDepthStencilTexture()?.dispose(),n.gl.deleteFramebuffer(this._glName),this._glName=null,n.bindFramebuffer(r===this?null:r)}}function _(e){return S(e)===1}function v(e){return S(e)===2}function y(e){return _(e)||b(e)}function b(e){return S(e)===0}function x(e){return S(e)===3||e!=null&&`samples`in e}function S(e){return e!=null&&`type`in e?e.type:null}function C(e,t){return _(t)||v(t)?t:b(t)?new p(e,t):x(t)?new f(e,t):null}function w(e,t){let n=Math.max(e.width,e.height);if(n>t){m().warnOnce(`Resizing FBO attachment size ${e.width}x${e.height} to device limit ${t}`);let r=t/n;return e.width=Math.round(e.width*r),e.height=Math.round(e.height*r),!1}return!0}function T(e){return e.descriptor.target===34067?34069:e.descriptor.target===35866?35866:3553}function E(e){return e===6402?d:l}export{g as DisposableFramebufferObject,h as FramebufferObject,w as ensureAttachmentMaxSize};
@@ -137,7 +137,7 @@ export interface DirectionsProperties extends WidgetProperties, Partial<Pick<Dir
137
137
  * @since 4.6
138
138
  * @see [DirectionsViewModel](https://developers.arcgis.com/javascript/latest/references/core/widgets/Directions/DirectionsViewModel/)
139
139
  * @see [RouteLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/RouteLayer/)
140
- * @see [Guide topic - Access secure resources](https://developers.arcgis.com/javascript/latest/secure-resources/)
140
+ * @see [Guide topic - Authentication and access tokens](https://developers.arcgis.com/javascript/latest/authentication/access-tokens/)
141
141
  * @see [Sample - Directions widget](https://developers.arcgis.com/javascript/latest/sample-code/widgets-directions/)
142
142
  * @example
143
143
  * // 1. Add empty RouteLayer to Directions widget
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../Color.js";import{handlesGroup as n}from"../../core/handleUtils.js";import{isIterable as r}from"../../core/iteratorUtils.js";import{memoize as i}from"../../core/memoize.js";import{watch as a,on as o}from"../../core/reactiveUtils.js";import{getMetersPerVerticalUnitForSR as s}from"../../core/units.js";import{property as c,subclass as l}from"../../core/accessorSupport/decorators.js";import{set as u}from"../../core/libs/gl-matrix-2/math/vec3.js";import{create as d}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as f}from"../../geometry/ellipsoidUtils.js";import{create as p,fromPoints as m}from"../../geometry/support/ray.js";import{GeometryDescriptor as h}from"../../layers/support/GeometryDescriptor.js";import{externalToInternalIntersectOptions as g}from"../../views/3d/support/hitTest.js";import{Intersector as _}from"../../views/3d/webgl-engine/lib/Intersector.js";import{toGraphic as v}from"../../views/3d/webgl-engine/lib/intersectorUtilsConversions.js";import y from"./ElevationProfileLine.js";let b=class extends y{constructor(e){super(e),this.type=`view`,this.color=new t(`#cf4ccf`),this.viewVisualizationEnabled=!0,this.include=null,this.exclude=null,this.numSamplesForPreview=50,this.numSamplesPerChunk=25,this._getQueryElevationDependencies=i((e,t,n,r,i,a,o)=>({inputGraphicUid:e==null?null:S(e),visibleLayers:t,maxIntersectionDistance:n,intersectOptions:r,view:i,stationary:a,spatialReference:o})),this._vecA=d(),this._vecB=d(),this._ray=p()}get minDemResolution(){let e=this._viewModel?.view;if(e==null||e.type!==`3d`)return null;let t=e.pointsOfInterest?.focus?.worldUnitsPerContentPixel;return t==null?null:t*s(e.spatialReference)}get queryElevationDependencies(){let e=this._view;return e?this._getQueryElevationDependencies(this._viewModel?.input,this._visibleLayers,this._maxIntersectionDistance,this._intersectOptions,e,e.stationary,e.spatialReference):null}get _visibleLayers(){return this._view?.map?.allLayers?.filter(e=>e.visible).toArray()??[]}get _intersectOptions(){let e=this._view;return e==null||e.destroyed?{}:g(e,{include:this.include,exclude:[...this._pointCloudLayers,...r(this.exclude)?this.exclude:this.exclude?[this.exclude]:[]]})}get _pointCloudLayers(){let e=this._view;return e==null?[]:e.allLayerViews.toArray().filter(e=>e.layer?.type===`point-cloud`).map(e=>e.layer)}get _view(){let e=this._viewModel?.view;return e!=null&&e.type===`3d`?e:null}get _maxIntersectionDistance(){let e=this._view;return e?.renderCoordsHelper?f(e.spatialReference).radius/e.renderCoordsHelper.unitInMeters:1/0}get _intersector(){let e=this._view;if(e==null)return null;let t=new _(e.state.viewingMode),n=t.options;return n.hud=!1,n.invisibleTerrain=!1,n.backfacesTerrain=!1,n.selectionMode=!1,n.store=2,t}async queryElevation(e,{noDataValue:t,signal:n}){let r=this.queryElevationDependencies;if(r==null)throw Error(`ElevationProfileLineInput: no dependencies`);let i=this._intersector;if(i==null)throw Error(`ElevationProfileLineInput: no view`);let{intersectOptions:a,view:o,spatialReference:s}=r,c=o.renderCoordsHelper,l=o.sceneIntersectionHelper,d=this._vecA,f=this._vecA,p=this._vecB,g=this._ray;if(!s)return{geometry:e,noDataValue:t};let _=await h.fromGeometry(e).project(s,n);if(!_)return{geometry:e,noDataValue:t};let v=_.coordinates,y=v.length;for(let e=0;e<y;++e){let n=v[e];u(p,n.x,n.y,n.z??0),c.toRenderCoords(p,s,p),c.setAltitude(d,2e5,p);let o=m(d,p,g);l.computeIntersection(o,i,!0,a);let h=x(r,i.results.all);h?(h.getIntersectionPoint(f),c.fromRenderCoords(f,f,s),n.z=f[2]):n.z=t}return{geometry:_.export(),noDataValue:t}}attach(e){let t=()=>this._onChange();return n([super.attach(e),a(()=>this.queryElevationDependencies,t),o(()=>e.elevationProvider,`elevation-change`,t,{onListenerAdd:t,onListenerRemove:t})])}};e([c({type:t,nonNullable:!0})],b.prototype,`color`,void 0),e([c()],b.prototype,`viewVisualizationEnabled`,void 0),e([c()],b.prototype,`include`,void 0),e([c()],b.prototype,`exclude`,void 0),e([c({readOnly:!0})],b.prototype,`minDemResolution`,null),e([c()],b.prototype,`queryElevationDependencies`,null),e([c()],b.prototype,`_visibleLayers`,null),e([c()],b.prototype,`_intersectOptions`,null),e([c()],b.prototype,`_pointCloudLayers`,null),e([c()],b.prototype,`_view`,null),e([c()],b.prototype,`_maxIntersectionDistance`,null),e([c()],b.prototype,`_intersector`,null),b=e([l(`esri.widgets.ElevationProfile.ElevationProfileLineView`)],b);function x({view:e,inputGraphicUid:t,maxIntersectionDistance:n},r){for(let i of r){if(!i.withinDistance(n))continue;let r=v(i,e);if(r==null||S(r)!==t)return i}return null}function S(e){if(e.layer&&`objectIdField`in e.layer){let t=e.attributes[e.layer.objectIdField];if(t)return`o-${e.layer.id}-${t}`}return`u-${e.uid}`}const C=b;export{C as default};
2
+ import{__decorate as e}from"tslib";import t from"../../Color.js";import{handlesGroup as n}from"../../core/handleUtils.js";import{isIterable as r}from"../../core/iteratorUtils.js";import{memoize as i}from"../../core/memoize.js";import{watch as a,on as o}from"../../core/reactiveUtils.js";import{getMetersPerVerticalUnitForSR as s}from"../../core/units.js";import{property as c,subclass as l}from"../../core/accessorSupport/decorators.js";import{set as u}from"../../core/libs/gl-matrix-2/math/vec3.js";import{create as d}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as f}from"../../geometry/ellipsoidUtils.js";import{create as p,fromPoints as m}from"../../geometry/support/ray.js";import{GeometryDescriptor as h}from"../../layers/support/GeometryDescriptor.js";import{externalToInternalIntersectOptions as g}from"../../views/3d/support/hitTest.js";import{Intersector as _}from"../../views/3d/webgl-engine/lib/Intersector.js";import{toGraphic as v}from"../../views/3d/webgl-engine/lib/intersectorUtilsConversions.js";import y from"./ElevationProfileLine.js";let b=class extends y{constructor(e){super(e),this.type=`view`,this.color=new t(`#cf4ccf`),this.viewVisualizationEnabled=!0,this.include=null,this.exclude=null,this.numSamplesForPreview=50,this.numSamplesPerChunk=25,this._getQueryElevationDependencies=i((e,t,n,r,i,a,o)=>({inputGraphicUid:e==null?null:S(e),visibleLayers:t,maxIntersectionDistance:n,intersectOptions:r,view:i,stationary:a,spatialReference:o})),this._vecA=d(),this._vecB=d(),this._ray=p()}get minDemResolution(){let e=this._viewModel?.view;if(e==null||e.type!==`3d`)return null;let t=e.pointsOfInterest?.focus?.worldUnitsPerContentPixel;return t==null?null:t*s(e.spatialReference)}get queryElevationDependencies(){let e=this._view;return e?this._getQueryElevationDependencies(this._viewModel?.input,this._visibleLayers,this._maxIntersectionDistance,this._intersectOptions,e,e.stationary,e.spatialReference):null}get _visibleLayers(){return this._view?.map?.allLayers?.filter(e=>e.visible).toArray()??[]}get _intersectOptions(){let e=this._view;return e==null||e.destroyed?{}:g(e,{include:this.include,exclude:[...this._pointCloudLayers,...r(this.exclude)?this.exclude:this.exclude?[this.exclude]:[]]})}get _pointCloudLayers(){let e=this._view;return e==null?[]:e.allLayerViews.toArray().filter(e=>e.layer?.type===`point-cloud`).map(e=>e.layer)}get _view(){let e=this._viewModel?.view;return e!=null&&e.type===`3d`?e:null}get _maxIntersectionDistance(){let e=this._view;return e==null?1/0:f(e.spatialReference).radius/e.renderCoordsHelper.unitInMeters}get _intersector(){let e=this._view;if(e==null)return null;let t=new _(e.state.viewingMode),n=t.options;return n.hud=!1,n.invisibleTerrain=!1,n.backfacesTerrain=!1,n.selectionMode=!1,n.store=2,t}async queryElevation(e,{noDataValue:t,signal:n}){let r=this.queryElevationDependencies;if(r==null)throw Error(`ElevationProfileLineInput: no dependencies`);let i=this._intersector;if(i==null)throw Error(`ElevationProfileLineInput: no view`);let{intersectOptions:a,view:o,spatialReference:s}=r,c=o.renderCoordsHelper,l=o.sceneIntersectionHelper,d=this._vecA,f=this._vecA,p=this._vecB,g=this._ray;if(!s)return{geometry:e,noDataValue:t};let _=await h.fromGeometry(e).project(s,n);if(!_)return{geometry:e,noDataValue:t};let v=_.coordinates,y=v.length;for(let e=0;e<y;++e){let n=v[e];u(p,n.x,n.y,n.z??0),c.toRenderCoords(p,s,p),c.setAltitude(d,2e5,p);let o=m(d,p,g);l.computeIntersection(o,i,!0,a);let h=x(r,i.results.all);h?(h.getIntersectionPoint(f),c.fromRenderCoords(f,f,s),n.z=f[2]):n.z=t}return{geometry:_.export(),noDataValue:t}}attach(e){let t=()=>this._onChange();return n([super.attach(e),a(()=>this.queryElevationDependencies,t),o(()=>e.elevationProvider,`elevation-change`,t,{onListenerAdd:t,onListenerRemove:t})])}};e([c({type:t,nonNullable:!0})],b.prototype,`color`,void 0),e([c()],b.prototype,`viewVisualizationEnabled`,void 0),e([c()],b.prototype,`include`,void 0),e([c()],b.prototype,`exclude`,void 0),e([c({readOnly:!0})],b.prototype,`minDemResolution`,null),e([c()],b.prototype,`queryElevationDependencies`,null),e([c()],b.prototype,`_visibleLayers`,null),e([c()],b.prototype,`_intersectOptions`,null),e([c()],b.prototype,`_pointCloudLayers`,null),e([c()],b.prototype,`_view`,null),e([c()],b.prototype,`_maxIntersectionDistance`,null),e([c()],b.prototype,`_intersector`,null),b=e([l(`esri.widgets.ElevationProfile.ElevationProfileLineView`)],b);function x({view:e,inputGraphicUid:t,maxIntersectionDistance:n},r){for(let i of r){if(!i.withinDistance(n))continue;let r=v(i,e);if(r==null||S(r)!==t)return i}return null}function S(e){if(e.layer&&`objectIdField`in e.layer){let t=e.attributes[e.layer.objectIdField];if(t)return`o-${e.layer.id}-${t}`}return`u-${e.uid}`}const C=b;export{C as default};
@@ -84,7 +84,7 @@ export interface HistogramRangeSliderEvents extends CommonSliderEvents {}
84
84
  *
85
85
  * At a minimum, the slider's [container](https://developers.arcgis.com/javascript/latest/references/core/widgets/HistogramRangeSlider/#container) or parent container must have a `width` set in css for it to render.
86
86
  *
87
- * @deprecated since version 5.0. Use the [arcgis-slider-histogram-range](⁠https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider-histogram-range/) component instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/).
87
+ * @deprecated since version 5.0. Use the [arcgis-slider-histogram-range](https://developers.arcgis.com/javascript/latest/references/common-components/components/arcgis-slider-histogram-range/) component instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/).
88
88
  * @since 4.12
89
89
  * @see [Histogram](https://developers.arcgis.com/javascript/latest/references/core/widgets/Histogram/)
90
90
  * @see [Slider](https://developers.arcgis.com/javascript/latest/references/core/widgets/Slider/)
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7],{69052(e,t,r){r.d(t,{hr:()=>i});var s=r(34727);class i{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return a(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,s.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+n(this.range,e-t,r)}minimalMonotonic(e,t,r){return a(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);let r=(t=this.normalize(t))-e,s=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(s)?r:s}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function a(e,t,r,s,i=0,a=!1){return(s-=i)<t?s+=n(e,t-s):s>r&&(s-=n(e,s-r)),a&&s===r&&(s=t),s+i}function n(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const o=new i(0,2*Math.PI),u=(new i(-Math.PI,Math.PI),new i(0,360));r.d(t,["ie",0,u,"uC",0,o])},18370(e,t,r){r.d(t,{z:()=>i});class s{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function i(e){return new s(e)}},82534(e,t,r){function s(){return[0,0,0,1]}function i(e){return[e[0],e[1],e[2],e[3]]}r.d(t,{o8:()=>i,vt:()=>s});const a=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:i,create:s,fromValues:function(e,t,r,s){return[e,t,r,s]}},Symbol.toStringTag,{value:"Module"})),r.d(t,["zK",0,a])},67026(e,t,r){r.d(t,{A6:()=>f,Xd:()=>p,Xr:()=>h,lw:()=>c,x8:()=>l});var s=r(29242),i=r(82534),a=r(51850),n=r(34304),o=r(35522),u=r(78955);function l(e,t,r){r*=.5;let s=Math.sin(r);return e[0]=s*t[0],e[1]=s*t[1],e[2]=s*t[2],e[3]=Math.cos(r),e}function p(e,t){let r=2*Math.acos(t[3]),s=Math.sin(r/2);return s>(0,n.FD)()?(e[0]=t[0]/s,e[1]=t[1]/s,e[2]=t[2]/s):(e[0]=1,e[1]=0,e[2]=0),r}function c(e,t,r){let s=t[0],i=t[1],a=t[2],n=t[3],o=r[0],u=r[1],l=r[2],p=r[3];return e[0]=s*p+n*o+i*l-a*u,e[1]=i*p+n*u+a*o-s*l,e[2]=a*p+n*l+s*u-i*o,e[3]=n*p-s*o-i*u-a*l,e}function d(e,t,r,s){let i,a,o,u,l,p=t[0],c=t[1],d=t[2],h=t[3],y=r[0],f=r[1],m=r[2],g=r[3];return a=p*y+c*f+d*m+h*g,a<0&&(a=-a,y=-y,f=-f,m=-m,g=-g),1-a>(0,n.FD)()?(i=Math.acos(a),o=Math.sin(i),u=Math.sin((1-s)*i)/o,l=Math.sin(s*i)/o):(u=1-s,l=s),e[0]=u*p+l*y,e[1]=u*c+l*f,e[2]=u*d+l*m,e[3]=u*h+l*g,e}function h(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function y(e,t){let r,s=t[0]+t[4]+t[8];if(s>0)r=Math.sqrt(s+1),e[3]=.5*r,r=.5/r,e[0]=(t[5]-t[7])*r,e[1]=(t[6]-t[2])*r,e[2]=(t[1]-t[3])*r;else{let s=0;t[4]>t[0]&&(s=1),t[8]>t[3*s+s]&&(s=2);let i=(s+1)%3,a=(s+2)%3;r=Math.sqrt(t[3*s+s]-t[3*i+i]-t[3*a+a]+1),e[s]=.5*r,r=.5/r,e[3]=(t[3*i+a]-t[3*a+i])*r,e[i]=(t[3*i+s]+t[3*s+i])*r,e[a]=(t[3*a+s]+t[3*s+a])*r}return e}function f(e,t,r,s){let i=.5*Math.PI/180;t*=i,r*=i,s*=i;let a=Math.sin(t),n=Math.cos(t),o=Math.sin(r),u=Math.cos(r),l=Math.sin(s),p=Math.cos(s);return e[0]=a*u*p-n*o*l,e[1]=n*o*p+a*u*l,e[2]=n*u*l-a*o*p,e[3]=n*u*p+a*o*l,e}const m=u.C,g=u.hZ,v=u.WQ,S=c,A=u.hs,_=u.Om,x=u.Cc,b=u.Bw,w=b,M=u.m3,I=M,q=u.S8,F=u.t2,R=u.aI,C=(0,a.vt)(),O=(0,a.fA)(1,0,0),T=(0,a.fA)(0,1,0),P=(0,i.vt)(),E=(0,i.vt)(),N=(0,s.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:v,calculateW:function(e,t){let r=t[0],s=t[1],i=t[2];return e[0]=r,e[1]=s,e[2]=i,e[3]=Math.sqrt(Math.abs(1-r*r-s*s-i*i)),e},conjugate:h,copy:m,dot:_,equals:R,exactEquals:F,fromEuler:f,fromMat3:y,getAxisAngle:p,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},invert:function(e,t){let r=t[0],s=t[1],i=t[2],a=t[3],n=r*r+s*s+i*i+a*a,o=n?1/n:0;return e[0]=-r*o,e[1]=-s*o,e[2]=-i*o,e[3]=a*o,e},len:w,length:b,lerp:x,mul:S,multiply:c,normalize:q,random:function(e){let t=n.Ov,r=t(),s=t(),i=t(),a=Math.sqrt(1-r),o=Math.sqrt(r);return e[0]=a*Math.sin(2*Math.PI*s),e[1]=a*Math.cos(2*Math.PI*s),e[2]=o*Math.sin(2*Math.PI*i),e[3]=o*Math.cos(2*Math.PI*i),e},rotateX:function(e,t,r){r*=.5;let s=t[0],i=t[1],a=t[2],n=t[3],o=Math.sin(r),u=Math.cos(r);return e[0]=s*u+n*o,e[1]=i*u+a*o,e[2]=a*u-i*o,e[3]=n*u-s*o,e},rotateY:function(e,t,r){r*=.5;let s=t[0],i=t[1],a=t[2],n=t[3],o=Math.sin(r),u=Math.cos(r);return e[0]=s*u-a*o,e[1]=i*u+n*o,e[2]=a*u+s*o,e[3]=n*u-i*o,e},rotateZ:function(e,t,r){r*=.5;let s=t[0],i=t[1],a=t[2],n=t[3],o=Math.sin(r),u=Math.cos(r);return e[0]=s*u+i*o,e[1]=i*u-s*o,e[2]=a*u+n*o,e[3]=n*u-a*o,e},rotationTo:function(e,t,r){let s=(0,o.Om)(t,r);return s<-.999999?((0,o.$A)(C,O,t),(0,o.Il)(C)<1e-6&&(0,o.$A)(C,T,t),(0,o.S8)(C,C),l(e,C,Math.PI),e):s>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,o.$A)(C,t,r),e[0]=C[0],e[1]=C[1],e[2]=C[2],e[3]=1+s,q(e,e))},scale:A,set:g,setAxes:function(e,t,r,s){let i=N;return i[0]=r[0],i[3]=r[1],i[6]=r[2],i[1]=s[0],i[4]=s[1],i[7]=s[2],i[2]=-t[0],i[5]=-t[1],i[8]=-t[2],q(e,y(e,i))},setAxisAngle:l,slerp:d,sqlerp:function(e,t,r,s,i,a){return d(P,t,i,a),d(E,r,s,a),d(e,P,E,2*a*(1-a)),e},sqrLen:I,squaredLength:M,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}},Symbol.toStringTag,{value:"Module"})),r.d(t,["hZ",0,g,"t2",0,F])},95696(e,t,r){r.d(t,{A:()=>l});var s,i=r(32198),a=r(69540),n=r(25482),o=r(91429),u=r(93223);let l=class extends((0,a.OU)(n.o)){static{s=this}constructor(e){super(e),this.type="georeferenced",this.origin=null}static{this.absolute=new s}};(0,i.Cg)([(0,u.e)({georeferenced:"georeferenced"},{readOnly:!0})],l.prototype,"type",void 0),(0,i.Cg)([(0,o.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],l.prototype,"origin",void 0),l=s=(0,i.Cg)([(0,o.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],l)},18251(e,t,r){r.d(t,{A:()=>l});var s=r(32198),i=r(69540),a=r(25482),n=r(91429),o=r(51850),u=r(93223);let l=class extends((0,i.OU)(a.o)){constructor(e){super(e),this.type="local",this.origin=(0,o.vt)()}};(0,s.Cg)([(0,u.e)({local:"local"},{readOnly:!0})],l.prototype,"type",void 0),(0,s.Cg)([(0,n.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"origin",void 0),l=(0,s.Cg)([(0,n.$K)("esri.geometry.support.MeshLocalVertexSpace")],l)},73836(e,t,r){r.d(t,{A:()=>h});var s=r(32198),i=r(69540),a=r(25482),n=r(91429),o=r(58083),u=r(9093),l=r(67026),p=r(82534),c=r(51850),d=r(24770);let h=class extends((0,i.OU)(a.o)){constructor(e){super(e),this.translation=(0,c.vt)(),this.rotationAxis=(0,c.ci)(d.up),this.rotationAngle=0,this.scale=(0,c.fA)(1,1,1)}get rotation(){return(0,d.i4)(this.rotationAxis,this.rotationAngle)}set rotation(e){this.rotationAxis=(0,c.o8)((0,d.yo)(e)),this.rotationAngle=(0,d.g7)(e)}get localMatrix(){let e=(0,u.vt)();return(0,l.x8)(y,(0,d.yo)(this.rotation),(0,d.$I)(this.rotation)),(0,o.o1)(e,y,this.translation,this.scale),e}get localMatrixInverse(){return(0,o.B8)((0,u.vt)(),this.localMatrix)}equals(e){return this===e||null!=e&&(0,o.t2)(this.localMatrix,e.localMatrix)}};(0,s.Cg)([(0,n.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"translation",void 0),(0,s.Cg)([(0,n.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"rotationAxis",void 0),(0,s.Cg)([(0,n.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],h.prototype,"rotationAngle",void 0),(0,s.Cg)([(0,n.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"scale",void 0),(0,s.Cg)([(0,n.MZ)()],h.prototype,"rotation",null),(0,s.Cg)([(0,n.MZ)()],h.prototype,"localMatrix",null),(0,s.Cg)([(0,n.MZ)()],h.prototype,"localMatrixInverse",null),h=(0,s.Cg)([(0,n.$K)("esri.geometry.support.MeshTransform")],h);const y=(0,p.vt)()},24770(e,t,r){r.d(t,{$I:()=>m,AU:()=>h,g7:()=>f,i4:()=>p,ui:()=>c,vt:()=>l,yo:()=>y});var s=r(34727),i=r(58083),a=r(67026),n=r(82534),o=r(35522),u=r(51850);function l(e=v){return[e[0],e[1],e[2],e[3]]}function p(e,t,r=l()){return(0,o.C)(r,e),r[3]=t,r}function c(e,t=l()){let r=(0,i.l)(S,e);return g(t,(0,s.KJ)((0,a.Xd)(t,r))),t}function d(e,t,r=l()){return(0,a.x8)(S,e,m(e)),(0,a.x8)(A,t,m(t)),(0,a.lw)(S,A,S),g(r,(0,s.KJ)((0,a.Xd)(r,S)))}function h(e,t,r,s=l()){return p(u.Cw,e,_),p(u.JP,t,x),p(u.Cb,r,b),d(_,x,_),d(_,b,s),s}function y(e){return e}function f(e){return e[3]}function m(e){return(0,s.kU)(e[3])}function g(e,t){return e[3]=t,e}const v=[0,0,1,0],S=(0,n.vt)(),A=(0,n.vt)(),_=(l(),l()),x=l(),b=l();r.d(t,["up",0,v])},63579(e,t,r){r.d(t,{Bq:()=>u,Qp:()=>o,WN:()=>m,dK:()=>g,eN:()=>h,fH:()=>f,in:()=>y,yr:()=>l});var s=r(56507),i=r(4576),a=r(17676),n=r(20557);class o{constructor(e,t,r){this.assetName=e,this.assetMimeType=t,this.parts=r}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,i.aI)(this.parts,e.parts,(e,t)=>e.equals(t))}isOnService(e){return this.parts.every(t=>t.isOnService(e))}makeHash(){let e="";for(let t of this.parts)e+=t.partHash;return e}async toBlob(e){let{parts:t}=this;if(1===t.length)return t[0].toBlob(e);let r=await Promise.all(t.map(t=>t.toBlob(e)));return(0,a.Te)(e),new Blob(r)}}class u{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){let{data:t}=await(0,s.A)(this.partUrl,{responseType:"blob"});return(0,a.Te)(e),t}}function l(e){return function(e){switch(e?.type){case"client":return Array.isArray(e.files)?e.files.some(d):d(e.files);case"service":return e.assets.some(d);case"loadable":return!0;default:return!1}}(e?.source)}const p=/^(model\/gltf\+json)|(model\/gltf-binary)$/,c=/\.(gltf|glb)/i;function d(e){if(e instanceof File){let{type:t,name:r}=e;return p.test(t)||c.test(r)}return p.test(e.assetMimeType)||c.test(e.assetName)}function h(e,t){if(!e)return!1;let{source:r}=e;return function(e,t){return"service"===e.type&&e.assets.every(e=>e.isOnService(t))}(r,t)}function y(e,t){if(e===t)return!0;let{source:r}=e,{source:s}=t;if(r===s)return!0;if("service"===r.type&&"service"===s.type){if(r.assets.length!==s.assets.length)return!1;let e=(e,t)=>e.assetName<t.assetName?-1:+(e.assetName>t.assetName),t=[...r.assets].sort(e),i=[...s.assets].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(i[e]))return!1;return!0}return!1}function f(e,t){return e instanceof File?(0,n.rq)(e,t):(0,n.z$)(e.assetMimeType,e.assetName,t)}function m(e){switch(e.type){case"client":return Array.isArray(e.files)?e.files:[e.files];case"service":return e.assets;case"loadable":return}}function g(e){return!!e.original}},27615(e,t,r){r.d(t,{CK:()=>u,Hq:()=>o,MW:()=>l,TE:()=>p,yJ:()=>c});var s=r(35522),i=r(86738),a=r(95696),n=r(18251);function o(e){return null!=e.origin}function u(e){return o(e.vertexSpace)}function l(e,t){if(!o(e))return null;let[r,s,a]=e.origin;return new i.A({x:r,y:s,z:a,spatialReference:t})}function p(e,t){let{x:r,y:s,z:i,spatialReference:o}=e,u=[r,s,i??0];return"local"===(t?.vertexSpace??function(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}(o))?new n.A({origin:u}):new a.A({origin:u})}function c(e,t){return e.type===t.type&&(e.origin===t.origin||null!=e.origin&&null!=t.origin&&(0,s.t2)(e.origin,t.origin))}},52039(e,t,r){r.d(t,{O7:()=>d,el:()=>l});var s=r(69052),i=(r(49186),r(18370)),a=r(17676),n=(r(5443),r(39829)),o=(r(82799),r(16930)),u=(r(80754),r(21325));async function l(e,t,r){Array.isArray(e)||(e=[e]),"object"==typeof t&&t&&"authMode"in t&&(r=t);let s=null;for(let t of e)s??=t?.spatialReference;if(!s)return e;let i=(0,u.Vp)(s);if(!i)return e;if(1===e.length&&"extent"===e[0]?.type){let t=e[0].clone().normalizeAsSingleGeometry(i);return["xmin"in t?t:new n.A(t)]}let[o,l]=i.valid,d=!1;for(let t of e){if(!t)continue;if("point"===t.type){d||=t.x>=l,d||=t.x<=o;continue}let{extent:e}=t;if(null==e){d=!0;break}d||=e.xmin>=l,d||=e.xmin<=o,d||=e.xmax>=l,d||=e.xmax<=o}if(!d)return e;let[{foldInto360Range:h},y]=await(0,a.qr)(Promise.all([p.getImportPromise(),c.getImportPromise()]),r),f=y.fromSpatialReference(s);return e.map(e=>{if(null==e||"mesh"===e.type)return e;let t=y.fromGeometry(e),r=y.toGeometry(h(t,f),s);return"extent"===e.type&&1===r?.rings.length?r.extent:r})}const p=(0,i.z)(()=>r.e(4144).then(()=>r(4144)).then(e=>e.load().then(()=>e))),c=(0,i.z)(()=>Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(1550)]).then(()=>r(78125)));function d(e,t,r){let s=(0,u.Vp)(r);if(null==s)return e;let[i,a]=s.valid,n=2*a,o=0,l=0;t>a?o=Math.ceil(Math.abs(t-a)/n):t<i&&(o=-Math.ceil(Math.abs(t-i)/n)),e>a?l=Math.ceil(Math.abs(e-a)/n):e<i&&(l=-Math.ceil(Math.abs(e-i)/n));let p=e+(o-l)*n,c=p-t;return c>a?p-=n:c<i&&(p+=n),p}function h(e){let t=(0,u.Vp)(e);if(null==t)return null;let[r,i]=t.valid;return new s.hr(r,i)}const y=h(o.A.WGS84);h(o.A.WebMercator),r.d(t,["Y_",0,y])},80754(e,t,r){r.d(t,{kS:()=>l,kd:()=>u});var s=r(82799),i=r(16930),a=r(60408),n=r(52006);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:i.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:i.A.WGS84})}};function u(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){if((0,n.Ed)(e))for(let r of function(e){return(0,a.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of r)if((0,n.aO)(e)){let[r,s]=e.c;r[0]+=t,s[0]+=t}else if((0,n.FG)(e)){let[r,s]=e.a;r[0]+=t,s[0]+=t}else if((0,n.n1)(e)){let[r,s,i]=e.b;r[0]+=t,s[0]+=t,i[0]+=t}else e[0]+=t;for(let r of function(e){return(0,a.Bi)(e)?e.rings:e.paths}(e))for(let e of r)e[0]+=t;return e}r.d(t,["j7",0,o])},99352(e,t,r){r.d(t,["F",0,{supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:{envelope:!0,centroid:!0,convexHull:!0},supportsStatisticsAggregatedIds:!0,supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsOutDistance:!1,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsReturnExceededLimitGeometries:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},"P",0,{supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}])},60845(e,t,r){r.r(t),r.d(t,{default:()=>ae});var s=r(32198),i=r(92602),a=r(56507),n=r(4576),o=r(49186),u=r(44208),l=r(66552),p=r(92474),c=r(53966),d=r(93637),h=r(17676),y=r(36708),f=r(84952),m=r(13069),g=r(91429),v=r(5443),S=r(16930),A=r(95696),_=r(27615),x=r(63579),b=r(52106),w=r(86211);function M(e){return"object"==typeof e&&!!e&&"objectId"in e&&!!e.objectId}function I(e){return e.every(M)}function q(e){return"object"==typeof e&&!!e&&"globalId"in e&&!!e.globalId}function F(e){return e.every(q)}var R=r(99917),C=r(65864),O=r(73836),T=r(21325);async function P(e,t,r){let{geometry:s}=t,i={...t.attributes};if(null!=r&&"mesh"===s?.type){let{transformFieldRoles:t}=r,{origin:a,spatialReference:n,vertexSpace:o}=s,u=s.transform??new O.A,l="local"===o.type,p=e.spatialReference,c=p.isGeographic,d=(0,T.aI)(p,n),h=(0,R.isEqualBaseGCS)(n,p)&&(0,R.canProjectWithoutEngine)(n,p);if(!(l&&c&&h||!l&&!c&&d))return null;let y=(0,R.projectWithoutEngine)(a,n,p);if(null==y)return null;if(i[t.originX]=y.x,i[t.originY]=y.y,i[t.originZ]=y.z??0,null!=u){let{translation:e,scale:r,rotation:s}=u,a=l?1:(0,w.KX)(n)/(0,w.KX)(p);i[t.translationX]=e[0]*a,i[t.translationY]=e[2]*a,i[t.translationZ]=-e[1]*a,i[t.scaleX]=r[0],i[t.scaleY]=r[2],i[t.scaleZ]=r[1],i[t.rotationX]=s[0],i[t.rotationY]=s[2],i[t.rotationZ]=-s[1],i[t.rotationDeg]=s[3]}return{attributes:i}}return null==s?{attributes:i}:"mesh"===s.type||"extent"===s.type?null:{geometry:s.toJSON(),attributes:i}}async function E(e,t){let r=await Promise.all((t.addAttachments??[]).map(t=>N(e,t))),s=await Promise.all((t.updateAttachments??[]).map(t=>N(e,t))),i=t.deleteAttachments??[];return r.length||s.length||i.length?{adds:r,updates:s,deletes:[...i]}:null}async function N(e,t){let{feature:r,attachment:s}=t,{globalId:i,name:a,contentType:n,data:o,keywords:u,uploadId:l}=s,p={globalId:i};if(r&&("attributes"in r?p.parentGlobalId=r.attributes?.[e.globalIdField]:r.globalId&&(p.parentGlobalId=r.globalId)),l)p.uploadId=l;else if(o){let e=await(0,f._0)(o);e&&(p.contentType=e.mediaType,p.data=e.data),o instanceof File&&(p.name=o.name)}return a&&(p.name=a),n&&(p.contentType=n),u&&(p.keywords=u),p}function D(e){let t=!0===e.success?null:e.error||{code:void 0,description:"Feature edit failed"};return{objectId:e.objectId,globalId:e.globalId,error:t?new o.A("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}function Q(e,t){return new b.A({attributes:e.attributes,geometry:(0,C.rS)({...e.geometry,spatialReference:t})})}function Z(e,t){return{adds:e?.adds?.map(e=>Q(e,t))||[],updates:e?.updates?.map(e=>({original:Q(e[0],t),current:Q(e[1],t)}))||[],deletes:e?.deletes?.map(e=>Q(e,t))||[],spatialReference:t}}var V=r(64714),J=r(64314),j=r(60694),G=r(15426),U=r(20557),k=r(69622),B=r(76553),z=r(39516),L=r(10107),X=r(64108),$=r(2991);function W(e,t,r,s){let i=s.get(e)?.type,a=s.getTimeZone(e);return`${(0,z.iA)(e)} ${t} ${(0,z.YG)(r,{type:"date"},{type:i,timeZone:a})}`}let Y=class extends k.A{constructor(e){super(e),this.fieldsIndex=null,this.layer=null}getExpression(e){let{layer:t}=this;if(!t)return;if(!(0,B.H)(t))return{type:"where",value:this._getLayerCondition(e)};let r=t.timeInfo,s=t.getAtOrigin("timeInfo","service");return s?r?r!==s&&(r.startField!==s.startField&&(r.startField||s.startField)||r.endField!==s.endField&&(r.endField||s.endField))?{type:"where",value:this._getLayerCondition(e)}:{type:"time",value:(0,$.G)(e)}:void 0:r?{type:"where",value:this._getLayerCondition(e)}:void 0}_getLayerCondition(e){let{fieldsIndex:t,layer:r}=this;if(!t||!r)return;let{timeInfo:s}=r;if(!s)return;let{startField:i,endField:a}=s,{start:n,end:o}=e;if(!n&&!o||!i&&!a)return;let u=i??a,l=a??i;if(u&&l){if(n&&o){if(n.getTime()===o.getTime())return W(u,"==",n,t);if(!i||!a){let e=W(u,">=",n,t),r=W(u,"<=",o,t);return(0,z.mA)(e,r)}let e=W(i,">=",n,t),r=W(a,"<=",o,t);return(0,z.mA)(e,r)}if(n)return W(u,">=",n,t);if(o)return W(l,"<=",o,t)}}};(0,s.Cg)([(0,L.MZ)({constructOnly:!0})],Y.prototype,"fieldsIndex",void 0),(0,s.Cg)([(0,L.MZ)({constructOnly:!0})],Y.prototype,"layer",void 0),Y=(0,s.Cg)([(0,X.$)("esri.layers.support.TimeInformation")],Y);var H=r(99199),K=r(96520),ee=r(97552),te=r(79677),re=r(20816);const se=new l.J({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),ie=new l.J({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let ae=class extends p.x_{constructor(e){super(e),this.type="feature-layer",this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer","Annotation Layer","Dimension Layer"]),this.refresh=(0,h.sg)(async()=>{await this.load();let e=this.sourceJSON.editingInfo?.lastEditDate;if(null==e)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}let t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}}),this._ongoingAssetUploads=new Map}load(e){let t=this.layer.sourceJSON,r=this._fetchService(t,{...e}).then(()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,e)).then(()=>this._ensureLatestMetadata(e));return this.addResolvingPromise(r),Promise.resolve(this)}async reload(e){let t=this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0;await this._fetchService(null,{...e,cacheBust:t})}initialize(){this.addHandles([(0,y.wB)(()=>{let e=this.layer;return e&&"lastEditsEventDate"in e?e.lastEditsEventDate:null},e=>this._handleLastEditsEventChange(e))])}destroy(){this._removeEditInterceptor()}get queryTask(){let{layer:e}=this,{capabilities:t,parsedUrl:r,gdbVersion:s,spatialReference:i,fieldsIndex:a,uniqueIdFields:n}=e,o="infoFor3D"in e?e.infoFor3D:null,l="dynamicDataSource"in e?e.dynamicDataSource:null,p=(0,u.A)("featurelayer-pbf")&&t?.query.supportsFormatPBF&&null==o,c=p&&t?.query.supportsFormatPBFWithCurves,d=t?.operations?.supportsQueryAttachments??!1,h=t?.query?.relativeTimeBinWindow??0,y=new Y({fieldsIndex:a,layer:e}),f=r.path;return new J.A({dynamicDataSource:l,fieldsIndex:a,gdbVersion:s,infoFor3D:o,pbfSupported:p,pbfSupportedWithCurves:c,queryAttachmentsSupported:d,relativeTimeBinWindow:h,sourceSpatialReference:i,timeInformation:y,uniqueIdFields:n,url:f})}async addAttachment(e,t,r){await this.load();let{layer:s}=this;await(0,G.VA)(s,"editing");let i=e.attributes[s.objectIdField],n=s.parsedUrl.path+"/"+i+"/addAttachment",o=this._getLayerRequestOptions({query:r}),u=this._getFormDataForAttachment(t,o.query);try{return D((await(0,a.A)(n,{body:u})).data.addAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(i,e)}}async updateAttachment(e,t,r,s){await this.load();let{layer:i}=this;await(0,G.VA)(i,"editing");let n=e.attributes[i.objectIdField],o=i.parsedUrl.path+"/"+n+"/updateAttachment",u=this._getLayerRequestOptions({query:{attachmentId:t,...s}}),l=this._getFormDataForAttachment(r,u.query);try{return D((await(0,a.A)(o,{body:l})).data.updateAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(n,e)}}async applyEdits(e,t){await this.load();let{layer:r}=this;await(0,G.VA)(r,"editing");let s="infoFor3D"in r?r.infoFor3D:null,i=null!=s,u=i||(t?.globalIdUsed??!1),l=i?await this._uploadMeshesAndGetAssetMapEditsJSON(e):null,p=e.addFeatures?.map(e=>P(this.layer,e,s))??[],c=(await Promise.all(p)).filter(n.Ru),d=e.updateFeatures?.map(e=>P(this.layer,e,s))??[],h=(await Promise.all(d)).filter(n.Ru),y=function(e,t,r){if(!t||0===t.length)return[];if(r&&F(t))return t.map(e=>e.globalId);if(I(t))return t.map(e=>e.objectId);let s=r?e.globalIdField:e.objectIdField;return s?t.map(e=>e.getAttribute(s)):[]}(this.layer,e.deleteFeatures,u);(0,K.u)(c,h,r.spatialReference);let f=await E(this.layer,e),m=r.capabilities.editing.supportsAsyncApplyEdits&&i,g=t?.gdbVersion||r.gdbVersion,v={gdbVersion:g,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:u,returnEditMoment:t?.returnEditMoment,trueCurveClient:t?.editsRespectTrueCurves,usePreviousEditMoment:t?.usePreviousEditMoment,async:m};await(0,re.ZJ)(this.layer.url,g,!0);let S=(0,re.w5)(this.layer.url,g||null);if(await(0,re.We)(r.url,g,r.historicMoment))throw new o.A("feature-layer-source:historic-version","Editing a historic version is not allowed");t?.returnServiceEditsOption?(v.edits=JSON.stringify([{id:r.layerId,adds:c.length?c:null,updates:h.length?h:null,deletes:y.length?y:null,attachments:f,assetMaps:l}]),v.returnServiceEditsOption=se.toJSON(t?.returnServiceEditsOption),v.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(v.adds=c.length?JSON.stringify(c):null,v.updates=h.length?JSON.stringify(h):null,v.deletes=y.length?u?JSON.stringify(y):y.join(","):null,v.attachments=f&&JSON.stringify(f),v.assetMaps=null==l?void 0:JSON.stringify(l));let A=this._getLayerRequestOptions({method:"post",query:v});S&&(A.authMode="immediate",A.query.returnEditMoment=!0,A.query.sessionId=re.TA);let _,x=t?.returnServiceEditsOption?r.url:r.parsedUrl.path;try{_=m?await this._asyncApplyEdits(x+"/applyEdits",A):await(0,a.A)(x+"/applyEdits",A)}catch(e){if(!function(e){let t=e.details.raw,r=+t.code,s=+t.extendedCode;return 500===r&&(-2147217144===s||-2147467261===s)}(e))throw e;A.authMode="immediate",_=m?await this._asyncApplyEdits(x+"/applyEdits",A):await(0,a.A)(x+"/applyEdits",A)}return this._createEditsResult(_)}async deleteAttachments(e,t,r){await this.load();let{layer:s}=this;await(0,G.VA)(s,"editing");let i=e.attributes[s.objectIdField],n=s.parsedUrl.path+"/"+i+"/deleteAttachments";try{return(await(0,a.A)(n,this._getLayerRequestOptions({query:{attachmentIds:t.join(","),...r},method:"post"}))).data.deleteAttachmentResults.map(D)}catch(e){throw this._createAttachmentErrorResult(i,e)}}fetchRecomputedExtents(e={}){let t=e.signal;return this.load({signal:t}).then(async()=>{let t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:r,url:s}=this.layer,{data:i}=await(0,a.A)(`${s}/${r}`,t),{id:n,extent:o,fullExtent:u,timeExtent:l}=i,p=o||u;return{id:n,fullExtent:p&&v.A.fromJSON(p),timeExtent:l&&te.A.fromJSON({start:l[0],end:l[1]})}})}async queryAttachments(e,t={}){await this.load();let r=this._getLayerRequestOptions(t);return this.queryTask.executeAttachmentQuery(e,r)}async queryFeatures(e,t){await this.load();let r=await this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)});if(e.outStatistics?.length&&r.features.length){let t=new Map;if(r.features.forEach(r=>{let s=r.attributes;e.outStatistics?.forEach(({outStatisticFieldName:e})=>{if(e){let r=e.toLowerCase();r&&r in s&&e!==r&&(s[e]=s[r],delete s[r],t.set(r,e))}})}),null!=r.fields)for(let e of r.fields){let r=t.get(e.name.toLowerCase());null!=r&&(e.name=r)}}return r}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryPivot(e,t){return await this.load(),this.queryTask.executePivotQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryAttributeBins(e,t){return await this.load(),this.queryTask.executeAttributeBinsQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!(0,j.Wo)(this.layer.url))return"unavailable";let e=(0,f.fj)(this.layer.url,"status"),t=await(0,a.A)(e,{query:{f:"json"}});return ie.fromJSON(t.data.status)}async uploadAssets(e,t){let{uploadAssets:s}=await r.e(1384).then(()=>r(31384));return s(e,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},t)}_handleLastEditsEventChange(e){let t=this.layer;if(null==e||!("capabilities"in t)||!("effectiveCapabilities"in t)||t.capabilities?.operations?.supportsEditing||!t.effectiveCapabilities?.operations?.supportsEditing)return;let r=t.url;null!=r&&("layerId"in t&&(r=(0,f.fj)(r,t.layerId.toString())),this._getOrCreateEditInterceptor(r).before=t=>{let r=t.requestOptions.method??"auto";if("auto"===r||"head"===r){let r=t.requestOptions.query??{};r._ts=e.getTime(),t.requestOptions.query=r}})}_getOrCreateEditInterceptor(e){return this._editInterceptor??(this._editInterceptor={urls:e},i.A.request.internalInterceptors.push(this._editInterceptor)),this._editInterceptor}_removeEditInterceptor(){null!=this._editInterceptor&&((0,n.TF)(i.A.request.internalInterceptors,this._editInterceptor),this._editInterceptor=null)}async _asyncApplyEdits(e,t){let r=(await(0,a.A)(e,t)).data.statusUrl;for(;;){let e=(await(0,a.A)(r,{query:{f:"json"},responseType:"json"})).data;switch(e.status){case"Completed":return(0,a.A)(e.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,h.Pl)(ne)}}_createRequestQueryOptions(e){let t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){let r={};(0,u.A)("featurelayer-advanced-symbols")&&(r.returnAdvancedSymbols=!0),t?.cacheBust&&(r._ts=Date.now());let{data:s}=await(0,a.A)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:r,signal:t?.signal}));e=s}this.layer.applyPreferredHost(e),this.sourceJSON=await this._patchServiceJSON(e,t?.signal);let r=e.type;if(!this.supportedSourceTypes.has(r))throw new o.A("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}async _patchServiceJSON(e,t){if("Table"!==e.type&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){let t=(0,V.F0)(e.geometryType).renderer;(0,d.sM)("drawingInfo.renderer",t,e)}if("esriGeometryMultiPatch"===e.geometryType&&e.infoFor3D&&(e.geometryType="mesh"),null==e.extent)try{let{data:r}=await(0,a.A)(this.layer.url,this._getLayerRequestOptions({signal:t}));r.spatialReference&&(e.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:r.spatialReference})}catch(e){(0,h.QP)(e)}return e}async _ensureLatestMetadata(e){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...e,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(e){let{addAssetFeatures:t}=e;if(!t?.length||await this._areAllAssetsAlreadyMapped(t))return null;let s=e.addFeatures.filter(e=>e.geometry);if(t.length!==s.length+e.updateFeatures.length)throw new o.A("feature-layer-source:unsupported-mesh-edits","Mixing attribute only edits with mesh geometry edits is not currently supported");let i=[],a=new Map;for(let e of t){let{geometry:t}=e,{vertexSpace:s}=t;if((0,_.Hq)(s))i.push(t);else{let s=t.origin,{convertMeshVertexSpace:n}=await Promise.all([r.e(2258),r.e(4548)]).then(()=>r(28846)),o=await n(t,new A.A({origin:[s.x,s.y,s.z??0]}));a.set(o,t),e.geometry=o,i.push(o)}}await this.uploadAssets(i);for(let[e,t]of a)t.addExternalSources(e.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(t),updates:[],deletes:[]}}_getAssetMapEditsJSON(e){let t=[],r=this.layer.globalIdField,s=this.layer.parsedUrl;for(let i of e){let{metadata:e}=i.geometry,a=e.getExternalSourcesOnService(s),n=i.getAttribute(r);if(0===a.length){c.A.getLogger(this).error(`Skipping feature ${n}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}let{source:o}=a.find(x.dK)??a[0];for(let e of o.assets)1===e.parts.length?t.push({globalId:(0,m.yS)(),parentGlobalId:n,assetName:e.assetName,assetHash:e.parts[0].partHash,flags:[]}):c.A.getLogger(this).error(`Skipping asset ${e.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return t}_createEditsResult(e){let t=e.data,{layerId:r}=this.layer,s=[],i=null;if(Array.isArray(t))for(let e of t)null!=e.editedFeatures&&s.push({id:e.id,editedFeatures:e.editedFeatures}),e.id===r&&(i={addResults:e.addResults??[],updateResults:e.updateResults??[],deleteResults:e.deleteResults??[],attachments:e.attachments,editMoment:e.editMoment});else i=t;let a=function(e){let t=e?.assetMaps;if(t){for(let e of t.addResults)e.success||c.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`);for(let e of t.updateResults)e.success||c.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`)}let r=e?.attachments,s={addFeatureResults:e?.addResults?.map(D)??[],updateFeatureResults:e?.updateResults?.map(D)??[],deleteFeatureResults:e?.deleteResults?.map(D)??[],addAttachmentResults:r?.addResults?r.addResults.map(D):[],updateAttachmentResults:r?.updateResults?r.updateResults.map(D):[],deleteAttachmentResults:r?.deleteResults?r.deleteResults.map(D):[]};return e?.editMoment&&(s.editMoment=e.editMoment),s}(i);if(s.length>0){a.editedFeatureResults=[];for(let e of s){let{editedFeatures:t}=e,r=t?.spatialReference?new S.A(t.spatialReference):null;a.editedFeatureResults.push({layerId:e.id,editedFeatures:Z(t,r)})}}return a}_createAttachmentErrorResult(e,t){let r=t.details.messages?.[0]||t.message,s=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new o.A("feature-layer-source:attachment-failure",r,{code:s})}}_getFormDataForAttachment(e,t){let r=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(r)for(let e in t){let s=t[e];null!=s&&(r.set?r.set(e,s):r.append(e,s))}return r}_getLayerRequestOptions(e={}){let{layer:t,layer:{parsedUrl:r,gdbVersion:s}}=this;return{...e,query:{gdbVersion:s,layer:"dynamicDataSource"in t&&t.dynamicDataSource?JSON.stringify(t.dynamicDataSource.toLayerSourceJSON()):void 0,...r.query,f:"json",...this._createRequestQueryOptions(e)},responseType:"json"}}async _areAllAssetsAlreadyMapped(e){let{layer:t}=this,{globalIdField:r,parsedUrl:s}=t,i="infoFor3D"in t?t.infoFor3D:null;if(null==i||null==r)return!1;let a=(0,U.JZ)(i);if(null==a)return!1;let o=(0,f.fj)(s.path,`../${a.id}`),u=[];for(let t of e){if(!(t.geometry.metadata.getExternalSourcesOnService(s).length>0))return!1;u.push(t)}let l=u.map(e=>e.getAttribute(r)).filter(n.Ru);if(0===l.length)return!1;let{assetMapFieldRoles:{parentGlobalId:p,assetHash:c}}=i,d=new ee.A({where:`${p} IN (${l.map(e=>`'${e}'`)})`,outFields:[c,p],returnGeometry:!1}),{features:h}=await(0,H.s)(o,d);return 0!==h.length&&!u.some(e=>{let t=e.getAttribute(r);if(!t)return!0;let{metadata:i}=e.geometry,a=h.filter(e=>e.getAttribute(p)===t);if(0===a.length)return!0;let n=a.map(e=>e.getAttribute(c));return i.getExternalSourcesOnService(s).flatMap(({source:e})=>e.assets.flatMap(e=>e.parts.map(e=>e.partHash))).some(e=>n.every(t=>e!==t))})}};(0,s.Cg)([(0,g.MZ)()],ae.prototype,"type",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],ae.prototype,"layer",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],ae.prototype,"supportedSourceTypes",void 0),(0,s.Cg)([(0,g.MZ)({readOnly:!0})],ae.prototype,"queryTask",null),ae=(0,s.Cg)([(0,g.$K)("esri.layers.graphics.sources.FeatureLayerSource")],ae);const ne=1e3},64314(e,t,r){r.d(t,{A:()=>w});var s=r(32198),i=r(69622),a=r(49186),n=r(44208),o=r(17676),u=r(84952),l=r(91429),p=r(21325),c=r(20557),d=r(2272),h=r(99614),y=r(20615),f=r(74910),m=r(78286),g=r(99199),v=r(62815),S=r(63746);class A{constructor(e){this._options=e,this.featureSet={features:[]},this.parseOnly=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._finishVertex=A._finishVertexNonPoint,this._attributesClass=null,this._previousX=0,this._previousY=0,this._point=null,this._lengths=null,this._vertex=[],this._part=null,this._parts=null,this._i=0}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(e){"string"==typeof e&&(this.featureSet.objectIdFieldName=e)}finish(){this._options.applyTransform&&(this.featureSet.transform=null);let{spatialReference:e,features:t}=this.featureSet;if(e)for(let{geometry:r}of t)r&&(r.spatialReference=e)}feature(){this._attributesClass??=(0,S._)(this.featureSet.fields?.map(e=>e.name)??[]),this.featureSet.features.push({attributes:new this._attributesClass}),this._options.applyTransform&&this._setVertexTransformer()}centroid([e,t]){this.featureSet.features.at(-1).centroid={x:e,y:t}}geometry(e,t,r){this._previousX=this._previousY=0,this._lengths=r;let s,{hasZ:i,hasM:a}=this.featureSet;switch(i??=!1,a??=!1,this._i=0,this._vertex=[0,0],i&&this._vertex.push(0),a&&this._vertex.push(0),this._finishVertex=A._finishVertexNonPoint,t){case"esriGeometryPoint":this._point={x:0,y:0},s=this._point,this._finishVertex=i?a?A._finishVertexPointXYZM:A._finishVertexPointXYZ:a?A._finishVertexPointXYM:A._finishVertexPointXY;break;case"esriGeometryMultipoint":s={points:[],hasZ:i,hasM:a},this._part=s.points,this._parts=[];break;case"esriGeometryPolyline":s={paths:[],hasZ:i,hasM:a},this._parts=s.paths,this._part=[];break;case"esriGeometryPolygon":s={rings:[],hasZ:i,hasM:a},this._parts=s.rings,this._part=[]}1===e?(this.featureSet.queryGeometry=s,this.featureSet.queryGeometryType=t,this._options.applyTransform||this._setVertexTransformer()):this.featureSet.features.at(-1).geometry=s}coord(e){let t=this._vertex;t[this._i++]=e,this._i<t.length||(this._i=0,this._transformInPlace&&(t[0]+=this._previousX,t[1]+=this._previousY,[this._previousX,this._previousY]=t,this._transformInPlace(t)),this._finishVertex(this))}curvedGeometry(e,t,r,s){let i,{hasZ:a,hasM:n}=this.featureSet;switch(a??=!1,n??=!1,e){case"esriGeometryPoint":case"esriGeometryMultipoint":throw Error(`Curved ${e} does not make sense`);case"esriGeometryPolyline":i={paths:[],curvePaths:[],hasZ:a,hasM:n},this._parts=i.curvePaths,this._part=[];break;case"esriGeometryPolygon":i={rings:[],curveRings:[],hasZ:a,hasM:n},this._parts=i.curveRings,this._part=[]}this.featureSet.features.at(-1).geometry=i}startCurvedPart(e){this._part.push(this._transform(e))}finishCurvedPart(e){this._parts.push(this._part),this._part=[]}lineSegment(e,t){this._part.push(this._transform(t))}bezierSegment(e,t,r,s){this._part.push({b:[this._transform(t),this._transformXY(r),this._transformXY(s)]})}circularArcSegment(e,t,r){this._part.push({c:[this._transform(t),this._transformXY(r)]})}ellipticArcSegment(e,t,r,s,i,a,n,o){this._part.push({a:[this._transform(t),this._transformXY(r),s,i,a,n,o]})}static _finishVertexPointXY({_point:e,_vertex:t}){[e.x,e.y]=t}static _finishVertexPointXYZ({_point:e,_vertex:t}){[e.x,e.y,e.z]=t}static _finishVertexPointXYM({_point:e,_vertex:t}){[e.x,e.y,e.m]=t}static _finishVertexPointXYZM({_point:e,_vertex:t}){[e.x,e.y,e.z,e.m]=t}static _finishVertexNonPoint(e){let{_part:t,_parts:r,_lengths:s,_vertex:i}=e;t.push([...i]),t.length<s[r.length]||(e._previousX=e._previousY=0,e._part=[],r.push(t))}_setVertexTransformer(){let{sourceSpatialReference:e}=this._options,{spatialReference:t,hasZ:r,transform:s}=this.featureSet,i=r?(0,v.d)(e,t):1;this._transformInPlace??=(0,S.M)(this.featureSet,i),this._transformInPlaceXY??=(0,S.M)({transform:s})}_transform(e){let t=[...e];return this._transformInPlace?.(t),t}_transformXY(e){let t=[e[0],e[1]];return this._transformInPlaceXY?.(t),t}}var _=r(80893),x=r(22671),b=r(97552);let w=class extends i.A{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.pbfSupportedWithCurves=!1,this.queryAttachmentsSupported=!1,this.relativeTimeBinWindow=0,this.sourceSpatialReference=null,this.timeInformation=null,this.uniqueIdFields=null,this.url=null}get parsedUrl(){return(0,u.An)(this.url)}async execute(e,t){let r=await this.executeJSON(e,t);return this.featureSetFromJSON(e,r,t)}async executeJSON(e,t){let r,s=this._normalizeQuery(e),i=null!=e.outStatistics?.[0],a=(0,n.A)("featurelayer-pbf-statistics");if(this.pbfSupported&&(!i||a)&&(!e.returnTrueCurves||this.pbfSupportedWithCurves))try{r=await async function(e,t,r,s){let i=(0,d.Dl)(e),a={...r},n=b.A.from(t),o=!n.quantizationParameters;return await(0,_.IJ)(i,n,new A({sourceSpatialReference:n.sourceSpatialReference,applyTransform:o}),a,s)}(this.url,s,t,{timeInformation:this.timeInformation,uniqueIdFields:this.uniqueIdFields})}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.pbfSupported=!1}return r??=await(0,g.e)(this.url,s,t,{timeInformation:this.timeInformation,uniqueIdFields:this.uniqueIdFields}),this._normalizeFields(r.fields),r}async featureSetFromJSON(e,t,s){if(!this._queryGet3DObjectFormat(e)||null==this.infoFor3D||!t.features)return x.A.fromJSON(t);let{meshFeatureSetFromJSON:i}=await(0,o.qr)(Promise.all([r.e(2258),r.e(8331),r.e(9855)]).then(()=>r(40050)),s);return i(e,this.infoFor3D,t)}executeForCount(e,t){return(0,y.I)(this.url,this._normalizeQuery(e),t,{timeInformation:this.timeInformation,uniqueIdFields:this.uniqueIdFields})}executeForExtent(e,t){return(0,f.L)(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return(0,m.V)(this.url,this._normalizeQuery(e),t,{timeInformation:this.timeInformation,uniqueIdFields:this.uniqueIdFields})}async executeRelationshipQuery(e,t){let[{default:s},{executeRelationshipQuery:i}]=await(0,o.qr)(Promise.all([Promise.resolve().then(()=>r(26591)),r.e(1763).then(()=>r(71763))]),t),a=s.from(e);return(this.gdbVersion||this.dynamicDataSource)&&(a=a.clone(),a.gdbVersion=a.gdbVersion||this.gdbVersion,a.dynamicDataSource=a.dynamicDataSource||this.dynamicDataSource),i(this.url,a,t)}async executeRelationshipQueryForCount(e,t){let[{default:s},{executeRelationshipQueryForCount:i}]=await(0,o.qr)(Promise.all([Promise.resolve().then(()=>r(26591)),r.e(1763).then(()=>r(71763))]),t),a=s.from(e);return(this.gdbVersion||this.dynamicDataSource)&&(a=a.clone(),a.gdbVersion=a.gdbVersion||this.gdbVersion,a.dynamicDataSource=a.dynamicDataSource||this.dynamicDataSource),i(this.url,a,t)}async executeAttachmentQuery(e,t){let{executeAttachmentQuery:s,fetchAttachments:i,processAttachmentQueryResult:a}=await(0,o.qr)(r.e(9239).then(()=>r(9239)),t),n=(0,d.Dl)(this.url);return a(n,await(this.queryAttachmentsSupported?s(n,e,t):i(n,e,t)))}async executeAttributeBinsQuery(e,t){let{executeAttributeBinsQuery:s}=await(0,o.qr)(r.e(3103).then(()=>r(33103)),t);return s(this.parsedUrl,e,t)}async executePivotQuery(e,t){let{executePivotQuery:s}=await(0,o.qr)(r.e(566).then(()=>r(80566)),t);return s(this.parsedUrl,e,t)}async executeTopFeaturesQuery(e,t){let{executeTopFeaturesQuery:s}=await(0,o.qr)(r.e(1273).then(()=>r(11273)),t);return s(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){let{executeForTopIds:s}=await(0,o.qr)(r.e(1277).then(()=>r(21277)),t);return s(this.parsedUrl,e,t)}async executeForTopExtents(e,t){let{executeForTopExtents:s}=await(0,o.qr)(r.e(8018).then(()=>r(8018)),t);return s(this.parsedUrl,e,t)}async executeForTopCount(e,t){let{executeForTopCount:s}=await(0,o.qr)(r.e(980).then(()=>r(10980)),t);return s(this.parsedUrl,e,t)}_normalizeQuery(e){let t=b.A.from(e);t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource);let{infoFor3D:r}=this,s=this._queryGet3DObjectFormat(e);if(null!=r&&s){if(t=t===e?t.clone():t,t.formatOf3DObjects=s,t.outSpatialReference&&!(0,p.aI)(t.outSpatialReference,this.sourceSpatialReference))throw new a.A("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(null==t.outFields||!t.outFields.includes("*")){t=t===e?t.clone():t,t.outFields??(t.outFields=[]);let{originX:s,originY:i,originZ:a,translationX:n,translationY:o,translationZ:u,scaleX:l,scaleY:p,scaleZ:c,rotationX:d,rotationY:h,rotationZ:y,rotationDeg:f}=r.transformFieldRoles;t.outFields.push(s,i,a,n,o,u,l,p,c,d,h,y,f)}}return t}_normalizeFields(e){if(null!=this.fieldsIndex&&null!=e)for(let t of e){let e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryGet3DObjectFormat({returnGeometry:e,multipatchOption:t,outStatistics:r}){return!0!==e||"xyFootprint"===t||r?null:(0,c.Hz)(this.infoFor3D)}};(0,s.Cg)([(0,l.MZ)({types:h.e})],w.prototype,"dynamicDataSource",void 0),(0,s.Cg)([(0,l.MZ)()],w.prototype,"fieldsIndex",void 0),(0,s.Cg)([(0,l.MZ)()],w.prototype,"gdbVersion",void 0),(0,s.Cg)([(0,l.MZ)()],w.prototype,"infoFor3D",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,s.Cg)([(0,l.MZ)()],w.prototype,"pbfSupported",void 0),(0,s.Cg)([(0,l.MZ)()],w.prototype,"pbfSupportedWithCurves",void 0),(0,s.Cg)([(0,l.MZ)()],w.prototype,"queryAttachmentsSupported",void 0),(0,s.Cg)([(0,l.MZ)()],w.prototype,"relativeTimeBinWindow",void 0),(0,s.Cg)([(0,l.MZ)()],w.prototype,"sourceSpatialReference",void 0),(0,s.Cg)([(0,l.MZ)()],w.prototype,"timeInformation",void 0),(0,s.Cg)([(0,l.MZ)()],w.prototype,"uniqueIdFields",void 0),(0,s.Cg)([(0,l.MZ)({type:String})],w.prototype,"url",void 0),w=(0,s.Cg)([(0,l.$K)("esri.layers.graphics.sources.support.QueryTask")],w)},64714(e,t,r){r.d(t,{F0:()=>o,Vx:()=>p,e2:()=>d,f:()=>f});var s=r(44208),i=r(4718),a=r(99352),n=r(93470);function o(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?n.Cb:"esriGeometryPolyline"===e?n.yM:n.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function p(e,t){if((0,s.A)("esri-csp-restrictions"))return()=>t?{[t]:null,...e}:{...e};try{let r="";t&&(r+=`this${c(t)} = null;`);for(let t in e)r+=`this${c(t)} = ${JSON.stringify(e[t])};`;let s=Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch{return()=>t?{[t]:null,...e}:{...e}}}function c(e){return u.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function d(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.o8)(e)}}]}const h={...a.F,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!1,supportsDistance:!1,supportsExtent:!1,supportsQuantization:!1,supportsQueryGeometry:!1,supportsDisjointSpatialRelationship:!1},y={...a.P,supportedStatistics:{...a.P.supportedStatistics,envelope:!1,centroid:!1,convexHull:!1}};function f(e,t,r=!1){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r?h:a.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:r?y:a.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},20615(e,t,r){r.d(t,{I:()=>n});var s=r(2272),i=r(80893),a=r(97552);function n(e,t,r,n){return(0,i.gW)((0,s.Dl)(e),a.A.from(t),r,n)}},74910(e,t,r){r.d(t,{L:()=>o});var s=r(5443),i=r(2272),a=r(80893),n=r(97552);async function o(e,t,r){let o=(0,i.Dl)(e),u=await(0,a.Jf)(o,n.A.from(t),{...r}),l=u.extent;return!l||isNaN(l.xmin)||isNaN(l.ymin)||isNaN(l.xmax)||isNaN(l.ymax)?{count:u.count,extent:null}:{count:u.count,extent:s.A.fromJSON(l)}}},78286(e,t,r){r.d(t,{V:()=>n});var s=r(2272),i=r(80893),a=r(97552);async function n(e,t,r,n){let o=(0,s.Dl)(e),u=await(0,i.Pk)(o,a.A.from(t),r,n);return u.objectIds??function(e){if(e)return function(e){return!Array.isArray(e[0])}(e)?e:e.map(e=>JSON.stringify(e))}(u.uniqueIds)??[]}},99199(e,t,r){r.d(t,{e:()=>u,s:()=>o});var s=r(2272),i=r(80893),a=r(22671),n=r(97552);async function o(e,t,r,s){let i=await u(e,t,r,s);return a.A.fromJSON(i)}function u(e,t,r,a){let o=(0,s.Dl)(e),u={...r},l=n.A.from(t);return(0,i.eW)(o,l,l.sourceSpatialReference,u,a)}},63746(e,t,r){function s(e){return class{constructor(){for(let t of e)this[t]=null}}}function i(e,t=1){let{transform:r,hasZ:s,hasM:i}=e;if(null==r)return s&&1!==t?e=>{e[2]*=t}:null;let[a,n]=function(e,t,r,s){let{scale:i,translate:a,originPosition:n}=e;return"upperLeft"===n&&(i=i.map((e,t)=>1===t?-e:e)),t&&(i=i.map((e,t)=>2===t?e*s:e),a=a.map((e,t)=>2===t?e*s:e)),!t&&r&&(i=i.filter((e,t)=>2!==t),a=a.filter((e,t)=>2!==t)),[i,a]}(r,s,i,t),o=e.hasZ?3:2;return e=>{for(let t=0;t<e.length&&(t!==o||0!==e[t]);++t)e[t]=e[t]*a[t]+n[t]}}r.d(t,{M:()=>i,_:()=>s})},2272(e,t,r){r.d(t,{Dl:()=>l,gf:()=>c,jV:()=>u,lF:()=>p});var s=r(92602),i=r(70333),a=r(4718),n=r(84952),o=r(926);function u(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function l(e){return"string"==typeof e?(0,n.An)(e):(0,a.o8)(e)}function p(e,t,r){let s={};for(let i in e){if("declaredClass"===i)continue;let a=e[i];if(null!=a&&"function"!=typeof a)if(Array.isArray(a))s[i]=a.map(e=>p(e));else if("object"==typeof a)if(a.toJSON){let e=a.toJSON(r?.[i]);s[i]=t?e:JSON.stringify(e)}else s[i]=t?a:JSON.stringify(a);else s[i]=a}return s}async function c(e,t,a){return function(e,t){return e?t&&(0,o.Qc)(e)?t:(0,o.getApiKey)(e)??i.id?.findCredential(e)?.token:null}(e,t)||(!i.id&&s.A.request.useIdentity&&await Promise.all([r.e(6361),r.e(6475),r.e(3713)]).then(()=>r(50148)),(await i.id.getCredential(e,a))?.token)}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1969],{83349(t,e,n){n.d(e,{e:()=>x});const r=new Set;let i=!1;function x(t,e,n=2){let i=e&&e.length,x=i?e[0]*n:t.length;r.size&&r.clear();let y=l(t,0,x,n,!0),o=[];if(!y||y.next===y.prev)return o;let h=0,a=0,u=0;if(i&&(y=c(t,e,y,n)),t.length>80*n){h=t[0],a=t[1];let e=h,r=a;for(let i=n;i<x;i+=n){let n=t[i],x=t[i+1];n<h&&(h=n),x<a&&(a=x),n>e&&(e=n),x>r&&(r=x)}u=Math.max(e-h,r-a),u=0===u?0:32767/u}return s(y,o,h,a,u),o}function l(t,e,n,r,i){let x=null;if(i===q(t,e,n,r)>0)for(let i=e;i<n;i+=r)x=j(i/r|0,t[i],t[i+1],x);else for(let i=n-r;i>=e;i-=r)x=j(i/r|0,t[i],t[i+1],x);return x&&L(x,x.next)&&(D(x),x=x.next),x}function y(t,e=t){let n,x=e===t,l=t;do{n=!1,l===l.next||0!==r.size&&r.has(l)||!L(l,l.next)&&0!==z(l.prev,l,l.next)?(x||l!==e)&&(l=l.next,n=!x):((x||l===e)&&(e=l.prev),i=!0,D(l),l=l.prev,n=!0)}while(n||l!==e);return e}function s(t,e,n,r,x){x&&function(t,e,n,r){let i=t,x=0;do{i.z=Z(i.x,i.y,e,n,r),T[x++]=i,i=i.next}while(i!==t);!function(t){if(t<=32)for(let e=1;e<t;e++){let t=T[e],n=t.z,r=e-1;for(;r>=0&&T[r].z>n;)T[r+1]=T[r],r--;T[r+1]=t}else{V.length<t&&(V=new Uint32Array(t),E=new Uint32Array(t),k=Array(t));for(let e=0;e<t;e++)V[e]=T[e].z;U(t,T,V,k,E,0),U(t,k,E,T,V,8),U(t,T,V,k,E,16),U(t,k,E,T,V,24)}}(x);let l=null;for(let t=0;t<x;t++){let e=T[t];e.prevZ=l,l&&(l.nextZ=e),l=e}l.nextZ=null,T.fill(null,0,x),k.fill(null,0,x)}(t,n,r,x);let l=t,s=!1;for(;t.prev!==t.next;){let f=t.prev,c=t.next;if(z(f,t,c)<0&&(x?h(t,n,r,x):o(t)))e.push(f.i,t.i,c.i),D(t),t=c,l=c;else if((t=c)===l){if(i=!1,t=y(t),i){l=t;continue}if(!s){l=t=a(t,e),s=!0;continue}u(t,e,n,r,x);break}}}function o(t){let e=t.prev,n=t,r=t.next,i=e.x,x=n.x,l=r.x,y=e.y,s=n.y,o=r.y,h=Math.min(i,x,l),a=Math.min(y,s,o),u=Math.max(i,x,l),f=Math.max(y,s,o),c=r.next;for(;c!==e;){if(c.x>=h&&c.x<=u&&c.y>=a&&c.y<=f&&(i!==c.x||y!==c.y)&&P(i,y,x,s,l,o,c.x,c.y)&&z(c.prev,c,c.next)>=0)return!1;c=c.next}return!0}function h(t,e,n,r){let i=t.prev,x=t,l=t.next,y=i.x,s=x.x,o=l.x,h=i.y,a=x.y,u=l.y,f=Math.min(y,s,o),c=Math.min(h,a,u),_=Math.max(y,s,o),d=Math.max(h,a,u),v=Z(f,c,e,n,r),w=Z(_,d,e,n,r),p=t.prevZ;for(;p&&p.z>=v;){if(p.x>=f&&p.x<=_&&p.y>=c&&p.y<=d&&p!==l&&(y!==p.x||h!==p.y)&&P(y,h,s,a,o,u,p.x,p.y)&&z(p.prev,p,p.next)>=0)return!1;p=p.prevZ}let g=t.nextZ;for(;g&&g.z<=w;){if(g.x>=f&&g.x<=_&&g.y>=c&&g.y<=d&&g!==l&&(y!==g.x||h!==g.y)&&P(y,h,s,a,o,u,g.x,g.y)&&z(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function a(t,e){let n=t,r=!1;do{let i=n.prev,x=n.next.next;B(i,n,n.next,x,!1)&&R(i,x)&&R(x,i)&&(e.push(i.i,n.i,x.i),D(n),D(n.next),n=t=x,r=!0),n=n.next}while(n!==t);return r?y(n):n}function u(t,e,n,r,i){let x=t;do{let t=x.next.next;for(;t!==x.prev;){if(x.i!==t.i&&S(x,t)){let l=I(x,t);return x=y(x,x.next),l=y(l,l.next),s(x,e,n,r,i),void s(l,e,n,r,i)}t=t.next}x=x.next}while(x!==t)}let f=!1;function c(t,e,n,i){let x=[];for(let n=0,y=e.length;n<y;n++){let s=l(t,e[n]*i,n<y-1?e[n+1]*i:t.length,i,!1);s===s.next&&r.add(s),x.push(C(s))}x.sort(_),function(t,e){let n=Math.ceil((t+2*e)/16)+e+2;v.length<4*n&&(v=new Float64Array(4*n)),w=0}(t.length/i,e.length),b(n,n),f=!0;for(let t=0;t<x.length;t++)n=d(x[t],n);return f=!1,y(n)}function _(t,e){return t.x-e.x||t.y-e.y||(t.next.y-t.y)/(t.next.x-t.x)-(e.next.y-e.y)/(e.next.x-e.x)}function d(t,e){let n=function(t,e){let n,r=e,i=t.x,x=t.y,l=-1/0;if(L(t,r))return r;for(let e=0,y=0;e<w;e++,y+=4){if(x<v[y+1]||x>v[y+3]||v[y]>i||v[y+2]<=l)continue;let s=m(e);r=M(e);do{if(r.prev.next===r){if(L(t,r.next))return r.next;if(x<=r.y&&x>=r.next.y&&r.next.y!==r.y){let t=r.x+(x-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(t<=i&&t>l&&(l=t,n=r.x<r.next.x?r:r.next,t===i))return n}}r=r.next}while(r!==s)}if(!n)return null;let y=n.x,s=n.y,o=Math.min(x,s),h=Math.max(x,s),a=1/0;for(let e=0,u=0;e<w;e++,u+=4){if(v[u+2]<y||v[u]>i||v[u+3]<o||v[u+1]>h)continue;let f=m(e);r=M(e);do{if(r.prev.next===r&&i>=r.x&&r.x>=y&&i!==r.x&&P(x<s?i:l,x,y,s,x<s?l:i,x,r.x,r.y)){let e=Math.abs(x-r.y)/(i-r.x);(R(r,t)||r.y===x&&r.next.y===x&&r.next.x>i)&&(e<a||e===a&&(r.x>n.x||r.x===n.x&&A(n,r)))&&(n=r,a=e)}r=r.next}while(r!==f)}return n}(t,e);if(!n)return e;let r=I(n,t);return b(n,r.next.next),y(r,r.next),y(n,n.next)}let v=new Float64Array,w=0;const p=[],g=[];function b(t,e){let n=t;do{let t=w++;p[t]=n;let r=1/0,i=1/0,x=-1/0,l=-1/0,y=0;do{let e=n.next;n.z=t,n.x<r&&(r=n.x),n.x>x&&(x=n.x),n.y<i&&(i=n.y),n.y>l&&(l=n.y),e.x<r&&(r=e.x),e.x>x&&(x=e.x),e.y<i&&(i=e.y),e.y>l&&(l=e.y),n=e}while(++y<16&&n!==e);g[t]=n;let s=4*t;v[s]=r,v[s+1]=i,v[s+2]=x,v[s+3]=l}while(n!==e)}function m(t){let e=g[t];for(;e.prev.next!==e;)e=e.next;return g[t]=e,e}function M(t){let e=p[t];for(;e.prev.next!==e;)e=e.next;return p[t]=e,e}function A(t,e){return z(t.prev,t,e.prev)<0&&z(e.next,t,t.next)<0}const T=[];let k=[],V=new Uint32Array,E=new Uint32Array;const N=new Uint32Array(256);function U(t,e,n,r,i,x){N.fill(0);for(let e=0;e<t;e++)N[n[e]>>>x&255]++;let l=0;for(let t=0;t<256;t++){let e=N[t];N[t]=l,l+=e}for(let l=0;l<t;l++){let t=n[l],y=N[t>>>x&255]++;r[y]=e[l],i[y]=t}}function Z(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function C(t){let e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function P(t,e,n,r,i,x,l,y){return(i-l)*(e-y)>=(t-l)*(x-y)&&(t-l)*(r-y)>=(n-l)*(e-y)&&(n-l)*(x-y)>=(i-l)*(r-y)}function S(t,e){let n=L(t,e)&&z(t.prev,t,t.next)>0&&z(e.prev,e,e.next)>0;return t.next.i!==e.i&&(n||R(t,e)&&R(e,t)&&(0!==z(t.prev,t,e.prev)||0!==z(t,e.prev,e)))&&!function(t,e){let n=Math.min(t.x,e.x),r=Math.max(t.x,e.x),i=Math.min(t.y,e.y),x=Math.max(t.y,e.y),l=t;do{let y=l.next;if(l.x>r&&y.x>r||l.x<n&&y.x<n||l.y>x&&y.y>x||l.y<i&&y.y<i)l=y;else{if(l.i!==t.i&&y.i!==t.i&&l.i!==e.i&&y.i!==e.i&&B(l,y,t,e))return!0;l=y}}while(l!==t);return!1}(t,e)&&(n||function(t,e){let n=t,r=!1,i=(t.x+e.x)/2,x=(t.y+e.y)/2;do{let t=n.next;n.y>x!=t.y>x&&i<(t.x-n.x)*(x-n.y)/(t.y-n.y)+n.x&&(r=!r),n=t}while(n!==t);return r}(t,e))}function z(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function L(t,e){return t.x===e.x&&t.y===e.y}function B(t,e,n,r,i=!0){let x=z(t,e,n),l=z(t,e,r),y=z(n,r,t),s=z(n,r,e);return(x>0&&l<0||x<0&&l>0)&&(y>0&&s<0||y<0&&s>0)||!!i&&!!(0===x&&F(t,n,e)||0===l&&F(t,r,e)||0===y&&F(n,t,r)||0===s&&F(n,e,r))}function F(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function R(t,e){return z(t.prev,t,t.next)<0?z(t,e,t.next)>=0&&z(t,t.prev,e)>=0:z(t,e,t.prev)<0||z(t,t.next,e)<0}function I(t,e){let n=W(t.i,t.x,t.y),r=W(e.i,e.x,e.y),i=t.next,x=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,x.next=r,r.prev=x,r}function j(t,e,n,r){let i=W(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function D(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ),f&&function(t,e){let n=4*t.z;e.x<v[n]&&(v[n]=e.x),e.y<v[n+1]&&(v[n+1]=e.y),e.x>v[n+2]&&(v[n+2]=e.x),e.y>v[n+3]&&(v[n+3]=e.y)}(t.prev,t.next)}function W(t,e,n){return{i:t,x:e,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function q(t,e,n,r){let i=0;for(let x=e,l=n-r;x<n;x+=r)i+=(t[l]-t[x])*(t[x+1]+t[l+1]),l=x;return i}let H,O,X,Y,$,Q=0,G=0;function J(t,e,n,r,i,x){return(n-t)*(x-e)-(r-e)*(i-t)}function K(t,e,n,r,i,x,l,y){let s=t-l,o=e-y,h=n-l,a=r-y,u=i-l,f=x-y,c=s*s+o*o,_=h*h+a*a,d=u*u+f*f,v=c+_+d;return s*(a*d-_*f)-o*(h*d-_*u)+c*(h*f-a*u)<=1e-13*v*v}function tt(t){return t-t%3+(t+1)%3}x.deviation=function(t,e,n,r){let i=e&&e.length,x=i?e[0]*n:t.length,l=Math.abs(q(t,0,x,n));if(i)for(let r=0,i=e.length;r<i;r++){let x=e[r]*n,y=r<i-1?e[r+1]*n:t.length;l-=Math.abs(q(t,x,y,n))}let y=0;for(let e=0;e<r.length;e+=3){let i=r[e]*n,x=r[e+1]*n,l=r[e+2]*n;y+=Math.abs((t[i]-t[l])*(t[x+1]-t[i+1])-(t[i]-t[x])*(t[l+1]-t[i+1]))}return 0===l&&0===y?0:Math.abs((y-l)/l)},x.flatten=function(t){let e=[],n=[],r=t[0][0].length,i=0,x=0;for(let l of t){for(let t of l)for(let n=0;n<r;n++)e.push(t[n]);x&&(i+=x,n.push(i)),x=l.length}return{vertices:e,holes:n,dimensions:r}},x.refine=function(t,e,n=2){let r=t,i=r.length;if(i<6)return;(function(t){(!H||H.length<t)&&(H=new Int32Array(t)),(!O||O.length<t)&&(O=new Int32Array(t)),(!$||$.length<t)&&($=new Uint8Array(t));let e=1;for(;e<4*t;)e<<=1;(!X||X.length<e)&&(X=new Int32Array(e),Y=new Uint32Array(e)),Q=e-1})(i),G++,O.fill(-1,0,i);let x=0;for(let t=0;t<i;t++){let e=r[t],n=r[tt(t)],i=e<n?e:n,l=e<n?n:e,y=(Math.imul(i,2654435761)^Math.imul(l,2246822507))&Q;for(;Y[y]===G;){let e=X[y];if(-1!==e){let n=r[e],s=r[tt(e)];if(n===i&&s===l||n===l&&s===i){O[t]=e,O[e]=t,X[y]=-1,$[e]=1,H[x++]=e;break}}y=y+1&Q}Y[y]!==G&&(X[y]=t,Y[y]=G)}for(;x>0;){let t=H[--x];$[t]=0;let i=O[t];if(-1===i)continue;let l=t-t%3,y=i-i%3,s=l+(t+2)%3,o=l+(t+1)%3,h=y+(i+2)%3,a=y+(i+1)%3,u=r[s],f=r[t],c=r[o],_=r[h],d=e[u*n],v=e[u*n+1],w=e[f*n],p=e[f*n+1],g=e[c*n],b=e[c*n+1],m=e[_*n],M=e[_*n+1];if(!K(d,v,w,p,g,b,m,M)&&J(d,v,w,p,m,M)>0&&J(d,v,m,M,g,b)>0){r[t]=_,r[i]=u;let e=O[h],n=O[s];O[t]=e,-1!==e&&(O[e]=t),O[i]=n,-1!==n&&(O[n]=i),O[s]=h,O[h]=s,-1!==e&&0===$[t]&&($[t]=1,H[x++]=t),-1!==n&&0===$[i]&&($[i]=1,H[x++]=i),-1!==O[o]&&0===$[o]&&($[o]=1,H[x++]=o),-1!==O[a]&&0===$[a]&&($[a]=1,H[x++]=a)}}}},15585(t,e,n){n.d(e,{If:()=>o,QT:()=>h});var r=n(32198),i=n(2741),x=n(49186),l=n(44208);n(34727);let y=null,s=null;async function o(){return y??=async function(){s=await(await n.e(2997).then(()=>n(42997))).default({locateFile:t=>(0,i.s)(`esri/core/libs/libtess/${t}`)})}(),y}function h(t,e,n=2){let i={stack:[],error:void 0,hasError:!1};try{let y=s;if(!y)throw new x.A("libtess:not-loaded","libtessF32 not loaded");let o=(0,r.mS)(i,f.from(y,t),!1),h=(0,r.mS)(i,c.from(y,e),!1),a=t.length/n*4,u=(0,r.mS)(i,new f(y,a*n),!1),_=y.triangulate(o.ptr,h.ptr,h.size,n,u.ptr,a);if((0,l.A)("esri-tessellation-debug")){let t=y.getError();0!==t&&console.warn("libtess:triangulation",function(t){switch(t){case 100903:return"Insufficient output buffer";case 100902:return"Out of memory";case 100151:return"Missing begin polygon";case 100152:return"Missing begin contour";case 100153:return"Missing end polygon";case 100154:return"Missing end countour";case 100155:return"Coordinates too large";case 100156:return"Missing combine callback";default:return`Unknown: ${t}`}}(t))}return{buffer:u.slice(0,_*n),vertexCount:_}}catch(t){i.error=t,i.hasError=!0}finally{(0,r.hk)(i)}}function a(t){return t.HEAPF32}function u(t){return t.HEAP32}new Float32Array,new Uint32Array,new Uint32Array,new Uint32Array,new Float64Array,new Uint32Array,new Uint32Array,new Uint32Array;class f{static from(t,e){let n=new f(t,e.length);return n.set(e),n}constructor(t,e){this._libtess=t,this.size=e,this.ptr=t.allocateCoordinateArray(e)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float32Array.BYTES_PER_ELEMENT}set(t){a(this._libtess).set(t,this.ptr/this.bytesPerCoordinate)}slice(t,e){let n=this.ptr/this.bytesPerCoordinate;return a(this._libtess).slice(n+t,n+e)}}Symbol.dispose;class c{static from(t,e){let n=new c(t,e.length);return n.set(e),n}constructor(t,e){this._libtess=t,this.size=e,this.ptr=t.allocateLengthsArray(e)}destroy(){this._libtess.destroyLengthsArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Int32Array.BYTES_PER_ELEMENT}set(t){u(this._libtess).set(t,this.ptr/this.bytesPerCoordinate)}slice(t,e){let n=this.ptr/this.bytesPerCoordinate;return function(t){let e=u(t);return new Uint32Array(e.buffer,e.byteOffset,e.length)}(this._libtess).slice(n+t,n+e)}}},83773(t,e,n){function r(t,e){return t.x===e.x&&t.y===e.y}function i(t){if(!t)return;let e=t.length;if(e<=1)return;let n=0;for(let i=1;i<e;i++)!r(t[i],t[n])&&++n!==i&&(t[n]=t[i]);t.length=n+1}function x(t,e){return t.x=e.y,t.y=-e.x,t}function l(t,e){return t.x=-e.y,t.y=e.x,t}function y(t,e){return t.x=e.x,t.y=e.y,t}function s(t,e){return t.x=-e.x,t.y=-e.y,t}function o(t){return Math.sqrt(t.x*t.x+t.y*t.y)}function h(t,e){return t.x*e.y-t.y*e.x}function a(t,e){return t.x*e.x+t.y*e.y}function u(t,e,n,r){return t.x=e.x*n+e.y*r,t.y=e.x*r-e.y*n,t}n.d(e,{i:()=>f});class f{constructor(t,e,n){this._writeVertex=t,this._writeTriangle=e,this._canUseThinTessellation=n,this._prevNormal={x:void 0,y:void 0},this._nextNormal={x:void 0,y:void 0},this._textureNormalLeft={x:0,y:1},this._textureNormalRight={x:0,y:-1},this._textureNormal={x:void 0,y:void 0},this._joinNormal={x:void 0,y:void 0},this._inner={x:void 0,y:void 0},this._outer={x:void 0,y:void 0},this._roundStart={x:void 0,y:void 0},this._roundEnd={x:void 0,y:void 0},this._startBreak={x:void 0,y:void 0},this._endBreak={x:void 0,y:void 0},this._innerPrev={x:void 0,y:void 0},this._innerNext={x:void 0,y:void 0},this._bevelStart={x:void 0,y:void 0},this._bevelEnd={x:void 0,y:void 0},this._bevelMiddle={x:void 0,y:void 0}}tessellate(t,e,n=this._canUseThinTessellation){i(t),n&&e.halfWidth<1.05&&!e.offset?this._tessellateThin(t,e):this._tessellate(t,e)}_tessellateThin(t,e){if(t.length<2)return;let n=e.wrapDistance||65535,r=e.initialDistance||0,i=!1,x=t[0].x,l=t[0].y,y=t.length;for(let e=1;e<y;++e){i&&(i=!1,r=0);let y=t[e].x,s=t[e].y,o=y-x,h=s-l,a=Math.sqrt(o*o+h*h);if(o/=a,h/=a,r+a>n){i=!0;let t=(n-r)/a;a=n-r,y=(1-t)*x+t*y,s=(1-t)*l+t*s,--e}let u=this._writeVertex(x,l,0,0,o,h,h,-o,0,-1,r),f=this._writeVertex(x,l,0,0,o,h,-h,o,0,1,r);r+=a;let c=this._writeVertex(y,s,0,0,o,h,h,-o,0,-1,r),_=this._writeVertex(y,s,0,0,o,h,-h,o,0,1,r);this._writeTriangle(u,f,c),this._writeTriangle(f,c,_),x=y,l=s}}_tessellate(t,e){let n=t[0],i=t[t.length-1],f=r(n,i),c=f?3:2;if(t.length<c)return;let _,d,v,w,p,g=e.pixelCoordRatio,b=null==e.capType?0:e.capType,m=null==e.joinType?2:e.joinType,M=null==e.miterLimit?2:Math.min(e.miterLimit,4),A=null==e.roundLimit?1.05:Math.min(e.roundLimit,1.05),T=null==e.halfWidth?2:e.halfWidth,k=!!e.textured,V=null,E=this._prevNormal,N=this._nextNormal,U=-1,Z=-1,C=this._joinNormal,P=this._textureNormalLeft,S=this._textureNormalRight,z=this._textureNormal,L=-1,B=-1,F=e.wrapDistance||65535,R=e.initialDistance||0,I=this._writeVertex,j=this._writeTriangle,D=(t,e,n,r,i,x)=>{let l=I(d,v,w,p,n,r,t,e,i,x,R);return L>=0&&B>=0&&l>=0&&j(L,B,l),L=B,B=l,l};f&&(_=t[t.length-2],N.x=i.x-_.x,N.y=i.y-_.y,Z=o(N),N.x/=Z,N.y/=Z);let W=!1;for(let e=0;e<t.length;++e){if(W&&(W=!1,R=0),_&&(E.x=-N.x,E.y=-N.y,U=Z,R+U>F&&(W=!0)),W){let n=(F-R)/U;U=F-R,_={x:(1-n)*_.x+n*t[e].x,y:(1-n)*_.y+n*t[e].y},--e}else _=t[e];d=_.x,v=_.y;let n=e<=0&&!W,r=e===t.length-1;if(n||(R+=U),V=r?f?t[1]:null:t[e+1],V?(N.x=V.x-d,N.y=V.y-v,Z=o(N),N.x/=Z,N.y/=Z):(N.x=void 0,N.y=void 0),!f){if(n){l(C,N),w=C.x,p=C.y,2===b&&(D(-N.y-N.x,N.x-N.y,N.x,N.y,0,-1),D(N.y-N.x,-N.x-N.y,N.x,N.y,0,1)),1===b&&(D(-N.y-N.x,N.x-N.y,N.x,N.y,-1,-1),D(N.y-N.x,-N.x-N.y,N.x,N.y,-1,1)),(1===b||0===b)&&(D(-N.y,N.x,N.x,N.y,0,-1),D(N.y,-N.x,N.x,N.y,0,1));continue}if(r){x(C,E),w=C.x,p=C.y,(1===b||0===b)&&(D(E.y,-E.x,-E.x,-E.y,0,-1),D(-E.y,E.x,-E.x,-E.y,0,1)),2===b&&(D(E.y-E.x,-E.x-E.y,-E.x,-E.y,0,-1),D(-E.y-E.x,E.x-E.y,-E.x,-E.y,0,1)),1===b&&(D(E.y-E.x,-E.x-E.y,-E.x,-E.y,1,-1),D(-E.y-E.x,E.x-E.y,-E.x,-E.y,1,1));continue}}let i,c,I=-h(E,N);if(Math.abs(I)<.01)a(E,N)>0?(C.x=E.x,C.y=E.y,I=1,i=Number.MAX_VALUE,c=!0):(l(C,N),I=1,i=1,c=!1);else{C.x=(E.x+N.x)/I,C.y=(E.y+N.y)/I,i=o(C);let t=(i-1)*T*g;c=i>4||t>U&&t>Z}w=C.x,p=C.y;let j=m;switch(m){case 0:i<1.05&&(j=2);break;case 1:i<A&&(j=2);break;case 2:i>M&&(j=0)}switch(j){case 2:if(D(C.x,C.y,-E.x,-E.y,0,-1),D(-C.x,-C.y,-E.x,-E.y,0,1),r)break;if(k){let t=W?0:R;L=this._writeVertex(d,v,w,p,N.x,N.y,C.x,C.y,0,-1,t),B=this._writeVertex(d,v,w,p,N.x,N.y,-C.x,-C.y,0,1,t)}break;case 0:{let t,e,n,i,o=I<0;if(o){let n=L;L=B,B=n,t=P,e=S}else t=S,e=P;if(c)n=o?l(this._innerPrev,E):x(this._innerPrev,E),i=o?x(this._innerNext,N):l(this._innerNext,N);else{let t=o?s(this._inner,C):y(this._inner,C);n=t,i=t}let h=o?x(this._bevelStart,E):l(this._bevelStart,E);D(n.x,n.y,-E.x,-E.y,t.x,t.y);let a=D(h.x,h.y,-E.x,-E.y,e.x,e.y);if(r)break;let f=o?l(this._bevelEnd,N):x(this._bevelEnd,N);if(c){let n=this._writeVertex(d,v,w,p,-E.x,-E.y,0,0,0,0,R);L=this._writeVertex(d,v,w,p,N.x,N.y,i.x,i.y,t.x,t.y,R),B=this._writeVertex(d,v,w,p,N.x,N.y,f.x,f.y,e.x,e.y,R),this._writeTriangle(a,n,B)}else{if(k){let e=this._bevelMiddle;e.x=(h.x+f.x)/2,e.y=(h.y+f.y)/2,u(z,e,-E.x,-E.y),D(e.x,e.y,-E.x,-E.y,z.x,z.y),u(z,e,N.x,N.y),L=this._writeVertex(d,v,w,p,N.x,N.y,e.x,e.y,z.x,z.y,R),B=this._writeVertex(d,v,w,p,N.x,N.y,i.x,i.y,t.x,t.y,R)}else{let t=L;L=B,B=t}D(f.x,f.y,N.x,N.y,e.x,e.y)}if(o){let t=L;L=B,B=t}break}case 1:{let t,e,n=I<0;if(n){let n=L;L=B,B=n,t=P,e=S}else t=S,e=P;let o,h,f=n?s(this._inner,C):y(this._inner,C);c?(o=n?l(this._innerPrev,E):x(this._innerPrev,E),h=n?x(this._innerNext,N):l(this._innerNext,N)):(o=f,h=f);let _=n?x(this._roundStart,E):l(this._roundStart,E),g=n?l(this._roundEnd,N):x(this._roundEnd,N),b=D(o.x,o.y,-E.x,-E.y,t.x,t.y),m=D(_.x,_.y,-E.x,-E.y,e.x,e.y);if(r)break;let M=this._writeVertex(d,v,w,p,-E.x,-E.y,0,0,0,0,R);c||this._writeTriangle(L,B,M);let A,T,V=s(this._outer,f),U=this._writeVertex(d,v,w,p,N.x,N.y,g.x,g.y,e.x,e.y,R),Z=i>2;if(Z){let t;i===Number.MAX_VALUE?t=-1:(V.x/=i,V.y/=i,t=a(E,V),t=(i*(t*t-1)+1)/t),A=n?x(this._startBreak,E):l(this._startBreak,E),A.x+=E.x*t,A.y+=E.y*t,T=n?l(this._endBreak,N):x(this._endBreak,N),T.x+=N.x*t,T.y+=N.y*t}u(z,V,-E.x,-E.y);let F=this._writeVertex(d,v,w,p,-E.x,-E.y,V.x,V.y,z.x,z.y,R);u(z,V,N.x,N.y);let j=k?this._writeVertex(d,v,w,p,N.x,N.y,V.x,V.y,z.x,z.y,R):F,W=M,q=k?this._writeVertex(d,v,w,p,N.x,N.y,0,0,0,0,R):M,H=-1,O=-1;if(Z&&(u(z,A,-E.x,-E.y),H=this._writeVertex(d,v,w,p,-E.x,-E.y,A.x,A.y,z.x,z.y,R),u(z,T,N.x,N.y),O=this._writeVertex(d,v,w,p,N.x,N.y,T.x,T.y,z.x,z.y,R)),k?Z?(this._writeTriangle(W,m,H),this._writeTriangle(W,H,F),this._writeTriangle(q,j,O),this._writeTriangle(q,O,U)):(this._writeTriangle(W,m,F),this._writeTriangle(q,j,U)):Z?(this._writeTriangle(M,m,H),this._writeTriangle(M,H,O),this._writeTriangle(M,O,U)):(this._writeTriangle(M,m,F),this._writeTriangle(M,j,U)),c?(L=this._writeVertex(d,v,w,p,N.x,N.y,h.x,h.y,t.x,t.y,R),B=U):(L=k?this._writeVertex(d,v,w,p,N.x,N.y,h.x,h.y,t.x,t.y,R):b,this._writeTriangle(L,q,U),B=U),n){let t=L;L=B,B=t}break}}}}}}}]);