@arcgis/core 6.0.0-next.44 → 6.0.0-next.45

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 (481) hide show
  1. package/Basemap.d.ts +2 -1
  2. package/Camera.d.ts +2 -1
  3. package/Graphic.d.ts +2 -1
  4. package/Ground.d.ts +2 -1
  5. package/Map.d.ts +2 -1
  6. package/PopupTemplate.d.ts +2 -1
  7. package/WebDocument2D.d.ts +2 -1
  8. package/WebScene.d.ts +2 -1
  9. package/analysis/Analysis.d.ts +2 -1
  10. package/analysis/DimensionSimpleStyle.d.ts +2 -1
  11. package/analysis/LengthDimension.d.ts +2 -1
  12. package/analysis/LineOfSightAnalysisObserver.d.ts +2 -1
  13. package/analysis/LineOfSightAnalysisTarget.d.ts +2 -1
  14. package/analysis/SlicePlane.d.ts +2 -1
  15. package/analysis/Viewshed.d.ts +2 -1
  16. package/analysis/VolumeMeasurement/VolumeMeasurementCutFillOptions.d.ts +2 -1
  17. package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.d.ts +2 -1
  18. package/analysis/VolumeMeasurement/VolumeMeasurementInputUnits.d.ts +2 -1
  19. package/arcgisGlobal.d.ts +0 -3
  20. package/assets/esri/core/workers/RemoteClient.js +1 -1
  21. package/assets/esri/core/workers/chunks/{d64054cd6865d3a1af78.js → 0ac38ca04285cd5ef1a0.js} +3 -3
  22. package/assets/esri/core/workers/chunks/{c420ab79d85e5dbddb0b.js → 3e67d50a2b2f8f837831.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{0caaa03659f4f4e8df03.js → b3c0c9c91bcdbbb8e719.js} +1 -1
  24. package/basemapGallery/PortalBasemapsSource.d.ts +2 -1
  25. package/basemapGallery/support/BasemapItem.d.ts +2 -1
  26. package/chunks/AtmosphereCompositing.glsl.js +24 -6
  27. package/chunks/ChapmanAtmosphere.glsl.js +32 -25
  28. package/chunks/EmissionComposite.glsl.js +1 -1
  29. package/{portal/schemas → chunks}/definitions.js +1 -1
  30. package/chunks/webScene.js +2 -0
  31. package/config.js +1 -1
  32. package/core/Clonable.d.ts +2 -1
  33. package/core/Evented.d.ts +2 -1
  34. package/core/Identifiable.d.ts +2 -1
  35. package/core/JSONSupport.d.ts +2 -1
  36. package/core/Loadable.d.ts +2 -1
  37. package/core/MultiOriginJSONSupport.d.ts +2 -1
  38. package/core/Promise.d.ts +2 -1
  39. package/core/ReadOnlyMultiOriginJSONSupport.d.ts +2 -1
  40. package/editing/sharedTemplates/SharedTemplate.d.ts +2 -1
  41. package/effects/FocusArea.d.ts +2 -1
  42. package/effects/FocusAreaOutline.d.ts +2 -1
  43. package/effects/FocusAreas.d.ts +2 -1
  44. package/form/FormTemplate.d.ts +2 -1
  45. package/form/elements/UtilityNetworkAssociationsElement.d.ts +2 -1
  46. package/form/elements/inputs/attachments/Input.d.ts +2 -1
  47. package/geometry/Mesh.d.ts +2 -1
  48. package/geometry/operators/support/GeographicTransformation.d.ts +2 -1
  49. package/geometry/operators/support/GeographicTransformationStep.d.ts +2 -1
  50. package/geometry/support/MeshComponent.d.ts +2 -1
  51. package/geometry/support/MeshGeoreferencedVertexSpace.d.ts +2 -1
  52. package/geometry/support/MeshLocalVertexSpace.d.ts +2 -1
  53. package/geometry/support/MeshMaterial.d.ts +2 -1
  54. package/geometry/support/MeshTexture.d.ts +2 -1
  55. package/geometry/support/MeshTextureTransform.d.ts +2 -1
  56. package/geometry/support/MeshTransform.d.ts +2 -1
  57. package/geometry/support/MeshVertexAttributes.d.ts +2 -1
  58. package/interfaces.d.ts +0 -82
  59. package/kernel.js +1 -1
  60. package/layerList/Item.d.ts +2 -1
  61. package/layerList/ItemPanel.d.ts +2 -1
  62. package/layerList/TableItem.d.ts +2 -1
  63. package/layerList/TableItemPanel.d.ts +2 -1
  64. package/layers/AnnotationFeatureLayer.d.ts +2 -1
  65. package/layers/BaseDynamicLayer.d.ts +2 -1
  66. package/layers/BaseElevationLayer.d.ts +2 -1
  67. package/layers/BaseTileLayer.d.ts +2 -1
  68. package/layers/BingMapsLayer.d.ts +2 -1
  69. package/layers/BuildingSceneLayer.d.ts +2 -1
  70. package/layers/CSVLayer.d.ts +2 -1
  71. package/layers/CatalogLayer.d.ts +2 -1
  72. package/layers/DimensionFeatureLayer.d.ts +2 -1
  73. package/layers/DimensionLayer.d.ts +2 -1
  74. package/layers/ElevationLayer.d.ts +2 -1
  75. package/layers/FeatureLayer.d.ts +2 -1
  76. package/layers/GaussianSplatLayer.d.ts +2 -1
  77. package/layers/GeoJSONLayer.d.ts +2 -1
  78. package/layers/GeoRSSLayer.d.ts +2 -1
  79. package/layers/GeospatialPDFLayer.d.ts +2 -1
  80. package/layers/GraphicsLayer.d.ts +2 -1
  81. package/layers/GroupLayer.d.ts +2 -1
  82. package/layers/ImageryLayer.d.ts +2 -1
  83. package/layers/ImageryTileLayer.d.ts +2 -1
  84. package/layers/IntegratedMesh3DTilesLayer.d.ts +2 -1
  85. package/layers/IntegratedMeshLayer.d.ts +2 -1
  86. package/layers/KMLLayer.d.ts +2 -1
  87. package/layers/KnowledgeGraphLayer.d.ts +2 -1
  88. package/layers/Layer.d.ts +2 -1
  89. package/layers/LineOfSightLayer.d.ts +2 -1
  90. package/layers/LinkChartLayer.d.ts +2 -1
  91. package/layers/MapImageLayer.d.ts +2 -1
  92. package/layers/MapNotesLayer.d.ts +2 -1
  93. package/layers/MediaLayer.d.ts +2 -1
  94. package/layers/OGCFeatureLayer.d.ts +2 -1
  95. package/layers/ParquetLayer.d.ts +2 -1
  96. package/layers/PointCloudLayer.d.ts +2 -1
  97. package/layers/RouteLayer.d.ts +2 -1
  98. package/layers/SceneLayer.d.ts +2 -1
  99. package/layers/SketchLayer.d.ts +2 -1
  100. package/layers/StreamLayer.d.ts +2 -1
  101. package/layers/SubtypeGroupLayer.d.ts +2 -1
  102. package/layers/TileLayer.d.ts +2 -1
  103. package/layers/UnknownLayer.d.ts +2 -1
  104. package/layers/UnsupportedLayer.d.ts +2 -1
  105. package/layers/VectorTileLayer.d.ts +2 -1
  106. package/layers/VideoLayer.d.ts +2 -1
  107. package/layers/VideoLayer.js +1 -1
  108. package/layers/ViewshedLayer.d.ts +2 -1
  109. package/layers/VoxelLayer.d.ts +2 -1
  110. package/layers/WCSLayer.d.ts +2 -1
  111. package/layers/WFSLayer.d.ts +3 -2
  112. package/layers/WMSLayer.d.ts +2 -1
  113. package/layers/WMTSLayer.d.ts +2 -1
  114. package/layers/WebTileLayer.d.ts +2 -1
  115. package/layers/buildingSublayers/BuildingComponentSublayer.d.ts +2 -1
  116. package/layers/buildingSublayers/BuildingSublayer.d.ts +2 -1
  117. package/layers/catalog/CatalogDynamicGroupLayer.d.ts +2 -1
  118. package/layers/catalog/CatalogFootprintLayer.d.ts +2 -1
  119. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +2 -1
  120. package/layers/mixins/APIKeyMixin.d.ts +2 -1
  121. package/layers/mixins/ArcGISCachedService.d.ts +2 -1
  122. package/layers/mixins/ArcGISImageService.d.ts +2 -1
  123. package/layers/mixins/ArcGISMapService.d.ts +2 -1
  124. package/layers/mixins/BlendLayer.d.ts +2 -1
  125. package/layers/mixins/CustomParametersMixin.d.ts +2 -1
  126. package/layers/mixins/DataSeriesLayer.d.ts +2 -1
  127. package/layers/mixins/DisplayFilteredLayer.d.ts +2 -1
  128. package/layers/mixins/EditBusLayer.d.ts +2 -1
  129. package/layers/mixins/FeatureEffectLayer.d.ts +2 -1
  130. package/layers/mixins/FeatureLayerBase.d.ts +2 -1
  131. package/layers/mixins/FeatureReductionLayer.d.ts +2 -1
  132. package/layers/mixins/OperationalLayer.d.ts +2 -1
  133. package/layers/mixins/OrderedLayer.d.ts +2 -1
  134. package/layers/mixins/PortalLayer.d.ts +2 -1
  135. package/layers/mixins/PublishableLayer.d.ts +2 -1
  136. package/layers/mixins/RasterPresetRendererMixin.d.ts +2 -1
  137. package/layers/mixins/RefreshableLayer.d.ts +2 -1
  138. package/layers/mixins/ReloadableLayer.d.ts +2 -1
  139. package/layers/mixins/ScaleRangeLayer.d.ts +2 -1
  140. package/layers/mixins/SceneService.d.ts +2 -1
  141. package/layers/mixins/SublayersOwner.d.ts +2 -1
  142. package/layers/mixins/TemporalLayer.d.ts +2 -1
  143. package/layers/mixins/TiledImagery.d.ts +2 -1
  144. package/layers/mixins/TrackableLayer.d.ts +2 -1
  145. package/layers/orientedImagery/core/ElevationSourceDefinitions.d.ts +2 -1
  146. package/layers/support/AnnotationFeatureSublayer.d.ts +2 -1
  147. package/layers/support/BuildingFilterMode.d.ts +2 -1
  148. package/layers/support/BuildingSummaryStatistics.d.ts +2 -1
  149. package/layers/support/ControlPointsGeoreference.d.ts +2 -1
  150. package/layers/support/DisplayFilter.d.ts +2 -1
  151. package/layers/support/DisplayFilterInfo.d.ts +2 -1
  152. package/layers/support/EditFieldsInfo.d.ts +2 -1
  153. package/layers/support/ExpressionInfo.d.ts +2 -1
  154. package/layers/support/FeatureReductionBinning.d.ts +2 -1
  155. package/layers/support/FeatureReductionCluster.d.ts +2 -1
  156. package/layers/support/FeatureTemplate.d.ts +2 -1
  157. package/layers/support/FeatureType.d.ts +2 -1
  158. package/layers/support/FieldConfiguration.d.ts +2 -1
  159. package/layers/support/FieldFormat.d.ts +2 -1
  160. package/layers/support/GeometryEncodingLocation.d.ts +2 -1
  161. package/layers/support/GeometryEncodingWkb.d.ts +2 -1
  162. package/layers/support/GeometryFieldsInfo.d.ts +2 -1
  163. package/layers/support/KMLSublayer.d.ts +2 -1
  164. package/layers/support/LocalMediaElementSource.d.ts +2 -1
  165. package/layers/support/MediaElementBase.d.ts +2 -1
  166. package/layers/support/ParquetFilesData.d.ts +2 -1
  167. package/layers/support/ParquetPortalItemData.d.ts +2 -1
  168. package/layers/support/PlaybackInfo.d.ts +2 -1
  169. package/layers/support/PortalItemData.d.ts +2 -1
  170. package/layers/support/Relationship.d.ts +2 -1
  171. package/layers/support/SceneModifications.d.ts +2 -1
  172. package/layers/support/Sublayer.d.ts +2 -1
  173. package/layers/support/Subtype.d.ts +2 -1
  174. package/layers/support/SubtypeSublayer.d.ts +2 -1
  175. package/layers/support/SymbolLayerDrawing.d.ts +2 -1
  176. package/layers/support/TelemetryData.d.ts +2 -1
  177. package/layers/support/TelemetryDisplay.d.ts +2 -1
  178. package/layers/support/TimeInfo.d.ts +2 -1
  179. package/layers/support/TimeSeriesCalculationMethod.d.ts +2 -1
  180. package/layers/support/TimeSeriesFieldTimeMapping.d.ts +2 -1
  181. package/layers/support/TimeSeriesInfo.d.ts +2 -1
  182. package/layers/support/TrackInfo.d.ts +2 -1
  183. package/layers/support/TrackPartInfo.d.ts +2 -1
  184. package/layers/support/VideoTimeExtent.d.ts +2 -1
  185. package/layers/support/WMSSublayer.d.ts +2 -1
  186. package/layers/support/schemaValidator.js +1 -1
  187. package/layers/voxel/VoxelColorStop.d.ts +2 -1
  188. package/layers/voxel/VoxelDynamicSection.d.ts +2 -1
  189. package/layers/voxel/VoxelIsosurface.d.ts +2 -1
  190. package/layers/voxel/VoxelOpacityStop.d.ts +2 -1
  191. package/layers/voxel/VoxelRangeFilter.d.ts +2 -1
  192. package/layers/voxel/VoxelSlice.d.ts +2 -1
  193. package/layers/voxel/VoxelTransferFunctionStyle.d.ts +2 -1
  194. package/layers/voxel/VoxelUniqueValue.d.ts +2 -1
  195. package/linkChart/ChronologicalLayoutSettings.d.ts +2 -1
  196. package/linkChart/LayoutSettings.d.ts +2 -1
  197. package/linkChart/LinkChartProperties.d.ts +2 -1
  198. package/linkChart/NonspatialDataDisplay.d.ts +2 -1
  199. package/linkChart/OrganicLayoutSettings.d.ts +2 -1
  200. package/linkChart/RootedLayoutSettings.d.ts +2 -1
  201. package/networks/Network.d.ts +2 -1
  202. package/networks/support/Circuit.d.ts +2 -1
  203. package/networks/support/CircuitSection.d.ts +2 -1
  204. package/networks/support/NamedTraceConfiguration.d.ts +2 -1
  205. package/networks/support/Subcircuit.d.ts +2 -1
  206. package/networks/support/TraceConfiguration.d.ts +2 -1
  207. package/networks/support/UNTraceConfiguration.d.ts +2 -1
  208. package/package.json +5 -5
  209. package/parcelFabric/ParcelFabric.d.ts +2 -1
  210. package/popup/FeatureModel.d.ts +2 -1
  211. package/popup/FeaturesModel.d.ts +2 -1
  212. package/popup/FieldInfo.d.ts +2 -1
  213. package/popup/content/AttachmentsContent.d.ts +2 -1
  214. package/popup/content/RelationshipContent.d.ts +2 -1
  215. package/popup/content/UtilityNetworkAssociationsContent.d.ts +2 -1
  216. package/popup/support/AttachmentsOrderByInfo.d.ts +2 -1
  217. package/popup/support/FieldInfoFormat.d.ts +2 -1
  218. package/popup/support/UtilityNetworkAssociationType.d.ts +2 -1
  219. package/portal/Portal.d.ts +2 -1
  220. package/portal/PortalItem.d.ts +2 -1
  221. package/renderers/ClassBreaksRenderer.d.ts +2 -1
  222. package/renderers/DictionaryRenderer.d.ts +2 -1
  223. package/renderers/DotDensityRenderer.d.ts +2 -1
  224. package/renderers/FlowRenderer.d.ts +8 -6
  225. package/renderers/PieChartRenderer.d.ts +2 -1
  226. package/renderers/SimpleRenderer.d.ts +2 -1
  227. package/renderers/UniqueValueRenderer.d.ts +2 -1
  228. package/renderers/VectorFieldRenderer.d.ts +2 -1
  229. package/renderers/mixins/VisualVariablesMixin.d.ts +2 -1
  230. package/renderers/support/HeatmapLegendOptions.d.ts +2 -1
  231. package/renderers/support/OthersCategory.d.ts +2 -1
  232. package/renderers/support/RasterPresetRenderer.d.ts +2 -1
  233. package/renderers/support/RendererLegendOptions.d.ts +2 -1
  234. package/renderers/support/UniqueValue.d.ts +2 -1
  235. package/renderers/support/UniqueValueClass.d.ts +2 -1
  236. package/renderers/support/UniqueValueGroup.d.ts +2 -1
  237. package/renderers/visualVariables/support/VisualVariableLegendOptions.d.ts +2 -1
  238. package/rest/featureService/FeatureService.d.ts +2 -1
  239. package/rest/layerSources/DynamicDataLayer.d.ts +2 -1
  240. package/rest/layerSources/DynamicWorkspaceLayer.d.ts +2 -1
  241. package/rest/networks/support/TraceLocation.d.ts +2 -1
  242. package/rest/print.js +1 -1
  243. package/rest/support/AttributeBinsFeatureSet.d.ts +2 -1
  244. package/rest/support/AttributeBinsGrouping.d.ts +2 -1
  245. package/rest/support/AttributeBinsQuery.d.ts +2 -1
  246. package/rest/support/AutoIntervalBinParameters.d.ts +2 -1
  247. package/rest/support/BinParametersBase.d.ts +2 -1
  248. package/rest/support/CameraInfo.d.ts +2 -1
  249. package/rest/support/CameraInfoMixin.d.ts +2 -1
  250. package/rest/support/ClosestFacilityParameters.d.ts +2 -1
  251. package/rest/support/DataLayer.d.ts +2 -1
  252. package/rest/support/DateBinTimeInterval.d.ts +2 -1
  253. package/rest/support/DirectionLine.d.ts +2 -1
  254. package/rest/support/DirectionPoint.d.ts +2 -1
  255. package/rest/support/FindImagesParameters.d.ts +2 -1
  256. package/rest/support/FixedIntervalBinParameters.d.ts +2 -1
  257. package/rest/support/ImageBoundaryParameters.d.ts +2 -1
  258. package/rest/support/ImageGPSInfoParameters.d.ts +2 -1
  259. package/rest/support/ImageInspectionInfo.d.ts +2 -1
  260. package/rest/support/ImageToMapMultirayParameters.d.ts +2 -1
  261. package/rest/support/ImageToMapParameters.d.ts +2 -1
  262. package/rest/support/ImageUrlParameters.d.ts +2 -1
  263. package/rest/support/ImageVolumeParameters.d.ts +2 -1
  264. package/rest/support/LastMileDeliveryParameters.d.ts +2 -1
  265. package/rest/support/LocateSettingBase.d.ts +2 -1
  266. package/rest/support/LocateSettingSource.d.ts +2 -1
  267. package/rest/support/LocateSettings.d.ts +2 -1
  268. package/rest/support/LocateSettingsOverrides.d.ts +2 -1
  269. package/rest/support/MapToImageParameters.d.ts +2 -1
  270. package/rest/support/NetworkUrl.d.ts +2 -1
  271. package/rest/support/NormalizationBinParametersMixin.d.ts +2 -1
  272. package/rest/support/OutDistance.d.ts +2 -1
  273. package/rest/support/PointBarrier.d.ts +2 -1
  274. package/rest/support/PolygonBarrier.d.ts +2 -1
  275. package/rest/support/PolylineBarrier.d.ts +2 -1
  276. package/rest/support/RouteInfo.d.ts +2 -1
  277. package/rest/support/RouteParameters.d.ts +2 -1
  278. package/rest/support/ServiceAreaParameters.d.ts +2 -1
  279. package/rest/support/Stop.d.ts +2 -1
  280. package/rest/support/TravelMode.d.ts +2 -1
  281. package/support/LayersMixin.d.ts +2 -1
  282. package/support/TablesMixin.d.ts +2 -1
  283. package/support/actions/ActionBase.d.ts +2 -1
  284. package/symbols/LineStyleMarker3D.d.ts +2 -1
  285. package/symbols/patterns/LinePattern3D.d.ts +2 -1
  286. package/symbols/patterns/Pattern3D.d.ts +2 -1
  287. package/symbols/support/ElevationInfo.d.ts +2 -1
  288. package/symbols/support/OccludedVisibility.d.ts +2 -1
  289. package/symbols/support/Symbol3DEmissive.d.ts +2 -1
  290. package/symbols/support/Symbol3DMaterial.d.ts +2 -1
  291. package/symbols/support/Symbol3DTextBackground.d.ts +2 -1
  292. package/tables/elements/AttributeTableAttachmentElement.d.ts +2 -1
  293. package/tables/elements/AttributeTableFieldElement.d.ts +2 -1
  294. package/tables/elements/AttributeTableGroupElement.d.ts +2 -1
  295. package/tables/elements/AttributeTableRelationshipElement.d.ts +2 -1
  296. package/tables/support/FieldOrder.d.ts +2 -1
  297. package/time/TimeInterval.d.ts +2 -1
  298. package/versionManagement/VersionManagementService.d.ts +2 -1
  299. package/versionManagement/VersioningState.d.ts +2 -1
  300. package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
  301. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityResources.js +1 -1
  302. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  303. package/views/2d/layers/LayerView2D.js +1 -1
  304. package/views/3d/environment/SunLighting.d.ts +2 -1
  305. package/views/3d/environment/VirtualLighting.d.ts +2 -1
  306. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  307. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  308. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js +1 -1
  309. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +1 -1
  310. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +3 -1
  311. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +14 -13
  312. package/views/3d/webgl-engine/effects/atmosphere/ChapmanApproximation.glsl.js +14 -4
  313. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.glsl.js +1 -1
  314. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
  315. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphereTechnique.js +1 -1
  316. package/views/3d/webgl-engine/effects/atmosphere/RealisticAtmosphereConfiguration.js +2 -0
  317. package/views/3d/webgl-engine/effects/clouds/CloudsParameters.js +1 -1
  318. package/views/3d/webgl-engine/effects/clouds/CloudsPresets.js +1 -1
  319. package/views/3d/webgl-engine/effects/glow/applyEmissiveGlow.glsl.js +2 -2
  320. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  321. package/views/3d/webgl-engine/lib/EmissionComposite.js +1 -1
  322. package/views/3d/webgl-engine/lib/EmissionFader.js +2 -0
  323. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  324. package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
  325. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  326. package/views/3d/webgl-engine/materials/renderers/IndexLayout.js +1 -1
  327. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  328. package/views/3d/webgl-engine/shaders/AtmosphereCompositing.glsl.js +1 -1
  329. package/views/3d/webgl-engine/shaders/AtmosphereCompositingTechnique.js +1 -1
  330. package/views/3d/webgl-engine/shaders/floatBlendScale.glsl.js +1 -1
  331. package/views/BreakpointsOwner.d.ts +2 -1
  332. package/views/DOMContainer.d.ts +2 -1
  333. package/views/PopupView.d.ts +2 -1
  334. package/views/SceneView.d.ts +2 -1
  335. package/views/Theme.d.ts +2 -1
  336. package/views/VideoView.d.ts +2 -1
  337. package/views/View.d.ts +2 -1
  338. package/views/View2D.d.ts +2 -1
  339. package/views/Viewport2DMixin.d.ts +2 -1
  340. package/views/analysis/AnalysisView.d.ts +2 -1
  341. package/views/draw/DrawAction.d.ts +2 -1
  342. package/views/interactive/GraphicManipulator.js +1 -1
  343. package/views/interactive/options/SnappingOptions.d.ts +2 -1
  344. package/views/layers/FeatureLikeLayerView.d.ts +0 -32
  345. package/views/layers/FeatureLikeLayerView.js +1 -1
  346. package/views/layers/GraphicsLayerView.d.ts +0 -32
  347. package/views/layers/GraphicsLayerView.js +1 -1
  348. package/views/layers/ImageryLayerView.d.ts +1 -62
  349. package/views/layers/LayerView.d.ts +2 -1
  350. package/views/layers/LayerView.js +1 -1
  351. package/views/layers/PointCloudLayerView.d.ts +2 -1
  352. package/views/ui/UI.d.ts +1 -12
  353. package/views/webgl/Program.js +2 -2
  354. package/webdoc/GeotriggersInfo.d.ts +2 -1
  355. package/webdoc/IPSInfo.d.ts +2 -1
  356. package/webdoc/geotriggersInfo/DeviceLocationFeed.d.ts +2 -1
  357. package/webdoc/geotriggersInfo/ExpressionInfo.d.ts +2 -1
  358. package/webdoc/geotriggersInfo/FeatureFenceParameters.d.ts +2 -1
  359. package/webdoc/geotriggersInfo/FeatureFilter.d.ts +2 -1
  360. package/webdoc/geotriggersInfo/FeatureLayerSource.d.ts +2 -1
  361. package/webdoc/geotriggersInfo/Geotrigger.d.ts +2 -1
  362. package/webdoc/geotriggersInfo/GeotriggerNotificationOptions.d.ts +2 -1
  363. package/webdoc/ips/AppleIPSProperties.d.ts +2 -1
  364. package/webdoc/ips/Configuration.d.ts +2 -1
  365. package/webdoc/ips/GNSSProperties.d.ts +2 -1
  366. package/webdoc/ips/PathSnappingProperties.d.ts +2 -1
  367. package/webdoc/ips/PositioningService.d.ts +2 -1
  368. package/webdoc/ips/SmoothingProperties.d.ts +2 -1
  369. package/webdoc/support/SlideThumbnail.d.ts +2 -1
  370. package/webmap/Bookmark.d.ts +2 -1
  371. package/webmap/InitialViewProperties.d.ts +2 -1
  372. package/webscene/Glow.d.ts +2 -1
  373. package/webscene/InitialViewProperties.d.ts +2 -1
  374. package/webscene/Presentation.d.ts +2 -1
  375. package/webscene/Slide.d.ts +2 -1
  376. package/webscene/SlideLegendInfo.d.ts +2 -1
  377. package/webscene/spec-certification/spec.js +1 -1
  378. package/webscene/support/Description.d.ts +2 -1
  379. package/webscene/support/FeatureReference.d.ts +2 -1
  380. package/webscene/support/FeatureReferenceId.d.ts +2 -1
  381. package/webscene/support/LayerReference.d.ts +2 -1
  382. package/webscene/support/SlideElements.d.ts +2 -1
  383. package/webscene/support/SlideEnvironment.d.ts +2 -1
  384. package/webscene/support/SlideGround.d.ts +2 -1
  385. package/webscene/support/SlidePopupInfo.d.ts +2 -1
  386. package/webscene/support/SlideVisibleLayer.d.ts +2 -1
  387. package/webscene/support/Title.d.ts +2 -1
  388. package/webscene/support/schemaValidator.js +1 -1
  389. package/webscene/version.js +1 -1
  390. package/widgets/BasemapGallery/support/BasemapGalleryItem.d.ts +2 -1
  391. package/widgets/BasemapGallery/support/PortalBasemapsSource.d.ts +2 -1
  392. package/widgets/BasemapLayerList.d.ts +2 -1
  393. package/widgets/Bookmarks/BookmarksViewModel.d.ts +2 -1
  394. package/widgets/Bookmarks.d.ts +2 -1
  395. package/widgets/CatalogLayerList.d.ts +2 -1
  396. package/widgets/Compass/CompassViewModel.d.ts +2 -1
  397. package/widgets/CoordinateConversion/CoordinateConversionViewModel.d.ts +2 -1
  398. package/widgets/Directions/DirectionsViewModel.d.ts +2 -1
  399. package/widgets/Feature/FeatureViewModel.d.ts +2 -1
  400. package/widgets/FeatureForm/FeatureFormViewModel.d.ts +2 -1
  401. package/widgets/FeatureForm/UtilityNetworkAssociationInput.d.ts +2 -1
  402. package/widgets/FeatureTable/support/ColumnTemplate.d.ts +2 -1
  403. package/widgets/FeatureTable/support/ColumnTemplateBase.d.ts +2 -1
  404. package/widgets/FeatureTable/support/EditableColumnTemplateMixin.d.ts +2 -1
  405. package/widgets/FeatureTable/support/FieldColumnTemplate.d.ts +2 -1
  406. package/widgets/FeatureTable/support/TableTemplate.d.ts +2 -1
  407. package/widgets/FeatureTemplates/TemplateItemGroup.d.ts +2 -1
  408. package/widgets/Features/FeaturesViewModel.d.ts +2 -1
  409. package/widgets/FloorFilter/FloorFilterViewModel.d.ts +2 -1
  410. package/widgets/Home/HomeViewModel.d.ts +2 -1
  411. package/widgets/LayerList/ListItem.d.ts +2 -1
  412. package/widgets/LayerList/ListItemPanel.d.ts +2 -1
  413. package/widgets/LayerList.d.ts +2 -1
  414. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.d.ts +2 -1
  415. package/widgets/Print/PrintViewModel.d.ts +2 -1
  416. package/widgets/Search/SearchSource.d.ts +2 -1
  417. package/widgets/Search/SearchViewModel.d.ts +2 -1
  418. package/widgets/TableList/ListItem.d.ts +2 -1
  419. package/widgets/TableList/ListItemPanel.d.ts +2 -1
  420. package/widgets/TableList.d.ts +2 -1
  421. package/widgets/Widget.d.ts +2 -1
  422. package/widgets/support/GeolocationPositioning.d.ts +2 -1
  423. package/widgets/support/GoTo.d.ts +2 -1
  424. package/widgets/types.d.ts +0 -21
  425. package/assets/esri/widgets/Attribution/t9n/messages.ar.json +0 -1
  426. package/assets/esri/widgets/Attribution/t9n/messages.bg.json +0 -1
  427. package/assets/esri/widgets/Attribution/t9n/messages.bs.json +0 -1
  428. package/assets/esri/widgets/Attribution/t9n/messages.ca.json +0 -1
  429. package/assets/esri/widgets/Attribution/t9n/messages.cs.json +0 -1
  430. package/assets/esri/widgets/Attribution/t9n/messages.da.json +0 -1
  431. package/assets/esri/widgets/Attribution/t9n/messages.de.json +0 -1
  432. package/assets/esri/widgets/Attribution/t9n/messages.el.json +0 -1
  433. package/assets/esri/widgets/Attribution/t9n/messages.en.json +0 -1
  434. package/assets/esri/widgets/Attribution/t9n/messages.es.json +0 -1
  435. package/assets/esri/widgets/Attribution/t9n/messages.et.json +0 -1
  436. package/assets/esri/widgets/Attribution/t9n/messages.fi.json +0 -1
  437. package/assets/esri/widgets/Attribution/t9n/messages.fr.json +0 -1
  438. package/assets/esri/widgets/Attribution/t9n/messages.he.json +0 -1
  439. package/assets/esri/widgets/Attribution/t9n/messages.hr.json +0 -1
  440. package/assets/esri/widgets/Attribution/t9n/messages.hu.json +0 -1
  441. package/assets/esri/widgets/Attribution/t9n/messages.id.json +0 -1
  442. package/assets/esri/widgets/Attribution/t9n/messages.it.json +0 -1
  443. package/assets/esri/widgets/Attribution/t9n/messages.ja.json +0 -1
  444. package/assets/esri/widgets/Attribution/t9n/messages.ko.json +0 -1
  445. package/assets/esri/widgets/Attribution/t9n/messages.lt.json +0 -1
  446. package/assets/esri/widgets/Attribution/t9n/messages.lv.json +0 -1
  447. package/assets/esri/widgets/Attribution/t9n/messages.nl.json +0 -1
  448. package/assets/esri/widgets/Attribution/t9n/messages.no.json +0 -1
  449. package/assets/esri/widgets/Attribution/t9n/messages.pl.json +0 -1
  450. package/assets/esri/widgets/Attribution/t9n/messages.pt-BR.json +0 -1
  451. package/assets/esri/widgets/Attribution/t9n/messages.pt-PT.json +0 -1
  452. package/assets/esri/widgets/Attribution/t9n/messages.ro.json +0 -1
  453. package/assets/esri/widgets/Attribution/t9n/messages.ru.json +0 -1
  454. package/assets/esri/widgets/Attribution/t9n/messages.sk.json +0 -1
  455. package/assets/esri/widgets/Attribution/t9n/messages.sl.json +0 -1
  456. package/assets/esri/widgets/Attribution/t9n/messages.sr.json +0 -1
  457. package/assets/esri/widgets/Attribution/t9n/messages.sv.json +0 -1
  458. package/assets/esri/widgets/Attribution/t9n/messages.th.json +0 -1
  459. package/assets/esri/widgets/Attribution/t9n/messages.tr.json +0 -1
  460. package/assets/esri/widgets/Attribution/t9n/messages.uk.json +0 -1
  461. package/assets/esri/widgets/Attribution/t9n/messages.vi.json +0 -1
  462. package/assets/esri/widgets/Attribution/t9n/messages.zh-CN.json +0 -1
  463. package/assets/esri/widgets/Attribution/t9n/messages.zh-HK.json +0 -1
  464. package/assets/esri/widgets/Attribution/t9n/messages.zh-TW.json +0 -1
  465. package/chunks/CloudsComposition.glsl.js +0 -3
  466. package/popup/content.d.ts +0 -192
  467. package/popup/content.js +0 -2
  468. package/portal/schemas/buildingSceneLayerItem.js +0 -2
  469. package/portal/schemas/gaussianSplatLayerItem.js +0 -2
  470. package/portal/schemas/integratedMesh3DTilesLayerItem.js +0 -2
  471. package/portal/schemas/integratedMeshLayerItem.js +0 -2
  472. package/portal/schemas/pointCloudLayerItem.js +0 -2
  473. package/portal/schemas/sceneLayerItem.js +0 -2
  474. package/portal/schemas/webScene.js +0 -2
  475. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.glsl.js +0 -2
  476. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +0 -2
  477. package/views/3d/webgl-engine/effects/clouds/CloudsCompositionTechnique.js +0 -2
  478. package/widgets/Attribution/AttributionViewModel.d.ts +0 -41
  479. package/widgets/Attribution/AttributionViewModel.js +0 -2
  480. package/widgets/Attribution.d.ts +0 -105
  481. package/widgets/Attribution.js +0 -2
@@ -41,4 +41,5 @@ export default class MapToImageParameters extends MapToImageParametersSuperclass
41
41
  */
42
42
  accessor visibleOnly: boolean;
43
43
  }
