@arcgis/core 5.2.0-next.132 → 5.2.0-next.134

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 (173) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/107f4bcf8e6c91a67010.js +1 -0
  3. package/assets/esri/core/workers/chunks/{081c9ccaa5884c730a91.js → 1688c4dcd36db992a9dc.js} +1 -1
  4. package/assets/esri/core/workers/chunks/3a6b8f9aabde7e138834.js +1 -0
  5. package/assets/esri/core/workers/chunks/{18d5bad86ea3ef3ec747.js → eba9e03c1c9aa55044a3.js} +120 -120
  6. package/assets/esri/core/workers/chunks/f6c8e5abe1d55ab5c7dd.js +1 -0
  7. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-arabic.woff2 +0 -0
  8. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-cyrillic.woff2 +0 -0
  9. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-ext.woff2 +0 -0
  10. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-georgian.woff2 +0 -0
  11. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-greek.woff2 +0 -0
  12. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-hebrew.woff2 +0 -0
  13. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-math.woff2 +0 -0
  14. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-thai.woff2 +0 -0
  15. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-vietnamese.woff2 +0 -0
  16. package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02.woff2 +0 -0
  17. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-arabic.woff2 +0 -0
  18. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-cyrillic.woff2 +0 -0
  19. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-ext.woff2 +0 -0
  20. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-georgian.woff2 +0 -0
  21. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-greek.woff2 +0 -0
  22. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-hebrew.woff2 +0 -0
  23. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-math.woff2 +0 -0
  24. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-thai.woff2 +0 -0
  25. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-vietnamese.woff2 +0 -0
  26. package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7.woff2 +0 -0
  27. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-arabic.woff2 +0 -0
  28. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-cyrillic.woff2 +0 -0
  29. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-ext.woff2 +0 -0
  30. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-georgian.woff2 +0 -0
  31. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-greek.woff2 +0 -0
  32. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-hebrew.woff2 +0 -0
  33. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-math.woff2 +0 -0
  34. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-thai.woff2 +0 -0
  35. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-vietnamese.woff2 +0 -0
  36. package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688.woff2 +0 -0
  37. package/assets/esri/themes/base/fonts/fonts/3ae1e25e-3aa6-4061-a016-a079159f9d65.woff2 +0 -0
  38. package/assets/esri/themes/base/fonts/fonts/41331c3c-3759-4462-8695-33c9a21b6a5b.woff2 +0 -0
  39. package/assets/esri/themes/base/fonts/fonts/94aa531e-7746-4df0-bb6e-349891f2eda5.woff2 +0 -0
  40. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-arabic.woff2 +0 -0
  41. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-cyrillic.woff2 +0 -0
  42. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-ext.woff2 +0 -0
  43. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-georgian.woff2 +0 -0
  44. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-greek.woff2 +0 -0
  45. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-hebrew.woff2 +0 -0
  46. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-math.woff2 +0 -0
  47. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-thai.woff2 +0 -0
  48. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-vietnamese.woff2 +0 -0
  49. package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939.woff2 +0 -0
  50. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-cyrillic.woff2 +0 -0
  51. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-ext.woff2 +0 -0
  52. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-greek.woff2 +0 -0
  53. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-hebrew.woff2 +0 -0
  54. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-math.woff2 +0 -0
  55. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-vietnamese.woff2 +0 -0
  56. package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d.woff2 +0 -0
  57. package/assets/esri/themes/base/fonts/fonts.scss +0 -0
  58. package/chunks/GaussianSplat.glsl.js +24 -9
  59. package/chunks/LineMarker.glsl.js +23 -23
  60. package/chunks/RibbonLine.glsl.js +136 -99
  61. package/config.js +1 -1
  62. package/core/PooledArray.js +1 -1
  63. package/geometry/operators/affineTransformOperator.d.ts +4 -0
  64. package/geometry/operators/alphaShapeOperator.d.ts +10 -1
  65. package/geometry/operators/areaOperator.d.ts +3 -0
  66. package/geometry/operators/autoCompleteOperator.d.ts +3 -0
  67. package/geometry/operators/boundaryOperator.d.ts +4 -0
  68. package/geometry/operators/bufferOperator.d.ts +6 -0
  69. package/geometry/operators/centroidOperator.d.ts +3 -0
  70. package/geometry/operators/clipOperator.d.ts +4 -0
  71. package/geometry/operators/containsOperator.d.ts +4 -0
  72. package/geometry/operators/convexHullOperator.d.ts +6 -0
  73. package/geometry/operators/crossesOperator.d.ts +4 -0
  74. package/geometry/operators/cutOperator.d.ts +3 -0
  75. package/geometry/operators/densifyOperator.d.ts +5 -0
  76. package/geometry/operators/differenceOperator.d.ts +4 -0
  77. package/geometry/operators/disjointOperator.d.ts +4 -0
  78. package/geometry/operators/distanceOperator.d.ts +4 -0
  79. package/geometry/operators/equalsOperator.d.ts +4 -0
  80. package/geometry/operators/extendOperator.d.ts +4 -0
  81. package/geometry/operators/generalizeOperator.d.ts +5 -0
  82. package/geometry/operators/geodesicBufferOperator.d.ts +8 -0
  83. package/geometry/operators/geodesicProximityOperator.d.ts +9 -0
  84. package/geometry/operators/geodeticAreaOperator.d.ts +6 -0
  85. package/geometry/operators/geodeticDensifyOperator.d.ts +7 -0
  86. package/geometry/operators/geodeticDistanceOperator.d.ts +6 -0
  87. package/geometry/operators/geodeticLengthOperator.d.ts +6 -0
  88. package/geometry/operators/geodeticUtilsOperator.d.ts +7 -0
  89. package/geometry/operators/graphicBufferOperator.d.ts +4 -0
  90. package/geometry/operators/integrateOperator.d.ts +3 -0
  91. package/geometry/operators/intersectionOperator.d.ts +5 -0
  92. package/geometry/operators/intersectsOperator.d.ts +4 -0
  93. package/geometry/operators/isNearOperator.d.ts +4 -0
  94. package/geometry/operators/labelPointOperator.d.ts +4 -0
  95. package/geometry/operators/lengthOperator.d.ts +3 -0
  96. package/geometry/operators/linesToPolygonsOperator.d.ts +3 -0
  97. package/geometry/operators/locateBetweenOperator.d.ts +3 -0
  98. package/geometry/operators/minimumBoundingCircleOperator.d.ts +5 -0
  99. package/geometry/operators/multiPartToSinglePartOperator.d.ts +4 -0
  100. package/geometry/operators/offsetOperator.d.ts +5 -0
  101. package/geometry/operators/overlapsOperator.d.ts +4 -0
  102. package/geometry/operators/polygonOverlayOperator.d.ts +9 -1
  103. package/geometry/operators/polygonSlicerOperator.d.ts +7 -0
  104. package/geometry/operators/projectOperator.d.ts +6 -0
  105. package/geometry/operators/proximityOperator.d.ts +7 -0
  106. package/geometry/operators/relateOperator.d.ts +5 -0
  107. package/geometry/operators/reshapeOperator.d.ts +3 -0
  108. package/geometry/operators/shapePreservingProjectOperator.d.ts +7 -0
  109. package/geometry/operators/simplifyOGCOperator.d.ts +5 -0
  110. package/geometry/operators/simplifyOperator.d.ts +5 -0
  111. package/geometry/operators/support/GeographicTransformation.d.ts +2 -0
  112. package/geometry/operators/support/GeographicTransformationStep.d.ts +2 -0
  113. package/geometry/operators/support/Transformation.d.ts +6 -1
  114. package/geometry/operators/support/geographicTransformationUtils.d.ts +4 -0
  115. package/geometry/operators/symmetricDifferenceOperator.d.ts +4 -0
  116. package/geometry/operators/touchesOperator.d.ts +4 -0
  117. package/geometry/operators/types.d.ts +1 -0
  118. package/geometry/operators/unionOperator.d.ts +4 -0
  119. package/geometry/operators/withinOperator.d.ts +4 -0
  120. package/kernel.js +1 -1
  121. package/layers/GaussianSplatLayer.d.ts +0 -1
  122. package/layers/GeospatialPDFLayer.js +1 -1
  123. package/package.json +2 -2
  124. package/support/revision.js +1 -1
  125. package/symbols/LineSymbol3D.d.ts +0 -7
  126. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  127. package/views/2d/layers/GeospatialPDFLayerView2D.js +1 -1
  128. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  129. package/views/3d/interactive/placementTools/GroundNavigationPlacementTool3D.js +1 -1
  130. package/views/3d/layers/GeospatialPDFLayerView3D.js +1 -1
  131. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  132. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  133. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  134. package/views/3d/navigation/modes/GroundNavigationMode3D.js +1 -1
  135. package/views/3d/state/Constraints.js +1 -1
  136. package/views/3d/state/utils/OffsetCorrectionController.js +1 -1
  137. package/views/3d/state/utils/groundNavigationUtils.js +1 -1
  138. package/views/3d/state/utils/navigationUtils.js +1 -1
  139. package/views/3d/terrain/SphericalPatch.js +1 -1
  140. package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticBVH.js +1 -1
  141. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +23 -12
  142. package/views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js +35 -25
  143. package/views/3d/webgl-engine/core/shaderLibrary/shading/readShadow.glsl.js +2 -2
  144. package/views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js +1 -1
  145. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  146. package/views/3d/webgl-engine/lib/GaussianSplatRenderer.js +1 -1
  147. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  148. package/views/3d/webgl-engine/lib/IntersectorResult.js +1 -1
  149. package/views/3d/webgl-engine/lib/LineMaterial.js +1 -1
  150. package/views/3d/webgl-engine/lib/PolygonIntersectionResults.js +1 -1
  151. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  152. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  153. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  154. package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
  155. package/views/3d/webgl-engine/lib/screenPolygonTriangleIntersections.js +1 -1
  156. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  157. package/views/3d/webgl-engine/materials/intersectWithPolygonOffset.js +1 -1
  158. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  159. package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +4 -4
  160. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  161. package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
  162. package/views/3d/webgl-engine/shaders/LineTechniqueConfiguration.js +1 -1
  163. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  164. package/views/support/PromiseQueue.js +1 -1
  165. package/views/support/Scheduler.js +1 -1
  166. package/widgets/BatchAttributeForm/ValueChangeTransaction.js +1 -1
  167. package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
  168. package/widgets/BatchAttributeForm/expressions/ExpressionsModel.js +1 -1
  169. package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
  170. package/widgets/OrientedImageryViewer/OrientedImageryViewerVisibleElements.d.ts +148 -1
  171. package/assets/esri/core/workers/chunks/540f60e31b19d85e9371.js +0 -1
  172. package/assets/esri/core/workers/chunks/55a560fd872f7463b33d.js +0 -1
  173. package/assets/esri/core/workers/chunks/cf6f671823fa6c2a9a5e.js +0 -1
@@ -14,6 +14,7 @@ import type { GeometryUnion, GeometryWithoutMeshUnion } from "../types.js";
14
14
  * @param geometry - The geometry to be simplified.
15
15
  * @returns Returns the simplified geometry, or null. Geometries with non-finite x or y, or infinite Zs return null.
16
16
  * The method will set NaN z values to 0.
17
+ * @since 5.2
17
18
  * @example
18
19
  * // Topologically simplifies a geometry
19
20
  * const simplified = simplifyOGCExecute(polyline);
@@ -42,6 +43,7 @@ export function execute(geometry: GeometryUnion): GeometryWithoutMeshUnion | nul
42
43
  * All the geometries must have the same spatial reference.
43
44
  * @returns Returns the simplified geometry, or null. Geometries with non-finite x or y, or infinite Zs return null.
44
45
  * The method will set NaN z values to 0.
46
+ * @since 5.2
45
47
  */
46
48
  export function simplifyOGCExecuteMany(geometries: GeometryUnion[]): (GeometryWithoutMeshUnion | null | undefined)[];
47
49
 
