@arcgis/core 4.34.0-next.23 → 4.34.0-next.25

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 (438) hide show
  1. package/Basemap.js +1 -1
  2. package/analysis/VolumeMeasurement/CutFillOptions.d.ts +4 -0
  3. package/analysis/VolumeMeasurement/CutFillOptions.js +1 -1
  4. package/analysis/VolumeMeasurementAnalysis.js +1 -1
  5. package/applications/Components/imageryUtils.d.ts +4 -0
  6. package/applications/Components/imageryUtils.js +5 -0
  7. package/arcade/parser.js +1 -1
  8. package/arcade/validation/arcadeValidator.js +1 -1
  9. package/assets/esri/core/workers/RemoteClient.js +1 -1
  10. package/assets/esri/core/workers/chunks/026fbeb0ff5b9e6c74df.js +1 -0
  11. package/assets/esri/core/workers/chunks/{0867aa688fa8938906da.js → 03bef3f4b6b09b1e864b.js} +1 -1
  12. package/assets/esri/core/workers/chunks/06cdbccc9f325dcc303d.js +1 -0
  13. package/assets/esri/core/workers/chunks/07613c89255bdab6b7c6.js +1 -0
  14. package/assets/esri/core/workers/chunks/09618761df5c4fdd52a0.js +1 -0
  15. package/assets/esri/core/workers/chunks/0ae00339991f5387203e.js +1 -0
  16. package/assets/esri/core/workers/chunks/0b4b294f3ce74fde5620.js +1 -0
  17. package/assets/esri/core/workers/chunks/{146520d263b910b5bdc7.js → 0e96a3b7228f1ff8e6c5.js} +1 -1
  18. package/assets/esri/core/workers/chunks/109ef17dd4f9430bb686.js +1 -0
  19. package/assets/esri/core/workers/chunks/1597aca21334cab3b802.js +1 -0
  20. package/assets/esri/core/workers/chunks/196564ad230bef6b59cf.js +1 -0
  21. package/assets/esri/core/workers/chunks/19f8d551cbebc11db1eb.js +1 -0
  22. package/assets/esri/core/workers/chunks/1ceee047e3fa617b0600.js +1 -0
  23. package/assets/esri/core/workers/chunks/1d27701832ea139fcc20.js +1 -0
  24. package/assets/esri/core/workers/chunks/1f296f85becf1ca6714d.js +1 -0
  25. package/assets/esri/core/workers/chunks/1f8d7bd44d53c30df383.js +1 -0
  26. package/assets/esri/core/workers/chunks/1fabb5ec59da698c1618.js +1 -0
  27. package/assets/esri/core/workers/chunks/{919d2fd7ebc0c840a759.js → 219b2911668db120452b.js} +1 -1
  28. package/assets/esri/core/workers/chunks/234cbc290b074eeb5dd6.js +1 -0
  29. package/assets/esri/core/workers/chunks/29ae5723fa35aa73ff9b.js +1 -0
  30. package/assets/esri/core/workers/chunks/2b4b073254fe8b6a081c.js +1 -0
  31. package/assets/esri/core/workers/chunks/30293b88501b5d6162fc.js +1 -0
  32. package/assets/esri/core/workers/chunks/31533f5e8b76b307f61c.js +1 -0
  33. package/assets/esri/core/workers/chunks/347117e61e1c6edd074f.js +1 -0
  34. package/assets/esri/core/workers/chunks/3616eb2607843524483f.js +1 -0
  35. package/assets/esri/core/workers/chunks/36648facd56ee91afc7c.js +1 -0
  36. package/assets/esri/core/workers/chunks/394477e88be0c6790f02.js +1 -0
  37. package/assets/esri/core/workers/chunks/3b80b01551d124534a1b.js +1 -0
  38. package/assets/esri/core/workers/chunks/{89d91ce2f566dd3f57f7.js → 3be9ec0503a669bcfce6.js} +1 -1
  39. package/assets/esri/core/workers/chunks/3c9cf06ac6aa1db6c4f6.js +1 -0
  40. package/assets/esri/core/workers/chunks/40fc7c43feaeef8b814d.js +1 -0
  41. package/assets/esri/core/workers/chunks/42cddc8f8c8d73e22ee2.js +1 -0
  42. package/assets/esri/core/workers/chunks/437a4100a837ee16df7c.js +1 -0
  43. package/assets/esri/core/workers/chunks/{63cc4647b7775ff8aedf.js → 44d28849e59f62616e72.js} +1 -1
  44. package/assets/esri/core/workers/chunks/453e536f566d80a9863b.js +1 -0
  45. package/assets/esri/core/workers/chunks/472c677a74d779ce62d7.js +1 -0
  46. package/assets/esri/core/workers/chunks/4b68b6985430c42316b7.js +1 -0
  47. package/assets/esri/core/workers/chunks/{6bb1ecaa0afc2c7de79e.js → 4cc3eeb0b824c53793d0.js} +1 -1
  48. package/assets/esri/core/workers/chunks/4ce671bc4d36387b55fa.js +1 -0
  49. package/assets/esri/core/workers/chunks/51cfa2f70ec222e1582b.js +1 -0
  50. package/assets/esri/core/workers/chunks/5284d46aecd6fe0345b8.js +1 -0
  51. package/assets/esri/core/workers/chunks/567385709e18ace93b1e.js +1 -0
  52. package/assets/esri/core/workers/chunks/5a9b27f2b343cd5b0852.js +1 -0
  53. package/assets/esri/core/workers/chunks/{4c2f3e43992a918e4c2d.js → 5ef3256c32c4b622bd11.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{5ce62d9fff80d014d186.js → 60aeb7a5ccd8bc71be02.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{55e9b02d70812f7cdac2.js → 63966066a963e9a1fb14.js} +1 -1
  56. package/assets/esri/core/workers/chunks/63f50ff2ae94f684d56b.js +1 -0
  57. package/assets/esri/core/workers/chunks/{8bf04be4052bf148777a.js → 6a1cf6b0ffdf6080b5c4.js} +1 -1
  58. package/assets/esri/core/workers/chunks/6deaa08e3a61a455e564.js +1 -0
  59. package/assets/esri/core/workers/chunks/6e9b4bfe2a1497c96100.js +1 -0
  60. package/assets/esri/core/workers/chunks/6efc3d120c9c2c09cb06.js +1 -0
  61. package/assets/esri/core/workers/chunks/7338ce95bceb2c7fab87.js +1 -0
  62. package/assets/esri/core/workers/chunks/{c64fa94cba71ba2794e2.js → 771012f129890f9a089c.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{d1b363c418a67b087306.js → 780ff9314f26ae62f75f.js} +1 -1
  64. package/assets/esri/core/workers/chunks/820cf4337b248a0cb63c.js +1 -0
  65. package/assets/esri/core/workers/chunks/{b57c0ef7bc57e3c91257.js → 865fccacf44ae5b70eba.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{fedbf639a0788417a70f.js → 86abfce1f2ac93cc4d54.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{c94cc026c4ed330408fb.js → 8894483b91bcda845b6f.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{f050ab9d100012b77bb9.js → 8c5b1114cc2a58305a81.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{6ca764b4baadef5c1515.js → 92737419b66894799a34.js} +1 -1
  70. package/assets/esri/core/workers/chunks/9511e55e4fabb3235eac.js +1 -0
  71. package/assets/esri/core/workers/chunks/{f43110391f124b8a179c.js → 9a78cb291c966f8ddda6.js} +2 -2
  72. package/assets/esri/core/workers/chunks/9f8341caab3b1d02f387.js +1 -0
  73. package/assets/esri/core/workers/chunks/a08d018d8c137fc4ca17.js +1 -0
  74. package/assets/esri/core/workers/chunks/{7051bcc178eb512819f6.js → a55338add265d330124b.js} +1 -1
  75. package/assets/esri/core/workers/chunks/afe4fd3b1b3521712edd.js +1 -0
  76. package/assets/esri/core/workers/chunks/{9991bd3c7991bffd8260.js → b37f3c416cefc1a6ea2c.js} +1 -1
  77. package/assets/esri/core/workers/chunks/{6782114a752b9cc59168.js → b6b8272a74a5c24a6b86.js} +1 -1
  78. package/assets/esri/core/workers/chunks/b9f66d735a7e63417b3d.js +1 -0
  79. package/assets/esri/core/workers/chunks/bb50b4a3af627f91d789.js +1 -0
  80. package/assets/esri/core/workers/chunks/{f42155b7a4e6c5e80757.js → bbc2a4976d044b990193.js} +1 -1
  81. package/assets/esri/core/workers/chunks/bbf2c31d217de1b8ba6e.js +1 -0
  82. package/assets/esri/core/workers/chunks/be3977f7fe0c46a1b493.js +1 -0
  83. package/assets/esri/core/workers/chunks/befba7ceeb26a38732c1.js +1 -0
  84. package/assets/esri/core/workers/chunks/bf3fc71881aa559fc931.js +1 -0
  85. package/assets/esri/core/workers/chunks/c19421707257fc93acb9.js +1 -0
  86. package/assets/esri/core/workers/chunks/c1fb5290e0e259b74389.js +1 -0
  87. package/assets/esri/core/workers/chunks/c361bf4d41a1843d4640.js +1 -0
  88. package/assets/esri/core/workers/chunks/c51099eab5a99c88e5de.js +1 -0
  89. package/assets/esri/core/workers/chunks/c56b05a8be498b6f3ee7.js +1 -0
  90. package/assets/esri/core/workers/chunks/c82e78590c2fabc67609.js +1 -0
  91. package/assets/esri/core/workers/chunks/{cab1a1067f44ce374673.js → c9e580867f7ac17be329.js} +1 -1
  92. package/assets/esri/core/workers/chunks/{92ad9098006568358550.js → cafcb46d723d38b377a9.js} +1 -1
  93. package/assets/esri/core/workers/chunks/{1d75cb1747ffb7b8b050.js → cb81d448ed6bad205346.js} +1 -1
  94. package/assets/esri/core/workers/chunks/{0f6203ae32663b2b52db.js → d08a523b548e892e1222.js} +1 -1
  95. package/assets/esri/core/workers/chunks/d29ae64703a947bfb83b.js +1 -0
  96. package/assets/esri/core/workers/chunks/d2ce360961ca4b58666c.js +1 -0
  97. package/assets/esri/core/workers/chunks/{04c17957c15234ca0321.js → d81260303a11d3fbe940.js} +1 -1
  98. package/assets/esri/core/workers/chunks/de1457b07f4e263f1524.js +1 -0
  99. package/assets/esri/core/workers/chunks/{6bf43bc3714d7b3878fa.js → e547318638c8f496c1a0.js} +1 -1
  100. package/assets/esri/core/workers/chunks/e8e993fb8697b8f3e0c7.js +346 -0
  101. package/assets/esri/core/workers/chunks/{53781ccca16e53d4a8c3.js → f291ccf9da6aa7d7ae23.js} +1 -1
  102. package/assets/esri/core/workers/chunks/f61a8cc7e2b198e521ba.js +1 -0
  103. package/assets/esri/core/workers/chunks/f9442a281cb91c64c7cd.js +1 -0
  104. package/assets/esri/core/workers/chunks/fb785bc38323cce6e549.js +1 -0
  105. package/assets/esri/core/workers/chunks/{c3213b487c11076985af.js → fbf3240b36718fa5dc76.js} +1 -1
  106. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  107. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  108. package/chunks/Bufferer-Dw9Qi4T1.js +1 -1
  109. package/chunks/ComponentShader.glsl.js +36 -36
  110. package/chunks/Envelope.js +1 -1
  111. package/chunks/MultiPathImpl.js +1 -1
  112. package/chunks/OperatorClip.js +1 -1
  113. package/chunks/ProjectionTransformation.js +1 -1
  114. package/chunks/RibbonLine.glsl.js +40 -33
  115. package/chunks/index.js +1 -1
  116. package/chunks/persistableUrlUtils.js +1 -1
  117. package/config.js +1 -1
  118. package/core/AsyncUpdate.js +1 -1
  119. package/core/Clonable.js +1 -1
  120. package/core/Evented.js +1 -1
  121. package/core/Identifiable.js +1 -1
  122. package/core/JSONSupport.js +1 -1
  123. package/core/Loadable.js +1 -1
  124. package/core/MapUtils.js +1 -1
  125. package/core/MemCache.js +1 -1
  126. package/core/MemCachePool.js +1 -1
  127. package/core/MultiOriginJSONSupport.js +1 -1
  128. package/core/ObjectPool.js +1 -1
  129. package/core/Promise.js +1 -1
  130. package/core/ReadOnlyMultiOriginJSONSupport.js +1 -1
  131. package/core/accessorSupport/overrideDefaultsFrom.js +1 -1
  132. package/core/quantity.d.ts +1 -0
  133. package/geometry/operators/gx/operatorOffset.js +1 -1
  134. package/geometry/operators/support/jsonConverter.js +1 -1
  135. package/geometry/support/buffer/BufferPool.js +1 -1
  136. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  137. package/interfaces.d.ts +211 -8
  138. package/kernel.js +1 -1
  139. package/layers/CatalogLayer.js +1 -1
  140. package/layers/FeatureLayer.js +1 -1
  141. package/layers/GeoJSONLayer.js +1 -1
  142. package/layers/SubtypeGroupLayer.js +1 -1
  143. package/layers/knowledgeGraph/KnowledgeGraphSublayerBase.js +1 -1
  144. package/layers/mixins/APIKeyMixin.js +1 -1
  145. package/layers/mixins/ArcGISCachedService.js +1 -1
  146. package/layers/mixins/ArcGISImageService.js +1 -1
  147. package/layers/mixins/ArcGISMapService.js +1 -1
  148. package/layers/mixins/ArcGISService.js +1 -1
  149. package/layers/mixins/BlendLayer.js +1 -1
  150. package/layers/mixins/CustomParametersMixin.js +1 -1
  151. package/layers/mixins/DisplayFilteredLayer.js +1 -1
  152. package/layers/mixins/EditBusLayer.js +1 -1
  153. package/layers/mixins/FeatureEffectLayer.js +1 -1
  154. package/layers/mixins/FeatureLayerBase.js +1 -1
  155. package/layers/mixins/FeatureReductionLayer.js +1 -1
  156. package/layers/mixins/ImageryTileMixin.js +1 -1
  157. package/layers/mixins/OperationalLayer.js +1 -1
  158. package/layers/mixins/OrderedLayer.js +1 -1
  159. package/layers/mixins/PortalLayer.js +1 -1
  160. package/layers/mixins/PublishableLayer.js +1 -1
  161. package/layers/mixins/RasterJobHandlerMixin.js +1 -1
  162. package/layers/mixins/RasterPresetRendererMixin.js +1 -1
  163. package/layers/mixins/RefreshableLayer.js +1 -1
  164. package/layers/mixins/ScaleRangeLayer.js +1 -1
  165. package/layers/mixins/SceneService.js +1 -1
  166. package/layers/mixins/SublayersOwner.js +1 -1
  167. package/layers/mixins/TemporalLayer.js +1 -1
  168. package/layers/mixins/TemporalSceneLayer.js +1 -1
  169. package/layers/mixins/TrackableLayer.js +1 -1
  170. package/layers/ogc/wfsUtils.js +1 -1
  171. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  172. package/layers/orientedImagery/core/bestImageUtils.js +1 -1
  173. package/layers/support/ControlPointsGeoreference.js +1 -1
  174. package/layers/support/PixelBlock.js +1 -1
  175. package/layers/support/RasterJobHandler.js +1 -1
  176. package/layers/support/RasterWorker.js +1 -1
  177. package/layers/support/Sublayer.js +1 -1
  178. package/layers/support/arcgisLayerUrl.js +1 -1
  179. package/layers/support/multiLayerServiceUtils.js +1 -1
  180. package/layers/support/rasterDatasets/pixelReader.js +5 -0
  181. package/layers/support/rasterFormats/pixelRangeUtils.js +1 -1
  182. package/layers/support/rasterFunctions/clipUtils.js +1 -1
  183. package/layers/support/rasterFunctions/pixelUtils.js +1 -1
  184. package/layers/support/rasterFunctions/rasterFunctionHelper.js +1 -1
  185. package/layers/video/VideoController.js +1 -1
  186. package/networks/support/UtilityNetworkLookupHelper.js +1 -1
  187. package/package.json +1 -1
  188. package/renderers/mixins/VisualVariablesMixin.js +1 -1
  189. package/renderers/support/DictionaryControlString.js +1 -1
  190. package/rest/support/CameraInfoMixin.js +1 -1
  191. package/rest/support/NormalizationBinParametersMixin.js +1 -1
  192. package/smartMapping/renderers/color.js +1 -1
  193. package/smartMapping/renderers/heatmap.js +1 -1
  194. package/smartMapping/renderers/pieChart.js +1 -1
  195. package/smartMapping/renderers/size.js +1 -1
  196. package/smartMapping/renderers/support/regenerateUtils.js +1 -1
  197. package/smartMapping/renderers/support/rendererUtils.js +1 -1
  198. package/smartMapping/renderers/type.js +1 -1
  199. package/smartMapping/symbology/color.js +1 -1
  200. package/smartMapping/symbology/support/utils.js +1 -1
  201. package/support/LayersMixin.js +1 -1
  202. package/support/TablesMixin.js +1 -1
  203. package/support/revision.js +1 -1
  204. package/symbols/cim/cimAnalyzer.js +1 -1
  205. package/symbols/support/utils.js +1 -1
  206. package/views/2d/engine/ParentChildStage.js +1 -1
  207. package/views/2d/engine/webgl/VideoScreenRenderer.js +1 -1
  208. package/views/2d/engine/webgl/meshing/Mesh.js +1 -1
  209. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterInputEvaluator.js +1 -1
  210. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/MultiRasterMixin.js +1 -1
  211. package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js +1 -1
  212. package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
  213. package/views/2d/engine/webgl/textureUtils.js +1 -1
  214. package/views/2d/layers/BitmapTileLayerView2D.js +1 -1
  215. package/views/2d/layers/LayerView2D.js +1 -1
  216. package/views/2d/layers/MediaLayerView2D.js +1 -1
  217. package/views/2d/layers/TileLayerView2D.js +1 -1
  218. package/views/2d/layers/features/FeatureContainer.js +1 -1
  219. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  220. package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
  221. package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
  222. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  223. package/views/2d/layers/features/support/FeatureFilterEvaluator.js +1 -1
  224. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  225. package/views/2d/layers/support/DebugOverlay.js +1 -1
  226. package/views/3d/analysis/AnalysisView3D.js +1 -1
  227. package/views/3d/analysis/VolumeMeasurement/CutFillVolumeMeasurementController.js +5 -0
  228. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  229. package/views/3d/analysis/images/heading-rotate-svg.js +1 -1
  230. package/views/3d/analysis/images/tilt-rotate-svg.js +1 -1
  231. package/views/3d/glTF/DefaultLoadingContext.js +1 -1
  232. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  233. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  234. package/views/3d/layers/BuildingSublayerView3D.js +1 -1
  235. package/views/3d/layers/ElevationLayerView3D.js +1 -1
  236. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  237. package/views/3d/layers/FlowSubView3D.js +1 -1
  238. package/views/3d/layers/I3SMeshView3D.js +1 -1
  239. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  240. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  241. package/views/3d/layers/LayerView3D.js +1 -1
  242. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  243. package/views/3d/layers/StreamLayerView3D.js +1 -1
  244. package/views/3d/layers/TiledLayerView3D.js +1 -1
  245. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  246. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  247. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  248. package/views/3d/layers/graphics/Labeler.js +1 -1
  249. package/views/3d/layers/graphics/StreamController.js +5 -0
  250. package/views/3d/layers/graphics/StreamGraphics3DGraphicsPipeline.js +1 -1
  251. package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
  252. package/views/3d/layers/graphics/pipeline/Tile3DManager.js +1 -1
  253. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  254. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  255. package/views/3d/layers/i3s/I3SNodeLoader.js +1 -1
  256. package/views/3d/layers/support/DefinitionExpressionSceneLayerView.js +1 -1
  257. package/views/3d/layers/support/PopupSceneLayerView.js +1 -1
  258. package/views/3d/layers/support/TemporalSceneLayerView.js +1 -1
  259. package/views/3d/layers/support/fetchTile.js +1 -1
  260. package/views/3d/state/ViewStateManager.js +1 -1
  261. package/views/3d/support/MemoryController.js +1 -1
  262. package/views/3d/support/ResourceController.js +1 -1
  263. package/views/3d/support/StreamDataLoader.js +1 -1
  264. package/views/3d/support/StreamDataRequester.js +5 -0
  265. package/views/3d/support/StreamTextureCollection.js +1 -1
  266. package/views/3d/support/engineContent/line.js +1 -1
  267. package/views/3d/support/flow/FlowSubViewExtent3D.js +1 -1
  268. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  269. package/views/3d/support/flow/StreamlinesResources3D.js +1 -1
  270. package/views/3d/support/flow/geometryUtils.js +1 -1
  271. package/views/3d/support/index.js +1 -1
  272. package/views/3d/terrain/OverlayRenderer.js +1 -1
  273. package/views/3d/terrain/TerrainRenderer.js +1 -1
  274. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  275. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
  276. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +3 -3
  277. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  278. package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
  279. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  280. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  281. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  282. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  283. package/views/3d/webgl-engine/lib/VertexAttribute.js +1 -1
  284. package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
  285. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  286. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  287. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  288. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  289. package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +17 -0
  290. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  291. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  292. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  293. package/views/BreakpointsOwner.js +1 -1
  294. package/views/DOMContainer.js +1 -1
  295. package/views/PopupView.js +1 -1
  296. package/views/VideoView.js +1 -1
  297. package/views/Viewport2DBaseMixin.js +1 -1
  298. package/views/Viewport2DMixin.js +1 -1
  299. package/views/draw/DrawGraphicTool.js +1 -1
  300. package/views/draw/DrawScreenTool.js +1 -1
  301. package/views/draw/DrawTool.js +1 -1
  302. package/views/draw/MultipointDrawAction.js +1 -1
  303. package/views/draw/PointDrawAction.js +1 -1
  304. package/views/draw/PolygonDrawAction.js +1 -1
  305. package/views/draw/PolylineDrawAction.js +1 -1
  306. package/views/interactive/tooltip/infos/TooltipInfoWithCoordinates.js +1 -1
  307. package/views/layers/CatalogDynamicGroupLayerView.js +1 -1
  308. package/views/layers/CatalogFootprintLayerView.js +1 -1
  309. package/views/layers/CatalogLayerView.js +1 -1
  310. package/views/layers/DimensionLayerView.js +1 -1
  311. package/views/layers/FeatureLayerView.js +1 -1
  312. package/views/layers/ImageryLayerView.js +1 -1
  313. package/views/layers/ImageryTileLayerView.js +1 -1
  314. package/views/layers/LineOfSightLayerView.js +1 -1
  315. package/views/layers/MapImageLayerView.js +1 -1
  316. package/views/layers/MediaLayerView.js +1 -1
  317. package/views/layers/OGCFeatureLayerView.js +1 -1
  318. package/views/layers/PointCloudLayerView.js +1 -1
  319. package/views/layers/RefreshableLayerView.js +1 -1
  320. package/views/layers/StreamLayerView.js +1 -1
  321. package/views/layers/ViewshedLayerView.js +1 -1
  322. package/views/layers/WMSLayerView.js +1 -1
  323. package/views/magnifier/mask-svg.js +1 -1
  324. package/views/magnifier/overlay-svg.js +1 -1
  325. package/views/support/Scheduler.js +1 -1
  326. package/views/video/VideoOperationalDataView.js +1 -1
  327. package/views/webgl/BufferObject.js +1 -1
  328. package/views/webgl/Program.js +1 -1
  329. package/views/webgl/Renderbuffer.js +1 -1
  330. package/views/webgl/Texture.js +1 -1
  331. package/views/webgl/Util.js +1 -1
  332. package/webmap/Bookmark.js +1 -1
  333. package/webscene/SunLighting.js +1 -1
  334. package/webscene/VirtualLighting.js +1 -1
  335. package/webscene/spec-certification/spec.js +1 -1
  336. package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
  337. package/widgets/BasemapLayerList.js +1 -1
  338. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  339. package/widgets/Directions/DirectionsSearchTool.js +1 -1
  340. package/widgets/Editor/EditorViewModel.js +1 -1
  341. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  342. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  343. package/widgets/Editor/support/SketchController.js +1 -1
  344. package/widgets/Editor/workflowUtils.js +1 -1
  345. package/widgets/Editor.js +1 -1
  346. package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
  347. package/widgets/Feature/support/FeatureContentMixin.js +1 -1
  348. package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
  349. package/widgets/FeatureTable/support/EditableColumnTemplateMixin.js +1 -1
  350. package/widgets/LayerList.js +1 -1
  351. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  352. package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
  353. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  354. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  355. package/widgets/OrientedImageryViewer/mixins/ImageMeasurementMixin.js +1 -1
  356. package/widgets/OrientedImageryViewer/mixins/SketchHandlerMixin.js +1 -1
  357. package/widgets/OrientedImageryViewer/mixins/TriangulatedImageMeasurementMixin.js +1 -1
  358. package/widgets/OrientedImageryViewer/mixins/TriangulatedSketchHandlerMixin.js +1 -1
  359. package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
  360. package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
  361. package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
  362. package/widgets/OrientedImageryViewer.js +1 -1
  363. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  364. package/widgets/PanoramicViewer/PanoramicZoomConditions.js +1 -1
  365. package/widgets/PanoramicViewer.js +1 -1
  366. package/widgets/Print.js +1 -1
  367. package/widgets/Sketch/SketchViewModel.js +1 -1
  368. package/widgets/Sketch/support/ResponsiveToolbar/ToolbarGroupBase.js +1 -1
  369. package/widgets/Slider/SliderViewModel.js +1 -1
  370. package/widgets/support/GoTo.js +1 -1
  371. package/widgets/support/SelectionList.js +1 -1
  372. package/assets/esri/core/workers/chunks/00eef04fd026adaf0df8.js +0 -1
  373. package/assets/esri/core/workers/chunks/0202c2ac73354e3970b2.js +0 -1
  374. package/assets/esri/core/workers/chunks/02dc6e31b1244e5bb785.js +0 -1
  375. package/assets/esri/core/workers/chunks/080c79d6caca3b6a2db2.js +0 -1
  376. package/assets/esri/core/workers/chunks/084236ca316aad980192.js +0 -1
  377. package/assets/esri/core/workers/chunks/0b484224a92b52c34330.js +0 -1
  378. package/assets/esri/core/workers/chunks/0ba6177ba118a0f032e2.js +0 -1
  379. package/assets/esri/core/workers/chunks/16a78f5a82f5ca163816.js +0 -1
  380. package/assets/esri/core/workers/chunks/19ae76283a0cb0fe4dee.js +0 -346
  381. package/assets/esri/core/workers/chunks/1cc30073f8200b67cff6.js +0 -1
  382. package/assets/esri/core/workers/chunks/242b216d61940aebe8e1.js +0 -1
  383. package/assets/esri/core/workers/chunks/32756905bcf11699b3f7.js +0 -1
  384. package/assets/esri/core/workers/chunks/35d238a5a6501f89bed7.js +0 -1
  385. package/assets/esri/core/workers/chunks/3fcd73ba832cb53d3a07.js +0 -1
  386. package/assets/esri/core/workers/chunks/40c1d65039c8f1d6afa0.js +0 -1
  387. package/assets/esri/core/workers/chunks/496e02cfe3d84010f675.js +0 -1
  388. package/assets/esri/core/workers/chunks/49dce142ad1ea4c01d00.js +0 -1
  389. package/assets/esri/core/workers/chunks/4b89d5b9e35bf79b321e.js +0 -1
  390. package/assets/esri/core/workers/chunks/54a49a25845897a15ab1.js +0 -1
  391. package/assets/esri/core/workers/chunks/573a8393bec916dcf16f.js +0 -1
  392. package/assets/esri/core/workers/chunks/576e408fb0834f3948e8.js +0 -1
  393. package/assets/esri/core/workers/chunks/5e805c9e9012dd39ec86.js +0 -1
  394. package/assets/esri/core/workers/chunks/6136bf09950adc46bc33.js +0 -1
  395. package/assets/esri/core/workers/chunks/666afe669866c44830bd.js +0 -1
  396. package/assets/esri/core/workers/chunks/6a0fbc54638f7de138c1.js +0 -1
  397. package/assets/esri/core/workers/chunks/81006d9eed65bbb82962.js +0 -1
  398. package/assets/esri/core/workers/chunks/843b6029d4c13115e1ac.js +0 -1
  399. package/assets/esri/core/workers/chunks/86d6007c45f2aa643ac8.js +0 -1
  400. package/assets/esri/core/workers/chunks/8ea34878a1ef24b4ded3.js +0 -1
  401. package/assets/esri/core/workers/chunks/8eea6251aa09725e654e.js +0 -1
  402. package/assets/esri/core/workers/chunks/90145d49a0cec902435c.js +0 -1
  403. package/assets/esri/core/workers/chunks/916691122d7fb38497d6.js +0 -1
  404. package/assets/esri/core/workers/chunks/9ae18a17f62d91167202.js +0 -1
  405. package/assets/esri/core/workers/chunks/9c510df592befb9ff892.js +0 -1
  406. package/assets/esri/core/workers/chunks/9f91d519da67714f915f.js +0 -1
  407. package/assets/esri/core/workers/chunks/a6a7279b09d7962147ec.js +0 -1
  408. package/assets/esri/core/workers/chunks/aba520714efc01bead36.js +0 -1
  409. package/assets/esri/core/workers/chunks/acb9c166259872828646.js +0 -1
  410. package/assets/esri/core/workers/chunks/accff253af360c34e8a8.js +0 -1
  411. package/assets/esri/core/workers/chunks/ad3871f497ecea1a08c9.js +0 -1
  412. package/assets/esri/core/workers/chunks/ae6eed26fc932bc08356.js +0 -1
  413. package/assets/esri/core/workers/chunks/b4bb461955a4c2bce072.js +0 -1
  414. package/assets/esri/core/workers/chunks/b98279213f45a0c27600.js +0 -1
  415. package/assets/esri/core/workers/chunks/ba5b24beebeb703b5919.js +0 -1
  416. package/assets/esri/core/workers/chunks/bd7d19ba0c7d9143a455.js +0 -1
  417. package/assets/esri/core/workers/chunks/bffaf1f20f18c75fad4e.js +0 -1
  418. package/assets/esri/core/workers/chunks/c4f8da6c238eb5e91f91.js +0 -1
  419. package/assets/esri/core/workers/chunks/cd64181298d82c8d0e9d.js +0 -1
  420. package/assets/esri/core/workers/chunks/cdabea4718a7e7d34cb8.js +0 -1
  421. package/assets/esri/core/workers/chunks/ce7155ae63e7bb74be00.js +0 -1
  422. package/assets/esri/core/workers/chunks/d45383d76ba99718b6d9.js +0 -1
  423. package/assets/esri/core/workers/chunks/d915d0a30d9beb24bd3a.js +0 -1
  424. package/assets/esri/core/workers/chunks/dc6538a2d5a1e60d0209.js +0 -1
  425. package/assets/esri/core/workers/chunks/dca633ae3bfd4a3f9bb3.js +0 -1
  426. package/assets/esri/core/workers/chunks/def8a854a05f17d3538e.js +0 -1
  427. package/assets/esri/core/workers/chunks/dfa7976085f7408a366c.js +0 -1
  428. package/assets/esri/core/workers/chunks/e0a5b499b3ae38c21278.js +0 -1
  429. package/assets/esri/core/workers/chunks/e1a20ba7d6279f59adc0.js +0 -1
  430. package/assets/esri/core/workers/chunks/e49a135a2933306a6105.js +0 -1
  431. package/assets/esri/core/workers/chunks/e9a9174c4d1a0a9effb6.js +0 -1
  432. package/assets/esri/core/workers/chunks/edead1a123860cc74b1b.js +0 -1
  433. package/assets/esri/core/workers/chunks/f3d5d92e0aefc2593208.js +0 -1
  434. package/assets/esri/core/workers/chunks/f90573c9dc36e51cd588.js +0 -1
  435. package/assets/esri/core/workers/chunks/fa9658dbfb921f9c13af.js +0 -1
  436. package/assets/esri/core/workers/chunks/fb5e2b1ced03eef28e96.js +0 -1
  437. package/assets/esri/core/workers/chunks/fd8f4eabb8bbc593dd9c.js +0 -1
  438. package/layers/graphics/controllers/StreamController.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Graphic.js";import r from"../../core/Error.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{addMultidimensionalFieldValues as a,commonRasterFieldNames as o,rasterFieldPrefix as n}from"../../layers/support/rasterFieldUtils.js";import{combineTimeExtent as l}from"../../layers/support/timeSupport.js";import{isFunctionRaster as u}from"../../layers/support/rasterDatasets/datasetUtils.js";import{getDefaultDatumTransformationForDataset as p,projectDatasetExtent as c,getSourceScale as m}from"../../layers/support/rasterFunctions/rasterProjectionHelper.js";import{getFetchPopupTemplate as y}from"./support/popupUtils.js";const f=f=>{let d=class extends f{constructor(...e){super(...e),this.layer=null,this.tileInfo=null}get fullExtent(){try{return this.layer.loaded?this._getFullExtent():null}catch{return null}}get timeExtent(){return l(this.layer,this.view?.timeExtent,this._get("timeExtent"))}get hasTilingEffects(){return!!(this.layer.renderer&&"dynamicRangeAdjustment"in this.layer.renderer&&this.layer.renderer.dynamicRangeAdjustment)}get datumTransformation(){try{return this.layer.loaded?p(this.layer.fullExtent,this.view.spatialReference,!0):null}catch{return null}}supportsSpatialReference(e){try{return!this.layer.loaded||!!c(this.layer.serviceRasterInfo,e)}catch{return!1}}async fetchPopupFeaturesAtLocation(e,s){const{layer:i}=this;if(!e)throw new r("imageryTileLayerView:fetchPopupFeatures","Nothing to fetch without area",{layer:i});const{popupEnabled:l}=i,p=y(i,s);if(!l||null==p)return[];const c=[],{value:m,magdirValue:f,processedValue:d}=await i.identify(e,{timeExtent:this.timeExtent,signal:s?.signal});let h="";if(m?.length){h="imagery-tile"===i.type&&i.hasStandardTime()&&null!=m[0]?m.map(e=>i.getStandardTimeValue(e)).join(", "):m.join(", ");const e={ObjectId:0};e[o.servicePixelValue]="imagery-tile"===i.type&&u(i.raster)?d?.join(", "):h,e[o.rawServicePixelValue]=h;const r=i.raster?.rasterInfo??i.serviceRasterInfo,s=r?.attributeTable;if(null!=s){const{fields:t,features:r}=s,i=t.find(({name:e})=>"value"===e.toLowerCase()),a=e[o.servicePixelValue],l=i?r.find(e=>String(e.attributes[i.name])===a):null;if(l)for(const s in l.attributes)if(l.attributes.hasOwnProperty(s)){e[n+s]=l.attributes[s]}}const l=r?.dataType;"vector-magdir"!==l&&"vector-uv"!==l||(e[o.magnitude]=f?.[0],e[o.direction]=f?.[1]);const{multidimensionalDefinition:p}=this.layer.normalizeRasterFetchOptions({timeExtent:this.timeExtent});a(i.rasterFields,e,p);const y=new t({geometry:this.fullExtent?.clone(),attributes:e,layer:i,sourceLayer:i});c.push(y)}return c}async getSourceScale(){return await this.layer.load(),m(this.layer.serviceRasterInfo,this.view.spatialReference)}_getFullExtent(){return c(this.layer.serviceRasterInfo,this.view.spatialReference)}};return e([s()],d.prototype,"fullExtent",null),e([s()],d.prototype,"layer",void 0),e([s({readOnly:!0})],d.prototype,"timeExtent",null),e([s()],d.prototype,"tileInfo",void 0),e([s({readOnly:!0})],d.prototype,"hasTilingEffects",null),e([s()],d.prototype,"datumTransformation",null),d=e([i("esri.views.layers.ImageryTileLayerView")],d),d};export{f as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Graphic.js";import r from"../../core/Error.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";import{addMultidimensionalFieldValues as a,commonRasterFieldNames as o,rasterFieldPrefix as n}from"../../layers/support/rasterFieldUtils.js";import{combineTimeExtent as l}from"../../layers/support/timeSupport.js";import{isFunctionRaster as u}from"../../layers/support/rasterDatasets/datasetUtils.js";import{getDefaultDatumTransformationForDataset as p,projectDatasetExtent as c,getSourceScale as m}from"../../layers/support/rasterFunctions/rasterProjectionHelper.js";import{getFetchPopupTemplate as y}from"./support/popupUtils.js";const f=f=>{const d=f;let h=class extends d{constructor(...e){super(...e),this.layer=null,this.tileInfo=null}get fullExtent(){try{return this.layer.loaded?this._getFullExtent():null}catch{return null}}get timeExtent(){return l(this.layer,this.view?.timeExtent,this._get("timeExtent"))}get hasTilingEffects(){return!!(this.layer.renderer&&"dynamicRangeAdjustment"in this.layer.renderer&&this.layer.renderer.dynamicRangeAdjustment)}get datumTransformation(){try{return this.layer.loaded?p(this.layer.fullExtent,this.view.spatialReference,!0):null}catch{return null}}supportsSpatialReference(e){try{return!this.layer.loaded||!!c(this.layer.serviceRasterInfo,e)}catch{return!1}}async fetchPopupFeaturesAtLocation(e,s){const{layer:i}=this;if(!e)throw new r("imageryTileLayerView:fetchPopupFeatures","Nothing to fetch without area",{layer:i});const{popupEnabled:l}=i,p=y(i,s);if(!l||null==p)return[];const c=[],{value:m,magdirValue:f,processedValue:d}=await i.identify(e,{timeExtent:this.timeExtent,signal:s?.signal});let h="";if(m?.length){h="imagery-tile"===i.type&&i.hasStandardTime()&&null!=m[0]?m.map(e=>i.getStandardTimeValue(e)).join(", "):m.join(", ");const e={ObjectId:0};e[o.servicePixelValue]="imagery-tile"===i.type&&u(i.raster)?d?.join(", "):h,e[o.rawServicePixelValue]=h;const r=i.raster?.rasterInfo??i.serviceRasterInfo,s=r?.attributeTable;if(null!=s){const{fields:t,features:r}=s,i=t.find(({name:e})=>"value"===e.toLowerCase()),a=e[o.servicePixelValue],l=i?r.find(e=>String(e.attributes[i.name])===a):null;if(l)for(const s in l.attributes)if(l.attributes.hasOwnProperty(s)){e[n+s]=l.attributes[s]}}const l=r?.dataType;"vector-magdir"!==l&&"vector-uv"!==l||(e[o.magnitude]=f?.[0],e[o.direction]=f?.[1]);const{multidimensionalDefinition:p}=this.layer.normalizeRasterFetchOptions({timeExtent:this.timeExtent});a(i.rasterFields,e,p);const y=new t({geometry:this.fullExtent?.clone(),attributes:e,layer:i,sourceLayer:i});c.push(y)}return c}async getSourceScale(){return await this.layer.load(),m(this.layer.serviceRasterInfo,this.view.spatialReference)}_getFullExtent(){return c(this.layer.serviceRasterInfo,this.view.spatialReference)}};return e([s()],h.prototype,"fullExtent",null),e([s()],h.prototype,"layer",void 0),e([s({readOnly:!0})],h.prototype,"timeExtent",null),e([s()],h.prototype,"tileInfo",void 0),e([s({readOnly:!0})],h.prototype,"hasTilingEffects",null),e([s()],h.prototype,"datumTransformation",null),h=e([i("esri.views.layers.ImageryTileLayerView")],h),h};export{f as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../core/Collection.js";import{createAbortError as s}from"../../core/promiseUtils.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";const o=o=>{let a=class extends o{constructor(...e){super(...e),this.layer=null}get interactive(){return this.analysisView?.interactive??!1}set interactive(e){null!=this.analysisView&&(this.analysisView.interactive=e)}get results(){return this.analysisView?.results??new r}place(e){if(null!=this.analysisView)return this.analysisView.place(e);throw s()}};return e([t()],a.prototype,"layer",void 0),e([t()],a.prototype,"interactive",null),e([t({readOnly:!0})],a.prototype,"results",null),a=e([i("esri.views.layers.LineOfSightLayerView")],a),a};export{o as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../core/Collection.js";import{createAbortError as s}from"../../core/promiseUtils.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as i}from"../../core/accessorSupport/decorators/subclass.js";const o=o=>{const a=o;let l=class extends a{constructor(...e){super(...e),this.layer=null}get interactive(){return this.analysisView?.interactive??!1}set interactive(e){null!=this.analysisView&&(this.analysisView.interactive=e)}get results(){return this.analysisView?.results??new r}place(e){if(null!=this.analysisView)return this.analysisView.place(e);throw s()}};return e([t()],l.prototype,"layer",void 0),e([t()],l.prototype,"interactive",null),e([t({readOnly:!0})],l.prototype,"results",null),l=e([i("esri.views.layers.LineOfSightLayerView")],l),l};export{o as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import{ExportImageParameters as o}from"../../layers/support/ExportImageParameters.js";import{combineTimeExtent as s}from"../../layers/support/timeSupport.js";const i=i=>{let p=class extends i{initialize(){this.exportImageParameters=new o({layer:this.layer})}destroy(){this.exportImageParameters.destroy(),this.exportImageParameters=null}get floors(){return this.view?.floors??null}get exportImageVersion(){return this.exportImageParameters?.commitProperty("version"),this.commitProperty("timeExtent"),this.commitProperty("floors"),(this._get("exportImageVersion")||0)+1}get timeExtent(){return s(this.layer,this.view?.timeExtent,this._get("timeExtent"))}canResume(){return!!super.canResume()&&!this.timeExtent?.isEmpty}};return e([t()],p.prototype,"exportImageParameters",void 0),e([t({readOnly:!0})],p.prototype,"floors",null),e([t({readOnly:!0})],p.prototype,"exportImageVersion",null),e([t()],p.prototype,"layer",void 0),e([t()],p.prototype,"suspended",void 0),e([t({readOnly:!0})],p.prototype,"timeExtent",null),p=e([r("esri.views.layers.MapImageLayerView")],p),p};export{i as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import{ExportImageParameters as o}from"../../layers/support/ExportImageParameters.js";import{combineTimeExtent as s}from"../../layers/support/timeSupport.js";const i=i=>{const p=i;let a=class extends p{initialize(){this.exportImageParameters=new o({layer:this.layer})}destroy(){this.exportImageParameters.destroy(),this.exportImageParameters=null}get floors(){return this.view?.floors??null}get exportImageVersion(){return this.exportImageParameters?.commitProperty("version"),this.commitProperty("timeExtent"),this.commitProperty("floors"),(this._get("exportImageVersion")||0)+1}get timeExtent(){return s(this.layer,this.view?.timeExtent,this._get("timeExtent"))}canResume(){return!!super.canResume()&&!this.timeExtent?.isEmpty}};return e([t()],a.prototype,"exportImageParameters",void 0),e([t({readOnly:!0})],a.prototype,"floors",null),e([t({readOnly:!0})],a.prototype,"exportImageVersion",null),e([t()],a.prototype,"layer",void 0),e([t()],a.prototype,"suspended",void 0),e([t({readOnly:!0})],a.prototype,"timeExtent",null),a=e([r("esri.views.layers.MapImageLayerView")],a),a};export{i as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import{MediaLayerInteractionOptions as o}from"../3d/layers/support/MediaLayerInteractionOptions.js";const s=s=>{let i=class extends s{constructor(...e){super(...e),this.layer=null,this.interactive=!1,this.interactionOptions=new o,this.selectedElement=null}highlight(e,t){throw new Error("missing implementation")}};return e([t()],i.prototype,"layer",void 0),e([t()],i.prototype,"interactive",void 0),e([t({type:o})],i.prototype,"interactionOptions",void 0),e([t()],i.prototype,"selectedElement",void 0),i=e([r("esri.views.layers.MediaLayerView")],i),i};export{s as default};
5
+ import{_ as t}from"../../chunks/tslib.es6.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import{MediaLayerInteractionOptions as r}from"../3d/layers/support/MediaLayerInteractionOptions.js";const s=s=>{const i=s;let p=class extends i{constructor(...t){super(...t),this.layer=null,this.interactive=!1,this.interactionOptions=new r,this.selectedElement=null}highlight(t,e){throw new Error("missing implementation")}};return t([e()],p.prototype,"layer",void 0),t([e()],p.prototype,"interactive",void 0),t([e({type:r})],p.prototype,"interactionOptions",void 0),t([e()],p.prototype,"selectedElement",void 0),p=t([o("esri.views.layers.MediaLayerView")],p),p};export{s as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";const o=o=>{let t=class extends o{get availableFields(){return this.layer.fieldsIndex.fields.map(e=>e.name)}};return e([r()],t.prototype,"layer",void 0),e([r({readOnly:!0})],t.prototype,"availableFields",null),t=e([s("esri.views.layers.OGCFeatureLayerView")],t),t};export{o as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";const o=o=>{const t=o;let a=class extends t{get availableFields(){return this.layer.fieldsIndex.fields.map(e=>e.name)}};return e([r()],a.prototype,"layer",void 0),e([r({readOnly:!0})],a.prototype,"availableFields",null),a=e([s("esri.views.layers.OGCFeatureLayerView")],a),a};export{o as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as r}from"../../chunks/tslib.es6.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";const t=t=>{let s=class extends t{constructor(...r){super(...r),this.layer=null}get availableFields(){return[]}highlight(r,e){throw new Error("Not implemented")}queryFeatures(){throw new Error("Not implemented")}queryFeatureCount(){throw new Error("Not implemented")}createQuery(){throw new Error("Not implemented")}queryExtent(){throw new Error("Not implemented")}};return r([e()],s.prototype,"layer",void 0),r([e()],s.prototype,"availableFields",null),s=r([o("esri.views.layers.PointCloudLayerView")],s),s};export{t as default};
5
+ import{_ as r}from"../../chunks/tslib.es6.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";const t=t=>{const s=t;let l=class extends s{constructor(...r){super(...r),this.layer=null}get availableFields(){return[]}highlight(r,e){throw new Error("Not implemented")}queryFeatures(){throw new Error("Not implemented")}queryFeatureCount(){throw new Error("Not implemented")}createQuery(){throw new Error("Not implemented")}queryExtent(){throw new Error("Not implemented")}};return r([e()],l.prototype,"layer",void 0),r([e()],l.prototype,"availableFields",null),l=r([o("esri.views.layers.PointCloudLayerView")],l),l};export{t as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as r}from"../../chunks/tslib.es6.js";import e from"../../core/Logger.js";import{isAbortError as s}from"../../core/promiseUtils.js";import{on as o}from"../../core/reactiveUtils.js";import"../../core/has.js";import"../../core/RandomLCG.js";import"../../core/Error.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";const i=i=>{let a=class extends i{initialize(){this.addHandles(o(()=>this.layer,"refresh",r=>{this.doRefresh(r.dataChanged).catch(r=>{s(r)||e.getLogger(this).error(r)})}),"RefreshableLayerView")}};return a=r([t("esri.views.layers.RefreshableLayerView")],a),a};export{i as default};
5
+ import{_ as r}from"../../chunks/tslib.es6.js";import e from"../../core/Logger.js";import{isAbortError as s}from"../../core/promiseUtils.js";import{on as o}from"../../core/reactiveUtils.js";import"../../core/has.js";import"../../core/RandomLCG.js";import"../../core/Error.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";const i=i=>{const a=i;let c=class extends a{initialize(){this.addHandles(o(()=>this.layer,"refresh",r=>{this.doRefresh(r.dataChanged).catch(r=>{s(r)||e.getLogger(this).error(r)})}),"RefreshableLayerView")}};return c=r([t("esri.views.layers.RefreshableLayerView")],c),c};export{i as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as s}from"../../chunks/tslib.es6.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";import o from"../../layers/support/FeatureFilter.js";const r=r=>{let i=class extends r{resume(){this._isUserPaused=!1,this.suspended||this._doResume()}pause(){this._isUserPaused=!0,this.suspended||this._doPause()}disconnect(){this._doDisconnect()}connect(){this._doConnect()}clear(){this._doClear()}constructor(...s){super(...s),this._isUserPaused=!1,this.filter=null}get connectionStatus(){return(this._isUserPaused||this.suspended)&&"connected"===this._streamConnectionStatus?"paused":this._streamConnectionStatus}_onSuspendedChange(s){s?this._doPause():this._isUserPaused||this._doResume()}};return s([e()],i.prototype,"_isUserPaused",void 0),s([e({readOnly:!0})],i.prototype,"connectionStatus",null),s([e({type:o})],i.prototype,"filter",void 0),i=s([t("esri.views.layers.StreamLayerView")],i),i};export{r as default};
5
+ import{_ as s}from"../../chunks/tslib.es6.js";import{property as e}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";import o from"../../layers/support/FeatureFilter.js";const r=r=>{const i=r;let n=class extends i{resume(){this._isUserPaused=!1,this.suspended||this._doResume()}pause(){this._isUserPaused=!0,this.suspended||this._doPause()}disconnect(){this._doDisconnect()}connect(){this._doConnect()}clear(){this._doClear()}constructor(...s){super(...s),this._isUserPaused=!1,this.filter=null}get connectionStatus(){return(this._isUserPaused||this.suspended)&&"connected"===this._streamConnectionStatus?"paused":this._streamConnectionStatus}_onSuspendedChange(s){s?this._doPause():this._isUserPaused||this._doResume()}};return s([e()],n.prototype,"_isUserPaused",void 0),s([e({readOnly:!0})],n.prototype,"connectionStatus",null),s([e({type:o})],n.prototype,"filter",void 0),n=s([t("esri.views.layers.StreamLayerView")],n),n};export{r as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import{createAbortError as s}from"../../core/promiseUtils.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";const r=r=>{let a=class extends r{constructor(...e){super(...e),this.layer=null}get interactive(){return null!=this.analysisView&&this.analysisView.interactive}set interactive(e){null!=this.analysisView&&(this.analysisView.interactive=e)}get selectedViewshed(){return null!=this.analysisView?this.analysisView.selectedViewshed:null}set selectedViewshed(e){null!=this.analysisView&&(this.analysisView.selectedViewshed=e)}async createViewsheds(e){await(this.analysisView?.createViewsheds(e))}place(e){if(null!=this.analysisView)return this.analysisView.place(e);throw s()}};return e([i()],a.prototype,"layer",void 0),e([i()],a.prototype,"interactive",null),e([i()],a.prototype,"selectedViewshed",null),a=e([t("esri.views.layers.ViewshedLayerView")],a),a};export{r as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import{createAbortError as s}from"../../core/promiseUtils.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";const r=r=>{const a=r;let l=class extends a{constructor(...e){super(...e),this.layer=null}get interactive(){return null!=this.analysisView&&this.analysisView.interactive}set interactive(e){null!=this.analysisView&&(this.analysisView.interactive=e)}get selectedViewshed(){return null!=this.analysisView?this.analysisView.selectedViewshed:null}set selectedViewshed(e){null!=this.analysisView&&(this.analysisView.selectedViewshed=e)}async createViewsheds(e){await(this.analysisView?.createViewsheds(e))}place(e){if(null!=this.analysisView)return this.analysisView.place(e);throw s()}};return e([i()],l.prototype,"layer",void 0),e([i()],l.prototype,"interactive",null),e([i()],l.prototype,"selectedViewshed",null),l=e([t("esri.views.layers.ViewshedLayerView")],l),l};export{r as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Error.js";import{destroyMaybe as r}from"../../core/maybe.js";import{throwIfAborted as o}from"../../core/promiseUtils.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{ExportWMSImageParameters as p}from"../../layers/support/ExportWMSImageParameters.js";import{combineTimeExtent as i}from"../../layers/support/timeSupport.js";const m=m=>{let n=class extends m{initialize(){this.exportImageParameters=new p({layer:this.layer})}destroy(){this.exportImageParameters=r(this.exportImageParameters)}get exportImageVersion(){return this.exportImageParameters?.commitProperty("version"),this.commitProperty("timeExtent"),(this._get("exportImageVersion")||0)+1}get timeExtent(){return i(this.layer,this.view?.timeExtent,this._get("timeExtent"))}async fetchPopupFeaturesAtLocation(e,r){const{layer:s}=this;if(!e)throw new t("wmslayerview:fetchPopupFeatures","Nothing to fetch without area",{layer:s});const{popupEnabled:a}=s;if(!a)throw new t("wmslayerview:fetchPopupFeatures","popupEnabled should be true",{popupEnabled:a});const p=this.createFetchPopupFeaturesQuery(e);if(!p)return[];const{extent:i,width:m,height:n,x:c,y:u}=p;if(!(i&&m&&n))throw new t("wmslayerview:fetchPopupFeatures","WMSLayer does not support fetching features.",{extent:i,width:m,height:n});const h=await s.fetchFeatureInfo(i,m,n,c,u);return o(r),h}};return e([s()],n.prototype,"exportImageParameters",void 0),e([s({readOnly:!0})],n.prototype,"exportImageVersion",null),e([s()],n.prototype,"layer",void 0),e([s({readOnly:!0})],n.prototype,"timeExtent",null),n=e([a("esri.views.layers.WMSLayerView")],n),n};export{m as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Error.js";import{destroyMaybe as r}from"../../core/maybe.js";import{throwIfAborted as o}from"../../core/promiseUtils.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{ExportWMSImageParameters as p}from"../../layers/support/ExportWMSImageParameters.js";import{combineTimeExtent as i}from"../../layers/support/timeSupport.js";const m=m=>{const n=m;let c=class extends n{initialize(){this.exportImageParameters=new p({layer:this.layer})}destroy(){this.exportImageParameters=r(this.exportImageParameters)}get exportImageVersion(){return this.exportImageParameters?.commitProperty("version"),this.commitProperty("timeExtent"),(this._get("exportImageVersion")||0)+1}get timeExtent(){return i(this.layer,this.view?.timeExtent,this._get("timeExtent"))}async fetchPopupFeaturesAtLocation(e,r){const{layer:s}=this;if(!e)throw new t("wmslayerview:fetchPopupFeatures","Nothing to fetch without area",{layer:s});const{popupEnabled:a}=s;if(!a)throw new t("wmslayerview:fetchPopupFeatures","popupEnabled should be true",{popupEnabled:a});const p=this.createFetchPopupFeaturesQuery(e);if(!p)return[];const{extent:i,width:m,height:n,x:c,y:u}=p;if(!(i&&m&&n))throw new t("wmslayerview:fetchPopupFeatures","WMSLayer does not support fetching features.",{extent:i,width:m,height:n});const h=await s.fetchFeatureInfo(i,m,n,c,u);return o(r),h}};return e([s()],c.prototype,"exportImageParameters",void 0),e([s({readOnly:!0})],c.prototype,"exportImageVersion",null),e([s()],c.prototype,"layer",void 0),e([s({readOnly:!0})],c.prototype,"timeExtent",null),c=e([a("esri.views.layers.WMSLayerView")],c),c};export{m as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- const c="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIyNTYiIGhlaWdodD0iMjU2IiBzdHlsZT0iZmlsbC1ydWxlOmV2ZW5vZGQ7Y2xpcC1ydWxlOmV2ZW5vZGQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjIiPjxjaXJjbGUgY3g9IjEyOCIgY3k9IjEyOCIgcj0iMTIxIi8+PC9zdmc+";export{c as default};
5
+ const I="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIyNTYiIGhlaWdodD0iMjU2IiBzdHlsZT0iZmlsbC1ydWxlOmV2ZW5vZGQ7Y2xpcC1ydWxlOmV2ZW5vZGQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjIiIHZpZXdCb3g9IjAgMCAyNTYgMjU2Ij48Y2lyY2xlIGN4PSIxMjgiIGN5PSIxMjgiIHI9IjEyMSIvPjwvc3ZnPg==";export{I as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- const I="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIyNTYiIGhlaWdodD0iMjU2IiBzdHlsZT0iZmlsbC1ydWxlOmV2ZW5vZGQ7Y2xpcC1ydWxlOmV2ZW5vZGQ7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEuNSI+PHBhdGggZD0iTTEyOCA4YzY2LjIzIDAgMTIwIDUzLjc3IDEyMCAxMjBzLTUzLjc3IDEyMC0xMjAgMTIwUzggMTk0LjIzIDggMTI4IDYxLjc3IDggMTI4IDhtMCA4YzYxLjgxNCAwIDExMiA1MC4xODYgMTEyIDExMnMtNTAuMTg2IDExMi0xMTIgMTEyUzE2IDE4OS44MTQgMTYgMTI4IDY2LjE4NiAxNiAxMjggMTYiIHN0eWxlPSJmaWxsOnVybCgjYSk7c3Ryb2tlOiMwMDA7c3Ryb2tlLW9wYWNpdHk6LjU7c3Ryb2tlLXdpZHRoOi45NnB4IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtNS4zMzMgLTUuMzMzKXNjYWxlKDEuMDQxNjcpIi8+PHBhdGggZD0iTTEyOCA4YzY2LjIzIDAgMTIwIDUzLjc3IDEyMCAxMjBzLTUzLjc3IDEyMC0xMjAgMTIwUzggMTk0LjIzIDggMTI4IDYxLjc3IDggMTI4IDhtMCA0LjI5OGM2My44NTcgMCAxMTUuNzAyIDUxLjg0NSAxMTUuNzAyIDExNS43MDJTMTkxLjg1NyAyNDMuNzAyIDEyOCAyNDMuNzAyIDEyLjI5OCAxOTEuODU3IDEyLjI5OCAxMjggNjQuMTQzIDEyLjI5OCAxMjggMTIuMjk4IiBzdHlsZT0iZmlsbDp1cmwoI2IpIiB0cmFuc2Zvcm09InJvdGF0ZSgxODAgMTI4LjUzNCAxMjguNTM0KXNjYWxlKDEuMDA4MzQpIi8+PGNpcmNsZSBjeD0iMTI4IiBjeT0iMTI4IiByPSIxMTIiIHN0eWxlPSJmaWxsOnVybCgjYykiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC01LjMzMyAtNS4zMzMpc2NhbGUoMS4wNDE2NykiLz48cGF0aCBkPSJNMTI4IDIwYzkxLjg4NCAxLjgxMSAxMDcgODggMTA3IDg4cy00NS4xODYtMjgtMTA3LTI4LTEwNyAyOC0xMDcgMjggMjEuMjQ0LTg5LjY5IDEwNy04OCIgc3R5bGU9ImZpbGw6dXJsKCNkKSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTUuMzMzIC01LjMzMylzY2FsZSgxLjA0MTY3KSIvPjxwYXRoIGQ9Ik0xMjggMTMxLjU2VjE1OCIgc3R5bGU9ImZpbGw6bm9uZTtzdHJva2U6IzAwMDtzdHJva2Utd2lkdGg6Ljk2cHg7c3Ryb2tlLWxpbmVjYXA6YnV0dCIgdHJhbnNmb3JtPSJyb3RhdGUoOTAgMTMzLjA3NCAxMjcuNzQpc2NhbGUoMS4wNDE2NykiLz48cGF0aCBkPSJNMTI4IDEyOS42NHYyNi40NCIgc3R5bGU9ImZpbGw6bm9uZTtzdHJva2U6IzAwMDtzdHJva2Utd2lkdGg6Ljk2cHg7c3Ryb2tlLWxpbmVjYXA6YnV0dCIgdHJhbnNmb3JtPSJyb3RhdGUoOTAgMTUwLjA3NCAxNDQuNzQpc2NhbGUoMS4wNDE2NykiLz48cGF0aCBkPSJNMTI4IDEzMS41NlYxNTgiIHN0eWxlPSJmaWxsOm5vbmU7c3Ryb2tlOiMwMDA7c3Ryb2tlLXdpZHRoOi45NnB4O3N0cm9rZS1saW5lY2FwOmJ1dHQiIHRyYW5zZm9ybT0icm90YXRlKDE4MCAxMzAuNjY4IDEzMC40MDcpc2NhbGUoMS4wNDE2NykiLz48cGF0aCBkPSJNMTI4IDEyOS42NHYyNi40NCIgc3R5bGU9ImZpbGw6bm9uZTtzdHJva2U6IzAwMDtzdHJva2Utd2lkdGg6Ljk2cHg7c3Ryb2tlLWxpbmVjYXA6YnV0dCIgdHJhbnNmb3JtPSJyb3RhdGUoMTgwIDEzMC42NjggMTQ3LjQwNylzY2FsZSgxLjA0MTY3KSIvPjxkZWZzPjxsaW5lYXJHcmFkaWVudCBpZD0iYSIgeDE9IjAiIHgyPSIxIiB5MT0iMCIgeTI9IjAiIGdyYWRpZW50VHJhbnNmb3JtPSJyb3RhdGUoNDcuNjE3IC0yMS44OCA3NS4xNTYpc2NhbGUoMjM3LjgzNSkiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAiIHN0eWxlPSJzdG9wLWNvbG9yOndoaXRlO3N0b3Atb3BhY2l0eToxIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdHlsZT0ic3RvcC1jb2xvcjojZGFkYWRhO3N0b3Atb3BhY2l0eToxIi8+PC9saW5lYXJHcmFkaWVudD48bGluZWFyR3JhZGllbnQgaWQ9ImIiIHgxPSIwIiB4Mj0iMSIgeTE9IjAiIHkyPSIwIiBncmFkaWVudFRyYW5zZm9ybT0icm90YXRlKDQ3LjYxNyAtMjEuODggNzUuMTU2KXNjYWxlKDIzNy44MzUpIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agb2Zmc2V0PSIwIiBzdHlsZT0ic3RvcC1jb2xvcjp3aGl0ZTtzdG9wLW9wYWNpdHk6MSIvPjxzdG9wIG9mZnNldD0iMSIgc3R5bGU9InN0b3AtY29sb3I6IzlhOWE5YTtzdG9wLW9wYWNpdHk6MSIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJkIiB4MT0iMCIgeDI9IjEiIHkxPSIwIiB5Mj0iMCIgZ3JhZGllbnRUcmFuc2Zvcm09InJvdGF0ZSgtOTAgMTA0IC0yNClzY2FsZSg2MC4wMjM2KSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iMCIgc3R5bGU9InN0b3AtY29sb3I6d2hpdGU7c3RvcC1vcGFjaXR5Oi4wNSIvPjxzdG9wIG9mZnNldD0iMSIgc3R5bGU9InN0b3AtY29sb3I6d2hpdGU7c3RvcC1vcGFjaXR5Oi40Ii8+PC9saW5lYXJHcmFkaWVudD48cmFkaWFsR3JhZGllbnQgaWQ9ImMiIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgxNjUgLTEgMSAxNjUgMTI4IDIxMSkiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAiIHN0eWxlPSJzdG9wLWNvbG9yOndoaXRlO3N0b3Atb3BhY2l0eTouNDQiLz48c3RvcCBvZmZzZXQ9IjEiIHN0eWxlPSJzdG9wLWNvbG9yOndoaXRlO3N0b3Atb3BhY2l0eTowIi8+PC9yYWRpYWxHcmFkaWVudD48L2RlZnM+PC9zdmc+";export{I as default};
5
+ const I="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbDpzcGFjZT0icHJlc2VydmUiIHdpZHRoPSIyNTYiIGhlaWdodD0iMjU2IiBzdHlsZT0iZmlsbC1ydWxlOmV2ZW5vZGQ7Y2xpcC1ydWxlOmV2ZW5vZGQ7c3Ryb2tlLWxpbmVjYXA6cm91bmQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEuNSIgdmlld0JveD0iMCAwIDI1NiAyNTYiPjxwYXRoIGQ9Ik0xMjggOGM2Ni4yMyAwIDEyMCA1My43NyAxMjAgMTIwcy01My43NyAxMjAtMTIwIDEyMFM4IDE5NC4yMyA4IDEyOCA2MS43NyA4IDEyOCA4bTAgOGM2MS44MTQgMCAxMTIgNTAuMTg2IDExMiAxMTJzLTUwLjE4NiAxMTItMTEyIDExMlMxNiAxODkuODE0IDE2IDEyOCA2Ni4xODYgMTYgMTI4IDE2IiBzdHlsZT0iZmlsbDp1cmwoI2EpO3N0cm9rZTojMDAwO3N0cm9rZS1vcGFjaXR5Oi41O3N0cm9rZS13aWR0aDouOTZweCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTUuMzMzIC01LjMzMylzY2FsZSgxLjA0MTY3KSIvPjxwYXRoIGQ9Ik0xMjggOGM2Ni4yMyAwIDEyMCA1My43NyAxMjAgMTIwcy01My43NyAxMjAtMTIwIDEyMFM4IDE5NC4yMyA4IDEyOCA2MS43NyA4IDEyOCA4bTAgNC4yOThjNjMuODU3IDAgMTE1LjcwMiA1MS44NDUgMTE1LjcwMiAxMTUuNzAyUzE5MS44NTcgMjQzLjcwMiAxMjggMjQzLjcwMiAxMi4yOTggMTkxLjg1NyAxMi4yOTggMTI4IDY0LjE0MyAxMi4yOTggMTI4IDEyLjI5OCIgc3R5bGU9ImZpbGw6dXJsKCNiKSIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjU3LjA2OCAyNTcuMDY4KXNjYWxlKC0xLjAwODM0KSIvPjxjaXJjbGUgY3g9IjEyOCIgY3k9IjEyOCIgcj0iMTEyIiBzdHlsZT0iZmlsbDp1cmwoI2MpIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtNS4zMzMgLTUuMzMzKXNjYWxlKDEuMDQxNjcpIi8+PHBhdGggZD0iTTEyOCAyMGM5MS44ODQgMS44MTEgMTA3IDg4IDEwNyA4OHMtNDUuMTg2LTI4LTEwNy0yOC0xMDcgMjgtMTA3IDI4IDIxLjI0NC04OS42OSAxMDctODgiIHN0eWxlPSJmaWxsOnVybCgjZCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC01LjMzMyAtNS4zMzMpc2NhbGUoMS4wNDE2NykiLz48cGF0aCBkPSJNMTI4IDEzMS41NlYxNTgiIHN0eWxlPSJmaWxsOm5vbmU7c3Ryb2tlOiMwMDA7c3Ryb2tlLXdpZHRoOi45NnB4O3N0cm9rZS1saW5lY2FwOmJ1dHQiIHRyYW5zZm9ybT0icm90YXRlKDkwIDEzMy4wNzQgMTI3Ljc0KXNjYWxlKDEuMDQxNjcpIi8+PHBhdGggZD0iTTEyOCAxMjkuNjR2MjYuNDQiIHN0eWxlPSJmaWxsOm5vbmU7c3Ryb2tlOiMwMDA7c3Ryb2tlLXdpZHRoOi45NnB4O3N0cm9rZS1saW5lY2FwOmJ1dHQiIHRyYW5zZm9ybT0icm90YXRlKDkwIDE1MC4wNzQgMTQ0Ljc0KXNjYWxlKDEuMDQxNjcpIi8+PHBhdGggZD0iTTEyOCAxMzEuNTZWMTU4IiBzdHlsZT0iZmlsbDpub25lO3N0cm9rZTojMDAwO3N0cm9rZS13aWR0aDouOTZweDtzdHJva2UtbGluZWNhcDpidXR0IiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgyNjEuMzM1IDI2MC44MTMpc2NhbGUoLTEuMDQxNjcpIi8+PHBhdGggZD0iTTEyOCAxMjkuNjR2MjYuNDQiIHN0eWxlPSJmaWxsOm5vbmU7c3Ryb2tlOiMwMDA7c3Ryb2tlLXdpZHRoOi45NnB4O3N0cm9rZS1saW5lY2FwOmJ1dHQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI2MS4zMzUgMjk0LjgxMylzY2FsZSgtMS4wNDE2NykiLz48ZGVmcz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIHgxPSIwIiB4Mj0iMSIgeTE9IjAiIHkyPSIwIiBncmFkaWVudFRyYW5zZm9ybT0icm90YXRlKDQ3LjYxNyAtMjEuODkzIDc1LjA3NSlzY2FsZSgyMzcuODM1KSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iMCIgc3R5bGU9InN0b3AtY29sb3I6d2hpdGU7c3RvcC1vcGFjaXR5OjEiLz48c3RvcCBvZmZzZXQ9IjEiIHN0eWxlPSJzdG9wLWNvbG9yOiNkYWRhZGE7c3RvcC1vcGFjaXR5OjEiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYiIgeDE9IjAiIHgyPSIxIiB5MT0iMCIgeTI9IjAiIGdyYWRpZW50VHJhbnNmb3JtPSJyb3RhdGUoNDcuNjE3IC0yMS44OTMgNzUuMDc1KXNjYWxlKDIzNy44MzUpIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agb2Zmc2V0PSIwIiBzdHlsZT0ic3RvcC1jb2xvcjp3aGl0ZTtzdG9wLW9wYWNpdHk6MSIvPjxzdG9wIG9mZnNldD0iMSIgc3R5bGU9InN0b3AtY29sb3I6IzlhOWE5YTtzdG9wLW9wYWNpdHk6MSIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJkIiB4MT0iMCIgeDI9IjEiIHkxPSIwIiB5Mj0iMCIgZ3JhZGllbnRUcmFuc2Zvcm09InJvdGF0ZSgtOTAgMTA0IC0yNClzY2FsZSg2MC4wMjM2KSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPjxzdG9wIG9mZnNldD0iMCIgc3R5bGU9InN0b3AtY29sb3I6d2hpdGU7c3RvcC1vcGFjaXR5Oi4wNSIvPjxzdG9wIG9mZnNldD0iMSIgc3R5bGU9InN0b3AtY29sb3I6d2hpdGU7c3RvcC1vcGFjaXR5Oi40Ii8+PC9saW5lYXJHcmFkaWVudD48cmFkaWFsR3JhZGllbnQgaWQ9ImMiIGN4PSIwIiBjeT0iMCIgcj0iMSIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgxNjUgLTEgMSAxNjUgMTI4IDIxMSkiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIj48c3RvcCBvZmZzZXQ9IjAiIHN0eWxlPSJzdG9wLWNvbG9yOndoaXRlO3N0b3Atb3BhY2l0eTouNDQiLz48c3RvcCBvZmZzZXQ9IjEiIHN0eWxlPSJzdG9wLWNvbG9yOndoaXRlO3N0b3Atb3BhY2l0eTowIi8+PC9yYWRpYWxHcmFkaWVudD48L2RlZnM+PC9zdmc+";export{I as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../core/Handles.js";import"../../core/has.js";import t from"../../core/Logger.js";import{removeMaybe as s}from"../../core/maybe.js";import r from"../../core/PerformanceSampler.js";import i from"../../core/PooledArray.js";import{isAborted as a,createAbortError as n,when as _}from"../../core/promiseUtils.js";import{watch as u,initial as h,when as o}from"../../core/reactiveUtils.js";import{signal as d}from"../../core/signal.js";import{Milliseconds as E}from"../../core/time.js";import{PromiseQueue as l}from"../../layers/support/PromiseQueue.js";import T from"./debugFlags.js";import{RenderState as m}from"./RenderState.js";import{Yield as c}from"./Yield.js";function I(){return new U.Scheduler}var g;!function(e){e.RESOURCE_CONTROLLER_IMMEDIATE="immediate",e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.LOD_RENDERER="LoD renderer",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.OVERLAY="overlay",e.OVERLAY_RENDERER="overlay renderer",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.ELEVATION_ALIGNMENT_SCENE="elevation alignment scene",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="clouds generator",e.MAPVIEW_FETCH_QUEUE="mapview fetch queue",e.MAPVIEW_LAYERVIEW_UPDATE="mapview layerview update",e.MAPVIEW_VECTOR_TILE_PARSING_QUEUE="mapview vector tile parsing queue",e[e.NONE=0]="NONE",e[e.TEST_PRIO=1]="TEST_PRIO"}(g||(g={}));const R=0,p=new Map([[g.RESOURCE_CONTROLLER_IMMEDIATE,R],[g.RESOURCE_CONTROLLER,4],[g.SLIDE,R],[g.STREAM_DATA_LOADER,R],[g.ELEVATION_QUERY,R],[g.TERRAIN_SURFACE,1],[g.SURFACE_GEOMETRY_UPDATES,1],[g.LOD_RENDERER,2],[g.GRAPHICS_CORE,2],[g.I3S_CONTROLLER,2],[g.POINT_CLOUD_LAYER,2],[g.FEATURE_TILE_FETCHER,2],[g.CLOUDS_GENERATOR,2],[g.OVERLAY,4],[g.OVERLAY_RENDERER,4],[g.STAGE,4],[g.GRAPHICS_DECONFLICTOR,4],[g.FILTER_VISIBILITY,4],[g.SCALE_VISIBILITY,4],[g.FRUSTUM_VISIBILITY,4],[g.POINT_OF_INTEREST_FREQUENT,6],[g.POINT_OF_INTEREST_INFREQUENT,30],[g.LABELER,8],[g.FEATURE_QUERY_ENGINE,8],[g.FEATURE_TILE_TREE,16],[g.FEATURE_TILE_TREE_ACTIVE,R],[g.ELEVATION_ALIGNMENT,12],[g.ELEVATION_ALIGNMENT_SCENE,14],[g.TEXT_TEXTURE_ATLAS,12],[g.TEXTURE_UNLOAD,12],[g.LINE_OF_SIGHT_TOOL,16],[g.LINE_OF_SIGHT_TOOL_INTERACTIVE,R],[g.SNAPPING,R],[g.SHADOW_ACCUMULATOR,30],[g.MAPVIEW_FETCH_QUEUE,R],[g.MAPVIEW_LAYERVIEW_UPDATE,2],[g.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,R]]);function A(e){return p.has(e)?p.get(e):"number"==typeof e?e:1}const f=E(6.5),L=E(1),N=E(30),O=E(1e3/30),S=E(100),b=.9;var U,k;!function(a){class n{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some(e=>e.needsUpdate)}constructor(){this._updating=d(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new r("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new I,this._state=m.INTERACTING,this._tasks=new i,this._runQueue=new i,this._load=0,this._idleStateCallbacks=new i,this._idleUpdatesStartFired=!1,this._forceTask=!1,this._debug=!1,this._debugHandle=u(()=>T.SCHEDULER_LOG_SLOW_TASKS,e=>this._debug=e,h);for(const e of Object.keys(g))this.performanceInfo.tasks.set(g[e],new r(g[e]))}destroy(){this._tasks.toArray().forEach(e=>e.remove()),this._tasks.prune(),this._idleStateCallbacks.prune(),this._runQueue.prune(),s(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){const s=new _(this,e,t);return this._tasks.push(s),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new r(e)),s}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),this.state===m.IDLE&&this._idleUpdatesStartFired&&s.idleBegin();const r=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){r._idleUpdatesStartFired&&(s.idleEnd(),r._state===m.IDLE&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==m.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll(e=>e.idleEnd())))}get state(){return this._state}frame(e){this._startFrameTaskTimes();const t=this._updateBudget(e);if(t){const e=this._budget.now();this._runFrame(),this._recordFrameTaskTimes(this._budget.now()-e)}else this._recordFrameTaskTimes(0);return t}_updateBudget(e){this._test&&(this._test.usedBudget=0),++this._frameNumber;let t=f,s=e.frameDuration,r=L;switch(this.state){case m.IDLE:t=E(0),s=E(Math.max(S,e.frameDuration)),r=N;break;case m.INTERACTING:s=E(Math.max(O,e.frameDuration));case m.ANIMATING:}return s=E(s-e.elapsedFrameTime-t),this.state!==m.IDLE&&s<L&&!this._forceTask?(this._forceTask=!0,!1):(s=E(Math.max(s,r)),this._budget.reset(s),this._updateLoad(),this._schedule())}_runFrame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case m.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll(e=>e.idleBegin())),this._runIdle();break;case m.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test&&(this._test.usedBudget=this._budget.elapsed)}stopFrame(){this._budget.reset(E(0)),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e),this._updatingChanged()}_updateTask(e){this._tasks.forAll(t=>{t.name===e&&t.setPriority(e)})}_getState(e){if(this._runQueue.some(t=>t.name===e))return k.SCHEDULED;let t=k.IDLE;return this._tasks.forAll(s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t=k.READY:t!==k.READY&&(t=k.WAITING))}),t}_getRuntime(e){let t=0;return this._tasks.forAll(s=>{s.name===e&&(t+=s.runtime)}),t}_resetRuntimes(){this._tasks.forAll(e=>e.runtime=0)}_getRunning(){const e=new Map;if(this._tasks.forAll(t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)}),0===e.size)return null;let t="";return e.forEach((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`}),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce((e,t)=>t.needsUpdate?++e:e,0);this._load=this._load*b+e*(1-b)}_schedule(){for(this._runQueue.filterInPlace(e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1)),this._tasks.forAll(e=>{e.basePriority===R&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)});0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll(s=>{if(s.needsUpdate&&0!==s.schedulePriority&&s.basePriority!==R&&s.blockFrame!==this._frameNumber)if(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority)s.schedulePriority=0,this._runQueue.push(s);else--s.schedulePriority}),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){do{for(;this._runQueue.length>0;){const s=this._budget.now(),r=this._runQueue.pop();this._budget.resetProgress();try{r.task.runTask(this._budget)===c&&(r.blockFrame=this._frameNumber)}catch(e){t.getLogger("esri.views.support.Scheduler").error(`Exception in task "${r.name}"`,e),r.blockFrame=this._frameNumber}!this._budget.hasProgressed&&r.blockFrame!==this._frameNumber&&r.needsUpdate&&(r.name,g.I3S_CONTROLLER,r.blockFrame=this._frameNumber),r.schedulePriority=r.basePriority;const i=this._budget.now()-s;if(r.runtime+=i,this._frameTaskTimes.set(r.priority,this._frameTaskTimes.get(r.priority)+i),this._budget.remaining<=0)return void this._updatingChanged()}}while(this._schedule());this._updatingChanged()}_startFrameTaskTimes(){for(const e of Object.keys(g))this._frameTaskTimes.set(g[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}}a.Scheduler=n;class _{get task(){return this._task.value}get updating(){return this._queue.running}constructor(t,s,r){this._scheduler=t,this.name=s,this.blockFrame=0,this.runtime=0,this._queue=new l,this._handles=new e,this._basePriority=A(s),this.schedulePriority=this._basePriority,this._task=d(null!=r?r:this._queue),this._handles.add(o(()=>this.task.running,e=>t.taskRunningChanged(e)))}remove(){this.processQueue(C),this._scheduler.removeTask(this),this.schedule=D.schedule,this.reschedule=D.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){if(this.name===e)return;this.name=e;const t=A(e);this._basePriority!==R&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}processQueue(e){return this._queue.runTask(e)}}class I{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&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}}a.Budget=I}(U||(U={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(k||(k={}));const C=new U.Budget;function P(e){const t=new U.Budget;return t.reset(e),t}C.enabled=!1;class F{remove(){}processQueue(){}schedule(e,t,s){try{if(a(t)){const e=n();return s?Promise.resolve(s(e)):Promise.reject(e)}return _(e(C))}catch(r){return Promise.reject(r)}}reschedule(e,t,s){return this.schedule(e,t,s)}}const D=new F;export{D as ImmediateTask,g as TaskPriority,k as TaskState,A as getTaskPriority,P as makeBudget,I as newScheduler,C as noBudget,p as taskPriorities};
5
+ import e from"../../core/Handles.js";import"../../core/has.js";import t from"../../core/Logger.js";import{removeMaybe as s}from"../../core/maybe.js";import r from"../../core/PerformanceSampler.js";import i from"../../core/PooledArray.js";import{isAborted as a,createAbortError as n,when as _}from"../../core/promiseUtils.js";import{watch as u,initial as h,when as o}from"../../core/reactiveUtils.js";import{signal as d}from"../../core/signal.js";import{Milliseconds as E}from"../../core/time.js";import{PromiseQueue as l}from"../../layers/support/PromiseQueue.js";import T from"./debugFlags.js";import{RenderState as m}from"./RenderState.js";import{Yield as c}from"./Yield.js";function I(){return new U.Scheduler}var g;!function(e){e.RESOURCE_CONTROLLER_IMMEDIATE="immediate",e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.LOD_RENDERER="LoD renderer",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.STREAM_CONTROLLER="stream controller",e.OVERLAY="overlay",e.OVERLAY_RENDERER="overlay renderer",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.ELEVATION_ALIGNMENT_SCENE="elevation alignment scene",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="clouds generator",e.MAPVIEW_FETCH_QUEUE="mapview fetch queue",e.MAPVIEW_LAYERVIEW_UPDATE="mapview layerview update",e.MAPVIEW_VECTOR_TILE_PARSING_QUEUE="mapview vector tile parsing queue",e[e.NONE=0]="NONE",e[e.TEST_PRIO=1]="TEST_PRIO"}(g||(g={}));const R=0,p=new Map([[g.RESOURCE_CONTROLLER_IMMEDIATE,R],[g.RESOURCE_CONTROLLER,4],[g.SLIDE,R],[g.STREAM_DATA_LOADER,R],[g.ELEVATION_QUERY,R],[g.TERRAIN_SURFACE,1],[g.SURFACE_GEOMETRY_UPDATES,1],[g.LOD_RENDERER,2],[g.GRAPHICS_CORE,2],[g.I3S_CONTROLLER,2],[g.POINT_CLOUD_LAYER,2],[g.FEATURE_TILE_FETCHER,2],[g.STREAM_CONTROLLER,2],[g.CLOUDS_GENERATOR,2],[g.OVERLAY,4],[g.OVERLAY_RENDERER,4],[g.STAGE,4],[g.GRAPHICS_DECONFLICTOR,4],[g.FILTER_VISIBILITY,4],[g.SCALE_VISIBILITY,4],[g.FRUSTUM_VISIBILITY,4],[g.POINT_OF_INTEREST_FREQUENT,6],[g.POINT_OF_INTEREST_INFREQUENT,30],[g.LABELER,8],[g.FEATURE_QUERY_ENGINE,8],[g.FEATURE_TILE_TREE,16],[g.FEATURE_TILE_TREE_ACTIVE,R],[g.ELEVATION_ALIGNMENT,12],[g.ELEVATION_ALIGNMENT_SCENE,14],[g.TEXT_TEXTURE_ATLAS,12],[g.TEXTURE_UNLOAD,12],[g.LINE_OF_SIGHT_TOOL,16],[g.LINE_OF_SIGHT_TOOL_INTERACTIVE,R],[g.SNAPPING,R],[g.SHADOW_ACCUMULATOR,30],[g.MAPVIEW_FETCH_QUEUE,R],[g.MAPVIEW_LAYERVIEW_UPDATE,2],[g.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,R]]);function A(e){return p.has(e)?p.get(e):"number"==typeof e?e:1}const L=E(6.5),f=E(1),N=E(30),O=E(1e3/30),S=E(100),b=.9;var U,k;!function(a){class n{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some(e=>e.needsUpdate)}constructor(){this._updating=d(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new r("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new I,this._state=m.INTERACTING,this._tasks=new i,this._runQueue=new i,this._load=0,this._idleStateCallbacks=new i,this._idleUpdatesStartFired=!1,this._forceTask=!1,this._debug=!1,this._debugHandle=u(()=>T.SCHEDULER_LOG_SLOW_TASKS,e=>this._debug=e,h);for(const e of Object.keys(g))this.performanceInfo.tasks.set(g[e],new r(g[e]))}destroy(){this._tasks.toArray().forEach(e=>e.remove()),this._tasks.prune(),this._idleStateCallbacks.prune(),this._runQueue.prune(),s(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){const s=new _(this,e,t);return this._tasks.push(s),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new r(e)),s}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),this.state===m.IDLE&&this._idleUpdatesStartFired&&s.idleBegin();const r=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){r._idleUpdatesStartFired&&(s.idleEnd(),r._state===m.IDLE&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==m.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll(e=>e.idleEnd())))}get state(){return this._state}frame(e){this._startFrameTaskTimes();const t=this._updateBudget(e);if(t){const e=this._budget.now();this._runFrame(),this._recordFrameTaskTimes(this._budget.now()-e)}else this._recordFrameTaskTimes(0);return t}_updateBudget(e){this._test&&(this._test.usedBudget=0),++this._frameNumber;let t=L,s=e.frameDuration,r=f;switch(this.state){case m.IDLE:t=E(0),s=E(Math.max(S,e.frameDuration)),r=N;break;case m.INTERACTING:s=E(Math.max(O,e.frameDuration));case m.ANIMATING:}return s=E(s-e.elapsedFrameTime-t),this.state!==m.IDLE&&s<f&&!this._forceTask?(this._forceTask=!0,!1):(s=E(Math.max(s,r)),this._budget.reset(s),this._updateLoad(),this._schedule())}_runFrame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case m.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll(e=>e.idleBegin())),this._runIdle();break;case m.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test&&(this._test.usedBudget=this._budget.elapsed)}stopFrame(){this._budget.reset(E(0)),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e),this._updatingChanged()}_updateTask(e){this._tasks.forAll(t=>{t.name===e&&t.setPriority(e)})}_getState(e){if(this._runQueue.some(t=>t.name===e))return k.SCHEDULED;let t=k.IDLE;return this._tasks.forAll(s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t=k.READY:t!==k.READY&&(t=k.WAITING))}),t}_getRuntime(e){let t=0;return this._tasks.forAll(s=>{s.name===e&&(t+=s.runtime)}),t}_resetRuntimes(){this._tasks.forAll(e=>e.runtime=0)}_getRunning(){const e=new Map;if(this._tasks.forAll(t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)}),0===e.size)return null;let t="";return e.forEach((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`}),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce((e,t)=>t.needsUpdate?++e:e,0);this._load=this._load*b+e*(1-b)}_schedule(){for(this._runQueue.filterInPlace(e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1)),this._tasks.forAll(e=>{e.basePriority===R&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)});0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll(s=>{if(s.needsUpdate&&0!==s.schedulePriority&&s.basePriority!==R&&s.blockFrame!==this._frameNumber)if(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority)s.schedulePriority=0,this._runQueue.push(s);else--s.schedulePriority}),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){do{for(;this._runQueue.length>0;){const s=this._budget.now(),r=this._runQueue.pop();this._budget.resetProgress();try{r.task.runTask(this._budget)===c&&(r.blockFrame=this._frameNumber)}catch(e){t.getLogger("esri.views.support.Scheduler").error(`Exception in task "${r.name}"`,e),r.blockFrame=this._frameNumber}!this._budget.hasProgressed&&r.blockFrame!==this._frameNumber&&r.needsUpdate&&(r.name,g.I3S_CONTROLLER,r.blockFrame=this._frameNumber),r.schedulePriority=r.basePriority;const i=this._budget.now()-s;if(r.runtime+=i,this._frameTaskTimes.set(r.priority,this._frameTaskTimes.get(r.priority)+i),this._budget.remaining<=0)return void this._updatingChanged()}}while(this._schedule());this._updatingChanged()}_startFrameTaskTimes(){for(const e of Object.keys(g))this._frameTaskTimes.set(g[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}}a.Scheduler=n;class _{get task(){return this._task.value}get updating(){return this._queue.running}constructor(t,s,r){this._scheduler=t,this.name=s,this.blockFrame=0,this.runtime=0,this._queue=new l,this._handles=new e,this._basePriority=A(s),this.schedulePriority=this._basePriority,this._task=d(null!=r?r:this._queue),this._handles.add(o(()=>this.task.running,e=>t.taskRunningChanged(e)))}remove(){this.processQueue(C),this._scheduler.removeTask(this),this.schedule=D.schedule,this.reschedule=D.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){if(this.name===e)return;this.name=e;const t=A(e);this._basePriority!==R&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}processQueue(e){return this._queue.runTask(e)}}class I{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&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}}a.Budget=I}(U||(U={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(k||(k={}));const C=new U.Budget;function P(e){const t=new U.Budget;return t.reset(e),t}C.enabled=!1;class F{remove(){}processQueue(){}schedule(e,t,s){try{if(a(t)){const e=n();return s?Promise.resolve(s(e)):Promise.reject(e)}return _(e(C))}catch(r){return Promise.reject(r)}}reschedule(e,t,s){return this.schedule(e,t,s)}}const D=new F;export{D as ImmediateTask,g as TaskPriority,k as TaskState,A as getTaskPriority,P as makeBudget,I as newScheduler,C as noBudget,p as taskPriorities};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Viewpoint.js";import i from"../../core/CollectionFlattener.js";import{destroyMaybe as s}from"../../core/maybe.js";import{whenOnce as r,watch as a,syncAndInitial as o}from"../../core/reactiveUtils.js";import{initialize as n}from"../../core/workers/workers.js";import{property as p}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as h}from"../../core/accessorSupport/decorators/subclass.js";import{isLoadedOrLoadFor as l}from"../../geometry/projectionUtils.js";import d from"../../layers/support/TileInfo.js";import g from"../View.js";import{Viewport2DBaseMixin as c}from"../Viewport2DBaseMixin.js";import m from"../2d/AnimationManager.js";import{GoToManager as u}from"../2d/GoToManager.js";import{layerView2DImporter as w}from"../2d/layerViewModuleImportUtils.js";import y from"../2d/tiling/TileInfoView.js";import"../2d/tiling/TileKey.js";import"../2d/tiling/TileQueue.js";import"../2d/tiling/TileStrategy.js";import{extentToScale as f}from"../2d/viewpointUtils.js";import v from"../2d/layers/features/support/TileStore.js";import{hitTest as V}from"../2d/support/hitTestUtils.js";import{Timeline as j}from"../2d/support/Timeline.js";let M,T,_,S;async function b(){const[,{GraphicsView2D:e,GraphicContainer:t,LabelManager:i,MapViewNavigation:s}]=await Promise.all([import("../2d/webglDeps.js"),import("../2d/mapViewDeps.js")]);M=e,T=t,_=i,S=s}let C=class extends(c(g)){constructor(e){super(e),this.stage=null,this.rootLayerViews=new i({getCollections:()=>[this.layerViews],getChildrenFunction:()=>null}),this.featuresTilingScheme=null,this.graphicsView=null,this.timeline=new j,this.goToManager=new u({view:this}),this.labelManager=null,this.map=null,this.videoWidth=0,this.videoHeight=0,this.surface=null,this.padding={top:0,right:0,bottom:0,left:0},n()}initialize(){this._set("width",this.videoWidth),this._set("height",this.videoHeight),this.addResolvingPromise(r(()=>this.ready))}destroy(){this.layerViewManager.clear(),this._set("preconditionsReady",!1),this.frameTask=s(this.frameTask),this.goToManager.destroy(),this.rootLayerViews.destroy()}get graphicsTileStore(){return new v(this.featuresTilingScheme)}get typeSpecificPreconditionsReady(){const e=this._getDefaultViewpoint();if(!e)return!1;const t=e.targetGeometry,i=this.spatialReference;return l(t.spatialReference,i)}async hitTest(e,t){return V(this,e,t)}goTo(e,t){return this.goToManager.goTo(e,t)}toMap(e){return this.stateManager.toMap(e)}requestUpdate(){this.ready&&this.frameTask.requestUpdate()}loadAsyncDependencies(){return b()}hasLayerViewModule(e){return w.hasLayerViewModule(e)}importLayerView(e){return w.importLayerView(e)}_getDefaultViewpoint(){const{constraints:e,initialExtent:i,map:s,padding:r,size:a}=this;if(!e)return null;const o=s&&"initialViewProperties"in s?s.initialViewProperties:void 0,n=this.stateManager.getUserStartupOptions(this.size),p=o?.viewpoint,h=p?.targetGeometry?.extent??i,l=h?.center,d=p?.rotation??0,g=p?.scale||h&&f(h,[a[0]-r.left-r.right,a[1]-r.top-r.bottom]),c=n.center??l,m=n.rotation??d,u=n.scale??g;return c&&u?new t({targetGeometry:c,scale:u,rotation:m}):null}_updateStageChildren(){this.stage.removeAllChildren(),this.rootLayerViews.forEach(e=>{this.stage.addChild(e.container)});const e=this.graphicsView;this.stage.addChild(e.container)}_startup(){this.timeline.begin("VideoOperationalDataView Startup");const e=this._getDefaultViewpoint();this.stateManager.startup(e,this.size,this.spatialReference,this.defaultsFromMap.extent?.center),this.graphics.owner=this;const t=new _({view:this});this._set("labelManager",t);const i=new m({view:this});this._set("animationManager",i);const s=new S({view:this,animationManager:i});this._set("mapViewNavigation",s);const r=new y(d.create({spatialReference:this.spatialReference,size:512,numLODs:36}));this._set("featuresTilingScheme",r);const n=new M({view:this,graphics:this.graphics,requestUpdateCallback:()=>this.requestUpdate(),container:new T(r)});this._set("graphicsView",n),this.addHandles([this.rootLayerViews.on("change",()=>this._updateStageChildren()),this.stage.on("webgl-error",e=>this.fatalError=e.error),a(()=>this.stationary,e=>this.stage.stationary=e,o),a(()=>this.state.id,()=>this.stage.state=this.state,o)],"video-graphics-view"),this._updateStageChildren(),this.timeline.end("VideoOperationalDataView Startup"),this.frameTask.start(),this.stage.viewIsReady=!0,this._set("ready",!0)}_teardown(){this.removeHandles("video-graphics-view"),this.mapViewNavigation.destroy(),this._set("mapViewNavigation",null),this.animation=null,this.animationManager.destroy(),this._set("animationManager",null),this.layerViewManager.clear(),this.stage.destroy(),this.stage=null;const e=this.graphicsView;this._set("graphicsView",null),e.destroy(),this._set("featuresTilingScheme",null),this._set("mapViewNavigation",null),this.graphics.owner=null,this.frameTask.stop(),this.stationaryManager.clear(),this._set("ready",!1),this.stateManager.teardown()}};e([p()],C.prototype,"stage",void 0),e([p({readOnly:!0})],C.prototype,"featuresTilingScheme",void 0),e([p({readOnly:!0})],C.prototype,"graphicsTileStore",null),e([p()],C.prototype,"graphicsView",void 0),e([p({type:j,readOnly:!0})],C.prototype,"timeline",void 0),e([p()],C.prototype,"goToManager",void 0),e([p()],C.prototype,"labelManager",void 0),e([p()],C.prototype,"map",void 0),e([p()],C.prototype,"videoWidth",void 0),e([p()],C.prototype,"videoHeight",void 0),e([p({readOnly:!0})],C.prototype,"typeSpecificPreconditionsReady",null),e([p({readOnly:!0})],C.prototype,"surface",void 0),C=e([h("esri.views.video.VideoOperationalDataView")],C);const D=C;export{D as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Viewpoint.js";import i from"../../core/CollectionFlattener.js";import{destroyMaybe as s}from"../../core/maybe.js";import{whenOnce as r,watch as a,syncAndInitial as o}from"../../core/reactiveUtils.js";import{initialize as n}from"../../core/workers/workers.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{isLoadedOrLoadFor as h}from"../../geometry/projectionUtils.js";import c from"../../layers/support/TileInfo.js";import d from"../View.js";import{Viewport2DBaseMixin as m}from"../Viewport2DBaseMixin.js";import g from"../2d/AnimationManager.js";import{GoToManager as u}from"../2d/GoToManager.js";import{layerView2DImporter as w}from"../2d/layerViewModuleImportUtils.js";import y from"../2d/tiling/TileInfoView.js";import"../2d/tiling/TileKey.js";import"../2d/tiling/TileQueue.js";import"../2d/tiling/TileStrategy.js";import{extentToScale as f}from"../2d/viewpointUtils.js";import V from"../2d/layers/features/support/TileStore.js";import{hitTest as v}from"../2d/support/hitTestUtils.js";import{Timeline as j}from"../2d/support/Timeline.js";let M,T,_,S;async function b(){const[,{GraphicsView2D:e,GraphicContainer:t,LabelManager:i,MapViewNavigation:s}]=await Promise.all([import("../2d/webglDeps.js"),import("../2d/mapViewDeps.js")]);M=e,T=t,_=i,S=s}let C=class extends(m(d)){constructor(e){super(e),this.stage=null,this.rootLayerViews=new i({getCollections:()=>[this.layerViews],getChildrenFunction:()=>null}),this.featuresTilingScheme=null,this.graphicsView=null,this.timeline=new j,this.goToManager=new u({view:this}),this.labelManager=null,this.map=null,this.surface=null,this.padding={top:0,right:0,bottom:0,left:0},n()}initialize(){this.addResolvingPromise(r(()=>this.ready))}destroy(){this.layerViewManager.clear(),this._set("preconditionsReady",!1),this.frameTask=s(this.frameTask),this.goToManager.destroy(),this.rootLayerViews.destroy()}get graphicsTileStore(){return new V(this.featuresTilingScheme)}get typeSpecificPreconditionsReady(){const e=this._getDefaultViewpoint();if(!e)return!1;const t=e.targetGeometry,i=this.spatialReference;return h(t.spatialReference,i)}async hitTest(e,t){return v(this,e,t)}goTo(e,t){return this.goToManager.goTo(e,t)}toMap(e){return this.stateManager.toMap(e)}requestUpdate(){this.ready&&this.frameTask.requestUpdate()}loadAsyncDependencies(){return b()}hasLayerViewModule(e){return w.hasLayerViewModule(e)}importLayerView(e){return w.importLayerView(e)}_getDefaultViewpoint(){const{constraints:e,initialExtent:i,map:s,padding:r,size:a}=this;if(!e)return null;const o=s&&"initialViewProperties"in s?s.initialViewProperties:void 0,n=this.stateManager.getUserStartupOptions(this.size),l=o?.viewpoint,p=l?.targetGeometry?.extent??i,h=p?.center,c=l?.rotation??0,d=l?.scale||p&&f(p,[a[0]-r.left-r.right,a[1]-r.top-r.bottom]),m=n.center??h,g=n.rotation??c,u=n.scale??d;return m&&u?new t({targetGeometry:m,scale:u,rotation:g}):null}_updateStageChildren(){this.stage.removeAllChildren(),this.rootLayerViews.forEach(e=>{this.stage.addChild(e.container)});const e=this.graphicsView;this.stage.addChild(e.container)}_startup(){this.timeline.begin("VideoOperationalDataView Startup");const e=this._getDefaultViewpoint();this.stateManager.startup(e,this.size,this.spatialReference,this.defaultsFromMap.extent?.center),this.graphics.owner=this;const t=new _({view:this});this._set("labelManager",t);const i=new g({view:this});this._set("animationManager",i);const s=new S({view:this,animationManager:i});this._set("mapViewNavigation",s);const r=new y(c.create({spatialReference:this.spatialReference,size:512,numLODs:36}));this._set("featuresTilingScheme",r);const n=new M({view:this,graphics:this.graphics,requestUpdateCallback:()=>this.requestUpdate(),container:new T(r)});this._set("graphicsView",n),this.addHandles([this.rootLayerViews.on("change",()=>this._updateStageChildren()),this.stage.on("webgl-error",e=>this.fatalError=e.error),a(()=>this.stationary,e=>this.stage.stationary=e,o),a(()=>this.state.id,()=>this.stage.state=this.state,o)],"video-graphics-view"),this._updateStageChildren(),this.timeline.end("VideoOperationalDataView Startup"),this.frameTask.start(),this.stage.viewIsReady=!0,this._set("ready",!0)}_teardown(){this.removeHandles("video-graphics-view"),this.mapViewNavigation.destroy(),this._set("mapViewNavigation",null),this.animation=null,this.animationManager.destroy(),this._set("animationManager",null),this.layerViewManager.clear(),this.stage.destroy(),this.stage=null;const e=this.graphicsView;this._set("graphicsView",null),e.destroy(),this._set("featuresTilingScheme",null),this._set("mapViewNavigation",null),this.graphics.owner=null,this.frameTask.stop(),this.stationaryManager.clear(),this._set("ready",!1),this.stateManager.teardown()}};e([l()],C.prototype,"stage",void 0),e([l({readOnly:!0})],C.prototype,"featuresTilingScheme",void 0),e([l({readOnly:!0})],C.prototype,"graphicsTileStore",null),e([l()],C.prototype,"graphicsView",void 0),e([l({type:j,readOnly:!0})],C.prototype,"timeline",void 0),e([l()],C.prototype,"goToManager",void 0),e([l()],C.prototype,"labelManager",void 0),e([l()],C.prototype,"map",void 0),e([l({readOnly:!0})],C.prototype,"typeSpecificPreconditionsReady",null),e([l({readOnly:!0})],C.prototype,"surface",void 0),C=e([p("esri.views.video.VideoOperationalDataView")],C);const D=C;export{D as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{isArrayLike as t}from"../../core/arrayUtils.js";import"../../core/has.js";import e from"../../core/Logger.js";import{isUint8Array as i,isUint16Array as s,isUint32Array as r}from"../../core/typedArrayUtil.js";import{checkWebGLError as n}from"./checkWebGLError.js";import{BufferType as _,Usage as a,ResourceType as u,DataType as f}from"./enums.js";const h=()=>e.getLogger("esri.views.webgl.BufferObject"),c=null;class E{static createIndex(t,e,i){return new E(t,_.ELEMENT_ARRAY_BUFFER,e,i)}static createVertex(t,e,i){return new E(t,_.ARRAY_BUFFER,e,i)}static createUniform(t,e,i){return new E(t,_.UNIFORM_BUFFER,e,i)}static createPixelPack(t,e=a.STREAM_READ,i){const s=new E(t,_.PIXEL_PACK_BUFFER,e);return i&&s.setSize(i),s}static createPixelUnpack(t,e=a.STREAM_DRAW,i){return new E(t,_.PIXEL_UNPACK_BUFFER,e,i)}static createTransformFeedback(t,e=a.STATIC_DRAW,i){const s=new E(t,_.TRANSFORM_FEEDBACK_BUFFER,e);return s.setSize(i),s}constructor(t,e,i,s){this._context=t,this.bufferType=e,this.usage=i,this._glName=null,this._size=-1,this._indexType=void 0,t.instanceCounter.increment(u.BufferObject,this),this._glName=this._context.gl.createBuffer(),n(this._context.gl),s&&this.setData(s)}get glName(){return this._glName}get size(){return this._size}get indexType(){return this._indexType}get usedMemory(){if(this.bufferType===_.ELEMENT_ARRAY_BUFFER){if(this._indexType===f.UNSIGNED_INT)return 4*this._size;if(this._indexType===f.UNSIGNED_SHORT)return 2*this._size}return this._size}get _isVAOAware(){return this.bufferType===_.ELEMENT_ARRAY_BUFFER||this.bufferType===_.ARRAY_BUFFER}dispose(){if(this._context?.gl){if(this._glName){this._context.gl.deleteBuffer(this._glName),this._glName=null}this._context.instanceCounter.decrement(u.BufferObject,this),this._context=null}else this._glName&&h().warn("Leaked WebGL buffer object")}setSize(t,e=null){if(this.bufferType===_.ELEMENT_ARRAY_BUFFER&&null!=e)switch(this._indexType=e,e){case f.UNSIGNED_SHORT:t*=2;break;case f.UNSIGNED_INT:t*=4}this._setBufferData(t)}setData(t){if(!t)return;let e=t.byteLength;this.bufferType===_.ELEMENT_ARRAY_BUFFER&&(i(t)?this._indexType=f.UNSIGNED_BYTE:s(t)?(e/=2,this._indexType=f.UNSIGNED_SHORT):r(t)&&(e/=4,this._indexType=f.UNSIGNED_INT)),this._setBufferData(e,t)}_setBufferData(t,e=null){this._size=t;const i=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const s=this._context.gl;null!=e?s.bufferData(this.bufferType,e,this.usage):s.bufferData(this.bufferType,t,this.usage),n(s),this._isVAOAware&&this._context.bindVAO(i)}setSubData(t,e,i,s){if(!t)return;const r=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const{gl:_}=this._context;_.bufferSubData(this.bufferType,e*t.BYTES_PER_ELEMENT,t,i,s-i),n(_),this._isVAOAware&&this._context.bindVAO(r)}getSubData(t,e=0,i,s){if(i<0||s<0)return;const r=o(t)?t.BYTES_PER_ELEMENT:1;if(r*((i??0)+(s??0))>t.byteLength)return;e+r*(s??0)>this.usedMemory&&h().warn("Potential problem getting subdata: requested data exceeds buffer size!");const n=this._context.gl;this.bufferType===_.TRANSFORM_FEEDBACK_BUFFER?(this._context.bindBuffer(this,_.TRANSFORM_FEEDBACK_BUFFER),n.getBufferSubData(_.TRANSFORM_FEEDBACK_BUFFER,e,t,i,s),this._context.unbindBuffer(_.TRANSFORM_FEEDBACK_BUFFER)):(this._context.bindBuffer(this,_.COPY_READ_BUFFER),n.getBufferSubData(_.COPY_READ_BUFFER,e,t,i,s),this._context.unbindBuffer(_.COPY_READ_BUFFER))}async getSubDataAsync(t,e=0,i,s){await this._context.clientWaitAsync(),this.getSubData(t,e,i,s)}}function o(e){return t(e)}export{E as BufferObject,c as tracer};
5
+ import{isArrayLike as t}from"../../core/arrayUtils.js";import has from"../../core/has.js";import e from"../../core/Logger.js";import{isUint8Array as s,isUint16Array as i,isUint32Array as r}from"../../core/typedArrayUtil.js";import{checkWebGLError as n}from"./checkWebGLError.js";import{BufferType as _,Usage as a,ResourceType as u,DataType as f}from"./enums.js";const h=()=>e.getLogger("esri.views.webgl.BufferObject"),c=null,E=!!has("esri-tests-disable-gpu-memory-measurements");class o{static createIndex(t,e,s){return new o(t,_.ELEMENT_ARRAY_BUFFER,e,s)}static createVertex(t,e,s){return new o(t,_.ARRAY_BUFFER,e,s)}static createUniform(t,e,s){return new o(t,_.UNIFORM_BUFFER,e,s)}static createPixelPack(t,e=a.STREAM_READ,s){const i=new o(t,_.PIXEL_PACK_BUFFER,e);return s&&i.setSize(s),i}static createPixelUnpack(t,e=a.STREAM_DRAW,s){return new o(t,_.PIXEL_UNPACK_BUFFER,e,s)}static createTransformFeedback(t,e=a.STATIC_DRAW,s){const i=new o(t,_.TRANSFORM_FEEDBACK_BUFFER,e);return i.setSize(s),i}constructor(t,e,s,i){this._context=t,this.bufferType=e,this.usage=s,this._glName=null,this._size=-1,this._indexType=void 0,t.instanceCounter.increment(u.BufferObject,this),this._glName=this._context.gl.createBuffer(),n(this._context.gl),i&&this.setData(i)}get glName(){return this._glName}get size(){return this._size}get indexType(){return this._indexType}get sizeBytes(){if(this.bufferType===_.ELEMENT_ARRAY_BUFFER){if(this._indexType===f.UNSIGNED_INT)return 4*this._size;if(this._indexType===f.UNSIGNED_SHORT)return 2*this._size}return this._size}get usedMemory(){return E?0:this.sizeBytes}get _isVAOAware(){return this.bufferType===_.ELEMENT_ARRAY_BUFFER||this.bufferType===_.ARRAY_BUFFER}dispose(){if(this._context?.gl){if(this._glName){this._context.gl.deleteBuffer(this._glName),this._glName=null}this._context.instanceCounter.decrement(u.BufferObject,this),this._context=null}else this._glName&&h().warn("Leaked WebGL buffer object")}setSize(t,e=null){if(this.bufferType===_.ELEMENT_ARRAY_BUFFER&&null!=e)switch(this._indexType=e,e){case f.UNSIGNED_SHORT:t*=2;break;case f.UNSIGNED_INT:t*=4}this._setBufferData(t)}setData(t){if(!t)return;let e=t.byteLength;this.bufferType===_.ELEMENT_ARRAY_BUFFER&&(s(t)?this._indexType=f.UNSIGNED_BYTE:i(t)?(e/=2,this._indexType=f.UNSIGNED_SHORT):r(t)&&(e/=4,this._indexType=f.UNSIGNED_INT)),this._setBufferData(e,t)}_setBufferData(t,e=null){this._size=t;const s=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const i=this._context.gl;null!=e?i.bufferData(this.bufferType,e,this.usage):i.bufferData(this.bufferType,t,this.usage),n(i),this._isVAOAware&&this._context.bindVAO(s)}setSubData(t,e,s,i){if(!t)return;const r=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const{gl:_}=this._context;_.bufferSubData(this.bufferType,e*t.BYTES_PER_ELEMENT,t,s,i-s),n(_),this._isVAOAware&&this._context.bindVAO(r)}getSubData(t,e=0,s,i){if(s<0||i<0)return;const r=R(t)?t.BYTES_PER_ELEMENT:1;if(r*((s??0)+(i??0))>t.byteLength)return;e+r*(i??0)>this.usedMemory&&h().warn("Potential problem getting subdata: requested data exceeds buffer size!");const n=this._context.gl;this.bufferType===_.TRANSFORM_FEEDBACK_BUFFER?(this._context.bindBuffer(this,_.TRANSFORM_FEEDBACK_BUFFER),n.getBufferSubData(_.TRANSFORM_FEEDBACK_BUFFER,e,t,s,i),this._context.unbindBuffer(_.TRANSFORM_FEEDBACK_BUFFER)):(this._context.bindBuffer(this,_.COPY_READ_BUFFER),n.getBufferSubData(_.COPY_READ_BUFFER,e,t,s,i),this._context.unbindBuffer(_.COPY_READ_BUFFER))}async getSubDataAsync(t,e=0,s,i){await this._context.clientWaitAsync(),this.getSubData(t,e,s,i)}}function R(e){return t(e)}export{o as BufferObject,c as tracer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import"../../core/has.js";import{webglValidateShadersEnabled as t,webglDebugEnabled as e}from"./checkWebGLError.js";import{ShaderType as o,ResourceType as i,Extension as n}from"./enums.js";import{transpileShader as r}from"./ShaderTranspiler.js";const s=4294967295;class a{constructor(e,n,a,m,f=new Map,c=[]){this._context=e,this._locations=m,this._uniformBlockBindings=f,this._transformFeedbackVaryings=c,this._refCount=1,this._compiled=!1,this._linesOfCode=0,this._nameToUniformLocation=new Map,this._nameToUniform1=new Map,this._nameToUniform1v=new Map,this._nameToUniform2=new Map,this._nameToUniform3=new Map,this._nameToUniform4=new Map,this._nameToUniformMatrix3=new Map,this._nameToUniformMatrix4=new Map,e||console.error("RenderingContext isn't initialized!"),0===n.length&&console.error("Shaders source should not be empty!"),n=r(n,o.VERTEX_SHADER),a=r(a,o.FRAGMENT_SHADER),this._vShader=h(this._context,o.VERTEX_SHADER,n),this._fShader=h(this._context,o.FRAGMENT_SHADER,a),_.enabled&&(this._linesOfCode=n.match(/\n/g).length+a.match(/\n/g).length+2,this._context.instanceCounter.increment(i.LinesOfCode,this._vShader,this._linesOfCode)),this._vShader&&this._fShader||console.error("Error loading shaders!"),this._context.instanceCounter.increment(i.Shader,this),t()&&(this.vertexShader=n,this.fragmentShader=a),this.usedMemory=n.length+a.length;const l=this._context.gl,g=l.createProgram();l.attachShader(g,this._vShader),l.attachShader(g,this._fShader),this._locations.forEach((t,e)=>l.bindAttribLocation(g,t,e)),this._transformFeedbackVaryings?.length&&l.transformFeedbackVaryings(g,this._transformFeedbackVaryings,l.SEPARATE_ATTRIBS),l.linkProgram(g),t()&&!l.getProgramParameter(g,l.LINK_STATUS)&&console.error(`Could not link shader\nvalidated: ${l.getProgramParameter(g,l.VALIDATE_STATUS)}, gl error ${l.getError()}, vertex: ${l.getShaderParameter(this._vShader,l.COMPILE_STATUS)}, fragment: ${l.getShaderParameter(this._fShader,l.COMPILE_STATUS)}, info log: ${l.getProgramInfoLog(g)}, vertex source: ${this.vertexShader}, fragment source: ${this.fragmentShader}`);for(const[t,o]of this._uniformBlockBindings){const e=l.getUniformBlockIndex(g,t);e<s&&l.uniformBlockBinding(g,e,o)}this._glName=g,this._context.instanceCounter.increment(i.Program,this)}get glName(){return this._glName}get hasGLName(){return null!=this._glName}get hasTransformFeedbackVaryings(){return!!this._transformFeedbackVaryings?.length}get compiled(){return!!this._compiled||(this._context.capabilities.parallelShaderCompile&&null!=this.glName?(this._compiled=!!this._context.gl.getProgramParameter(this.glName,n.COMPLETION_STATUS_KHR),this._compiled):(this._compiled=!0,!0))}dispose(){if(--this._refCount>0)return;const t=this._context.gl,e=this._context.instanceCounter;this._nameToUniformLocation.forEach(t=>t&&e.decrement(i.Uniform,t)),this._nameToUniformLocation.clear(),this._vShader&&(this._linesOfCode>0&&(e.decrement(i.LinesOfCode,this._vShader,this._linesOfCode),this._linesOfCode=0),t.deleteShader(this._vShader),this._vShader=null,e.decrement(i.Shader,this)),this._fShader&&(t.deleteShader(this._fShader),this._fShader=null),this._glName&&(t.deleteProgram(this._glName),this._glName=null,e.decrement(i.Program,this))}ref(){++this._refCount}_getUniformLocation(t){const e=this._nameToUniformLocation.get(t);if(void 0!==e)return e;if(this.glName){const e=this._context.gl.getUniformLocation(this.glName,t);return this._nameToUniformLocation.set(t,e),e&&this._context.instanceCounter.increment(i.Uniform,e),e}return null}hasUniform(t){return null!=this._getUniformLocation(t)}setUniform1i(t,e,o){l(o,e);const i=this._nameToUniform1.get(t);void 0!==i&&e===i||(this._context.gl.uniform1i(this._getUniformLocation(t),e),this._nameToUniform1.set(t,e))}setUniform1iv(t,e,o){g(o,e),c(this._nameToUniform1v,t,e)&&this._context.gl.uniform1iv(this._getUniformLocation(t),e)}setUniform2iv(t,e,o){g(o,e),c(this._nameToUniform2,t,e)&&this._context.gl.uniform2iv(this._getUniformLocation(t),e)}setUniform3iv(t,e,o){g(o,e),c(this._nameToUniform3,t,e)&&this._context.gl.uniform3iv(this._getUniformLocation(t),e)}setUniform4iv(t,e,o){g(o,e),c(this._nameToUniform4,t,e)&&this._context.gl.uniform4iv(this._getUniformLocation(t),e)}setUniform1f(t,e,o){l(o,e);const i=this._nameToUniform1.get(t);void 0!==i&&e===i||(this._context.gl.uniform1f(this._getUniformLocation(t),e),this._nameToUniform1.set(t,e))}setUniform1fv(t,e,o){g(o,e),c(this._nameToUniform1v,t,e)&&this._context.gl.uniform1fv(this._getUniformLocation(t),e)}setUniform2f(t,e,o,i){l(i,e,o);const n=this._nameToUniform2.get(t);void 0===n?(this._context.gl.uniform2f(this._getUniformLocation(t),e,o),this._nameToUniform2.set(t,[e,o])):e===n[0]&&o===n[1]||(this._context.gl.uniform2f(this._getUniformLocation(t),e,o),n[0]=e,n[1]=o)}setUniform2fv(t,e,o){g(o,e),c(this._nameToUniform2,t,e)&&this._context.gl.uniform2fv(this._getUniformLocation(t),e)}setUniform3f(t,e,o,i,n){l(n,e,o,i);const r=this._nameToUniform3.get(t);void 0===r?(this._context.gl.uniform3f(this._getUniformLocation(t),e,o,i),this._nameToUniform3.set(t,[e,o,i])):e===r[0]&&o===r[1]&&i===r[2]||(this._context.gl.uniform3f(this._getUniformLocation(t),e,o,i),r[0]=e,r[1]=o,r[2]=i)}setUniform3fv(t,e,o){g(o,e);const i=this._getUniformLocation(t);null!=i&&c(this._nameToUniform3,t,e)&&this._context.gl.uniform3fv(i,e)}setUniform4f(t,e,o,i,n,r){l(r,e,o,i,n);const s=this._nameToUniform4.get(t);void 0===s?(this._context.gl.uniform4f(this._getUniformLocation(t),e,o,i,n),this._nameToUniform4.set(t,[e,o,i,n])):void 0!==s&&e===s[0]&&o===s[1]&&i===s[2]&&n===s[3]||(this._context.gl.uniform4f(this._getUniformLocation(t),e,o,i,n),s[0]=e,s[1]=o,s[2]=i,s[3]=n)}setUniform4fv(t,e,o){g(o,e);const i=this._getUniformLocation(t);null!=i&&c(this._nameToUniform4,t,e)&&this._context.gl.uniform4fv(i,e)}setUniformMatrix3fv(t,e,o=!1,i){g(i,e);const n=this._getUniformLocation(t);null!=n&&c(this._nameToUniformMatrix3,t,e)&&this._context.gl.uniformMatrix3fv(n,o,e)}setUniformMatrix4fv(t,e,o=!1,i){g(i,e);const n=this._getUniformLocation(t);null!=n&&c(this._nameToUniformMatrix4,t,e)&&this._context.gl.uniformMatrix4fv(n,o,e)}stop(){}}function h(e,i,n){const r=e.gl,s=r.createShader(i);return r.shaderSource(s,n),r.compileShader(s),t()&&!r.getShaderParameter(s,r.COMPILE_STATUS)&&(console.error("Compile error in ".concat(i===o.VERTEX_SHADER?"vertex":"fragment"," shader")),console.error(r.getShaderInfoLog(s)),console.error(m(n))),s}function m(t){let e=2;return t.replaceAll("\n",()=>"\n"+f(e++)+":")}function f(t){return t>=1e3?t.toString():(" "+t).slice(-3)}function c(t,e,o){const i=t.get(e);if(!i)return t.set(e,Array.from(o)),!0;const n=o.length;if(i.length!==n)return t.set(e,Array.from(o)),!0;for(let r=0;r<n;++r){const t=o[r];if(i[r]!==t){for(i[r]=t;r<n;++r)i[r]=o[r];return!0}}return!1}const _={enabled:!1},l=e()?(t,...e)=>g(t,e):()=>{},g=e()?(t,e)=>{if(t?.supportsNaN)return;const o=e.length;for(let i=0;i<o;++i){const t=e[i];Number.isNaN(t)&&console.error(`Got ${t} as uniform value from ${(new Error).stack}`)}}:()=>{};export{a as Program,_ as test};
5
+ import has from"../../core/has.js";import{webglValidateShadersEnabled as t,webglDebugEnabled as e}from"./checkWebGLError.js";import{ShaderType as o,ResourceType as i,Extension as n}from"./enums.js";import{transpileShader as r}from"./ShaderTranspiler.js";const s=4294967295,a=!!has("esri-tests-disable-gpu-memory-measurements");class m{constructor(e,n,m,f,c=new Map,_=[]){this._context=e,this._locations=f,this._uniformBlockBindings=c,this._transformFeedbackVaryings=_,this._refCount=1,this._compiled=!1,this._linesOfCode=0,this._nameToUniformLocation=new Map,this._nameToUniform1=new Map,this._nameToUniform1v=new Map,this._nameToUniform2=new Map,this._nameToUniform3=new Map,this._nameToUniform4=new Map,this._nameToUniformMatrix3=new Map,this._nameToUniformMatrix4=new Map,e||console.error("RenderingContext isn't initialized!"),0===n.length&&console.error("Shaders source should not be empty!"),n=r(n,o.VERTEX_SHADER),m=r(m,o.FRAGMENT_SHADER),this._vShader=h(this._context,o.VERTEX_SHADER,n),this._fShader=h(this._context,o.FRAGMENT_SHADER,m),l.enabled&&(this._linesOfCode=n.match(/\n/g).length+m.match(/\n/g).length+2,this._context.instanceCounter.increment(i.LinesOfCode,this._vShader,this._linesOfCode)),this._vShader&&this._fShader||console.error("Error loading shaders!"),this._context.instanceCounter.increment(i.Shader,this),t()&&(this.vertexShader=n,this.fragmentShader=m),this.usedMemory=a?0:n.length+m.length;const g=this._context.gl,d=g.createProgram();g.attachShader(d,this._vShader),g.attachShader(d,this._fShader),this._locations.forEach((t,e)=>g.bindAttribLocation(d,t,e)),this._transformFeedbackVaryings?.length&&g.transformFeedbackVaryings(d,this._transformFeedbackVaryings,g.SEPARATE_ATTRIBS),g.linkProgram(d),t()&&!g.getProgramParameter(d,g.LINK_STATUS)&&console.error(`Could not link shader\nvalidated: ${g.getProgramParameter(d,g.VALIDATE_STATUS)}, gl error ${g.getError()}, vertex: ${g.getShaderParameter(this._vShader,g.COMPILE_STATUS)}, fragment: ${g.getShaderParameter(this._fShader,g.COMPILE_STATUS)}, info log: ${g.getProgramInfoLog(d)}, vertex source: ${this.vertexShader}, fragment source: ${this.fragmentShader}`);for(const[t,o]of this._uniformBlockBindings){const e=g.getUniformBlockIndex(d,t);e<s&&g.uniformBlockBinding(d,e,o)}this._glName=d,this._context.instanceCounter.increment(i.Program,this)}get glName(){return this._glName}get hasGLName(){return null!=this._glName}get hasTransformFeedbackVaryings(){return!!this._transformFeedbackVaryings?.length}get compiled(){return!!this._compiled||(this._context.capabilities.parallelShaderCompile&&null!=this.glName?(this._compiled=!!this._context.gl.getProgramParameter(this.glName,n.COMPLETION_STATUS_KHR),this._compiled):(this._compiled=!0,!0))}dispose(){if(--this._refCount>0)return;const t=this._context.gl,e=this._context.instanceCounter;this._nameToUniformLocation.forEach(t=>t&&e.decrement(i.Uniform,t)),this._nameToUniformLocation.clear(),this._vShader&&(this._linesOfCode>0&&(e.decrement(i.LinesOfCode,this._vShader,this._linesOfCode),this._linesOfCode=0),t.deleteShader(this._vShader),this._vShader=null,e.decrement(i.Shader,this)),this._fShader&&(t.deleteShader(this._fShader),this._fShader=null),this._glName&&(t.deleteProgram(this._glName),this._glName=null,e.decrement(i.Program,this))}ref(){++this._refCount}_getUniformLocation(t){const e=this._nameToUniformLocation.get(t);if(void 0!==e)return e;if(this.glName){const e=this._context.gl.getUniformLocation(this.glName,t);return this._nameToUniformLocation.set(t,e),e&&this._context.instanceCounter.increment(i.Uniform,e),e}return null}hasUniform(t){return null!=this._getUniformLocation(t)}setUniform1i(t,e,o){g(o,e);const i=this._nameToUniform1.get(t);void 0!==i&&e===i||(this._context.gl.uniform1i(this._getUniformLocation(t),e),this._nameToUniform1.set(t,e))}setUniform1iv(t,e,o){d(o,e),_(this._nameToUniform1v,t,e)&&this._context.gl.uniform1iv(this._getUniformLocation(t),e)}setUniform2iv(t,e,o){d(o,e),_(this._nameToUniform2,t,e)&&this._context.gl.uniform2iv(this._getUniformLocation(t),e)}setUniform3iv(t,e,o){d(o,e),_(this._nameToUniform3,t,e)&&this._context.gl.uniform3iv(this._getUniformLocation(t),e)}setUniform4iv(t,e,o){d(o,e),_(this._nameToUniform4,t,e)&&this._context.gl.uniform4iv(this._getUniformLocation(t),e)}setUniform1f(t,e,o){g(o,e);const i=this._nameToUniform1.get(t);void 0!==i&&e===i||(this._context.gl.uniform1f(this._getUniformLocation(t),e),this._nameToUniform1.set(t,e))}setUniform1fv(t,e,o){d(o,e),_(this._nameToUniform1v,t,e)&&this._context.gl.uniform1fv(this._getUniformLocation(t),e)}setUniform2f(t,e,o,i){g(i,e,o);const n=this._nameToUniform2.get(t);void 0===n?(this._context.gl.uniform2f(this._getUniformLocation(t),e,o),this._nameToUniform2.set(t,[e,o])):e===n[0]&&o===n[1]||(this._context.gl.uniform2f(this._getUniformLocation(t),e,o),n[0]=e,n[1]=o)}setUniform2fv(t,e,o){d(o,e),_(this._nameToUniform2,t,e)&&this._context.gl.uniform2fv(this._getUniformLocation(t),e)}setUniform3f(t,e,o,i,n){g(n,e,o,i);const r=this._nameToUniform3.get(t);void 0===r?(this._context.gl.uniform3f(this._getUniformLocation(t),e,o,i),this._nameToUniform3.set(t,[e,o,i])):e===r[0]&&o===r[1]&&i===r[2]||(this._context.gl.uniform3f(this._getUniformLocation(t),e,o,i),r[0]=e,r[1]=o,r[2]=i)}setUniform3fv(t,e,o){d(o,e);const i=this._getUniformLocation(t);null!=i&&_(this._nameToUniform3,t,e)&&this._context.gl.uniform3fv(i,e)}setUniform4f(t,e,o,i,n,r){g(r,e,o,i,n);const s=this._nameToUniform4.get(t);void 0===s?(this._context.gl.uniform4f(this._getUniformLocation(t),e,o,i,n),this._nameToUniform4.set(t,[e,o,i,n])):void 0!==s&&e===s[0]&&o===s[1]&&i===s[2]&&n===s[3]||(this._context.gl.uniform4f(this._getUniformLocation(t),e,o,i,n),s[0]=e,s[1]=o,s[2]=i,s[3]=n)}setUniform4fv(t,e,o){d(o,e);const i=this._getUniformLocation(t);null!=i&&_(this._nameToUniform4,t,e)&&this._context.gl.uniform4fv(i,e)}setUniformMatrix3fv(t,e,o=!1,i){d(i,e);const n=this._getUniformLocation(t);null!=n&&_(this._nameToUniformMatrix3,t,e)&&this._context.gl.uniformMatrix3fv(n,o,e)}setUniformMatrix4fv(t,e,o=!1,i){d(i,e);const n=this._getUniformLocation(t);null!=n&&_(this._nameToUniformMatrix4,t,e)&&this._context.gl.uniformMatrix4fv(n,o,e)}stop(){}}function h(e,i,n){const r=e.gl,s=r.createShader(i);return r.shaderSource(s,n),r.compileShader(s),t()&&!r.getShaderParameter(s,r.COMPILE_STATUS)&&(console.error("Compile error in ".concat(i===o.VERTEX_SHADER?"vertex":"fragment"," shader")),console.error(r.getShaderInfoLog(s)),console.error(f(n))),s}function f(t){let e=2;return t.replaceAll("\n",()=>"\n"+c(e++)+":")}function c(t){return t>=1e3?t.toString():(" "+t).slice(-3)}function _(t,e,o){const i=t.get(e);if(!i)return t.set(e,Array.from(o)),!0;const n=o.length;if(i.length!==n)return t.set(e,Array.from(o)),!0;for(let r=0;r<n;++r){const t=o[r];if(i[r]!==t){for(i[r]=t;r<n;++r)i[r]=o[r];return!0}}return!1}const l={enabled:!1},g=e()?(t,...e)=>d(t,e):()=>{},d=e()?(t,e)=>{if(t?.supportsNaN)return;const o=e.length;for(let i=0;i<o;++i){const t=e[i];Number.isNaN(t)&&console.error(`Got ${t} as uniform value from ${(new Error).stack}`)}}:()=>{};export{m as Program,l as test};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{ResourceType as e}from"./enums.js";import{FBOAttachmentType as t}from"./FBOAttachmentType.js";import{estimateMemory as r}from"./RenderbufferDescriptor.js";class s{constructor(r,s){this._context=r,this._descriptor=s,this.type=t.Renderbuffer,this._context.instanceCounter.increment(e.Renderbuffer,this);const i=this._context.gl;this.glName=i.createRenderbuffer(),this._context.bindRenderbuffer(this);const{width:n,height:o,internalFormat:h,multisampled:d}=s;d?i.renderbufferStorageMultisample(i.RENDERBUFFER,this.samples,h,n,o):i.renderbufferStorage(i.RENDERBUFFER,h,n,o),this._context.bindRenderbuffer(null)}get descriptor(){return this._descriptor}get samples(){const e=this._descriptor.samples,t=this._context.parameters.maxSamples;return e?Math.min(e,t):t}get usedMemory(){return r(this._descriptor)}resize(e,t){const r=this._descriptor;if(r.width===e&&r.height===t)return;r.width=e,r.height=t;const s=this._context.gl;this._context.bindRenderbuffer(this),r.multisampled?s.renderbufferStorageMultisample(s.RENDERBUFFER,this.samples,r.internalFormat,r.width,r.height):s.renderbufferStorage(s.RENDERBUFFER,r.internalFormat,r.width,r.height),this._context.bindRenderbuffer(null)}dispose(){this._context&&(this._context.gl.deleteRenderbuffer(this.glName),this._context.instanceCounter.decrement(e.Renderbuffer,this),this._context=null)}}export{s as Renderbuffer};
5
+ import has from"../../core/has.js";import{ResourceType as e}from"./enums.js";import{FBOAttachmentType as t}from"./FBOAttachmentType.js";import{estimateMemory as r}from"./RenderbufferDescriptor.js";const s=!!has("esri-tests-disable-gpu-memory-measurements");class i{constructor(r,s){this._context=r,this._descriptor=s,this.type=t.Renderbuffer,this._context.instanceCounter.increment(e.Renderbuffer,this);const i=this._context.gl;this.glName=i.createRenderbuffer(),this._context.bindRenderbuffer(this);const{width:n,height:o,internalFormat:h,multisampled:c}=s;c?i.renderbufferStorageMultisample(i.RENDERBUFFER,this.samples,h,n,o):i.renderbufferStorage(i.RENDERBUFFER,h,n,o),this._context.bindRenderbuffer(null)}get descriptor(){return this._descriptor}get samples(){const e=this._descriptor.samples,t=this._context.parameters.maxSamples;return e?Math.min(e,t):t}get usedMemory(){return s?0:r(this._descriptor)}resize(e,t){const r=this._descriptor;if(r.width===e&&r.height===t)return;r.width=e,r.height=t;const s=this._context.gl;this._context.bindRenderbuffer(this),r.multisampled?s.renderbufferStorageMultisample(s.RENDERBUFFER,this.samples,r.internalFormat,r.width,r.height):s.renderbufferStorage(s.RENDERBUFFER,r.internalFormat,r.width,r.height),this._context.bindRenderbuffer(null)}dispose(){this._context&&(this._context.gl.deleteRenderbuffer(this.glName),this._context.instanceCounter.decrement(e.Renderbuffer,this),this._context=null)}}export{i as Renderbuffer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../core/Error.js";import"../../core/has.js";import e from"../../core/Logger.js";import{abortMaybe as i}from"../../core/maybe.js";import{throwIfAborted as r,isAbortError as s}from"../../core/promiseUtils.js";import{checkWebGLError as o}from"./checkWebGLError.js";import{TextureType as a,ResourceType as n,CompressedTextureFormat as p,TextureSamplingMode as l,TextureConstants as h,PixelFormat as m}from"./enums.js";import{FBOAttachmentType as d}from"./FBOAttachmentType.js";import{estimateMemory as c}from"./TextureDescriptor.js";import{isCompressedData as _,deriveInternalFormat as u,isTexImageSource as g,is3DTarget as T,validateTexture as x,isCompressedFormat as E,getDimensions as M,calcMipmapLevels as A,isSizedPixelFormat as b,isSizedDepthFormat as f,isSizedDepthStencilFormat as w}from"./textureUtils.js";import{ValidatedTextureDescriptor as I}from"./ValidatedTextureDescriptor.js";const R=null,D=()=>e.getLogger("esri/views/webgl/Texture");let S=class e{static{this.TEXTURE_UNIT_FOR_UPDATES=0}static{this.compressionWorkerHandle=null}constructor(e,i=null,r=null){if(this.type=d.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._shadowFilterDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,r=i;else{const r=I.validate(e,i);if(!r)throw new t("texture:invalid-descriptor","Texture descriptor invalid");this._descriptor=r}this._descriptor.target===a.TEXTURE_CUBE_MAP?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return c(this._descriptor)}get cachedMemory(){return this.usedMemory}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty||this._shadowFilterDirty}get hasWebGLTextureObject(){return!!this._glName}dispose(){this.abortCompression(),this._descriptor.context.gl&&this.hasWebGLTextureObject&&(this._descriptor.context.instanceCounter.decrement(n.Texture,this),this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}[Symbol.dispose](){this.dispose()}resize(e,i){const r=this._descriptor;if(r.width!==e||r.height!==i){if(this._wasImmutablyAllocated)throw new t("texture:immutable-resize","Immutable textures can't be resized!");r.width=e,r.height=i,this._descriptor.target===a.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}enableCompression(t){this._descriptor.compress=t}disableCompression(){this._descriptor.compress=void 0}setData(t){this.abortCompression(),!_(t)&&this._descriptor.internalFormat&&this._descriptor.internalFormat in p&&(this._descriptor.internalFormat=void 0),this._setData(t),!_(t)&&this._descriptor.compress&&this._compressOnWorker(t)}updateData(i,r,s,o,a,n,p=0){n||D().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||D().error("An attempt to update uninitialized texture!");const l=this._descriptor;l.internalFormat=u(l);const{context:h,pixelFormat:m,dataType:d,target:c,isImmutable:T}=l;if(T&&!this._wasImmutablyAllocated)throw new t("texture:uninitialized","Cannot update immutable texture before allocation!");const x=h.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES,!0);(r<0||s<0||r+o>l.width||s+a>l.height)&&D().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:E}=h;p&&(o&&a||D().warn("Must pass width and height if `UNPACK_SKIP_ROWS` is used"),E.pixelStorei(E.UNPACK_SKIP_ROWS,p)),g(n)?E.texSubImage2D(c,i,r,s,o,a,m,d,n):_(n)?E.compressedTexSubImage2D(c,i,r,s,o,a,l.internalFormat,n.levels[i]):E.texSubImage2D(c,i,r,s,o,a,m,d,n),p&&E.pixelStorei(E.UNPACK_SKIP_ROWS,0),h.bindTexture(x,e.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(i,r,s,o,a,n,p,l){l||D().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||D().error("An attempt to update an uninitialized texture!");const h=this._descriptor;h.internalFormat=u(h);const{context:m,pixelFormat:d,dataType:c,isImmutable:g,target:x}=h;if(g&&!this._wasImmutablyAllocated)throw new t("texture:uninitialized","Cannot update immutable texture before allocation!");T(x)||D().warn("Attempting to set 3D texture data on a non-3D texture");const E=m.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);m.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),(r<0||s<0||o<0||r+a>h.width||s+n>h.height||o+p>h.depth)&&D().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:M}=m;if(_(l))l=l.levels[i],M.compressedTexSubImage3D(x,i,r,s,o,a,n,p,h.internalFormat,l);else{const t=l;M.texSubImage3D(x,i,r,s,o,a,n,p,d,c,t)}m.bindTexture(E,e.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const i=this._descriptor;if(0===i.width||0===i.height)return;if(!i.hasMipmap){if(this._wasImmutablyAllocated)throw new t("texture:immutable-change","Cannot add mipmaps to immutable texture after allocation");i.hasMipmap=!0,this._samplingModeDirty=!0,x(i)}i.samplingMode===l.LINEAR?(this._samplingModeDirty=!0,i.samplingMode=l.LINEAR_MIPMAP_NEAREST):i.samplingMode===l.NEAREST&&(this._samplingModeDirty=!0,i.samplingMode=l.NEAREST_MIPMAP_NEAREST);const r=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(i.target),this._descriptor.context.bindTexture(r,e.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new t("texture:immutable-change","Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,x(e)}e.samplingMode===l.LINEAR_MIPMAP_NEAREST?(this._samplingModeDirty=!0,e.samplingMode=l.LINEAR):e.samplingMode===l.NEAREST_MIPMAP_NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=l.NEAREST)}setSamplingMode(t){t!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=t,this._samplingModeDirty=!0)}setWrapMode(t){t!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=t,x(this._descriptor),this._wrapModeDirty=!0)}setShadowFiltering(t){t!==this._descriptor.linearFilterDepth&&(this._descriptor.linearFilterDepth=this._descriptor.compareEnabled=t,this.setSamplingMode(t?l.LINEAR:l.NEAREST),x(this._descriptor),this._shadowFilterDirty=!0)}applyChanges(){this._samplingModeDirty&&(this._applySamplingMode(),this._samplingModeDirty=!1),this._wrapModeDirty&&(this._applyWrapMode(),this._wrapModeDirty=!1),this._shadowFilterDirty&&(this._applyShadowMode(),this._shadowFilterDirty=!1)}abortCompression(){this._compressionAbortController=i(this._compressionAbortController)}_setData(i,r){const s=this._descriptor,a=s.context?.gl;if(!a)return;o(a),this.hasWebGLTextureObject||(this._glName=a.createTexture(),s.context.instanceCounter.increment(n.Texture,this)),x(s);const p=s.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);s.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._configurePixelStorage(),o(a);const l=r??s.target,h=T(l);if(g(i))this._setDataFromTexImageSource(i,l);else{const{width:e,height:r,depth:n}=s;if(null==e||null==r)throw new t("texture:missing-size","Width and height must be specified!");if(h&&null==n)throw new t("texture:missing-depth","Depth must be specified!");if(s.internalFormat=u(s),s.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(l,s.internalFormat,s.hasMipmap,e,r,n),_(i)){if(!E(s.internalFormat))throw new t("texture:format-mismatch","Attempting to use compressed data with an uncompressed format!");this._setDataFromCompressedSource(i,s.internalFormat,l)}else this._texImage(l,0,s.internalFormat,e,r,n,i),o(a),s.hasMipmap&&this.generateMipmap()}this._applySamplingMode(),this._applyWrapMode(),this._applyAnisotropicFilteringParameters(),this._applyShadowMode(),o(a),s.context.bindTexture(p,e.TEXTURE_UNIT_FOR_UPDATES)}_setDataCubeMap(t=null){for(let e=a.TEXTURE_CUBE_MAP_POSITIVE_X;e<=a.TEXTURE_CUBE_MAP_NEGATIVE_Z;e++)this._setData(t,e)}_configurePixelStorage(){const t=this._descriptor.context.gl,{unpackAlignment:e,flipped:i,preMultiplyAlpha:r}=this._descriptor;t.pixelStorei(t.UNPACK_ALIGNMENT,e),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,i?1:0),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r?1:0)}_setDataFromTexImageSource(t,e){const{gl:i}=this._descriptor.context,r=this._descriptor;r.internalFormat=u(r);const s=T(e),{width:a,height:n,depth:p}=M(t);r.width&&r.height,r.width||(r.width=a),r.height||(r.height=n),s&&r.depth,s&&(r.depth=p),r.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(e,r.internalFormat,r.hasMipmap,a,n,p),this._texImage(e,0,r.internalFormat,a,n,p,t),o(i),r.hasMipmap&&(this.generateMipmap(),o(i))}_setDataFromCompressedSource(t,e,i){const r=this._descriptor,{width:s,height:o,depth:a}=r,n=t.levels,p=A(i,s,o,a),l=Math.min(p,n.length)-1;this._descriptor.context.gl.texParameteri(r.target,h.MAX_LEVEL,l),this._forEachMipmapLevel((t,r,s,o)=>{const a=n[Math.min(t,n.length-1)];this._compressedTexImage(i,t,e,r,s,o,a)},l)}_texStorage(e,i,r,s,o,a){const{gl:n}=this._descriptor.context;if(!b(i)&&!f(i)&&!w(i))throw new t("texture:missing-format","Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const p=r?A(e,s,o,a):1;if(T(e)){if(null==a)throw new t("texture:missing-depth","Missing depth dimension for 3D texture upload");n.texStorage3D(e,p,i,s,o,a)}else n.texStorage2D(e,p,i,s,o);this._wasImmutablyAllocated=!0}_texImage(e,i,r,s,o,a,n){const p=this._descriptor.context.gl,l=T(e),{isImmutable:h,pixelFormat:m,dataType:d}=this._descriptor;if(h){if(null!=n){const r=n;if(l){if(null==a)throw new t("texture:missing-depth","Missing depth dimension for 3D texture upload");p.texSubImage3D(e,i,0,0,0,s,o,a,m,d,r)}else p.texSubImage2D(e,i,0,0,s,o,m,d,r)}}else{const h=n;if(l){if(null==a)throw new t("texture:missing-depth","Missing depth dimension for 3D texture upload");p.texImage3D(e,i,r,s,o,a,0,m,d,h)}else p.texImage2D(e,i,r,s,o,0,m,d,h)}}_compressedTexImage(e,i,r,s,o,a,n){const p=this._descriptor.context.gl,l=T(e);if(this._descriptor.isImmutable){if(null!=n)if(l){if(null==a)throw new t("texture:missing-depth","Missing depth dimension for 3D texture upload");p.compressedTexSubImage3D(e,i,0,0,0,s,o,a,r,n)}else p.compressedTexSubImage2D(e,i,0,0,s,o,r,n)}else if(l){if(null==a)throw new t("texture:missing-depth","Missing depth dimension for 3D texture upload");p.compressedTexImage3D(e,i,r,s,o,a,0,n)}else p.compressedTexImage2D(e,i,r,s,o,0,n)}async _compressOnWorker(t){const{width:i,height:o,context:a,flipped:n,preMultiplyAlpha:p,hasMipmap:l}=this._descriptor,h=this._descriptor.compress?.compressionTracker,d=this._descriptor.compress?.compressionCallback,{compressedTextureETC:c,compressedTextureS3TC:_}=a.capabilities;if(!e.compressionWorkerHandle?.isCompressible(t,this._descriptor)||!c&&!_)return;this.abortCompression();const u=new AbortController;this._compressionAbortController=u,h?.increment();try{let s;t instanceof Uint8Array?s=t.buffer:(s=await createImageBitmap(t,{imageOrientation:n?"flipY":"none"}),r(u));const a={data:s,width:i,height:o,needsFlip:t instanceof Uint8Array&&this.descriptor.flipped,components:this._descriptor.pixelFormat===m.RGBA?4:3,preMultiplyAlpha:p,hasMipmap:l,hasETC:!!c,hasS3TC:!!_},h=await e.compressionWorkerHandle.invoke(a,u.signal,"low");if(r(u),h.compressedTexture&&this.hasWebGLTextureObject){const t=this.usedMemory;this._descriptor.internalFormat=h.internalFormat,this._setData(h.compressedTexture),d?.(t-this.usedMemory)}}catch(g){s(g)||D().error("Texture compression failed!")}finally{h?.decrement(),this._compressionAbortController?.signal.aborted&&(this._compressionAbortController=null)}}_forEachMipmapLevel(e,i=1/0){let{width:r,height:s,depth:o,hasMipmap:n,target:p}=this._descriptor;const l=p===a.TEXTURE_3D;if(null==r||null==s||l&&null==o)throw new t("texture:missing-size","Missing texture dimensions for mipmap calculation");for(let t=0;e(t,r,s,o),n&&(1!==r||1!==s||l&&1!==o)&&!(t>=i);++t)r=Math.max(1,r>>1),s=Math.max(1,s>>1),l&&(o=Math.max(1,o>>1))}_applySamplingMode(){const t=this._descriptor,e=t.context?.gl;let i=t.samplingMode,r=t.samplingMode;i===l.LINEAR_MIPMAP_NEAREST||i===l.LINEAR_MIPMAP_LINEAR?(i=l.LINEAR,t.hasMipmap||(r=l.LINEAR)):i!==l.NEAREST_MIPMAP_NEAREST&&i!==l.NEAREST_MIPMAP_LINEAR||(i=l.NEAREST,t.hasMipmap||(r=l.NEAREST)),e.texParameteri(t.target,e.TEXTURE_MAG_FILTER,i),e.texParameteri(t.target,e.TEXTURE_MIN_FILTER,r)}_applyWrapMode(){const t=this._descriptor,e=t.context?.gl;"number"==typeof t.wrapMode?(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode)):(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode.s),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode.t))}_applyShadowMode(){const t=this._descriptor,e=t.context?.gl,i=t.compareEnabled?e.COMPARE_REF_TO_TEXTURE:e.NONE;e.texParameteri(t.target,e.TEXTURE_COMPARE_MODE,i),t.compareEnabled&&e.texParameteri(t.target,e.TEXTURE_COMPARE_FUNC,e.GREATER),o(e)}_applyAnisotropicFilteringParameters(){const t=this._descriptor,e=t.context.capabilities.textureFilterAnisotropic;if(!e)return;t.context.gl.texParameterf(t.target,e.TEXTURE_MAX_ANISOTROPY,t.maxAnisotropy??1)}};export{S as Texture,R as tracer};
5
+ import t from"../../core/Error.js";import has from"../../core/has.js";import e from"../../core/Logger.js";import{abortMaybe as i}from"../../core/maybe.js";import{throwIfAborted as r,isAbortError as s}from"../../core/promiseUtils.js";import{checkWebGLError as o}from"./checkWebGLError.js";import{TextureType as a,ResourceType as n,CompressedTextureFormat as p,TextureSamplingMode as l,TextureConstants as m,PixelFormat as h}from"./enums.js";import{FBOAttachmentType as d}from"./FBOAttachmentType.js";import{estimateMemory as c}from"./TextureDescriptor.js";import{isCompressedData as _,deriveInternalFormat as u,isTexImageSource as g,is3DTarget as T,validateTexture as x,isCompressedFormat as E,getDimensions as M,calcMipmapLevels as A,isSizedPixelFormat as b,isSizedDepthFormat as f,isSizedDepthStencilFormat as w}from"./textureUtils.js";import{ValidatedTextureDescriptor as I}from"./ValidatedTextureDescriptor.js";const R=null,D=!!has("esri-tests-disable-gpu-memory-measurements"),S=()=>e.getLogger("esri/views/webgl/Texture");let P=class e{static{this.TEXTURE_UNIT_FOR_UPDATES=0}static{this.compressionWorkerHandle=null}constructor(e,i=null,r=null){if(this.type=d.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._shadowFilterDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,r=i;else{const r=I.validate(e,i);if(!r)throw new t("texture:invalid-descriptor","Texture descriptor invalid");this._descriptor=r}this._descriptor.target===a.TEXTURE_CUBE_MAP?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return D?0:c(this._descriptor)}get cachedMemory(){return this.usedMemory}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty||this._shadowFilterDirty}get hasWebGLTextureObject(){return!!this._glName}dispose(){this.abortCompression(),this._descriptor.context.gl&&this.hasWebGLTextureObject&&(this._descriptor.context.instanceCounter.decrement(n.Texture,this),this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}[Symbol.dispose](){this.dispose()}resize(e,i){const r=this._descriptor;if(r.width!==e||r.height!==i){if(this._wasImmutablyAllocated)throw new t("texture:immutable-resize","Immutable textures can't be resized!");r.width=e,r.height=i,this._descriptor.target===a.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}enableCompression(t){this._descriptor.compress=t}disableCompression(){this._descriptor.compress=void 0}setData(t){this.abortCompression(),!_(t)&&this._descriptor.internalFormat&&this._descriptor.internalFormat in p&&(this._descriptor.internalFormat=void 0),this._setData(t),!_(t)&&this._descriptor.compress&&this._compressOnWorker(t)}updateData(i,r,s,o,a,n,p=0){n||S().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||S().error("An attempt to update uninitialized texture!");const l=this._descriptor;l.internalFormat=u(l);const{context:m,pixelFormat:h,dataType:d,target:c,isImmutable:T}=l;if(T&&!this._wasImmutablyAllocated)throw new t("texture:uninitialized","Cannot update immutable texture before allocation!");const x=m.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES,!0);(r<0||s<0||r+o>l.width||s+a>l.height)&&S().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:E}=m;p&&(o&&a||S().warn("Must pass width and height if `UNPACK_SKIP_ROWS` is used"),E.pixelStorei(E.UNPACK_SKIP_ROWS,p)),g(n)?E.texSubImage2D(c,i,r,s,o,a,h,d,n):_(n)?E.compressedTexSubImage2D(c,i,r,s,o,a,l.internalFormat,n.levels[i]):E.texSubImage2D(c,i,r,s,o,a,h,d,n),p&&E.pixelStorei(E.UNPACK_SKIP_ROWS,0),m.bindTexture(x,e.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(i,r,s,o,a,n,p,l){l||S().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||S().error("An attempt to update an uninitialized texture!");const m=this._descriptor;m.internalFormat=u(m);const{context:h,pixelFormat:d,dataType:c,isImmutable:g,target:x}=m;if(g&&!this._wasImmutablyAllocated)throw new t("texture:uninitialized","Cannot update immutable texture before allocation!");T(x)||S().warn("Attempting to set 3D texture data on a non-3D texture");const E=h.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);h.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),(r<0||s<0||o<0||r+a>m.width||s+n>m.height||o+p>m.depth)&&S().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:M}=h;if(_(l))l=l.levels[i],M.compressedTexSubImage3D(x,i,r,s,o,a,n,p,m.internalFormat,l);else{const t=l;M.texSubImage3D(x,i,r,s,o,a,n,p,d,c,t)}h.bindTexture(E,e.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const i=this._descriptor;if(0===i.width||0===i.height)return;if(!i.hasMipmap){if(this._wasImmutablyAllocated)throw new t("texture:immutable-change","Cannot add mipmaps to immutable texture after allocation");i.hasMipmap=!0,this._samplingModeDirty=!0,x(i)}i.samplingMode===l.LINEAR?(this._samplingModeDirty=!0,i.samplingMode=l.LINEAR_MIPMAP_NEAREST):i.samplingMode===l.NEAREST&&(this._samplingModeDirty=!0,i.samplingMode=l.NEAREST_MIPMAP_NEAREST);const r=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(i.target),this._descriptor.context.bindTexture(r,e.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new t("texture:immutable-change","Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,x(e)}e.samplingMode===l.LINEAR_MIPMAP_NEAREST?(this._samplingModeDirty=!0,e.samplingMode=l.LINEAR):e.samplingMode===l.NEAREST_MIPMAP_NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=l.NEAREST)}setSamplingMode(t){t!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=t,this._samplingModeDirty=!0)}setWrapMode(t){t!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=t,x(this._descriptor),this._wrapModeDirty=!0)}setShadowFiltering(t){t!==this._descriptor.linearFilterDepth&&(this._descriptor.linearFilterDepth=this._descriptor.compareEnabled=t,this.setSamplingMode(t?l.LINEAR:l.NEAREST),x(this._descriptor),this._shadowFilterDirty=!0)}applyChanges(){this._samplingModeDirty&&(this._applySamplingMode(),this._samplingModeDirty=!1),this._wrapModeDirty&&(this._applyWrapMode(),this._wrapModeDirty=!1),this._shadowFilterDirty&&(this._applyShadowMode(),this._shadowFilterDirty=!1)}abortCompression(){this._compressionAbortController=i(this._compressionAbortController)}_setData(i,r){const s=this._descriptor,a=s.context?.gl;if(!a)return;o(a),this.hasWebGLTextureObject||(this._glName=a.createTexture(),s.context.instanceCounter.increment(n.Texture,this)),x(s);const p=s.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);s.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._configurePixelStorage(),o(a);const l=r??s.target,m=T(l);if(g(i))this._setDataFromTexImageSource(i,l);else{const{width:e,height:r,depth:n}=s;if(null==e||null==r)throw new t("texture:missing-size","Width and height must be specified!");if(m&&null==n)throw new t("texture:missing-depth","Depth must be specified!");if(s.internalFormat=u(s),s.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(l,s.internalFormat,s.hasMipmap,e,r,n),_(i)){if(!E(s.internalFormat))throw new t("texture:format-mismatch","Attempting to use compressed data with an uncompressed format!");this._setDataFromCompressedSource(i,s.internalFormat,l)}else this._texImage(l,0,s.internalFormat,e,r,n,i),o(a),s.hasMipmap&&this.generateMipmap()}this._applySamplingMode(),this._applyWrapMode(),this._applyAnisotropicFilteringParameters(),this._applyShadowMode(),o(a),s.context.bindTexture(p,e.TEXTURE_UNIT_FOR_UPDATES)}_setDataCubeMap(t=null){for(let e=a.TEXTURE_CUBE_MAP_POSITIVE_X;e<=a.TEXTURE_CUBE_MAP_NEGATIVE_Z;e++)this._setData(t,e)}_configurePixelStorage(){const t=this._descriptor.context.gl,{unpackAlignment:e,flipped:i,preMultiplyAlpha:r}=this._descriptor;t.pixelStorei(t.UNPACK_ALIGNMENT,e),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,i?1:0),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r?1:0)}_setDataFromTexImageSource(t,e){const{gl:i}=this._descriptor.context,r=this._descriptor;r.internalFormat=u(r);const s=T(e),{width:a,height:n,depth:p}=M(t);r.width&&r.height,r.width||(r.width=a),r.height||(r.height=n),s&&r.depth,s&&(r.depth=p),r.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(e,r.internalFormat,r.hasMipmap,a,n,p),this._texImage(e,0,r.internalFormat,a,n,p,t),o(i),r.hasMipmap&&(this.generateMipmap(),o(i))}_setDataFromCompressedSource(t,e,i){const r=this._descriptor,{width:s,height:o,depth:a}=r,n=t.levels,p=A(i,s,o,a),l=Math.min(p,n.length)-1;this._descriptor.context.gl.texParameteri(r.target,m.MAX_LEVEL,l),this._forEachMipmapLevel((t,r,s,o)=>{const a=n[Math.min(t,n.length-1)];this._compressedTexImage(i,t,e,r,s,o,a)},l)}_texStorage(e,i,r,s,o,a){const{gl:n}=this._descriptor.context;if(!b(i)&&!f(i)&&!w(i))throw new t("texture:missing-format","Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const p=r?A(e,s,o,a):1;if(T(e)){if(null==a)throw new t("texture:missing-depth","Missing depth dimension for 3D texture upload");n.texStorage3D(e,p,i,s,o,a)}else n.texStorage2D(e,p,i,s,o);this._wasImmutablyAllocated=!0}_texImage(e,i,r,s,o,a,n){const p=this._descriptor.context.gl,l=T(e),{isImmutable:m,pixelFormat:h,dataType:d}=this._descriptor;if(m){if(null!=n){const r=n;if(l){if(null==a)throw new t("texture:missing-depth","Missing depth dimension for 3D texture upload");p.texSubImage3D(e,i,0,0,0,s,o,a,h,d,r)}else p.texSubImage2D(e,i,0,0,s,o,h,d,r)}}else{const m=n;if(l){if(null==a)throw new t("texture:missing-depth","Missing depth dimension for 3D texture upload");p.texImage3D(e,i,r,s,o,a,0,h,d,m)}else p.texImage2D(e,i,r,s,o,0,h,d,m)}}_compressedTexImage(e,i,r,s,o,a,n){const p=this._descriptor.context.gl,l=T(e);if(this._descriptor.isImmutable){if(null!=n)if(l){if(null==a)throw new t("texture:missing-depth","Missing depth dimension for 3D texture upload");p.compressedTexSubImage3D(e,i,0,0,0,s,o,a,r,n)}else p.compressedTexSubImage2D(e,i,0,0,s,o,r,n)}else if(l){if(null==a)throw new t("texture:missing-depth","Missing depth dimension for 3D texture upload");p.compressedTexImage3D(e,i,r,s,o,a,0,n)}else p.compressedTexImage2D(e,i,r,s,o,0,n)}async _compressOnWorker(t){const{width:i,height:o,context:a,flipped:n,preMultiplyAlpha:p,hasMipmap:l}=this._descriptor,m=this._descriptor.compress?.compressionTracker,d=this._descriptor.compress?.compressionCallback,{compressedTextureETC:c,compressedTextureS3TC:_}=a.capabilities;if(!e.compressionWorkerHandle?.isCompressible(t,this._descriptor)||!c&&!_)return;this.abortCompression();const u=new AbortController;this._compressionAbortController=u,m?.increment();try{let s;t instanceof Uint8Array?s=t.buffer:(s=await createImageBitmap(t,{imageOrientation:n?"flipY":"none"}),r(u));const a={data:s,width:i,height:o,needsFlip:t instanceof Uint8Array&&this.descriptor.flipped,components:this._descriptor.pixelFormat===h.RGBA?4:3,preMultiplyAlpha:p,hasMipmap:l,hasETC:!!c,hasS3TC:!!_},m=await e.compressionWorkerHandle.invoke(a,u.signal,"low");if(r(u),m.compressedTexture&&this.hasWebGLTextureObject){const t=this.usedMemory;this._descriptor.internalFormat=m.internalFormat,this._setData(m.compressedTexture),d?.(t-this.usedMemory)}}catch(g){s(g)||S().error("Texture compression failed!")}finally{m?.decrement(),this._compressionAbortController?.signal.aborted&&(this._compressionAbortController=null)}}_forEachMipmapLevel(e,i=1/0){let{width:r,height:s,depth:o,hasMipmap:n,target:p}=this._descriptor;const l=p===a.TEXTURE_3D;if(null==r||null==s||l&&null==o)throw new t("texture:missing-size","Missing texture dimensions for mipmap calculation");for(let t=0;e(t,r,s,o),n&&(1!==r||1!==s||l&&1!==o)&&!(t>=i);++t)r=Math.max(1,r>>1),s=Math.max(1,s>>1),l&&(o=Math.max(1,o>>1))}_applySamplingMode(){const t=this._descriptor,e=t.context?.gl;let i=t.samplingMode,r=t.samplingMode;i===l.LINEAR_MIPMAP_NEAREST||i===l.LINEAR_MIPMAP_LINEAR?(i=l.LINEAR,t.hasMipmap||(r=l.LINEAR)):i!==l.NEAREST_MIPMAP_NEAREST&&i!==l.NEAREST_MIPMAP_LINEAR||(i=l.NEAREST,t.hasMipmap||(r=l.NEAREST)),e.texParameteri(t.target,e.TEXTURE_MAG_FILTER,i),e.texParameteri(t.target,e.TEXTURE_MIN_FILTER,r)}_applyWrapMode(){const t=this._descriptor,e=t.context?.gl;"number"==typeof t.wrapMode?(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode)):(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode.s),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode.t))}_applyShadowMode(){const t=this._descriptor,e=t.context?.gl,i=t.compareEnabled?e.COMPARE_REF_TO_TEXTURE:e.NONE;e.texParameteri(t.target,e.TEXTURE_COMPARE_MODE,i),t.compareEnabled&&e.texParameteri(t.target,e.TEXTURE_COMPARE_FUNC,e.GREATER),o(e)}_applyAnisotropicFilteringParameters(){const t=this._descriptor,e=t.context.capabilities.textureFilterAnisotropic;if(!e)return;t.context.gl.texParameterf(t.target,e.TEXTURE_MAX_ANISOTROPY,t.maxAnisotropy??1)}};export{P as Texture,R as tracer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import"../../core/has.js";import{webglDebugEnabled as e}from"./checkWebGLError.js";import{CompressedTextureFormat as r,SizedPixelFormat as t,SizedDepthStencilFormat as s,SizedDepthFormat as a,PixelFormat as c,SizedStencilFormat as n,BufferType as o}from"./enums.js";import{getDataTypeBytes as i}from"./getDataTypeBytes.js";function R(e){const r=e.gl;switch(r.getError()){case r.NO_ERROR:return null;case r.INVALID_ENUM:return"An unacceptable value has been specified for an enumerated argument";case r.INVALID_VALUE:return"An unacceptable value has been specified for an argument";case r.INVALID_OPERATION:return"The specified command is not allowed for the current state";case r.INVALID_FRAMEBUFFER_OPERATION:return"The currently bound framebuffer is not framebuffer complete";case r.OUT_OF_MEMORY:return"Not enough memory is left to execute the command";case r.CONTEXT_LOST_WEBGL:return"WebGL context is lost"}return"Unknown error"}function E(e,r){return(e.vertexBuffers.get(r)?.usedMemory??0)/_(e.layout.get(r))}function _(e){return e[0].stride}function u(r,t,s,a,c=0){const n=r.gl;r.bindBuffer(s);for(const o of a){const s=t.get(o.name);if(null==s){console.warn(`There is no location for vertex attribute '${o.name}' defined.`);continue}const a=c*o.stride;if(o.count<=4)n.vertexAttribPointer(s,o.count,o.type,o.normalized,o.stride,o.offset+a),n.enableVertexAttribArray(s),o.divisor>0&&r.gl.vertexAttribDivisor(s,o.divisor);else if(9===o.count)for(let e=0;e<3;e++)n.vertexAttribPointer(s+e,3,o.type,o.normalized,o.stride,o.offset+12*e+a),n.enableVertexAttribArray(s+e),o.divisor>0&&r.gl.vertexAttribDivisor(s+e,o.divisor);else if(16===o.count)for(let e=0;e<4;e++)n.vertexAttribPointer(s+e,4,o.type,o.normalized,o.stride,o.offset+16*e+a),n.enableVertexAttribArray(s+e),o.divisor>0&&r.gl?.vertexAttribDivisor(s+e,o.divisor);else console.error("Unsupported vertex attribute element count: "+o.count);if(e()){const e=R(r),t=i(o.type),s=o.offset,c=Math.round(t/s)!==t/s?`. Offset not a multiple of stride. DataType requires ${t} bytes, but descriptor has an offset of ${s}`:"";e&&console.error(`Unable to bind vertex attribute "${o.name}" with baseInstanceOffset ${a}${c}:`,e,o)}}}function A(e,r,t,s){const a=e.gl;e.bindBuffer(t);for(const c of s){const t=r.get(c.name);if(c.count<=4)a.disableVertexAttribArray(t),c.divisor&&c.divisor>0&&e.gl?.vertexAttribDivisor(t,0);else if(9===c.count)for(let r=0;r<3;r++)a.disableVertexAttribArray(t+r),c.divisor&&c.divisor>0&&e.gl?.vertexAttribDivisor(t+r,0);else if(16===c.count)for(let r=0;r<4;r++)a.disableVertexAttribArray(t+r),c.divisor&&c.divisor>0&&e.gl?.vertexAttribDivisor(t+r,0);else console.error("Unsupported vertex attribute element count: "+c.count)}e.unbindBuffer(o.ARRAY_BUFFER)}function G(e){switch(e){case c.ALPHA:case c.LUMINANCE:case c.RED:case c.RED_INTEGER:case t.R8:case t.R8I:case t.R8UI:case t.R8_SNORM:case n.STENCIL_INDEX8:return 1;case c.LUMINANCE_ALPHA:case c.RG:case c.RG_INTEGER:case t.RGBA4:case t.R16F:case t.R16I:case t.R16UI:case t.RG8:case t.RG8I:case t.RG8UI:case t.RG8_SNORM:case t.RGB565:case t.RGB5_A1:case a.DEPTH_COMPONENT16:return 2;case c.RGB:case c.RGB_INTEGER:case t.RGB8:case t.RGB8I:case t.RGB8UI:case t.RGB8_SNORM:case t.SRGB8:case a.DEPTH_COMPONENT24:return 3;case c.RGBA:case c.RGBA_INTEGER:case t.RGBA8:case t.R32F:case t.R11F_G11F_B10F:case t.RG16F:case t.R32I:case t.R32UI:case t.RG16I:case t.RG16UI:case t.RGBA8I:case t.RGBA8UI:case t.RGBA8_SNORM:case t.SRGB8_ALPHA8:case t.RGB9_E5:case t.RGB10_A2UI:case t.RGB10_A2:case a.DEPTH_COMPONENT32F:case s.DEPTH24_STENCIL8:return 4;case s.DEPTH32F_STENCIL8:return 5;case t.RGB16F:case t.RGB16I:case t.RGB16UI:return 6;case t.RG32F:case t.RG32I:case t.RG32UI:case t.RGBA16F:case t.RGBA16I:case t.RGBA16UI:return 8;case t.RGB32F:case t.RGB32I:case t.RGB32UI:return 12;case t.RGBA32F:case t.RGBA32I:case t.RGBA32UI:return 16;case r.COMPRESSED_RGB_S3TC_DXT1_EXT:case r.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case r.COMPRESSED_RGBA_S3TC_DXT3_EXT:case r.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case r.COMPRESSED_R11_EAC:case r.COMPRESSED_SIGNED_R11_EAC:case r.COMPRESSED_RGB8_ETC2:case r.COMPRESSED_SRGB8_ETC2:case r.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case r.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case r.COMPRESSED_RG11_EAC:case r.COMPRESSED_SIGNED_RG11_EAC:case r.COMPRESSED_RGBA8_ETC2_EAC:case r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}export{u as bindVertexBufferLayout,G as getBytesPerElementFormat,R as getErrorString,_ as getStride,A as unbindVertexBufferLayout,E as vertexCount};
5
+ import"../../core/has.js";import{webglDebugEnabled as e}from"./checkWebGLError.js";import{CompressedTextureFormat as r,SizedPixelFormat as t,SizedDepthStencilFormat as s,SizedDepthFormat as a,PixelFormat as c,SizedStencilFormat as n,BufferType as o}from"./enums.js";import{getDataTypeBytes as i}from"./getDataTypeBytes.js";function R(e){const r=e.gl;switch(r.getError()){case r.NO_ERROR:return null;case r.INVALID_ENUM:return"An unacceptable value has been specified for an enumerated argument";case r.INVALID_VALUE:return"An unacceptable value has been specified for an argument";case r.INVALID_OPERATION:return"The specified command is not allowed for the current state";case r.INVALID_FRAMEBUFFER_OPERATION:return"The currently bound framebuffer is not framebuffer complete";case r.OUT_OF_MEMORY:return"Not enough memory is left to execute the command";case r.CONTEXT_LOST_WEBGL:return"WebGL context is lost"}return"Unknown error"}function E(e,r){return(e.vertexBuffers.get(r)?.sizeBytes??0)/_(e.layout.get(r))}function _(e){return e[0].stride}function u(r,t,s,a,c=0){const n=r.gl;r.bindBuffer(s);for(const o of a){const s=t.get(o.name);if(null==s){console.warn(`There is no location for vertex attribute '${o.name}' defined.`);continue}const a=c*o.stride;if(o.count<=4)n.vertexAttribPointer(s,o.count,o.type,o.normalized,o.stride,o.offset+a),n.enableVertexAttribArray(s),o.divisor>0&&r.gl.vertexAttribDivisor(s,o.divisor);else if(9===o.count)for(let e=0;e<3;e++)n.vertexAttribPointer(s+e,3,o.type,o.normalized,o.stride,o.offset+12*e+a),n.enableVertexAttribArray(s+e),o.divisor>0&&r.gl.vertexAttribDivisor(s+e,o.divisor);else if(16===o.count)for(let e=0;e<4;e++)n.vertexAttribPointer(s+e,4,o.type,o.normalized,o.stride,o.offset+16*e+a),n.enableVertexAttribArray(s+e),o.divisor>0&&r.gl?.vertexAttribDivisor(s+e,o.divisor);else console.error("Unsupported vertex attribute element count: "+o.count);if(e()){const e=R(r),t=i(o.type),s=o.offset,c=Math.round(t/s)!==t/s?`. Offset not a multiple of stride. DataType requires ${t} bytes, but descriptor has an offset of ${s}`:"";e&&console.error(`Unable to bind vertex attribute "${o.name}" with baseInstanceOffset ${a}${c}:`,e,o)}}}function A(e,r,t,s){const a=e.gl;e.bindBuffer(t);for(const c of s){const t=r.get(c.name);if(c.count<=4)a.disableVertexAttribArray(t),c.divisor&&c.divisor>0&&e.gl?.vertexAttribDivisor(t,0);else if(9===c.count)for(let r=0;r<3;r++)a.disableVertexAttribArray(t+r),c.divisor&&c.divisor>0&&e.gl?.vertexAttribDivisor(t+r,0);else if(16===c.count)for(let r=0;r<4;r++)a.disableVertexAttribArray(t+r),c.divisor&&c.divisor>0&&e.gl?.vertexAttribDivisor(t+r,0);else console.error("Unsupported vertex attribute element count: "+c.count)}e.unbindBuffer(o.ARRAY_BUFFER)}function G(e){switch(e){case c.ALPHA:case c.LUMINANCE:case c.RED:case c.RED_INTEGER:case t.R8:case t.R8I:case t.R8UI:case t.R8_SNORM:case n.STENCIL_INDEX8:return 1;case c.LUMINANCE_ALPHA:case c.RG:case c.RG_INTEGER:case t.RGBA4:case t.R16F:case t.R16I:case t.R16UI:case t.RG8:case t.RG8I:case t.RG8UI:case t.RG8_SNORM:case t.RGB565:case t.RGB5_A1:case a.DEPTH_COMPONENT16:return 2;case c.RGB:case c.RGB_INTEGER:case t.RGB8:case t.RGB8I:case t.RGB8UI:case t.RGB8_SNORM:case t.SRGB8:case a.DEPTH_COMPONENT24:return 3;case c.RGBA:case c.RGBA_INTEGER:case t.RGBA8:case t.R32F:case t.R11F_G11F_B10F:case t.RG16F:case t.R32I:case t.R32UI:case t.RG16I:case t.RG16UI:case t.RGBA8I:case t.RGBA8UI:case t.RGBA8_SNORM:case t.SRGB8_ALPHA8:case t.RGB9_E5:case t.RGB10_A2UI:case t.RGB10_A2:case a.DEPTH_COMPONENT32F:case s.DEPTH24_STENCIL8:return 4;case s.DEPTH32F_STENCIL8:return 5;case t.RGB16F:case t.RGB16I:case t.RGB16UI:return 6;case t.RG32F:case t.RG32I:case t.RG32UI:case t.RGBA16F:case t.RGBA16I:case t.RGBA16UI:return 8;case t.RGB32F:case t.RGB32I:case t.RGB32UI:return 12;case t.RGBA32F:case t.RGBA32I:case t.RGBA32UI:return 16;case r.COMPRESSED_RGB_S3TC_DXT1_EXT:case r.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case r.COMPRESSED_RGBA_S3TC_DXT3_EXT:case r.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case r.COMPRESSED_R11_EAC:case r.COMPRESSED_SIGNED_R11_EAC:case r.COMPRESSED_RGB8_ETC2:case r.COMPRESSED_SRGB8_ETC2:case r.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case r.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case r.COMPRESSED_RG11_EAC:case r.COMPRESSED_SIGNED_RG11_EAC:case r.COMPRESSED_RGBA8_ETC2_EAC:case r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}export{u as bindVertexBufferLayout,G as getBytesPerElementFormat,R as getErrorString,_ as getStride,A as unbindVertexBufferLayout,E as vertexCount};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../chunks/tslib.es6.js";import e from"../Viewpoint.js";import o from"../core/Error.js";import r from"../core/Identifiable.js";import i from"../core/JSONSupport.js";import{clone as n}from"../core/lang.js";import s from"../core/Logger.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import{cast as m}from"../core/accessorSupport/decorators/cast.js";import{reader as a}from"../core/accessorSupport/decorators/reader.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{writer as c}from"../core/accessorSupport/decorators/writer.js";import{ensureType as u}from"../core/accessorSupport/ensureType.js";import{SlideThumbnail as w}from"../webdoc/support/SlideThumbnail.js";import{timeExtent as d}from"../webdoc/support/timeProperties.js";var h;let f=h=class extends(r.IdentifiableMixin(i)){constructor(t){super(t),this.name=null,this.thumbnail=new w,this.timeExtent=null}castThumbnail(t){return"string"==typeof t?new w({url:t}):u(w,t)}set viewpoint(t){const{targetGeometry:e,scale:o}=t;null!=e&&"point"===e.type&&null==o&&s.getLogger(this).warn("Bookmark.viewpoint should include 'scale' when its targetGeometry is a point.",t),this._set("viewpoint",t)}readViewpoint(t,o){const{extent:r,viewpoint:i}=o;return e.fromJSON(i||{targetGeometry:r})}writeViewpoint(t,e,r,i){if(!t)return;const{targetGeometry:n}=t;if(null==n||"extent"===n.type)null!=n&&(e.extent=n.toJSON()),e[r]=t.toJSON();else{const t="Bookmark.viewpoint cannot be written to JSON when the viewpoint's targetGeometry is not an extent.";i?.messages?i.messages.push(new o("property:unsupported",t)):s.getLogger(this).error(t)}}clone(){return new h(n({name:this.name,thumbnail:this.thumbnail,timeExtent:this.timeExtent,viewpoint:this.viewpoint}))}};t([p({type:String,nonNullable:!0,json:{write:{isRequired:!0}}})],f.prototype,"name",void 0),t([p({type:w,json:{write:{overridePolicy:t=>({enabled:!(!t||!t.url)})}}})],f.prototype,"thumbnail",void 0),t([m("thumbnail")],f.prototype,"castThumbnail",null),t([p(d)],f.prototype,"timeExtent",void 0),t([p({type:e,nonNullable:!0,json:{write:!0}})],f.prototype,"viewpoint",null),t([a("viewpoint",["extent","viewpoint"])],f.prototype,"readViewpoint",null),t([c("viewpoint")],f.prototype,"writeViewpoint",null),f=h=t([l("esri.webmap.Bookmark")],f);const y=f;export{y as default};
5
+ import{_ as t}from"../chunks/tslib.es6.js";import e from"../Viewpoint.js";import o from"../core/Error.js";import r from"../core/Identifiable.js";import i from"../core/JSONSupport.js";import{clone as n}from"../core/lang.js";import s from"../core/Logger.js";import{property as p}from"../core/accessorSupport/decorators/property.js";import{cast as m}from"../core/accessorSupport/decorators/cast.js";import{reader as a}from"../core/accessorSupport/decorators/reader.js";import{subclass as l}from"../core/accessorSupport/decorators/subclass.js";import{writer as c}from"../core/accessorSupport/decorators/writer.js";import{ensureType as u}from"../core/accessorSupport/ensureType.js";import{SlideThumbnail as w}from"../webdoc/support/SlideThumbnail.js";import{timeExtent as d}from"../webdoc/support/timeProperties.js";var h;let f=h=class extends(r.IdentifiableMixin(i)){constructor(t){super(t),this.name=null,this.thumbnail=new w,this.timeExtent=null}castThumbnail(t){return"string"==typeof t?new w({url:t}):u(w,t)}set viewpoint(t){const{targetGeometry:e,scale:o}=t;null!=e&&"point"===e.type&&null==o&&s.getLogger(this).warn("Bookmark.viewpoint should include 'scale' when its targetGeometry is a point.",t),this._set("viewpoint",t)}readViewpoint(t,o){const{extent:r,viewpoint:i}=o;return e.fromJSON(i||{targetGeometry:r})}writeViewpoint(t,e,r,i){if(!t)return;const{targetGeometry:n}=t;if(null!=n&&"extent"!==n.type){const t="Bookmark.viewpoint cannot be written to JSON when the viewpoint's targetGeometry is not an extent.";return void(i?.messages?i.messages.push(new o("property:unsupported",t)):s.getLogger(this).error(t))}null!=n&&(e.extent=n.toJSON()),e[r]=t.toJSON()}clone(){return new h(n({name:this.name,thumbnail:this.thumbnail,timeExtent:this.timeExtent,viewpoint:this.viewpoint}))}};t([p({type:String,nonNullable:!0,json:{write:{isRequired:!0}}})],f.prototype,"name",void 0),t([p({type:w,json:{write:{overridePolicy:t=>({enabled:!(!t||!t.url)})}}})],f.prototype,"thumbnail",void 0),t([m("thumbnail")],f.prototype,"castThumbnail",null),t([p(d)],f.prototype,"timeExtent",void 0),t([p({type:e,nonNullable:!0,json:{write:!0}})],f.prototype,"viewpoint",null),t([a("viewpoint",["extent","viewpoint"])],f.prototype,"readViewpoint",null),t([c("viewpoint")],f.prototype,"writeViewpoint",null),f=h=t([l("esri.webmap.Bookmark")],f);const y=f;export{y as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/JSONSupport.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{reader as o}from"../core/accessorSupport/decorators/reader.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import{writer as a}from"../core/accessorSupport/decorators/writer.js";var d;let i=class extends t{static{d=this}constructor(e){super(e),this.type="sun",this.date=null,this.directShadowsEnabled=!1,this.displayUTCOffset=null}readDate(e,t){return null!=t.datetime&&new Date(t.datetime)||null}writeDate(e,t,r){t[r]=e.getTime()}readDirectShadowsEnabled(e,t){return!!t.directShadows}writedirectShadowsEnabled(e,t,r){e&&(t[r]=e)}writeDisplayUTCOffset(e,t){null!=e&&(t.displayUTCOffset=e)}clone(){return new d(this.cloneConstructProperties())}cloneConstructProperties(){const e={directShadowsEnabled:this.directShadowsEnabled,displayUTCOffset:null!=this.displayUTCOffset?this.displayUTCOffset:null};return null!=this.date&&(e.date=new Date(this.date.getTime())),e}};e([r({readOnly:!0,type:["sun"],json:{write:!0}})],i.prototype,"type",void 0),e([r({type:Date,json:{type:Number,write:{target:"datetime"}}})],i.prototype,"date",void 0),e([o("date",["datetime"])],i.prototype,"readDate",null),e([a("date")],i.prototype,"writeDate",null),e([r({type:Boolean,json:{default:!1,write:{target:"directShadows"}}})],i.prototype,"directShadowsEnabled",void 0),e([o("directShadowsEnabled",["directShadows"])],i.prototype,"readDirectShadowsEnabled",null),e([a("directShadowsEnabled")],i.prototype,"writedirectShadowsEnabled",null),e([r({type:Number,json:{write:!0}})],i.prototype,"displayUTCOffset",void 0),e([a("displayUTCOffset")],i.prototype,"writeDisplayUTCOffset",null),i=d=e([s("esri.webscene.SunLighting")],i);const p=i;export{p as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../core/JSONSupport.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{reader as o}from"../core/accessorSupport/decorators/reader.js";import{subclass as s}from"../core/accessorSupport/decorators/subclass.js";import{writer as a}from"../core/accessorSupport/decorators/writer.js";var d;let i=class extends t{static{d=this}constructor(...e){super(...e),this.type="sun",this.date=null,this.directShadowsEnabled=!1,this.displayUTCOffset=null}readDate(e,t){return null!=t.datetime&&new Date(t.datetime)||null}writeDate(e,t,r){t[r]=e.getTime()}readDirectShadowsEnabled(e,t){return!!t.directShadows}writedirectShadowsEnabled(e,t,r){e&&(t[r]=e)}writeDisplayUTCOffset(e,t){null!=e&&(t.displayUTCOffset=e)}clone(){return new d(this.cloneConstructProperties())}cloneConstructProperties(){const e={directShadowsEnabled:this.directShadowsEnabled,displayUTCOffset:null!=this.displayUTCOffset?this.displayUTCOffset:null};return null!=this.date&&(e.date=new Date(this.date.getTime())),e}};e([r({readOnly:!0,type:["sun"],json:{write:!0}})],i.prototype,"type",void 0),e([r({type:Date,json:{type:Number,write:{target:"datetime"}}})],i.prototype,"date",void 0),e([o("date",["datetime"])],i.prototype,"readDate",null),e([a("date")],i.prototype,"writeDate",null),e([r({type:Boolean,json:{default:!1,write:{target:"directShadows"}}})],i.prototype,"directShadowsEnabled",void 0),e([o("directShadowsEnabled",["directShadows"])],i.prototype,"readDirectShadowsEnabled",null),e([a("directShadowsEnabled")],i.prototype,"writedirectShadowsEnabled",null),e([r({type:Number,json:{write:!0}})],i.prototype,"displayUTCOffset",void 0),e([a("displayUTCOffset")],i.prototype,"writeDisplayUTCOffset",null),i=d=e([s("esri.webscene.SunLighting")],i);const p=i;export{p as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as r}from"../chunks/tslib.es6.js";import e from"../core/JSONSupport.js";import{property as t}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as o}from"../core/accessorSupport/decorators/subclass.js";var s;let i=class extends e{static{s=this}constructor(r){super(r),this.type="virtual",this.directShadowsEnabled=!1}clone(){return new s(this.cloneConstructProperties())}cloneConstructProperties(){return{directShadowsEnabled:this.directShadowsEnabled}}};r([t({readOnly:!0,type:["virtual"],json:{write:{isRequired:!0}}})],i.prototype,"type",void 0),r([t({type:Boolean,json:{default:!1,name:"directShadows",write:!0}})],i.prototype,"directShadowsEnabled",void 0),i=s=r([o("esri.webscene.VirtualLighting")],i);const c=i;export{c as default};
5
+ import{_ as r}from"../chunks/tslib.es6.js";import e from"../core/JSONSupport.js";import{property as t}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as o}from"../core/accessorSupport/decorators/subclass.js";var s;let i=class extends e{static{s=this}constructor(...r){super(...r),this.type="virtual",this.directShadowsEnabled=!1}clone(){return new s(this.cloneConstructProperties())}cloneConstructProperties(){return{directShadowsEnabled:this.directShadowsEnabled}}};r([t({readOnly:!0,type:["virtual"],json:{write:{isRequired:!0}}})],i.prototype,"type",void 0),r([t({type:Boolean,json:{default:!1,name:"directShadows",write:!0}})],i.prototype,"directShadowsEnabled",void 0),i=s=r([o("esri.webscene.VirtualLighting")],i);const c=i;export{c as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../core/Error.js";import{json as t}from"../../portal/schemas/webScene.js";import{ScanContext as r,sorted as n}from"./utils.js";function s(e,t){if(t.properties){if("layerType"in t.properties)return t.properties.layerType.enum[0];if("type"in t.properties&&t.properties.type.enum)return t.properties.type.enum[0]}switch(e){case"multipoint_geometry_schema.json":return"multipoint";case"point_geometry_schema.json":return"point";case"polyline_geometry_schema.json":return"polyline";case"polygon_geometry_schema.json":return"polygon";case"extent_schema.json":return"extent"}}function i(e){return"array"===e.type?`${i(e.items)}[]`:e.type}function a(e){const t={count:e.length,refsCount:0,typesCount:0,distinctTypes:[],type:null},r=new Set;for(const n in e){const s=e[n];s.$ref?t.refsCount++:s.type&&(t.typesCount++,r.add(i(s)))}return r.forEach(e=>t.distinctTypes.push(e)),t.distinctTypes.sort(),t.refsCount===t.count?t.type="refs":2===t.count&&t.refsCount>0&&1===t.distinctTypes.length&&"null"===t.distinctTypes[0]?t.type="refsAndNull":t.typesCount===t.count?(t.type="types",t.distinctTypes=t.distinctTypes):t.type="mix",t}function o(e,t){const r=t.stack[t.stack.length-1],n=t.definitions[r.klass.name];return n?.required&&n.required.includes(e.replace("[]",""))}function c(e){return"array"===e.type||!("properties"in e)}function l(e,t,r){if(!r.hasFilteredProperties)return`${e}--${t}`;return`${e}--${t}--${r.filteredPropertiesArray.join("/")}`}async function u(e,t,r,n,i){i.schemaStack.push(e);const a=s(e,r),u=n?n.replace("<?TYPE?>",a?`<${a}>`:""):"";if(c(r)){const n=i.currentClass?null:{type:e,name:e,id:`${e}--${t}`,typeValue:t,properties:[]};return n&&i.push(null,n),await T(r,u,i),i.schemaStack.pop(),n}const p=l(e,t,i),f="drawingInfo_schema.json"!==e&&"layer_schema.json"!==e&&i.seen.get(p);if(f&&u)return i.addProperty({name:u,type:f,required:o(u,i)}),i.schemaStack.pop(),f;const h={type:e,name:e,id:p,typeValue:t,properties:[]};return u&&i.addProperty({name:u,type:h,required:o(u,i)}),i.push(u,h),await T(r,"",i),i.schemaStack.pop(),i.pop()}async function p(e,t,r){const n=await r.requestSchema(e.$ref),s=L(n.schema);if(s){for(const e of s){const s={...n.schema};s.properties={...s.properties,type:{type:"string",enum:[e]}};const i=t&&!t.includes("<?TYPE?>")?`${t}<?TYPE?>`:t;await u(n.schemaId,e,s,i,r)}return}const i="layer_schema.json"===n.schemaId&&r.schemaStack.length?r.schemaStack[r.schemaStack.length-1].replace(/_schema\.json/,""):null;await u(n.schemaId,i,n.schema,t,r)}function f(e,t){if(!m(e))return!1;const r=e.stack.map(e=>e.klass.type).join("/");return/.*pointCloudLayer_schema\.json\/layerDefinition_schema\.json\/drawingInfo_schema\.json$/.test(r)&&"renderer"===t}function h(e,t){if(!y(e)&&!d(e))return!1;const r=e.stack.map(e=>e.klass.type).join("/");return(/.*(imageServiceLayer|tiledImageServiceLayer|wcsLayer)_schema\.json\/(layerDefinition|rasterLayerDefinition)_schema\.json\/rasterDrawingInfo_schema\.json$/.test(r)||/.*rasterPresetRenderer_schema\.json$/.test(r))&&"renderer"===t}function m(e){return!!e.currentClass&&"drawingInfo_schema.json"===e.currentClass.name}function y(e){return!!e.currentClass&&"rasterDrawingInfo_schema.json"===e.currentClass.name}function d(e){return!!e.currentClass&&"rasterPresetRenderer_schema.json"===e.currentClass.name}function _(e){switch(e.schemaStack[e.schemaStack.length-1]){case"operationalLayers_schema.json":case"elevationLayers_schema.json":case"baseMapLayer_schema.json":return!0}return!1}const w=/raster.*Renderer|vectorFieldRenderer/,j=/(uniqueValueRenderer|classBreaksRenderer|raster.*Renderer|vectorFieldRenderer)/,$=/(rasterUniqueValueRenderer|rasterClassBreaksRenderer)/;function g(e,t,r){if(m(r)||y(r)||d(r)){const n=f(r,t),s=h(r,t);return e.filter(e=>{if(/uniqueValueFromStyleRenderer_schema\.json$/.test(e.$ref))return!1;if(s)return j.test(e.$ref)&&!$.test(e.$ref);if(w.test(e.$ref))return!1;const t=/pointCloud.*Renderer/.test(e.$ref);return n===t})}if(_(r)){const t=["kmlLayer","rasterDataElevationLayer","rasterDataLayer","object3DTilesLayer"];return e.filter(e=>!t.some(t=>e.$ref.replace(/.*\//,"")===`${t}_schema.json`))}return e}async function P(e,t,r){await T(e.items,`${t}[]`,r)}async function S(e,t,r){for(const n in e.properties)if(!("webscene_schema.json"===r.currentClass?.name&&"mapRangeInfo"===n||"baseMap_schema.json"===r.currentClass?.name&&"elevationLayers"===n)){if(m(r)){const e=r.stack.map(e=>e.klass.type).join("/");if(/imageServiceLayer|tiledImageServiceLayer/.test(e)&&"transparency"===n)continue}await r.withFilter(n,async()=>{const s=t?`${t}.${n}`:n;await T(e.properties[n],s,r)})}}function k(e,t="",r=new Set){for(const n of e)if("properties"in n)for(const e in n.properties){const s=n.properties[e],i=t?`${t}.${e}`:e,a=Object.keys(s);if(0===a.length||1===a.length&&"$ref"===a[0])r.add(i);else{if(1!==a.length||"allOf"!==a[0])throw new Error(`unexpected allOf filter construct: ${JSON.stringify(s)}`);r.add(i),k(s.allOf,i,r)}}return r}async function R(e,t,r){let n=null;for(const i of e.allOf)if("$ref"in i){if(n)throw new Error("Cannot process more than 1 ref in an allOf construct");n=i}else if(!("properties"in i))throw new Error("allOf construct only allows simple top-level property filters");const s=k(e.allOf);await r.addFilter(s,()=>p(n,t,r))}async function C(e,t,r){const s=a(e.oneOf);if("refs"!==s.type&&"refsAndNull"!==s.type)if("types"!==s.type)for(const n in e.oneOf){const s=`.oneOf[${n}]`;await T(e.oneOf[n],`${t}${s}`,r)}else r.addProperty({name:t,type:n(s.distinctTypes).join("|"),required:o(t,r)});else{const n=g(e.oneOf,t,r);for(const e of n)if("null"===e.type);else{const s=`${t||""}`+(1!==n.length?"<?TYPE?>":"");await T(e,s,r)}}}function L(e){if("layerDefinition"===e.title)return null;const t=e.properties?.type;return t?.enum?t.enum:null}async function q(e,t,r){await p(e,t,r)}async function O(e,t,r){let s="unknown";e.type&&(s=Array.isArray(e.type)?n(e.type).join("|"):e.type.replaceAll(" ","").split(",").join("|"));const i={name:t,type:s,default:e.default,required:o(t,r)};e.enum&&(i.enum=n(e.enum).map(e=>"string"==typeof e?`"${e}"`:`${e}`).join("|")),r.addProperty(i)}async function T(e,t,r){return"array"===e.type?P(e,t,r):"properties"in e?S(e,t,r):"allOf"in e?R(e,t,r):"oneOf"in e?C(e,t,r):"$ref"in e?q(e,t,r):O(e,t,r)}const b="#/definitions/";function E(e){return 0===e.indexOf(b)?e.slice(b.length):e}async function I(e,t){const r=await v.create(e,t);return u(`${e||"webscene"}_schema.json`,null,r.schemaRoot,null,r)}class v extends r{constructor(e,t,r){super(),this.definitions=e,this.schemaRoot=t,this.requestSchema=r,this._filteredProperties=null,this.schemaStack=[],this.requestSchema.bind(this)}get hasFilteredProperties(){return(this._filteredProperties?.size??0)>0}get filteredPropertiesArray(){const e=[];return this._filteredProperties?.forEach(t=>e.push(t)),e}async withFilter(e,t){if(!this.hasFilteredProperties)return t();if(!this._filteredProperties?.has(e))return;const r=this._filteredProperties;this._filteredProperties=null;const n=e=>{this._filteredProperties||(this._filteredProperties=new Set),this._filteredProperties.add(e)};r.forEach(t=>{const r=t.split(".",2);r.length>1&&r[0]===e&&n(r[1])}),await t(),this._filteredProperties=r}async addFilter(e,t){const r=this._filteredProperties;this._filteredProperties=null;const n=e=>{this._filteredProperties||(this._filteredProperties=new Set),this._filteredProperties.add(e)};r&&r.forEach(n),e&&e.forEach(n);const s=await t();return this._filteredProperties=r,s}static async create(e,t){return t?.useRemoteSchema?v.createRemote(e,t?.baseUrl):v.createLocal(e)}static createLocal(e){const r=e&&"webscene"!==e?t.definitions[`${e}_schema.json`]:t;return new v(t.definitions,r,v._getLocalSchemaRequest())}static async createRemote(e,t){const r=await v._getRemoteSchemaRequest(t),n=new v({},null,r),s=(await n.requestSchema(`${e||"webscene"}_schema.json`)).schema;return new v(n.definitions,s,r)}static _getLocalSchemaRequest(){return function(t){const r=E(t),n=this.definitions[r];return n?Promise.resolve({schemaId:r,schema:n}):Promise.reject(new e("spec-certification:spec-invalid-local-schema","Schema reference is not a local reference"))}}static async _getRemoteSchemaRequest(t){if(!t)return Promise.reject(new e("spec-certification:spec-missing-base-url","The base url of the remote schema directory must be specified when using a remote schema"));const r=v._getLocalSchemaRequest(),n=(await import("../../request.js")).default;return function(e){return r.call(this,e).catch(()=>n(`${t}/${e}`,{responseType:"json"}).then(t=>(this.definitions[E(e)]=t.data,{schemaId:e,schema:t.data})))}}}const F=Object.keys(t.definitions).map(e=>e.replace(/_schema\.json$/,""));export{I as scan,F as schemaDefinitions};
5
+ import e from"../../core/Error.js";import{json as t}from"../../portal/schemas/webScene.js";import{ScanContext as r,sorted as n}from"./utils.js";function s(e,t){if(t.properties){if("layerType"in t.properties)return t.properties.layerType.enum[0];if("type"in t.properties&&t.properties.type.enum)return t.properties.type.enum[0]}switch(e){case"multipoint_geometry_schema.json":return"multipoint";case"point_geometry_schema.json":return"point";case"polyline_geometry_schema.json":return"polyline";case"polygon_geometry_schema.json":return"polygon";case"extent_schema.json":return"extent"}}function i(e){return"array"===e.type?`${i(e.items)}[]`:e.type}function a(e){const t={count:e.length,refsCount:0,typesCount:0,distinctTypes:[],type:null},r=new Set;for(const n in e){const s=e[n];s.$ref?t.refsCount++:s.type&&(t.typesCount++,r.add(i(s)))}return r.forEach(e=>t.distinctTypes.push(e)),t.distinctTypes.sort(),t.refsCount===t.count?t.type="refs":2===t.count&&t.refsCount>0&&1===t.distinctTypes.length&&"null"===t.distinctTypes[0]?t.type="refsAndNull":t.typesCount===t.count?(t.type="types",t.distinctTypes=t.distinctTypes):t.type="mix",t}function o(e,t){const r=t.stack[t.stack.length-1],n=t.definitions[r.klass.name];return n?.required&&n.required.includes(e.replace("[]",""))}function c(e){return"array"===e.type||!("properties"in e)}function l(e,t,r){if(!r.hasFilteredProperties)return`${e}--${t}`;return`${e}--${t}--${r.filteredPropertiesArray.join("/")}`}async function u(e,t,r,n,i){i.schemaStack.push(e);const a=s(e,r),u=n?n.replace("<?TYPE?>",a?`<${a}>`:""):"";if(c(r)){const n=i.currentClass?null:{type:e,name:e,id:`${e}--${t}`,typeValue:t,properties:[]};return n&&i.push(null,n),await T(r,u,i),i.schemaStack.pop(),n}const p=l(e,t,i),f="drawingInfo_schema.json"!==e&&"layer_schema.json"!==e&&i.seen.get(p);if(f&&u)return i.addProperty({name:u,type:f,required:o(u,i)}),i.schemaStack.pop(),f;const h={type:e,name:e,id:p,typeValue:t,properties:[]};return u&&i.addProperty({name:u,type:h,required:o(u,i)}),i.push(u,h),await T(r,"",i),i.schemaStack.pop(),i.pop()}async function p(e,t,r){const n=await r.requestSchema(e.$ref),s=L(n.schema);if(s){for(const e of s){const s={...n.schema};s.properties={...s.properties,type:{type:"string",enum:[e]}};const i=t&&!t.includes("<?TYPE?>")?`${t}<?TYPE?>`:t;await u(n.schemaId,e,s,i,r)}return}const i="layer_schema.json"===n.schemaId&&r.schemaStack.length?r.schemaStack[r.schemaStack.length-1].replace(/_schema\.json/,""):null;await u(n.schemaId,i,n.schema,t,r)}function f(e,t){if(!m(e))return!1;const r=e.stack.map(e=>e.klass.type).join("/");return/.*pointCloudLayer_schema\.json\/layerDefinition_schema\.json\/drawingInfo_schema\.json$/.test(r)&&"renderer"===t}function h(e,t){if(!y(e)&&!d(e))return!1;const r=e.stack.map(e=>e.klass.type).join("/");return(/.*(imageServiceLayer|tiledImageServiceLayer|wcsLayer)_schema\.json\/(layerDefinition|rasterLayerDefinition)_schema\.json\/rasterDrawingInfo_schema\.json$/.test(r)||/.*rasterPresetRenderer_schema\.json$/.test(r))&&"renderer"===t}function m(e){return!!e.currentClass&&"drawingInfo_schema.json"===e.currentClass.name}function y(e){return!!e.currentClass&&"rasterDrawingInfo_schema.json"===e.currentClass.name}function d(e){return!!e.currentClass&&"rasterPresetRenderer_schema.json"===e.currentClass.name}function _(e){switch(e.schemaStack[e.schemaStack.length-1]){case"operationalLayers_schema.json":case"elevationLayers_schema.json":case"baseMapLayer_schema.json":return!0}return!1}const w=/raster.*Renderer|vectorFieldRenderer/,j=/(uniqueValueRenderer|classBreaksRenderer|raster.*Renderer|vectorFieldRenderer)/,$=/(rasterUniqueValueRenderer|rasterClassBreaksRenderer)/;function g(e,t,r){if(m(r)||y(r)||d(r)){const n=f(r,t),s=h(r,t);return e.filter(e=>{if(/uniqueValueFromStyleRenderer_schema\.json$/.test(e.$ref))return!1;if(s)return j.test(e.$ref)&&!$.test(e.$ref);if(w.test(e.$ref))return!1;const t=/pointCloud.*Renderer/.test(e.$ref);return n===t})}if(_(r)){const t=["kmlLayer","rasterDataElevationLayer","rasterDataLayer","object3DTilesLayer"];return e.filter(e=>!t.some(t=>e.$ref.replace(/.*\//,"")===`${t}_schema.json`))}return e}async function P(e,t,r){await T(e.items,`${t}[]`,r)}async function S(e,t,r){for(const n in e.properties)if(!("webscene_schema.json"===r.currentClass?.name&&"mapRangeInfo"===n||"baseMap_schema.json"===r.currentClass?.name&&"elevationLayers"===n)){if(m(r)){const e=r.stack.map(e=>e.klass.type).join("/");if(/imageServiceLayer|tiledImageServiceLayer/.test(e)&&"transparency"===n)continue}await r.withFilter(n,async()=>{const s=t?`${t}.${n}`:n;await T(e.properties[n],s,r)})}}function k(e,t="",r=new Set){for(const n of e)if("properties"in n)for(const e in n.properties){const s=n.properties[e],i=t?`${t}.${e}`:e,a=Object.keys(s);if(0===a.length||1===a.length&&"$ref"===a[0])r.add(i);else{if(1!==a.length||"allOf"!==a[0])throw new Error(`unexpected allOf filter construct: ${JSON.stringify(s)}`);r.add(i),k(s.allOf,i,r)}}return r}async function R(e,t,r){let n=null;for(const i of e.allOf)if("$ref"in i){if(n)throw new Error("Cannot process more than 1 ref in an allOf construct");n=i}else if(!("properties"in i))throw new Error("allOf construct only allows simple top-level property filters");const s=k(e.allOf);await r.addFilter(s,()=>p(n,t,r))}async function C(e,t,r){const s=a(e.oneOf);if("refs"===s.type||"refsAndNull"===s.type){const n=g(e.oneOf,t,r);for(const e of n)if("null"===e.type);else{const s=`${t||""}`+(1!==n.length?"<?TYPE?>":"");await T(e,s,r)}return}if("types"!==s.type)for(const n in e.oneOf){const s=`.oneOf[${n}]`;await T(e.oneOf[n],`${t}${s}`,r)}else r.addProperty({name:t,type:n(s.distinctTypes).join("|"),required:o(t,r)})}function L(e){if("layerDefinition"===e.title)return null;const t=e.properties?.type;return t?.enum?t.enum:null}async function q(e,t,r){await p(e,t,r)}async function O(e,t,r){let s="unknown";e.type&&(s=Array.isArray(e.type)?n(e.type).join("|"):e.type.replaceAll(" ","").split(",").join("|"));const i={name:t,type:s,default:e.default,required:o(t,r)};e.enum&&(i.enum=n(e.enum).map(e=>"string"==typeof e?`"${e}"`:`${e}`).join("|")),r.addProperty(i)}async function T(e,t,r){return"array"===e.type?P(e,t,r):"properties"in e?S(e,t,r):"allOf"in e?R(e,t,r):"oneOf"in e?C(e,t,r):"$ref"in e?q(e,t,r):O(e,t,r)}const b="#/definitions/";function E(e){return 0===e.indexOf(b)?e.slice(b.length):e}async function I(e,t){const r=await v.create(e,t);return u(`${e||"webscene"}_schema.json`,null,r.schemaRoot,null,r)}class v extends r{constructor(e,t,r){super(),this.definitions=e,this.schemaRoot=t,this.requestSchema=r,this._filteredProperties=null,this.schemaStack=[],this.requestSchema.bind(this)}get hasFilteredProperties(){return(this._filteredProperties?.size??0)>0}get filteredPropertiesArray(){const e=[];return this._filteredProperties?.forEach(t=>e.push(t)),e}async withFilter(e,t){if(!this.hasFilteredProperties)return t();if(!this._filteredProperties?.has(e))return;const r=this._filteredProperties;this._filteredProperties=null;const n=e=>{this._filteredProperties||(this._filteredProperties=new Set),this._filteredProperties.add(e)};r.forEach(t=>{const r=t.split(".",2);r.length>1&&r[0]===e&&n(r[1])}),await t(),this._filteredProperties=r}async addFilter(e,t){const r=this._filteredProperties;this._filteredProperties=null;const n=e=>{this._filteredProperties||(this._filteredProperties=new Set),this._filteredProperties.add(e)};r&&r.forEach(n),e&&e.forEach(n);const s=await t();return this._filteredProperties=r,s}static async create(e,t){return t?.useRemoteSchema?v.createRemote(e,t?.baseUrl):v.createLocal(e)}static createLocal(e){const r=e&&"webscene"!==e?t.definitions[`${e}_schema.json`]:t;return new v(t.definitions,r,v._getLocalSchemaRequest())}static async createRemote(e,t){const r=await v._getRemoteSchemaRequest(t),n=new v({},null,r),s=(await n.requestSchema(`${e||"webscene"}_schema.json`)).schema;return new v(n.definitions,s,r)}static _getLocalSchemaRequest(){return function(t){const r=E(t),n=this.definitions[r];return n?Promise.resolve({schemaId:r,schema:n}):Promise.reject(new e("spec-certification:spec-invalid-local-schema","Schema reference is not a local reference"))}}static async _getRemoteSchemaRequest(t){if(!t)return Promise.reject(new e("spec-certification:spec-missing-base-url","The base url of the remote schema directory must be specified when using a remote schema"));const r=v._getLocalSchemaRequest(),n=(await import("../../request.js")).default;return function(e){return r.call(this,e).catch(()=>n(`${t}/${e}`,{responseType:"json"}).then(t=>(this.definitions[E(e)]=t.data,{schemaId:e,schema:t.data})))}}}const F=Object.keys(t.definitions).map(e=>e.replace(/_schema\.json$/,""));export{I as scan,F as schemaDefinitions};