44
- declare const MapToImageParametersSuperclass: typeof JSONSupport & typeof ClonableMixin
44
+ declare const MapToImageParametersSuperclass: typeof JSONSupport & typeof ClonableMixin
45
+ export {};
@@ -18,4 +18,5 @@ export default class NetworkUrl extends NetworkUrlSuperclass {
18
18
  /** A url to any ArcGIS Server feature, map, or geoprocessing service that returns a JSON feature set. */
19
19
  accessor url: string | null | undefined;
20
20
  }
21
- declare const NetworkUrlSuperclass: typeof JSONSupport & typeof ClonableMixin
21
+ declare const NetworkUrlSuperclass: typeof JSONSupport & typeof ClonableMixin
22
+ export {};
@@ -72,4 +72,5 @@ export abstract class NormalizationBinParametersMixin {
72
72
  *
73
73
  */
74
74
  accessor normalizationType: NormalizationType | null | undefined;
75
- }
75
+ }
76
+ export {};
@@ -74,4 +74,5 @@ export default class OutDistance extends OutDistanceSuperclass {
74
74
  */
75
75
  accessor returnDistance: boolean | null | undefined;
76
76
  }
77
- declare const OutDistanceSuperclass: typeof JSONSupport & typeof ClonableMixin
77
+ declare const OutDistanceSuperclass: typeof JSONSupport & typeof ClonableMixin
78
+ export {};
@@ -76,4 +76,5 @@ export default class PointBarrier extends PointBarrierSuperclass {
76
76
  */
77
77
  toGraphic(): Graphic;
78
78
  }
79
- declare const PointBarrierSuperclass: typeof JSONSupport & typeof ClonableMixin
79
+ declare const PointBarrierSuperclass: typeof JSONSupport & typeof ClonableMixin
80
+ export {};
@@ -65,4 +65,5 @@ export default class PolygonBarrier extends PolygonBarrierSuperclass {
65
65
  */
66
66
  toGraphic(): Graphic;
67
67
  }
68
- declare const PolygonBarrierSuperclass: typeof JSONSupport & typeof ClonableMixin
68
+ declare const PolygonBarrierSuperclass: typeof JSONSupport & typeof ClonableMixin
69
+ export {};
@@ -79,4 +79,5 @@ export default class PolylineBarrier extends PolylineBarrierSuperclass {
79
79
  */
80
80
  toGraphic(): Graphic;
81
81
  }
82
- declare const PolylineBarrierSuperclass: typeof JSONSupport & typeof ClonableMixin
82
+ declare const PolylineBarrierSuperclass: typeof JSONSupport & typeof ClonableMixin
83
+ export {};
@@ -115,4 +115,5 @@ export default class RouteInfo extends RouteInfoSuperclass {
115
115
  */
116
116
  toGraphic(): Graphic;
117
117
  }
118
- declare const RouteInfoSuperclass: typeof JSONSupport & typeof ClonableMixin
118
+ declare const RouteInfoSuperclass: typeof JSONSupport & typeof ClonableMixin
119
+ export {};
@@ -639,4 +639,5 @@ export default class RouteParameters extends RouteParametersSuperclass {
639
639
  */
640
640
  accessor useTimeWindows: boolean | null | undefined;
641
641
  }
642
- declare const RouteParametersSuperclass: typeof JSONSupport & typeof ClonableMixin
642
+ declare const RouteParametersSuperclass: typeof JSONSupport & typeof ClonableMixin
643
+ export {};
@@ -523,4 +523,5 @@ export default class ServiceAreaParameters extends ServiceAreaParametersSupercla
523
523
  */
524
524
  accessor useHierarchy: boolean | null | undefined;
525
525
  }
526
- declare const ServiceAreaParametersSuperclass: typeof JSONSupport & typeof ClonableMixin
526
+ declare const ServiceAreaParametersSuperclass: typeof JSONSupport & typeof ClonableMixin
527
+ export {};
@@ -164,4 +164,5 @@ export default class Stop extends StopSuperclass {
164
164
  */
165
165
  toGraphic(): Graphic;
166
166
  }
167
- declare const StopSuperclass: typeof JSONSupport & typeof ClonableMixin
167
+ declare const StopSuperclass: typeof JSONSupport & typeof ClonableMixin
168
+ export {};
@@ -153,4 +153,5 @@ export default class TravelMode extends TravelModeSuperclass {
153
153
  /** Indicates how the U-turns at junctions that could occur during network traversal are handled by the solver. */
154
154
  uturnAtJunctions: UTurnRestriction;
155
155
  }
156
- declare const TravelModeSuperclass: typeof JSONSupport & typeof ClonableMixin
156
+ declare const TravelModeSuperclass: typeof JSONSupport & typeof ClonableMixin
157
+ export {};
@@ -242,4 +242,5 @@ export abstract class LayersMixin {
242
242
  * @returns Returns the layer that was moved.
243
243
  */
244
244
  reorder(layer: Layer, index?: number): Layer | null | undefined;
245
- }
245
+ }
246
+ export {};
@@ -295,4 +295,5 @@ export abstract class TablesMixin {
295
295
  * @since 4.18
296
296
  */
297
297
  findTableById(tableId: string): Layer | null | undefined;
298
- }
298
+ }
299
+ export {};
@@ -96,4 +96,5 @@ export default abstract class ActionBase extends ActionBaseSuperclass {
96
96
  */
97
97
  abstract clone(): this;
98
98
  }
99
- declare const ActionBaseSuperclass: typeof Accessor & typeof IdentifiableMixin
99
+ declare const ActionBaseSuperclass: typeof Accessor & typeof IdentifiableMixin
100
+ export {};
@@ -78,4 +78,5 @@ export default class LineStyleMarker3D extends LineStyleMarker3DSuperclass {
78
78
  /** The type of marker applied to a line. */
79
79
  get type(): "style";
80
80
  }
81
- declare const LineStyleMarker3DSuperclass: typeof JSONSupport & typeof ClonableMixin
81
+ declare const LineStyleMarker3DSuperclass: typeof JSONSupport & typeof ClonableMixin
82
+ export {};
@@ -16,4 +16,5 @@ export default abstract class LinePattern3D extends LinePattern3DSuperclass {
16
16
  /** The LinePattern3D type. */
17
17
  get type(): "style" | "template";
18
18
  }