@@ -81,6 +83,7 @@ export function executeMany(geometries: GeometryUnion[]): (GeometryWithoutMeshUn
81
83
  *
82
84
  * @param geometry - The input geometry.
83
85
  * @returns Returns true if the geometry is simple, otherwise returns false.
86
+ * @since 5.2
84
87
  * @example
85
88
  * // returns true if given geometry is OGC simple
86
89
  * const simple = simplifyOGCIsSimple(polyline);
@@ -126,6 +129,8 @@ export function isSimple(geometry: GeometryUnion): boolean;
126
129
  /**
127
130
  * Indicates if the operator supports input geometries that contain curves.
128
131
  * The value will always be `true`.
132
+ *
133
+ * @since 5.2
129
134
  */
130
135
  export const simplifyOGCSupportsCurves: boolean;
131
136
 
@@ -14,6 +14,7 @@ import type { GeometryUnion, GeometryWithoutMeshUnion } from "../types.js";
14
14
  *
15
15
  * @param geometry - The geometry to be simplified.
16
16
  * @returns Returns the simplified geometry or null.
17
+ * @since 5.2
17
18
  * @example
18
19
  * // Topologically simplifies a geometry
19
20
  * const simplified = simplifyExecute(polyline);
@@ -42,6 +43,7 @@ export function execute(geometry: GeometryUnion): GeometryWithoutMeshUnion | nul
42
43
  * @param geometries - The array of geometries to be simplified,
43
44
  * All the geometries must have the same spatial reference.
44
45
  * @returns Returns an array whose elements may either be simplified geometries or null.
46
+ * @since 5.2
45
47
  */
46
48
  export function simplifyExecuteMany(geometries: GeometryUnion[]): (GeometryWithoutMeshUnion | null | undefined)[];
47
49
 
@@ -86,6 +88,7 @@ export function executeMany(geometries: GeometryUnion[]): (GeometryWithoutMeshUn
86
88
  *
87
89
  * @param geometry - The input geometry.
88
90
  * @returns Returns true if the geometry is simple, otherwise returns false.
91
+ * @since 5.2
89
92
  * @example
90
93
  * // returns true if given geometry is simple
91
94
  * const simple = simplifyIsSimple(polyline);
@@ -135,6 +138,8 @@ export function isSimple(geometry: GeometryUnion): boolean;
135
138
  /**
136
139
  * Indicates if the operator supports input geometries that contain curves.
137
140
  * The value will always be `true`.
141
+ *
142
+ * @since 5.2
138
143
  */
139
144
  export const simplifySupportsCurves: boolean;
140
145
 
@@ -3,6 +3,7 @@ import type { ClonableMixin } from "../../../core/Clonable.js";
3
3
  import type { JSONSupport } from "../../../core/JSONSupport.js";
4
4
  import type { GeographicTransformationStepProperties } from "./GeographicTransformationStep.js";
5
5
 
6
+ /** @since 5.2 */
6
7
  export interface GeographicTransformationProperties {
7
8
  /**
8
9
  * An ordered list of geographic transformation steps that represent the process of transforming coordinates from one geographic coordinate system to another.
@@ -33,6 +34,7 @@ export interface GeographicTransformationProperties {
33
34
  * > Currently, the client-side [projectOperator](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/projectOperator/) only supports
34
35
  * > [equation-based geographic transformations](https://developers.arcgis.com/rest/services-reference/enterprise/using-spatial-references/#transformation-pdfs).
35
36
  *
37
+ * @since 5.2
36
38
  * @since 4.32
37
39
  * @see [projectOperator](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/projectOperator/)
38
40
  * @see [shapePreservingProjectOperator](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/shapePreservingProjectOperator/)
@@ -1,6 +1,7 @@
1
1
  import type { ClonableMixin } from "../../../core/Clonable.js";
2
2
  import type { JSONSupport } from "../../../core/JSONSupport.js";
3
3
 
4
+ /** @since 5.2 */
4
5
  export interface GeographicTransformationStepProperties extends Partial<Pick<GeographicTransformationStep, "isInverse" | "isUsable" | "wkid" | "wkt">> {}
5
6
 
6
7
  /**
@@ -8,6 +9,7 @@ export interface GeographicTransformationStepProperties extends Partial<Pick<Geo
8
9
  * A geographic transformation step can be constructed from a
9
10
  * well-known ID [(wkid)](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/support/GeographicTransformationStep/#wkid) or a well known text [(wkt)](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/support/GeographicTransformationStep/#wkt) that represents a geographic datum transformation.
10
11
  *
12
+ * @since 5.2
11
13
  * @since 4.32
12
14
  * @see [GeographicTransformation](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/support/GeographicTransformation/)
13
15
  * @see [Spatial References](https://developers.arcgis.com/documentation/spatial-references/)
@@ -5,6 +5,7 @@ import type Point from "../../Point.js";
5
5
  * [affineTransformOperator](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/affineTransformOperator/).
6
6
  * All transformations are applied in the spatial reference units of the input geometries.
7
7
  *
8
+ * @since 5.2
8
9
  * @since 4.31
9
10
  */
10
11
  export default class Transformation {
@@ -166,7 +167,11 @@ export default class Transformation {
166
167
  shift(x: number, y: number): this;
167
168
  }
168
169
 
169
- /** Object returned from the [calculateErrors()](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/support/Transformation/#calculateErrors) method. */
170
+ /**
171
+ * Object returned from the [calculateErrors()](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/support/Transformation/#calculateErrors) method.
172
+ *
173
+ * @since 5.2
174
+ */
170
175
  export interface ErrorResult {
171
176
  /** The root mean square (`rms`) of the 'average' distance error between the specified `output` points and the transformed `input` points. */
172
177
  rms: number;
@@ -19,6 +19,7 @@ import type GeographicTransformationStep from "./GeographicTransformationStep.js
19
19
  * Indicates if all dependencies of this module have been loaded.
20
20
  *
21
21
  * @returns Returns `true` if this module's dependencies have been loaded.
22
+ * @since 5.2
22
23
  */
23
24
  export function isLoaded(): boolean;
24
25
 
@@ -26,6 +27,7 @@ export function isLoaded(): boolean;
26
27
  * Loads this module's dependencies. This method must be called first if `isLoaded` returns `false`.
27
28
  *
28
29
  * @returns Resolves when the dependencies have been loaded.
30
+ * @since 5.2
29
31
  * @see [isLoaded()](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/support/geographicTransformationUtils/#isLoaded)
30
32
  */
31
33
  export function load(): Promise<void>;
@@ -55,6 +57,7 @@ export function load(): Promise<void>;
55
57
  * When set to `true`, the function may return an unusable grid-based transformation.
56
58
  * @returns Returns the default geographic transformation for the given parameters.
57
59
  * If no transformation is required or there are no usable transformations, then `null` is returned.
60
+ * @since 5.2
58
61
  * @example
59
62
  * const cs1 = new SpatialReference({
60
63
  * wkid: 4272 //PE_GCS_ED_1950
@@ -103,6 +106,7 @@ export function getTransformation(inSpatialReference: SpatialReference, outSpati
103
106
  * When set to `true`, the function may return unusable grid-based transformations.
104
107
  * @returns Returns an array containing the matching geographic transformations.
105
108
  * The list will be empty if the provided extent lies out of the area of use for the input spatial reference, or if no transformation is required, or there are no usable transformations.
109
+ * @since 5.2
106
110
  * @example
107
111
  * const cs1 = new SpatialReference({
108
112
  * wkid: 4272 //PE_GCS_ED_1950
@@ -18,6 +18,7 @@ import type { GeometryUnion, GeometryWithoutMeshUnion } from "../types.js";
18
18
  * @param leftGeometry - The first geometry to be XOR'd.
19
19
  * @param rightGeometry - The second geometry to be XOR'd.
20
20
  * @returns Returns the symmetric difference of the two geometries. The result has the higher of dimensions of the two geometries.
21
+ * @since 5.2
21
22
  * @example
22
23
  * // Calculate the symmetric difference of two polygons.
23
24
  * const differencePolygon = symmetricDifferenceExecute(polygon1, polygon2);
@@ -45,6 +46,7 @@ export function execute(leftGeometry: GeometryUnion, rightGeometry: GeometryUnio
45
46
  * @param inputGeometries - The set of geometries to be XOR'd by the `rightGeometry`.
46
47
  * @param rightGeometry - The geometry being XOR'd with the `inputGeometries`.
47
48
  * @returns Returns an array of the result geometries.
49
+ * @since 5.2
48
50
  */
49
51
  export function symmetricDifferenceExecuteMany(inputGeometries: GeometryUnion[], rightGeometry: GeometryUnion): GeometryWithoutMeshUnion[];
50
52
 
@@ -63,6 +65,8 @@ export function executeMany(inputGeometries: GeometryUnion[], rightGeometry: Geo
63
65
  /**
64
66
  * Indicates if the operator supports input geometries that contain curves.
65
67
  * The value will always be `true`.
68
+ *
69
+ * @since 5.2
66
70
  */
67
71
  export const symmetricDifferenceSupportsCurves: boolean;
68
72
 
@@ -12,6 +12,7 @@ import type { GeometryUnion } from "../types.js";
12
12
  *
13
13
  * @param geometry - The geometry to accelerate.
14
14
  * @returns Returns `true` if the geometry was successfully accelerated.
15
+ * @since 5.2
15
16
  */
16
17
  export function touchesAccelerateGeometry(geometry: GeometryUnion): boolean;
17
18
 
@@ -32,6 +33,7 @@ export function accelerateGeometry(geometry: GeometryUnion): boolean;
32
33
  * @param geometry1 - The base geometry that is tested for the "touches" relationship with `geometry2`.
33
34
  * @param geometry2 - The comparison geometry that is tested for the "touches" relationship with `geometry1`.
34
35
  * @returns Returns `true` if the two geometries touch.
36
+ * @since 5.2
35
37
  * @example
36
38
  * // Returns true if the line vertex touches the edge of the polygon
37
39
  * const isTouching = touchesExecute(polygon, line);
@@ -56,6 +58,8 @@ export function execute(geometry1: GeometryUnion, geometry2: GeometryUnion): boo
56
58
  /**
57
59
  * Indicates if the operator supports input geometries that contain curves.
58
60
  * The value will always be `true`.
61
+ *
62
+ * @since 5.2
59
63
  */
60
64
  export const touchesSupportsCurves: boolean;
61
65
 
@@ -9,6 +9,7 @@ import type GeographicTransformation from "./support/GeographicTransformation.js
9
9
  * [proximityGetNearestVertices()](https://developers.arcgis.com/javascript/latest/references/core/geometry/operators/proximityOperator/#proximityGetNearestVertices) methods.
10
10
  *
11
11
  * @since 5.0
12
+ * @since 5.2
12
13
  */
13
14
  export interface ProximityResult {
14
15
  /**
@@ -13,6 +13,7 @@ import type { GeometryUnion, GeometryWithoutMeshUnion } from "../types.js";
13
13
  * @param geometry1 - The first geometry to union with.
14
14
  * @param geometry2 - The second geometry to union with.
15
15
  * @returns Returns the union of the two geometries as a geometry or null.
16
+ * @since 5.2
16
17
  * @example
17
18
  * // Return the union of two polygons
18
19
  * const union = unionExecute(polygon1, polygon2);
@@ -40,6 +41,7 @@ export function execute(geometry1: GeometryUnion, geometry2: GeometryUnion): Geo
40
41
  * @param geometries - The array of geometries to union.
41
42
  * All the geometries must have the same spatial reference.
42
43
  * @returns Returns the union of `geometries` as a geometry or null.
44
+ * @since 5.2
43
45
  */
44
46
  export function unionExecuteMany(geometries: GeometryUnion[]): GeometryWithoutMeshUnion | null | undefined;
45
47
 
@@ -58,6 +60,8 @@ export function executeMany(geometries: GeometryUnion[]): GeometryWithoutMeshUni
58
60
  /**
59
61
  * Indicates if the operator supports input geometries that contain curves.
60
62
  * The value will always be `true`.
63
+ *
64
+ * @since 5.2
61
65
  */
62
66
  export const unionSupportsCurves: boolean;
63
67
 
@@ -14,6 +14,7 @@ import type { GeometryUnion } from "../types.js";
14
14
  *
15
15
  * @param geometry - The geometry to accelerate.
16
16
  * @returns Returns `true` if the geometry was successfully accelerated.
17
+ * @since 5.2
17
18
  */
18
19
  export function withinAccelerateGeometry(geometry: GeometryUnion): boolean;
19
20
 
@@ -34,6 +35,7 @@ export function accelerateGeometry(geometry: GeometryUnion): boolean;
34
35
  * @param inner - The base geometry that is tested for the "within" relationship with `outer`.
35
36
  * @param outer - The comparison geometry that is tested for the "contains" relationship with `inner`.
36
37
  * @returns Returns `true` if `inner` is within `outer`.
38
+ * @since 5.2
37
39
  * @example
38
40
  * Returns true if a geometry is completely within another
39
41
  * const isWithin = withinExecute(polygon1, polygon2);
@@ -58,6 +60,8 @@ export function execute(inner: GeometryUnion, outer: GeometryUnion): boolean;
58
60
  /**
59
61
  * Indicates if the operator supports input geometries that contain curves.
60
62
  * The value will always be `true`.
63
+ *
64
+ * @since 5.2
61
65
  */
62
66
  export const withinSupportsCurves: boolean;
63
67
 
package/kernel.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let r,s=e;function i(o){r=o}function t(e){const s=r?.findCredential(e);return s?.token?o(e,"token",s.token):e}s="5.2.0-next.130",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,s as fullVersion,r as id,i as setId,e as version};
2
+ import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let r,s=e;function i(o){r=o}function t(e){const s=r?.findCredential(e);return s?.token?o(e,"token",s.token):e}s="5.2.0-next.134",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,s as fullVersion,r as id,i as setId,e as version};
@@ -69,7 +69,6 @@ export interface GaussianSplatLayerProperties extends LayerProperties, APIKeyMix
69
69
  * >
70
70
  * > **Known Limitations**
71
71
  * >
72
- * > * Currently, Shadow Cast analysis, Viewshed and Volume Measurement are not supported.
73
72
  * > * When using the [Slice component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-slice/), the slice plane will, contrary to the behavior described in [`tiltEnabled`](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-slice/#tiltEnabled), not automatically align to the underlying surface of a Gaussian Splat layer due to the absence of surface normals.
74
73
  * > * Gaussian splat layers are not guaranteed to always draw correctly in a local scene using WGS84 as spatial reference
75
74
  * > (WKID 4326).
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../core/Error.js";import r from"../core/Logger.js";import{MultiOriginJSONSupportMixin as s}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as o}from"../core/promiseUtils.js";import{property as i,subclass as a}from"../core/accessorSupport/decorators.js";import n from"../geometry/SpatialReference.js";import{getInfo as l}from"../geometry/support/spatialReferenceUtils.js";import p from"./Layer.js";import{BlendLayer as c}from"./mixins/BlendLayer.js";import{PortalLayer as m}from"./mixins/PortalLayer.js";import{RasterJobHandlerMixin as f}from"./mixins/RasterJobHandlerMixin.js";import{ScaleRangeLayer as h}from"./mixins/ScaleRangeLayer.js";import u from"./raster/datasets/GeospatialPDFRaster.js";import{clip as d}from"./raster/functions/clipUtils.js";import{sanitizeUrl as y}from"./support/arcgisLayerUrl.js";import{interpolationKebab as g}from"./support/rasterEnums.js";import x from"./support/TileInfo.js";import{enumeration as b}from"../core/accessorSupport/decorators/enumeration.js";let R=class extends(c(h(m(f(s(p)))))){constructor(e){super(e),this.interpolation="bilinear",this.serviceRasterInfo=null,this._frame=null,this.clippedToNeatline=!0,this.neatlineVisible=!0,this.raster=null,this.spatialReference=null,this.type="geospatial-pdf"}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["PDF"],supportsData:!1},e).catch(o).then(()=>this._openRaster(e?.signal))),Promise.resolve(this)}destroy(){this._shutdownJobHandler(),this.raster?.destroy()}get fullExtent(){return this.serviceRasterInfo?.extent}set url(e){this._set("url",y(e,r.getLogger(this)))}async fetchImageBitmapTile(){throw new t("geospatial-pdf-layer:fetch-image-bitmap-tile","GeospatialPDFLayer does not expose pre-rendered image tile URLs.")}async fetchPixels(e,t,r,s={}){return _(this),await this._initJobHandler(),this.raster.fetchPixels(e,Math.round(t),Math.round(r),s)}async fetchTile(e,r,s,o={}){if(_(this),o.requestAsImageElement)throw new t("geospatial-pdf-layer:fetch-tile","GeospatialPDFLayer does not support requestAsImageElement.");await this._initJobHandler();const i=await this.raster.fetchTile(e,r,s,o);return this.clippedToNeatline&&i.pixelBlock&&this._frame&&i.srcExtent&&(i.pixelBlock=await d(i.pixelBlock,i.srcExtent,this._frame.sourceNeatlinePolygon)),i}getCompatibleFullExtent(e){return this.loaded?(this._compatibleFullExtent?.spatialReference.equals(e)||(this._compatibleFullExtent=this.raster.computeExtent(e)),this._compatibleFullExtent):null}getCompatibleTileInfo(e,t,r=!1){if(!this.loaded||null==t)return null;if(r&&e.equals(this.spatialReference))return this.tileInfo;const s=l(e);return x.create({size:256,spatialReference:e,origin:s?{x:s.origin[0],y:s.origin[1]}:{x:t.xmin,y:t.ymax}})}getRawDisplayBandIds(){return _(this),[0,1,2]}async _initJobHandler(){if(!this._rasterJobHandler)return super._initJobHandler().then(()=>{this._rasterJobHandler&&(_(this),this.raster.rasterJobHandler=this._rasterJobHandler)}).catch(()=>{})}async _openRaster(e){const r=new u({url:this.url});if(await r.open({signal:e}),!r.rasterInfo)throw r.destroy(),new t("geospatialpdf-layer:load","cannot load resources on "+this.url);const{rasterInfo:s}=r;this._set("serviceRasterInfo",s),this.setAtOrigin("spatialReference",s.spatialReference,"service"),this.setAtOrigin("tileInfo",r.rasterInfo.storageInfo.tileInfo,"service"),this._frame=r.frame,this.raster=r}_shutdownJobHandler(){super._shutdownJobHandler(),this.raster&&(this.raster.rasterJobHandler=null)}};function _(e){if(!e.raster||!e.serviceRasterInfo)throw new t("imagery-tile","no raster")}e([b(g)],R.prototype,"interpolation",void 0),e([i()],R.prototype,"serviceRasterInfo",void 0),e([i({clonable:!1})],R.prototype,"_compatibleFullExtent",void 0),e([i({type:Boolean})],R.prototype,"clippedToNeatline",void 0),e([i({json:{read:!1}})],R.prototype,"fullExtent",null),e([i({type:Boolean})],R.prototype,"neatlineVisible",void 0),e([i()],R.prototype,"raster",void 0),e([i({readOnly:!0,type:n,json:{read:!1}})],R.prototype,"spatialReference",void 0),e([i({type:x})],R.prototype,"tileInfo",void 0),e([i({readOnly:!0,value:"geospatial-pdf"})],R.prototype,"type",void 0),e([i()],R.prototype,"url",null),R=e([a("esri.layers.GeospatialPDFLayer")],R);const j=R;export{j as default};
2
+ import{__decorate as e}from"tslib";import t from"../core/Error.js";import r from"../core/Logger.js";import{MultiOriginJSONSupportMixin as s}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as i}from"../core/promiseUtils.js";import{property as o,subclass as a}from"../core/accessorSupport/decorators.js";import l from"../geometry/SpatialReference.js";import{getInfo as n}from"../geometry/support/spatialReferenceUtils.js";import p from"./Layer.js";import{BlendLayer as c}from"./mixins/BlendLayer.js";import{PortalLayer as f}from"./mixins/PortalLayer.js";import{RasterJobHandlerMixin as h}from"./mixins/RasterJobHandlerMixin.js";import{ScaleRangeLayer as m}from"./mixins/ScaleRangeLayer.js";import d from"./raster/datasets/GeospatialPDFRaster.js";import{clip as u}from"./raster/functions/clipUtils.js";import{sanitizeUrl as y}from"./support/arcgisLayerUrl.js";import g from"./support/TileInfo.js";let x=class extends(c(m(f(h(s(p)))))){constructor(e){super(e),this.serviceRasterInfo=null,this._frame=null,this.clippedToNeatline=!0,this.neatlineVisible=!0,this.raster=null,this.spatialReference=null,this.type="geospatial-pdf"}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["PDF"],supportsData:!1},e).catch(i).then(()=>this._openRaster(e?.signal))),Promise.resolve(this)}destroy(){this._shutdownJobHandler(),this.raster?.destroy()}get fullExtent(){return this.serviceRasterInfo?.extent}set url(e){this._set("url",y(e,r.getLogger(this)))}async fetchImageBitmapTile(){throw new t("geospatial-pdf-layer:fetch-image-bitmap-tile","GeospatialPDFLayer does not expose pre-rendered image tile URLs.")}async fetchPixels(e,t,r,s={}){return b(this),await this._initJobHandler(),this.raster.fetchPixels(e,Math.round(t),Math.round(r),s)}async fetchTile(e,r,s,i={}){if(b(this),i.requestAsImageElement)throw new t("geospatial-pdf-layer:fetch-tile","GeospatialPDFLayer does not support requestAsImageElement.");await this._initJobHandler();const o=await this.raster.fetchTile(e,r,s,i);return this.clippedToNeatline&&o.pixelBlock&&this._frame&&o.srcExtent&&(o.pixelBlock=await u(o.pixelBlock,o.srcExtent,this._frame.sourceNeatlinePolygon)),o}getCompatibleFullExtent(e){return this.loaded?(this._compatibleFullExtent?.spatialReference.equals(e)||(this._compatibleFullExtent=this.raster.computeExtent(e)),this._compatibleFullExtent):null}getCompatibleTileInfo(e,t,r=!1){if(!this.loaded||null==t)return null;if(r&&e.equals(this.spatialReference))return this.tileInfo;const s=n(e);return g.create({size:256,spatialReference:e,origin:s?{x:s.origin[0],y:s.origin[1]}:{x:t.xmin,y:t.ymax}})}getRawDisplayBandIds(){return b(this),[0,1,2]}async _initJobHandler(){if(!this._rasterJobHandler)return super._initJobHandler().then(()=>{this._rasterJobHandler&&(b(this),this.raster.rasterJobHandler=this._rasterJobHandler)}).catch(()=>{})}async _openRaster(e){const r=new d({url:this.url});if(await r.open({signal:e}),!r.rasterInfo)throw r.destroy(),new t("geospatialpdf-layer:load","cannot load resources on "+this.url);const{rasterInfo:s}=r;this._set("serviceRasterInfo",s),this.setAtOrigin("spatialReference",s.spatialReference,"service"),this.setAtOrigin("tileInfo",r.rasterInfo.storageInfo.tileInfo,"service"),this._frame=r.frame,this.raster=r}_shutdownJobHandler(){super._shutdownJobHandler(),this.raster&&(this.raster.rasterJobHandler=null)}};function b(e){if(!e.raster||!e.serviceRasterInfo)throw new t("imagery-tile","no raster")}e([o()],x.prototype,"serviceRasterInfo",void 0),e([o({clonable:!1})],x.prototype,"_compatibleFullExtent",void 0),e([o({type:Boolean})],x.prototype,"clippedToNeatline",void 0),e([o({json:{read:!1}})],x.prototype,"fullExtent",null),e([o({type:Boolean})],x.prototype,"neatlineVisible",void 0),e([o()],x.prototype,"raster",void 0),e([o({readOnly:!0,type:l,json:{read:!1}})],x.prototype,"spatialReference",void 0),e([o({type:g})],x.prototype,"tileInfo",void 0),e([o({readOnly:!0,value:"geospatial-pdf"})],x.prototype,"type",void 0),e([o()],x.prototype,"url",null),x=e([a("esri.layers.GeospatialPDFLayer")],x);const R=x;export{R as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "5.2.0-next.132",
3
+ "version": "5.2.0-next.134",
4
4
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
5
5
  "keywords": [
6
6
  "ArcGIS",
@@ -20,7 +20,7 @@
20
20
  "license": "SEE LICENSE IN LICENSE.md",
21
21
  "dependencies": {
22
22
  "@amcharts/amcharts5": "~5.20.8",
23
- "@arcgis/toolkit": "5.2.0-next.132",
23
+ "@arcgis/toolkit": "5.2.0-next.134",
24
24
  "@esri/arcgis-html-sanitizer": "~4.2.0-next.2",
25
25
  "@esri/calcite-components": "^5.2.0-next.80",
26
26
  "@vaadin/grid": "~25.3.0",
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- const f="20261004",c="a0931fa3cb5f2933fccfffe445affdbc520a2e15";export{f as buildDate,c as revision};
2
+ const e="20261005",d="d8e1020d055e2e95a1e7d4c944f943e395d42cb3";export{e as buildDate,d as revision};
@@ -70,13 +70,6 @@ export default class LineSymbol3D extends Symbol3D {
70
70
  * Currently, the only affected metric is the [LineSymbol3DLayer.size](https://developers.arcgis.com/javascript/latest/references/core/symbols/LineSymbol3DLayer/#size) property. This property does not
71
71
  * affect [PathSymbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/PathSymbol3DLayer/) symbol layers, whose dimensions are always interpreted in meters.
72
72
  *
73
- * > [!WARNING]
74
- * >
75
- * > **Known limitation**
76
- * >
77
- * > When this property is `true`, [LineSymbol3DLayer](https://developers.arcgis.com/javascript/latest/references/core/symbols/LineSymbol3DLayer/) symbol layers are displayed only for
78
- * > [Polyline](https://developers.arcgis.com/javascript/latest/references/core/geometry/Polyline/) geometries in layers with `on-the-ground` elevation mode in a [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
79
- *
80
73
  * @default false
81
74
  * @since 5.2
82
75
  */
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{create as e}from"../../../../geometry/support/aaBoundingRect.js";import t from"../../../../layers/support/TileInfo.js";import{tileSizeInTileUnits as s,tileSizeInPixels as r}from"./constants.js";import{SymbolFader as i}from"./decluttering/SymbolFader.js";import{writeOpacityToBuffers as o}from"./decluttering/util.js";import{RenderableTile as l}from"../webgl/RenderableTile.js";import n from"../webgl/TileContainer.js";import{simplePipelineState as a}from"../webgl/shaderGraph/utils.js";import{VTLTechniquesRepo as d}from"../webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js";import h from"../../tiling/TileCoverage.js";import c from"../../tiling/TileKey.js";const u=1e-6;function y(e,t){if(e){const s=e.getLayoutProperty("visibility");if(!s||1!==s.getValue()&&(void 0===e.minzoom||e.minzoom<t+u)&&(void 0===e.maxzoom||e.maxzoom>=t-u))return!0}return!1}class m extends n{constructor(e){super(e),this._backgroundTiles=[],this._techniques=new d,this._computeDisplayInfoView(e),this._techniques.startup()}destroy(){super.destroy(),this.removeAllChildren(),this._spriteMosaic?.dispose(),this._spriteMosaic=null,null!=this._symbolFader&&(this._symbolFader.clear(),this._symbolFader=null);const e=this.stage?.context;e&&this._techniques.shutdown(e),this._styleRepository=null;for(const t of this._backgroundTiles)t.destroy();this._backgroundTiles=[]}get fading(){return this._symbolFader?.fading??!1}get symbolFader(){return this._symbolFader}get symbolRepository(){return this._symbolFader?.symbolRepository}setStyleResources(e,t,r,l){if(this._spriteMosaic=e,this._glyphMosaic=t,this._styleRepository=r,this.tilingScheme=l,this._computeDisplayInfoView(l),null==this._symbolFader){const e=(e,t)=>{e.allSymbolsFadingOut=!0,e.lastOpacityUpdate=t,o(e,t,!0),e.decluttered=!0,e.requestRender()};this._symbolFader=new i("vector-tile",this._styleRepository,e,this.children,s)}this._symbolFader.styleRepository=r}setSpriteMosaic(e){this._spriteMosaic?.dispose(),this._spriteMosaic=e}deleteStyleLayers(e){null!=this._symbolFader&&this._symbolFader.deleteStyleLayers(e)}createRenderParams(e){return{...super.createRenderParams(e),renderPass:null,styleLayer:null,styleLayerUID:-1,glyphMosaic:this._glyphMosaic,spriteMosaic:this._spriteMosaic}}doRender(e){const{drawPhase:t}=e,s=1===t||32===t;this.visible&&s&&void 0!==this._spriteMosaic&&super.doRender(e)}addChild(e){return super.addChild(e),null!=this._symbolFader?this._symbolFader.addTile(e):e.decluttered=!0,this.requestRender(),e}removeChild(e){return null!=this._symbolFader&&this._symbolFader.removeTile(e),this.requestRender(),super.removeChild(e)}renderChildren(e){const{drawPhase:t}=e;32!==t?this._doRender(e):super.renderChildren(e)}removeAllChildren(){for(let e=0;e<this.children.length;e++){const t=this.children[e];null!=this._symbolFader&&this._symbolFader.removeTile(t),t.dispose()}super.removeAllChildren()}getStencilTarget(){return this.children.filter(e=>e.neededForCoverage&&e.hasData())}restartDeclutter(){null!=this._symbolFader&&this._symbolFader.restartDeclutter()}_doRender(e){const{context:t,painter:s,state:r}=e,i=this._styleRepository;if(!i)return;const o=i.layers,l=this._displayInfo.scaleToZoom(r.scale);this.children.forEach(e=>e.disposeLayerData()),super.renderChildren(e),i.backgroundBucketIds.length>0&&(e.renderPass="background",this._renderBackgroundLayers(e,i.backgroundBucketIds,l)),1===e.drawPhase&&this._fade(l,r);const n=this.children.filter(t=>(1===e.drawPhase&&t.fader.fade()<1&&this.requestRender(),t.visible&&t.hasData()));if(n&&0!==n.length){for(const e of n)e.triangleCount=0;t.setClearDepth(1),t.clear(256),s.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:{write:!1,test:{compare:514,op:{fail:7680,zFail:7680,zPass:7681},mask:255}},depth:{write:!1,test:515}}),e.renderPass="translucent";for(let t=0;t<o.length;t++)this._renderStyleLayer(o[t],e,n);t.bindVAO(null),s.setPipelineState(a);for(const e of n)e.debugInfo.display.triangleCount=e.triangleCount}else t.bindVAO(null)}_fade(e,t){null!=this._symbolFader&&(this._symbolFader.update(e,t)||this.requestRender())}_renderStyleLayer(e,t,s){const{displayLevel:r,renderPass:i}=t;if(void 0===e)return;const o=e.getLayoutProperty("visibility");if(o&&1===o.getValue())return;switch(e.type){case 0:return;case 1:case 2:case 4:case 3:if("translucent"!==i)return}if(s=3===e.type?s.filter(e=>e.decluttered):s.filter(e=>e.neededForCoverage),3!==e.type&&(0===s.length||void 0!==e.minzoom&&e.minzoom>=r+u||void 0!==e.maxzoom&&e.maxzoom<r-u))return;const l=e.uid;t.styleLayerUID=l,t.styleLayer=e;const n=this._techniques.getTechnique(e.type);null!=n&&n.render(t,{tiles:s})}_renderBackgroundLayers(e,t,s){const{displayLevel:r,state:i}=e,o=this._styleRepository;let l=!1;for(const h of t){const e=o.getLayerById(h);if(e&&0===e.type&&y(o.getLayerById(h),s)){l=!0;break}}if(!l)return;const n=this.tilingScheme.getTileCoverage(e.state,0,!0,"smallest"),{spans:a,lodInfo:d}=n,{level:m}=d,p=[];let g=0;for(const{row:h,colFrom:u,colTo:y}of a)for(let e=u;e<=y;e++){const t=new c(m,h,d.normalizeCol(e),d.getWorldForColumn(e)),s=this._getOrCreateBackgroundTile(g,t);s.setTransform(i),p.push(s),g++}const f=this._techniques.getTechnique(0);for(const h of t){const t=o.getLayerById(h);0!==t.type||!y(t,s)||void 0!==t.minzoom&&t.minzoom>=r+u||void 0!==t.maxzoom&&t.maxzoom<r-u||(e.styleLayerUID=t.uid,e.styleLayer=t,f.render(e,{tiles:p}))}h.pool.release(n)}_getOrCreateBackgroundTile(t,i){const o=this._backgroundTiles[t];if(o?.key.equals(i))return o;const n=this.tilingScheme.getTileBounds(e(),i),a=this.tilingScheme.getTileResolution(i.level),d=new l(i,a,n[0],n[3],r,r,s,s);return o?(o.destroy(),this._backgroundTiles[t]=d):this._backgroundTiles.push(d),d}_computeDisplayInfoView(e){let s=e.tileInfo.lods[0].scale;const i=Math.max(25,e.tileInfo.lods.length),o=[];for(let t=0;t<=i;t++)o.push(s),s/=2;this._displayInfo=t.create({scales:o,size:r,spatialReference:e.spatialReference,numLODs:i})}}export{m as VectorTileContainer};
2
+ import{create as e}from"../../../../geometry/support/aaBoundingRect.js";import t from"../../../../layers/support/TileInfo.js";import{tileSizeInTileUnits as s,tileSizeInPixels as r}from"./constants.js";import{SymbolFader as i}from"./decluttering/SymbolFader.js";import{writeOpacityToBuffers as o}from"./decluttering/util.js";import{RenderableTile as l}from"../webgl/RenderableTile.js";import n from"../webgl/TileContainer.js";import{simplePipelineState as a}from"../webgl/shaderGraph/utils.js";import{VTLTechniquesRepo as d}from"../webgl/shaderGraph/techniques/vectorTiles/VTLTechniques.js";import h from"../../tiling/TileCoverage.js";import c from"../../tiling/TileKey.js";const u=1e-6;function y(e,t){if(e){const s=e.getLayoutProperty("visibility");if(!s||1!==s.getValue()&&(void 0===e.minzoom||e.minzoom<t+u)&&(void 0===e.maxzoom||e.maxzoom>=t-u))return!0}return!1}class m extends n{constructor(e){super(e),this._backgroundTiles=[],this._techniques=new d,this._computeDisplayInfoView(e),this._techniques.startup()}destroy(){super.destroy(),this.removeAllChildren(),this._spriteMosaic?.dispose(),this._spriteMosaic=null,null!=this._symbolFader&&(this._symbolFader.clear(),this._symbolFader=null);const e=this.stage?.context;e&&this._techniques.shutdown(e),this._styleRepository=null;for(const t of this._backgroundTiles)t.destroy();this._backgroundTiles=[]}get fading(){return this._symbolFader?.fading??!1}get symbolFader(){return this._symbolFader}get symbolRepository(){return this._symbolFader?.symbolRepository}setStyleResources(e,t,r,l){if(this._spriteMosaic=e,this._glyphMosaic=t,this._styleRepository=r,this.tilingScheme=l,this._computeDisplayInfoView(l),null==this._symbolFader){const e=(e,t)=>{e.allSymbolsFadingOut=!0,e.lastOpacityUpdate=t,o(e,t,!0),e.decluttered=!0,e.requestRender()};this._symbolFader=new i("vector-tile",this._styleRepository,e,this.children,s)}this._symbolFader.styleRepository=r}setSpriteMosaic(e){this._spriteMosaic?.dispose(),this._spriteMosaic=e}deleteStyleLayers(e){null!=this._symbolFader&&this._symbolFader.deleteStyleLayers(e)}createRenderParams(e){return{...super.createRenderParams(e),renderPass:null,styleLayer:null,styleLayerUID:-1,glyphMosaic:this._glyphMosaic,spriteMosaic:this._spriteMosaic,displayLevel:this._displayInfo.scaleToZoom(e.state.scale)}}doRender(e){const{drawPhase:t}=e,s=1===t||32===t;this.visible&&s&&void 0!==this._spriteMosaic&&super.doRender(e)}addChild(e){return super.addChild(e),null!=this._symbolFader?this._symbolFader.addTile(e):e.decluttered=!0,this.requestRender(),e}removeChild(e){return null!=this._symbolFader&&this._symbolFader.removeTile(e),this.requestRender(),super.removeChild(e)}renderChildren(e){const{drawPhase:t}=e;32!==t?this._doRender(e):super.renderChildren(e)}removeAllChildren(){for(let e=0;e<this.children.length;e++){const t=this.children[e];null!=this._symbolFader&&this._symbolFader.removeTile(t),t.dispose()}super.removeAllChildren()}getStencilTarget(){return this.children.filter(e=>e.neededForCoverage&&e.hasData())}restartDeclutter(){null!=this._symbolFader&&this._symbolFader.restartDeclutter()}_doRender(e){const{context:t,painter:s,state:r}=e,i=this._styleRepository;if(!i)return;const o=i.layers,l=this._displayInfo.scaleToZoom(r.scale);this.children.forEach(e=>e.disposeLayerData()),super.renderChildren(e),i.backgroundBucketIds.length>0&&(e.renderPass="background",this._renderBackgroundLayers(e,i.backgroundBucketIds,l)),1===e.drawPhase&&this._fade(l,r);const n=this.children.filter(t=>(1===e.drawPhase&&t.fader.fade()<1&&this.requestRender(),t.visible&&t.hasData()));if(n&&0!==n.length){for(const e of n)e.triangleCount=0;t.setClearDepth(1),t.clear(256),s.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:{write:!1,test:{compare:514,op:{fail:7680,zFail:7680,zPass:7681},mask:255}},depth:{write:!1,test:515}}),e.renderPass="translucent";for(let t=0;t<o.length;t++)this._renderStyleLayer(o[t],e,n);t.bindVAO(null),s.setPipelineState(a);for(const e of n)e.debugInfo.display.triangleCount=e.triangleCount}else t.bindVAO(null)}_fade(e,t){null!=this._symbolFader&&(this._symbolFader.update(e,t)||this.requestRender())}_renderStyleLayer(e,t,s){const{displayLevel:r,renderPass:i}=t;if(void 0===e)return;const o=e.getLayoutProperty("visibility");if(o&&1===o.getValue())return;switch(e.type){case 0:return;case 1:case 2:case 4:case 3:if("translucent"!==i)return}if(s=3===e.type?s.filter(e=>e.decluttered):s.filter(e=>e.neededForCoverage),3!==e.type&&(0===s.length||void 0!==e.minzoom&&e.minzoom>=r+u||void 0!==e.maxzoom&&e.maxzoom<r-u))return;const l=e.uid;t.styleLayerUID=l,t.styleLayer=e;const n=this._techniques.getTechnique(e.type);null!=n&&n.render(t,{tiles:s})}_renderBackgroundLayers(e,t,s){const{displayLevel:r,state:i}=e,o=this._styleRepository;let l=!1;for(const h of t){const e=o.getLayerById(h);if(e&&0===e.type&&y(o.getLayerById(h),s)){l=!0;break}}if(!l)return;const n=this.tilingScheme.getTileCoverage(e.state,0,!0,"smallest"),{spans:a,lodInfo:d}=n,{level:m}=d,p=[];let g=0;for(const{row:h,colFrom:u,colTo:y}of a)for(let e=u;e<=y;e++){const t=new c(m,h,d.normalizeCol(e),d.getWorldForColumn(e)),s=this._getOrCreateBackgroundTile(g,t);s.setTransform(i),p.push(s),g++}const f=this._techniques.getTechnique(0);for(const h of t){const t=o.getLayerById(h);0!==t.type||!y(t,s)||void 0!==t.minzoom&&t.minzoom>=r+u||void 0!==t.maxzoom&&t.maxzoom<r-u||(e.styleLayerUID=t.uid,e.styleLayer=t,f.render(e,{tiles:p}))}h.pool.release(n)}_getOrCreateBackgroundTile(t,i){const o=this._backgroundTiles[t];if(o?.key.equals(i))return o;const n=this.tilingScheme.getTileBounds(e(),i),a=this.tilingScheme.getTileResolution(i.level),d=new l(i,a,n[0],n[3],r,r,s,s);return o?(o.destroy(),this._backgroundTiles[t]=d):this._backgroundTiles.push(d),d}_computeDisplayInfoView(e){let s=e.tileInfo.lods[0].scale;const i=Math.max(25,e.tileInfo.lods.length),o=[];for(let t=0;t<=i;t++)o.push(s),s/=2;this._displayInfo=t.create({scales:o,size:r,spatialReference:e.spatialReference,numLODs:i})}}export{m as VectorTileContainer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../core/Logger.js";import{isAbortError as s}from"../../../core/promiseUtils.js";import{watch as i}from"../../../core/reactiveUtils.js";import{property as r,subclass as a}from"../../../core/accessorSupport/decorators.js";import{LayerView2D as o}from"./LayerView2D.js";import h from"./imagery/ImageryTileView2D.js";import d from"../../layers/ImageryTileLayerView.js";import{RefreshableLayerView as l}from"../../layers/RefreshableLayerView.js";let c=class extends(l(o(d))){constructor(){super(...arguments),this.subview=null}get displayParameters(){const{layer:e}=this,t=this._get("displayParameters");return e.visible?{interpolation:e.interpolation,clipToNeatline:e.clippedToNeatline}:t}update(e){this.subview?.update(e),this.notifyChange("updating")}isUpdating(){return!this.subview||this.subview.updating}attach(){this.layer.increaseRasterJobHandlerUsage();const e=new h({layer:this.layer,layerView:this,scheduler:this.scheduler});e.useWebGLForProcessing=!0,e.useProgressiveUpdate=!0,this._attachSubview(e),this.subview=e,this.requestUpdate(),this.addAttachHandles([i(()=>this.layer.clippedToNeatline,()=>{const e=this.subview.redrawOrRefetch({refetch:!0,reprocess:!1}).catch(e=>{s(e)||t.getLogger(this).error(e)});this._updatingHandles.addPromise(e)})])}detach(){this.layer.decreaseRasterJobHandlerUsage(),this._detachSubview(this.subview),this.subview?.destroy(),this.subview=null}viewChange(){this.requestUpdate()}moveEnd(){this.subview.moveEnd()}doRefresh(){return this.subview?this.subview.doRefresh():Promise.resolve()}_attachSubview(e){e&&!e.attached&&(e.attach(),e.attached=!0,this.container.addChildAt(e.container,0))}_detachSubview(e){e?.attached&&(this.container.removeChild(e.container),e.detach(),e.attached=!1)}};e([r()],c.prototype,"subview",void 0),e([r({readOnly:!0})],c.prototype,"displayParameters",null),c=e([a("esri.views.2d.layers.GeospatialPDFLayerView2D")],c);const n=c;export{n as default};
2
+ import{__decorate as e}from"tslib";import t from"../../../core/Logger.js";import{isAbortError as s}from"../../../core/promiseUtils.js";import{watch as i}from"../../../core/reactiveUtils.js";import{property as r,subclass as a}from"../../../core/accessorSupport/decorators.js";import{LayerView2D as o}from"./LayerView2D.js";import h from"./imagery/ImageryTileView2D.js";import d from"../../layers/ImageryTileLayerView.js";import{RefreshableLayerView as l}from"../../layers/RefreshableLayerView.js";let c=class extends(l(o(d))){constructor(){super(...arguments),this.subview=null}get displayParameters(){const{layer:e}=this,t=this._get("displayParameters");return e.visible?{clipToNeatline:e.clippedToNeatline}:t}update(e){this.subview?.update(e),this.notifyChange("updating")}isUpdating(){return!this.subview||this.subview.updating}attach(){this.layer.increaseRasterJobHandlerUsage();const e=new h({layer:this.layer,layerView:this,scheduler:this.scheduler});e.useWebGLForProcessing=!0,e.useProgressiveUpdate=!0,this._attachSubview(e),this.subview=e,this.requestUpdate(),this.addAttachHandles([i(()=>this.layer.clippedToNeatline,()=>{const e=this.subview.redrawOrRefetch({refetch:!0,reprocess:!1}).catch(e=>{s(e)||t.getLogger(this).error(e)});this._updatingHandles.addPromise(e)})])}detach(){this.layer.decreaseRasterJobHandlerUsage(),this._detachSubview(this.subview),this.subview?.destroy(),this.subview=null}viewChange(){this.requestUpdate()}moveEnd(){this.subview.moveEnd()}doRefresh(){return this.subview?this.subview.doRefresh():Promise.resolve()}_attachSubview(e){e&&!e.attached&&(e.attach(),e.attached=!0,this.container.addChildAt(e.container,0))}_detachSubview(e){e?.attached&&(this.container.removeChild(e.container),e.detach(),e.attached=!1)}};e([r()],c.prototype,"subview",void 0),e([r({readOnly:!0})],c.prototype,"displayParameters",null),c=e([a("esri.views.2d.layers.GeospatialPDFLayerView2D")],c);const n=c;export{n as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import i from"../../../../core/Logger.js";import{assertIsSome as s}from"../../../../core/maybe.js";import{debounce as r,isAbortError as a}from"../../../../core/promiseUtils.js";import{property as n,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as l}from"../../../../core/support/UpdatingHandles.js";import h from"../../../../geometry/Extent.js";import c from"../../../../geometry/Point.js";import{isFunctionRaster as u}from"../../../../layers/raster/datasets/datasetUtils.js";import{update as d,unregister as p,getRasterId as y,register as m}from"../../../../layers/raster/datasets/RawBlockCache.js";import{getWorldWidth as g,computeProjectedScales as f}from"../../../../layers/raster/functions/rasterProjectionHelper.js";import{getStretchCutoff as _}from"../../../../layers/raster/functions/stretchUtils.js";import b from"../../../../layers/support/PixelBlock.js";import R from"../../../../layers/support/TileInfo.js";import w from"../../tiling/TileInfoView.js";import"../../tiling/TileKey.js";import P from"../../tiling/TileQueue.js";import I from"../../tiling/TileStrategy.js";import{tileSize as U}from"../../engine/webgl/definitions.js";import{readFromTiledRasterData as C}from"../../../support/rasterHitTestUtils.js";import{TaskPriority as S}from"../../../support/Scheduler.js";import{getWebGLCapabilities as x}from"../../../webgl/capabilities.js";const v=[0,0];function F(e){return"geospatial-pdf"!==e.type}let D=class extends t{constructor(){super(...arguments),this._updatingHandles=new l,this._emptyTilePixelBlock=null,this._tileStrategy=null,this._tileInfoView=null,this._fetchQueue=null,this._blockCacheRegistryUrl=null,this._blockCacheRegistryId=null,this._srcResolutions=[],this.previousLOD=null,this._needBlockCacheUpdate=!1,this._globalSymbolizerParams=null,this._symbolizerParams=null,this._abortController=null,this._isCustomTilingScheme=!1,this._maxIndexedColormapSize=0,this._rasterFunctionState="na",this._globalUpdateRequested=!1,this.attached=!1,this.timeExtent=null,this.refreshDRAFunctionOnce=r(async()=>{const{fullExtent:e,view:t}=this.layerView;if(e?.intersects(t.extent))try{await this._updateDRAStatistics(this._abortController?.signal)&&await this.doRefresh()}catch{}}),this.redrawOrRefetch=r(async(e={})=>{if(!("rasterFunction"in this.layer))return this._updatingHandles.addPromise(e.refetch?this.doRefresh():this._redrawImage(e.signal));const t=this._rasterFunctionState,i=e.reprocess||"gpu"===t&&!this.canUseWebGLForProcessing||"cpu"===t&&this.canUseWebGLForProcessing;if(i&&(await this._updatingHandles.addPromise(this.layer.updateRasterFunction()),this.updateRasterFunctionParameters()),!this.previousLOD||this.layerView.suspended)return;const s=this._rasterFunctionState,{type:r}=this;return e.refetch||"raster"!==r&&!!i||"cpu"===s||"cpu"===t?this._updatingHandles.addPromise(this.doRefresh()):this._updatingHandles.addPromise(this._redrawImage(e.signal))})}destroy(){this._updatingHandles.destroy()}get canUseWebGLForProcessing(){return!1}get canUseLocalSymbolizerParams(){return(this.canUseWebGLForProcessing||"rasterVF"===this.type)&&!this.layerView.hasTilingEffects}get hasDRAInRasterFunction(){if(!("rasterFunction"in this.layer))return!1;const{rasterFunction:e}=this.layer;return!!e&&JSON.stringify(e,null,0).includes('"dra":true')}get isCPUBasedDRA(){if(!("renderer"in this.layer))return!1;const{renderer:e}=this.layer;return"raster-stretch"===e?.type&&e.dynamicRangeAdjustment&&(!this.canUseWebGLForProcessing||!("min-max"===e.stretchType||"standard-deviation"===e.stretchType))}get useWebGLForProcessing(){return this._get("useWebGLForProcessing")??!0}set useWebGLForProcessing(e){this._set("useWebGLForProcessing",e)}get useProgressiveUpdate(){return this._get("useProgressiveUpdate")??!0}set useProgressiveUpdate(e){if(this._tileStrategy&&this.useProgressiveUpdate!==e){this._tileStrategy.destroy(),this.container.removeAllChildren();const t=this._getCacheSize(e);this._tileStrategy=new I({cachePolicy:"purge",acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),cacheSize:t,tileInfoView:this._tileInfoView}),this._set("useProgressiveUpdate",e),this.layerView.requestUpdate()}}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume();const{extent:t,resolution:i,scale:s}=e.state,r=this._tileInfoView.getClosestInfoForScale(s);if(this.layer.raster){if(!this.useProgressiveUpdate||this._needBlockCacheUpdate){const e=this._srcResolutions[r.level],s="toJSON"in t?t:h.fromJSON(t);d(this._blockCacheRegistryUrl,this._blockCacheRegistryId,s,i,e,this.layer.raster.ioConfig.sampling)}this._needBlockCacheUpdate=!1,this.previousLOD?.level!==r.level&&(this.previousLOD=r,null!=this._symbolizerParams&&this.canUseLocalSymbolizerParams&&this._updateSymbolizerParams(),this._tileStrategy.updateCacheSize(0))}}moveEnd(){(this.isCPUBasedDRA||this.hasDRAInRasterFunction||!this.useProgressiveUpdate)&&(this._abortController&&this._abortController.abort(),this._abortController=new AbortController,0===this._fetchQueue.length&&(this.hasDRAInRasterFunction?(this._globalUpdateRequested=!1,this.refreshDRAFunctionOnce()):this.isCPUBasedDRA&&this._redrawImage(this._abortController.signal).then(()=>{this._globalUpdateRequested=!1,this.layerView.requestUpdate()})));const e=this._getCacheSize(this.useProgressiveUpdate);this._tileStrategy.updateCacheSize(e),this.layerView.requestUpdate()}get updating(){return this._globalUpdateRequested||this._updatingHandles?.updating}attach(){const e=x();this._maxIndexedColormapSize=4*(e.maxTextureSize||4096),this._initializeTileInfo(),this._tileInfoView=new w(this.layerView.tileInfo,this.layerView.fullExtent);const t=this._computeFetchConcurrency();this._fetchQueue=new P({tileInfoView:this._tileInfoView,concurrency:t,process:(e,t)=>this._fetchTile(e,t),priority:S.MAPVIEW_FETCH_QUEUE,scheduler:this.scheduler});const i=this._getCacheSize(this.useProgressiveUpdate);this._tileStrategy=new I({cachePolicy:"purge",acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),cacheSize:i,tileInfoView:this._tileInfoView}),this._updateBlockCacheRegistry()}detach(){this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._fetchQueue=this._tileStrategy=this._tileInfoView=null,p(this._blockCacheRegistryUrl,this._blockCacheRegistryId),this._blockCacheRegistryUrl=this._blockCacheRegistryId=null}async hitTest(e){if(!F(this.layer))return null;const t=this._locateSourceData(e);if(!t)return null;const{layer:i}=this,s="vector-field"===i.renderer?.type,r=this.canUseWebGLForProcessing&&u(this.layer.raster);return C({mapPoint:e,layer:i,sourceData:t,processRasterFunction:r,sourceIsUV:s})}acquireTile(e){const t=this.container.createTile(e);return this._updatingHandles.consumePromise(this._enqueueTileFetch(t)),this.layerView.requestUpdate(),this._needBlockCacheUpdate=!0,this._globalUpdateRequested=this.isCPUBasedDRA||this.hasDRAInRasterFunction||!this.useProgressiveUpdate,t}releaseTile(e){this._fetchQueue.abort(e.key.id),this.container.removeChild(e),e.once("detach",()=>{e.destroy(),this.layerView.requestUpdate()}),this.layerView.requestUpdate()}createEmptyTilePixelBlock(e=null){const t=null==e||e.join(",")===this._tileInfoView.size.join(",");if(t&&null!=this._emptyTilePixelBlock)return this._emptyTilePixelBlock;e=e||this._tileInfoView.size;const[i,s]=e,r=new b({width:i,height:s,pixels:[new Uint8Array(i*s)],mask:new Uint8Array(i*s),pixelType:"u8"});return t&&(this._emptyTilePixelBlock=r),r}_getBandIds(){if(!("bandIds"in this.layer))return this.layer.getRawDisplayBandIds();if(this.container&&(!("rasterFunctionChain"in this.container)||!this.container.rasterFunctionChain))return this.layer.bandIds;const{bandIds:e,raster:t}=this.layer,i="rasterFunction"in t?t.rasterFunction.rawInputBandIds:null;return e?.length&&i?.length&&1!==t.rasterInfo.bandCount?e.map(e=>i[Math.min(e,i.length-1)]):"rasterFunction"in t?i:e}updateRasterFunctionParameters(){}_fetchTile(e,t){const i=this._getFetchOptions(e.level,t.signal);return this.fetchTile(e,i)}_getFetchOptions(e,t){const{canUseWebGLForProcessing:i}=this,{layerView:s}=this,{tileInfo:r}=s,a=!r.isWrappable&&null!=g(s.view.spatialReference),n=i&&this.layer.raster.hasUniqueSourceStorageInfo,{layer:o}=this.layerView,l=o.serviceRasterInfo?.storageInfo.isBsqTile?o.getRawDisplayBandIds():void 0;return{allowPartialFill:!0,datumTransformation:s.datumTransformation,interpolation:i?"nearest":this.layer.interpolation,registryId:this._blockCacheRegistryId,requestRawData:n,skipRasterFunction:"raster"===this.type&&null!=this.container.rasterFunctionChain,signal:t,srcResolution:this._srcResolutions[e],timeExtent:s.timeExtent,tileInfo:r,bandIds:l,disableWrapAround:a}}_getCacheSize(e){return e?40:0}_initializeTileInfo(){const{layerView:e}=this,t=e.view.spatialReference;if(this._canUseLayerLODs()){const{origin:i,lods:s}=this.layer.tileInfo,r=s.map(({scale:e})=>e),a=R.create({spatialReference:t,size:U,scales:r,origin:i});return e.set("tileInfo",a),void(this._srcResolutions=s.map(({resolution:e})=>({x:e,y:e})))}const{scales:i,srcResolutions:r,isCustomTilingScheme:a}=f(this.layer.serviceRasterInfo,t,{tileSize:U,alignGlobalDatasetWithAGOL:!0,limitToSrcResolution:!1}),n=R.create({spatialReference:t,size:U,scales:i}),o=0===n.origin.x;s(e.fullExtent);const{xmin:l,ymax:h}=e.fullExtent;(o||a&&n.origin.x>l)&&(n.origin=new c({x:l,y:h,spatialReference:t})),this._isCustomTilingScheme=a,e.set("tileInfo",n),this._srcResolutions=r??[]}_canUseLayerLODs(){const{layer:e,layerView:t}=this;if("Map"!==e.raster.tileType)return!1;const{lods:i}=e.tileInfo,s=t.view.constraints?.effectiveLODs;return s?.length===i.length&&s.every(({scale:e},t)=>Math.abs(e-i[t].scale)<.001)}_computeFetchConcurrency(){const{blockBoundary:e}=this.layer.serviceRasterInfo.storageInfo,t=e[e.length-1];return(t.maxCol-t.minCol+1)*(t.maxRow-t.minRow+1)>64?2:10}async _enqueueTileFetch(e,t){if(!this._fetchQueue.has(e.key.id)){try{let t=e.once("detach",()=>t=void 0);const r=await this._fetchQueue.push(e.key),n=this._getBandIds(),o=this.hasDRAInRasterFunction&&u(this.layer.raster)&&!this.layer.raster.processParameters?.stretchCutoff;let l=!this.useProgressiveUpdate||o||this.isCPUBasedDRA&&!this._globalSymbolizerParams;const h=this._globalUpdateRequested&&!this.layerView.moving&&0===this._fetchQueue.length;if(h){if(l=!1,!this.hasDRAInRasterFunction)try{await this._redrawImage(this._abortController?.signal)}catch(s){a(s)&&i.getLogger(this).error(s)}this._globalUpdateRequested=!1}if(!t)return;this.canUseLocalSymbolizerParams&&null==this._symbolizerParams&&this._updateSymbolizerParams();const c=this._tileInfoView.getTileCoords(v,e.key),d=this._tileInfoView.getTileResolution(e.key);await this.updateTileSource(e,{source:r,symbolizerParams:this._symbolizerParams,globalSymbolizerParams:this._globalSymbolizerParams,suspended:l,bandIds:n,coords:c,resolution:d}),t&&(e.once("attach",()=>this.layerView.requestUpdate()),this.container.addChild(e),t.remove()),h&&this.hasDRAInRasterFunction&&u(this.layer.raster)&&!this.layer.raster.processParameters?.extent?.equals(this.layerView.view.extent)&&this.refreshDRAFunctionOnce()}catch(s){a(s)||i.getLogger(this).error(s)}this.layerView.requestUpdate()}}async _updateDRAStatistics(e){if(!F(this.layer))return!1;if(!u(this.layer.raster))return!1;const t=await this.layer.getDynamicRangeInputRaster();if(!t)return!1;const{raster:i,functionArguments:s}=t,r=this._getFetchOptions(this.previousLOD.level,e),{extent:a,width:n,height:o}=this.layerView.view,{pixelBlock:l}=await i.fetchPixels(a,n,o,{...r,interpolation:"nearest",requestRawData:!1,skipRasterFunction:!1}),h=_(s,{rasterInfo:i.rasterInfo,pixelBlock:l});return this.layer.raster.processParameters={stretchCutoff:h,extent:a},!0}_locateSourceData(e){if(!this.layer.loaded||!this.attached)return null;const t=new Map,i=this.container.children.find(i=>{if(!i.visible)return!1;const s="bitmap"in i?i.bitmap?.rawPixelData:i.tileData?.rawPixelData;if(!s?.pixelBlock)return!1;const{key:r}=i,{level:a}=r;if(!t.has(a)){const i=this._tileInfoView.getLODInfoAt(a);if(!i)return!1;const s=Math.floor(i.getColumnForX(e.x)),r=Math.floor(i.getRowForY(e.y));t.set(a,[r,s])}const[n,o]=t.get(a);return n===r.row&&o===r.col});if(null==i)return null;if("tileData"in i){const{rawPixelData:e}=i.tileData;return e?.pixelBlock?{rawPixelData:e,tileSize:{width:i.width,height:i.height}}:null}const{rawPixelData:s,transformGrid:r,width:a,height:n}=i.bitmap;return s?.pixelBlock?{rawPixelData:s,transformGrid:r,tileSize:{width:a,height:n}}:null}async _redrawImage(e){if(!this.attached||0===this.container.children.length)return;if("updateRenderer"in this.layer&&await this.layer.updateRenderer(),this.isCPUBasedDRA?await this._updateGlobalSymbolizerParams(e):(this.canUseLocalSymbolizerParams&&this._updateSymbolizerParams(),this._globalSymbolizerParams=null),!this.attached||e?.aborted)return;const t=this.container.children.map(async t=>this.updateTileSymbolizerParameters(t,{local:this._symbolizerParams,global:this._globalSymbolizerParams},e));await Promise.allSettled(t),this.attached&&!e?.aborted&&this.container.requestRender()}async _updateGlobalSymbolizerParams(e){const{fullExtent:t,view:i}=this.layerView;if(!t?.intersects(i.extent))return;if(!("symbolizer"in this.layer))return;const s=this._getFetchOptions(this.previousLOD.level,e),r=await this.layer.fetchPixels(i.extent,i.width,i.height,{...s,interpolation:"nearest",requestRawData:!1,skipRasterFunction:!1});if(!r?.pixelBlock)return;const{resolution:a}=this.previousLOD,{isBsqTile:n}=this.layer.raster.rasterInfo.storageInfo,o=n?null:this._getBandIds(),l=this.layer.symbolizer.generateWebGLParameters({pixelBlock:r.pixelBlock.extractBands(o),isGCS:i.spatialReference.isGeographic,resolution:{x:a,y:a},bandIds:o});!this.canUseWebGLForProcessing&&l&&"stretch"===l.type&&"raster-stretch"===this.layer.renderer?.type&&(l.factor=l.factor.map(e=>255*e),l.minOutput=Math.round(255*l.minOutput),l.maxOutput=Math.round(255*l.maxOutput)),this._globalSymbolizerParams=l}_updateSymbolizerParams(){if(!("symbolizer"in this.layer))return;const{resolution:e}=this.previousLOD,t=this._getBandIds();this._symbolizerParams=this.layer.symbolizer.generateWebGLParameters({pixelBlock:null,isGCS:this.layerView.view.spatialReference.isGeographic,resolution:{x:e,y:e},bandIds:t})}_updateBlockCacheRegistry(e=!1){const{layer:t,layerView:i}=this,{raster:s}=t;let r=null,a=null,n=s;if("multidimensionalDefinition"in t){const{multidimensionalDefinition:e}=t.normalizeRasterFetchOptions({multidimensionalDefinition:t.multidimensionalDefinition,timeExtent:i.timeExtent});r=s.rasterInfo.multidimensionalInfo?s.getSliceIndex(e)??null:null,a=s.rasterInfo.storageInfo.isBsqTile?t.getRawDisplayBandIds():null,n=u(s)?s.primaryRasters.rasters[0]??s:s}const o=y(n.rasterId,r,a);if(o!==this._blockCacheRegistryUrl){null!=this._blockCacheRegistryUrl&&p(this._blockCacheRegistryUrl,this._blockCacheRegistryId);const t=n.rawBlockRegistryIds.indexOf(this._blockCacheRegistryId);if(t>-1&&n.rawBlockRegistryIds.splice(t,1),this._blockCacheRegistryId=m(o,n.rasterInfo),n.rawBlockRegistryIds.push(this._blockCacheRegistryId),e){const{view:e}=i,t=this._tileInfoView.getClosestInfoForScale(e.scale),r=this._srcResolutions[t.level];d(o,this._blockCacheRegistryId,e.extent,e.resolution,r,s.ioConfig.sampling)}this._blockCacheRegistryUrl=o}}async doRefresh(){if(!this.attached||!this.previousLOD||this.layerView.suspended)return;"updateRenderer"in this.layer&&await this._updatingHandles.addPromise(this.layer.updateRenderer()),this.canUseLocalSymbolizerParams&&this._updateSymbolizerParams(),this._updateBlockCacheRegistry(!0),this._fetchQueue.reset();const e=[];this._globalUpdateRequested=this.isCPUBasedDRA||this.hasDRAInRasterFunction||!this.useProgressiveUpdate,this._tileStrategy.refresh(t=>e.push(this._enqueueTileFetch(t))),await this._updatingHandles.addPromise(Promise.allSettled(e))}};e([n()],D.prototype,"_globalUpdateRequested",void 0),e([n()],D.prototype,"attached",void 0),e([n()],D.prototype,"canUseWebGLForProcessing",null),e([n()],D.prototype,"canUseLocalSymbolizerParams",null),e([n()],D.prototype,"hasDRAInRasterFunction",null),e([n()],D.prototype,"isCPUBasedDRA",null),e([n()],D.prototype,"container",void 0),e([n()],D.prototype,"layer",void 0),e([n()],D.prototype,"layerView",void 0),e([n()],D.prototype,"scheduler",void 0),e([n()],D.prototype,"type",void 0),e([n()],D.prototype,"useWebGLForProcessing",null),e([n()],D.prototype,"useProgressiveUpdate",null),e([n()],D.prototype,"timeExtent",void 0),e([n()],D.prototype,"updating",null),D=e([o("esri.views.2d.layers.imagery.BaseImageryTileSubView2D")],D);export{D as BaseImageryTileSubView2D};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import i from"../../../../core/Logger.js";import{assertIsSome as s}from"../../../../core/maybe.js";import{debounce as r,isAbortError as a}from"../../../../core/promiseUtils.js";import{property as n,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as l}from"../../../../core/support/UpdatingHandles.js";import h from"../../../../geometry/Extent.js";import c from"../../../../geometry/Point.js";import{isFunctionRaster as u}from"../../../../layers/raster/datasets/datasetUtils.js";import{update as d,unregister as p,getRasterId as y,register as m}from"../../../../layers/raster/datasets/RawBlockCache.js";import{getWorldWidth as g,computeProjectedScales as f}from"../../../../layers/raster/functions/rasterProjectionHelper.js";import{getStretchCutoff as _}from"../../../../layers/raster/functions/stretchUtils.js";import b from"../../../../layers/support/PixelBlock.js";import R from"../../../../layers/support/TileInfo.js";import w from"../../tiling/TileInfoView.js";import"../../tiling/TileKey.js";import P from"../../tiling/TileQueue.js";import I from"../../tiling/TileStrategy.js";import{tileSize as U}from"../../engine/webgl/definitions.js";import{readFromTiledRasterData as C}from"../../../support/rasterHitTestUtils.js";import{TaskPriority as S}from"../../../support/Scheduler.js";import{getWebGLCapabilities as x}from"../../../webgl/capabilities.js";const v=[0,0];function F(e){return"geospatial-pdf"!==e.type}let D=class extends t{constructor(){super(...arguments),this._updatingHandles=new l,this._emptyTilePixelBlock=null,this._tileStrategy=null,this._tileInfoView=null,this._fetchQueue=null,this._blockCacheRegistryUrl=null,this._blockCacheRegistryId=null,this._srcResolutions=[],this.previousLOD=null,this._needBlockCacheUpdate=!1,this._globalSymbolizerParams=null,this._symbolizerParams=null,this._abortController=null,this._isCustomTilingScheme=!1,this._maxIndexedColormapSize=0,this._rasterFunctionState="na",this._globalUpdateRequested=!1,this.attached=!1,this.timeExtent=null,this.refreshDRAFunctionOnce=r(async()=>{const{fullExtent:e,view:t}=this.layerView;if(e?.intersects(t.extent))try{await this._updateDRAStatistics(this._abortController?.signal)&&await this.doRefresh()}catch{}}),this.redrawOrRefetch=r(async(e={})=>{if(!("rasterFunction"in this.layer))return this._updatingHandles.addPromise(e.refetch?this.doRefresh():this._redrawImage(e.signal));const t=this._rasterFunctionState,i=e.reprocess||"gpu"===t&&!this.canUseWebGLForProcessing||"cpu"===t&&this.canUseWebGLForProcessing;if(i&&(await this._updatingHandles.addPromise(this.layer.updateRasterFunction()),this.updateRasterFunctionParameters()),!this.previousLOD||this.layerView.suspended)return;const s=this._rasterFunctionState,{type:r}=this;return e.refetch||"raster"!==r&&!!i||"cpu"===s||"cpu"===t?this._updatingHandles.addPromise(this.doRefresh()):this._updatingHandles.addPromise(this._redrawImage(e.signal))})}destroy(){this._updatingHandles.destroy()}get canUseWebGLForProcessing(){return!1}get canUseLocalSymbolizerParams(){return(this.canUseWebGLForProcessing||"rasterVF"===this.type)&&!this.layerView.hasTilingEffects}get hasDRAInRasterFunction(){if(!("rasterFunction"in this.layer))return!1;const{rasterFunction:e}=this.layer;return!!e&&JSON.stringify(e,null,0).includes('"dra":true')}get isCPUBasedDRA(){if(!("renderer"in this.layer))return!1;const{renderer:e}=this.layer;return"raster-stretch"===e?.type&&e.dynamicRangeAdjustment&&(!this.canUseWebGLForProcessing||!("min-max"===e.stretchType||"standard-deviation"===e.stretchType))}get useWebGLForProcessing(){return this._get("useWebGLForProcessing")??!0}set useWebGLForProcessing(e){this._set("useWebGLForProcessing",e)}get useProgressiveUpdate(){return this._get("useProgressiveUpdate")??!0}set useProgressiveUpdate(e){if(this._tileStrategy&&this.useProgressiveUpdate!==e){this._tileStrategy.destroy(),this.container.removeAllChildren();const t=this._getCacheSize(e);this._tileStrategy=new I({cachePolicy:"purge",acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),cacheSize:t,tileInfoView:this._tileInfoView}),this._set("useProgressiveUpdate",e),this.layerView.requestUpdate()}}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume();const{extent:t,resolution:i,scale:s}=e.state,r=this._tileInfoView.getClosestInfoForScale(s);if(this.layer.raster){if(!this.useProgressiveUpdate||this._needBlockCacheUpdate){const e=this._srcResolutions[r.level],s="toJSON"in t?t:h.fromJSON(t);d(this._blockCacheRegistryUrl,this._blockCacheRegistryId,s,i,e,this.layer.raster.ioConfig.sampling)}this._needBlockCacheUpdate=!1,this.previousLOD?.level!==r.level&&(this.previousLOD=r,null!=this._symbolizerParams&&this.canUseLocalSymbolizerParams&&this._updateSymbolizerParams(),this._tileStrategy.updateCacheSize(0))}}moveEnd(){(this.isCPUBasedDRA||this.hasDRAInRasterFunction||!this.useProgressiveUpdate)&&(this._abortController&&this._abortController.abort(),this._abortController=new AbortController,0===this._fetchQueue.length&&(this.hasDRAInRasterFunction?(this._globalUpdateRequested=!1,this.refreshDRAFunctionOnce()):this.isCPUBasedDRA&&this._redrawImage(this._abortController.signal).then(()=>{this._globalUpdateRequested=!1,this.layerView.requestUpdate()})));const e=this._getCacheSize(this.useProgressiveUpdate);this._tileStrategy.updateCacheSize(e),this.layerView.requestUpdate()}get updating(){return this._globalUpdateRequested||this._updatingHandles?.updating}attach(){const e=x();this._maxIndexedColormapSize=4*(e.maxTextureSize||4096),this._initializeTileInfo(),this._tileInfoView=new w(this.layerView.tileInfo,this.layerView.fullExtent);const t=this._computeFetchConcurrency();this._fetchQueue=new P({tileInfoView:this._tileInfoView,concurrency:t,process:(e,t)=>this._fetchTile(e,t),priority:S.MAPVIEW_FETCH_QUEUE,scheduler:this.scheduler});const i=this._getCacheSize(this.useProgressiveUpdate);this._tileStrategy=new I({cachePolicy:"purge",acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),cacheSize:i,tileInfoView:this._tileInfoView}),this._updateBlockCacheRegistry()}detach(){this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._fetchQueue=this._tileStrategy=this._tileInfoView=null,p(this._blockCacheRegistryUrl,this._blockCacheRegistryId),this._blockCacheRegistryUrl=this._blockCacheRegistryId=null}async hitTest(e){if(!F(this.layer))return null;const t=this._locateSourceData(e);if(!t)return null;const{layer:i}=this,s="vector-field"===i.renderer?.type,r=this.canUseWebGLForProcessing&&u(this.layer.raster);return C({mapPoint:e,layer:i,sourceData:t,processRasterFunction:r,sourceIsUV:s})}acquireTile(e){const t=this.container.createTile(e);return this._updatingHandles.consumePromise(this._enqueueTileFetch(t)),this.layerView.requestUpdate(),this._needBlockCacheUpdate=!0,this._globalUpdateRequested=this.isCPUBasedDRA||this.hasDRAInRasterFunction||!this.useProgressiveUpdate,t}releaseTile(e){this._fetchQueue.abort(e.key.id),this.container.removeChild(e),e.once("detach",()=>{e.destroy(),this.layerView.requestUpdate()}),this.layerView.requestUpdate()}createEmptyTilePixelBlock(e=null){const t=null==e||e.join(",")===this._tileInfoView.size.join(",");if(t&&null!=this._emptyTilePixelBlock)return this._emptyTilePixelBlock;e=e||this._tileInfoView.size;const[i,s]=e,r=new b({width:i,height:s,pixels:[new Uint8Array(i*s)],mask:new Uint8Array(i*s),pixelType:"u8"});return t&&(this._emptyTilePixelBlock=r),r}_getBandIds(){if(!("bandIds"in this.layer))return this.layer.getRawDisplayBandIds();if(this.container&&(!("rasterFunctionChain"in this.container)||!this.container.rasterFunctionChain))return this.layer.bandIds;const{bandIds:e,raster:t}=this.layer,i="rasterFunction"in t?t.rasterFunction.rawInputBandIds:null;return e?.length&&i?.length&&1!==t.rasterInfo.bandCount?e.map(e=>i[Math.min(e,i.length-1)]):"rasterFunction"in t?i:e}updateRasterFunctionParameters(){}_fetchTile(e,t){const i=this._getFetchOptions(e.level,t.signal);return this.fetchTile(e,i)}_getFetchOptions(e,t){const{canUseWebGLForProcessing:i}=this,{layerView:s}=this,{tileInfo:r}=s,a=!r.isWrappable&&null!=g(s.view.spatialReference),n=i&&this.layer.raster.hasUniqueSourceStorageInfo,{layer:o}=this.layerView,l=o.serviceRasterInfo?.storageInfo.isBsqTile?o.getRawDisplayBandIds():void 0;return{allowPartialFill:!0,datumTransformation:s.datumTransformation,interpolation:i?"nearest":"interpolation"in this.layer?this.layer.interpolation:"bilinear",registryId:this._blockCacheRegistryId,requestRawData:n,skipRasterFunction:"raster"===this.type&&null!=this.container.rasterFunctionChain,signal:t,srcResolution:this._srcResolutions[e],timeExtent:s.timeExtent,tileInfo:r,bandIds:l,disableWrapAround:a}}_getCacheSize(e){return e?40:0}_initializeTileInfo(){const{layerView:e}=this,t=e.view.spatialReference;if(this._canUseLayerLODs()){const{origin:i,lods:s}=this.layer.tileInfo,r=s.map(({scale:e})=>e),a=R.create({spatialReference:t,size:U,scales:r,origin:i});return e.set("tileInfo",a),void(this._srcResolutions=s.map(({resolution:e})=>({x:e,y:e})))}const{scales:i,srcResolutions:r,isCustomTilingScheme:a}=f(this.layer.serviceRasterInfo,t,{tileSize:U,alignGlobalDatasetWithAGOL:!0,limitToSrcResolution:!1}),n=R.create({spatialReference:t,size:U,scales:i}),o=0===n.origin.x;s(e.fullExtent);const{xmin:l,ymax:h}=e.fullExtent;(o||a&&n.origin.x>l)&&(n.origin=new c({x:l,y:h,spatialReference:t})),this._isCustomTilingScheme=a,e.set("tileInfo",n),this._srcResolutions=r??[]}_canUseLayerLODs(){const{layer:e,layerView:t}=this;if("Map"!==e.raster.tileType)return!1;const{lods:i}=e.tileInfo,s=t.view.constraints?.effectiveLODs;return s?.length===i.length&&s.every(({scale:e},t)=>Math.abs(e-i[t].scale)<.001)}_computeFetchConcurrency(){const{blockBoundary:e}=this.layer.serviceRasterInfo.storageInfo,t=e[e.length-1];return(t.maxCol-t.minCol+1)*(t.maxRow-t.minRow+1)>64?2:10}async _enqueueTileFetch(e,t){if(!this._fetchQueue.has(e.key.id)){try{let t=e.once("detach",()=>t=void 0);const r=await this._fetchQueue.push(e.key),n=this._getBandIds(),o=this.hasDRAInRasterFunction&&u(this.layer.raster)&&!this.layer.raster.processParameters?.stretchCutoff;let l=!this.useProgressiveUpdate||o||this.isCPUBasedDRA&&!this._globalSymbolizerParams;const h=this._globalUpdateRequested&&!this.layerView.moving&&0===this._fetchQueue.length;if(h){if(l=!1,!this.hasDRAInRasterFunction)try{await this._redrawImage(this._abortController?.signal)}catch(s){a(s)&&i.getLogger(this).error(s)}this._globalUpdateRequested=!1}if(!t)return;this.canUseLocalSymbolizerParams&&null==this._symbolizerParams&&this._updateSymbolizerParams();const c=this._tileInfoView.getTileCoords(v,e.key),d=this._tileInfoView.getTileResolution(e.key);await this.updateTileSource(e,{source:r,symbolizerParams:this._symbolizerParams,globalSymbolizerParams:this._globalSymbolizerParams,suspended:l,bandIds:n,coords:c,resolution:d}),t&&(e.once("attach",()=>this.layerView.requestUpdate()),this.container.addChild(e),t.remove()),h&&this.hasDRAInRasterFunction&&u(this.layer.raster)&&!this.layer.raster.processParameters?.extent?.equals(this.layerView.view.extent)&&this.refreshDRAFunctionOnce()}catch(s){a(s)||i.getLogger(this).error(s)}this.layerView.requestUpdate()}}async _updateDRAStatistics(e){if(!F(this.layer))return!1;if(!u(this.layer.raster))return!1;const t=await this.layer.getDynamicRangeInputRaster();if(!t)return!1;const{raster:i,functionArguments:s}=t,r=this._getFetchOptions(this.previousLOD.level,e),{extent:a,width:n,height:o}=this.layerView.view,{pixelBlock:l}=await i.fetchPixels(a,n,o,{...r,interpolation:"nearest",requestRawData:!1,skipRasterFunction:!1}),h=_(s,{rasterInfo:i.rasterInfo,pixelBlock:l});return this.layer.raster.processParameters={stretchCutoff:h,extent:a},!0}_locateSourceData(e){if(!this.layer.loaded||!this.attached)return null;const t=new Map,i=this.container.children.find(i=>{if(!i.visible)return!1;const s="bitmap"in i?i.bitmap?.rawPixelData:i.tileData?.rawPixelData;if(!s?.pixelBlock)return!1;const{key:r}=i,{level:a}=r;if(!t.has(a)){const i=this._tileInfoView.getLODInfoAt(a);if(!i)return!1;const s=Math.floor(i.getColumnForX(e.x)),r=Math.floor(i.getRowForY(e.y));t.set(a,[r,s])}const[n,o]=t.get(a);return n===r.row&&o===r.col});if(null==i)return null;if("tileData"in i){const{rawPixelData:e}=i.tileData;return e?.pixelBlock?{rawPixelData:e,tileSize:{width:i.width,height:i.height}}:null}const{rawPixelData:s,transformGrid:r,width:a,height:n}=i.bitmap;return s?.pixelBlock?{rawPixelData:s,transformGrid:r,tileSize:{width:a,height:n}}:null}async _redrawImage(e){if(!this.attached||0===this.container.children.length)return;if("updateRenderer"in this.layer&&await this.layer.updateRenderer(),this.isCPUBasedDRA?await this._updateGlobalSymbolizerParams(e):(this.canUseLocalSymbolizerParams&&this._updateSymbolizerParams(),this._globalSymbolizerParams=null),!this.attached||e?.aborted)return;const t=this.container.children.map(async t=>this.updateTileSymbolizerParameters(t,{local:this._symbolizerParams,global:this._globalSymbolizerParams},e));await Promise.allSettled(t),this.attached&&!e?.aborted&&this.container.requestRender()}async _updateGlobalSymbolizerParams(e){const{fullExtent:t,view:i}=this.layerView;if(!t?.intersects(i.extent))return;if(!("symbolizer"in this.layer))return;const s=this._getFetchOptions(this.previousLOD.level,e),r=await this.layer.fetchPixels(i.extent,i.width,i.height,{...s,interpolation:"nearest",requestRawData:!1,skipRasterFunction:!1});if(!r?.pixelBlock)return;const{resolution:a}=this.previousLOD,{isBsqTile:n}=this.layer.raster.rasterInfo.storageInfo,o=n?null:this._getBandIds(),l=this.layer.symbolizer.generateWebGLParameters({pixelBlock:r.pixelBlock.extractBands(o),isGCS:i.spatialReference.isGeographic,resolution:{x:a,y:a},bandIds:o});!this.canUseWebGLForProcessing&&l&&"stretch"===l.type&&"raster-stretch"===this.layer.renderer?.type&&(l.factor=l.factor.map(e=>255*e),l.minOutput=Math.round(255*l.minOutput),l.maxOutput=Math.round(255*l.maxOutput)),this._globalSymbolizerParams=l}_updateSymbolizerParams(){if(!("symbolizer"in this.layer))return;const{resolution:e}=this.previousLOD,t=this._getBandIds();this._symbolizerParams=this.layer.symbolizer.generateWebGLParameters({pixelBlock:null,isGCS:this.layerView.view.spatialReference.isGeographic,resolution:{x:e,y:e},bandIds:t})}_updateBlockCacheRegistry(e=!1){const{layer:t,layerView:i}=this,{raster:s}=t;let r=null,a=null,n=s;if("multidimensionalDefinition"in t){const{multidimensionalDefinition:e}=t.normalizeRasterFetchOptions({multidimensionalDefinition:t.multidimensionalDefinition,timeExtent:i.timeExtent});r=s.rasterInfo.multidimensionalInfo?s.getSliceIndex(e)??null:null,a=s.rasterInfo.storageInfo.isBsqTile?t.getRawDisplayBandIds():null,n=u(s)?s.primaryRasters.rasters[0]??s:s}const o=y(n.rasterId,r,a);if(o!==this._blockCacheRegistryUrl){null!=this._blockCacheRegistryUrl&&p(this._blockCacheRegistryUrl,this._blockCacheRegistryId);const t=n.rawBlockRegistryIds.indexOf(this._blockCacheRegistryId);if(t>-1&&n.rawBlockRegistryIds.splice(t,1),this._blockCacheRegistryId=m(o,n.rasterInfo),n.rawBlockRegistryIds.push(this._blockCacheRegistryId),e){const{view:e}=i,t=this._tileInfoView.getClosestInfoForScale(e.scale),r=this._srcResolutions[t.level];d(o,this._blockCacheRegistryId,e.extent,e.resolution,r,s.ioConfig.sampling)}this._blockCacheRegistryUrl=o}}async doRefresh(){if(!this.attached||!this.previousLOD||this.layerView.suspended)return;"updateRenderer"in this.layer&&await this._updatingHandles.addPromise(this.layer.updateRenderer()),this.canUseLocalSymbolizerParams&&this._updateSymbolizerParams(),this._updateBlockCacheRegistry(!0),this._fetchQueue.reset();const e=[];this._globalUpdateRequested=this.isCPUBasedDRA||this.hasDRAInRasterFunction||!this.useProgressiveUpdate,this._tileStrategy.refresh(t=>e.push(this._enqueueTileFetch(t))),await this._updatingHandles.addPromise(Promise.allSettled(e))}};e([n()],D.prototype,"_globalUpdateRequested",void 0),e([n()],D.prototype,"attached",void 0),e([n()],D.prototype,"canUseWebGLForProcessing",null),e([n()],D.prototype,"canUseLocalSymbolizerParams",null),e([n()],D.prototype,"hasDRAInRasterFunction",null),e([n()],D.prototype,"isCPUBasedDRA",null),e([n()],D.prototype,"container",void 0),e([n()],D.prototype,"layer",void 0),e([n()],D.prototype,"layerView",void 0),e([n()],D.prototype,"scheduler",void 0),e([n()],D.prototype,"type",void 0),e([n()],D.prototype,"useWebGLForProcessing",null),e([n()],D.prototype,"useProgressiveUpdate",null),e([n()],D.prototype,"timeExtent",void 0),e([n()],D.prototype,"updating",null),D=e([o("esri.views.2d.layers.imagery.BaseImageryTileSubView2D")],D);export{D as BaseImageryTileSubView2D};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import o from"../../../../Camera.js";import{clock as r}from"../../../../core/clock.js";import i from"../../../../core/Logger.js";import{rad2deg as e}from"../../../../core/mathUtils.js";import{onAbort as s}from"../../../../core/promiseUtils.js";import{createScreenPointArray as n}from"../../../../core/screenUtils.js";import{property as a,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{subtract as l,add as m,copy as h,cross as p,normalize as u,scale as d,dot as v}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import f from"../../../../geometry/Point.js";import{shortenTranslation as g}from"../../state/utils/groundNavigationUtils.js";import{OffsetCorrectionController as w}from"../../state/utils/OffsetCorrectionController.js";import y from"../../webgl/RenderCamera.js";import{InteractiveToolBase as T}from"../../../interactive/InteractiveToolBase.js";const C=2,M=.99,j=500;let D=class extends T{constructor(t){super(t),this.isGroundNavigationPlacementTool=!0,this._internalAbortController=new AbortController,this._tmpMouseDirection=_(),this._tmpWorldUp=_(),this._tmpHorizontalForward=_(),this._tmpTranslation=_(),this._tmpScratchVector=_(),this._hasErrorCursor=!1}initialize(){this.signal&&this.addHandles([s(this.signal,()=>{this.cancel(),this.active&&(this.view.activeTool=null)})]),this.finishToolCreation()}cancel(){super.cancel(),this._internalAbortController?.abort()}onDeactivate(){this.emit("cancel")}get cursor(){return this.active?this._hasErrorCursor?"not-allowed":"crosshair":null}async onInputEvent(t){if(!this.active||"immediate-click"!==t.type)return;t.stopPropagation();const r=this.view.state.camera,e=this.view.sceneIntersectionHelper,s=_();if(!e.intersectScreen(n(t.x,t.y),s))return i.getLogger(this).warn("The clicked location did not produce a valid target. Try again by clicking in a different location."),void this._showErrorCursor();if(l(this._tmpTranslation,s,r.eye),g(this._tmpTranslation,this._tmpTranslation,M,C),m(s,r.eye,this._tmpTranslation),this.groundMode?.offset){const t=(new y).copyFrom(r);t.eye=s;new w(this.view).immediatelyCorrectGroundElevation(t,void 0,void 0,this.groundMode),h(s,t.eye)}const a=this.cameraTurningEnabled?this._computeHeadingOffset(r,s):0,c=this.view.renderCoordsHelper.fromRenderCoords(s,new f({spatialReference:this.view.spatialReference})),p=new o({position:c,heading:this.view.camera.heading+a,tilt:85});this.emit("success",p),this.view.activeTool=null}_computeHeadingOffset(t,o){const r=this.view.renderCoordsHelper.worldUpAtPosition(o,this._tmpWorldUp),i=p(this._tmpHorizontalForward,r,t.viewRight);l(this._tmpMouseDirection,o,t.eye),u(this._tmpMouseDirection,this._tmpMouseDirection),l(this._tmpMouseDirection,this._tmpMouseDirection,d(this._tmpScratchVector,r,v(r,this._tmpMouseDirection))),u(this._tmpMouseDirection,this._tmpMouseDirection);const s=p(_(),this._tmpMouseDirection,i),n=Math.sign(v(s,r)),a=Math.acos(v(this._tmpMouseDirection,i));return n*e(a)}_showErrorCursor(){this._hasErrorCursor=!0,this._errorTimeout?.remove(),this._errorTimeout=r.setTimeout(()=>{this._hasErrorCursor=!1,this._errorTimeout=void 0},j)}};t([a({constructOnly:!0})],D.prototype,"view",void 0),t([a({constructOnly:!0})],D.prototype,"signal",void 0),t([a({constructOnly:!0})],D.prototype,"cameraTurningEnabled",void 0),t([a({constructOnly:!0})],D.prototype,"groundMode",void 0),t([a()],D.prototype,"_hasErrorCursor",void 0),t([a({readOnly:!0})],D.prototype,"cursor",null),D=t([c("esri.views.3d.interactive.placementTools.GroundNavigationPlacementTool3D")],D);export{D as GroundNavigationPlacementTool3D};
2
+ import{__decorate as t}from"tslib";import o from"../../../../Camera.js";import{clock as r}from"../../../../core/clock.js";import i from"../../../../core/Logger.js";import{rad2deg as e}from"../../../../core/mathUtils.js";import{onAbort as s}from"../../../../core/promiseUtils.js";import{createScreenPointArray as n}from"../../../../core/screenUtils.js";import{property as a,subclass as c}from"../../../../core/accessorSupport/decorators.js";import{subtract as l,add as m,copy as h,cross as p,normalize as u,scale as d,dot as v}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import f from"../../../../geometry/Point.js";import{shortenTranslation as g}from"../../state/utils/groundNavigationUtils.js";import{OffsetCorrectionController as w}from"../../state/utils/OffsetCorrectionController.js";import y from"../../webgl/RenderCamera.js";import{InteractiveToolBase as T}from"../../../interactive/InteractiveToolBase.js";const C=.5,M=.999,j=500;let D=class extends T{constructor(t){super(t),this.isGroundNavigationPlacementTool=!0,this._internalAbortController=new AbortController,this._tmpMouseDirection=_(),this._tmpWorldUp=_(),this._tmpHorizontalForward=_(),this._tmpTranslation=_(),this._tmpScratchVector=_(),this._hasErrorCursor=!1}initialize(){this.signal&&this.addHandles([s(this.signal,()=>{this.cancel(),this.active&&(this.view.activeTool=null)})]),this.finishToolCreation()}cancel(){super.cancel(),this._internalAbortController?.abort()}onDeactivate(){this.emit("cancel")}get cursor(){return this.active?this._hasErrorCursor?"not-allowed":"crosshair":null}async onInputEvent(t){if(!this.active||"immediate-click"!==t.type)return;t.stopPropagation();const r=this.view.state.camera,e=this.view.sceneIntersectionHelper,s=_();if(!e.intersectScreen(n(t.x,t.y),s))return i.getLogger(this).warn("The clicked location did not produce a valid target. Try again by clicking in a different location."),void this._showErrorCursor();if(l(this._tmpTranslation,s,r.eye),g(this._tmpTranslation,this._tmpTranslation,M,C),m(s,r.eye,this._tmpTranslation),this.groundMode?.offset){const t=(new y).copyFrom(r);t.eye=s;new w(this.view).immediatelyCorrectGroundElevation(t,void 0,void 0,this.groundMode),h(s,t.eye)}const a=this.cameraTurningEnabled?this._computeHeadingOffset(r,s):0,c=this.view.renderCoordsHelper.fromRenderCoords(s,new f({spatialReference:this.view.spatialReference})),p=new o({position:c,heading:this.view.camera.heading+a,tilt:85});this.emit("success",p),this.view.activeTool=null}_computeHeadingOffset(t,o){const r=this.view.renderCoordsHelper.worldUpAtPosition(o,this._tmpWorldUp),i=p(this._tmpHorizontalForward,r,t.viewRight);l(this._tmpMouseDirection,o,t.eye),u(this._tmpMouseDirection,this._tmpMouseDirection),l(this._tmpMouseDirection,this._tmpMouseDirection,d(this._tmpScratchVector,r,v(r,this._tmpMouseDirection))),u(this._tmpMouseDirection,this._tmpMouseDirection);const s=p(_(),this._tmpMouseDirection,i),n=Math.sign(v(s,r)),a=Math.acos(v(this._tmpMouseDirection,i));return n*e(a)}_showErrorCursor(){this._hasErrorCursor=!0,this._errorTimeout?.remove(),this._errorTimeout=r.setTimeout(()=>{this._hasErrorCursor=!1,this._errorTimeout=void 0},j)}};t([a({constructOnly:!0})],D.prototype,"view",void 0),t([a({constructOnly:!0})],D.prototype,"signal",void 0),t([a({constructOnly:!0})],D.prototype,"cameraTurningEnabled",void 0),t([a({constructOnly:!0})],D.prototype,"groundMode",void 0),t([a()],D.prototype,"_hasErrorCursor",void 0),t([a({readOnly:!0})],D.prototype,"cursor",null),D=t([c("esri.views.3d.interactive.placementTools.GroundNavigationPlacementTool3D")],D);export{D as GroundNavigationPlacementTool3D};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../core/Error.js";import{whenOnce as r,watch as i,sync as a}from"../../../core/reactiveUtils.js";import{property as s,subclass as l}from"../../../core/accessorSupport/decorators.js";import{computeSrcResolutions as n,projectDatasetExtent as o}from"../../../layers/raster/functions/rasterProjectionHelper.js";import{LayerView3D as c}from"./LayerView3D.js";import{TiledLayerView3D as m}from"./TiledLayerView3D.js";import{RasterTile as h}from"../terrain/RasterTile.js";import{emptyTile as d}from"../terrain/TerrainData.js";import p from"../../layers/ImageryTileLayerView.js";import{RefreshableLayerView as u}from"../../layers/RefreshableLayerView.js";let y=class extends(u(m(c(p)))){constructor(){super(...arguments),this._srcResolutions=[],this.type="imagery-tile-3d",this.ignoresMemoryFactor=!1,this.unloadedMemory=0}initialize(){this.layer.increaseRasterJobHandlerUsage(),null==this.fullExtent&&this.addResolvingPromise(Promise.reject(new t("layerview:spatial-reference-incompatible","The layer extent cannot be projected to the view's spatial reference",{layer:this.layer})));const e=r(()=>this.view?.basemapTerrain?.tilingSchemeLocked).then(()=>{const e=this.view.basemapTerrain.tilingScheme;this.tileInfo=e.toTileInfo(),this._srcResolutions=n(this.layer.serviceRasterInfo,this.tileInfo),this.addHandles([i(()=>[this.layer.interpolation,this.layer.clippedToNeatline],()=>this._updatingHandles.addPromise(this.doRefresh()),a)])});this.addResolvingPromise(e)}destroy(){this.layer.decreaseRasterJobHandlerUsage()}get fullExtent(){try{return this.layer.loaded?this._getFullExtent():null}catch{return null}}get imageFormatIsOpaque(){return!1}get hasMixedImageFormats(){return!1}get dataLevelRange(){const e=this.layer.tileInfo,t=this.tileInfo.lodAt(0)?.scale,r=e.lodAt(e.lods.length-1)?.scale;return this.levelRangeFromScaleRange(t,r)}get visibleAtCurrentScale(){return this.tilesVisibleAtCurrentScale()}_getFullExtent(){return o(this.layer.serviceRasterInfo,this.view.groundView?.spatialReference??this.view.spatialReference)}async fetchTile(e,r){const i=this.tileInfo,a={tileInfo:i,requestRawData:this._canSymbolizeInWebGL(),signal:r.signal,srcResolution:this._srcResolutions[e[0]],noClip:!1},{layer:s}=this,[l,n,o]=e,c=await s.fetchTile(l,n,o,a);if(c instanceof HTMLImageElement||c instanceof ImageBitmap)throw new t("layerview:unexpected-tile-data","Expected fetchTile to return raster data, but received an image element. This may indicate a problem with the layer's fetchTile implementation.");const m=c?.pixelBlock;if(null==m)return d;const p=new h([l,n,o],m,i.size[0],i.size[1]);return p.transformGrid=c.transformGrid,p.interpolation=s.interpolation,p}async doRefresh(){this.suspended||this.emit("data-changed")}isUpdating(){return!1}_canSymbolizeInWebGL(){return!0}get usedMemory(){return 0}};e([s()],y.prototype,"fullExtent",null),e([s({readOnly:!0})],y.prototype,"imageFormatIsOpaque",null),e([s({readOnly:!0})],y.prototype,"hasMixedImageFormats",null),e([s({readOnly:!0})],y.prototype,"dataLevelRange",null),e([s({readOnly:!0})],y.prototype,"visibleAtCurrentScale",null),y=e([l("esri.views.3d.layers.GeospatialPDFLayerView3D")],y);const f=y;export{f as default};
2
+ import{__decorate as e}from"tslib";import t from"../../../core/Error.js";import{whenOnce as r,watch as i,sync as a}from"../../../core/reactiveUtils.js";import{property as s,subclass as l}from"../../../core/accessorSupport/decorators.js";import{computeSrcResolutions as n,projectDatasetExtent as o}from"../../../layers/raster/functions/rasterProjectionHelper.js";import{LayerView3D as c}from"./LayerView3D.js";import{TiledLayerView3D as m}from"./TiledLayerView3D.js";import{RasterTile as d}from"../terrain/RasterTile.js";import{emptyTile as h}from"../terrain/TerrainData.js";import p from"../../layers/ImageryTileLayerView.js";import{RefreshableLayerView as u}from"../../layers/RefreshableLayerView.js";let y=class extends(u(m(c(p)))){constructor(){super(...arguments),this._srcResolutions=[],this.type="imagery-tile-3d",this.ignoresMemoryFactor=!1,this.unloadedMemory=0}initialize(){this.layer.increaseRasterJobHandlerUsage(),null==this.fullExtent&&this.addResolvingPromise(Promise.reject(new t("layerview:spatial-reference-incompatible","The layer extent cannot be projected to the view's spatial reference",{layer:this.layer})));const e=r(()=>this.view?.basemapTerrain?.tilingSchemeLocked).then(()=>{const e=this.view.basemapTerrain.tilingScheme;this.tileInfo=e.toTileInfo(),this._srcResolutions=n(this.layer.serviceRasterInfo,this.tileInfo),this.addHandles([i(()=>[this.layer.clippedToNeatline],()=>this._updatingHandles.addPromise(this.doRefresh()),a)])});this.addResolvingPromise(e)}destroy(){this.layer.decreaseRasterJobHandlerUsage()}get fullExtent(){try{return this.layer.loaded?this._getFullExtent():null}catch{return null}}get imageFormatIsOpaque(){return!1}get hasMixedImageFormats(){return!1}get dataLevelRange(){const e=this.layer.tileInfo,t=this.tileInfo.lodAt(0)?.scale,r=e.lodAt(e.lods.length-1)?.scale;return this.levelRangeFromScaleRange(t,r)}get visibleAtCurrentScale(){return this.tilesVisibleAtCurrentScale()}_getFullExtent(){return o(this.layer.serviceRasterInfo,this.view.groundView?.spatialReference??this.view.spatialReference)}async fetchTile(e,r){const i=this.tileInfo,a={tileInfo:i,requestRawData:this._canSymbolizeInWebGL(),signal:r.signal,srcResolution:this._srcResolutions[e[0]],noClip:!1},{layer:s}=this,[l,n,o]=e,c=await s.fetchTile(l,n,o,a);if(c instanceof HTMLImageElement||c instanceof ImageBitmap)throw new t("layerview:unexpected-tile-data","Expected fetchTile to return raster data, but received an image element. This may indicate a problem with the layer's fetchTile implementation.");const m=c?.pixelBlock;if(null==m)return h;const p=new d([l,n,o],m,i.size[0],i.size[1]);return p.transformGrid=c.transformGrid,p.interpolation="bilinear",p}async doRefresh(){this.suspended||this.emit("data-changed")}isUpdating(){return!1}_canSymbolizeInWebGL(){return!0}get usedMemory(){return 0}};e([s()],y.prototype,"fullExtent",null),e([s({readOnly:!0})],y.prototype,"imageFormatIsOpaque",null),e([s({readOnly:!0})],y.prototype,"hasMixedImageFormats",null),e([s({readOnly:!0})],y.prototype,"dataLevelRange",null),e([s({readOnly:!0})],y.prototype,"visibleAtCurrentScale",null),y=e([l("esri.views.3d.layers.GeospatialPDFLayerView3D")],y);const f=y;export{f as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../../../core/Error.js";import has from"../../../../core/has.js";import{px2pt as t,pt2px as r}from"../../../../core/screenUtils.js";import{fromValues as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{copy as a}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{ZEROS as s,clone as o,ones as l}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as n,fromBuffer as c,intersectsClippingArea as h,empty as p,expandWithAABB as m,expandWithBuffer as d}from"../../../../geometry/support/aaBoundingBox.js";import{getDriverAxisSizeValueAny as u}from"../../../../renderers/support/renderingInfoUtils.js";import{sharedGeometryElevationAligner as _}from"./ElevationAligners.js";import{elevationModeChangeUpdateType as y,needsElevationUpdates2D as f}from"./elevationAlignmentUtils.js";import{Graphics3DDrapedGraphicLayer as g}from"./Graphics3DDrapedGraphicLayer.js";import{Graphics3DObject3DGraphicLayer as b}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as v,nanFallbackColor as C}from"./Graphics3DSymbolLayer.js";import{parseCapType as P,computeSymbolLayerIndex as S,parseLineMarkerStyle as k}from"./lineUtils.js";import{initFastSymbolUpdatesState as w,updateFastSymbolUpdatesState as M,getAttributeValue as z,getSizeAttributeValue as L,ConvertOptions as O}from"../support/FastSymbolUpdates.js";import{debugFlags as x}from"../../support/debugFlags.js";import{createGeometry as U}from"../../support/engineContent/line.js";import{geometryToRenderInfo as E,geometryToRenderInfoDraped as V}from"../../support/renderInfoUtils/line.js";import{Object3D as j}from"../../webgl-engine/lib/Object3D.js";import{RenderGeometry as A}from"../../webgl-engine/lib/RenderGeometry.js";import{LineMarkerMaterial as D}from"../../webgl-engine/materials/LineMarkerMaterial.js";import{getStipplePatternForLinePattern as F,patternHidesLine as G}from"../../webgl-engine/materials/lineStippleUtils.js";import{RibbonLineMaterial as I}from"../../webgl-engine/materials/RibbonLineMaterial.js";const R=["polyline"];class W extends v{static{this.elevationModeChangeTypes={definedChanged:2,staysOnTheGround:0,onTheGroundChanged:2}}constructor(e,t,r,i){super(e,t,r,i,T(t))}async doLoad(){this._fastUpdates=w(this._context.renderer,this._fastVisualVariableConvertOptions());const r=!0;if(this._fastMarkerUpdates=w(this._context.renderer,this._fastVisualVariableConvertOptions(r)),!this._drivenProperties.size){if((null!=this.symbolLayer.size?this.symbolLayer.size:t(1))<0)throw new e("graphics3dlinesymbollayer:invalid-size","Symbol sizes may not be negative values")}}_getMaterialParameters(e,t){const r=this._screenSizePerspective,i=!!has("enable-feature:emissive-on-non-volumetric")&&!this.draped,{symbolLayer:a}=this,s=this._worldSizedEnabled,o={...this._getMaterialColorParameters(t),shadingEnabled:i,width:this._computeMaterialWidth(a?.size,s),worldSized:s,polygonOffset:3,polygonOffsetIndex:S(this._renderPriority,this._renderPriorityStep),join:a.join||"miter",cap:P(a.cap||"butt"),hasSlicePlane:this._context.slicePlaneEnabled,isClosed:e,stipplePattern:F(a.pattern??a.imagePattern),emissiveStrength:this._emissiveStrength,screenSizePerspective:r};if(2===t){if(this._fastMarkerUpdates?.visualVariables)return{...o,...this._fastMarkerUpdates.materialParameters}}else if(this._fastUpdates?.visualVariables)return{...o,...this._fastUpdates.materialParameters};return o}_getMaterialColorParameters(e){const t=2===e,r=this._getCombinedOpacityAndColor(t&&this._markerColor||this._materialColor);return this._patternHidesLine&&!t&&(r[3]=0),{color:r}}get _materialColor(){return this.symbolLayer.material?.color}get _emissiveStrength(){const e=this.symbolLayer.material?.emissive;return("color"===e?.source?e?.strength:void 0)??0}get _markerColor(){return this.symbolLayer.marker?.color}get _lineMaterial(){return this._materials[0]??=new I(this._getMaterialParameters(!1,0),this.view.state.isGlobal),this._materials[0]}get _wireframeLineMaterial(){return this._materials[1]??=new I({...this._getMaterialParameters(!1,1),wireframe:!0},this.view.state.isGlobal),this._materials[1]}get _markerMaterial(){return null==this._materials[2]&&null!=this.symbolLayer.marker&&(this._materials[2]=new D({...this._getMaterialParameters(!1,2),placement:this.symbolLayer.marker.placement,markerPrimitive:k(this.symbolLayer.marker.style)},this.view.state.isGlobal)),this._materials[2]}_getDrivenSize(e){if(this._drivenProperties.size){const t=e.size;if(null==t)return this._getFallbackSize();const r=u(t.output);return this._getWorldOrScreenSize(r)}return 1}_getDrivenColor({color:e,opacity:t}){const r=l();return this._drivenProperties.color&&(a(r,e?.output??this._getFallbackOpacityAndColor(s)),null==t)||this._drivenProperties.opacity&&(e||this._materialColor)&&(r[3]=t?.output??this._getFallbackOpacity()),r}_getDrivenMarkerColor({color:e,opacity:t}){const r=l();return this._drivenProperties.color&&(a(r,e?.output??this._getFallbackMarkerOpacityAndColor(s)),null==t)||this._drivenProperties.opacity&&(e||this._markerColor||this._materialColor)&&(r[3]=t?.output??this._getFallbackMarkerOpacity()),r}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validatePolylineContext(e))return null;const r=this.createElevationContextForGraphic(t),i="on-the-ground"===r.mode;return"line-3d"===this.symbol.type&&this.symbol.worldSized&&!i?(this.logger.warnOnce("World-sized LineSymbol3DLayer can only be displayed in layers with 'on-the-ground' elevation mode; graphic skipped"),null):(this.ensureDrapedStatus(i),this.draped?this._createAsOverlay(e):this._createAs3DShape(e,r,t.uid))}_validatePolylineContext(e){const t=e.graphic.geometry;return this._validateGeometry(t,R,this.symbolLayer.type)&&"polyline"===t.type}applyRendererDiff(e,t){for(const r in e.diff){if("visualVariables"!==r)return 0;{const e=this._fastUpdates;if(!M(e,t,this._fastVisualVariableConvertOptions()))return 0;for(const t of this._materials)t instanceof I&&t.setParameters(e.materialParameters);const r=this._fastMarkerUpdates,i=!0;if(!M(r,t,this._fastVisualVariableConvertOptions(i)))return 0;for(const t of this._materials)t instanceof D&&t.setParameters(r.materialParameters)}}return 2}prepareSymbolLayerPatch(e){if("partial"!==e.diff.type)return;const t=e.diff.diff,r={};"complete"===t.size?.type&&(r.width=this._computeMaterialWidth(t.size.newValue,this._worldSizedEnabled),delete t.size),"complete"===t.cap?.type&&(r.cap=P(t.cap.newValue??"butt"),delete t.cap);const i=this._prepareMarkerPatch(e,t);this._prepareMaterialPatch(e,t,i),e.symbolLayerStatePatches.push(()=>{for(const e of this._materials)e?.setParameters(r)})}layerOpacityChanged(){for(let e=0;e<3;e++)this._materials[e]?.setParameters(this._getMaterialColorParameters(e))}get _screenSizePerspective(){return!this.draped&&this._context.screenSizePerspectiveEnabled?this.view.screenSizePerspective.parameters:null}layerScreenSizePerspectiveChanged(){const e=this._screenSizePerspective;for(const t of this._materials)t?.setParameters({screenSizePerspective:e})}layerElevationInfoChanged(e,t,r){const i=this._elevationContext.mode,a=y(W.elevationModeChangeTypes,r,i);if(1!==a)return a;const s=f(i);return this.updateGraphics3DGraphicElevationInfo(e,t,()=>s)}slicePlaneEnabledChanged(){const e={hasSlicePlane:this._context.slicePlaneEnabled};for(const t of this._materials)t?.setParameters(e);return!0}physicalBasedRenderingChanged(){return!0}_createAs3DShape(e,t,r){const i=H(e.graphic.geometry);if(null==i)return null;const a=new Array,s=n(),o=E(i,this._context.elevationProvider,this._context.renderCoordsHelper,t);this._logGeometryCreationWarnings(o,i.paths,"paths","LineSymbol3DLayer");for(let n=0;n<o.lines.length;n++){const t=o.lines[n],l=t.position,p=t.mapPositions;if(null!=this._context.clippingExtent&&(c(p,s),!h(s,this._context.clippingExtent)))continue;const m=this._createGeometry(this._lineMaterial,e,l,p,i.type,1,r);if(a.push(m),x.LINE_WIREFRAMES&&a.push(m.instantiate({material:this._wireframeLineMaterial})),null!=this._markerMaterial){const t=m.instantiate({material:this._markerMaterial});t.attributes.has("color")&&t.setAttributeData("color",this._getDrivenMarkerColor(e.renderingInfo)),a.push(t)}}if(0===a.length)return null;const l=this._context.layerViewUid,p=new j({geometries:a,castShadow:!1,layerViewUid:l,graphicUid:r}),m=new b(this,p,null,_,t);return m.alignedSampledElevation=o.sampledElevation,m.needsElevationUpdates=f(t.mode),m}_createGeometry(e,t,r,i,a,s,o){const l=0===s?{spatialReference:this._context.overlaySR,renderCoordsHelper:this._context.renderCoordsHelper}:null,n="polygon"===a,c=this._fastUpdates?.visualVariables.color,h=this._fastUpdates?.visualVariables.size,p=this._fastUpdates?.visualVariables.opacity,m=this._context.layerViewUid,d=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:o,layerViewUid:m}),{renderingInfo:u}=t,_={position:r,size:h?null:this._getDrivenSize(u),color:c?null:this._getDrivenColor(u),sizeFeature:h?L(h,u.size):null,colorFeature:c?z(c,u.color):null,opacityFeature:p?z(p,u.opacity):null};return U(e,{overlayInfo:l,removeDuplicateStartEnd:n,mapPositions:i,attributeData:_},d)}_createAsOverlay(e){const t=e.graphic,{geometry:r}=t;this._lineMaterial.renderPriority=this._renderPriority;const i=x.LINE_WIREFRAMES?this._wireframeLineMaterial:null,a=this._markerMaterial;null!=i&&(i.renderPriority=this._renderPriority-.001),null!=a&&(a.renderPriority=this._renderPriority-.002);const s=new Array,o=n(),l=p(),u=V(r,this._context.overlaySR);this._logGeometryCreationWarnings(u,r.paths,"paths","LineSymbol3DLayer");for(const n of u.lines){if(c(n.position,o),!h(o,this._context.clippingExtent))continue;m(l,o);const p=this._createGeometry(this._lineMaterial,e,n.position,void 0,r.type,0,t.uid),u=e=>{const r=this._context.layerViewUid,i=new A(e,{layerViewUid:r,graphicUid:t.uid});s.push(i)};if(null!=a){const t=p.instantiate({material:a});t.attributes.has("color")&&t.setAttributeData("color",this._getDrivenMarkerColor(e.renderingInfo)),u(t);const r=this.symbolLayer.marker.placement;"begin"!==r&&"begin-end"!==r||d(o,n.position,0,1),"end"!==r&&"begin-end"!==r||d(o,n.position,n.position.length-3,1)}u(p),x.LINE_WIREFRAMES&&u(p.instantiate({material:i}))}return new g(this,s,l,this._context.drapeSourceRenderer)}get _patternHidesLine(){return G(this.symbolLayer.pattern)}_computeMaterialWidth(e,i){return i?e??1:(e=e??t(1),this._drivenProperties.size?this._fastUpdates?.visualVariables.size?r(1):1:r(e))}_prepareMaterialPatch(e,t,r){const i=t.material;if(null==i)return void(r.changed&&r.useMaterialColor&&B(this._getCombinedOpacityAndColor(this._materialColor),this._materials[2],e));if("collection"===i.type)return;const a="complete"===i.type?i.newValue?.color:"complete"===i.diff.color?.type?i.diff.color.newValue:null,s=this._getCombinedOpacityAndColor(a);r.useMaterialColor&&B(o(s),this._materials[2],e),this._patternHidesLine&&(s[3]=0),B(s,this._materials[0],e),delete t.material}_prepareMarkerPatch(e,t){const r=t.marker,i=this._markerMaterial;if(null==r||"partial"!==r.type||null==r.diff||null!=r.diff.placement||null!=r.diff.style&&"complete"!==r.diff.style.type||null!=r.diff.color&&"complete"!==r.diff.color.type||null==i)return{changed:!1,useMaterialColor:null==this._markerColor};const a=r.diff.color,s=null!=a,o=s?a.newValue:null,l=null==o&&null==this._markerColor;o&&B(this._getCombinedOpacityAndColor(o),i,e);const n=r.diff.style?.newValue;return n&&e.symbolLayerStatePatches.push(()=>i.setParameters({markerPrimitive:k(n)})),delete t.marker,{changed:s,useMaterialColor:l}}_fastVisualVariableConvertOptions(e=!1){const t=this._getFallbackSize();return new O({supports:{size:!0,color:!0,rotation:!1,opacity:!0},fallbackColor:e?this._getFallbackMarkerOpacityAndColor(C):this._getFallbackOpacityAndColor(C),fallbackSize:i(t,t,t)})}_getFallbackOpacityAndColor(e){return this._materialColor?.toUnitRGBA()??e}_getFallbackOpacity(){return this._materialColor?.a??0}_getFallbackMarkerOpacityAndColor(e){return this.symbolLayer?.marker?.color?.toUnitRGBA()??this._getFallbackOpacityAndColor(e)}_getFallbackMarkerOpacity(){return this.symbolLayer?.marker?.color?.a??this._getFallbackOpacity()}get _worldSizedEnabled(){return"line-3d"===this.symbol.type&&this.symbol.worldSized&&this.draped}_getWorldOrScreenSize(e){return this._worldSizedEnabled?e:r(e)}_getFallbackSize(){const e=this.symbolLayer?.size;return null==e?1:this._getWorldOrScreenSize(e)}}function H(e){return"polyline"===e.type?e:null}function B(e,t,r){null!=t&&r.symbolLayerStatePatches.push(()=>t.setParameters({color:e}))}function T(e){return 1===(e.material?.color?.a??1)&&1===(e.marker?.color?.a??1)}export{W as Graphics3DLineSymbolLayer};
2
+ import e from"../../../../core/Error.js";import has from"../../../../core/has.js";import{px2pt as t,pt2px as r}from"../../../../core/screenUtils.js";import{fromValues as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{copy as a}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{ZEROS as s,clone as o,ones as l}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{create as n,fromBuffer as c,intersectsClippingArea as h,empty as p,expandWithAABB as m,expandWithBuffer as d}from"../../../../geometry/support/aaBoundingBox.js";import{getDriverAxisSizeValueAny as u}from"../../../../renderers/support/renderingInfoUtils.js";import{sharedGeometryElevationAligner as _}from"./ElevationAligners.js";import{elevationModeChangeUpdateType as y,needsElevationUpdates2D as f}from"./elevationAlignmentUtils.js";import{Graphics3DDrapedGraphicLayer as g}from"./Graphics3DDrapedGraphicLayer.js";import{Graphics3DObject3DGraphicLayer as b}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as v,nanFallbackColor as C}from"./Graphics3DSymbolLayer.js";import{parseCapType as P,computeSymbolLayerIndex as S,parseLineMarkerStyle as k}from"./lineUtils.js";import{initFastSymbolUpdatesState as M,updateFastSymbolUpdatesState as w,getAttributeValue as z,getSizeAttributeValue as L,ConvertOptions as O}from"../support/FastSymbolUpdates.js";import{debugFlags as x}from"../../support/debugFlags.js";import{createGeometry as U}from"../../support/engineContent/line.js";import{geometryToRenderInfo as E,geometryToRenderInfoDraped as V}from"../../support/renderInfoUtils/line.js";import{Object3D as j}from"../../webgl-engine/lib/Object3D.js";import{RenderGeometry as A}from"../../webgl-engine/lib/RenderGeometry.js";import{LineMarkerMaterial as D}from"../../webgl-engine/materials/LineMarkerMaterial.js";import{getStipplePatternForLinePattern as F,patternHidesLine as G}from"../../webgl-engine/materials/lineStippleUtils.js";import{RibbonLineMaterial as I}from"../../webgl-engine/materials/RibbonLineMaterial.js";const R=["polyline"];class W extends v{static{this.elevationModeChangeTypes={definedChanged:2,staysOnTheGround:0,onTheGroundChanged:2}}constructor(e,t,r,i){super(e,t,r,i,T(t))}async doLoad(){this._fastUpdates=M(this._context.renderer,this._fastVisualVariableConvertOptions());const r=!0;if(this._fastMarkerUpdates=M(this._context.renderer,this._fastVisualVariableConvertOptions(r)),!this._drivenProperties.size){if((null!=this.symbolLayer.size?this.symbolLayer.size:t(1))<0)throw new e("graphics3dlinesymbollayer:invalid-size","Symbol sizes may not be negative values")}}_getMaterialParameters(e,t){const r=this._screenSizePerspective,i=!!has("enable-feature:emissive-on-non-volumetric")&&!this.draped,{symbolLayer:a}=this,s=this._worldSizedEnabled,o={...this._getMaterialColorParameters(t),shadingEnabled:i,width:this._computeMaterialWidth(a?.size,s),worldSized:s,polygonOffset:3,polygonOffsetIndex:S(this._renderPriority,this._renderPriorityStep),join:a.join||"miter",cap:P(a.cap||"butt"),hasSlicePlane:this._context.slicePlaneEnabled,isClosed:e,stipplePattern:F(a.pattern??a.imagePattern),emissiveStrength:this._emissiveStrength,screenSizePerspective:r};if(2===t){if(this._fastMarkerUpdates?.visualVariables)return{...o,...this._fastMarkerUpdates.materialParameters}}else if(this._fastUpdates?.visualVariables)return{...o,...this._fastUpdates.materialParameters};return o}_getMaterialColorParameters(e){const t=2===e,r=this._getCombinedOpacityAndColor(t&&this._markerColor||this._materialColor);return this._patternHidesLine&&!t&&(r[3]=0),{color:r}}get _materialColor(){return this.symbolLayer.material?.color}get _emissiveStrength(){const e=this.symbolLayer.material?.emissive;return("color"===e?.source?e?.strength:void 0)??0}get _markerColor(){return this.symbolLayer.marker?.color}get _lineMaterial(){return this._materials[0]??=new I(this._getMaterialParameters(!1,0),this.view.state.isGlobal),this._materials[0]}get _wireframeLineMaterial(){return this._materials[1]??=new I({...this._getMaterialParameters(!1,1),wireframe:!0},this.view.state.isGlobal),this._materials[1]}get _markerMaterial(){return null==this._materials[2]&&null!=this.symbolLayer.marker&&(this._materials[2]=new D({...this._getMaterialParameters(!1,2),placement:this.symbolLayer.marker.placement,markerPrimitive:k(this.symbolLayer.marker.style)},this.view.state.isGlobal)),this._materials[2]}_getDrivenSize(e){if(this._drivenProperties.size){const t=e.size;if(null==t)return this._getFallbackSize();const r=u(t.output);return this._getWorldOrScreenSize(r)}return 1}_getDrivenColor({color:e,opacity:t}){const r=l();return this._drivenProperties.color&&(a(r,e?.output??this._getFallbackOpacityAndColor(s)),null==t)||this._drivenProperties.opacity&&(e||this._materialColor)&&(r[3]=t?.output??this._getFallbackOpacity()),r}_getDrivenMarkerColor({color:e,opacity:t}){const r=l();return this._drivenProperties.color&&(a(r,e?.output??this._getFallbackMarkerOpacityAndColor(s)),null==t)||this._drivenProperties.opacity&&(e||this._markerColor||this._materialColor)&&(r[3]=t?.output??this._getFallbackMarkerOpacity()),r}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validatePolylineContext(e))return null;const r=this.createElevationContextForGraphic(t),i="on-the-ground"===r.mode;return this.ensureDrapedStatus(i),this.draped?this._createAsOverlay(e):this._createAs3DShape(e,r,t.uid)}_validatePolylineContext(e){const t=e.graphic.geometry;return this._validateGeometry(t,R,this.symbolLayer.type)&&"polyline"===t.type}applyRendererDiff(e,t){for(const r in e.diff){if("visualVariables"!==r)return 0;{const e=this._fastUpdates;if(!w(e,t,this._fastVisualVariableConvertOptions()))return 0;for(const t of this._materials)t instanceof I&&t.setParameters(e.materialParameters);const r=this._fastMarkerUpdates,i=!0;if(!w(r,t,this._fastVisualVariableConvertOptions(i)))return 0;for(const t of this._materials)t instanceof D&&t.setParameters(r.materialParameters)}}return 2}prepareSymbolLayerPatch(e){if("partial"!==e.diff.type)return;const t=e.diff.diff,r={};"complete"===t.size?.type&&(r.width=this._computeMaterialWidth(t.size.newValue,this._worldSizedEnabled),delete t.size),"complete"===t.cap?.type&&(r.cap=P(t.cap.newValue??"butt"),delete t.cap);const i=this._prepareMarkerPatch(e,t);this._prepareMaterialPatch(e,t,i),e.symbolLayerStatePatches.push(()=>{for(const e of this._materials)e?.setParameters(r)})}layerOpacityChanged(){for(let e=0;e<3;e++)this._materials[e]?.setParameters(this._getMaterialColorParameters(e))}get _screenSizePerspective(){return!this.draped&&this._context.screenSizePerspectiveEnabled?this.view.screenSizePerspective.parameters:null}layerScreenSizePerspectiveChanged(){const e=this._screenSizePerspective;for(const t of this._materials)t?.setParameters({screenSizePerspective:e})}layerElevationInfoChanged(e,t,r){const i=this._elevationContext.mode,a=y(W.elevationModeChangeTypes,r,i);if(1!==a)return a;const s=f(i);return this.updateGraphics3DGraphicElevationInfo(e,t,()=>s)}slicePlaneEnabledChanged(){const e={hasSlicePlane:this._context.slicePlaneEnabled};for(const t of this._materials)t?.setParameters(e);return!0}physicalBasedRenderingChanged(){return!0}_createAs3DShape(e,t,r){const i=H(e.graphic.geometry);if(null==i)return null;const a=new Array,s=n(),o=E(i,this._context.elevationProvider,this._context.renderCoordsHelper,t);this._logGeometryCreationWarnings(o,i.paths,"paths","LineSymbol3DLayer");for(let n=0;n<o.lines.length;n++){const t=o.lines[n],l=t.position,p=t.mapPositions;if(null!=this._context.clippingExtent&&(c(p,s),!h(s,this._context.clippingExtent)))continue;const m=this._createGeometry(this._lineMaterial,e,l,p,i.type,1,r);if(a.push(m),x.LINE_WIREFRAMES&&a.push(m.instantiate({material:this._wireframeLineMaterial})),null!=this._markerMaterial){const t=m.instantiate({material:this._markerMaterial});t.attributes.has("color")&&t.setAttributeData("color",this._getDrivenMarkerColor(e.renderingInfo)),a.push(t)}}if(0===a.length)return null;const l=this._context.layerViewUid,p=new j({geometries:a,castShadow:!1,layerViewUid:l,graphicUid:r}),m=new b(this,p,null,_,t);return m.alignedSampledElevation=o.sampledElevation,m.needsElevationUpdates=f(t.mode),m}_createGeometry(e,t,r,i,a,s,o){const l=0===s?{spatialReference:this._context.overlaySR,renderCoordsHelper:this._context.renderCoordsHelper}:null,n="polygon"===a,c=this._fastUpdates?.visualVariables.color,h=this._fastUpdates?.visualVariables.size,p=this._fastUpdates?.visualVariables.opacity,m=this._context.layerViewUid,d=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:o,layerViewUid:m}),{renderingInfo:u}=t,_={position:r,size:h?null:this._getDrivenSize(u),color:c?null:this._getDrivenColor(u),sizeFeature:h?L(h,u.size):null,colorFeature:c?z(c,u.color):null,opacityFeature:p?z(p,u.opacity):null};return U(e,{overlayInfo:l,removeDuplicateStartEnd:n,mapPositions:i,attributeData:_},d)}_createAsOverlay(e){const t=e.graphic,{geometry:r}=t;this._lineMaterial.renderPriority=this._renderPriority;const i=x.LINE_WIREFRAMES?this._wireframeLineMaterial:null,a=this._markerMaterial;null!=i&&(i.renderPriority=this._renderPriority-.001),null!=a&&(a.renderPriority=this._renderPriority-.002);const s=new Array,o=n(),l=p(),u=V(r,this._context.overlaySR);this._logGeometryCreationWarnings(u,r.paths,"paths","LineSymbol3DLayer");for(const n of u.lines){if(c(n.position,o),!h(o,this._context.clippingExtent))continue;m(l,o);const p=this._createGeometry(this._lineMaterial,e,n.position,void 0,r.type,0,t.uid),u=e=>{const r=this._context.layerViewUid,i=new A(e,{layerViewUid:r,graphicUid:t.uid});s.push(i)};if(null!=a){const t=p.instantiate({material:a});t.attributes.has("color")&&t.setAttributeData("color",this._getDrivenMarkerColor(e.renderingInfo)),u(t);const r=this.symbolLayer.marker.placement;"begin"!==r&&"begin-end"!==r||d(o,n.position,0,1),"end"!==r&&"begin-end"!==r||d(o,n.position,n.position.length-3,1)}u(p),x.LINE_WIREFRAMES&&u(p.instantiate({material:i}))}return new g(this,s,l,this._context.drapeSourceRenderer)}get _patternHidesLine(){return G(this.symbolLayer.pattern)}_computeMaterialWidth(e,i){return i?e??1:(e=e??t(1),this._drivenProperties.size?this._fastUpdates?.visualVariables.size?r(1):1:r(e))}_prepareMaterialPatch(e,t,r){const i=t.material;if(null==i)return void(r.changed&&r.useMaterialColor&&B(this._getCombinedOpacityAndColor(this._materialColor),this._materials[2],e));if("collection"===i.type)return;const a="complete"===i.type?i.newValue?.color:"complete"===i.diff.color?.type?i.diff.color.newValue:null,s=this._getCombinedOpacityAndColor(a);r.useMaterialColor&&B(o(s),this._materials[2],e),this._patternHidesLine&&(s[3]=0),B(s,this._materials[0],e),delete t.material}_prepareMarkerPatch(e,t){const r=t.marker,i=this._markerMaterial;if(null==r||"partial"!==r.type||null==r.diff||null!=r.diff.placement||null!=r.diff.style&&"complete"!==r.diff.style.type||null!=r.diff.color&&"complete"!==r.diff.color.type||null==i)return{changed:!1,useMaterialColor:null==this._markerColor};const a=r.diff.color,s=null!=a,o=s?a.newValue:null,l=null==o&&null==this._markerColor;o&&B(this._getCombinedOpacityAndColor(o),i,e);const n=r.diff.style?.newValue;return n&&e.symbolLayerStatePatches.push(()=>i.setParameters({markerPrimitive:k(n)})),delete t.marker,{changed:s,useMaterialColor:l}}_fastVisualVariableConvertOptions(e=!1){const t=this._getFallbackSize();return new O({supports:{size:!0,color:!0,rotation:!1,opacity:!0},fallbackColor:e?this._getFallbackMarkerOpacityAndColor(C):this._getFallbackOpacityAndColor(C),fallbackSize:i(t,t,t)})}_getFallbackOpacityAndColor(e){return this._materialColor?.toUnitRGBA()??e}_getFallbackOpacity(){return this._materialColor?.a??0}_getFallbackMarkerOpacityAndColor(e){return this.symbolLayer?.marker?.color?.toUnitRGBA()??this._getFallbackOpacityAndColor(e)}_getFallbackMarkerOpacity(){return this.symbolLayer?.marker?.color?.a??this._getFallbackOpacity()}get _worldSizedEnabled(){return"line-3d"===this.symbol.type&&this.symbol.worldSized}_getWorldOrScreenSize(e){return this._worldSizedEnabled?e:r(e)}_getFallbackSize(){const e=this.symbolLayer?.size;return null==e?1:this._getWorldOrScreenSize(e)}}function H(e){return"polyline"===e.type?e:null}function B(e,t,r){null!=t&&r.symbolLayerStatePatches.push(()=>t.setParameters({color:e}))}function T(e){return 1===(e.material?.color?.a??1)&&1===(e.marker?.color?.a??1)}export{W as Graphics3DLineSymbolLayer};