@arcgis/core 4.33.0-next.20250311 → 4.33.0-next.20250313

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 (162) hide show
  1. package/Basemap.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/025f8b72d7d8b5cccb0f.js +1 -0
  4. package/assets/esri/core/workers/chunks/{5b1b93665c93955491c4.js → 08bfceab05b5ea02bb4e.js} +106 -107
  5. package/assets/esri/core/workers/chunks/{bc988b9d3990380be907.js → 0a98dc3ea67ce97a6e7b.js} +1 -1
  6. package/assets/esri/core/workers/chunks/0e5c77d043ed4641556f.js +1 -0
  7. package/assets/esri/core/workers/chunks/10fc47b441ae49ef4db8.js +1 -0
  8. package/assets/esri/core/workers/chunks/{eacab4bd6eb58e545f73.js → 11f9d7cd95891596b716.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{4263eee3247aaf4e64bf.js → 147e412de9972da16a1d.js} +1 -1
  10. package/assets/esri/core/workers/chunks/4908b36ef448bfe1f448.js +1 -0
  11. package/assets/esri/core/workers/chunks/4d95cc85f4b73e857b1f.js +1 -0
  12. package/assets/esri/core/workers/chunks/54ace3e4802934f3f9f2.js +1 -0
  13. package/assets/esri/core/workers/chunks/5820808c7659460969d4.js +1 -0
  14. package/assets/esri/core/workers/chunks/6388fdacb434a266b039.js +314 -0
  15. package/assets/esri/core/workers/chunks/add0770399a63b7635b5.js +1 -0
  16. package/assets/esri/core/workers/chunks/b2f8702a9f54fff23ad9.js +1 -0
  17. package/assets/esri/core/workers/chunks/b8b8425e8b1246cdc86d.js +1 -0
  18. package/assets/esri/core/workers/chunks/d0fbd4c6bffe0cb98d14.js +1 -0
  19. package/assets/esri/core/workers/chunks/{2c227d97d00b3849f441.js → d459c790a3b89ac53d2d.js} +1 -1
  20. package/assets/esri/core/workers/chunks/dd6f18bbab50be139d20.js +1 -0
  21. package/assets/esri/core/workers/chunks/de6864e120243cf0bee8.js +1 -0
  22. package/assets/esri/core/workers/chunks/fc7ce48c7b31a4665a9b.js +1 -0
  23. package/assets/esri/core/workers/chunks/fe6e7ac83cd2293d576e.js +1 -0
  24. package/chunks/ComponentShader.glsl.js +7 -8
  25. package/chunks/DefaultMaterial.glsl.js +21 -21
  26. package/chunks/HighlightApply.glsl.js +27 -132
  27. package/chunks/{SingleHighlightBlur.glsl.js → HighlightBlur.glsl.js} +4 -4
  28. package/chunks/HighlightDownsample.glsl.js +8 -8
  29. package/chunks/HighlightToSingle.glsl.js +2 -2
  30. package/chunks/Pattern.glsl.js +23 -25
  31. package/chunks/RealisticTree.glsl.js +12 -12
  32. package/chunks/ShadowHighlight.glsl.js +5 -6
  33. package/chunks/Terrain.glsl.js +30 -31
  34. package/core/LRUCache.js +1 -1
  35. package/core/MemCache.js +1 -1
  36. package/core/has.js +1 -1
  37. package/geometry/support/ShortArray.js +5 -0
  38. package/interfaces.d.ts +18 -4
  39. package/layers/support/layerUtils.js +1 -1
  40. package/layers/video/VideoController.js +1 -1
  41. package/package.json +1 -1
  42. package/support/revision.js +1 -1
  43. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  44. package/views/2d/engine/webgl/Painter.js +1 -1
  45. package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
  46. package/views/2d/engine/webgl/effects/FeatureEffect.js +1 -1
  47. package/views/2d/engine/webgl/effects/HighlightEffect.js +1 -1
  48. package/views/2d/engine/webgl/effects/HittestEffect.js +1 -1
  49. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  50. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  51. package/views/2d/layers/imagery/VectorFieldTileView2D.js +1 -1
  52. package/views/3d/analysis/Viewshed/ViewshedComputedData.js +1 -1
  53. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  54. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  55. package/views/3d/environment/CloudsRenderer.js +1 -1
  56. package/views/3d/environment/EnvironmentManager.js +1 -1
  57. package/views/3d/environment/Fog.js +1 -1
  58. package/views/3d/environment/Precipitation.js +1 -1
  59. package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayer.js +1 -1
  60. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  61. package/views/3d/layers/graphics/Graphics3DLodInstanceGraphicLayer.js +1 -1
  62. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  63. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  64. package/views/3d/layers/graphics/LabelInfo.js +1 -1
  65. package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
  66. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
  67. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
  68. package/views/3d/layers/graphics/pipeline/featureData/processingUtils.js +1 -1
  69. package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
  70. package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
  71. package/views/3d/layers/graphics/pipeline/rendering/LodRenderer.js +1 -1
  72. package/views/3d/layers/graphics/pipeline/rendering/RenderCommandContext.js +1 -1
  73. package/views/3d/layers/graphics/pipeline/symbolization/TestObjectSymbol.js +1 -1
  74. package/views/3d/layers/graphics/pipeline/symbolization/TestSymbol.js +1 -1
  75. package/views/3d/layers/graphics/pipeline/utils.js +1 -1
  76. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  77. package/views/3d/support/flowUtils.js +5 -0
  78. package/views/3d/terrain/OverlayRenderTargets.js +1 -1
  79. package/views/3d/terrain/OverlayRenderer.js +1 -1
  80. package/views/3d/terrain/TileRenderer.js +1 -1
  81. package/views/3d/webgl/ManagedFBO.js +1 -1
  82. package/views/3d/webgl/formats.js +1 -1
  83. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  84. package/views/3d/webgl-engine/core/shaderLibrary/HighlightCellGridScreenSpacePass.glsl.js +2 -2
  85. package/views/3d/webgl-engine/core/shaderLibrary/HighlightReadBitmap.glsl.js +3 -3
  86. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +63 -77
  87. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +6 -6
  88. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +7 -8
  89. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +18 -18
  90. package/views/3d/webgl-engine/core/shaderModules/UintTexture2DBindUniform.js +5 -0
  91. package/views/3d/webgl-engine/core/shaderModules/UintTexture2DDrawUniform.js +5 -0
  92. package/views/3d/webgl-engine/core/shaderModules/UintTexture2DPassUniform.js +5 -0
  93. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  94. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  95. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  96. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  97. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  98. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  99. package/views/3d/webgl-engine/effects/highlight/HighlightBlurTechnique.js +5 -0
  100. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  101. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  102. package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
  103. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  104. package/views/3d/webgl-engine/lib/Normals.js +1 -1
  105. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  106. package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
  107. package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
  108. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  109. package/views/3d/webgl-engine/lib/Program.js +1 -1
  110. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  111. package/views/3d/webgl-engine/lib/VertexAttribute.js +1 -1
  112. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  113. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  114. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  115. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  116. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  117. package/views/3d/webgl-engine/parts/Model.js +1 -1
  118. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  119. package/views/3d/webgl-engine/shaders/HighlightApply.glsl.js +1 -1
  120. package/views/3d/webgl-engine/shaders/{SingleHighlightBlur.glsl.js → HighlightBlur.glsl.js} +1 -1
  121. package/views/3d/webgl-engine/shaders/HighlightDownsample.glsl.js +1 -1
  122. package/views/3d/webgl-engine/shaders/HighlightToSingle.glsl.js +1 -1
  123. package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
  124. package/views/3d/webgl-engine/shaders/ShadowHighlight.glsl.js +1 -1
  125. package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
  126. package/views/FocusAreas.js +1 -1
  127. package/views/animation/easing.js +1 -1
  128. package/views/support/imageReprojection.js +1 -1
  129. package/views/support/projectionUtils.js +1 -1
  130. package/views/webgl/FramebufferObject.js +1 -1
  131. package/views/webgl/RenderingContext.js +1 -1
  132. package/views/webgl/ShaderBuilder.js +1 -1
  133. package/views/webgl/ShaderTranspiler.js +1 -1
  134. package/views/webgl/ValidatedTextureDescriptor.js +1 -1
  135. package/views/webgl/enums.js +1 -1
  136. package/widgets/Editor/EditorViewModel.js +1 -1
  137. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  138. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  139. package/widgets/OrientedImageryViewer.js +1 -1
  140. package/widgets/support/GoTo.js +1 -1
  141. package/widgets/support/goToUtils.js +1 -1
  142. package/assets/esri/core/workers/chunks/0137c17f15d79134b4ca.js +0 -314
  143. package/assets/esri/core/workers/chunks/15fe629cd4da1bb2169f.js +0 -1
  144. package/assets/esri/core/workers/chunks/3bbf7f89bc37c01b453b.js +0 -1
  145. package/assets/esri/core/workers/chunks/40f2c8022fd583c43f42.js +0 -1
  146. package/assets/esri/core/workers/chunks/4f2bb248dd258b493663.js +0 -1
  147. package/assets/esri/core/workers/chunks/5295e685ae839087c568.js +0 -1
  148. package/assets/esri/core/workers/chunks/54b115ecf446b4095d3e.js +0 -1
  149. package/assets/esri/core/workers/chunks/5a536de1ecae424bad05.js +0 -1
  150. package/assets/esri/core/workers/chunks/7ca9230681d05ef89059.js +0 -1
  151. package/assets/esri/core/workers/chunks/8196ff250c0de00104f7.js +0 -1
  152. package/assets/esri/core/workers/chunks/840c02610d845114ace7.js +0 -1
  153. package/assets/esri/core/workers/chunks/a4228101f709f0bb9a3d.js +0 -1
  154. package/assets/esri/core/workers/chunks/be883ebdbaf11647b718.js +0 -1
  155. package/assets/esri/core/workers/chunks/d374d2a1487faee3672d.js +0 -1
  156. package/assets/esri/core/workers/chunks/dbdca19978fbee8dc106.js +0 -1
  157. package/assets/esri/core/workers/chunks/ffd28a9b1d8db3a731f4.js +0 -1
  158. package/chunks/SingleHighlightApply.glsl.js +0 -32
  159. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PositionAttribute.glsl.js +0 -5
  160. package/views/3d/webgl-engine/effects/highlight/SingleHighlightApplyTechnique.js +0 -5
  161. package/views/3d/webgl-engine/effects/highlight/SingleHighlightBlurTechnique.js +0 -5
  162. package/views/3d/webgl-engine/shaders/SingleHighlightApply.glsl.js +0 -5
@@ -2,7 +2,7 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{Offset as r}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColorOrColorEmission as i}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as a}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstancedDoublePrecision as l}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{PositionAttribute as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/PositionAttribute.glsl.js";import{SymbolColor as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js";import{TextureCoordinateAttribute as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VerticalOffset as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as m}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{EvaluateAmbientOcclusion as v}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as b,addAmbientBoostFactor as w,addLightingGlobalFactor as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightDirection as u,addMainLightIntensity as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{PhysicallyBasedRendering as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import{PBRMode as x,PhysicallyBasedRenderingParameters as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapPass as C,ReadShadowMapDraw as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{VisualVariables as O}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{DiscardOrAdjustAlphaPass as P}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{MixExternalColor as M}from"../views/3d/webgl-engine/core/shaderLibrary/util/MixExternalColor.glsl.js";import{addProjViewLocalOrigin as A,addCameraPosition as S}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as E}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{Float4PassUniform as D}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as F}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as $,If as N}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as V}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{VertexAttribute as I}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{outputColorHighlightOID as T}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as B}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as R}from"../webscene/support/AlphaCutoff.js";function _(_){const z=new B,{vertex:k,fragment:G,varyings:U}=z,{output:W,offsetBackfaces:H,instancedColor:q,pbrMode:J,snowCover:K,spherical:Q}=_,X=J===x.Normal||J===x.Schematic;if(A(k,_),z.include(s),U.add("vpos","vec3",{invariant:!0}),z.include(O,_),z.include(l,_),z.include(g,_),z.include(j,_),i(W)&&(S(z.vertex,_),z.include(t,_),z.include(a,_),H&&z.include(r),q&&z.attributes.add(I.INSTANCECOLOR,"vec4"),U.add("vNormalWorld","vec3"),U.add("localvpos","vec3",{invariant:!0}),z.include(d,_),z.include(e,_),z.include(n,_),z.include(c,_),k.uniforms.add(new D("externalColor",(e=>e.externalColor))),U.add("vcolorExt","vec4"),k.main.add($`
5
+ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{Offset as r}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.js";import{isColorOrColorEmission as o}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as i}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as a}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{InstancedDoublePrecision as l}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js";import{NormalAttribute as t}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{SymbolColor as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js";import{TextureCoordinateAttribute as n}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VerticalOffset as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js";import{DefaultMaterialAuxiliaryPasses as g}from"../views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js";import{EvaluateAmbientOcclusion as m}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as v,addAmbientBoostFactor as b,addLightingGlobalFactor as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightDirection as p,addMainLightIntensity as h}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{PhysicallyBasedRendering as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js";import{PBRMode as f,PhysicallyBasedRenderingParameters as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapPass as y,ReadShadowMapDraw as C}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{VisualVariables as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js";import{DiscardOrAdjustAlphaPass as O}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{MixExternalColor as P}from"../views/3d/webgl-engine/core/shaderLibrary/util/MixExternalColor.glsl.js";import{addProjViewLocalOrigin as M,addCameraPosition as S}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3PassUniform as A}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{Float4PassUniform as E}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as D}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as F,If as N}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DPassUniform as $}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{VertexAttribute as I}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{outputColorHighlightOID as V}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js";import{ShaderBuilder as T}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as B}from"../webscene/support/AlphaCutoff.js";function R(R){const _=new T,{attributes:z,vertex:k,fragment:G,varyings:U}=_,{output:W,offsetBackfaces:H,instancedColor:q,pbrMode:J,snowCover:K,spherical:Q}=R,X=J===f.Normal||J===f.Schematic;if(M(k,R),z.add(I.POSITION,"vec3"),U.add("vpos","vec3",{invariant:!0}),_.include(j,R),_.include(l,R),_.include(c,R),_.include(L,R),o(W)&&(S(_.vertex,R),_.include(t,R),_.include(a,R),H&&_.include(r),q&&_.attributes.add(I.INSTANCECOLOR,"vec4"),U.add("vNormalWorld","vec3"),U.add("localvpos","vec3",{invariant:!0}),_.include(n,R),_.include(e,R),_.include(s,R),_.include(d,R),k.uniforms.add(new E("externalColor",(e=>e.externalColor))),U.add("vcolorExt","vec4"),k.main.add(F`
6
6
  forwardNormalizedVertexColor();
7
7
  vcolorExt = externalColor;
8
8
  ${N(q,"vcolorExt *= instanceColor * 0.003921568627451;")}
@@ -10,7 +10,7 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
10
10
  vcolorExt *= getSymbolColor();
11
11
  forwardColorMixMode();
12
12
 
13
- bool alphaCut = vcolorExt.a < ${$.float(R)};
13
+ bool alphaCut = vcolorExt.a < ${F.float(B)};
14
14
  vpos = getVertexInLocalOriginSpace();
15
15
  localvpos = vpos - view[3].xyz;
16
16
  vpos = subtractOrigin(vpos);
@@ -24,11 +24,11 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
24
24
 
25
25
  gl_Position = alphaCut ? vec4(1e38, 1e38, 1e38, 1.0) :
26
26
  ${N(H,"offsetBackfacingClipPosition(basePosition, vpos, vNormalWorld, cameraPosition);","basePosition;")}
27
- `)),i(W)){const{hasColorTexture:e,hasColorTextureTransform:r,receiveShadows:i}=_;z.include(b,_),z.include(v,_),z.include(P,_),z.include(_.instancedDoublePrecision?C:L,_),z.fragment.include(o,_),z.include(T,_),S(z.fragment,_),u(G),w(G),p(G),G.uniforms.add(k.uniforms.get("localOrigin"),k.uniforms.get("view"),new E("ambient",(e=>e.ambient)),new E("diffuse",(e=>e.diffuse)),new F("opacity",(e=>e.opacity)),new F("layerOpacity",(e=>e.layerOpacity))),e&&G.uniforms.add(new V("tex",(e=>e.texture))),z.include(y,_),z.include(f,_),G.include(M),h(G),G.main.add($`
27
+ `)),o(W)){const{hasColorTexture:e,hasColorTextureTransform:r,receiveShadows:o}=R;_.include(v,R),_.include(m,R),_.include(O,R),_.include(R.instancedDoublePrecision?y:C,R),_.fragment.include(i,R),_.include(V,R),S(_.fragment,R),p(G),b(G),w(G),G.uniforms.add(k.uniforms.get("localOrigin"),k.uniforms.get("view"),new A("ambient",(e=>e.ambient)),new A("diffuse",(e=>e.diffuse)),new D("opacity",(e=>e.opacity)),new D("layerOpacity",(e=>e.layerOpacity))),e&&G.uniforms.add(new $("tex",(e=>e.texture))),_.include(x,R),_.include(u,R),G.include(P),h(G),G.main.add(F`
28
28
  discardBySlice(vpos);
29
29
  discardByTerrainDepth();
30
30
  vec4 texColor = ${e?`texture(tex, ${r?"colorUV":"vuv0"})`:" vec4(1.0)"};
31
- ${N(e,`${N(_.textureAlphaPremultiplied,"texColor.rgb /= texColor.a;")}\n discardOrAdjustAlpha(texColor);`)}
31
+ ${N(e,`${N(R.textureAlphaPremultiplied,"texColor.rgb /= texColor.a;")}\n discardOrAdjustAlpha(texColor);`)}
32
32
  vec3 viewDirection = normalize(vpos - cameraPosition);
33
33
  applyPBRFactors();
34
34
  float ssao = evaluateAmbientOcclusionInverse();
@@ -36,13 +36,13 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
36
36
 
37
37
  float additionalAmbientScale = additionalDirectedAmbientLight(vpos + localOrigin);
38
38
  vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
39
- float shadow = ${i?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), readShadowMap(vpos, linearDepth))":Q?"lightingGlobalFactor * (1.0 - additionalAmbientScale)":"0.0"};
39
+ float shadow = ${o?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), readShadowMap(vpos, linearDepth))":Q?"lightingGlobalFactor * (1.0 - additionalAmbientScale)":"0.0"};
40
40
  vec3 matColor = max(ambient, diffuse);
41
- ${_.hasVertexColors?$`vec3 albedo = mixExternalColor(vColor.rgb * matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
42
- float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, int(colorMixMode));`:$`vec3 albedo = mixExternalColor(matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
41
+ ${R.hasVertexColors?F`vec3 albedo = mixExternalColor(vColor.rgb * matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
42
+ float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, int(colorMixMode));`:F`vec3 albedo = mixExternalColor(matColor, texColor.rgb, vcolorExt.rgb, int(colorMixMode));
43
43
  float opacity_ = layerOpacity * mixExternalOpacity(opacity, texColor.a, vcolorExt.a, int(colorMixMode));`}
44
44
  ${N(K,"albedo = mix(albedo, vec3(1), 0.9);")}
45
- ${$`vec3 shadingNormal = normalize(vNormalWorld);
45
+ ${F`vec3 shadingNormal = normalize(vNormalWorld);
46
46
  albedo *= 1.2;
47
47
  vec3 viewForward = vec3(view[0][2], view[1][2], view[2][2]);
48
48
  float alignmentLightView = clamp(dot(viewForward, -mainLightDirection), 0.0, 1.0);
@@ -51,9 +51,9 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
51
51
  float backLightFactor = 0.5 * treeRadialFalloff * alignmentLightView * transmittance * (1.0 - shadow);
52
52
  additionalLight += backLightFactor * mainLightIntensity;`}
53
53
  ${N(X,`vec3 normalGround = ${Q?"normalize(vpos + localOrigin)":"vec3(0.0, 0.0, 1.0)"};`)}
54
- ${X?$`float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
55
- ${N(K,$`mrr = vec3(0.0, 1.0, 0.04);`)}
54
+ ${X?F`float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
55
+ ${N(K,F`mrr = vec3(0.0, 1.0, 0.04);`)}
56
56
  vec4 emission = ${K?"vec4(0.0)":"getEmissions()"};
57
- vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);`:$`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
57
+ vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, normalGround, mrr, emission, additionalAmbientIrradiance);`:F`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
58
58
  vec4 finalColor = vec4(shadedColor, opacity_);
59
- outputColorHighlightOID(finalColor, vpos);`)}return z.include(m,_),z}const z=Object.freeze(Object.defineProperty({__proto__:null,build:_},Symbol.toStringTag,{value:"Module"}));export{z as R,_ as b};
59
+ outputColorHighlightOID(finalColor, vpos);`)}return _.include(g,R),_}const _=Object.freeze(Object.defineProperty({__proto__:null,build:R},Symbol.toStringTag,{value:"Module"}));export{_ as R,R as b};
@@ -2,18 +2,17 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{invert as e,translate as i}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as t}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{n as o,t as r}from"./vec32.js";import{create as a}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{NormalFromDepth as l}from"../views/3d/webgl-engine/core/shaderLibrary/NormalFromDepth.glsl.js";import{ScreenSpacePass as h}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadShadowMapPass as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{RgbaFloatEncoding as n}from"../views/3d/webgl-engine/core/shaderLibrary/util/RgbaFloatEncoding.glsl.js";import{Float3BindUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{Float4PassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as c}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as p}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as w}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Texture2DBindUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{Texture2DPassUniform as u}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{SnapshotSlot as f}from"../views/3d/webgl-engine/lib/ShadowMap.js";import{ReadShadowMapConfiguration as v}from"../views/3d/webgl-engine/shaders/ReadShadowMapConfiguration.js";import{ShaderBuilder as x}from"../views/webgl/ShaderBuilder.js";const b=.025;function M(){const t=new x;t.include(s,D),t.include(h),t.include(l);const a=t.fragment;return a.include(n),a.uniforms.add(new m("defaultDepthTex",(e=>e.shadowMap.getSnapshot(f.ExcludeHighlight))),new m("highlightDepthTex",(e=>e.shadowMap.getSnapshot(f.Highlight))),new m("depthMap",(e=>e.depth?.attachment)),new u("highlightTexture",(e=>e.highlight)),new g("uColor",(e=>e.shadowColor)),new c("opacity",(e=>e.shadowOpacity)),new c("occludedOpacity",(e=>e.occludedShadowOpacity)),new c("terminationFactor",(e=>e.opacityElevation*e.dayNightTerminator)),new d("lightingMainDirectionView",(({lighting:e,camera:i})=>o(y,r(y,e.mainLight.direction,i.viewInverseTransposeMatrix)))),new w("inverseViewMatrix",(({camera:t})=>e(S,i(S,t.viewMatrix,t.center))))).main.add(p`
5
+ import{invert as e,translate as i}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as t}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{n as o,t as r}from"./vec32.js";import{create as a}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{NormalFromDepth as l}from"../views/3d/webgl-engine/core/shaderLibrary/NormalFromDepth.glsl.js";import{ScreenSpacePass as h}from"../views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.glsl.js";import{ReadShadowMapPass as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{RgbaFloatEncoding as n}from"../views/3d/webgl-engine/core/shaderLibrary/util/RgbaFloatEncoding.glsl.js";import{Float3BindUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{Float4PassUniform as g}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as c}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as p}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as u}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Texture2DBindUniform as w}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{UintTexture2DPassUniform as m}from"../views/3d/webgl-engine/core/shaderModules/UintTexture2DPassUniform.js";import{SnapshotSlot as f}from"../views/3d/webgl-engine/lib/ShadowMap.js";import{ReadShadowMapConfiguration as v}from"../views/3d/webgl-engine/shaders/ReadShadowMapConfiguration.js";import{ShaderBuilder as x}from"../views/webgl/ShaderBuilder.js";const b=.025;function M(){const t=new x;t.include(s,D),t.include(h),t.include(l);const a=t.fragment;return a.include(n),a.uniforms.add(new w("defaultDepthTex",(e=>e.shadowMap.getSnapshot(f.ExcludeHighlight))),new w("highlightDepthTex",(e=>e.shadowMap.getSnapshot(f.Highlight))),new w("depthMap",(e=>e.depth?.attachment)),new m("highlightTexture",(e=>e.highlightTexture)),new g("uColor",(e=>e.shadowColor)),new c("opacity",(e=>e.shadowOpacity)),new c("occludedOpacity",(e=>e.occludedShadowOpacity)),new c("terminationFactor",(e=>e.opacityElevation*e.dayNightTerminator)),new d("lightingMainDirectionView",(({lighting:e,camera:i})=>o(y,r(y,e.mainLight.direction,i.viewInverseTransposeMatrix)))),new u("inverseViewMatrix",(({camera:t})=>e(S,i(S,t.viewMatrix,t.center))))).main.add(p`
6
6
  ivec2 highlightTextureSize = textureSize(highlightTexture, 0);
7
7
  ivec2 highlightIUV = ivec2(uv * vec2(highlightTextureSize));
8
- vec4 highlightInfo = texelFetch(highlightTexture, highlightIUV, 0);
8
+ uvec2 highlightInfo = texelFetch(highlightTexture, highlightIUV, 0).rg;
9
9
 
10
10
  fragColor = vec4(0.0);
11
11
 
12
12
  // Calculate bit mask to check if pixel is highlit unoccluded at any level
13
- int ored =
14
- (int(highlightInfo.r*255.0) << 0)
15
- | (int(highlightInfo.g*255.0) << 8);
16
- bool visiblyHighlighted = ((ored & ~(ored >> 1)) & (1+4+16+64)) != 0;
13
+ uint ored = (highlightInfo.r << 0) | (highlightInfo.g << 8);
14
+
15
+ bool visiblyHighlighted = ((ored & ~(ored >> 1)) & (1u+4u+16u+64u)) != 0u;
17
16
  if (visiblyHighlighted) {
18
17
  return;
19
18
  }
@@ -2,48 +2,48 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{translate as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as r}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{n as o,i as a}from"./vec32.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{OverlayContent as l}from"../views/3d/terrain/OverlayContent.js";import{TransparencyMode as t}from"../views/3d/terrain/TransparencyMode.js";import{addLinearDepth as n,addNearFar as s,ForwardLinearDepth as c}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{ShaderOutput as d}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as m}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as v}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{NormalAttribute as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{PositionAttribute as p}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/PositionAttribute.glsl.js";import{TextureCoordinateAttribute as f}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexTangent as w}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTangent.glsl.js";import{OutputDepth as h}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as u}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{EvaluateAmbientOcclusion as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as y,addAmbientBoostFactor as C,addLightingGlobalFactor as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightDirection as j,addMainLightIntensity as O}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{NormalUtils as S}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PBRMode as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapDraw as T}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{OverlayMode as z,OverlayTerrain as P}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{OverlayTerrainPassParameters as M,TerrainTexture as $}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js";import{addProjViewLocalOrigin as N,addViewNormal as D,addCameraPosition as W}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3BindUniform as A}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{glsl as V,If as F}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4DrawUniform as U}from"../views/3d/webgl-engine/core/shaderModules/Matrix4DrawUniform.js";import{Texture2DBindUniform as _}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{ShaderBuilder as B}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as H}from"../webscene/support/AlphaCutoff.js";class k extends M{}function E(r){const i=new B,{vertex:M,fragment:k,varyings:E}=i,{output:G,pbrMode:R,overlayMode:J,tileBorders:K,spherical:Q,transparencyMode:X,screenSizePerspective:Y}=r;i.include(p),i.include(g,r),i.include(f,r);const Z=()=>{i.include(S,r),M.code.add(V`vec3 getNormal() {
5
+ import{translate as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as r}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{n as o,i as a}from"./vec32.js";import{create as i}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{OverlayContent as l}from"../views/3d/terrain/OverlayContent.js";import{TransparencyMode as t}from"../views/3d/terrain/TransparencyMode.js";import{addLinearDepth as n,addNearFar as s,ForwardLinearDepth as c}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{ShaderOutput as d}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as m}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as v}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{NormalAttribute as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js";import{TextureCoordinateAttribute as p}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexTangent as f}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTangent.glsl.js";import{OutputDepth as w}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as u}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{EvaluateAmbientOcclusion as b}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js";import{EvaluateSceneLighting as h,addAmbientBoostFactor as C,addLightingGlobalFactor as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightDirection as x,addMainLightIntensity as O}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{NormalUtils as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PBRMode as S}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapDraw as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{OverlayMode as T,OverlayTerrain as z}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{OverlayTerrainPassParameters as P,TerrainTexture as M}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js";import{addProjViewLocalOrigin as $,addViewNormal as N,addCameraPosition as D}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float3BindUniform as W}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{glsl as V,If as A}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4DrawUniform as F}from"../views/3d/webgl-engine/core/shaderModules/Matrix4DrawUniform.js";import{Texture2DBindUniform as U}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{VertexAttribute as _}from"../views/3d/webgl-engine/lib/VertexAttribute.js";import{ShaderBuilder as B}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as I}from"../webscene/support/AlphaCutoff.js";class k extends P{}function H(r){const i=new B,{attributes:P,vertex:k,fragment:H,varyings:G}=i,{output:R,pbrMode:J,overlayMode:K,tileBorders:Q,spherical:X,transparencyMode:Y,screenSizePerspective:Z}=r;i.include(g,r),i.include(p,r);const ee=()=>{i.include(j,r),k.code.add(V`vec3 getNormal() {
6
6
  float z = 1.0 - abs(normalCompressed.x) - abs(normalCompressed.y);
7
7
  vec3 n = vec3(normalCompressed + vec2(normalCompressed.x >= 0.0 ? 1.0 : -1.0,
8
8
  normalCompressed.y >= 0.0 ? 1.0 : -1.0) * min(z, 0.0), z);
9
9
  return normalize(n);
10
- }`)};N(M,r),i.include(v,r);const ee=X===t.InvisibleWithDraped||X===t.Invisible,re=J!==z.Disabled,oe=re&&ee;switch(G){case d.ColorEmission:case d.Color:{i.include($,r),i.include(y,r),re&&(r.pbrMode=R===L.Simplified?L.TerrainWithWater:L.Water,i.include(P,r),r.pbrMode=R);const t=J===z.EnabledWithWater;t&&i.include(w,r),E.add("vnormal","vec3"),E.add("vpos","vec3",{invariant:!0}),E.add("vup","vec3"),Z(),Y&&D(M);const n=r.receiveShadows&&!r.renderOccluded;n&&i.include(c,r),Y&&(E.add("screenSizeDistanceToCamera","float"),E.add("screenSizeCosAngle","float")),M.main.add(V`
10
+ }`)};$(k,r),P.add(_.POSITION,"vec3"),i.include(v,r);const re=Y===t.InvisibleWithDraped||Y===t.Invisible,oe=K!==T.Disabled,ae=oe&&re;switch(R){case d.ColorEmission:case d.Color:{i.include(M,r),i.include(h,r),oe&&(r.pbrMode=J===S.Simplified?S.TerrainWithWater:S.Water,i.include(z,r),r.pbrMode=J);const t=K===T.EnabledWithWater;t&&i.include(f,r),G.add("vnormal","vec3"),G.add("vpos","vec3",{invariant:!0}),G.add("vup","vec3"),ee(),Z&&N(k);const n=r.receiveShadows&&!r.renderOccluded;n&&i.include(c,r),Z&&(G.add("screenSizeDistanceToCamera","float"),G.add("screenSizeCosAngle","float")),k.main.add(V`
11
11
  vpos = position;
12
12
  vec3 positionWorld = position + localOrigin;
13
13
  gl_Position = transformPosition(proj, view, vpos);
14
14
  vnormal = getNormal();
15
15
  vup = getLocalUp(position, localOrigin);
16
- ${F(t,V`forwardVertexTangent(vnormal);`)}
16
+ ${A(t,V`forwardVertexTangent(vnormal);`)}
17
17
 
18
18
  vec2 uv = getUV0();
19
19
  forwardTextureCoordinatesWithTransform(uv);
20
- ${F(re,"setOverlayVTC(uv);")}
21
- ${F(K,"forwardTextureCoordinates();")}
22
- ${F(Y,V`vec3 viewPos = (view * vec4(vpos, 1.0)).xyz;
20
+ ${A(oe,"setOverlayVTC(uv);")}
21
+ ${A(Q,"forwardTextureCoordinates();")}
22
+ ${A(Z,V`vec3 viewPos = (view * vec4(vpos, 1.0)).xyz;
23
23
  screenSizeDistanceToCamera = length(viewPos);
24
24
  vec3 viewSpaceNormal = (viewNormal * vec4(normalize(positionWorld), 1.0)).xyz;
25
25
  screenSizeCosAngle = abs(viewSpaceNormal.z);`)}
26
- ${F(n,"forwardLinearDepth();")}`),i.fragment.include(m,r),i.include(y,r),i.include(b,r),i.include(T,r),W(k,r),C(k),x(k),k.uniforms.add(M.uniforms.get("localOrigin"),new A("viewDirection",(({camera:e})=>o(q,a(q,e.viewMatrix[12],e.viewMatrix[13],e.viewMatrix[14]))))),t&&k.uniforms.add(new _("ovWaterTex",(e=>e.overlay?.getTexture(l.WaterNormal))),new U("view",(({origin:r},{camera:o})=>e(I,o.viewMatrix,r))));const s=.2;k.code.add(V`float lum(vec3 c) {
26
+ ${A(n,"forwardLinearDepth();")}`),i.fragment.include(m,r),i.include(h,r),i.include(b,r),i.include(L,r),D(H,r),C(H),y(H),H.uniforms.add(k.uniforms.get("localOrigin"),new W("viewDirection",(({camera:e})=>o(q,a(q,e.viewMatrix[12],e.viewMatrix[13],e.viewMatrix[14]))))),t&&H.uniforms.add(new U("ovWaterTex",(e=>e.overlay?.getTexture(l.WaterNormal))),new F("view",(({origin:r},{camera:o})=>e(E,o.viewMatrix,r))));const s=.2;H.code.add(V`float lum(vec3 c) {
27
27
  return (min(min(c.r, c.g), c.b) + max(max(c.r, c.g), c.b)) * 0.5;
28
- }`),j(k),O(k),k.main.add(V`
28
+ }`),x(H),O(H),H.main.add(V`
29
29
  vec3 normal = normalize(vnormal);
30
30
  float vndl = dot(normal, mainLightDirection);
31
31
 
32
32
  float additionalAmbientScale = smoothstep(0.0, 1.0, clamp(vndl*2.5, 0.0, 1.0));
33
- float shadow = ${n?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), readShadowMap(vpos, linearDepth))":Q?"lightingGlobalFactor * (1.0 - additionalAmbientScale)":"0.0"};
33
+ float shadow = ${n?"max(lightingGlobalFactor * (1.0 - additionalAmbientScale), readShadowMap(vpos, linearDepth))":X?"lightingGlobalFactor * (1.0 - additionalAmbientScale)":"0.0"};
34
34
 
35
35
  float ssao = evaluateAmbientOcclusionInverse();
36
36
  vec4 tileColor = getTileColor();
37
37
 
38
- ${F(re,V`vec4 overlayColorOpaque = getOverlayColor(ovColorTex, vtcOverlay);
38
+ ${A(oe,V`vec4 overlayColorOpaque = getOverlayColor(ovColorTex, vtcOverlay);
39
39
  vec4 overlayColor = overlayOpacity * overlayColorOpaque;
40
- ${F(ee,`if (overlayColor.a < ${V.float(H)}) { discard; }`)}
40
+ ${A(re,`if (overlayColor.a < ${V.float(I)}) { discard; }`)}
41
41
  vec4 groundColor = tileColor;
42
42
  tileColor = tileColor * (1.0 - overlayColor.a) + overlayColor;`)}
43
43
 
44
44
  // If combined alpha is 0 we can discard pixel. The performance impact by having a discard here
45
45
  // is neglectable because terrain typically renders first into the framebuffer.
46
- if(tileColor.a < ${V.float(H)}) {
46
+ if(tileColor.a < ${V.float(I)}) {
47
47
  discard;
48
48
  }
49
49
 
@@ -58,8 +58,8 @@ return (min(min(c.r, c.g), c.b) + max(max(c.r, c.g), c.b)) * 0.5;
58
58
 
59
59
  vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
60
60
 
61
- ${R===L.Simplified||R===L.TerrainWithWater?V`fragColor = vec4(evaluatePBRSimplifiedLighting(normal, albedo, shadow, 1.0 - ssao, additionalLight, normalize(vpos - cameraPosition), vup), tileColor.a);`:V`fragColor = vec4(evaluateSceneLighting(normal, albedo, shadow, 1.0 - ssao, additionalLight), tileColor.a);`}
62
- ${F(t,V`vec4 overlayWaterMask = getOverlayColor(ovWaterTex, vtcOverlay);
61
+ ${J===S.Simplified||J===S.TerrainWithWater?V`fragColor = vec4(evaluatePBRSimplifiedLighting(normal, albedo, shadow, 1.0 - ssao, additionalLight, normalize(vpos - cameraPosition), vup), tileColor.a);`:V`fragColor = vec4(evaluateSceneLighting(normal, albedo, shadow, 1.0 - ssao, additionalLight), tileColor.a);`}
62
+ ${A(t,V`vec4 overlayWaterMask = getOverlayColor(ovWaterTex, vtcOverlay);
63
63
  float waterNormalLength = length(overlayWaterMask);
64
64
  if (waterNormalLength > 0.95) {
65
65
  mat3 tbnMatrix = mat3(tbnTangent, tbnBiTangent, vnormal);
@@ -71,7 +71,7 @@ return (min(min(c.r, c.g), c.b) + max(max(c.r, c.g), c.b)) * 0.5;
71
71
  // un-gamma the ground color to mix in linear space
72
72
  fragColor = mix(groundColor, waterColorNonLinear, waterColorLinear.w) * opacity;
73
73
  }`)}
74
- ${F(Y,V`float perspectiveScale = screenSizePerspectiveScaleFloat(1.0, screenSizeCosAngle, screenSizeDistanceToCamera, vec4(0.0));
74
+ ${A(Z,V`float perspectiveScale = screenSizePerspectiveScaleFloat(1.0, screenSizeCosAngle, screenSizeDistanceToCamera, vec4(0.0));
75
75
  if (perspectiveScale <= 0.25) {
76
76
  fragColor = mix(fragColor, vec4(1.0, 0.0, 0.0, 1.0), perspectiveScale * 4.0);
77
77
  } else if (perspectiveScale <= 0.5) {
@@ -81,7 +81,7 @@ return (min(min(c.r, c.g), c.b) + max(max(c.r, c.g), c.b)) * 0.5;
81
81
  } else {
82
82
  fragColor = mix(fragColor, vec4(1.0, 0.0, 1.0, 1.0), (perspectiveScale - 0.5) * 2.0);
83
83
  }`)}
84
- ${F(r.visualizeNormals,Q?V`
84
+ ${A(r.visualizeNormals,X?V`
85
85
  vec3 localUp = normalize(vpos + localOrigin);
86
86
  vec3 right = normalize(cross(vec3(0.0, 0.0, 1.0), localUp));
87
87
  vec3 forward = normalize(cross(localUp, right));
@@ -90,26 +90,25 @@ return (min(min(c.r, c.g), c.b) + max(max(c.r, c.g), c.b)) * 0.5;
90
90
  fragColor = vec4(vec3(0.5) + 0.5 * tNormal, 0.0);`:V`
91
91
  vec3 tNormal = normalize(normal);
92
92
  fragColor = vec4(vec3(0.5) + 0.5 * tNormal, 0.0);`)}
93
- ${F(K,V`vec2 dVuv = fwidth(vuv0);
93
+ ${A(Q,V`vec2 dVuv = fwidth(vuv0);
94
94
  vec2 edgeFactors = smoothstep(vec2(0.0), 1.5 * dVuv, min(vuv0, 1.0 - vuv0));
95
95
  float edgeFactor = 1.0 - min(edgeFactors.x, edgeFactors.y);
96
96
  fragColor = mix(fragColor, vec4(1.0, 0.0, 0.0, 1.0), edgeFactor);`)}
97
- fragColor = applySlice(fragColor, vpos);`)}break;case d.Depth:oe&&i.include(P,r),M.main.add(V`
98
- ${F(oe,"setOverlayVTC(getUV0());")}
99
- gl_Position = transformPosition(proj, view, position);`),k.main.add(`${F(oe,`if (getCombinedOverlayColor().a < ${V.float(H)}) discard;`)}`);break;case d.Shadow:case d.ShadowHighlight:case d.ShadowExcludeHighlight:case d.ViewshedShadow:i.include(h,r),n(i),s(i),M.main.add(V`gl_Position = transformPositionWithDepth(proj, view, position, nearFar, linearDepth);`),k.main.add(V`outputDepth(linearDepth);`);break;case d.Normal:oe&&i.include(P,r),E.add("vnormal","vec3"),D(M),Z(),M.main.add(V`
100
- ${F(oe,"setOverlayVTC(getUV0());")}
97
+ fragColor = applySlice(fragColor, vpos);`)}break;case d.Depth:ae&&i.include(z,r),k.main.add(V`
98
+ ${A(ae,"setOverlayVTC(getUV0());")}
99
+ gl_Position = transformPosition(proj, view, position);`),H.main.add(`${A(ae,`if (getCombinedOverlayColor().a < ${V.float(I)}) discard;`)}`);break;case d.Shadow:case d.ShadowHighlight:case d.ShadowExcludeHighlight:case d.ViewshedShadow:i.include(w,r),n(i),s(i),k.main.add(V`gl_Position = transformPositionWithDepth(proj, view, position, nearFar, linearDepth);`),H.main.add(V`outputDepth(linearDepth);`);break;case d.Normal:ae&&i.include(z,r),G.add("vnormal","vec3"),N(k),ee(),k.main.add(V`
100
+ ${A(ae,"setOverlayVTC(getUV0());")}
101
101
  gl_Position = transformPosition(proj, view, position);
102
- vnormal = normalize((viewNormal * vec4(getNormal(), 1.0)).xyz);`),k.main.add(V`
103
- ${F(oe,`if (getCombinedOverlayColor().a < ${V.float(H)}) discard;`)}
102
+ vnormal = normalize((viewNormal * vec4(getNormal(), 1.0)).xyz);`),H.main.add(V`
103
+ ${A(ae,`if (getCombinedOverlayColor().a < ${V.float(I)}) discard;`)}
104
104
  vec3 normal = normalize(vnormal);
105
105
  if (gl_FrontFacing == false) {
106
106
  normal = -normal;
107
107
  }
108
- fragColor = vec4(vec3(0.5) + 0.5 * normal, 1.0);`);break;case d.Highlight:re&&i.include(P,r),M.main.add(V`
109
- ${F(re,"setOverlayVTC(getUV0());")}
110
- gl_Position = transformPosition(proj, view, position);`),i.include(u,r),k.main.add(V`
111
- ${F(re,V`
112
- vec2 overlayHighlightTexel = getAllOverlayHighlightValuesEncoded();
113
- calculateOcclusionAndOutputHighlightOverlay(overlayHighlightTexel);`,"calculateOcclusionAndOutputHighlight();")}
114
- `)}if(G===d.ObjectAndLayerIdColor)if(re)r.pbrMode=L.Disabled,i.include(P,r),r.pbrMode=R,M.main.add(V`gl_Position = transformPosition(proj, view, position);
115
- setOverlayVTC(getUV0());`),k.main.add(V`fragColor = getOverlayColorTexel();`);else{const e=X===t.Opaque;M.main.add(V`${F(e,"gl_Position = transformPosition(proj, view, position);")}`),k.main.add(V`fragColor = vec4(0.0);`)}return i}const I=r(),q=i(),G=Object.freeze(Object.defineProperty({__proto__:null,TerrainPassParameters:k,build:E},Symbol.toStringTag,{value:"Module"}));export{k as T,G as a,E as b};
108
+ fragColor = vec4(vec3(0.5) + 0.5 * normal, 1.0);`);break;case d.Highlight:oe&&i.include(z,r),k.main.add(V`
109
+ ${A(oe,"setOverlayVTC(getUV0());")}
110
+ gl_Position = transformPosition(proj, view, position);`),i.include(u,r),H.main.add(V`
111
+ ${A(oe,V`
112
+ calculateOcclusionAndOutputHighlightOverlay(getAllOverlayHighlightValuesEncoded());`,"calculateOcclusionAndOutputHighlight();")}
113
+ `)}if(R===d.ObjectAndLayerIdColor)if(oe)r.pbrMode=S.Disabled,i.include(z,r),r.pbrMode=J,k.main.add(V`gl_Position = transformPosition(proj, view, position);
114
+ setOverlayVTC(getUV0());`),H.main.add(V`fragColor = getOverlayColorTexel();`);else{const e=Y===t.Opaque;k.main.add(V`${A(e,"gl_Position = transformPosition(proj, view, position);")}`),H.main.add(V`fragColor = vec4(0.0);`)}return i}const E=r(),q=i(),G=Object.freeze(Object.defineProperty({__proto__:null,TerrainPassParameters:k,build:H},Symbol.toStringTag,{value:"Module"}));export{k as T,G as a,H as b};
package/core/LRUCache.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{MemCacheStorage as t}from"./MemCache.js";class e{constructor(e,s){this._storage=new t,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),s&&this._storage.registerRemoveFunc("",s)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,s=1){this._storage.put(this,t,e,s,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}export{e as LRUCache};
5
+ import{MemCacheStorage as t}from"./MemCache.js";class e{constructor(e,s){this.removeFunc=s,this._storage=new t,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,s=1){this._storage.put(this,t,e,s,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}export{e as LRUCache};
package/core/MemCache.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import t from"./PooledArray.js";const e=-3,i=e-1;var s;!function(t){t[t.ALL=0]="ALL",t[t.SOME=1]="SOME"}(s||(s={}));class h{constructor(t,e,i,s=0){this.name=t,this._storage=e,this._defaultPriority=s,this.id=o+++":",this.size=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),i&&(this._storage.registerRemoveFunc(this.id,i),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get storageSize(){return this._storage.size}getSize(t){return this._storage.getSize(this,t)}set maxSize(t){this._storage.setMaxSize(this,t)}resetHitRate(){this._hit=this._miss=0}put(t,e,i=this._defaultPriority){this._storage.put(this,t,e,e.cachedMemory,i)}pop(t){const e=this._storage.pop(this,t);return void 0===e?++this._miss:++this._hit,e}get(t){const e=this._storage.get(this,t);return void 0===e?++this._miss:++this._hit,e}peek(t){return this._storage.peek(this,t)}updateSize(t,e){this._storage.updateSize(this,t,e,e.cachedMemory)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class r{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new t,this._users=new t,this._sizeLimits=new Map}destroy(){this.clearAll(),this._removeFuncs.clear(),this._sizeLimits.clear(),this._users.clear()}register(t){this._users.push(t)}deregister(t){this._sizeLimits.delete(t),this._users.removeUnordered(t)}registerRemoveFunc(t,e){this._removeFuncs.push([t,e])}deregisterRemoveFunc(t){this._removeFuncs.filterInPlace((e=>e[0]!==t))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,-1),this._checkSize()}getSize(t,e){const i=this._db.get(t.id+e);return i?.size??0}put(t,h,r,o,n){h=t.id+h;const a=this._db.get(h);if(a&&(this._size-=a.size,t.size-=a.size,this._db.delete(h),a.entry!==r&&this._notifyRemove(h,a.entry,a.size,s.ALL)),o>this._maxSize)return void this._notifyRemove(h,r,o,s.ALL);if(void 0===r)return void console.warn("Refusing to cache undefined entry ");if(!o||o<0)return console.warn(`Refusing to cache entry with size ${o} for key ${h}`),void this._notifyRemove(h,r,0,s.ALL);const c=1+Math.max(n,i)-e;this._db.set(h,new _(r,o,c)),this._size+=o,t.size+=o,this._checkSize()}updateSize(t,e,i,h){e=t.id+e;const r=this._db.get(e);if(r&&r.entry===i){for(this._size-=r.size,t.size-=r.size;h>this._maxSize;){const t=this._notifyRemove(e,i,h,s.SOME);if(!(null!=t&&t>0))return void this._db.delete(e);h=t}r.size=h,this._size+=h,t.size+=h,this._checkSize()}}pop(t,e){e=t.id+e;const i=this._db.get(e);if(i)return this._size-=i.size,t.size-=i.size,this._db.delete(e),++this._hit,i.entry;++this._miss}get(t,e){e=t.id+e;const i=this._db.get(e);if(void 0!==i)return this._db.delete(e),i.lives=i.lifetime,this._db.set(e,i),++this._hit,i.entry;++this._miss}peek(t,e){const i=this._db.get(t.id+e);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},i={},s=new Array;this._db.forEach(((t,e)=>{const h=t.lifetime;s[h]=(s[h]||0)+t.size,this._users.forAll((s=>{const{id:h,name:r}=s;if(e.startsWith(h)){const e=i[r]||0;i[r]=e+t.size}}))}));const h={};this._users.forAll((t=>{const e=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const s=i[e]||0;i[e]=s,h[e]=Math.round(100*t.hitRate)+"%"}else h[e]="0%"}));const r=Object.keys(i);r.sort(((t,e)=>i[e]-i[t])),r.forEach((e=>t[e]=Math.round(i[e]/2**20)+"MB / "+h[e]));for(let o=s.length-1;o>=0;--o){const i=s[o];i&&(t["Priority "+(o+e-1)]=Math.round(i/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forAll((t=>t.resetHitRate()))}clear(t){const e=t.id;this._db.forEach(((t,i)=>{i.startsWith(e)&&(this._size-=t.size,this._db.delete(i),this._notifyRemove(i,t.entry,t.size,s.ALL))})),t.size=0}clearAll(){this._db.forEach(((t,e)=>this._notifyRemove(e,t.entry,t.size,s.ALL))),this._users.forAll((t=>t.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,i,s){let h;return this._removeFuncs.some((r=>{if(t.startsWith(r[0])){const t=r[1](e,s,i);return"number"==typeof t&&(h=t),!0}return!1})),h}_checkSize(){this._sizeLimits.forEach(((t,e)=>this._checkSizeLimits(t,e))),this._checkSizeLimits(this.maxSize)}setMaxSize(t,e){null==e||e<=0?this._sizeLimits.delete(t):this._sizeLimits.set(t,e)}_checkSizeLimits(t,e){const i=e??this;if(i.size<=t)return;const s=e?.id;let h=!0;for(;h;){h=!1;for(const[r,o]of this._db)if(0===o.lifetime&&(!s||r.startsWith(s))){if(this._purgeItem(r,o,e),i.size<=.9*t)return;h||=this._db.has(r)}}for(const[r,o]of this._db)if((!s||r.startsWith(s))&&(this._purgeItem(r,o,e),i.size<=.9*t))return}_purgeItem(t,e,i=this._users.find((e=>t.startsWith(e.id)))){if(this._db.delete(t),e.lives<=1){this._size-=e.size,i&&(i.size-=e.size);const h=this._notifyRemove(t,e.entry,e.size,s.SOME);null!=h&&h>0&&(this._size+=h,i&&(i.size+=h),e.lives=e.lifetime,e.size=h,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}let o=0;class _{constructor(t,e,i){this.entry=t,this.size=e,this.lifetime=i,this.lives=i}}export{h as MemCache,r as MemCacheStorage,e as MinPriority,i as NoPriority,s as RemoveMode};
5
+ const t=-3,i=t-1;var s;!function(t){t[t.ALL=0]="ALL",t[t.SOME=1]="SOME"}(s||(s={}));class e{constructor(t,i,s,e=0){this.name=t,this._storage=i,this.removeFunc=s,this._defaultPriority=e,this.id=`${r++}${_}`,this.size=0,this._hit=0,this._miss=0,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get storageSize(){return this._storage.size}getSize(t){return this._storage.getSize(this,t)}set maxSize(t){this._storage.setMaxSize(this,t)}resetHitRate(){this._hit=this._miss=0}put(t,i,s=this._defaultPriority){this._storage.put(this,t,i,i.cachedMemory,s)}pop(t){const i=this._storage.pop(this,t);return void 0===i?++this._miss:++this._hit,i}get(t){const i=this._storage.get(this,t);return void 0===i?++this._miss:++this._hit,i}peek(t){return this._storage.peek(this,t)}updateSize(t,i){this._storage.updateSize(this,t,i,i.cachedMemory)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class h{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear()}register(t){this._users.set(t.id.slice(0,-1),t)}deregister(t){this.clear(t),this._sizeLimits.delete(t),this._users.delete(t.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,-1),this._checkSize()}getSize(t,i){const s=this._db.get(t.id+i);return s?.size??0}put(e,h,r,_,n){h=e.id+h;const a=this._db.get(h);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(h),a.entry!==r&&this._notifyRemove(h,a.entry,a.size,s.ALL)),_>this._maxSize)return void this._notifyRemove(h,r,_,s.ALL);if(void 0===r)return void console.warn("Refusing to cache undefined entry ");if(!_||_<0)return console.warn(`Refusing to cache entry with size ${_} for key ${h}`),void this._notifyRemove(h,r,0,s.ALL);const c=1+Math.max(n,i)-t;this._db.set(h,new o(r,_,c)),this._size+=_,e.size+=_,this._checkSize()}updateSize(t,i,e,h){i=t.id+i;const r=this._db.get(i);if(r&&r.entry===e){for(this._size-=r.size,t.size-=r.size;h>this._maxSize;){const t=this._notifyRemove(i,e,h,s.SOME);if(!(null!=t&&t>0))return void this._db.delete(i);h=t}r.size=h,this._size+=h,t.size+=h,this._checkSize()}}pop(t,i){i=t.id+i;const s=this._db.get(i);if(s)return this._size-=s.size,t.size-=s.size,this._db.delete(i),++this._hit,s.entry;++this._miss}get(t,i){i=t.id+i;const s=this._db.get(i);if(void 0!==s)return this._db.delete(i),s.lives=s.lifetime,this._db.set(i,s),++this._hit,s.entry;++this._miss}peek(t,i){const s=this._db.get(t.id+i);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const i={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},s={},e=new Array;this._db.forEach(((t,i)=>{const h=t.lifetime;e[h]=(e[h]||0)+t.size,this._users.forEach((e=>{const{id:h,name:r}=e;if(i.startsWith(h)){const i=s[r]||0;s[r]=i+t.size}}))}));const h={};this._users.forEach((t=>{const i=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const e=s[i]||0;s[i]=e,h[i]=Math.round(100*t.hitRate)+"%"}else h[i]="0%"}));const r=Object.keys(s);r.sort(((t,i)=>s[i]-s[t])),r.forEach((t=>i[t]=Math.round(s[t]/2**20)+"MB / "+h[t]));for(let o=e.length-1;o>=0;--o){const s=e[o];s&&(i["Priority "+(o+t-1)]=Math.round(s/this._size*100)+"%")}return i}resetStats(){this._hit=this._miss=0,this._users.forEach((t=>t.resetHitRate()))}clear(t){const i=t.id;this._db.forEach(((t,e)=>{e.startsWith(i)&&(this._size-=t.size,this._db.delete(e),this._notifyRemove(e,t.entry,t.size,s.ALL))})),t.size=0}clearAll(){this._db.forEach(((t,i)=>this._notifyRemove(i,t.entry,t.size,s.ALL))),this._users.forEach((t=>t.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,i,s,e){const h=this._users.get(t.split(_)[0])?.removeFunc,r=h?.(i,e,s);return"number"==typeof r?r:null}_checkSize(){this._sizeLimits.forEach(((t,i)=>this._checkSizeLimits(t,i))),this._checkSizeLimits(this.maxSize)}setMaxSize(t,i){null==i||i<=0?this._sizeLimits.delete(t):this._sizeLimits.set(t,i)}_checkSizeLimits(t,i){const s=i??this;if(s.size<=t)return;const e=i?.id;let h=!0;for(;h;){h=!1;for(const[r,o]of this._db)if(0===o.lifetime&&(!e||r.startsWith(e))){const e=i??this._users.get(r.split(_)[0]);if(this._purgeItem(r,o,e),s.size<=.9*t)return;h||=this._db.has(r)}}for(const[r,o]of this._db)if(!e||r.startsWith(e)){const e=i??this._users.get(r.split(_)[0]);if(this._purgeItem(r,o,e),s.size<=.9*t)return}}_purgeItem(t,i,e){if(this._db.delete(t),i.lives<=1){this._size-=i.size,e&&(e.size-=i.size);const h=this._notifyRemove(t,i.entry,i.size,s.SOME);null!=h&&h>0&&(this._size+=h,e&&(e.size+=h),i.lives=i.lifetime,i.size=h,this._db.set(t,i))}else--i.lives,this._db.set(t,i)}}let r=0;class o{constructor(t,i,s){this.entry=t,this.size=i,this.lifetime=s,this.lives=s}}const _=":";export{e as MemCache,h as MemCacheStorage,t as MinPriority,i as NoPriority,s as RemoveMode};
package/core/has.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- let e;function has(a){return"function"==typeof e[a]?e[a]=e[a](globalThis):e[a]}e=globalThis.dojoConfig?.has||globalThis.esriConfig?.has?{...globalThis.dojoConfig?.has,...globalThis.esriConfig?.has}:{},has.add=(a,d,i,s)=>{(s||void 0===e[a])&&(e[a]=d),i&&has(a)},has.cache=e,has.add("big-integer-warning-enabled",!0),has.add("esri-deprecation-warnings",!0),has.add("esri-tests-disable-screenshots",!1),has.add("esri-tests-use-full-window",!1),has.add("esri-tests-post-to-influx",!0),has.add("esri-cim-animations-enable-status","enabled"),has.add("esri-cim-animations-spotlight",!1),has.add("esri-cim-animations-freeze-time",!1),has.add("enable-feature:multiple-highlights",!0),(()=>{has.add("host-webworker",void 0!==globalThis.WorkerGlobalScope&&self instanceof globalThis.WorkerGlobalScope);const e="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(has.add("host-browser",e),has.add("host-node","object"==typeof globalThis.process&&globalThis.process.versions?.node&&globalThis.process.versions.v8),has.add("dom",e),has("host-browser")){const e=navigator,a=e.userAgent,d=e.appVersion,i=parseFloat(d);if(has.add("wp",parseFloat(a.split("Windows Phone")[1])||void 0),has.add("msapp",parseFloat(a.split("MSAppHost/")[1])||void 0),has.add("khtml",d.includes("Konqueror")?i:void 0),has.add("edge",parseFloat(a.split("Edge/")[1])||void 0),has.add("opr",parseFloat(a.split("OPR/")[1])||void 0),has.add("webkit",!has("wp")&&!has("edge")&&parseFloat(a.split("WebKit/")[1])||void 0),has.add("chrome",!has("edge")&&!has("opr")&&parseFloat(a.split("Chrome/")[1])||void 0),has.add("android",!has("wp")&&parseFloat(a.split("Android ")[1])||void 0),has.add("safari",!d.includes("Safari")||has("wp")||has("chrome")||has("android")||has("edge")||has("opr")?void 0:parseFloat(d.split("Version/")[1])),has.add("mac",d.includes("Macintosh")),!has("wp")&&/(iPhone|iPod|iPad)/.test(a)){const e=RegExp.$1.replace(/P/,"p"),d=/OS ([\d_]+)/.test(a)?RegExp.$1:"1",i=parseFloat(d.replace(/_/,".").replaceAll("_",""));has.add(e,i),has.add("ios",i)}has("webkit")||(!a.includes("Gecko")||has("wp")||has("khtml")||has("edge")||has.add("mozilla",i),has("mozilla")&&has.add("ff",parseFloat(a.split("Firefox/")[1]||a.split("Minefield/")[1])||void 0))}})(),(()=>{if(globalThis.navigator){const e=navigator.userAgent,a=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),d=/iPhone/i.test(e);a&&has.add("esri-mobile",a),d&&has.add("esri-iPhone",d),has.add("esri-geolocation",!!navigator.geolocation)}has.add("esri-wasm","WebAssembly"in globalThis),has.add("esri-performance-mode-frames-between-render",20),has.add("esri-force-performance-mode",!1),has.add("esri-shared-array-buffer",(()=>{const e="SharedArrayBuffer"in globalThis,a=!1===globalThis.crossOriginIsolated;return e&&!a})),has.add("wasm-simd",(()=>{const e=[0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11];return WebAssembly.validate(new Uint8Array(e))})),has.add("esri-atomics","Atomics"in globalThis),has.add("esri-workers","Worker"in globalThis),has.add("web-feat:cache","caches"in globalThis),has.add("esri-workers-arraybuffer-transfer",!has("safari")||Number(has("safari"))>=12),has.add("workers-pool-size",8),has.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),has.add("featurelayer-simplify-payload-size-factors",[1,1,4]),has.add("featurelayer-fast-triangulation-enabled",!0),has.add("featurelayer-animation-enabled",!0),has.add("featurelayer-snapshot-enabled",!0),has.add("featurelayer-snapshot-point-min-threshold",8e4),has.add("featurelayer-snapshot-point-max-threshold",4e5),has.add("featurelayer-snapshot-point-coverage",.1),has.add("featurelayer-query-max-depth",4),has.add("featurelayer-query-pausing-enabled",!1),has.add("featurelayer-advanced-symbols",!1),has.add("featurelayer-pbf",!0),has.add("featurelayer-pbf-statistics",!1),has.add("feature-layers-workers",!0),has.add("feature-polyline-generalization-factor",1),has.add("mapview-transitions-duration",200),has.add("mapview-essential-goto-duration",200),has.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),has.add("mapserver-pbf-version-support",10.81),has.add("mapservice-popup-identify-max-tolerance",20),has.add("request-queue-concurrency-hosted",16),has.add("request-queue-concurrency-non-hosted",4),has.add("curve-densification-coarse-segments",128),has.add("curve-densification-max-segments",2e3),has.add("curve-densification-min-segments",3),has.add("curve-densification-pixels-per-segment",16),has.add("view-readyState-waiting-delay",1e3),has.add("gradient-depth-bias",.01),has.add("gradient-depth-epsilon",1e-8),has("host-webworker")||has("host-browser")&&(has.add("esri-csp-restrictions",(()=>{try{new Function}catch{return!0}return!1})),has.add("esri-image-decode",(()=>{if("decode"in new Image){const e=new Image;return e.src='data:image/svg+xml;charset=UTF-8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>',void e.decode().then((()=>{has.add("esri-image-decode",!0,!0,!0)})).catch((()=>{has.add("esri-image-decode",!1,!0,!0)}))}return!1})),has.add("esri-url-encodes-apostrophe",(()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")})))})();export{has as default};
5
+ let e;function has(a){return"function"==typeof e[a]?e[a]=e[a](globalThis):e[a]}e=globalThis.dojoConfig?.has||globalThis.esriConfig?.has?{...globalThis.dojoConfig?.has,...globalThis.esriConfig?.has}:{},has.add=(a,d,i,o)=>{(o||void 0===e[a])&&(e[a]=d),i&&has(a)},has.cache=e,has.add("big-integer-warning-enabled",!0),has.add("esri-deprecation-warnings",!0),has.add("esri-tests-disable-screenshots",!1),has.add("esri-tests-use-full-window",!1),has.add("esri-tests-post-to-influx",!0),has.add("esri-cim-animations-enable-status","enabled"),has.add("esri-cim-animations-spotlight",!1),has.add("esri-cim-animations-freeze-time",!1),(()=>{has.add("host-webworker",void 0!==globalThis.WorkerGlobalScope&&self instanceof globalThis.WorkerGlobalScope);const e="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(has.add("host-browser",e),has.add("host-node","object"==typeof globalThis.process&&globalThis.process.versions?.node&&globalThis.process.versions.v8),has.add("dom",e),has("host-browser")){const e=navigator,a=e.userAgent,d=e.appVersion,i=parseFloat(d);if(has.add("wp",parseFloat(a.split("Windows Phone")[1])||void 0),has.add("msapp",parseFloat(a.split("MSAppHost/")[1])||void 0),has.add("khtml",d.includes("Konqueror")?i:void 0),has.add("edge",parseFloat(a.split("Edge/")[1])||void 0),has.add("opr",parseFloat(a.split("OPR/")[1])||void 0),has.add("webkit",!has("wp")&&!has("edge")&&parseFloat(a.split("WebKit/")[1])||void 0),has.add("chrome",!has("edge")&&!has("opr")&&parseFloat(a.split("Chrome/")[1])||void 0),has.add("android",!has("wp")&&parseFloat(a.split("Android ")[1])||void 0),has.add("safari",!d.includes("Safari")||has("wp")||has("chrome")||has("android")||has("edge")||has("opr")?void 0:parseFloat(d.split("Version/")[1])),has.add("mac",d.includes("Macintosh")),!has("wp")&&/(iPhone|iPod|iPad)/.test(a)){const e=RegExp.$1.replace(/P/,"p"),d=/OS ([\d_]+)/.test(a)?RegExp.$1:"1",i=parseFloat(d.replace(/_/,".").replaceAll("_",""));has.add(e,i),has.add("ios",i)}has("webkit")||(!a.includes("Gecko")||has("wp")||has("khtml")||has("edge")||has.add("mozilla",i),has("mozilla")&&has.add("ff",parseFloat(a.split("Firefox/")[1]||a.split("Minefield/")[1])||void 0))}})(),(()=>{if(globalThis.navigator){const e=navigator.userAgent,a=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),d=/iPhone/i.test(e);a&&has.add("esri-mobile",a),d&&has.add("esri-iPhone",d),has.add("esri-geolocation",!!navigator.geolocation)}has.add("esri-wasm","WebAssembly"in globalThis),has.add("esri-performance-mode-frames-between-render",20),has.add("esri-force-performance-mode",!1),has.add("esri-shared-array-buffer",(()=>{const e="SharedArrayBuffer"in globalThis,a=!1===globalThis.crossOriginIsolated;return e&&!a})),has.add("wasm-simd",(()=>{const e=[0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11];return WebAssembly.validate(new Uint8Array(e))})),has.add("esri-atomics","Atomics"in globalThis),has.add("esri-workers","Worker"in globalThis),has.add("web-feat:cache","caches"in globalThis),has.add("esri-workers-arraybuffer-transfer",!has("safari")||Number(has("safari"))>=12),has.add("workers-pool-size",8),has.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),has.add("featurelayer-simplify-payload-size-factors",[1,1,4]),has.add("featurelayer-fast-triangulation-enabled",!0),has.add("featurelayer-animation-enabled",!0),has.add("featurelayer-snapshot-enabled",!0),has.add("featurelayer-snapshot-point-min-threshold",8e4),has.add("featurelayer-snapshot-point-max-threshold",4e5),has.add("featurelayer-snapshot-point-coverage",.1),has.add("featurelayer-query-max-depth",4),has.add("featurelayer-query-pausing-enabled",!1),has.add("featurelayer-advanced-symbols",!1),has.add("featurelayer-pbf",!0),has.add("featurelayer-pbf-statistics",!1),has.add("feature-layers-workers",!0),has.add("feature-polyline-generalization-factor",1),has.add("mapview-transitions-duration",200),has.add("mapview-essential-goto-duration",200),has.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),has.add("mapserver-pbf-version-support",10.81),has.add("mapservice-popup-identify-max-tolerance",20),has.add("request-queue-concurrency-hosted",16),has.add("request-queue-concurrency-non-hosted",4),has.add("curve-densification-coarse-segments",128),has.add("curve-densification-max-segments",2e3),has.add("curve-densification-min-segments",3),has.add("curve-densification-pixels-per-segment",16),has.add("view-readyState-waiting-delay",1e3),has.add("gradient-depth-bias",.01),has.add("gradient-depth-epsilon",1e-8),has("host-webworker")||has("host-browser")&&(has.add("esri-csp-restrictions",(()=>{try{new Function}catch{return!0}return!1})),has.add("esri-image-decode",(()=>{if("decode"in new Image){const e=new Image;return e.src='data:image/svg+xml;charset=UTF-8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>',void e.decode().then((()=>{has.add("esri-image-decode",!0,!0,!0)})).catch((()=>{has.add("esri-image-decode",!1,!0,!0)}))}return!1})),has.add("esri-url-encodes-apostrophe",(()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")})))})();export{has as default};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
+ */
5
+ import{nativeArrayMaxSize as r}from"../../core/typedArrayUtil.js";function n(n){return Array.isArray(n)?n.length<r?n:new Int16Array(n):n.length<r?Array.from(n):n}function t(n){return n<=r?new Array(n):new Int16Array(n)}export{n as compactShortArray,t as newShortArray};
package/interfaces.d.ts CHANGED
@@ -98103,6 +98103,17 @@ declare namespace __esri {
98103
98103
  duration?: number;
98104
98104
  maxDuration?: number;
98105
98105
  easing?: | "linear"
98106
+ | "ease"
98107
+ | "ease-in"
98108
+ | "ease-out"
98109
+ | "ease-in-out"
98110
+ | "cubic-in"
98111
+ | "cubic-out"
98112
+ | "cubic-in-out"
98113
+ | "expo-in"
98114
+ | "expo-out"
98115
+ | "expo-in-out"
98116
+ | "quad-in-out-coast"
98106
98117
  | "in-cubic"
98107
98118
  | "out-cubic"
98108
98119
  | "in-out-cubic"
@@ -98110,10 +98121,6 @@ declare namespace __esri {
98110
98121
  | "out-expo"
98111
98122
  | "in-out-expo"
98112
98123
  | "in-out-coast-quad"
98113
- | "ease"
98114
- | "ease-in"
98115
- | "ease-out"
98116
- | "ease-in-out"
98117
98124
  | MapViewEasingFunction;
98118
98125
  pickClosestTarget?: boolean;
98119
98126
  signal?: AbortSignal | nullish;
@@ -99122,6 +99129,13 @@ declare namespace __esri {
99122
99129
  duration?: number;
99123
99130
  maxDuration?: number;
99124
99131
  easing?: | "linear"
99132
+ | "cubic-in"
99133
+ | "cubic-out"
99134
+ | "cubic-in-out"
99135
+ | "expo-in"
99136
+ | "expo-out"
99137
+ | "expo-in-out"
99138
+ | "quad-in-out-coast"
99125
99139
  | "in-cubic"
99126
99140
  | "out-cubic"
99127
99141
  | "in-out-cubic"
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{id as e}from"../../kernel.js";import t from"../../request.js";function n(e){return f(e)||o(e)}function r(e){return null!=e&&"object"==typeof e&&"type"in e&&"feature"===e.type}function i(e){return null!=e&&"object"==typeof e&&"type"in e&&"graphics"===e.type}function u(e){return null!=e&&"object"==typeof e&&"type"in e&&"map-notes"===e.type&&"sublayers"in e}function s(e){return null!=e&&"object"==typeof e&&"type"in e&&"knowledge-graph"===e.type&&"layers"in e}function a(e){return null!=e&&"object"==typeof e&&"type"in e&&"link-chart"===e.type&&"layers"in e}function o(e){return"scene"===e?.type}function c(e){return null!=e&&"object"==typeof e&&"type"in e&&"subtype-group"===e.type&&"sublayers"in e}function l(e){return"subtype-sublayer"===e?.type}function f(e){const t=e?.type;return"imagery-tile"===t||"tile"===t||"open-street-map"===t||"vector-tile"===t||"web-tile"===t||"wmts"===t}function y(e){const t=e?.type;return"base-tile"===t||"tile"===t||"elevation"===t||"imagery-tile"===t||"base-elevation"===t||"open-street-map"===t||"wcs"===t||"web-tile"===t||"wmts"===t||"vector-tile"===t}function p(e){return null!=e&&"type"in e&&"group"===e.type}const g={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function b(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function d(e){return"IntegratedMeshLayer"===e||"IntegratedMesh3DTilesLayer"===e}function m(e){return"integrated-mesh"===e||"integrated-mesh-3dtiles"===e}function h(e){return"voxel"===e?.type}function v(e){return"imagery-tile"===e?.type}function j(e){return null!=e?.parent&&"declaredClass"in e.parent&&"esri.Basemap"===e.parent.declaredClass&&e.parent.baseLayers.includes(e)}function w(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function L(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function E(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}function S(e){const t=/[:;]/,n=[];let r=!1;if(e&&(e.forEach(((e,i)=>{n.push([i,e]),!r&&t.test(e)&&(r=!0)})),n.length>0)){let e;if(r){const t={};n.forEach((e=>{t[e[0]]=e[1]})),e=JSON.stringify(t)}else{const t=[];n.forEach((e=>{t.push(e[0]+":"+e[1])})),e=t.join(";")}return e}return null}function C(e){if(!e)return;const t=[];return e.forEach(((e,n)=>{t.push('"'+n+'":'+JSON.stringify(e))})),t.length?"{"+t.join(",")+"}":void 0}function M(e){if(e.activeLayer){const t=e.activeLayer.tileMatrixSet;if(t)return t;const n=e.activeLayer.tileMatrixSets;if(n)return n}return null}async function x(n,r){const i=e?.findServerInfo(n);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const u=n.toLowerCase().indexOf("/rest/services");if(-1===u)return null;const s=`${n.slice(0,u)}/rest/info`,a=null!=r?r.signal:null,{data:o}=await t(s,{query:{f:"json"},responseType:"json",signal:a});return o?.owningSystemUrl||null}function I(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}function k(e){return null!=e&&"object"==typeof e&&"isTable"in e&&!!e.isTable}function O(e){return I(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function T(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}function B(e){return!!T(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function P(e){if(!e)return[];return("subtypes"in e?e.subtypes:c(e.parent)?e.parent.subtypes:[])??[]}export{B as getEffectiveEditingEnabled,O as getEffectiveLayerCapabilities,x as getOwningPortalUrl,P as getSubtypesFromLayer,M as getTileMaxtrixSetFromActiveLayer,j as isBaseLayer,n as isBasemap3DSupportedLayer,f as isBasemapSupportedTiledLayer,w as isFeatureCollectionLayer,r as isFeatureLayer,E as isFeatureServiceLayer,i as isGraphicsLayer,p as isGroupLayer,v as isImageryTileLayer,m as isIntegratedMeshLayer,d as isIntegratedMeshOperationalLayer,s as isKnowledgeGraphLayer,I as isLayerWithFeatureCapabilities,L as isLayerWithFeatureLayerSource,a as isLinkChartLayer,u as isMapNotesLayer,o as isSceneLayer,b as isSceneServiceLayer,c as isSubtypeGroupLayer,l as isSubtypeSublayer,k as isTable,y as isTiledLayer,h as isVoxelLayer,g as sceneServiceLayerTypeToClassName,S as serializeLayerDefinitions,C as serializeTimeOptions};
5
+ import{id as e}from"../../kernel.js";import t from"../../request.js";function n(e){return y(e)||o(e)}function r(e){return null!=e&&"object"==typeof e&&"type"in e&&"feature"===e.type}function i(e){return null!=e&&"object"==typeof e&&"type"in e&&"graphics"===e.type}function u(e){return null!=e&&"object"==typeof e&&"type"in e&&"map-notes"===e.type&&"sublayers"in e}function s(e){return null!=e&&"object"==typeof e&&"type"in e&&"knowledge-graph"===e.type&&"layers"in e}function a(e){return null!=e&&"object"==typeof e&&"type"in e&&"link-chart"===e.type&&"layers"in e}function o(e){return"scene"===e?.type}function c(e){return null!=e&&"object"==typeof e&&"type"in e&&"subtype-group"===e.type&&"sublayers"in e}function l(e){return"subtype-sublayer"===e?.type}function y(e){const t=e?.type;return"imagery-tile"===t||"tile"===t||"open-street-map"===t||"vector-tile"===t||"web-tile"===t||"wmts"===t}function f(e){const t=e?.type;return"base-tile"===t||"tile"===t||"elevation"===t||"imagery-tile"===t||"base-elevation"===t||"open-street-map"===t||"wcs"===t||"web-tile"===t||"wmts"===t||"vector-tile"===t}function p(e){return null!=e&&"type"in e&&"group"===e.type}const g={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function b(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function d(e){return"IntegratedMeshLayer"===e||"IntegratedMesh3DTilesLayer"===e}function m(e){return"integrated-mesh"===e||"integrated-mesh-3dtiles"===e}function h(e){return"voxel"===e?.type}function v(e){return"imagery-tile"===e?.type}function j(e){return null!=e?.parent&&"declaredClass"in e.parent&&"esri.Basemap"===e.parent.declaredClass&&e.parent.baseLayers.includes(e)}function w(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function L(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function E(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}function S(e){const t=/[:;]/,n=[];let r=!1;if(e&&(e.forEach(((e,i)=>{n.push([i,e]),!r&&t.test(e)&&(r=!0)})),n.length>0)){let e;if(r){const t={};n.forEach((e=>{t[e[0]]=e[1]})),e=JSON.stringify(t)}else{const t=[];n.forEach((e=>{t.push(e[0]+":"+e[1])})),e=t.join(";")}return e}return null}function C(e){if(!e)return;const t=[];return e.forEach(((e,n)=>{t.push('"'+n+'":'+JSON.stringify(e))})),t.length?"{"+t.join(",")+"}":void 0}function M(e){if(e.activeLayer){const t=e.activeLayer.tileMatrixSet;if(t)return t;const n=e.activeLayer.tileMatrixSets;if(n)return n}return null}async function x(n,r){const i=e?.findServerInfo(n);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const u=n.toLowerCase().indexOf("/rest/services");if(-1===u)return null;const s=`${n.slice(0,u)}/rest/info`,a=null!=r?r.signal:null,{data:o}=await t(s,{query:{f:"json"},responseType:"json",signal:a});return o?.owningSystemUrl||null}function I(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}function k(e){return null!=e&&"object"==typeof e&&"isTable"in e&&!!e.isTable}function O(e){return I(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function T(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}function B(e){return!!T(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function P(e){if(!e)return[];return("subtypes"in e?e.subtypes:c(e.parent)?e.parent.subtypes:[])??[]}function q(e){return("imagery"===e.type||"imagery-tile"===e.type)&&"flow"===e.renderer?.type}export{B as getEffectiveEditingEnabled,O as getEffectiveLayerCapabilities,x as getOwningPortalUrl,P as getSubtypesFromLayer,M as getTileMaxtrixSetFromActiveLayer,j as isBaseLayer,n as isBasemap3DSupportedLayer,y as isBasemapSupportedTiledLayer,w as isFeatureCollectionLayer,r as isFeatureLayer,E as isFeatureServiceLayer,i as isGraphicsLayer,p as isGroupLayer,v as isImageryTileLayer,m as isIntegratedMeshLayer,d as isIntegratedMeshOperationalLayer,s as isKnowledgeGraphLayer,I as isLayerWithFeatureCapabilities,L as isLayerWithFeatureLayerSource,q as isLayerWithFlowRenderer,a as isLinkChartLayer,u as isMapNotesLayer,o as isSceneLayer,b as isSceneServiceLayer,c as isSubtypeGroupLayer,l as isSubtypeSublayer,k as isTable,f as isTiledLayer,h as isVoxelLayer,g as sceneServiceLayerTypeToClassName,S as serializeLayerDefinitions,C as serializeTimeOptions};