19
- declare const LinePattern3DSuperclass: typeof JSONSupport & typeof ClonableMixin
19
+ declare const LinePattern3DSuperclass: typeof JSONSupport & typeof ClonableMixin
20
+ export {};
@@ -11,4 +11,5 @@ import type { JSONSupport } from "../../core/JSONSupport.js";
11
11
  * @since 4.17
12
12
  */
13
13
  export default abstract class Pattern3D extends Pattern3DSuperclass {}
14
- declare const Pattern3DSuperclass: typeof JSONSupport & typeof ClonableMixin
14
+ declare const Pattern3DSuperclass: typeof JSONSupport & typeof ClonableMixin
15
+ export {};
@@ -73,4 +73,5 @@ export default class ElevationInfo<Modes extends ElevationInfoMode = ElevationIn
73
73
  /** The unit for `featureExpressionInfo` and `offset` values. */
74
74
  accessor unit: ElevationUnit | null | undefined;
75
75
  }
76
- declare const ElevationInfoSuperclass: typeof JSONSupport & typeof ClonableMixin
76
+ declare const ElevationInfoSuperclass: typeof JSONSupport & typeof ClonableMixin
77
+ export {};
@@ -27,4 +27,5 @@ export default class OccludedVisibility extends OccludedVisibilitySuperclass {
27
27
  */
28
28
  accessor mode: OccludedVisibilityMode;
29
29
  }
30
- declare const OccludedVisibilitySuperclass: typeof JSONSupport & typeof ClonableMixin
30
+ declare const OccludedVisibilitySuperclass: typeof JSONSupport & typeof ClonableMixin
31
+ export {};
@@ -107,4 +107,5 @@ export class Symbol3DEmissive extends Symbol3DEmissiveSuperclass {
107
107
  */
108
108
  accessor strength: number;
109
109
  }
110
- declare const Symbol3DEmissiveSuperclass: typeof JSONSupport & typeof ClonableMixin
110
+ declare const Symbol3DEmissiveSuperclass: typeof JSONSupport & typeof ClonableMixin
111
+ export {};
@@ -43,4 +43,5 @@ export default class Symbol3DMaterial extends Symbol3DMaterialSuperclass {
43
43
  get emissive(): Symbol3DEmissive | null | undefined;
44
44
  set emissive(value: Symbol3DEmissiveProperties | null | undefined);
45
45
  }
46
- declare const Symbol3DMaterialSuperclass: typeof JSONSupport & typeof ClonableMixin
46
+ declare const Symbol3DMaterialSuperclass: typeof JSONSupport & typeof ClonableMixin
47
+ export {};
@@ -24,4 +24,5 @@ export default class Symbol3DTextBackground extends Symbol3DTextBackgroundSuperc
24
24
  get color(): Color | null | undefined;
25
25
  set color(value: ColorLike | null | undefined);
26
26
  }
27
- declare const Symbol3DTextBackgroundSuperclass: typeof JSONSupport & typeof ClonableMixin
27
+ declare const Symbol3DTextBackgroundSuperclass: typeof JSONSupport & typeof ClonableMixin
28
+ export {};
@@ -32,4 +32,5 @@ export default class AttributeTableAttachmentElement extends AttributeTableAttac
32
32
  */
33
33
  clone(): this;
34
34
  }
35
- declare const AttributeTableAttachmentElementSuperclass: typeof AttributeTableElement & typeof ClonableMixin
35
+ declare const AttributeTableAttachmentElementSuperclass: typeof AttributeTableElement & typeof ClonableMixin
36
+ export {};
@@ -33,4 +33,5 @@ export default class AttributeTableFieldElement extends AttributeTableFieldEleme
33
33
  */
34
34
  clone(): this;
35
35
  }
36
- declare const AttributeTableFieldElementSuperclass: typeof AttributeTableElement & typeof ClonableMixin
36
+ declare const AttributeTableFieldElementSuperclass: typeof AttributeTableElement & typeof ClonableMixin
37
+ export {};
@@ -37,4 +37,5 @@ export default class AttributeTableGroupElement extends AttributeTableGroupEleme
37
37
  */
38
38
  clone(): this;
39
39
  }
40
- declare const AttributeTableGroupElementSuperclass: typeof AttributeTableElement & typeof ClonableMixin
40
+ declare const AttributeTableGroupElementSuperclass: typeof AttributeTableElement & typeof ClonableMixin
41
+ export {};
@@ -24,4 +24,5 @@ export default class AttributeTableRelationshipElement extends AttributeTableRel
24
24
  */
25
25
  clone(): this;
26
26
  }
27
- declare const AttributeTableRelationshipElementSuperclass: typeof AttributeTableElement & typeof ClonableMixin
27
+ declare const AttributeTableRelationshipElementSuperclass: typeof AttributeTableElement & typeof ClonableMixin
28
+ export {};
@@ -24,4 +24,5 @@ export default class AttributeTableFieldOrder extends AttributeTableFieldOrderSu
24
24
  */
25
25
  accessor order: "asc" | "desc" | null | undefined;
26
26
  }
27
- declare const AttributeTableFieldOrderSuperclass: typeof JSONSupport & typeof ClonableMixin
27
+ declare const AttributeTableFieldOrderSuperclass: typeof JSONSupport & typeof ClonableMixin
28
+ export {};
@@ -59,4 +59,5 @@ export default class TimeInterval extends TimeIntervalSuperclass {
59
59
  */
60
60
  toMilliseconds(): number;
61
61
  }
62
- declare const TimeIntervalSuperclass: typeof JSONSupport & typeof ClonableMixin
62
+ declare const TimeIntervalSuperclass: typeof JSONSupport & typeof ClonableMixin
63
+ export {};
@@ -490,4 +490,5 @@ export default class VersionManagementService extends VersionManagementServiceSu
490
490
  */
491
491
  undo(versionIdentifier: VersionIdentifier): void;
492
492
  }
493
- declare const VersionManagementServiceSuperclass: typeof Loadable & typeof JSONSupportMixin
493
+ declare const VersionManagementServiceSuperclass: typeof Loadable & typeof JSONSupportMixin
494
+ export {};
@@ -187,4 +187,5 @@ export default class VersioningState extends VersioningStateSuperclass {
187
187
  */
188
188
  undo(): Promise<ServiceResult>;
189
189
  }
190
- declare const VersioningStateSuperclass: typeof Loadable & typeof JSONSupportMixin
190
+ declare const VersioningStateSuperclass: typeof Loadable & typeof JSONSupportMixin
191
+ export {};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{identity as e,translate as t,scaleByVec2 as n}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{fromValues as i}from"../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{createVFMeshData as a,createVFScalarData as o}from"../../../../layers/raster/functions/vectorFieldUtils.js";import{DisplayObject as s}from"../DisplayObject.js";import{Mesh as c}from"../webgl/meshing/Mesh.js";import{PrimitiveType as l,DataType as u}from"../../../webgl/enums.js";import{VertexElementDescriptor as d}from"../../../webgl/VertexElementDescriptor.js";class f extends s{constructor(e=null){super(),this._source=null,this._symbolizerParameters=null,this._meshesInvalidated=!0,this.coordScale=[1,1],this.height=null,this.key=null,this.offset=null,this.stencilRef=0,this.resolution=null,this.pixelRatio=1,this.x=0,this.y=0,this.rotation=0,this.rawPixelData=null,this.meshes=null,this.width=null,this.source=e}destroy(){super.destroy(),this.meshes!=null&&(this.meshes.magdir?.destroy(),this.meshes.scalar?.destroy(),this.meshes=null)}get symbolizerParameters(){return this._symbolizerParameters}set symbolizerParameters(e){JSON.stringify(this._symbolizerParameters)!==JSON.stringify(e)&&(this._symbolizerParameters=e,this.invalidateMeshes())}get source(){return this._source}set source(e){this._source=e,this.invalidateMeshes()}invalidateMeshes(){!this._meshesInvalidated&&this.meshes!=null&&(this.meshes.magdir?.destroy(),this.meshes.scalar?.destroy(),this.meshes=null,this._meshesInvalidated=!0,this.requestRender())}updateVectorFieldMesh(e){if(this._meshesInvalidated){if(this._meshesInvalidated=!1,this.source!=null&&this.meshes==null){let{style:t}=this.symbolizerParameters;switch(t){case`beaufort_ft`:case`beaufort_km`:case`beaufort_kn`:case`beaufort_m`:case`beaufort_mi`:case`classified_arrow`:case`ocean_current_kn`:case`ocean_current_m`:case`single_arrow`:{let t=a(this.source,this.symbolizerParameters),n=this._createVectorFieldMesh(e,t);this.meshes={magdir:n}}break;case`simple_scalar`:{let t=o(this.source,this.symbolizerParameters),n=this._createVectorFieldMesh(e,t);this.meshes={scalar:n}}break;case`wind_speed`:{let t=a(this.source,this.symbolizerParameters),n=this._createVectorFieldMesh(e,t),r=o(this.source,this.symbolizerParameters),i=this._createVectorFieldMesh(e,r);this.meshes={scalar:i,magdir:n}}}}this.ready(),this.requestRender()}}_createTransforms(){return{displayViewScreenMat3:r(),localToScreenMat3:r()}}setTransform(r){let a=e(this.transforms.localToScreenMat3),[o,s]=r.toScreenNoRotation([0,0],[this.x,this.y]),c=this.resolution/this.pixelRatio/r.resolution,l=c*this.width,u=c*this.height;t(a,a,i(o,s)),n(a,a,i(l,u))}onAttach(){this.invalidateMeshes()}onDetach(){this.invalidateMeshes()}_createVectorFieldMesh(e,t){let{vertexData:n,indexData:r}=t,i={vertex:{geometry:{data:n,layout:[new d(`position`,2,u.FLOAT,0,24),new d(`offset`,2,u.FLOAT,8,24),new d(`vv`,2,u.FLOAT,16,24)]}},index:{indices:{data:r}},groups:[{index:`indices`,primitive:l.TRIANGLES}],parts:[{group:0,start:0,count:r.length}]};return new c(e.context,i)}}export{f as RasterVFDisplayObject};
2
+ import{identity as e,translate as t,scaleByVec2 as n}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as r}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{fromValues as i}from"../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{createVFMeshData as a,createVFScalarData as o}from"../../../../layers/raster/functions/vectorFieldUtils.js";import{DisplayObject as s}from"../DisplayObject.js";import{Mesh as c}from"../webgl/meshing/Mesh.js";import{DataType as l,PrimitiveType as u}from"../../../webgl/enums.js";import{VertexElementDescriptor as d}from"../../../webgl/VertexElementDescriptor.js";class f extends s{constructor(e=null){super(),this._source=null,this._symbolizerParameters=null,this._meshesInvalidated=!0,this.coordScale=[1,1],this.height=null,this.key=null,this.offset=null,this.stencilRef=0,this.resolution=null,this.pixelRatio=1,this.x=0,this.y=0,this.rotation=0,this.rawPixelData=null,this.meshes=null,this.width=null,this.source=e}destroy(){super.destroy(),this.meshes!=null&&(this.meshes.magdir?.destroy(),this.meshes.scalar?.destroy(),this.meshes=null)}get symbolizerParameters(){return this._symbolizerParameters}set symbolizerParameters(e){JSON.stringify(this._symbolizerParameters)!==JSON.stringify(e)&&(this._symbolizerParameters=e,this.invalidateMeshes())}get source(){return this._source}set source(e){this._source=e,this.invalidateMeshes()}invalidateMeshes(){!this._meshesInvalidated&&this.meshes!=null&&(this.meshes.magdir?.destroy(),this.meshes.scalar?.destroy(),this.meshes=null,this._meshesInvalidated=!0,this.requestRender())}updateVectorFieldMesh(e){if(this._meshesInvalidated){if(this._meshesInvalidated=!1,this.source!=null&&this.meshes==null){let{style:t}=this.symbolizerParameters;switch(t){case`beaufort_ft`:case`beaufort_km`:case`beaufort_kn`:case`beaufort_m`:case`beaufort_mi`:case`classified_arrow`:case`ocean_current_kn`:case`ocean_current_m`:case`single_arrow`:{let t=a(this.source,this.symbolizerParameters),n=this._createVectorFieldMesh(e,t);this.meshes={magdir:n}}break;case`simple_scalar`:{let t=o(this.source,this.symbolizerParameters),n=this._createVectorFieldMesh(e,t);this.meshes={scalar:n}}break;case`wind_speed`:{let t=a(this.source,this.symbolizerParameters),n=this._createVectorFieldMesh(e,t),r=o(this.source,this.symbolizerParameters),i=this._createVectorFieldMesh(e,r);this.meshes={scalar:i,magdir:n}}}}this.ready(),this.requestRender()}}_createTransforms(){return{displayViewScreenMat3:r(),localToScreenMat3:r()}}setTransform(r){let a=e(this.transforms.localToScreenMat3),[o,s]=r.toScreenNoRotation([0,0],[this.x,this.y]),c=this.resolution/this.pixelRatio/r.resolution,l=c*this.width,u=c*this.height;t(a,a,i(o,s)),n(a,a,i(l,u))}onAttach(){this.invalidateMeshes()}onDetach(){this.invalidateMeshes()}_createVectorFieldMesh(e,t){let{vertexData:n,indexData:r}=t,i={vertex:{geometry:{data:n,layout:[new d(`position`,2,l.FLOAT,0,24),new d(`offset`,2,l.FLOAT,8,24),new d(`vv`,2,l.FLOAT,16,24)]}},index:{indices:{data:r}},groups:[{index:`indices`,primitive:u.TRIANGLES}],parts:[{group:0,start:0,count:r.length}]};return new c(e.context,i)}}export{f as RasterVFDisplayObject};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"../../../../../../../core/RandomLCG.js";import{tileSize as t}from"../../../definitions.js";import{SimpleMesh as n}from"../../../meshing/SimpleMesh.js";import{SizedDepthStencilFormat as r,DataType as i,PrimitiveType as a,PixelType as o}from"../../../../../../webgl/enums.js";import{DisposableFramebufferObject as s}from"../../../../../../webgl/FramebufferObject.js";import{Renderbuffer as c}from"../../../../../../webgl/Renderbuffer.js";import{RenderbufferDescriptor as l}from"../../../../../../webgl/RenderbufferDescriptor.js";import{Texture as u}from"../../../../../../webgl/Texture.js";import{TextureDescriptor as d}from"../../../../../../webgl/TextureDescriptor.js";const f={pos:{count:2,type:i.UNSIGNED_SHORT}};class p{constructor(){this._dotTextureSize=0,this._dotTextures=null,this._dotMesh=null}destroy(){this._disposeTextures(),this._dotFBO?.dispose(),this._dotMesh?.destroy()}getFBO(e){if(this._dotFBO==null){let n=t,i=t,a=new d(n,i);a.samplingMode=9728,a.wrapMode=33071;let o=new c(e,new l(r.DEPTH24_STENCIL8,n,i));this._dotFBO=new s(e,a,o)}return this._dotFBO}getDotDensityMesh(e){if(this._dotMesh==null){let r=t,i=r*r,o=new Int16Array(i*2);for(let e=0;e<r;e++)for(let t=0;t<r;t++)o[2*(t+e*r)]=t,o[2*(t+e*r)+1]=e;this._dotMesh=n.create(e,{primitive:a.POINTS,vertex:o,count:i,layout:f})}return this._dotMesh}getDotDensityTextures(t,n,r){if((this._dotTextureSize!==n||this._seed!==r)&&(this._disposeTextures(),this._dotTextureSize=n,this._seed=r),this._dotTextures===null){let i=new e(r);this._dotTextures=[this._allocDotDensityTexture(t,n,i),this._allocDotDensityTexture(t,n,i)]}return this._dotTextures}_disposeTextures(){if(this._dotTextures){for(let e=0;e<this._dotTextures.length;e++)this._dotTextures[e].dispose();this._dotTextures=null}}_allocDotDensityTexture(e,t,n){let r=new Float32Array(t*t*4);for(let e=0;e<r.length;e++)r[e]=n.getFloat();let i=new d(t);return i.dataType=o.FLOAT,i.samplingMode=9728,new u(e,i,r)}}export{p as DotDensityResources};
2
+ import e from"../../../../../../../core/RandomLCG.js";import{tileSize as t}from"../../../definitions.js";import{SimpleMesh as n}from"../../../meshing/SimpleMesh.js";import{DataType as r,SizedDepthStencilFormat as i,PrimitiveType as a,PixelType as o}from"../../../../../../webgl/enums.js";import{DisposableFramebufferObject as s}from"../../../../../../webgl/FramebufferObject.js";import{Renderbuffer as c}from"../../../../../../webgl/Renderbuffer.js";import{RenderbufferDescriptor as l}from"../../../../../../webgl/RenderbufferDescriptor.js";import{Texture as u}from"../../../../../../webgl/Texture.js";import{TextureDescriptor as d}from"../../../../../../webgl/TextureDescriptor.js";const f={pos:{count:2,type:r.UNSIGNED_SHORT}};class p{constructor(){this._dotTextureSize=0,this._dotTextures=null,this._dotMesh=null}destroy(){this._disposeTextures(),this._dotFBO?.dispose(),this._dotMesh?.destroy()}getFBO(e){if(this._dotFBO==null){let n=t,r=t,a=new d(n,r);a.samplingMode=9728,a.wrapMode=33071;let o=new c(e,new l(i.DEPTH24_STENCIL8,n,r));this._dotFBO=new s(e,a,o)}return this._dotFBO}getDotDensityMesh(e){if(this._dotMesh==null){let r=t,i=r*r,o=new Int16Array(i*2);for(let e=0;e<r;e++)for(let t=0;t<r;t++)o[2*(t+e*r)]=t,o[2*(t+e*r)+1]=e;this._dotMesh=n.create(e,{primitive:a.POINTS,vertex:o,count:i,layout:f})}return this._dotMesh}getDotDensityTextures(t,n,r){if((this._dotTextureSize!==n||this._seed!==r)&&(this._disposeTextures(),this._dotTextureSize=n,this._seed=r),this._dotTextures===null){let i=new e(r);this._dotTextures=[this._allocDotDensityTexture(t,n,i),this._allocDotDensityTexture(t,n,i)]}return this._dotTextures}_disposeTextures(){if(this._dotTextures){for(let e=0;e<this._dotTextures.length;e++)this._dotTextures[e].dispose();this._dotTextures=null}}_allocDotDensityTexture(e,t,n){let r=new Float32Array(t*t*4);for(let e=0;e<r.length;e++)r[e]=n.getFloat();let i=new d(t);return i.dataType=o.FLOAT,i.samplingMode=9728,new u(e,i,r)}}export{p as DotDensityResources};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../Graphic.js";import{getContrast as n}from"../../../../core/colorUtils.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import{watch as i}from"../../../../core/reactiveUtils.js";import{getMetersPerUnitForSR as a}from"../../../../core/units.js";import{property as o,subclass as s}from"../../../../core/accessorSupport/decorators.js";import{subtract as c,normalize as l}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as u,UNIT_X as d}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{scale as f,length as p,normalize as m,add as h,lerp as g,subtract as _}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as v}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import y from"../../../../geometry/Point.js";import b from"../../../../geometry/Polygon.js";import{project as x,initializeProjection as S}from"../../../../geometry/projectionUtils.js";import{create as C,copy as w}from"../../../../geometry/support/boundedPlane.js";import{equals as T}from"../../../../geometry/support/spatialReferenceUtils.js";import E from"../../../../layers/GraphicsLayer.js";import D from"../../../../symbols/SimpleFillSymbol.js";import O from"../../../../symbols/SimpleMarkerSymbol.js";import{DragManipulation as k}from"./manipulations/DragManipulation.js";import{RotateManipulation as A}from"./manipulations/RotateManipulation.js";import{ScaleManipulation as j}from"./manipulations/ScaleManipulation.js";import{PreserveAspectRatio as M,SnapRotation as N}from"./manipulations/utils.js";import{InteractiveToolBase as P}from"../../../interactive/InteractiveToolBase.js";import{KeyBindings as F,mediaKeys as I}from"../../../interactive/keybindings.js";import{EditGeometry as L}from"../../../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as R}from"../../../interactive/editGeometry/EditGeometryOperations.js";import{calculateOrientedBounds as z}from"../../../interactive/editGeometry/support/editPlaneUtils.js";import{findFirstGraphicHit as B}from"../../../support/hitTestSelectUtils.js";import{createScreenPointFromEvent as V}from"../../../support/screenUtils.js";const H=[[1,1],[1,-1],[-1,-1],[-1,1],[1,0],[0,-1],[-1,0],[0,1]];let U=class extends P{constructor(e){super(e),this._initialControlPoints=null,this._initialGeometry=null,this._graphic=null,this._planeCache=C(),this._displayPlaneCache=C(),this._mainAxisCache=u(),this._rotationHandleCache=v(),this._cornerA=v(),this._cornerB=v(),this._cornerC=v(),this._cornerD=v(),this._avgAB=v(),this._avgBC=v(),this._avgCD=v(),this._avgDA=v(),this._preserveAspectRatio=new M,this._snapRotation=new N,this._graphicsLayer=new E({internal:!0,listMode:`hide`,visible:!1,title:`TransformTool layer`}),this._sharedUndoStack=[],this._sharedRedoStack=[],this._isOpacityToggled=!1,this._factor=1,this.preserveAspectRatio=null,this.snapRotation=null,this.type=`transform`}initialize(){this._initialize()}destroy(){let{map:e}=this.view;this._dragManipulation.destroy(),this._rotateManipulation.destroy(),this._scaleManipulations.forEach(e=>e.destroy()),this._editGeometryOperations.destroy(),e.removeMany([this._graphicsLayer]),this._graphicsLayer.removeAll(),this._graphicsLayer=r(this._graphicsLayer),this._initialControlPoints=null,this._initialGeometry=null,this._graphic=null,this._preserveAspectRatio=null,this._snapRotation=null,this._planeCache=null,this._displayPlaneCache=null,this._rotationHandleCache=null,this._mainAxisCache=null,this._cornerA=null,this._cornerB=null,this._cornerC=null,this._cornerD=null,this._avgAB=null,this._avgBC=null,this._avgCD=null,this._avgDA=null,this._sharedUndoStack=null,this._sharedRedoStack=null}get _plane(){let e=this._graphic.geometry;if(e==null)return null;let t=this._editGeometryOperations.data,n=t.parts[0].segments[0],r=c(this._mainAxisCache,n.leftVertex.pos,n.rightVertex.pos);l(r,r);let i=80*this.view.resolution,o=this.view.spatialReference;return T(o,e.spatialReference)&&(i*=a(o)/a(e.spatialReference)),z(r,t,i,this._planeCache)}get _displayPlane(){let e=this._plane;if(!e)return null;let t=this._displayPlaneCache;w(e,t);let n=10*this.view.resolution;return f(t.basis1,t.basis1,1+n/p(t.basis1)),f(t.basis2,t.basis2,1+n/p(t.basis2)),t}get _backgroundGraphicGeometry(){let e=this._displayPlane;if(!e)return null;let t=this.view.spatialReference;return this._updateDisplayPlaneConrers(e),new b({spatialReference:t,rings:[[this._cornerA,this._cornerB,this._cornerC,this._cornerD,this._cornerA]]})}get _rotateGraphicGeometry(){let e=this._plane;if(!e)return null;let t=this._rotationHandleCache;return m(t,e.basis1),f(t,t,30*this.view.resolution),h(t,t,e.origin),h(t,t,e.basis1),new y({x:t[0],y:t[1],spatialReference:this.view.spatialReference})}get _scaleGraphicGeometries(){let e=this._displayPlane;if(!e)return[];let t=this.view.spatialReference;this._updateDisplayPlaneConrers(e);let{_cornerA:n,_cornerB:r,_cornerC:i,_cornerD:a}=this,o=g(this._avgAB,n,r,.5),s=g(this._avgBC,r,i,.5),c=g(this._avgCD,i,a,.5),l=g(this._avgDA,a,n,.5);return[new y({x:n[0],y:n[1],spatialReference:t}),new y({x:r[0],y:r[1],spatialReference:t}),new y({x:i[0],y:i[1],spatialReference:t}),new y({x:a[0],y:a[1],spatialReference:t}),new y({x:o[0],y:o[1],spatialReference:t}),new y({x:s[0],y:s[1],spatialReference:t}),new y({x:c[0],y:c[1],spatialReference:t}),new y({x:l[0],y:l[1],spatialReference:t})]}onActivate(){this.visible=!0}onDeactivate(){this.visible=!1}onShow(){this._graphicsLayer.visible=!0}onHide(){this._graphicsLayer.visible=!1}canUndo(){return this._editGeometryOperations.canUndo}canRedo(){return this._editGeometryOperations.canRedo}undo(){this._editGeometryOperations.undo(),this.updateGraphics()}redo(){this._editGeometryOperations.redo(),this.updateGraphics()}refresh(){let{view:e,target:t}=this,n=`georeference`in t?t.georeference.coords:t.geometry,r=this._editGeometryOperations,i=r.data.parts[0].vertices,a=L.fromGeometry(x(n,e.spatialReference),2).parts[0].vertices;i.forEach((e,t)=>{r.setVertexPosition(e,a[t].pos)}),this.updateGraphics()}reset(){let{target:e}=this;if(`georeference`in e){let t=e.georeference;t.type===`control-points`&&(t.controlPoints=this._initialControlPoints)}else e.geometry=this._initialGeometry;this.refresh(),this._sharedUndoStack.length=0,this._sharedRedoStack.length=0}updateGraphics(){let e=this._editGeometryOperations.data.geometry;if(`georeference`in this.target){let t=this.target.georeference;t.coords=e}this._graphic.geometry=e,this._backgroundGraphic.geometry=this._backgroundGraphicGeometry,this._rotateGraphic.geometry=this._rotateGraphicGeometry,this._scaleGraphicGeometries.forEach((e,t)=>{this._scaleGraphics[t].geometry=e})}setSharedUndoStack(e){this._sharedUndoStack=e}setSharedRedoStack(e){this._sharedRedoStack=e}async _initialize(){let{view:e,target:r}=this;if(`georeference`in r){let e=r.georeference;this._graphic=new t({geometry:e.coords}),this._initialControlPoints=e.type===`control-points`?e.controlPoints:null}else this._graphic=r,this._initialGeometry=r.geometry;e.map.addMany([this._graphicsLayer]),e.focus(),this.visible=!1,this.finishToolCreation(),await this._loadProjectionEngine(),this._editGeometryOperations=R.fromGeometry(x(this._graphic.geometry,e.spatialReference),2),this._backgroundGraphic=new t({symbol:new D({color:`transparent`,outline:{type:`simple-line`,color:e.effectiveTheme.accentColor,width:2}}),geometry:this._backgroundGraphicGeometry}),this._rotateGraphic=new t({symbol:new O({color:n(e.effectiveTheme.accentColor),outline:{type:`simple-line`,color:e.effectiveTheme.accentColor,width:1}}),geometry:this._rotateGraphicGeometry}),this._scaleGraphics=this._scaleGraphicGeometries.map(r=>new t({symbol:new O({size:6,style:`square`,color:n(e.effectiveTheme.accentColor),outline:{type:`simple-line`,color:e.effectiveTheme.accentColor,width:1}}),geometry:r})),this._graphicsLayer.graphics.addMany([this._backgroundGraphic,this._rotateGraphic,...this._scaleGraphics]),this._dragManipulation=new k({tool:this,view:e,graphic:this._graphic}),this._rotateManipulation=new A({tool:this,view:e,graphic:this._rotateGraphic,snapRotation:this._snapRotation}),this._scaleManipulations=this._scaleGraphics.map((t,n)=>new j({tool:this,view:e,graphic:t,direction:H[n],preserveAspectRatio:this._preserveAspectRatio})),this.addHandles([this._dragManipulation.createDragPipeline(this._getInfo.bind(this),this._updateGraphics.bind(this)),this._rotateManipulation.createDragPipeline(this._getInfo.bind(this),this._updateGraphics.bind(this)),...this._scaleManipulations.map(e=>e.createDragPipeline(this._getInfo.bind(this),this._updateGraphics.bind(this))),i(()=>this.view.scale,()=>this.active?this.updateGraphics():null),e.on(`click`,async t=>{if(e.activeTool!=null&&e.activeTool!==this)return;let n=V(t),i=[];e.map.allLayers.forEach(e=>{(e.type===`vector-tile`||e.type===`imagery`)&&i.push(e)});let a=await this.view.hitTest(n,{exclude:i}),o=a.results;if(o.length===0)e.activeTool=null;else{let t=B(a.results),n=`georeference`in r,i=o.map(e=>e.type===`media`?e.element:null).filter(Boolean),s=new Set([...this._graphicsLayer.graphics,n?null:r].filter(Boolean));n&&i.includes(r)||t!=null&&s.has(t.graphic)?e.activeTool??=this:e.activeTool=null}})]);let a=e=>{this.addHandles(e.events.on(`grab-changed`,e=>{`georeference`in r&&(e.action===`start`?r.opacity*=.5:e.action===`end`&&(r.opacity*=2))}))};this._dragManipulation.forEachManipulator(a),this._rotateManipulation.forEachManipulator(a),this._scaleManipulations.forEach(e=>e.forEachManipulator(a));let o=new F;o.addToggle(I.preserveAspectRatio,()=>{this.preserveAspectRatio??(this._preserveAspectRatio.enabled=!this._preserveAspectRatio.enabled)}),o.addToggle(I.rotateIncrements,()=>{this.snapRotation??(this._snapRotation.enabled=!this._snapRotation.enabled)}),o.add(I.toggleOpacity,()=>{`georeference`in r&&(r.opacity*=this._isOpacityToggled?2:.5,this._isOpacityToggled=!this._isOpacityToggled)}),o.addToggle(I.factorModifier,e=>this._factor=e.type===`key-down`?10:1),o.add(I.scaleUp,()=>this._scale(this._factor)),o.add(I.scaleDown,()=>this._scale(-this._factor)),o.add(I.moveUp,()=>this._move(0,this._factor)),o.add(I.moveDown,()=>this._move(0,-this._factor)),o.add(I.moveLeft,()=>this._move(-this._factor,0)),o.add(I.moveRight,()=>this._move(this._factor,0)),this.addHandles([e.on(`key-down`,t=>{e.activeTool===this&&o.dispatch(e.inputManager,t)}),e.on(`key-up`,t=>{e.activeTool===this&&o.dispatch(e.inputManager,t)})])}async _loadProjectionEngine(){let e=this._graphic.geometry;return S(e.spatialReference,this.view.spatialReference)}_updateDisplayPlaneConrers(e){let{basis1:t,basis2:n,origin:r}=e,i=this._cornerA;h(i,r,t),h(i,i,n);let a=this._cornerB;h(a,r,t),_(a,a,n);let o=this._cornerC;_(o,r,t),_(o,o,n);let s=this._cornerD;_(s,r,t),h(s,s,n)}_getInfo(){return{editGeometryOperations:this._editGeometryOperations,plane:this._plane,displayPlane:this._displayPlane}}_updateGraphics(e,t){e.action===`start`&&(this._sharedUndoStack.push({tool:this,operation:t}),this._sharedRedoStack.length=0),this.updateGraphics()}_scale(e){let t=this._editGeometryOperations,n=t.data.geometry.extent?.width,r=(n+e*this.view.resolution)/n,i=t.scale(this._plane.origin,d,r,r,0,1);this._sharedUndoStack.push({tool:this,operation:i}),this._sharedRedoStack.length=0,this.updateGraphics()}_move(e,t){let n=this._editGeometryOperations.move(e*this.view.resolution,t*this.view.resolution,0,0);this._sharedUndoStack.push({tool:this,operation:n}),this._sharedRedoStack.length=0,this.updateGraphics()}};e([o()],U.prototype,`_plane`,null),e([o()],U.prototype,`_backgroundGraphicGeometry`,null),e([o()],U.prototype,`_rotateGraphicGeometry`,null),e([o()],U.prototype,`_scaleGraphicGeometries`,null),e([o()],U.prototype,`preserveAspectRatio`,void 0),e([o()],U.prototype,`snapRotation`,void 0),e([o({constructOnly:!0,nonNullable:!0})],U.prototype,`target`,void 0),e([o({readOnly:!0})],U.prototype,`type`,void 0),e([o({constructOnly:!0})],U.prototype,`view`,void 0),U=e([s(`esri.views.2d.interactive.editingTools.TransformTool`)],U);export{U as TransformTool};
2
+ import{__decorate as e}from"tslib";import t from"../../../../Graphic.js";import{getContrast as n}from"../../../../core/colorUtils.js";import{rad2deg as r}from"../../../../core/mathUtils.js";import{destroyMaybe as i}from"../../../../core/maybe.js";import{watch as a,initial as o,sync as s}from"../../../../core/reactiveUtils.js";import{px2pt as c}from"../../../../core/screenUtils.js";import{getMetersPerUnitForSR as l}from"../../../../core/units.js";import{property as u,subclass as d}from"../../../../core/accessorSupport/decorators.js";import{subtract as f,normalize as p}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as m,UNIT_X as h}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{scale as g,length as _,add as v,normalize as y,lerp as b,subtract as x}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as S}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import C from"../../../../geometry/Point.js";import w from"../../../../geometry/Polygon.js";import T from"../../../../geometry/Polyline.js";import{project as E,initializeProjection as D}from"../../../../geometry/projectionUtils.js";import{create as O,copy as k}from"../../../../geometry/support/boundedPlane.js";import{equals as A}from"../../../../geometry/support/spatialReferenceUtils.js";import j from"../../../../layers/GraphicsLayer.js";import M from"../../../../symbols/CIMSymbol.js";import N from"../../../../symbols/SimpleFillSymbol.js";import P from"../../../../symbols/SimpleLineSymbol.js";import F from"../../../../symbols/SimpleMarkerSymbol.js";import{getCIMSymbolRotation as I,applyCIMSymbolRotation as L}from"../../../../symbols/support/cimSymbolUtils.js";import{DragManipulation as R}from"./manipulations/DragManipulation.js";import{RotateManipulation as z}from"./manipulations/RotateManipulation.js";import{ScaleManipulation as B}from"./manipulations/ScaleManipulation.js";import{PreserveAspectRatio as V,SnapRotation as H}from"./manipulations/utils.js";import{InteractiveToolBase as U}from"../../../interactive/InteractiveToolBase.js";import{KeyBindings as W,mediaKeys as G}from"../../../interactive/keybindings.js";import{EditGeometry as K}from"../../../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as q}from"../../../interactive/editGeometry/EditGeometryOperations.js";import{calculateOrientedBounds as J}from"../../../interactive/editGeometry/support/editPlaneUtils.js";import{findFirstGraphicHit as Y}from"../../../support/hitTestSelectUtils.js";import{createScreenPointFromEvent as X}from"../../../support/screenUtils.js";const Z=[[1,1],[1,-1],[-1,-1],[-1,1],[1,0],[0,-1],[-1,0],[0,1]];let Q=class extends U{constructor(e){super(e),this._initialControlPoints=null,this._initialGeometry=null,this._graphic=null,this._planeCache=O(),this._displayPlaneCache=O(),this._mainAxisCache=m(),this._rotationHandleCache=S(),this._cornerA=S(),this._cornerB=S(),this._cornerC=S(),this._cornerD=S(),this._avgAB=S(),this._avgBC=S(),this._avgCD=S(),this._avgDA=S(),this._preserveAspectRatio=new V,this._snapRotation=new H,this._graphicsLayer=new j({internal:!0,listMode:`hide`,visible:!1,title:`TransformTool layer`}),this._sharedUndoStack=[],this._sharedRedoStack=[],this._isOpacityToggled=!1,this._factor=1,this.preserveAspectRatio=null,this.snapRotation=null,this.type=`transform`}initialize(){this._initialize()}destroy(){let{map:e}=this.view;this._dragManipulation.destroy(),this._rotateManipulation.destroy(),this._scaleManipulations.forEach(e=>e.destroy()),this._editGeometryOperations.destroy(),e.removeMany([this._graphicsLayer]),this._graphicsLayer.removeAll(),this._graphicsLayer=i(this._graphicsLayer),this._initialControlPoints=null,this._initialGeometry=null,this._graphic=null,this._preserveAspectRatio=null,this._snapRotation=null,this._planeCache=null,this._displayPlaneCache=null,this._rotationHandleCache=null,this._mainAxisCache=null,this._cornerA=null,this._cornerB=null,this._cornerC=null,this._cornerD=null,this._avgAB=null,this._avgBC=null,this._avgCD=null,this._avgDA=null,this._sharedUndoStack=null,this._sharedRedoStack=null}get _backgroundGraphicGeometry(){let e=this._displayPlane;if(!e)return null;let t=this.view.spatialReference;return this._updateDisplayPlaneConrers(e),new w({spatialReference:t,rings:[[this._cornerA,this._cornerB,this._cornerC,this._cornerD,this._cornerA]]})}get _displayPlane(){let e=this._plane;if(!e)return null;let t=this._displayPlaneCache;k(e,t);let n=10*this.view.resolution;return g(t.basis1,t.basis1,1+n/_(t.basis1)),g(t.basis2,t.basis2,1+n/_(t.basis2)),t}get _plane(){let e=this._graphic.geometry;if(e==null)return null;let t=this._editGeometryOperations.data,n=t.parts[0].segments[0],r=f(this._mainAxisCache,n.leftVertex.pos,n.rightVertex.pos);p(r,r);let i=80*this.view.resolution,a=this.view.spatialReference;return A(a,e.spatialReference)&&(i*=l(a)/l(e.spatialReference)),J(r,t,i,this._planeCache)}get _rotateConnectorGeometry(){let e=this._displayPlane;if(!e)return null;let t=v(this._rotationHandleCache,e.origin,e.basis1),n=8*this.view.resolution/_(e.basis1);return new T({spatialReference:this.view.spatialReference,paths:[[[t[0],t[1]],[t[0]+e.basis1[0]*n,t[1]+e.basis1[1]*n]]]})}get _rotateGraphicGeometry(){let e=this._plane;if(!e)return null;let t=this._rotationHandleCache;return y(t,e.basis1),g(t,t,30*this.view.resolution),v(t,t,e.origin),v(t,t,e.basis1),new C({x:t[0],y:t[1],spatialReference:this.view.spatialReference})}get _scaleGraphicGeometries(){let e=this._displayPlane;if(!e)return[];let t=this.view.spatialReference;this._updateDisplayPlaneConrers(e);let{_cornerA:n,_cornerB:r,_cornerC:i,_cornerD:a}=this,o=b(this._avgAB,n,r,.5),s=b(this._avgBC,r,i,.5),c=b(this._avgCD,i,a,.5),l=b(this._avgDA,a,n,.5);return[new C({x:n[0],y:n[1],spatialReference:t}),new C({x:r[0],y:r[1],spatialReference:t}),new C({x:i[0],y:i[1],spatialReference:t}),new C({x:a[0],y:a[1],spatialReference:t}),new C({x:o[0],y:o[1],spatialReference:t}),new C({x:s[0],y:s[1],spatialReference:t}),new C({x:c[0],y:c[1],spatialReference:t}),new C({x:l[0],y:l[1],spatialReference:t})]}canUndo(){return this._editGeometryOperations.canUndo}canRedo(){return this._editGeometryOperations.canRedo}undo(){this._editGeometryOperations.undo(),this.updateGraphics()}redo(){this._editGeometryOperations.redo(),this.updateGraphics()}refresh(){let{view:e,target:t}=this,n=`georeference`in t?t.georeference.coords:t.geometry,r=this._editGeometryOperations,i=r.data.parts[0].vertices,a=K.fromGeometry(E(n,e.spatialReference),2).parts[0].vertices;i.forEach((e,t)=>{r.setVertexPosition(e,a[t].pos)}),this.updateGraphics()}reset(){let{target:e}=this;if(`georeference`in e){let t=e.georeference;t.type===`control-points`&&(t.controlPoints=this._initialControlPoints)}else e.geometry=this._initialGeometry;this.refresh(),this._sharedUndoStack.length=0,this._sharedRedoStack.length=0}updateGraphics(){let e=this._editGeometryOperations.data.geometry;if(`georeference`in this.target){let t=this.target.georeference;t.coords=e}this._graphic.geometry=e,this._backgroundGraphic.geometry=this._backgroundGraphicGeometry,this._rotateConnectorGraphic.geometry=this._rotateConnectorGeometry,this._rotateGraphic.geometry=this._rotateGraphicGeometry,this._scaleGraphicGeometries.forEach((e,t)=>{this._scaleGraphics[t].geometry=e}),this._updateSymbolAngles()}setSharedUndoStack(e){this._sharedUndoStack=e}setSharedRedoStack(e){this._sharedRedoStack=e}onActivate(){this.visible=!0}onDeactivate(){this.visible=!1}onShow(){this._graphicsLayer.visible=!0}onHide(){this._graphicsLayer.visible=!1}async _initialize(){let{view:e,target:r}=this;if(`georeference`in r){let e=r.georeference;this._graphic=new t({geometry:e.coords}),this._initialControlPoints=e.type===`control-points`?e.controlPoints:null}else this._graphic=r,this._initialGeometry=r.geometry;e.map.addMany([this._graphicsLayer]),e.focus(),this.visible=!1,this.finishToolCreation(),await this._loadProjectionEngine(),this._editGeometryOperations=q.fromGeometry(E(this._graphic.geometry,e.spatialReference),2),this._backgroundGraphic=new t({geometry:this._backgroundGraphicGeometry}),this._rotateConnectorGraphic=new t({geometry:this._rotateConnectorGeometry}),this._rotateGraphic=new t({geometry:this._rotateGraphicGeometry}),this._scaleGraphics=this._scaleGraphicGeometries.map(e=>new t({geometry:e})),this.addHandles(a(()=>e.effectiveTheme.accentColor,e=>{let t=new P({color:e,width:1});this._backgroundGraphic.symbol=new N({color:`transparent`,outline:{type:`simple-line`,color:e,width:2}}),this._rotateConnectorGraphic.symbol=t,this._rotateGraphic.symbol=$(e),this._scaleGraphics.forEach(r=>{r.symbol=new F({size:6,style:`square`,color:n(e),outline:t})}),this._updateSymbolAngles()},o)),this._graphicsLayer.graphics.addMany([this._backgroundGraphic,this._rotateConnectorGraphic,this._rotateGraphic,...this._scaleGraphics]),this._dragManipulation=new R({tool:this,view:e,graphic:this._graphic}),this._rotateManipulation=new z({tool:this,view:e,graphic:this._rotateGraphic,snapRotation:this._snapRotation}),this._scaleManipulations=this._scaleGraphics.map((t,n)=>new B({tool:this,view:e,graphic:t,direction:Z[n],preserveAspectRatio:this._preserveAspectRatio})),this.addHandles([this._dragManipulation.createDragPipeline(this._getInfo.bind(this),this._updateGraphics.bind(this)),this._rotateManipulation.createDragPipeline(this._getInfo.bind(this),this._updateGraphics.bind(this)),...this._scaleManipulations.map(e=>e.createDragPipeline(this._getInfo.bind(this),this._updateGraphics.bind(this))),a(()=>this.view.scale,()=>this.active?this.updateGraphics():null),a(()=>e.rotation,()=>this._updateSymbolAngles(),s),e.on(`click`,async t=>{if(e.activeTool!=null&&e.activeTool!==this)return;let n=X(t),i=[];e.map.allLayers.forEach(e=>{(e.type===`vector-tile`||e.type===`imagery`)&&i.push(e)});let a=await this.view.hitTest(n,{exclude:i}),o=a.results;if(o.length===0)e.activeTool=null;else{let t=Y(a.results),n=`georeference`in r,i=o.map(e=>e.type===`media`?e.element:null).filter(Boolean),s=new Set([...this._graphicsLayer.graphics,n?null:r].filter(Boolean));n&&i.includes(r)||t!=null&&s.has(t.graphic)?e.activeTool??=this:e.activeTool=null}})]);let i=e=>{this.addHandles(e.events.on(`grab-changed`,e=>{`georeference`in r&&(e.action===`start`?r.opacity*=.5:e.action===`end`&&(r.opacity*=2))}))};this._dragManipulation.forEachManipulator(i),this._rotateManipulation.forEachManipulator(i),this._scaleManipulations.forEach(e=>e.forEachManipulator(i));let c=new W;c.addToggle(G.preserveAspectRatio,()=>{this.preserveAspectRatio??(this._preserveAspectRatio.enabled=!this._preserveAspectRatio.enabled)}),c.addToggle(G.rotateIncrements,()=>{this.snapRotation??(this._snapRotation.enabled=!this._snapRotation.enabled)}),c.add(G.toggleOpacity,()=>{`georeference`in r&&(r.opacity*=this._isOpacityToggled?2:.5,this._isOpacityToggled=!this._isOpacityToggled)}),c.addToggle(G.factorModifier,e=>this._factor=e.type===`key-down`?10:1),c.add(G.scaleUp,()=>this._scale(this._factor)),c.add(G.scaleDown,()=>this._scale(-this._factor)),c.add(G.moveUp,()=>this._move(0,this._factor)),c.add(G.moveDown,()=>this._move(0,-this._factor)),c.add(G.moveLeft,()=>this._move(-this._factor,0)),c.add(G.moveRight,()=>this._move(this._factor,0)),this.addHandles([e.on(`key-down`,t=>{e.activeTool===this&&c.dispatch(e.inputManager,t)}),e.on(`key-up`,t=>{e.activeTool===this&&c.dispatch(e.inputManager,t)})])}async _loadProjectionEngine(){let e=this._graphic.geometry;return D(e.spatialReference,this.view.spatialReference)}_updateDisplayPlaneConrers(e){let{basis1:t,basis2:n,origin:r}=e,i=this._cornerA;v(i,r,t),v(i,i,n);let a=this._cornerB;v(a,r,t),x(a,a,n);let o=this._cornerC;x(o,r,t),x(o,o,n);let s=this._cornerD;x(s,r,t),v(s,s,n)}_getInfo(){return{editGeometryOperations:this._editGeometryOperations,plane:this._plane,displayPlane:this._displayPlane}}_updateGraphics(e,t){e.action===`start`&&(this._sharedUndoStack.push({tool:this,operation:t}),this._sharedRedoStack.length=0),this.updateGraphics()}_scale(e){let t=this._editGeometryOperations,n=t.data.geometry.extent?.width,r=(n+e*this.view.resolution)/n,i=t.scale(this._plane.origin,h,r,r,0,1);this._sharedUndoStack.push({tool:this,operation:i}),this._sharedRedoStack.length=0,this.updateGraphics()}_move(e,t){let n=this._editGeometryOperations.move(e*this.view.resolution,t*this.view.resolution,0,0);this._sharedUndoStack.push({tool:this,operation:n}),this._sharedRedoStack.length=0,this.updateGraphics()}_updateSymbolAngles(){let e=this._plane;if(!e)return;let t=r(Math.atan2(e.basis1[1],e.basis1[0]))+90,n=this._rotateGraphic.symbol;if(n?.type===`cim`&&I(n)!==t){let e=n.clone();L(e,t),this._rotateGraphic.symbol=e}this._scaleGraphics.forEach(e=>{let n=e.symbol;n?.type===`simple-marker`&&(n.angle=this.view.rotation-t)})}};e([u()],Q.prototype,`_backgroundGraphicGeometry`,null),e([u()],Q.prototype,`_plane`,null),e([u()],Q.prototype,`_rotateConnectorGeometry`,null),e([u()],Q.prototype,`_rotateGraphicGeometry`,null),e([u()],Q.prototype,`_scaleGraphicGeometries`,null),e([u()],Q.prototype,`preserveAspectRatio`,void 0),e([u()],Q.prototype,`snapRotation`,void 0),e([u({constructOnly:!0,nonNullable:!0})],Q.prototype,`target`,void 0),e([u({readOnly:!0})],Q.prototype,`type`,void 0),e([u({constructOnly:!0})],Q.prototype,`view`,void 0),Q=e([d(`esri.views.2d.interactive.editingTools.TransformTool`)],Q);function $(e){let t=n(e).toArray(),r=Array.from({length:48},(e,t)=>{let n=-t*Math.PI/24;return[12*Math.cos(n),12*Math.sin(n)]});r.push(r[0]);let i=Array.from({length:25},(e,t)=>{let n=(t/24*1.5+.75)*Math.PI;return[6.5*Math.cos(n),6.5*Math.sin(n)]});return new M({data:{type:`CIMSymbolReference`,symbol:{type:`CIMPointSymbol`,angleAlignment:`Map`,symbolLayers:[{type:`CIMVectorMarker`,enable:!0,size:c(24),anchorPoint:{x:0,y:0},frame:{xmin:-12,ymin:-12,xmax:12,ymax:12},scaleSymbolsProportionally:!0,respectFrame:!0,markerGraphics:[{type:`CIMMarkerGraphic`,geometry:{rings:[r]},symbol:{type:`CIMPolygonSymbol`,symbolLayers:[{type:`CIMSolidFill`,enable:!0,color:e.toArray()}]}},{type:`CIMMarkerGraphic`,geometry:{paths:[i]},symbol:{type:`CIMLineSymbol`,symbolLayers:[{type:`CIMSolidStroke`,enable:!0,width:2,capStyle:`Round`,color:t}]}},{type:`CIMMarkerGraphic`,geometry:{rings:[[[1.5,7.5],[7.5,7.5],[1.5,1.5],[1.5,7.5]]]},symbol:{type:`CIMPolygonSymbol`,symbolLayers:[{type:`CIMSolidFill`,enable:!0,color:t}]}}]}]}}})}export{Q as TransformTool};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../core/Collection.js";import{referenceSetter as n}from"../../../core/collectionUtils.js";import{deprecatedFunction as r}from"../../../core/deprecate.js";import i from"../../../core/Error.js";import"../../../core/has.js";import a from"../../../core/Logger.js";import{watch as o,syncAndInitial as s,sync as c}from"../../../core/reactiveUtils.js";import{property as l,subclass as u}from"../../../core/accessorSupport/decorators.js";import{isInEffectiveScaleRange as d}from"../../../geometry/support/scaleUtils.js";import{isLinkChartView as f}from"../../../linkChart/guards.js";import{Container as p}from"../engine/Container.js";import{ClipMesh as m}from"../engine/webgl/ClipMesh.js";import{maxHighlightGroups as h}from"../engine/webgl/definitions.js";import{HighlightRegistry as g}from"./support/HighlightRegistry.js";import{createOrReuseHighlightGradient as _}from"./support/util.js";import v from"../../layers/support/ClipRect.js";import y from"../../layers/support/GeometryClipArea.js";import b from"../../layers/support/Path.js";import{defaultHighlightName as x}from"../../support/HighlightDefaults.js";import S from"../../support/HighlightOptions.js";const C=t.ofType({key:`type`,base:null,typeMap:{rect:v,path:b,geometry:y}}),w=new(t.ofType(S)),T=v=>{let y=v,b=class extends y{constructor(){super(...arguments),this._clipUpdateId=0,this._highlightRegistry=new g,this.attached=!1,this.clips=new C,this.highlights=null,this.lastUpdateId=-1,this.moving=!1,this.updateRequested=!1,this._visibleAtCurrentScale=!0}initialize(){let e=this.view?.spatialReferenceLocked??!0;this.view?.spatialReference&&e&&!this.spatialReferenceSupported?this.addResolvingPromise(Promise.reject(new i(`layerview:spatial-reference-incompatible`,`The spatial reference of this layer does not meet the requirements of the view`,{layer:this.layer}))):(this.container||=new p,this.container.fadeTransitionEnabled=!0,this.container.visible=!1,this.container.endTransitions(),this.addHandles([o(()=>this.suspended,e=>{this.container&&(this.container.visible=!e)},s),o(()=>this.updateSuspended,e=>{this.view&&!e&&this.updateRequested&&this.view.requestUpdate()},s),o(()=>this.layer?.opacity??1,e=>{this.container&&(this.container.opacity=e)},s),o(()=>this.layer&&`blendMode`in this.layer?this.layer.blendMode:`normal`,e=>{this.container&&(this.container.blendMode=e)},s),o(()=>this.layer&&`effect`in this.layer?this.layer.effect:null,e=>{this.container&&(this.container.effect=e)},s),o(()=>this._effectiveHighlightOptions.items.map(e=>({name:e.name,options:{fillColor:e.color,haloColor:e.haloColor,fillOpacity:e.fillOpacity,haloOpacity:e.haloOpacity,haloWidth:e.haloWidth,haloBlur:e.haloBlur}})),()=>{this.container.highlightGradient=_(this.container.highlightGradient,this._effectiveHighlightOptions.items)},s),o(()=>this._getHighlightFilterGroups(),()=>this._onHighlightChange(),c),o(()=>this.clips.map(e=>e.version),async()=>{let e=++this._clipUpdateId;if(this.container&&this.view?.spatialReference){let t=this.view.featuresTilingScheme,n=await this._updatingHandles.addPromise(Promise.all(this.clips.items.map(e=>m.create(e,t))));if(this.destroyed||e!==this._clipUpdateId){for(let e of n)e?.destroy();return}for(let e of this.container.clips)e.destroy();this.container.clips=n.filter(e=>!!e)}},s),o(()=>({scale:this.view?.scale,scaleRange:this.layer&&`effectiveScaleRange`in this.layer?this.layer.effectiveScaleRange:null}),({scale:e,scaleRange:t})=>{let n=d(t,e);n!==this._visibleAtCurrentScale&&(this._visibleAtCurrentScale=n)},s),o(()=>this.layer?.effectiveVisible,async e=>{this.container.requestDeclutter()})],`constructor`),this.view?.whenLayerView?this.view.whenLayerView(this.layer).then(e=>{e===this&&this.processAttach()},()=>{}):this.when().then(()=>{this.processAttach()},()=>{}))}destroy(){this.processDetach(),this.updateRequested=!1;for(let e of this.container?.clips??[])e.destroy()}get highlightOptions(){return this._logHighlightOptionsDeprecation(),this.highlights?.find(({name:e})=>e===x)}set highlightOptions(e){if(this._logHighlightOptionsDeprecation(),!this.highlights){if(!e)return;this.highlights=new t([new S])}let n=this.highlights.find(({name:e})=>e===x);e?n?.assignFrom(e):(this.highlights.remove(n),this.highlights.length===0&&(this.highlights=null))}_logHighlightOptionsDeprecation(){r(a.getLogger(this),"`LayerView.highlightOptions` is deprecated in favor of View.highlights",{replacement:`View.highlights`,version:`4.34`,see:`https://arcg.is/inbTa1#highlights`,warnOnce:!0})}get hasHighlight(){return this._highlightRegistry.size>0}get _effectiveHighlightOptions(){if(!this.view)return w;if(!this.highlights)return this.view.highlights;let e=this.view.highlights.clone();for(let t of this.highlights){let n=e.find(e=>e.name===t.name);n&&n.assignFrom(t)}return e}get highlightIds(){return this._highlightRegistry.highlightIds}get scheduler(){return this.view.scheduler}get spatialReferenceSupported(){let e=this.view?.spatialReference;return e==null||this.supportsSpatialReference(e)}get updating(){return this.spatialReferenceSupported?this.attached?this.suspended?!1:this.updateRequested||this.isUpdating()||this._updatingHandles?.updating||this.container.transitioning:!0:!1}get visibleAtCurrentScale(){return this._visibleAtCurrentScale}processAttach(){this.isResolved()&&!this.attached&&!this.destroyed&&this.spatialReferenceSupported&&(this.attach(),this.attached=!0,this.requestUpdate())}processDetach(){this.attached&&(this.attached=!1,this.removeHandles(`attach`),this.detach(),this.updateRequested=!1)}requestUpdate(){this.destroyed||this.updateRequested||(this.updateRequested=!0,this.updateSuspended||this.view.requestUpdate())}processUpdate(e){this.isFulfilled()&&!this.isResolved()?this.updateRequested=!1:(this._set(`updateParameters`,e),this.updateRequested&&!this.updateSuspended&&(this.updateRequested=!1,this.update(e)))}hitTest(e,t,n){return Promise.resolve(null)}supportsSpatialReference(e){return!0}canResume(){if(!this.spatialReferenceSupported)return!1;switch(this.layer?.type){case`link-chart`:case`knowledge-graph-sublayer`:case`graphics`:break;default:if(f(this.view)&&!this.view.inGeographicLayout)return!1}return super.canResume()?this.visibleAtCurrentScale:!1}getSuspendInfo(){let e=super.getSuspendInfo(),t=!this.spatialReferenceSupported;return t&&(e.spatialReferenceNotSupported=t),e}addAttachHandles(e){this.addHandles(e,`attach`)}_addHighlightFilter(e,t){return this._highlightRegistry.register(t,e)}_removeHighlight(e){this._highlightRegistry.unregister(e)}_onHighlightChange(){}_getHighlightFilterGroups(){let e=[];for(let{name:t,filters:n}of this._highlightRegistry.highlightGroups){let r=this._effectiveHighlightOptions.findIndex(e=>e.name===t);r<0||r>=h||e.push({order:r,filters:n})}return e}};return e([l()],b.prototype,`attached`,void 0),e([l({type:C,set(e){let t=n(e,this._get(`clips`),C);this._set(`clips`,t)}})],b.prototype,`clips`,void 0),e([l()],b.prototype,`container`,void 0),e([l({type:S})],b.prototype,`highlightOptions`,null),e([l({type:t.ofType(S)})],b.prototype,`highlights`,void 0),e([l()],b.prototype,`_effectiveHighlightOptions`,null),e([l()],b.prototype,`moving`,void 0),e([l({readOnly:!0})],b.prototype,`spatialReferenceSupported`,null),e([l({readOnly:!0})],b.prototype,`updateParameters`,void 0),e([l()],b.prototype,`updateRequested`,void 0),e([l()],b.prototype,`updating`,null),e([l()],b.prototype,`view`,void 0),e([l()],b.prototype,`_visibleAtCurrentScale`,void 0),e([l({readOnly:!0})],b.prototype,`visibleAtCurrentScale`,null),b=e([u(`esri.views.2d.layers.LayerView2D`)],b),b};export{T as LayerView2D};
2
+ import{__decorate as e}from"tslib";import t from"../../../core/Collection.js";import{referenceSetter as n}from"../../../core/collectionUtils.js";import r from"../../../core/Error.js";import"../../../core/has.js";import{watch as i,syncAndInitial as a,sync as o}from"../../../core/reactiveUtils.js";import{property as s,subclass as c}from"../../../core/accessorSupport/decorators.js";import{isInEffectiveScaleRange as l}from"../../../geometry/support/scaleUtils.js";import{isLinkChartView as u}from"../../../linkChart/guards.js";import{Container as d}from"../engine/Container.js";import{ClipMesh as f}from"../engine/webgl/ClipMesh.js";import{maxHighlightGroups as p}from"../engine/webgl/definitions.js";import{HighlightRegistry as m}from"./support/HighlightRegistry.js";import{createOrReuseHighlightGradient as h}from"./support/util.js";import g from"../../layers/support/ClipRect.js";import _ from"../../layers/support/GeometryClipArea.js";import v from"../../layers/support/Path.js";import y from"../../support/HighlightOptions.js";const b=t.ofType({key:`type`,base:null,typeMap:{rect:g,path:v,geometry:_}}),x=new(t.ofType(y)),S=g=>{let _=g,v=class extends _{constructor(){super(...arguments),this._clipUpdateId=0,this._highlightRegistry=new m,this.attached=!1,this.clips=new b,this.highlights=null,this.lastUpdateId=-1,this.moving=!1,this.updateRequested=!1,this._visibleAtCurrentScale=!0}initialize(){let e=this.view?.spatialReferenceLocked??!0;this.view?.spatialReference&&e&&!this.spatialReferenceSupported?this.addResolvingPromise(Promise.reject(new r(`layerview:spatial-reference-incompatible`,`The spatial reference of this layer does not meet the requirements of the view`,{layer:this.layer}))):(this.container||=new d,this.container.fadeTransitionEnabled=!0,this.container.visible=!1,this.container.endTransitions(),this.addHandles([i(()=>this.suspended,e=>{this.container&&(this.container.visible=!e)},a),i(()=>this.updateSuspended,e=>{this.view&&!e&&this.updateRequested&&this.view.requestUpdate()},a),i(()=>this.layer?.opacity??1,e=>{this.container&&(this.container.opacity=e)},a),i(()=>this.layer&&`blendMode`in this.layer?this.layer.blendMode:`normal`,e=>{this.container&&(this.container.blendMode=e)},a),i(()=>this.layer&&`effect`in this.layer?this.layer.effect:null,e=>{this.container&&(this.container.effect=e)},a),i(()=>this._effectiveHighlightOptions.items.map(e=>({name:e.name,options:{fillColor:e.color,haloColor:e.haloColor,fillOpacity:e.fillOpacity,haloOpacity:e.haloOpacity,haloWidth:e.haloWidth,haloBlur:e.haloBlur}})),()=>{this.container.highlightGradient=h(this.container.highlightGradient,this._effectiveHighlightOptions.items)},a),i(()=>this._getHighlightFilterGroups(),()=>this._onHighlightChange(),o),i(()=>this.clips.map(e=>e.version),async()=>{let e=++this._clipUpdateId;if(this.container&&this.view?.spatialReference){let t=this.view.featuresTilingScheme,n=await this._updatingHandles.addPromise(Promise.all(this.clips.items.map(e=>f.create(e,t))));if(this.destroyed||e!==this._clipUpdateId){for(let e of n)e?.destroy();return}for(let e of this.container.clips)e.destroy();this.container.clips=n.filter(e=>!!e)}},a),i(()=>({scale:this.view?.scale,scaleRange:this.layer&&`effectiveScaleRange`in this.layer?this.layer.effectiveScaleRange:null}),({scale:e,scaleRange:t})=>{let n=l(t,e);n!==this._visibleAtCurrentScale&&(this._visibleAtCurrentScale=n)},a),i(()=>this.layer?.effectiveVisible,async e=>{this.container.requestDeclutter()})],`constructor`),this.view?.whenLayerView?this.view.whenLayerView(this.layer).then(e=>{e===this&&this.processAttach()},()=>{}):this.when().then(()=>{this.processAttach()},()=>{}))}destroy(){this.processDetach(),this.updateRequested=!1;for(let e of this.container?.clips??[])e.destroy()}get hasHighlight(){return this._highlightRegistry.size>0}get _effectiveHighlightOptions(){if(!this.view)return x;if(!this.highlights)return this.view.highlights;let e=this.view.highlights.clone();for(let t of this.highlights){let n=e.find(e=>e.name===t.name);n&&n.assignFrom(t)}return e}get highlightIds(){return this._highlightRegistry.highlightIds}get scheduler(){return this.view.scheduler}get spatialReferenceSupported(){let e=this.view?.spatialReference;return e==null||this.supportsSpatialReference(e)}get updating(){return this.spatialReferenceSupported?this.attached?this.suspended?!1:this.updateRequested||this.isUpdating()||this._updatingHandles?.updating||this.container.transitioning:!0:!1}get visibleAtCurrentScale(){return this._visibleAtCurrentScale}processAttach(){this.isResolved()&&!this.attached&&!this.destroyed&&this.spatialReferenceSupported&&(this.attach(),this.attached=!0,this.requestUpdate())}processDetach(){this.attached&&(this.attached=!1,this.removeHandles(`attach`),this.detach(),this.updateRequested=!1)}requestUpdate(){this.destroyed||this.updateRequested||(this.updateRequested=!0,this.updateSuspended||this.view.requestUpdate())}processUpdate(e){this.isFulfilled()&&!this.isResolved()?this.updateRequested=!1:(this._set(`updateParameters`,e),this.updateRequested&&!this.updateSuspended&&(this.updateRequested=!1,this.update(e)))}hitTest(e,t,n){return Promise.resolve(null)}supportsSpatialReference(e){return!0}canResume(){if(!this.spatialReferenceSupported)return!1;switch(this.layer?.type){case`link-chart`:case`knowledge-graph-sublayer`:case`graphics`:break;default:if(u(this.view)&&!this.view.inGeographicLayout)return!1}return super.canResume()?this.visibleAtCurrentScale:!1}getSuspendInfo(){let e=super.getSuspendInfo(),t=!this.spatialReferenceSupported;return t&&(e.spatialReferenceNotSupported=t),e}addAttachHandles(e){this.addHandles(e,`attach`)}_addHighlightFilter(e,t){return this._highlightRegistry.register(t,e)}_removeHighlight(e){this._highlightRegistry.unregister(e)}_onHighlightChange(){}_getHighlightFilterGroups(){let e=[];for(let{name:t,filters:n}of this._highlightRegistry.highlightGroups){let r=this._effectiveHighlightOptions.findIndex(e=>e.name===t);r<0||r>=p||e.push({order:r,filters:n})}return e}};return e([s()],v.prototype,`attached`,void 0),e([s({type:b,set(e){let t=n(e,this._get(`clips`),b);this._set(`clips`,t)}})],v.prototype,`clips`,void 0),e([s()],v.prototype,`container`,void 0),e([s({type:t.ofType(y)})],v.prototype,`highlights`,void 0),e([s()],v.prototype,`_effectiveHighlightOptions`,null),e([s()],v.prototype,`moving`,void 0),e([s({readOnly:!0})],v.prototype,`spatialReferenceSupported`,null),e([s({readOnly:!0})],v.prototype,`updateParameters`,void 0),e([s()],v.prototype,`updateRequested`,void 0),e([s()],v.prototype,`updating`,null),e([s()],v.prototype,`view`,void 0),e([s()],v.prototype,`_visibleAtCurrentScale`,void 0),e([s({readOnly:!0})],v.prototype,`visibleAtCurrentScale`,null),v=e([c(`esri.views.2d.layers.LayerView2D`)],v),v};export{S as LayerView2D};
@@ -96,4 +96,5 @@ export default class SunLighting extends SunLightingSuperclass {
96
96
  /** Indicates that the light source is simulated position of the sun. */
97
97
  get type(): "sun";
98
98
  }
99
- declare const SunLightingSuperclass: typeof WebSceneSunLighting & typeof EventedMixin
99
+ declare const SunLightingSuperclass: typeof WebSceneSunLighting & typeof EventedMixin
100
+ export {};
@@ -77,4 +77,5 @@ export default class VirtualLighting extends VirtualLightingSuperclass {
77
77
  */
78
78
  get type(): "virtual";
79
79
  }
80
- declare const VirtualLightingSuperclass: typeof WebSceneVirtualLighting & typeof EventedMixin
80
+ declare const VirtualLightingSuperclass: typeof WebSceneVirtualLighting & typeof EventedMixin
81
+ export {};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../core/Collection.js";import{destroyHandle as n,makeHandle as r}from"../../../core/handleUtils.js";import{watch as i,syncAndInitial as a,initial as o}from"../../../core/reactiveUtils.js";import{property as s,subclass as c}from"../../../core/accessorSupport/decorators.js";import{DynamicLayerView3DMixin as l}from"./DynamicLayerView3D.js";import u from"./ImagerySubView3D.js";import{LayerView3D as d}from"./LayerView3D.js";import{ImageHighlightHelper3D as f}from"./support/ImageHighlightHelper3D.js";import p from"../support/flow/FlowSubViewExtent3D.js";import m from"../../layers/ImageryLayerView.js";import{RefreshableLayerView as h}from"../../layers/RefreshableLayerView.js";import{isPixelHighlightTarget as g}from"../../layers/support/highlightUtils.js";let _=class extends l(h(d(m))){constructor(){super(...arguments),this.type=`imagery-3d`}get highlightOptions(){return null}get pixelData(){return null}initialize(){let e=()=>this._updatingHandles.addPromise(this.refreshDebounced());this._updatingHandles.add(()=>this.layer?.exportImageServiceParameters?.version,e),this._updatingHandles.add(()=>this.layer?.renderer,e),this._updatingHandles.add(()=>this.timeExtent,e),this._highlightHelper=new f({view:this.view,layer:this.layer,updatingHandles:this._updatingHandles}),this.addHandles([n(this._highlightHelper),i(()=>this.suspended,e=>this._highlightHelper.suspended=e,a)])}_initSubView(){this.addHandles([i(()=>this.layer.renderer,e=>this._recreateSubView(e),o)])}_recreateSubView(e){let t=e?.type===`flow`,n=this.subView?.type===`flow`,r=this.subView;r&&t===n||(this.subView=t?new p({layerView:this}):new u({layerView:this}),r?.destroy())}getFetchOptions(){return{timeExtent:this.timeExtent}}highlight(e,n){if(typeof e==`number`||typeof e==`string`||g(e))return r();if(Array.isArray(e)||t.isCollection(e)){let t=e.at(0);if(t==null||typeof t==`number`||typeof t==`string`)return r()}return this._highlightHelper.highlight(e,n)}isUpdating(){return super.isUpdating()||this._highlightHelper.updating}};e([s()],_.prototype,`highlightOptions`,null),e([s()],_.prototype,`pixelData`,null),_=e([c(`esri.views.3d.layers.ImageryLayerView3D`)],_);const v=_;export{v as default};
2
+ import{__decorate as e}from"tslib";import t from"../../../core/Collection.js";import{destroyHandle as n,makeHandle as r}from"../../../core/handleUtils.js";import{watch as i,syncAndInitial as a,initial as o}from"../../../core/reactiveUtils.js";import{property as s,subclass as c}from"../../../core/accessorSupport/decorators.js";import{DynamicLayerView3DMixin as l}from"./DynamicLayerView3D.js";import u from"./ImagerySubView3D.js";import{LayerView3D as d}from"./LayerView3D.js";import{ImageHighlightHelper3D as f}from"./support/ImageHighlightHelper3D.js";import p from"../support/flow/FlowSubViewExtent3D.js";import m from"../../layers/ImageryLayerView.js";import{RefreshableLayerView as h}from"../../layers/RefreshableLayerView.js";import{isPixelHighlightTarget as g}from"../../layers/support/highlightUtils.js";let _=class extends l(h(d(m))){constructor(){super(...arguments),this.type=`imagery-3d`}get pixelData(){return null}initialize(){let e=()=>this._updatingHandles.addPromise(this.refreshDebounced());this._updatingHandles.add(()=>this.layer?.exportImageServiceParameters?.version,e),this._updatingHandles.add(()=>this.layer?.renderer,e),this._updatingHandles.add(()=>this.timeExtent,e),this._highlightHelper=new f({view:this.view,layer:this.layer,updatingHandles:this._updatingHandles}),this.addHandles([n(this._highlightHelper),i(()=>this.suspended,e=>this._highlightHelper.suspended=e,a)])}_initSubView(){this.addHandles([i(()=>this.layer.renderer,e=>this._recreateSubView(e),o)])}_recreateSubView(e){let t=e?.type===`flow`,n=this.subView?.type===`flow`,r=this.subView;r&&t===n||(this.subView=t?new p({layerView:this}):new u({layerView:this}),r?.destroy())}getFetchOptions(){return{timeExtent:this.timeExtent}}highlight(e,n){if(typeof e==`number`||typeof e==`string`||g(e))return r();if(Array.isArray(e)||t.isCollection(e)){let t=e.at(0);if(t==null||typeof t==`number`||typeof t==`string`)return r()}return this._highlightHelper.highlight(e,n)}isUpdating(){return super.isUpdating()||this._highlightHelper.updating}};e([s()],_.prototype,`pixelData`,null),_=e([c(`esri.views.3d.layers.ImageryLayerView3D`)],_);const v=_;export{v as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import"../../../../core/has.js";import{normalize as e,add as t,scale as n,length as r,set as i,equals as a,subtract as o,dot as s,len as c,sqrDist as l,copy as u,sub as d,scaleAndAdd as f,distance as p,squaredLength as m,squaredDistance as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as _}from"../../../../geometry/ellipsoidUtils.js";import v from"../../../../geometry/Point.js";import y from"../../../../geometry/SpatialReference.js";import{getSphericalPCPF as b}from"../../../../geometry/spatialReferenceEllipsoidUtils.js";import{projectBoundingRect as ee}from"../../../../geometry/projection/projectBoundingRect.js";import{projectBoundingSphere as te}from"../../../../geometry/projection/projectBoundingSphere.js";import{getProjector as ne}from"../../../../geometry/projection/projectors.js";import{create as re,fromValues as x}from"../../../../geometry/support/aaBoundingRect.js";import{create as ie,fromPoints as S,distance2 as ae}from"../../../../geometry/support/lineSegment.js";import{signedDistance as C,getNormal as w}from"../../../../geometry/support/plane.js";import{isPlateCarree as oe,webMercatorValid as se}from"../../../../geometry/support/spatialReferenceUtils.js";import{Sphere as T}from"../../../../geometry/support/sphere.js";import{evaluateElevationAlignmentAtPoint as E}from"../graphics/elevationAlignmentUtils.js";import{ElevationContext as ce}from"../graphics/ElevationContext.js";import{createContextWithoutExpressionSupport as le,extractExpressionInfo as ue}from"../graphics/featureExpressionInfoUtils.js";import{intersectBoundingRectWithMbs as D}from"./I3SUtil.js";import{Frustum as de}from"../../state/Frustum.js";import{groundNavigationConstants as fe}from"../../state/utils/groundNavigationUtils.js";import"../../support/elevationUpdateExtentUtils.js";import{Obb as O,computeOffsetObb as pe}from"../../support/orientedBoundingBox.js";import{SweptSphereCylindricalVolume as me,SphereGlobal as he,SweptSphereConicalVolume as k}from"../../support/SweptSphereVolume.js";import{sphereToGeographicExtent as A,intersectsGeographicExtent as j}from"../../support/sphereExtentUtils.js";const M=1e5;class N{get _frustumPlanes(){return this._frustum.planes}constructor(e,t,n,r,i,a,o,s,c={}){this._indexSR=e,this._renderCoordsHelper=t,this._clippingArea=i,this._elevationProvider=a,this._viewingMode=o,this._options=c,this._viewDirection=g(),this._useFrustumCulling=!1,this._poi=g(),this._cameraPOIDirection=g(),this._elevationContext=null,this._checkBelowSegmentEnd=g(),this.minCenterDistance=1/0,this.maxCenterDistance=0,this.maxLodLevel=2,this._screenspaceErrorBias=c.screenspaceErrorBias||1,this._progressiveLoadFactor=c.progressiveLoadFactor||1,this._frustum=new de(t),this.updateCamera(n,r);let l=this._renderCoordsHelper.spatialReference;this._renderSR=l,this._renderSRSphericalPCPF=b(l),this._isGlobalMode=this._viewingMode===1,this.elevationIntersectionSpatialReference=this._isGlobalMode?this._indexSR.isWebMercator?this._indexSR:this._elevationProvider.spatialReference:l,this.updateElevationInfo(s),this._isECEFOBBInLocalMode=this._indexSR.isWGS84&&(l.isWebMercator||oe(l)),this._indexSREllipsoidRadius=_(this._indexSR).radius,this._indexSRSphericalPCPF=b(e),this._projectorIndexSRToIndexSRSphericalPCPF=ne(this._indexSR,this._indexSRSphericalPCPF),this._groundNavigationCheckDistance=fe.i3sNodeDownwardCheckDistanceInMeters/this._renderCoordsHelper.unitInMeters}updateElevationInfo(e){e==null?this._elevationContext=null:(this._elevationContext=ce.fromElevationInfo(e),this._elevationContext.setFeatureExpressionInfoContext(le(ue(e,!1))))}updateCamera(r,i){this._useFrustumCulling=i,e(this._viewDirection,r.viewForward),i&&this._frustum.update(r),this._halfScreenPixelSizePerDistance=r.screenPixelSizePerDistance/2,this._camPos=r.eye,this._updateCameraPOIDirection(),this.minCenterDistance=1/0,this.maxCenterDistance=0,t(this._checkBelowSegmentEnd,this._camPos,n(this._checkBelowSegmentEnd,this._renderCoordsHelper.worldUpAtPosition(this._camPos,this._checkBelowSegmentEnd),-this._groundNavigationCheckDistance))}setPointOfInterest(e){this._poi=e,this._updateCameraPOIDirection()}updateScreenSpaceErrorBias(e){let t=this._screenspaceErrorBias;return this._screenspaceErrorBias=e,t}updateClippingArea(e){this._clippingArea=e}expandElevationRange(e,t,n){if(this._elevationContext==null)return;let r=e.serviceMbsInIndexSR;if(!r)return;let i=this._elevationContext.mode===`relative-to-scene`?`scene`:`ground`,a=this._elevationProvider;if(a.getSphereElevationRange){let e=a.getSphereElevationRange(r,this._indexSR,i);if(e){n.expandElevationRange(e);return}}let[o,s,c]=r.center,l=a.getElevation(o,s,c,this._indexSR,i);l&&n.expandElevationRangeValues(l,l);let u=t?null:a.getRootElevationRange?.();u&&n.expandElevationRange(u)}calculateServiceMbsInRenderSR(e){let{serviceMbsInRenderSR:t}=e;if(t.isValid)return t;let{serviceMbsInIndexSR:n}=e;if(!n?.isValid)return t;let r=G;return te(n,this._indexSR,r,this._renderSR),e.updateServiceMbsInRenderSR(r)}intersectsElevationUpdate(e,t){if(this._isGlobalMode&&this._indexSR.isWebMercator){let n=t.serviceMbsInIndexSR;if(!n?.isValid)return!0;let[r,i]=se,a=i-r,o=e[2]-e[0]>=a,s=o?0:Math.round((n.center[0]-(e[0]+e[2])/2)/a)*a;return x(o?-1/0:e[0]+s,e[1],o?1/0:e[2]+s,e[3],K),D(K,n)!==0}let n=this.calculateServiceMbsInRenderSR(t);if(!n.isValid)return!0;if(!this._isGlobalMode)return D(e,n)!==0;let r=t.serviceMbsElevationUpdateExtent;return r[0]>r[2]&&(A(n,r),this.elevationIntersectionSpatialReference.isWebMercator&&Number.isFinite(r[0])&&(r[1]=Math.max(-90,r[1]),r[3]=Math.min(90,r[3]),ee(r,y.WGS84,r,this.elevationIntersectionSpatialReference)||x(-1/0,-1/0,1/0,1/0,r))),j(e,r,this.elevationIntersectionSpatialReference)}_evaluateElevationAlignmentInIndexSR(e,t){return B.x=e[0],B.y=e[1],B.z=e[2],B.spatialReference=this._indexSR,E(B,this._elevationProvider,t,this._renderCoordsHelper)}calculateServiceMbsInRenderSRElevationAdjusted(e){let{serviceMbsInRenderSRElevationAdjusted:t}=e;if(t.isValid)return t;let{serviceMbsInIndexSR:n}=e,r=this.calculateServiceMbsInRenderSR(e);if(!r.isValid||!n?.isValid)return t;let i=G;i.copyFrom(r);let{_elevationContext:a}=this;if(a){let{minElevation:t}=e,{_renderCoordsHelper:r}=this,o=n.center,s=0;if(Number.isFinite(t)){let n=0,c=0,{maxElevation:l}=e,u=o[2];switch(a.mode){case`relative-to-ground`:case`relative-to-scene`:n=a.geometryZWithOffset(u,r)+t-u,c=l-t;break;case`on-the-ground`:n=t-u,c=l-t}s=n+.5*c,i.radius+=.5*c}else i.radius<M&&(s=this._evaluateElevationAlignmentInIndexSR(o,a)-o[2]);s&&ye(i,s,this._viewingMode)}return e.updateServiceMbsInRenderSRElevationAdjusted(i)}_isGlobalMbsContainingPlanetCenter(e){return this._viewingMode===1&&r(e.center)<=e.radius}calculateMbsConeInRenderSR(e){let{mbsConeInRenderSR:t}=e;if(t)return t;if(!e.elevationRangeValid)return null;let{minElevation:n,maxElevation:r}=e;if(!Number.isFinite(n)||!(n<r))return null;let i=this.calculateServiceMbsInRenderSR(e);if(!i.isValid)return null;let a=this._elevationContext;if(a?.mode===`relative-to-ground`||a?.mode===`relative-to-scene`){let t=e.serviceMbsInIndexSR;if(!t?.isValid)return null;let i=t.center[2],o=a.geometryZWithOffset(i,this._renderCoordsHelper);if(this._viewingMode===2)n+=o,r+=o;else{let e=o-i;n+=e,r+=e}}let o=this._renderCoordsHelper.referenceEllipsoid.radius,s=this._viewingMode===2?new me(i,n,r):this._isGlobalMbsContainingPlanetCenter(i)?new he(i,o+n,o+r):new k(i,o+n,o+r);return e.updateMbsConeInRenderSR(s)}getAndUpdateVisibilityObbInRenderSR(e){{let t=e.visibilityObbInRenderSR;if(t)return t}let t=this._indexSREllipsoidRadius*.01,{serviceMbsInIndexSR:n,serviceObbInIndexSR:r}=e;if(r==null||!n||!r.isValid||this._isECEFOBBInLocalMode&&(r.halfSizeX>t||r.halfSizeY>t||r.halfSizeZ>t))return null;{let t=e.serviceObbInRenderSR;if(t==null)t=new O,e.serviceObbInRenderSR=t;else if(t.isValid)return t;let a=n.radius,o=0,s=0,c=r.centerZ,l=this._renderCoordsHelper,u=this._elevationContext;if(u&&e.elevationRangeValid){let{minElevation:t,maxElevation:n}=e;switch(u.mode){case`relative-to-ground`:case`relative-to-scene`:o=u.geometryZWithOffset(c,l)+t-c,s=n-t;break;case`on-the-ground`:o=t-c,s=n-t}}else if(u&&a<M){let e=i(z,r.centerX,r.centerY,c);o=this._evaluateElevationAlignmentInIndexSR(e,u)-c}let d=s>0,f=d?R:t;return r.transform(f,this._indexSR,this._renderSR,o,this._renderSRSphericalPCPF,this._indexSRSphericalPCPF,this._projectorIndexSRToIndexSRSphericalPCPF),d&&pe(f,0,s,this._viewingMode,t),t}}getNodeObbInRenderSRIndependentOfElevationOffset(e){{let t=e.visibilityObbInRenderSR??e.serviceObbInRenderSR??null;if(t?.isValid)return t}let t=e.serviceObbInIndexSR;return t?this._viewingMode===2&&Math.max(t.halfSizeX,t.halfSizeY,t.halfSizeZ)>.2*this._indexSREllipsoidRadius?null:(t.transform(R,this._indexSR,this._renderSR,void 0,this._renderSRSphericalPCPF,this._indexSRSphericalPCPF,this._projectorIndexSRToIndexSRSphericalPCPF),R):null}ensureElevationAgnosticBoundingVolume(e){return!e.elevationAgnosticBoundingVolume.valid&&e.level>0&&(this._viewingMode===1?this._updateElevationAgnosticBoundingVolumeGlobal(e):this._updateElevationAgnosticBoundingVolumeLocal(e)),e.elevationAgnosticBoundingVolume}_updateCameraPOIDirection(){a(this._poi,this._camPos)?this._cameraPOIDirection=this._viewDirection:(o(this._cameraPOIDirection,this._camPos,this._poi),e(this._cameraPOIDirection,this._cameraPOIDirection))}_updateElevationAgnosticBoundingVolumeGlobal(t){let n=this.getNodeObbInRenderSRIndependentOfElevationOffset(t),r=t.elevationAgnosticBoundingVolume,i=-1,a;if(n){let t=z;n.getCenter(t),e(t,t),a=t,n.getCorners(V);for(let n of V){e(n,n);let a=s(n,t);if(a<=0){r.invalidate();return}let o=Math.sqrt(Math.max(0,1-a*a));i=Math.max(i,o)}}else{let n=t.serviceMbsInRenderSR;if(!n.isValid){r.invalidate();return}let{center:o,radius:s}=n,l=c(o);if(l<s){r.invalidate();return}i=s/l,a=e(W,o)}r.set(a,i+we)}_updateElevationAgnosticBoundingVolumeLocal(e){let t=e.elevationAgnosticBoundingVolume,n=this.getNodeObbInRenderSRIndependentOfElevationOffset(e);if(n){let e=n.getCenter(z);e[2]=0;let r=0,i=H;n.getCorners(V);for(let e of V){e[2]=0;let t=l(i,e);r=Math.max(r,t)}t.set(e,Math.sqrt(r))}else{let n=e.serviceMbsInRenderSR;if(n.isValid){let e=u(z,n.center);e[2]=0,t.set(e,n.radius)}}}isNodeVisible(e,t=!1){if(!this._isMBSinClippingArea(this.calculateServiceMbsInRenderSR(e)))return!1;if(!this._useFrustumCulling||t&&this.isNodeCloseBelowCamera(e))return!0;let n=this.getAndUpdateVisibilityObbInRenderSR(e);return n?n.intersectsFrustumConservativeApproximation(this._frustumPlanes):this._frustum.intersectsSphere(this.calculateServiceMbsInRenderSRElevationAdjusted(e))}isNodeCloseBelowCamera(e){let t=this.getAndUpdateVisibilityObbInRenderSR(e);if(t?.isValid)return t.intersectSegment(this._camPos,this._checkBelowSegmentEnd);let n=this.calculateServiceMbsInRenderSRElevationAdjusted(e);if(!n.isValid)return!0;let r=S(this._camPos,this._checkBelowSegmentEnd,ge);return ae(r,n.center)<=n.radius**2}isElevationAgnosticBoundingVolumeVisible(e,t){return!this._useFrustumCulling||!e.valid?!0:e.intersectsFrustumConservative(this._frustum,this._viewingMode,1+t)?this._viewingMode!==1||this._isConeVisibleInFrustum(e):!1}_isConeVisibleInFrustum(t){let r=t.radius;if(r>Se)return!0;let i=this._frustumPlanes,{center:a,radius:o}=this._frustum.boundingSphere,c=t.getAxis(W),l=s(c,a),u=o+1,p=l-u,m=l+u;if(p<=0)return!0;let h=n(F,c,p),g=n(I,c,m),_=r/Math.sqrt(1-r*r);for(let t of i){let r=w(t),i=e(L,r),a=s(i,c);if(Math.abs(1-a)<Ce)continue;let o=_e;n(o,c,a),d(o,o,i),e(o,o);let l=ve;if(f(l,h,o,p*_),!(C(t,l)<=0)&&(f(l,g,o,m*_),!(C(t,l)<=0)))return!1}return!0}isObbVisibleIndependentOfElevation(e,t){if(!this._useFrustumCulling||!e.valid)return!0;let{center:r,radius:i}=this._frustum.boundingSphere,a=i+1,o=this._frustumPlanes,c=V;if(t.getCorners(c),this._viewingMode===1){let t=e.getAxis(W),i=s(t,r),l=i-a,u=i+a;if(l<=0)return!0;for(let e of o){let r=!0;for(let i of c){let a=s(i,t),o=U;if(n(o,i,l/a),C(e,o)<=0){r=!1;break}let c=U;if(n(c,i,u/a),C(e,c)<=0){r=!1;break}}if(r)return!1}}else{let e=r[2]-a,t=r[2]+a;for(let n of o){let r=!0,i=w(n),a=i[0],o=i[1],s=i[2],l=n[3];for(let n of c){let i=a*n[0]+o*n[1]+l;if(i+s*e<=0||i+s*t<=0){r=!1;break}}if(r)return!1}}return!0}isGeometryVisible(e,t){if(!this._useFrustumCulling)return!0;let n=e.geometryObbInRenderSR;return!n?.isValid||n.intersectsFrustumConservativeApproximation(this._frustumPlanes)||t&&n.intersectSegment(this._camPos,this._checkBelowSegmentEnd)}_isMBSinClippingArea(e){return this._clippingArea==null||D(this._clippingArea,e)!==0}_screenSpaceDiameterMbs(e,t){let n=this.calcCameraDistanceToSurfaceAndUpdateMinmaxWithCenterDistance(e);return n<0?be:t/n/this._halfScreenPixelSizePerDistance}calcCameraDistanceToSurfaceAndUpdateMinmaxWithCenterDistance(e){let t=this.calculateMbsConeInRenderSR(e);if(t==null)return this.calcCameraDistanceToSurfaceAndUpdateMinmaxWithSphere(e);let n=t.calculateSurfaceDistanceFromPoint(this._camPos),r=t.calculateCenterDistanceFromPoint(this._camPos);return this._updateMinMaxDistanceToCenter(r),n}calcCameraDistanceToSurfaceAndUpdateMinmaxWithSphere(e){return this.calcCameraDistanceToCenterAndUpdateMinmax(e)-this.calculateServiceMbsInRenderSRElevationAdjusted(e).radius}calcCameraDistanceToCenterAndUpdateMinmax(e){let t=this.calculateServiceMbsInRenderSRElevationAdjusted(e),n=p(t.center,this._camPos);return this._updateMinMaxDistanceToCenter(n),n}_calculateAngleDependentLoDForSphere(e,t){let n=d(H,e,this._camPos),i=r(e),a=r(n);if(i===0||a===0)return 1;let o=(Math.abs(s(e,n))/i+t)/a;return Math.min(1,o)}calcAngleDependentLoD(e){let t=this.calculateMbsConeInRenderSR(e);if(t==null){let{center:t,radius:n}=this.calculateServiceMbsInRenderSRElevationAdjusted(e);return this._calculateAngleDependentLoDForSphere(t,n)}let{center:i,radius:a}=this.calculateServiceMbsInRenderSR(e);if(this._viewingMode===2)u(q,i),q[2]=t.lowerCenterHeight,u(J,i),J[2]=t.upperCenterHeight;else{let e=r(i);if(e===0)return 1;n(q,i,t.lowerCenterHeight/e),n(J,i,t.upperCenterHeight/e)}let o=this._calculateAngleDependentLoDForSphere(q,a),c=this._calculateAngleDependentLoDForSphere(J,a);if(this._viewingMode===2)u(Y,i),Y[2]=Math.max(t.lowerCenterHeight,Math.min(t.upperCenterHeight,this._camPos[2]));else{let e=r(i);if(e===0)return Math.max(o,c);let a=Math.max(t.lowerCenterHeight,Math.min(t.upperCenterHeight,s(this._camPos,i)/e));n(Y,i,a/e)}return Math.max(o,c,this._calculateAngleDependentLoDForSphere(Y,a))}hasLOD(e){return e.lodMetric!==0}_getDistanceToSurfaceGlobeMode(e,i){let a=r(i.center),c=r(e)-a;n(q,e,s(e,i.center)/m(e));let l=h(i.center,q),u=i.radius;if(l<=u*u)return Math.abs(c);let d=n(q,i.center,1/a),f=u*u/(2*a),g=n(J,d,a-f),_=o(Y,e,g),v=o(Y,_,n(X,d,s(d,_))),y=t(Y,g,n(Y,v,u/r(v))),b=p(e,y);if(c>=Z){let t=o(J,e,y),n=s(t,d)/r(t);n<Q&&(n=$),b/=n}return b}_getDistanceToSurface(e,t){return this._isGlobalMode?this._getDistanceToSurfaceGlobeMode(e,t):P(e,t)}_applyGlobalFlatAngleCorrectionToConeDistance(e,t){t.calculateClosestCenterToPoint(this._camPos,X);let n=r(X);if(n===0||r(this._camPos)-n<Z)return e;let i=o(Y,this._camPos,X),a=r(i);if(a===0)return e;let c=s(i,X)/(a*n);return e/(c<Q?$:c)}calculateScreenSpaceRelativeSphere(e){let t=this.calculateServiceMbsInRenderSRElevationAdjusted(e),n=this._getDistanceToSurface(this._camPos,t),r=n+t.radius;return this._updateMinMaxDistanceToCenter(r),2*n*this._halfScreenPixelSizePerDistance}calculateScreenSpaceRelativeCone(e){let t=e.calculateCenterDistanceFromPoint(this._camPos);this._updateMinMaxDistanceToCenter(t);let n=e.calculateSurfaceDistanceFromPoint(this._camPos);return 2*(this._isGlobalMode?this._applyGlobalFlatAngleCorrectionToConeDistance(n,e):n)*this._halfScreenPixelSizePerDistance}_updateMinMaxDistanceToCenter(e){e>0?(this.minCenterDistance=Math.min(this.minCenterDistance,e),this.maxCenterDistance=Math.max(this.maxCenterDistance,e)):(this.minCenterDistance=0,this.maxCenterDistance=Math.max(this.maxCenterDistance,-e))}getLodLevel(e){if(e.lodMetric===0)return 0;if(e.childCount===0)return this.maxLodLevel;if(this._useFrustumCulling&&this._progressiveLoadFactor<1){let t=this._progressiveLoadFactor*this._screenspaceErrorBias,n=this._screenspaceErrorBias;return this.evaluateLODmetric(e,t)?this.evaluateLODmetric(e,n)?2:1:0}return this.evaluateLODmetric(e,this._screenspaceErrorBias)?this.maxLodLevel:0}evaluateLODmetric(e,t){switch(e.lodMetric){case 1:{let n=this._screenSpaceDiameterMbs(e,(e.serviceMbsInIndexSR?.radius??0)*t);return this._options.angleDependentLoD&&(n*=this.calcAngleDependentLoD(e)),n<e.maxError}case 2:{let n=this.calculateMbsConeInRenderSR(e),r=n?this.calculateScreenSpaceRelativeCone(n):this.calculateScreenSpaceRelativeSphere(e);return e.maxError*t<=r}case 3:return this._screenSpaceDiameterMbs(e,e.maxError)*t<xe;case 4:return this.calcCameraDistanceToSurfaceAndUpdateMinmaxWithCenterDistance(e)>e.maxError*t}return!1}distToCameraPOIRay(e){if(e==null)return 0;let t=this.calculateServiceMbsInRenderSRElevationAdjusted(e),n=t.center,r=s(n,this._cameraPOIDirection),i=r*r,a=m(n)-i;return Math.sqrt(a)-t.radius}distCameraToPOI(){return p(this._camPos,this._poi)}}function P(e,t){let n=e[0]-t.center[0],r=e[1]-t.center[1],i=e[2]-t.center[2],a=n*n+r*r,o=t.radius;if(a<=o*o)return Math.abs(i);let s=Math.sqrt(a)-o;return Math.sqrt(i*i+s*s)}const F=g(),I=g(),L=g(),R=new O,z=g(),B=new v,V=[g(),g(),g(),g(),g(),g(),g(),g()],H=g(),ge=ie(),_e=g(),ve=g(),U=g(),W=g(),G=new T,K=re(),q=g(),J=g(),Y=g(),X=g();function ye(e,t,i){if(i===2)e.center[2]+=t;else{let i=r(e.center);if(i===0){e.radius+=Math.abs(t);return}n(e.center,e.center,1+t/i)}}const be=.5*Number.MAX_VALUE,xe=10,Z=2e5,Q=.08,$=1e-4,Se=.9,Ce=.01,we=.001;export{N as default};
2
+ import"../../../../core/has.js";import{normalize as e,add as t,scale as n,length as r,set as i,equals as a,subtract as o,dot as s,len as c,sqrDist as l,copy as u,sub as d,scaleAndAdd as f,distance as p,squaredLength as m,squaredDistance as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as g}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as _}from"../../../../geometry/ellipsoidUtils.js";import v from"../../../../geometry/Point.js";import y from"../../../../geometry/SpatialReference.js";import{getSphericalPCPF as b}from"../../../../geometry/spatialReferenceEllipsoidUtils.js";import{projectBoundingRect as ee}from"../../../../geometry/projection/projectBoundingRect.js";import{projectBoundingSphere as te}from"../../../../geometry/projection/projectBoundingSphere.js";import{getProjector as ne}from"../../../../geometry/projection/projectors.js";import{create as re,fromValues as x}from"../../../../geometry/support/aaBoundingRect.js";import{create as ie,fromPoints as S,distance2 as ae}from"../../../../geometry/support/lineSegment.js";import{signedDistance as C,getNormal as w}from"../../../../geometry/support/plane.js";import{isPlateCarree as oe,webMercatorValid as se}from"../../../../geometry/support/spatialReferenceUtils.js";import{Sphere as T}from"../../../../geometry/support/sphere.js";import{evaluateElevationAlignmentAtPoint as E}from"../graphics/elevationAlignmentUtils.js";import{ElevationContext as ce}from"../graphics/ElevationContext.js";import{createContextWithoutExpressionSupport as le,extractExpressionInfo as ue}from"../graphics/featureExpressionInfoUtils.js";import{intersectBoundingRectWithMbs as D}from"./I3SUtil.js";import{Frustum as de}from"../../state/Frustum.js";import{groundNavigationConstants as fe}from"../../state/utils/groundNavigationUtils.js";import"../../support/elevationUpdateExtentUtils.js";import{Obb as O,computeOffsetObb as pe}from"../../support/orientedBoundingBox.js";import{SweptSphereCylindricalVolume as me,SphereGlobal as k,SweptSphereConicalVolume as A}from"../../support/SweptSphereVolume.js";import{sphereToGeographicExtent as j,intersectsGeographicExtent as M}from"../../support/sphereExtentUtils.js";const N=1e5;class P{get _frustumPlanes(){return this._frustum.planes}constructor(e,t,n,r,i,a,o,s,c={}){this._indexSR=e,this._renderCoordsHelper=t,this._clippingArea=i,this._elevationProvider=a,this._viewingMode=o,this._options=c,this._viewDirection=g(),this._useFrustumCulling=!1,this._poi=g(),this._cameraPOIDirection=g(),this._elevationContext=null,this._checkBelowSegmentEnd=g(),this.minCenterDistance=1/0,this.maxCenterDistance=0,this.maxLodLevel=2,this._screenspaceErrorBias=c.screenspaceErrorBias||1,this._progressiveLoadFactor=c.progressiveLoadFactor||1,this._frustum=new de(t),this.updateCamera(n,r);let l=this._renderCoordsHelper.spatialReference;this._renderSR=l,this._renderSRSphericalPCPF=b(l),this._isGlobalMode=this._viewingMode===1,this.elevationIntersectionSpatialReference=this._isGlobalMode?this._indexSR.isWebMercator?this._indexSR:this._elevationProvider.spatialReference:l,this.updateElevationInfo(s),this._isECEFOBBInLocalMode=this._indexSR.isWGS84&&(l.isWebMercator||oe(l)),this._indexSREllipsoidRadius=_(this._indexSR).radius,this._indexSRSphericalPCPF=b(e),this._projectorIndexSRToIndexSRSphericalPCPF=ne(this._indexSR,this._indexSRSphericalPCPF),this._groundNavigationCheckDistance=fe.i3sNodeDownwardCheckDistanceInMeters/this._renderCoordsHelper.unitInMeters}updateElevationInfo(e){e==null?this._elevationContext=null:(this._elevationContext=ce.fromElevationInfo(e),this._elevationContext.setFeatureExpressionInfoContext(le(ue(e,!1))))}updateCamera(r,i){this._useFrustumCulling=i,e(this._viewDirection,r.viewForward),i&&this._frustum.update(r),this._halfScreenPixelSizePerDistance=r.screenPixelSizePerDistance/2,this._camPos=r.eye,this._updateCameraPOIDirection(),this.minCenterDistance=1/0,this.maxCenterDistance=0,t(this._checkBelowSegmentEnd,this._camPos,n(this._checkBelowSegmentEnd,this._renderCoordsHelper.worldUpAtPosition(this._camPos,this._checkBelowSegmentEnd),-this._groundNavigationCheckDistance))}setPointOfInterest(e){this._poi=e,this._updateCameraPOIDirection()}updateScreenSpaceErrorBias(e){let t=this._screenspaceErrorBias;return this._screenspaceErrorBias=e,t}updateClippingArea(e){this._clippingArea=e}expandElevationRange(e,t,n){if(this._elevationContext==null)return;let r=e.serviceMbsInIndexSR;if(!r)return;let i=this._elevationContext.mode===`relative-to-scene`?`scene`:`ground`,a=this._elevationProvider;if(a.getSphereElevationRange){let e=a.getSphereElevationRange(r,this._indexSR,i);if(e){n.expandElevationRange(e);return}}let[o,s,c]=r.center,l=a.getElevation(o,s,c,this._indexSR,i);l&&n.expandElevationRangeValues(l,l);let u=t?null:a.getRootElevationRange?.();u&&n.expandElevationRange(u)}calculateServiceMbsInRenderSR(e){let{serviceMbsInRenderSR:t}=e;if(t.isValid)return t;let{serviceMbsInIndexSR:n}=e;if(!n?.isValid)return t;let r=G;return te(n,this._indexSR,r,this._renderSR),e.updateServiceMbsInRenderSR(r)}intersectsElevationUpdate(e,t){if(this._isGlobalMode&&this._indexSR.isWebMercator){let n=t.serviceMbsInIndexSR;if(!n?.isValid)return!0;let[r,i]=se,a=i-r,o=e[2]-e[0]>=a,s=o?0:Math.round((n.center[0]-(e[0]+e[2])/2)/a)*a;return x(o?-1/0:e[0]+s,e[1],o?1/0:e[2]+s,e[3],K),D(K,n)!==0}let n=this.calculateServiceMbsInRenderSR(t);if(!n.isValid)return!0;if(!this._isGlobalMode)return D(e,n)!==0;let r=t.serviceMbsElevationUpdateExtent;return r[0]>r[2]&&(j(n,r),this.elevationIntersectionSpatialReference.isWebMercator&&Number.isFinite(r[0])&&(r[1]=Math.max(-90,r[1]),r[3]=Math.min(90,r[3]),ee(r,y.WGS84,r,this.elevationIntersectionSpatialReference)||x(-1/0,-1/0,1/0,1/0,r))),M(e,r,this.elevationIntersectionSpatialReference)}_evaluateElevationAlignmentInIndexSR(e,t){return V.x=e[0],V.y=e[1],V.z=e[2],V.spatialReference=this._indexSR,E(V,this._elevationProvider,t,this._renderCoordsHelper)}calculateServiceMbsInRenderSRElevationAdjusted(e){let{serviceMbsInRenderSRElevationAdjusted:t}=e;if(t.isValid)return t;let{serviceMbsInIndexSR:n}=e,r=this.calculateServiceMbsInRenderSR(e);if(!r.isValid||!n?.isValid)return t;let i=G;i.copyFrom(r);let{_elevationContext:a}=this;if(a){let{minElevation:t}=e,{_renderCoordsHelper:r}=this,o=n.center,s=0;if(Number.isFinite(t)){let n=0,c=0,{maxElevation:l}=e,u=o[2];switch(a.mode){case`relative-to-ground`:case`relative-to-scene`:n=a.geometryZWithOffset(u,r)+t-u,c=l-t;break;case`on-the-ground`:n=t-u,c=l-t}s=n+.5*c,i.radius+=.5*c}else i.radius<N&&(s=this._evaluateElevationAlignmentInIndexSR(o,a)-o[2]);s&&ye(i,s,this._viewingMode)}return e.updateServiceMbsInRenderSRElevationAdjusted(i)}_isGlobalMbsContainingPlanetCenter(e){return this._viewingMode===1&&r(e.center)<=e.radius}calculateMbsConeInRenderSR(e){let{mbsConeInRenderSR:t}=e;if(t)return t;if(!e.elevationRangeValid)return null;let{minElevation:n,maxElevation:r}=e;if(!Number.isFinite(n)||!(n<r))return null;let i=this.calculateServiceMbsInRenderSR(e);if(!i.isValid)return null;let a=this._elevationContext;if(a?.mode===`relative-to-ground`||a?.mode===`relative-to-scene`){let t=e.serviceMbsInIndexSR;if(!t?.isValid)return null;let i=t.center[2],o=a.geometryZWithOffset(i,this._renderCoordsHelper);if(this._viewingMode===2)n+=o,r+=o;else{let e=o-i;n+=e,r+=e}}let o=this._renderCoordsHelper.referenceEllipsoid.radius,s=this._viewingMode===2?new me(i,n,r):this._isGlobalMbsContainingPlanetCenter(i)?new k(i,o+n,o+r):new A(i,o+n,o+r);return e.updateMbsConeInRenderSR(s)}getAndUpdateVisibilityObbInRenderSR(e){{let t=e.visibilityObbInRenderSR;if(t)return t}let t=this._indexSREllipsoidRadius*.01,{serviceMbsInIndexSR:n,serviceObbInIndexSR:r}=e;if(r==null||!n||!r.isValid||this._isECEFOBBInLocalMode&&(r.halfSizeX>t||r.halfSizeY>t||r.halfSizeZ>t))return null;{let t=e.serviceObbInRenderSR;if(t==null)t=new O,e.serviceObbInRenderSR=t;else if(t.isValid)return t;let a=n.radius,o=0,s=0,c=r.centerZ,l=this._renderCoordsHelper,u=this._elevationContext;if(u&&e.elevationRangeValid){let{minElevation:t,maxElevation:n}=e;switch(u.mode){case`relative-to-ground`:case`relative-to-scene`:o=u.geometryZWithOffset(c,l)+t-c,s=n-t;break;case`on-the-ground`:o=t-c,s=n-t}}else if(u&&a<N){let e=i(B,r.centerX,r.centerY,c);o=this._evaluateElevationAlignmentInIndexSR(e,u)-c}let d=s>0,f=d?z:t;return r.transform(f,this._indexSR,this._renderSR,o,this._renderSRSphericalPCPF,this._indexSRSphericalPCPF,this._projectorIndexSRToIndexSRSphericalPCPF),d&&pe(f,0,s,this._viewingMode,t),t}}getNodeObbInRenderSRIndependentOfElevationOffset(e){{let t=e.visibilityObbInRenderSR??e.serviceObbInRenderSR??null;if(t?.isValid)return t}let t=e.serviceObbInIndexSR;return t?this._viewingMode===2&&Math.max(t.halfSizeX,t.halfSizeY,t.halfSizeZ)>.2*this._indexSREllipsoidRadius?null:(t.transform(z,this._indexSR,this._renderSR,void 0,this._renderSRSphericalPCPF,this._indexSRSphericalPCPF,this._projectorIndexSRToIndexSRSphericalPCPF),z):null}ensureElevationAgnosticBoundingVolume(e){return!e.elevationAgnosticBoundingVolume.valid&&e.level>0&&(this._viewingMode===1?this._updateElevationAgnosticBoundingVolumeGlobal(e):this._updateElevationAgnosticBoundingVolumeLocal(e)),e.elevationAgnosticBoundingVolume}_updateCameraPOIDirection(){a(this._poi,this._camPos)?this._cameraPOIDirection=this._viewDirection:(o(this._cameraPOIDirection,this._camPos,this._poi),e(this._cameraPOIDirection,this._cameraPOIDirection))}_updateElevationAgnosticBoundingVolumeGlobal(t){let n=this.getNodeObbInRenderSRIndependentOfElevationOffset(t),r=t.elevationAgnosticBoundingVolume,i=-1,a;if(n){let t=B;n.getCenter(t),e(t,t),a=t,n.getCorners(H);for(let n of H){e(n,n);let a=s(n,t);if(a<=0){r.invalidate();return}let o=Math.sqrt(Math.max(0,1-a*a));i=Math.max(i,o)}}else{let n=t.serviceMbsInRenderSR;if(!n.isValid){r.invalidate();return}let{center:o,radius:s}=n,l=c(o);if(l<s){r.invalidate();return}i=s/l,a=e(W,o)}r.set(a,i+we)}_updateElevationAgnosticBoundingVolumeLocal(e){let t=e.elevationAgnosticBoundingVolume,n=this.getNodeObbInRenderSRIndependentOfElevationOffset(e);if(n){let e=n.getCenter(B);e[2]=0;let r=0;n.getCorners(H);for(let t of H){t[2]=0;let n=l(e,t);r=Math.max(r,n)}t.set(e,Math.sqrt(r))}else{let n=e.serviceMbsInRenderSR;if(n.isValid){let e=u(B,n.center);e[2]=0,t.set(e,n.radius)}}}isNodeVisible(e,t=!1){if(!this._isMBSinClippingArea(this.calculateServiceMbsInRenderSR(e)))return!1;if(!this._useFrustumCulling||t&&this.isNodeCloseBelowCamera(e))return!0;let n=this.getAndUpdateVisibilityObbInRenderSR(e);return n?n.intersectsFrustumConservativeApproximation(this._frustumPlanes):this._frustum.intersectsSphere(this.calculateServiceMbsInRenderSRElevationAdjusted(e))}isNodeCloseBelowCamera(e){let t=this.getAndUpdateVisibilityObbInRenderSR(e);if(t?.isValid)return t.intersectSegment(this._camPos,this._checkBelowSegmentEnd);let n=this.calculateServiceMbsInRenderSRElevationAdjusted(e);if(!n.isValid)return!0;let r=S(this._camPos,this._checkBelowSegmentEnd,ge);return ae(r,n.center)<=n.radius**2}isElevationAgnosticBoundingVolumeVisible(e,t){return!this._useFrustumCulling||!e.valid?!0:e.intersectsFrustumConservative(this._frustum,this._viewingMode,1+t)?this._viewingMode!==1||this._isConeVisibleInFrustum(e):!1}_isConeVisibleInFrustum(t){let r=t.radius;if(r>Se)return!0;let i=this._frustumPlanes,{center:a,radius:o}=this._frustum.boundingSphere,c=t.getAxis(W),l=s(c,a),u=o+1,p=l-u,m=l+u;if(p<=0)return!0;let h=n(I,c,p),g=n(L,c,m),_=r/Math.sqrt(1-r*r);for(let t of i){let r=w(t),i=e(R,r),a=s(i,c);if(Math.abs(1-a)<Ce)continue;let o=_e;n(o,c,a),d(o,o,i),e(o,o);let l=ve;if(f(l,h,o,p*_),!(C(t,l)<=0)&&(f(l,g,o,m*_),!(C(t,l)<=0)))return!1}return!0}isObbVisibleIndependentOfElevation(e,t){if(!this._useFrustumCulling||!e.valid)return!0;let{center:r,radius:i}=this._frustum.boundingSphere,a=i+1,o=this._frustumPlanes,c=H;if(t.getCorners(c),this._viewingMode===1){let t=e.getAxis(W),i=s(t,r),l=i-a,u=i+a;if(l<=0)return!0;for(let e of o){let r=!0;for(let i of c){let a=s(i,t),o=U;if(n(o,i,l/a),C(e,o)<=0){r=!1;break}let c=U;if(n(c,i,u/a),C(e,c)<=0){r=!1;break}}if(r)return!1}}else{let e=r[2]-a,t=r[2]+a;for(let n of o){let r=!0,i=w(n),a=i[0],o=i[1],s=i[2],l=n[3];for(let n of c){let i=a*n[0]+o*n[1]+l;if(i+s*e<=0||i+s*t<=0){r=!1;break}}if(r)return!1}}return!0}isGeometryVisible(e,t){if(!this._useFrustumCulling)return!0;let n=e.geometryObbInRenderSR;return!n?.isValid||n.intersectsFrustumConservativeApproximation(this._frustumPlanes)||t&&n.intersectSegment(this._camPos,this._checkBelowSegmentEnd)}_isMBSinClippingArea(e){return this._clippingArea==null||D(this._clippingArea,e)!==0}_screenSpaceDiameterMbs(e,t){let n=this.calcCameraDistanceToSurfaceAndUpdateMinmaxWithCenterDistance(e);return n<0?be:t/n/this._halfScreenPixelSizePerDistance}calcCameraDistanceToSurfaceAndUpdateMinmaxWithCenterDistance(e){let t=this.calculateMbsConeInRenderSR(e);if(t==null)return this.calcCameraDistanceToSurfaceAndUpdateMinmaxWithSphere(e);let n=t.calculateSurfaceDistanceFromPoint(this._camPos),r=t.calculateCenterDistanceFromPoint(this._camPos);return this._updateMinMaxDistanceToCenter(r),n}calcCameraDistanceToSurfaceAndUpdateMinmaxWithSphere(e){return this.calcCameraDistanceToCenterAndUpdateMinmax(e)-this.calculateServiceMbsInRenderSRElevationAdjusted(e).radius}calcCameraDistanceToCenterAndUpdateMinmax(e){let t=this.calculateServiceMbsInRenderSRElevationAdjusted(e),n=p(t.center,this._camPos);return this._updateMinMaxDistanceToCenter(n),n}_calculateAngleDependentLoDForSphere(e,t){let n=d(he,e,this._camPos),i=r(e),a=r(n);if(i===0||a===0)return 1;let o=(Math.abs(s(e,n))/i+t)/a;return Math.min(1,o)}calcAngleDependentLoD(e){let t=this.calculateMbsConeInRenderSR(e);if(t==null){let{center:t,radius:n}=this.calculateServiceMbsInRenderSRElevationAdjusted(e);return this._calculateAngleDependentLoDForSphere(t,n)}let{center:i,radius:a}=this.calculateServiceMbsInRenderSR(e);if(this._viewingMode===2)u(q,i),q[2]=t.lowerCenterHeight,u(J,i),J[2]=t.upperCenterHeight;else{let e=r(i);if(e===0)return 1;n(q,i,t.lowerCenterHeight/e),n(J,i,t.upperCenterHeight/e)}let o=this._calculateAngleDependentLoDForSphere(q,a),c=this._calculateAngleDependentLoDForSphere(J,a);if(this._viewingMode===2)u(Y,i),Y[2]=Math.max(t.lowerCenterHeight,Math.min(t.upperCenterHeight,this._camPos[2]));else{let e=r(i);if(e===0)return Math.max(o,c);let a=Math.max(t.lowerCenterHeight,Math.min(t.upperCenterHeight,s(this._camPos,i)/e));n(Y,i,a/e)}return Math.max(o,c,this._calculateAngleDependentLoDForSphere(Y,a))}hasLOD(e){return e.lodMetric!==0}_getDistanceToSurfaceGlobeMode(e,i){let a=r(i.center),c=r(e)-a;n(q,e,s(e,i.center)/m(e));let l=h(i.center,q),u=i.radius;if(l<=u*u)return Math.abs(c);let d=n(q,i.center,1/a),f=u*u/(2*a),g=n(J,d,a-f),_=o(Y,e,g),v=o(Y,_,n(X,d,s(d,_))),y=t(Y,g,n(Y,v,u/r(v))),b=p(e,y);if(c>=Z){let t=o(J,e,y),n=s(t,d)/r(t);n<Q&&(n=$),b/=n}return b}_getDistanceToSurface(e,t){return this._isGlobalMode?this._getDistanceToSurfaceGlobeMode(e,t):F(e,t)}_applyGlobalFlatAngleCorrectionToConeDistance(e,t){t.calculateClosestCenterToPoint(this._camPos,X);let n=r(X);if(n===0||r(this._camPos)-n<Z)return e;let i=o(Y,this._camPos,X),a=r(i);if(a===0)return e;let c=s(i,X)/(a*n);return e/(c<Q?$:c)}calculateScreenSpaceRelativeSphere(e){let t=this.calculateServiceMbsInRenderSRElevationAdjusted(e),n=this._getDistanceToSurface(this._camPos,t),r=n+t.radius;return this._updateMinMaxDistanceToCenter(r),2*n*this._halfScreenPixelSizePerDistance}calculateScreenSpaceRelativeCone(e){let t=e.calculateCenterDistanceFromPoint(this._camPos);this._updateMinMaxDistanceToCenter(t);let n=e.calculateSurfaceDistanceFromPoint(this._camPos);return 2*(this._isGlobalMode?this._applyGlobalFlatAngleCorrectionToConeDistance(n,e):n)*this._halfScreenPixelSizePerDistance}_updateMinMaxDistanceToCenter(e){e>0?(this.minCenterDistance=Math.min(this.minCenterDistance,e),this.maxCenterDistance=Math.max(this.maxCenterDistance,e)):(this.minCenterDistance=0,this.maxCenterDistance=Math.max(this.maxCenterDistance,-e))}getLodLevel(e){if(e.lodMetric===0)return 0;if(e.childCount===0)return this.maxLodLevel;if(this._useFrustumCulling&&this._progressiveLoadFactor<1){let t=this._progressiveLoadFactor*this._screenspaceErrorBias,n=this._screenspaceErrorBias;return this.evaluateLODmetric(e,t)?this.evaluateLODmetric(e,n)?2:1:0}return this.evaluateLODmetric(e,this._screenspaceErrorBias)?this.maxLodLevel:0}evaluateLODmetric(e,t){switch(e.lodMetric){case 1:{let n=this._screenSpaceDiameterMbs(e,(e.serviceMbsInIndexSR?.radius??0)*t);return this._options.angleDependentLoD&&(n*=this.calcAngleDependentLoD(e)),n<e.maxError}case 2:{let n=this.calculateMbsConeInRenderSR(e),r=n?this.calculateScreenSpaceRelativeCone(n):this.calculateScreenSpaceRelativeSphere(e);return e.maxError*t<=r}case 3:return this._screenSpaceDiameterMbs(e,e.maxError)*t<xe;case 4:return this.calcCameraDistanceToSurfaceAndUpdateMinmaxWithCenterDistance(e)>e.maxError*t}return!1}distToCameraPOIRay(e){if(e==null)return 0;let t=this.calculateServiceMbsInRenderSRElevationAdjusted(e),n=t.center,r=s(n,this._cameraPOIDirection),i=r*r,a=m(n)-i;return Math.sqrt(a)-t.radius}distCameraToPOI(){return p(this._camPos,this._poi)}}function F(e,t){let n=e[0]-t.center[0],r=e[1]-t.center[1],i=e[2]-t.center[2],a=n*n+r*r,o=t.radius;if(a<=o*o)return Math.abs(i);let s=Math.sqrt(a)-o;return Math.sqrt(i*i+s*s)}const I=g(),L=g(),R=g(),z=new O,B=g(),V=new v,H=[g(),g(),g(),g(),g(),g(),g(),g()],he=g(),ge=ie(),_e=g(),ve=g(),U=g(),W=g(),G=new T,K=re(),q=g(),J=g(),Y=g(),X=g();function ye(e,t,i){if(i===2)e.center[2]+=t;else{let i=r(e.center);if(i===0){e.radius+=Math.abs(t);return}n(e.center,e.center,1+t/i)}}const be=.5*Number.MAX_VALUE,xe=10,Z=2e5,Q=.08,$=1e-4,Se=.9,Ce=.01,we=.001;export{P as default};
@@ -15,4 +15,4 @@ import{pt2px as e}from"../../../../../../core/screenUtils.js";import{set as t}fr
15
15
  vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) {
16
16
  return worldPos + calculateVerticalOffset(worldPos, localOrigin);
17
17
  }
18
- `)):n.code.add(c`vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) { return worldPos; }`)}const d=n();function f(e){e.uniforms.add(new s(`verticalOffset`,(e,n)=>{let{minWorldLength:r,maxWorldLength:i,screenLength:a}=e.verticalOffset,o=Math.tan(.5*n.camera.fovY)/(n.camera.fullViewport[3]*.5),s=n.camera.pixelRatio||1;return t(d,a*s,o,r,i)}))}export{u as VerticalOffset,l as VerticalOffsetParameters,f as addVerticalOffset};
18
+ `)):n.code.add(c`vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) { return worldPos; }`)}const d=n();function f(e){e.uniforms.add(new s(`verticalOffset`,(e,n)=>{let{minWorldLength:r,maxWorldLength:i,screenLength:a}=e.verticalOffset,o=n.camera.screenPixelSizePerDistance;return t(d,a,o,r,i)}))}export{u as VerticalOffset,l as VerticalOffsetParameters,f as addVerticalOffset};
@@ -23,7 +23,7 @@ posView /= factor;
23
23
  }
24
24
  }
25
25
  return groundRelative;
26
- }`),(!p.draped||p.hasVerticalOffset)&&m.uniforms.add(n),p.draped||(m.uniforms.add(new c(`hudPixelSizePerDistance`,e=>Math.tan(e.camera.fovY/2)/(e.camera.fullViewport[3]/2))),m.code.add(u`
26
+ }`),(!p.draped||p.hasVerticalOffset)&&m.uniforms.add(n),p.draped||(m.uniforms.add(new c(`hudPixelSizePerDistance`,e=>e.camera.renderPixelSizePerDistance)),m.code.add(u`
27
27
  void applyHUDVerticalGroundOffset(vec3 normalModel, inout vec3 posModel, inout vec3 posView) {
28
28
  float distanceToCamera = length(posView);
29
29
 
@@ -37,7 +37,9 @@ foam = foamIntensity2FoamColor(foamIntensityExternal, foamIntensity, skyZenitCol
37
37
  }
38
38
  float correctionViewingFactor = pow(max(dot(v, localUp), 0.0), correctionViewingPowerFactor);
39
39
  vec3 normalCorrectedClouds = mix(localUp, n, correctionViewingFactor);
40
- vec3 reflectedWorld = normalize(reflect(-v, normalCorrectedClouds));`),g.cloudReflections&&_.uniforms.add(d).code.add(p`vec4 cloudsColor = renderClouds(reflectedWorld, position);
40
+ vec3 reflectedWorld = normalize(reflect(-v, normalCorrectedClouds));`),g.cloudReflections&&_.uniforms.add(d).code.add(p`vec3 emission = vec3(0.0);
41
+ vec4 cloudsColor = renderClouds(reflectedWorld, position, emission);
42
+ cloudsColor.rgb += emission;
41
43
  cloudsColor.a = 1.0 - cloudsColor.a;
42
44
  cloudsColor = pow(cloudsColor, vec4(GAMMA));
43
45
  cloudsColor *= clamp(fresnelModifier.y * cloudFresnelModifier[0] - cloudFresnelModifier[1], 0.0, 1.0) * cloudsOpacity;`),g.screenSpaceReflections?_.uniforms.add(l,e,new f(`fadeFactorSSR`,e=>e.screenSpaceReflections.fadeFactor)).code.add(p`vec3 viewDir = normalize(viewPosition);