@arcgis/core 5.1.0-next.58 → 5.1.0-next.59

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 (182) hide show
  1. package/applications/Components/SelectionOperation.d.ts +2 -2
  2. package/applications/Components/SelectionOperation.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/04ea806b933d4dd41609.js +1 -0
  5. package/assets/esri/core/workers/chunks/{45b7266580f9ce4fab6c.js → 0622e238693c257abacb.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{05bc675c029ed311427f.js → 155c741a9839d24f04a2.js} +1 -1
  7. package/assets/esri/core/workers/chunks/1ae4e43a399e1974f106.js +1 -0
  8. package/assets/esri/core/workers/chunks/1f8e22df08c2f5fbb8c8.js +1 -0
  9. package/assets/esri/core/workers/chunks/{2327b368673a974dee8b.js → 2339465190c9d5ede25f.js} +1 -1
  10. package/assets/esri/core/workers/chunks/23f6d24bf850bc3280ec.js +1 -0
  11. package/assets/esri/core/workers/chunks/2541ac6e0ed1184edc9b.js +1 -0
  12. package/assets/esri/core/workers/chunks/34207774bc371e95ba3c.js +1 -0
  13. package/assets/esri/core/workers/chunks/{01777e91cd4e0bf04fd0.js → 35217befc8f9882d139e.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{40bcfc4f8efe7de7ec9d.js → 3de17e89973160b42923.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{666e1e79fcb309b0b9b1.js → 48d289db3145ce6c02bb.js} +1 -1
  16. package/assets/esri/core/workers/chunks/4c73c2f4331351e2a50c.js +1 -0
  17. package/assets/esri/core/workers/chunks/{2757cf54656b5d318b11.js → 55a0b69cf034ac32fc25.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{4d54beab8ae5ff31e7b0.js → 5a9f5a49dc68b42762bb.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{7cec3252e3ee56424b9e.js → 5c6e5f22450dd0583074.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{b39b4db86a1049f0b901.js → 6be9d00839002f24fafd.js} +1 -1
  21. package/assets/esri/core/workers/chunks/6c886f19875291d02407.js +1 -0
  22. package/assets/esri/core/workers/chunks/75e28458e08b0738b35a.js +2 -0
  23. package/assets/esri/core/workers/chunks/{c460ca93ed8e20d8b53a.js → 86a6dd19903fa5023cc7.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{6c571008bee8376ea50a.js → 8ccf2f65d8ed3c48ffff.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{fcfaaced184f8da3e28d.js → 9b53aa2429573f1b977f.js} +1 -1
  26. package/assets/esri/core/workers/chunks/9d580b5bcd59857a5702.js +1405 -0
  27. package/assets/esri/core/workers/chunks/a37697ef360e2425768a.js +1 -0
  28. package/assets/esri/core/workers/chunks/{a787fe09d3df9d4254ba.js → ab3183f2327ff26e2b45.js} +1 -1
  29. package/assets/esri/core/workers/chunks/b0f2ce61d3cad413898e.js +1 -0
  30. package/assets/esri/core/workers/chunks/{53c149bca42595b7dd1e.js → bbdf27bc34fadbe8e6fe.js} +1 -1
  31. package/assets/esri/core/workers/chunks/be42fe0b7ba0e27030b2.js +1 -0
  32. package/assets/esri/core/workers/chunks/d0c3ab70f390cd579fed.js +1 -0
  33. package/assets/esri/core/workers/chunks/{5a573fa1012092328b88.js → d816d1a4220d827faf63.js} +1 -1
  34. package/assets/esri/core/workers/chunks/e26894655823849947f4.js +1 -0
  35. package/assets/esri/core/workers/chunks/e59f5dc8c85bcea66e98.js +1 -0
  36. package/assets/esri/core/workers/chunks/{ccf845ac0ac354507a25.js → ec1b2eb05410848081c9.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{851dd71d28681d4eccfd.js → f7af90c5f9d371eb7009.js} +1 -1
  38. package/assets/esri/core/workers/chunks/fa6e1ad099b43a6f5501.js +1 -0
  39. package/assets/esri/core/workers/chunks/{4a6186001323b47c23a4.js → fee1d873127dca02459f.js} +1 -1
  40. package/chunks/GlobalIllumination.glsl.js +101 -0
  41. package/chunks/GlobalIlluminationBlur.glsl.js +68 -0
  42. package/config.js +1 -1
  43. package/geometry/Mesh.js +1 -1
  44. package/geometry/support/polygonUtils.js +1 -1
  45. package/geometry/support/{triangulationUtils.js → triangulationUtilsDeprecated.js} +1 -1
  46. package/kernel.js +1 -1
  47. package/layers/support/SceneModification.js +1 -1
  48. package/package.json +2 -2
  49. package/renderers/ClassBreaksRenderer.js +1 -1
  50. package/renderers/DictionaryRenderer.js +1 -1
  51. package/renderers/DotDensityRenderer.js +1 -1
  52. package/renderers/HeatmapRenderer.js +1 -1
  53. package/renderers/PieChartRenderer.js +1 -1
  54. package/renderers/Renderer.js +1 -1
  55. package/renderers/SimpleRenderer.js +1 -1
  56. package/renderers/UniqueValueRenderer.js +1 -1
  57. package/renderers/support/AttributeColorInfo.js +1 -1
  58. package/renderers/support/ClassBreakInfo.d.ts +6 -0
  59. package/renderers/support/ClassBreakInfo.js +1 -1
  60. package/renderers/support/UniqueValueClass.d.ts +12 -0
  61. package/renderers/support/UniqueValueClass.js +1 -1
  62. package/renderers/support/UniqueValueInfo.d.ts +12 -0
  63. package/renderers/support/UniqueValueInfo.js +1 -1
  64. package/renderers/visualVariables/ColorVariable.js +1 -1
  65. package/renderers/visualVariables/OpacityVariable.js +1 -1
  66. package/renderers/visualVariables/SizeVariable.js +1 -1
  67. package/renderers/visualVariables/VisualVariable.js +1 -1
  68. package/support/revision.js +1 -1
  69. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  70. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  71. package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
  72. package/views/2d/engine/webgl/GlyphSource.js +1 -1
  73. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  74. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  75. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  76. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  77. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
  78. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  79. package/views/2d/engine/webgl/util/IntervalMatcher.js +1 -1
  80. package/views/2d/engine/webgl/util/MapMatcher.js +1 -1
  81. package/views/2d/layers/features/schema/processor/MatcherSchema.js +1 -1
  82. package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
  83. package/views/3d/FocusAreasView.js +1 -1
  84. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  85. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  86. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  87. package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
  88. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  89. package/views/3d/layers/Lyr3DWorker.js +1 -1
  90. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  91. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  92. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  93. package/views/3d/layers/graphics/extrudeUtils.js +1 -1
  94. package/views/3d/layers/graphics/extrudeUtilsDeprecated.js +2 -0
  95. package/views/3d/layers/graphics/tessellationUtils.js +2 -0
  96. package/views/3d/layers/i3s/PointCloudHighlights.js +1 -1
  97. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  98. package/views/3d/layers/i3s/PointCloudRendererNode.js +1 -1
  99. package/views/3d/layers/support/Tiles3DBVH.js +1 -1
  100. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  101. package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
  102. package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
  103. package/views/3d/support/renderInfoUtils/line.js +1 -1
  104. package/views/3d/support/renderInfoUtils/polygon.js +1 -1
  105. package/views/3d/support/renderInfoUtils/polygonDeprecated.js +2 -0
  106. package/views/3d/terrain/OverlayRenderer.js +1 -1
  107. package/views/3d/terrain/TerrainRenderer.js +1 -1
  108. package/views/3d/webgl-engine/collections/Component/ComponentData.js +1 -1
  109. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  110. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  111. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  112. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  113. package/views/3d/webgl-engine/collections/Component/RenderGeometry.js +1 -1
  114. package/views/3d/webgl-engine/collections/Component/RenderSubmitSystem.js +1 -1
  115. package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
  116. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  117. package/views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js +6 -5
  118. package/views/3d/webgl-engine/core/shaderLibrary/output/ReadDepthLastFrame.glsl.js +4 -0
  119. package/views/3d/webgl-engine/core/shaderLibrary/shading/EncodingColor.glsl.js +7 -0
  120. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js +6 -6
  121. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +93 -50
  122. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadGlobalIllumination.glsl.js +20 -0
  123. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +23 -9
  124. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +1 -1
  125. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +1 -1
  126. package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
  127. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  128. package/views/3d/webgl-engine/effects/emissive/emissions.js +2 -0
  129. package/views/3d/webgl-engine/effects/globalIllumination/BlueNoise.js +2 -0
  130. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +2 -0
  131. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlurTechnique.js +2 -0
  132. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechnique.js +2 -0
  133. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechniqueConfiguration.js +2 -0
  134. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  135. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  136. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  137. package/views/3d/webgl-engine/lib/Material.js +1 -1
  138. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  139. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  140. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  141. package/views/3d/webgl-engine/lib/ReprojectionUniforms.js +1 -1
  142. package/views/3d/webgl-engine/lib/lodRendering/LodComponentData.js +1 -1
  143. package/views/3d/webgl-engine/lib/lodRendering/LodLevel.js +1 -1
  144. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  145. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  146. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  147. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  148. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  149. package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
  150. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  151. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  152. package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
  153. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  154. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  155. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  156. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  157. package/views/3d/webgl-engine/shaders/GlobalIllumination.glsl.js +2 -0
  158. package/views/3d/webgl-engine/shaders/GlobalIlluminationBlur.glsl.js +2 -0
  159. package/views/3d/webgl-engine/shaders/MeasurementArrowTechnique.js +1 -1
  160. package/views/3d/webgl-engine/shaders/MeasurementArrowTechniqueConfiguration.js +1 -1
  161. package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
  162. package/{widgets/support/Selector2D → views/selection}/SelectionOperation.d.ts +10 -11
  163. package/views/selection/SelectionOperation.js +2 -0
  164. package/views/selection/types.d.ts +138 -2
  165. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  166. package/assets/esri/core/workers/chunks/009db7b459b18f6a668b.js +0 -1
  167. package/assets/esri/core/workers/chunks/0fc60b4c44c4e865b699.js +0 -2
  168. package/assets/esri/core/workers/chunks/34484afe767d60f85982.js +0 -1
  169. package/assets/esri/core/workers/chunks/55bb5b7817c2963c8bfa.js +0 -1
  170. package/assets/esri/core/workers/chunks/572fcd33ae3648ed4f9c.js +0 -1
  171. package/assets/esri/core/workers/chunks/66a4d764937918a2779f.js +0 -1
  172. package/assets/esri/core/workers/chunks/6b56c8ba978ec6edd6b8.js +0 -1
  173. package/assets/esri/core/workers/chunks/92fb6519b01d110ee947.js +0 -1041
  174. package/assets/esri/core/workers/chunks/9806cc96414065ae0afe.js +0 -1
  175. package/assets/esri/core/workers/chunks/9b365a6242b0287f8727.js +0 -1
  176. package/assets/esri/core/workers/chunks/a029db48079af4b5cccd.js +0 -1
  177. package/assets/esri/core/workers/chunks/ec91d5081f423755cb07.js +0 -1
  178. package/assets/esri/core/workers/chunks/f9fe89ced41b49608667.js +0 -1
  179. package/assets/esri/core/workers/chunks/fce30184f354fb7d11af.js +0 -1
  180. package/widgets/support/Selector2D/SelectionOperation.js +0 -2
  181. package/widgets/support/Selector2D/types.d.ts +0 -139
  182. /package/assets/esri/core/workers/chunks/{0fc60b4c44c4e865b699.js.LICENSE.txt → 75e28458e08b0738b35a.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{IDENTITY as e}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{BufferViewVec4f as r,BufferViewUint32 as s,BufferViewMat3f as i,BufferViewVec4u8 as o,BufferViewFloat as n}from"../../../../geometry/support/buffer/BufferView.js";import{isHighlightOrOLID as a,isColor as u,isDepth as l,isColorHighlightOrOLID as c}from"../core/shaderLibrary/ShaderOutput.js";import f from"../lib/GLMaterial.js";import{assert as h}from"../lib/Util.js";import{DefaultBufferWriter as p}from"./DefaultBufferWriter.js";import{TriangleMaterial as m}from"./TriangleMaterial.js";import{VisualVariablePassParameters as d}from"./VisualVariablePassParameters.js";import{writeAttributes as g,writeBufferVec4 as x,writeColor as b,writeVVFeatureAttribute as y}from"./internal/bufferWriterUtils.js";import{getLayout as j,getTextureLayout as v}from"../shaders/PatternLayouts.js";import{PatternTechnique as C}from"../shaders/PatternTechnique.js";import{PatternTechniqueConfiguration as w}from"../shaders/PatternTechniqueConfiguration.js";import{alphaCutoff as B}from"../../../../webscene/support/AlphaCutoff.js";class F extends m{constructor(e){super(e,P),this._configuration=new w,this.supportsEdges=!0,this.transparent=!0,this.produces=new Map([[2,e=>a(e)],[4,e=>u(e)],[5,e=>l(e)],[19,e=>this.parameters.draped&&c(e)]])}updateConfiguration(e){super.updateConfiguration(e),this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasVertexColors=this.parameters.hasVertexColors&&!this.parameters.vvColor,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.style=this.parameters.style,this._configuration.draped=this.parameters.draped,this._configuration.terrainDepthTest=e.terrainDepthTest&&u(e.output),this._configuration.cullAboveTerrain=e.cullAboveTerrain,this._configuration.hasVVColor=!!this.parameters.vvColor,this._configuration.emissionSource=this.hasEmissions?1:0}get visible(){return this.parameters.color[3]>=B}get hasEmissions(){return this.parameters.emissiveStrength>0}createGLMaterial(e){return new S(e)}createBufferWriter(){return new T(j(this.parameters),v(this.parameters))}}class S extends f{beginSlot(e){return this.getTechnique(C,e)}}class T extends p{constructor(e,t){super(e),this.textureBufferLayout=t}elementCountTextureBuffer(e){return e.get("boundingRect")?.indices.length??0}write(e,t,i,o,n,a,u){const l=g(i,o,this.layout,e,t,n,a);for(const s of this.layout.fields.keys()){const e=i.get(s),t=e?.indices;if(e&&t)switch(s){case"uvMapSpace":{h(4===e.size);const t=n.getField(s,r);t&&x(e,t,a);break}}}const{textureBufferLayout:c}=this;if(null==c)return l;h(null!=u,"Using a texture layout, but the texture range for this instance was not provided");const f=u.from;h(1===u.numElements,"Provided more than one texture buffer element per polygon");const p=n.getField("textureElementIndex",s);h(null!=p,"Missing component index field");const m=i.get("position")?.indices.length??0;for(let r=0;r<m;++r)p.set(a+r,f);return l}writeTextureBuffer(t,r,s,a,u){const{textureBufferLayout:l}=this;if(null==l)return;const c=a.getField("boundingRect",i),f=s.get("boundingRect");c&&f&&(h(9===f.size),_(f,t??e,c,u));const p=a.getField("color",o),m=s.get("color");p&&m&&(h(3===m.size||4===m.size),b(m,m.size,p,u));const d=a.getField("colorFeatureAttribute",n),g=s.get("colorFeatureAttribute");d&&g&&(h(1===g.size),y(g,d,u))}}function _(e,t,r,s){const{data:i,indices:o}=e,n=t,a=r.typedBuffer,u=r.typedBufferStride,l=o.length;s*=u;for(let c=0;c<l;++c){const e=9*o[c],t=i[e],r=i[e+1],l=i[e+2];a[s]=n[0]*t+n[4]*r+n[8]*l+n[12],a[s+1]=n[1]*t+n[5]*r+n[9]*l+n[13],a[s+2]=n[2]*t+n[6]*r+n[10]*l+n[14];for(let o=3;o<9;++o)a[s+o]=i[e+o];s+=u}}class P extends d{constructor(){super(...arguments),this.color=t(1,1,1,1),this.emissiveStrength=0,this.hasVertexColors=!1,this.polygonOffset=0,this.hasSlicePlane=!1,this.cullFace=0,this.hasOccludees=!1,this.style=2,this.draped=!0,this.useIndexing=!0}}export{P as Parameters,F as PatternMaterial};
2
+ import{IDENTITY as e}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{BufferViewVec4f as r,BufferViewUint32 as s,BufferViewMat3f as i,BufferViewVec4u8 as o,BufferViewFloat as n}from"../../../../geometry/support/buffer/BufferView.js";import{isHighlightOrOLID as a,isColor as u,isDepth as l,isColorHighlightOrOLID as c}from"../core/shaderLibrary/ShaderOutput.js";import f from"../lib/GLMaterial.js";import{assert as h}from"../lib/Util.js";import{DefaultBufferWriter as p}from"./DefaultBufferWriter.js";import{TriangleMaterial as m}from"./TriangleMaterial.js";import{VisualVariablePassParameters as d}from"./VisualVariablePassParameters.js";import{writeAttributes as g,writeBufferVec4 as x,writeColor as b,writeVVFeatureAttribute as y}from"./internal/bufferWriterUtils.js";import{getLayout as j,getTextureLayout as v}from"../shaders/PatternLayouts.js";import{PatternTechnique as C}from"../shaders/PatternTechnique.js";import{PatternTechniqueConfiguration as w}from"../shaders/PatternTechniqueConfiguration.js";import{alphaCutoff as B}from"../../../../webscene/support/AlphaCutoff.js";class F extends m{constructor(e){super(e,P),this._configuration=new w,this.supportsEdges=!0,this.transparent=!0,this.produces=new Map([[2,e=>a(e)],[4,e=>u(e)],[5,e=>l(e)],[19,e=>this.parameters.draped&&c(e)]])}updateConfiguration(e){super.updateConfiguration(e),this._configuration.cullFace=this.parameters.cullFace,this._configuration.hasVertexColors=this.parameters.hasVertexColors&&!this.parameters.vvColor,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.style=this.parameters.style,this._configuration.draped=this.parameters.draped,this._configuration.terrainDepthTest=e.terrainDepthTest&&u(e.output),this._configuration.cullAboveTerrain=e.cullAboveTerrain,this._configuration.hasVVColor=!!this.parameters.vvColor,this._configuration.emissionSource=this.hasEmissions?1:0}get visible(){return this.parameters.color[3]>=B}get hasEmissions(){return this.parameters.emissiveStrength>0?2:0}createGLMaterial(e){return new S(e)}createBufferWriter(){return new T(j(this.parameters),v(this.parameters))}}class S extends f{beginSlot(e){return this.getTechnique(C,e)}}class T extends p{constructor(e,t){super(e),this.textureBufferLayout=t}elementCountTextureBuffer(e){return e.get("boundingRect")?.indices.length??0}write(e,t,i,o,n,a,u){const l=g(i,o,this.layout,e,t,n,a);for(const s of this.layout.fields.keys()){const e=i.get(s),t=e?.indices;if(e&&t)switch(s){case"uvMapSpace":{h(4===e.size);const t=n.getField(s,r);t&&x(e,t,a);break}}}const{textureBufferLayout:c}=this;if(null==c)return l;h(null!=u,"Using a texture layout, but the texture range for this instance was not provided");const f=u.from;h(1===u.numElements,"Provided more than one texture buffer element per polygon");const p=n.getField("textureElementIndex",s);h(null!=p,"Missing component index field");const m=i.get("position")?.indices.length??0;for(let r=0;r<m;++r)p.set(a+r,f);return l}writeTextureBuffer(t,r,s,a,u){const{textureBufferLayout:l}=this;if(null==l)return;const c=a.getField("boundingRect",i),f=s.get("boundingRect");c&&f&&(h(9===f.size),_(f,t??e,c,u));const p=a.getField("color",o),m=s.get("color");p&&m&&(h(3===m.size||4===m.size),b(m,m.size,p,u));const d=a.getField("colorFeatureAttribute",n),g=s.get("colorFeatureAttribute");d&&g&&(h(1===g.size),y(g,d,u))}}function _(e,t,r,s){const{data:i,indices:o}=e,n=t,a=r.typedBuffer,u=r.typedBufferStride,l=o.length;s*=u;for(let c=0;c<l;++c){const e=9*o[c],t=i[e],r=i[e+1],l=i[e+2];a[s]=n[0]*t+n[4]*r+n[8]*l+n[12],a[s+1]=n[1]*t+n[5]*r+n[9]*l+n[13],a[s+2]=n[2]*t+n[6]*r+n[10]*l+n[14];for(let o=3;o<9;++o)a[s+o]=i[e+o];s+=u}}class P extends d{constructor(){super(...arguments),this.color=t(1,1,1,1),this.emissiveStrength=0,this.hasVertexColors=!1,this.polygonOffset=0,this.hasSlicePlane=!1,this.cullFace=0,this.hasOccludees=!1,this.style=2,this.draped=!0,this.useIndexing=!0}}export{P as Parameters,F as PatternMaterial};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import t from"../../../../core/Logger.js";import{clamp as e}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as i}from"../../../../core/screenUtils.js";import{secondsFromMilliseconds as r,Seconds as s}from"../../../../core/time.js";import{copy as a}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{set as n,subtract as o,dot as l,scale as h,add as p,copy as m,length as c,distance as u,transformMat4 as f}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{set as g}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{ONES as b,create as _}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{makeFloat16Array as S}from"../../../../geometry/support/float16.js";import{distance2 as v,fromPoints as P,closestLineSegmentPoint as w,create as y}from"../../../../geometry/support/lineSegment.js";import{fromPoints as j,signedDistance as E,getNormal as T,create as z}from"../../../../geometry/support/plane.js";import{isHighlightOrOLID as A,isColor as x,isDepth as O,isColorHighlightOLIDOrDepth as C,is2DGeometryOutput as L}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as M}from"../effects/geometry/olidUtils.js";import V from"../lib/GLMaterial.js";import{Material as R}from"../lib/Material.js";import{isTranslationMatrix as F}from"../lib/Util.js";import{isImagePattern as N}from"./lineStippleUtils.js";import{VisualVariablePassParameters as k}from"./VisualVariablePassParameters.js";import{writeDeltaF16Vector as U}from"./internal/bufferWriterUtils.js";import{r as D}from"../../../../chunks/RibbonLine.glsl.js";import{getLayout as B,RibbonLineTechnique as I}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as W}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as J}from"../../../../webscene/support/AlphaCutoff.js";class Y extends R{constructor(t,e){super(t,X),this.produces=new Map([[2,t=>A(t)||x(t)&&8===this.parameters.renderOccluded],[3,t=>O(t)],[11,t=>C(t)&&8===this.parameters.renderOccluded],[12,t=>C(t)&&8===this.parameters.renderOccluded],[4,t=>x(t)&&this.parameters.writeDepth&&8!==this.parameters.renderOccluded],[9,t=>x(t)&&!this.parameters.writeDepth&&8!==this.parameters.renderOccluded],[19,t=>L(t)]]),this._configuration=new W(e)}updateConfiguration(t){super.updateConfiguration(t);const e=19===t.slot,i=null!=this.parameters.stipplePattern&&null!=this.parameters.stippleTexture&&10!==t.output,r=i&&e&&this.parameters.isImagePattern();this._configuration.draped=e,this._configuration.polygonOffset=this.parameters.polygonOffset,this._configuration.stippleEnabled=i,this._configuration.stippleOffColorEnabled=i&&null!=this.parameters.stippleOffColor,this._configuration.stipplePreferContinuous=i&&this.parameters.stipplePreferContinuous,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins="round"===this.parameters.join,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=null!=this.parameters.markerParameters&&Q(this.parameters.markerParameters),this._configuration.polygonOffsetIndex=this.parameters.polygonOffsetIndex,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.hasVVSize=this.parameters.hasVVSize,this._configuration.hasVVColor=this.parameters.hasVVColor,this._configuration.hasVVOpacity=this.parameters.hasVVOpacity,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&null!=this.parameters.innerColor,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.hasOccludees=t.hasOccludees,this._configuration.occluder=8===this.parameters.renderOccluded,this._configuration.terrainDepthTest=t.terrainDepthTest&&x(t.output),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration.wireframe=this.parameters.wireframe,this._configuration.animation=this.parameters.animation,this._configuration.emissionSource=this.hasEmissions?1:0,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective&&!r,this._configuration.worldSizedImagePattern=r}get visible(){return this.parameters.color[3]>=J||null!=this.parameters.stipplePattern&&(this.parameters.stippleOffColor?.[3]??0)>J}setParameters(t,e){t.animation=this.parameters.animation,super.setParameters(t,e)}intersectDraped({attributes:t,screenToWorldRatio:i},r,s,a,n){if(!r.options.selectionMode)return;const o=t.get("size");let l=this.parameters.width;if(this.parameters.vvSize){const i=t.get("sizeFeatureAttribute").data[0];Number.isNaN(i)?l*=this.parameters.vvSize.fallback[0]:l*=e(this.parameters.vvSize.offset[0]+i*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else o&&(l*=o.data[0]);const h=s[0],p=s[1],m=(l/2+4)*i;let c=Number.MAX_VALUE,u=0;const f=t.get("position").data,d=K(this.parameters,t)?f.length-2:f.length-5;for(let g=0;g<d;g+=3){const t=f[g],i=f[g+1],r=(g+3)%f.length,s=h-t,a=p-i,n=f[r]-t,o=f[r+1]-i,l=e((n*s+o*a)/(n*n+o*o),0,1),m=n*l-s,d=o*l-a,b=m*m+d*d;b<c&&(c=b,u=g/3)}c<m*m&&a(n.distance,n.normal,u)}intersect(i,r,s,f,d,g){const{options:b,camera:_,rayBegin:S,rayEnd:y}=s;if(!b.selectionMode||!i.visible||!_)return;if(!F(r))return void t.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix");const z=i.attributes,A=z.get("position").data;let x=this.parameters.width;if(this.parameters.vvSize){const t=z.get("sizeFeatureAttribute").data[0];Number.isNaN(t)||(x*=e(this.parameters.vvSize.offset[0]+t*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0]))}else z.has("size")&&(x*=z.get("size").data[0]);const O=it;a(O,s.point);const C=x*_.pixelRatio/2+4*_.pixelRatio;n(ut[0],O[0]-C,O[1]+C,0),n(ut[1],O[0]+C,O[1]+C,0),n(ut[2],O[0]+C,O[1]-C,0),n(ut[3],O[0]-C,O[1]-C,0);for(let t=0;t<4;t++)if(!_.unprojectFromRenderScreen(ut[t],ft[t]))return;j(_.eye,ft[0],ft[1],dt),j(_.eye,ft[1],ft[2],gt),j(_.eye,ft[2],ft[3],bt),j(_.eye,ft[3],ft[0],_t);let L=Number.MAX_VALUE,M=0;const V=K(this.parameters,z)?A.length-2:A.length-5;for(let t=0;t<V;t+=3){Z[0]=A[t]+r[12],Z[1]=A[t+1]+r[13],Z[2]=A[t+2]+r[14];const e=(t+3)%A.length;if($[0]=A[e]+r[12],$[1]=A[e+1]+r[13],$[2]=A[e+2]+r[14],E(dt,Z)<0&&E(dt,$)<0||E(gt,Z)<0&&E(gt,$)<0||E(bt,Z)<0&&E(bt,$)<0||E(_t,Z)<0&&E(_t,$)<0)continue;const i=_.projectToRenderScreen(Z,rt),s=_.projectToRenderScreen($,st);if(null==i||null==s)continue;if(i[2]<0&&s[2]>0){o(tt,Z,$);const t=_.frustum,e=-E(t[4],Z)/l(tt,T(t[4]));if(h(tt,tt,e),p(Z,Z,tt),!_.projectToRenderScreen(Z,i))continue}else if(i[2]>0&&s[2]<0){o(tt,$,Z);const t=_.frustum,e=-E(t[4],$)/l(tt,T(t[4]));if(h(tt,tt,e),p($,$,tt),!_.projectToRenderScreen($,s))continue}else if(i[2]<0&&s[2]<0)continue;i[2]=0,s[2]=0;const a=v(P(i,s,ot),O);a<L&&(L=a,m(at,Z),m(nt,$),M=t/3)}if(L<C*C){let t=Number.MAX_VALUE;if(w(P(at,nt,ot),P(S,y,lt),et)){o(et,et,S);const e=c(et);h(et,et,1/e),t=e/u(S,y)}g(t,et,M)}}get hasEmissions(){return this.parameters.emissiveStrength>0}createBufferWriter(){return new G(B(this.parameters),this.parameters)}createGLMaterial(t){return new q(t)}validateParameters(t){"miter"!==t.join&&(t.miterLimit=0),null!=t.markerParameters&&(t.markerScale=t.markerParameters.width/t.width)}update(t){return!!this.parameters.hasAnimation&&(this.setParameters({timeElapsed:r(t.time)},!1),0!==t.dt)}}class q extends V{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures?.release(this._stipplePattern),this._stipplePattern=null}beginSlot(t){const{stipplePattern:e}=this._material.parameters;return this._stipplePattern!==e&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(e,this._stipplePattern)}),this._stipplePattern=e),this.getTechnique(I,t)}}class X extends k{constructor(){super(...arguments),this._width=0,this.color=b,this.join="miter",this.cap=0,this.miterLimit=5,this.writeDepth=!0,this.polygonOffset=0,this.polygonOffsetIndex=0,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1,this.timeElapsed=s(0),this.animation=0,this.animationSpeed=1,this.trailLength=1,this.startTime=s(0),this.endTime=s(1/0),this.emissiveStrength=0}get width(){return this.isImagePattern()?this.stipplePattern.width:this._width}set width(t){this._width=t}get transparent(){return this.color[3]<1||this.hasAnimation||null!=this.stipplePattern&&(this.stippleOffColor?.[3]??0)<1}get hasAnimation(){return 0!==this.animation}isImagePattern(){return N(this.stipplePattern)&&null!=this.stippleTexture}}class G{constructor(t,e){this.layout=t,this._parameters=e;const i=e.stipplePattern?1:0;switch(this._parameters.join){case"miter":case"bevel":this.numJoinSubdivisions=i;break;case"round":this.numJoinSubdivisions=D+i}}_isClosed(t){return K(this._parameters,t)}allocate(t){return this.layout.createBuffer(t)}elementCount(t){const e=2,i=t.get("position").indices.length/2+1,r=this._isClosed(t);let s=r?2:2*e;return s+=((r?i:i-1)-(r?0:1))*(2*this.numJoinSubdivisions+4),s+=2,this._parameters.wireframe&&(s=2+4*(s-2)),s}write(t,e,i,r,s,a){const o=this.layout,l=i.get("position"),h=l.indices,p=l.data.length/3,c=i.get("distanceToStart")?.data;h&&h.length!==2*(p-1)&&console.warn("RibbonLineMaterial does not support indices");const d=o.fields.has("sizeFeatureAttribute");let b=1,_=null;if(d){const t=i.get("sizeFeatureAttribute");1===t.data.length?b=t.data[0]:_=t.data}else b=i.get("size")?.data[0]??1;let v=[1,1,1,1],P=0,w=null;const y=o.fields.has("colorFeatureAttribute");if(y){const t=i.get("colorFeatureAttribute");1===t.data.length?P=t.data[0]:w=t.data}else v=i.get("color")?.data??v;const j=i.get("timeStamps")?.data,E=j&&o.fields.has("timeStamps"),T=o.fields.has("opacityFeatureAttribute");let z=0,A=null;if(T){const t=i.get("opacityFeatureAttribute");1===t.data.length?z=t.data[0]:A=t.data}const x=new Float32Array(s.buffer),O=S(s.buffer),C=new Uint8Array(s.buffer),L=o.stride/4;let V=a*L;const R=V;let F=0;const N=c?(t,e,i)=>F=c[i]:(t,e,i)=>F+=u(t,e),k=x.BYTES_PER_ELEMENT/O.BYTES_PER_ELEMENT,D=4/k,B=M(),I=(t,e,i,s,a,n,o,l)=>{x[V++]=e[0],x[V++]=e[1],x[V++]=e[2],U(t,e,O,V*k),V+=D,U(i,e,O,V*k),V+=D,x[V++]=l;let h=V*k;if(O[h++]=a,O[h++]=n,V=Math.ceil(h/k),y)x[V]=w?.[o]??P;else{const t=Math.min(4*o,v.length-4),e=4*V;C[e]=255*v[t],C[e+1]=255*v[t+1],C[e+2]=255*v[t+2],C[e+3]=255*v[t+3]}if(V++,x[V++]=_?.[o]??b,T&&(x[V++]=A?.[o]??z),B){let t=4*V;r?(C[t++]=r[0],C[t++]=r[1],C[t++]=r[2],C[t++]=r[3]):(C[t++]=0,C[t++]=0,C[t++]=0,C[t++]=0),V=Math.ceil(.25*t)}E&&(h=V*k,O[h++]=s[0],O[h++]=s[1],O[h++]=s[2],O[h++]=s[3],V=Math.ceil(h/k))};V+=L,n(pt,l.data[0],l.data[1],l.data[2]),E&&g(ct,j[0],j[1],j[2],j[3]),t&&f(pt,pt,t);const W=this._isClosed(i);if(W){const e=l.data.length-3;n(ht,l.data[e],l.data[e+1],l.data[e+2]),t&&f(ht,ht,t)}else n(mt,l.data[3],l.data[4],l.data[5]),t&&f(mt,mt,t),I(pt,pt,mt,ct,1,-4,0,0),I(pt,pt,mt,ct,1,4,0,0),m(ht,pt),m(pt,mt),E&&g(ct,j[4],j[5],j[6],j[7]);const J=W?0:1,Y=W?p:p-1;for(let u=J;u<Y;u++){const e=(u+1)%p*3;n(mt,l.data[e],l.data[e+1],l.data[e+2]),t&&f(mt,mt,t),N(ht,pt,u),I(ht,pt,mt,ct,0,-1,u,F),I(ht,pt,mt,ct,0,1,u,F);const i=this.numJoinSubdivisions;for(let t=0;t<i;++t){const e=(t+1)/(i+1);I(ht,pt,mt,ct,e,-1,u,F),I(ht,pt,mt,ct,e,1,u,F)}if(I(ht,pt,mt,ct,1,-2,u,F),I(ht,pt,mt,ct,1,2,u,F),m(ht,pt),m(pt,mt),E){const t=(u+1)%p*4;g(ct,j[t],j[t+1],j[t+2],j[t+3])}}W?(n(mt,l.data[3],l.data[4],l.data[5]),t&&f(mt,mt,t),F=N(ht,pt,Y),I(ht,pt,mt,ct,0,-1,J,F),I(ht,pt,mt,ct,0,1,J,F)):(F=N(ht,pt,Y),I(ht,pt,pt,ct,0,-5,Y,F),I(ht,pt,pt,ct,0,5,Y,F)),H(x,R+L,x,R,L);return V=H(x,V-L,x,V,L),this._parameters.wireframe&&this._addWireframeVertices(s,R,V,L),null}_addWireframeVertices(t,e,i,r){const s=new Float32Array(t.buffer,i*Float32Array.BYTES_PER_ELEMENT),a=new Float32Array(t.buffer,e*Float32Array.BYTES_PER_ELEMENT,i-e);let n=0;const o=t=>n=H(a,t,s,n,r);for(let l=0;l<a.length-1;l+=2*r)o(l),o(l+2*r),o(l+1*r),o(l+2*r),o(l+1*r),o(l+3*r)}}function H(t,e,i,r,s){for(let a=0;a<s;a++)i[r++]=t[e++];return r}function K(t,e){if(!t.isClosed)return!1;return e.get("position").indices.length>2}function Q(t){return 1===t.anchor&&t.hideOnShortSegments&&"begin-end"===t.placement&&t.worldSpace}const Z=d(),$=d(),tt=d(),et=d(),it=d(),rt=i(),st=i(),at=d(),nt=d(),ot=y(),lt=y(),ht=d(),pt=d(),mt=d(),ct=_(),ut=[i(),i(),i(),i()],ft=[d(),d(),d(),d()],dt=z(),gt=z(),bt=z(),_t=z();export{X as Parameters,Y as RibbonLineMaterial};
2
+ import t from"../../../../core/Logger.js";import{clamp as e}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as i}from"../../../../core/screenUtils.js";import{secondsFromMilliseconds as r,Seconds as s}from"../../../../core/time.js";import{copy as a}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{set as n,subtract as o,dot as l,scale as h,add as p,copy as m,length as c,distance as u,transformMat4 as f}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{set as g}from"../../../../core/libs/gl-matrix-2/math/vec4.js";import{ONES as b,create as _}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{makeFloat16Array as S}from"../../../../geometry/support/float16.js";import{distance2 as v,fromPoints as P,closestLineSegmentPoint as w,create as y}from"../../../../geometry/support/lineSegment.js";import{fromPoints as j,signedDistance as E,getNormal as T,create as z}from"../../../../geometry/support/plane.js";import{isHighlightOrOLID as A,isColor as O,isDepth as x,isColorHighlightOLIDOrDepth as C,is2DGeometryOutput as L}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as M}from"../effects/geometry/olidUtils.js";import V from"../lib/GLMaterial.js";import{Material as R}from"../lib/Material.js";import{isTranslationMatrix as F}from"../lib/Util.js";import{isImagePattern as N}from"./lineStippleUtils.js";import{VisualVariablePassParameters as k}from"./VisualVariablePassParameters.js";import{writeDeltaF16Vector as U}from"./internal/bufferWriterUtils.js";import{r as D}from"../../../../chunks/RibbonLine.glsl.js";import{getLayout as B,RibbonLineTechnique as I}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as W}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as J}from"../../../../webscene/support/AlphaCutoff.js";class Y extends R{constructor(t,e){super(t,X),this.produces=new Map([[2,t=>A(t)||O(t)&&8===this.parameters.renderOccluded],[3,t=>x(t)],[11,t=>C(t)&&8===this.parameters.renderOccluded],[12,t=>C(t)&&8===this.parameters.renderOccluded],[4,t=>O(t)&&this.parameters.writeDepth&&8!==this.parameters.renderOccluded],[9,t=>O(t)&&!this.parameters.writeDepth&&8!==this.parameters.renderOccluded],[19,t=>L(t)]]),this._configuration=new W(e)}updateConfiguration(t){super.updateConfiguration(t);const e=19===t.slot,i=null!=this.parameters.stipplePattern&&null!=this.parameters.stippleTexture&&10!==t.output,r=i&&e&&this.parameters.isImagePattern();this._configuration.draped=e,this._configuration.polygonOffset=this.parameters.polygonOffset,this._configuration.stippleEnabled=i,this._configuration.stippleOffColorEnabled=i&&null!=this.parameters.stippleOffColor,this._configuration.stipplePreferContinuous=i&&this.parameters.stipplePreferContinuous,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins="round"===this.parameters.join,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=null!=this.parameters.markerParameters&&Q(this.parameters.markerParameters),this._configuration.polygonOffsetIndex=this.parameters.polygonOffsetIndex,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.hasVVSize=this.parameters.hasVVSize,this._configuration.hasVVColor=this.parameters.hasVVColor,this._configuration.hasVVOpacity=this.parameters.hasVVOpacity,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&null!=this.parameters.innerColor,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.hasOccludees=t.hasOccludees,this._configuration.occluder=8===this.parameters.renderOccluded,this._configuration.terrainDepthTest=t.terrainDepthTest&&O(t.output),this._configuration.cullAboveTerrain=t.cullAboveTerrain,this._configuration.wireframe=this.parameters.wireframe,this._configuration.animation=this.parameters.animation,this._configuration.emissionSource=this.hasEmissions?1:0,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective&&!r,this._configuration.worldSizedImagePattern=r}get visible(){return this.parameters.color[3]>=J||null!=this.parameters.stipplePattern&&(this.parameters.stippleOffColor?.[3]??0)>J}get hasEmissions(){return this.parameters.emissiveStrength>0?8!==this.parameters.renderOccluded?2:1:0}setParameters(t,e){t.animation=this.parameters.animation,super.setParameters(t,e)}intersectDraped({attributes:t,screenToWorldRatio:i},r,s,a,n){if(!r.options.selectionMode)return;const o=t.get("size");let l=this.parameters.width;if(this.parameters.vvSize){const i=t.get("sizeFeatureAttribute").data[0];Number.isNaN(i)?l*=this.parameters.vvSize.fallback[0]:l*=e(this.parameters.vvSize.offset[0]+i*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else o&&(l*=o.data[0]);const h=s[0],p=s[1],m=(l/2+4)*i;let c=Number.MAX_VALUE,u=0;const f=t.get("position").data,d=K(this.parameters,t)?f.length-2:f.length-5;for(let g=0;g<d;g+=3){const t=f[g],i=f[g+1],r=(g+3)%f.length,s=h-t,a=p-i,n=f[r]-t,o=f[r+1]-i,l=e((n*s+o*a)/(n*n+o*o),0,1),m=n*l-s,d=o*l-a,b=m*m+d*d;b<c&&(c=b,u=g/3)}c<m*m&&a(n.distance,n.normal,u)}intersect(i,r,s,f,d,g){const{options:b,camera:_,rayBegin:S,rayEnd:y}=s;if(!b.selectionMode||!i.visible||!_)return;if(!F(r))return void t.getLogger("esri.views.3d.webgl-engine.materials.RibbonLineMaterial").error("intersection assumes a translation-only matrix");const z=i.attributes,A=z.get("position").data;let O=this.parameters.width;if(this.parameters.vvSize){const t=z.get("sizeFeatureAttribute").data[0];Number.isNaN(t)||(O*=e(this.parameters.vvSize.offset[0]+t*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0]))}else z.has("size")&&(O*=z.get("size").data[0]);const x=it;a(x,s.point);const C=O*_.pixelRatio/2+4*_.pixelRatio;n(ut[0],x[0]-C,x[1]+C,0),n(ut[1],x[0]+C,x[1]+C,0),n(ut[2],x[0]+C,x[1]-C,0),n(ut[3],x[0]-C,x[1]-C,0);for(let t=0;t<4;t++)if(!_.unprojectFromRenderScreen(ut[t],ft[t]))return;j(_.eye,ft[0],ft[1],dt),j(_.eye,ft[1],ft[2],gt),j(_.eye,ft[2],ft[3],bt),j(_.eye,ft[3],ft[0],_t);let L=Number.MAX_VALUE,M=0;const V=K(this.parameters,z)?A.length-2:A.length-5;for(let t=0;t<V;t+=3){Z[0]=A[t]+r[12],Z[1]=A[t+1]+r[13],Z[2]=A[t+2]+r[14];const e=(t+3)%A.length;if($[0]=A[e]+r[12],$[1]=A[e+1]+r[13],$[2]=A[e+2]+r[14],E(dt,Z)<0&&E(dt,$)<0||E(gt,Z)<0&&E(gt,$)<0||E(bt,Z)<0&&E(bt,$)<0||E(_t,Z)<0&&E(_t,$)<0)continue;const i=_.projectToRenderScreen(Z,rt),s=_.projectToRenderScreen($,st);if(null==i||null==s)continue;if(i[2]<0&&s[2]>0){o(tt,Z,$);const t=_.frustum,e=-E(t[4],Z)/l(tt,T(t[4]));if(h(tt,tt,e),p(Z,Z,tt),!_.projectToRenderScreen(Z,i))continue}else if(i[2]>0&&s[2]<0){o(tt,$,Z);const t=_.frustum,e=-E(t[4],$)/l(tt,T(t[4]));if(h(tt,tt,e),p($,$,tt),!_.projectToRenderScreen($,s))continue}else if(i[2]<0&&s[2]<0)continue;i[2]=0,s[2]=0;const a=v(P(i,s,ot),x);a<L&&(L=a,m(at,Z),m(nt,$),M=t/3)}if(L<C*C){let t=Number.MAX_VALUE;if(w(P(at,nt,ot),P(S,y,lt),et)){o(et,et,S);const e=c(et);h(et,et,1/e),t=e/u(S,y)}g(t,et,M)}}createBufferWriter(){return new G(B(this.parameters),this.parameters)}createGLMaterial(t){return new q(t)}validateParameters(t){"miter"!==t.join&&(t.miterLimit=0),null!=t.markerParameters&&(t.markerScale=t.markerParameters.width/t.width)}update(t){return!!this.parameters.hasAnimation&&(this.setParameters({timeElapsed:r(t.time)},!1),0!==t.dt)}}class q extends V{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures?.release(this._stipplePattern),this._stipplePattern=null}beginSlot(t){const{stipplePattern:e}=this._material.parameters;return this._stipplePattern!==e&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(e,this._stipplePattern)}),this._stipplePattern=e),this.getTechnique(I,t)}}class X extends k{constructor(){super(...arguments),this._width=0,this.color=b,this.join="miter",this.cap=0,this.miterLimit=5,this.writeDepth=!0,this.polygonOffset=0,this.polygonOffsetIndex=0,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1,this.timeElapsed=s(0),this.animation=0,this.animationSpeed=1,this.trailLength=1,this.startTime=s(0),this.endTime=s(1/0),this.emissiveStrength=0}get width(){return this.isImagePattern()?this.stipplePattern.width:this._width}set width(t){this._width=t}get transparent(){return this.color[3]<1||this.hasAnimation||null!=this.stipplePattern&&(this.stippleOffColor?.[3]??0)<1}get hasAnimation(){return 0!==this.animation}isImagePattern(){return N(this.stipplePattern)&&null!=this.stippleTexture}}class G{constructor(t,e){this.layout=t,this._parameters=e;const i=e.stipplePattern?1:0;switch(this._parameters.join){case"miter":case"bevel":this.numJoinSubdivisions=i;break;case"round":this.numJoinSubdivisions=D+i}}_isClosed(t){return K(this._parameters,t)}allocate(t){return this.layout.createBuffer(t)}elementCount(t){const e=2,i=t.get("position").indices.length/2+1,r=this._isClosed(t);let s=r?2:2*e;return s+=((r?i:i-1)-(r?0:1))*(2*this.numJoinSubdivisions+4),s+=2,this._parameters.wireframe&&(s=2+4*(s-2)),s}write(t,e,i,r,s,a){const o=this.layout,l=i.get("position"),h=l.indices,p=l.data.length/3,c=i.get("distanceToStart")?.data;h&&h.length!==2*(p-1)&&console.warn("RibbonLineMaterial does not support indices");const d=o.fields.has("sizeFeatureAttribute");let b=1,_=null;if(d){const t=i.get("sizeFeatureAttribute");1===t.data.length?b=t.data[0]:_=t.data}else b=i.get("size")?.data[0]??1;let v=[1,1,1,1],P=0,w=null;const y=o.fields.has("colorFeatureAttribute");if(y){const t=i.get("colorFeatureAttribute");1===t.data.length?P=t.data[0]:w=t.data}else v=i.get("color")?.data??v;const j=i.get("timeStamps")?.data,E=j&&o.fields.has("timeStamps"),T=o.fields.has("opacityFeatureAttribute");let z=0,A=null;if(T){const t=i.get("opacityFeatureAttribute");1===t.data.length?z=t.data[0]:A=t.data}const O=new Float32Array(s.buffer),x=S(s.buffer),C=new Uint8Array(s.buffer),L=o.stride/4;let V=a*L;const R=V;let F=0;const N=c?(t,e,i)=>F=c[i]:(t,e,i)=>F+=u(t,e),k=O.BYTES_PER_ELEMENT/x.BYTES_PER_ELEMENT,D=4/k,B=M(),I=(t,e,i,s,a,n,o,l)=>{O[V++]=e[0],O[V++]=e[1],O[V++]=e[2],U(t,e,x,V*k),V+=D,U(i,e,x,V*k),V+=D,O[V++]=l;let h=V*k;if(x[h++]=a,x[h++]=n,V=Math.ceil(h/k),y)O[V]=w?.[o]??P;else{const t=Math.min(4*o,v.length-4),e=4*V;C[e]=255*v[t],C[e+1]=255*v[t+1],C[e+2]=255*v[t+2],C[e+3]=255*v[t+3]}if(V++,O[V++]=_?.[o]??b,T&&(O[V++]=A?.[o]??z),B){let t=4*V;r?(C[t++]=r[0],C[t++]=r[1],C[t++]=r[2],C[t++]=r[3]):(C[t++]=0,C[t++]=0,C[t++]=0,C[t++]=0),V=Math.ceil(.25*t)}E&&(h=V*k,x[h++]=s[0],x[h++]=s[1],x[h++]=s[2],x[h++]=s[3],V=Math.ceil(h/k))};V+=L,n(pt,l.data[0],l.data[1],l.data[2]),E&&g(ct,j[0],j[1],j[2],j[3]),t&&f(pt,pt,t);const W=this._isClosed(i);if(W){const e=l.data.length-3;n(ht,l.data[e],l.data[e+1],l.data[e+2]),t&&f(ht,ht,t)}else n(mt,l.data[3],l.data[4],l.data[5]),t&&f(mt,mt,t),I(pt,pt,mt,ct,1,-4,0,0),I(pt,pt,mt,ct,1,4,0,0),m(ht,pt),m(pt,mt),E&&g(ct,j[4],j[5],j[6],j[7]);const J=W?0:1,Y=W?p:p-1;for(let u=J;u<Y;u++){const e=(u+1)%p*3;n(mt,l.data[e],l.data[e+1],l.data[e+2]),t&&f(mt,mt,t),N(ht,pt,u),I(ht,pt,mt,ct,0,-1,u,F),I(ht,pt,mt,ct,0,1,u,F);const i=this.numJoinSubdivisions;for(let t=0;t<i;++t){const e=(t+1)/(i+1);I(ht,pt,mt,ct,e,-1,u,F),I(ht,pt,mt,ct,e,1,u,F)}if(I(ht,pt,mt,ct,1,-2,u,F),I(ht,pt,mt,ct,1,2,u,F),m(ht,pt),m(pt,mt),E){const t=(u+1)%p*4;g(ct,j[t],j[t+1],j[t+2],j[t+3])}}W?(n(mt,l.data[3],l.data[4],l.data[5]),t&&f(mt,mt,t),F=N(ht,pt,Y),I(ht,pt,mt,ct,0,-1,J,F),I(ht,pt,mt,ct,0,1,J,F)):(F=N(ht,pt,Y),I(ht,pt,pt,ct,0,-5,Y,F),I(ht,pt,pt,ct,0,5,Y,F)),H(O,R+L,O,R,L);return V=H(O,V-L,O,V,L),this._parameters.wireframe&&this._addWireframeVertices(s,R,V,L),null}_addWireframeVertices(t,e,i,r){const s=new Float32Array(t.buffer,i*Float32Array.BYTES_PER_ELEMENT),a=new Float32Array(t.buffer,e*Float32Array.BYTES_PER_ELEMENT,i-e);let n=0;const o=t=>n=H(a,t,s,n,r);for(let l=0;l<a.length-1;l+=2*r)o(l),o(l+2*r),o(l+1*r),o(l+2*r),o(l+1*r),o(l+3*r)}}function H(t,e,i,r,s){for(let a=0;a<s;a++)i[r++]=t[e++];return r}function K(t,e){if(!t.isClosed)return!1;return e.get("position").indices.length>2}function Q(t){return 1===t.anchor&&t.hideOnShortSegments&&"begin-end"===t.placement&&t.worldSpace}const Z=d(),$=d(),tt=d(),et=d(),it=d(),rt=i(),st=i(),at=d(),nt=d(),ot=y(),lt=y(),ht=d(),pt=d(),mt=d(),ct=_(),ut=[i(),i(),i(),i()],ft=[d(),d(),d(),d()],dt=z(),gt=z(),bt=z(),_t=z();export{X as Parameters,Y as RibbonLineMaterial};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as i}from"./TriangleTechniqueConfiguration.js";class o extends i{constructor(e){super(),this.spherical=e,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.writeDepth=!1,this.screenSpaceReflections=!1,this.cloudReflections=!1,this.draped=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.textureCoordinateType=0,this.emissionSource=0,this.pbrMode=3,this.occlusionPass=!1,this.useCustomDTRExponentForWater=!0,this.highStepCount=!0,this.useFillLights=!1,this.overlayEnabled=!1,this.snowCover=!1}get discardInvisibleFragments(){return this.transparent&&this.writeDepth}}e([t()],o.prototype,"receiveShadows",void 0),e([t()],o.prototype,"hasShadowHighlights",void 0),e([t()],o.prototype,"writeDepth",void 0),e([t()],o.prototype,"screenSpaceReflections",void 0),e([t()],o.prototype,"cloudReflections",void 0),e([t()],o.prototype,"draped",void 0),e([t()],o.prototype,"terrainDepthTest",void 0),e([t()],o.prototype,"cullAboveTerrain",void 0);export{o as WaterTechniqueConfiguration};
2
+ import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as i}from"./TriangleTechniqueConfiguration.js";class o extends i{constructor(e){super(),this.spherical=e,this.receiveGlobalIllumination=!1,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.writeDepth=!1,this.screenSpaceReflections=!1,this.cloudReflections=!1,this.draped=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.textureCoordinateType=0,this.emissionSource=0,this.pbrMode=3,this.occlusionPass=!1,this.useCustomDTRExponentForWater=!0,this.highStepCount=!0,this.useFillLights=!1,this.overlayEnabled=!1,this.snowCover=!1}get discardInvisibleFragments(){return this.transparent&&this.writeDepth}}e([t()],o.prototype,"receiveGlobalIllumination",void 0),e([t()],o.prototype,"receiveShadows",void 0),e([t()],o.prototype,"hasShadowHighlights",void 0),e([t()],o.prototype,"writeDepth",void 0),e([t()],o.prototype,"screenSpaceReflections",void 0),e([t()],o.prototype,"cloudReflections",void 0),e([t()],o.prototype,"draped",void 0),e([t()],o.prototype,"terrainDepthTest",void 0),e([t()],o.prototype,"cullAboveTerrain",void 0);export{o as WaterTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import"../../../../../core/has.js";import{property as r,subclass as t}from"../../../../../core/accessorSupport/decorators.js";import{SyncRenderPlugin as s}from"../../effects/RenderPlugin.js";import{MergedBuffer as i}from"./MergedBuffer.js";import{VaoRenderer as a}from"./VaoRenderer.js";let n=class extends s{constructor(e){super(e),this._dataByBaseInstance=new Map,this._buffer=null,this._renderer=null,this.drapedPriority=0}initialize(){this._buffer=new i({material:this.material,dataByBaseInstance:this._dataByBaseInstance,highlightOrderMap:this.highlightOrderMap}),this._renderer=new a({material:this.material,dataByBaseInstance:this._dataByBaseInstance})}destroy(){this._buffer.destroy(),this._renderer.destroy()}hasHighlight(e){return this._renderer.hasHighlight(e)}initializeRenderContext(e){this._buffer.initializeRenderContext(e),this._renderer.initializeRenderContext(e)}uninitializeRenderContext(){this._buffer.uninitializeRenderContext(),this._renderer.uninitializeRenderContext()}get produces(){return this._renderer.produces}get hasOccludees(){return this._buffer.hasOccludees}get hasOnlyOccluders(){return!!(-2&this.renderOccludedFlags)}get hasEmitters(){return this.material.hasEmissions}get isDecoration(){return this.material.parameters.isDecoration}get renderOccludedFlags(){return this.material.renderOccludedFlags}get testsTransparentRenderOrder(){return"test"===process.env.NODE_ENV?this.material.testsTransparentRenderOrder:0}get numGeometries(){let e=0;for(const r of this._dataByBaseInstance.values())for(const t of r.dataByOrigin.values())e+=t.buffers.reduce((e,r)=>e+r.instances.size,0);return e}get usedMemory(){let e=0;for(const r of this._dataByBaseInstance.values())for(const t of r.dataByOrigin.values())e+=t.buffers.reduce((e,r)=>e+r.vao.usedMemory,0);return e}forEachGeometry(e){for(const r of this._dataByBaseInstance.values())for(const t of r.dataByOrigin.values())for(const r of t.buffers)for(const{geometry:t}of r.instances.values())e(t)}modify(e,r){this._buffer.modify(e,r),this._renderer.updateHighlights()}get canCompact(){return this._buffer.canCompact}compact(e){return this._buffer.compact(e)}updateHighlights(e){this.highlightOrderMap=e,this._buffer.updateHighlights(e),this._renderer.updateHighlights()}updateAnimation(e){return this.material.update(e)}acquireTechniques(e){return this._renderer.acquireTechniques(e)}render(e,r){return this._renderer.render(e,r)}static prune(){i.prune()}get test(){}};e([r({constructOnly:!0})],n.prototype,"material",void 0),e([r()],n.prototype,"highlightOrderMap",void 0),n=e([t("esri.views.3d.webgl-engine.materials.renderers.MergedRenderer")],n);export{n as MergedRenderer};
2
+ import{__decorate as e}from"tslib";import"../../../../../core/has.js";import{property as r,subclass as t}from"../../../../../core/accessorSupport/decorators.js";import{SyncRenderPlugin as s}from"../../effects/RenderPlugin.js";import{MergedBuffer as i}from"./MergedBuffer.js";import{VaoRenderer as a}from"./VaoRenderer.js";let n=class extends s{constructor(e){super(e),this._dataByBaseInstance=new Map,this._buffer=null,this._renderer=null,this.drapedPriority=0}initialize(){this._buffer=new i({material:this.material,dataByBaseInstance:this._dataByBaseInstance,highlightOrderMap:this.highlightOrderMap}),this._renderer=new a({material:this.material,dataByBaseInstance:this._dataByBaseInstance})}destroy(){this._buffer.destroy(),this._renderer.destroy()}hasHighlight(e){return this._renderer.hasHighlight(e)}initializeRenderContext(e){this._buffer.initializeRenderContext(e),this._renderer.initializeRenderContext(e)}uninitializeRenderContext(){this._buffer.uninitializeRenderContext(),this._renderer.uninitializeRenderContext()}get produces(){return this._renderer.produces}get hasOccludees(){return this._buffer.hasOccludees}get hasOnlyOccluders(){return!!(-2&this.renderOccludedFlags)}get hasEmissions(){return this.material.hasEmissions}get isDecoration(){return this.material.parameters.isDecoration}get renderOccludedFlags(){return this.material.renderOccludedFlags}get testsTransparentRenderOrder(){return"test"===process.env.NODE_ENV?this.material.testsTransparentRenderOrder:0}get numGeometries(){let e=0;for(const r of this._dataByBaseInstance.values())for(const t of r.dataByOrigin.values())e+=t.buffers.reduce((e,r)=>e+r.instances.size,0);return e}get usedMemory(){let e=0;for(const r of this._dataByBaseInstance.values())for(const t of r.dataByOrigin.values())e+=t.buffers.reduce((e,r)=>e+r.vao.usedMemory,0);return e}forEachGeometry(e){for(const r of this._dataByBaseInstance.values())for(const t of r.dataByOrigin.values())for(const r of t.buffers)for(const{geometry:t}of r.instances.values())e(t)}modify(e,r){this._buffer.modify(e,r),this._renderer.updateHighlights()}get canCompact(){return this._buffer.canCompact}compact(e){return this._buffer.compact(e)}updateHighlights(e){this.highlightOrderMap=e,this._buffer.updateHighlights(e),this._renderer.updateHighlights()}updateAnimation(e){return this.material.update(e)}acquireTechniques(e){return this._renderer.acquireTechniques(e)}render(e,r){return this._renderer.render(e,r)}static prune(){i.prune()}get test(){}};e([r({constructOnly:!0})],n.prototype,"material",void 0),e([r()],n.prototype,"highlightOrderMap",void 0),n=e([t("esri.views.3d.webgl-engine.materials.renderers.MergedRenderer")],n);export{n as MergedRenderer};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{toConst as r}from"../../../../core/compilerUtils.js";import{unpackFloatRGBA as s}from"../../../../core/floatRGBA.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{removeMaybe as n,destroyMaybe as o}from"../../../../core/maybe.js";import{when as a,initial as h,watch as d,syncAndInitial as c}from"../../../../core/reactiveUtils.js";import{addFrameTask as l}from"../../../../core/scheduling.js";import{Milliseconds as p}from"../../../../core/time.js";import{property as m,subclass as u}from"../../../../core/accessorSupport/decorators.js";import{isMoon as f,isMars as g}from"../../../../geometry/ellipsoidUtils.js";import{ComponentObjectCollection as w}from"../collections/Component/ComponentObjectCollection.js";import{ShaderTechniqueConstructionContext as _}from"../core/shaderTechnique/ShaderTechniqueConstructionContext.js";import{ShaderTechniqueRepository as x}from"../core/shaderTechnique/ShaderTechniqueRepository.js";import{ChapmanAtmosphere as v}from"../effects/atmosphere/ChapmanAtmosphere.js";import{LocalAtmosphere as j}from"../effects/atmosphere/LocalAtmosphere.js";import{MarsAtmosphere as y}from"../effects/atmosphere/MarsAtmosphere.js";import{CloudsComposition as R}from"../effects/clouds/CloudsComposition.js";import{Fog as b}from"../effects/fog/Fog.js";import{ObjectAndLayerIDRenderNode as A}from"../effects/geometry/ObjectAndLayerIDRenderNode.js";import{olidEnabled as S}from"../effects/geometry/olidUtils.js";import{RenderOccludedRenderNode as C}from"../effects/geometry/RenderOccludedRenderNode.js";import{GlowRenderNode as O}from"../effects/glow/GlowRenderNode.js";import{Haze as T}from"../effects/haze/Haze.js";import{Highlight as U}from"../effects/highlight/Highlight.js";import{ScreenSpaceShadowHighlightRenderNode as q}from"../effects/highlight/ScreenSpaceShadowHighlightRenderNode.js";import{ShadowHighlight as M}from"../effects/highlight/ShadowHighlight.js";import{Magnifier as L}from"../effects/magnifier/Magnifier.js";import{SMAA as D}from"../effects/smaa/SMAA.js";import{SSAO as k}from"../effects/ssao/SSAO.js";import{Stars as F}from"../effects/stars/Stars.js";import{GLMaterialRepository as W}from"../lib/GLMaterialRepository.js";import{ObjectAndLayerIdRenderHelper as B}from"../lib/ObjectAndLayerIdRenderHelper.js";import{Renderer as E}from"../lib/Renderer.js";import{RenderingContext as H}from"../lib/RenderingContext.js";import{RenderingContextOptions as N}from"../lib/RenderingContextOptions.js";import{TextureRepository as G}from"../lib/TextureRepository.js";import{createMarkerTextureRepository as P}from"../materials/markerTextureRepository.js";import{createStippleTextureRepository as z}from"../materials/stippleTextureRepository.js";import{WaterTextureRepository as I}from"../materials/internal/WaterTextureRepository.js";import{getContextCache as V}from"./contextCache.js";import{removeLoadedShaderModules as X}from"./renderUtils.js";import{ScreenshotManager as Q,ScreenshotContext as J}from"./ScreenshotManager.js";import{contextCache as K}from"./testUtils.js";import{noBudget as Y}from"../../../support/Scheduler.js";import{checkWebGLError as Z}from"../../../webgl/checkWebGLError.js";let $=class extends t{constructor(e,t){super(e),this.olidRenderHelper=S()?new B:null,this.waterTextures=new I,this._needsUpdate=!0,this._needsRender=!0,this._idleSuspend=!0,this._needsWaterReflectionUpdate=!1,this._lastAnimationUpdate=0,this.glow=null,this.fog=null,this.test=null,this._initializeContext(t);const{memoryController:r}=t.view.resourceController;this.stippleTextures=z(this._rctx,r),this.markerTextures=P(this._rctx,r),this.techniques=new x(new _(this._rctx,this.stippleTextures,this.waterTextures,this.markerTextures)),this.textures=new G(t),this.addHandles(this.textures.events.on("changed",e=>this.requestRender(e)));const s=new W(this.textures,this.techniques,()=>this.requestRender(),()=>this.requestRender());this.renderer=new E(t,s,this.techniques,this._rctx,e=>this.requestRender(e)),this.addHandles([a(()=>t.view.ready,()=>this._createRenderNodes(),h),d(()=>this.waterTextures.updating,()=>this.requestRender(),h),d(()=>t.view.qualityProfile,e=>this.renderer?.updateRenderFeatures(e),c)]);const i={renderScene:(e,t,r,s)=>this.renderer.render(e,t,r,s),requestRenderScene:e=>this.requestRender(e),prepareOverlay:()=>t.options.screenshot.prepareOverlay(),renderOverlay:(e,r,s)=>t.options.screenshot.renderOverlay(e,r,s)};this._screenshotManager=new Q(this._rctx,i,e=>t.view.overlayManager.updateOverlays(Y,e.camera,0)),this._registerFrameTask(t)}destroy(){const e=this.stage?.container;e?.contains(this._canvas)&&e.removeChild(this._canvas),this._frameTask=n(this._frameTask),this.techniques.destroy(),this._componentObjectCollection=o(this._componentObjectCollection),this._screenshotManager.destroy(),this.renderer.destroy(),this.textures.destroy(),this.waterTextures.destroy(),this.markerTextures.destroy(),this.stippleTextures.destroy(),this._canvas=null,this._rctx=o(this._rctx),this.test?.destroy()}_createRenderNodes(){const{view:e,viewingMode:t}=this.stage;new F({view:e}),f(e.spatialReference)||(this.glow=new O({view:e}),2===t?new j({view:e}):g(e.spatialReference)?new y({view:e}):(new v({view:e}),new R({view:e}),new T({view:e}),this.fog=new b({view:e}))),new k({view:e,isEnabled:()=>this.renderer.hasSSAO}),new D({view:e,isEnabled:()=>this.renderer.hasSMAA}),new L({view:e}),new U({view:e}),new q({view:e}),new M({view:e,viewingMode:t}),new C({view:e}),S()&&new A({view:e})}requestRender(e=1){switch(e){case 2:this.view.state.fading=!0;case 1:this._needsUpdate=!0;case 0:this._needsRender=!0}}get updating(){return this._needsUpdate||this._needsWaterReflectionUpdate||this.renderer.updating||this.textures.updating||this.waterTextures.updating}setIdleSuspend(e){this._idleSuspend!==e&&(this._idleSuspend=e,this.requestRender())}get renderingContext(){return this._rctx}get capabilities(){return this._rctx.capabilities}get canvas(){return this._canvas}takeScreenshot(e){return this._screenshotManager.takeScreenshot(r(e))}getAlpha(){return!!this._rctx.contextAttributes.alpha}getMinimalDepthForArea(e,t,r,i,n,o=n){const a=i.constrainWindowSize(t,r,n*i.pixelRatio,o*i.pixelRatio),h=this._ensureLinearDepthArrayBuffer(a);this.renderer.readMainDepth(a,h);const d=(e,t,r)=>s(t,e)*(r[1]-r[0])+r[0];let c=Number.MAX_VALUE;for(let s=0;s<a[2]*a[3];s++){const e=d(4*s,h,i.nearFar);c>e&&e!==i.nearFar[0]&&e!==i.nearFar[1]&&(c=e)}if(e){const s=e.pickDepth(t*i.pixelRatio,r*i.pixelRatio,i);null!=s&&c>s&&s!==i.nearFar[0]&&s!==i.nearFar[1]&&(c=s)}return c===Number.MAX_VALUE?void 0:c}_ensureLinearDepthArrayBuffer(e){const t=4*e[2]*e[3];return(null==this._tmpDepthBuffer||this._tmpDepthBuffer.byteLength<t)&&(this._tmpDepthBuffer=new Uint8Array(t)),this._tmpDepthBuffer}async reloadShaders(){X(),await this.techniques.reloadAll(),this.renderer.overlay?.reloadShaders(),this.requestRender()}_registerFrameTask(e){const t=e.view.state;let r=!1,s=0,i=!1;const n={preRender:({time:i})=>{r=this.updating,s=this._needsUpdate?1:0,this._needsRender&&this.renderer.updateSceneDepthRange(t.camera),e.commitSyncLayers(),i=this.test?.time??i;const n=p(i-this._lastAnimationUpdate);this.view.state.animationsEnabled&&(n>this.renderer.animationTimestep||r||this._needsRender)&&(this.renderer.updateAnimation(t,i)&&this.requestRender(0),this._lastAnimationUpdate=i)},render:({time:e})=>{if((this._needsRender||!this._idleSuspend||!this.renderer.isCameraFinal||this._needsWaterReflectionUpdate)&&t.camera.fullWidth>0&&t.camera.fullHeight>0){const r=this._needsUpdate&&this._idleSuspend&&this.renderer.isCameraFinal;this._needsRender=!1,this._needsUpdate=!1,this._needsWaterReflectionUpdate=!1,e=this.test?.time??e,this.renderer.render(t,e,0),i=!0,r&&this.renderer.hasReflections&&(this.requestRender(0),this._needsWaterReflectionUpdate=!0)}},update:({time:e})=>{this.view.state.animationsEnabled&&this.textures.update();const r=new J(t,this.renderer.fboCache);e=this.test?.time??e,this._screenshotManager.update(r,e)},finish:()=>{i&&(this.renderer.finish(2===t.mode?s:1),i=!1)}};this._frameTask=l(n)}_initializeContext(e){const{options:t}=e,r=t.canvas??document.createElement("canvas");r.setAttribute("style","width: 100%; height:100%; display:block;"),this._canvas=r;const s={alpha:t.alpha||!1,premultipliedAlpha:!0,antialias:!1,depth:!0,stencil:t.stencil??!0,powerPreference:"high-performance",preserveDrawingBuffer:t.preserveDrawingBuffer??!1},n=r.getContext("webgl2",s);if(null==n)return void i.getLogger(this).error("A WebGL2 context could not be created.");Z(n,!0),this._rctx=ee(n,e),this._loadShaderOnlyExtensions(),!t.alpha&&this._rctx.contextAttributes.alpha&&i.getLogger(this).error("WebGL context has alpha channel even though no alpha channel was requested");const{container:o}=e;!this._rctx.contextAttributes.alpha&&has("safari")>=11&&(o.style.backgroundColor="black"),o.contains(r)||o.appendChild(r)}_loadShaderOnlyExtensions(){this._rctx.capabilities.enable("textureFloatLinear")}get _viewingMode(){return this.stage.viewingMode}get stage(){return this.view.stage}getObjectAndLayerIdColor(e){return this.olidRenderHelper?.getObjectAndLayerIdColor(e)}get componentObjectCollection(){return this._componentObjectCollection??=new w(this.renderer.renderPassManager,this._viewingMode,this.view.spatialReference.isWebMercator),this._componentObjectCollection}updateQualitySettings(e){null!=this.test?.time&&null!=e.fadeDuration&&(this.test.savedFadeDuration=e.fadeDuration,e.fadeDuration=p(0)),this._rctx.updateOptions({maxPreferredTexturePixels:this.view.qualitySettings.maxTexturePixels})}};function ee(e,t){const r=new N(t);if(K.enabled){let t=te.get(e);return 1===t?.refCount?(t.configure(r),t.ref(),t):(t=new H(e,r),te.set(e,t),t.ref(),t)}return new H(e,r)}e([m({type:Boolean,readOnly:!0})],$.prototype,"updating",null),e([m({constructOnly:!0})],$.prototype,"view",void 0),e([m({readOnly:!0})],$.prototype,"componentObjectCollection",null),e([m()],$.prototype,"_componentObjectCollection",void 0),e([m()],$.prototype,"_needsUpdate",void 0),e([m()],$.prototype,"_needsWaterReflectionUpdate",void 0),$=e([u("esri.views.3d.webgl-engine.parts.RenderView")],$);const te=V();export{$ as RenderView};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{toConst as r}from"../../../../core/compilerUtils.js";import{unpackFloatRGBA as s}from"../../../../core/floatRGBA.js";import has from"../../../../core/has.js";import i from"../../../../core/Logger.js";import{removeMaybe as n,destroyMaybe as o}from"../../../../core/maybe.js";import{when as a,initial as h,watch as d,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{addFrameTask as c}from"../../../../core/scheduling.js";import{Milliseconds as p}from"../../../../core/time.js";import{property as m,subclass as u}from"../../../../core/accessorSupport/decorators.js";import{isMoon as f,isMars as g}from"../../../../geometry/ellipsoidUtils.js";import{ComponentObjectCollection as w}from"../collections/Component/ComponentObjectCollection.js";import{ShaderTechniqueConstructionContext as _}from"../core/shaderTechnique/ShaderTechniqueConstructionContext.js";import{ShaderTechniqueRepository as v}from"../core/shaderTechnique/ShaderTechniqueRepository.js";import{ChapmanAtmosphere as x}from"../effects/atmosphere/ChapmanAtmosphere.js";import{LocalAtmosphere as j}from"../effects/atmosphere/LocalAtmosphere.js";import{MarsAtmosphere as y}from"../effects/atmosphere/MarsAtmosphere.js";import{CloudsComposition as R}from"../effects/clouds/CloudsComposition.js";import{Fog as b}from"../effects/fog/Fog.js";import{ObjectAndLayerIDRenderNode as A}from"../effects/geometry/ObjectAndLayerIDRenderNode.js";import{olidEnabled as C}from"../effects/geometry/olidUtils.js";import{RenderOccludedRenderNode as S}from"../effects/geometry/RenderOccludedRenderNode.js";import{GlobalIllumination as T}from"../effects/globalIllumination/GlobalIllumination.js";import{GlowRenderNode as O}from"../effects/glow/GlowRenderNode.js";import{Haze as U}from"../effects/haze/Haze.js";import{Highlight as q}from"../effects/highlight/Highlight.js";import{ScreenSpaceShadowHighlightRenderNode as M}from"../effects/highlight/ScreenSpaceShadowHighlightRenderNode.js";import{ShadowHighlight as L}from"../effects/highlight/ShadowHighlight.js";import{Magnifier as D}from"../effects/magnifier/Magnifier.js";import{SMAA as k}from"../effects/smaa/SMAA.js";import{SSAO as F}from"../effects/ssao/SSAO.js";import{Stars as W}from"../effects/stars/Stars.js";import{GLMaterialRepository as B}from"../lib/GLMaterialRepository.js";import{ObjectAndLayerIdRenderHelper as H}from"../lib/ObjectAndLayerIdRenderHelper.js";import{Renderer as E}from"../lib/Renderer.js";import{RenderingContext as I}from"../lib/RenderingContext.js";import{RenderingContextOptions as N}from"../lib/RenderingContextOptions.js";import{TextureRepository as G}from"../lib/TextureRepository.js";import{createMarkerTextureRepository as P}from"../materials/markerTextureRepository.js";import{createStippleTextureRepository as z}from"../materials/stippleTextureRepository.js";import{WaterTextureRepository as V}from"../materials/internal/WaterTextureRepository.js";import{getContextCache as X}from"./contextCache.js";import{removeLoadedShaderModules as Q}from"./renderUtils.js";import{ScreenshotManager as J,ScreenshotContext as K}from"./ScreenshotManager.js";import{contextCache as Y}from"./testUtils.js";import{noBudget as Z}from"../../../support/Scheduler.js";import{checkWebGLError as $}from"../../../webgl/checkWebGLError.js";let ee=class extends t{constructor(e,t){super(e),this.olidRenderHelper=C()?new H:null,this.waterTextures=new V,this._needsUpdate=!0,this._needsRender=!0,this._idleSuspend=!0,this._needsWaterReflectionUpdate=!1,this._lastAnimationUpdate=0,this.glow=null,this.fog=null,this.test=null,this._initializeContext(t);const{memoryController:r}=t.view.resourceController;this.stippleTextures=z(this._rctx,r),this.markerTextures=P(this._rctx,r),this.techniques=new v(new _(this._rctx,this.stippleTextures,this.waterTextures,this.markerTextures)),this.textures=new G(t),this.addHandles(this.textures.events.on("changed",e=>this.requestRender(e)));const s=new B(this.textures,this.techniques,()=>this.requestRender(),()=>this.requestRender());this.renderer=new E(t,s,this.techniques,this._rctx,e=>this.requestRender(e)),this.addHandles([a(()=>t.view.ready,()=>this._createRenderNodes(),h),d(()=>this.waterTextures.updating,()=>this.requestRender(),h),d(()=>t.view.qualityProfile,e=>this.renderer?.updateRenderFeatures(e),l)]);const i={renderScene:(e,t,r,s)=>this.renderer.render(e,t,r,s),requestRenderScene:e=>this.requestRender(e),prepareOverlay:()=>t.options.screenshot.prepareOverlay(),renderOverlay:(e,r,s)=>t.options.screenshot.renderOverlay(e,r,s)};this._screenshotManager=new J(this._rctx,i,e=>t.view.overlayManager.updateOverlays(Z,e.camera,0)),this._registerFrameTask(t)}destroy(){const e=this.stage?.container;e?.contains(this._canvas)&&e.removeChild(this._canvas),this._frameTask=n(this._frameTask),this.techniques.destroy(),this._componentObjectCollection=o(this._componentObjectCollection),this._screenshotManager.destroy(),this.renderer.destroy(),this.textures.destroy(),this.waterTextures.destroy(),this.markerTextures.destroy(),this.stippleTextures.destroy(),this._canvas=null,this._rctx=o(this._rctx),this.test?.destroy()}_createRenderNodes(){const{view:e,viewingMode:t}=this.stage;if(new W({view:e}),f(e.spatialReference)||(this.glow=new O({view:e}),2===t?new j({view:e}):g(e.spatialReference)?new y({view:e}):(new x({view:e}),new R({view:e}),new U({view:e}),this.fog=new b({view:e}))),has("global-illumination")){const t=new T({view:e});this.test&&(this.test.globalIllumination=t)}else new F({view:e});new k({view:e,isEnabled:()=>this.renderer.hasSMAA}),new D({view:e}),new q({view:e}),new M({view:e}),new L({view:e,viewingMode:t}),new S({view:e}),C()&&new A({view:e})}requestRender(e=1){switch(e){case 2:this.view.state.fading=!0;case 1:this._needsUpdate=!0;case 0:this._needsRender=!0}}get updating(){return this._needsUpdate||this._needsWaterReflectionUpdate||this.renderer.updating||this.textures.updating||this.waterTextures.updating}setIdleSuspend(e){this._idleSuspend!==e&&(this._idleSuspend=e,this.requestRender())}get renderingContext(){return this._rctx}get capabilities(){return this._rctx.capabilities}get canvas(){return this._canvas}takeScreenshot(e){return this._screenshotManager.takeScreenshot(r(e))}getAlpha(){return!!this._rctx.contextAttributes.alpha}getMinimalDepthForArea(e,t,r,i,n,o=n){const a=i.constrainWindowSize(t,r,n*i.pixelRatio,o*i.pixelRatio),h=this._ensureLinearDepthArrayBuffer(a);this.renderer.readMainDepth(a,h);const d=(e,t,r)=>s(t,e)*(r[1]-r[0])+r[0];let l=Number.MAX_VALUE;for(let s=0;s<a[2]*a[3];s++){const e=d(4*s,h,i.nearFar);l>e&&e!==i.nearFar[0]&&e!==i.nearFar[1]&&(l=e)}if(e){const s=e.pickDepth(t*i.pixelRatio,r*i.pixelRatio,i);null!=s&&l>s&&s!==i.nearFar[0]&&s!==i.nearFar[1]&&(l=s)}return l===Number.MAX_VALUE?void 0:l}_ensureLinearDepthArrayBuffer(e){const t=4*e[2]*e[3];return(null==this._tmpDepthBuffer||this._tmpDepthBuffer.byteLength<t)&&(this._tmpDepthBuffer=new Uint8Array(t)),this._tmpDepthBuffer}async reloadShaders(){Q(),await this.techniques.reloadAll(),this.renderer.overlay?.reloadShaders(),this.requestRender()}_registerFrameTask(e){const t=e.view.state;let r=!1,s=0,i=!1;const n={preRender:({time:i})=>{r=this.updating,s=this._needsUpdate?1:0,this._needsRender&&this.renderer.updateSceneDepthRange(t.camera),e.commitSyncLayers(),i=this.test?.time??i;const n=p(i-this._lastAnimationUpdate);this.view.state.animationsEnabled&&(n>this.renderer.animationTimestep||r||this._needsRender)&&(this.renderer.updateAnimation(t,i)&&this.requestRender(0),this._lastAnimationUpdate=i)},render:({time:e})=>{if((this._needsRender||!this._idleSuspend||!this.renderer.isCameraFinal||this._needsWaterReflectionUpdate)&&t.camera.fullWidth>0&&t.camera.fullHeight>0){const r=this._needsUpdate&&this._idleSuspend&&this.renderer.isCameraFinal;this._needsRender=!1,this._needsUpdate=!1,this._needsWaterReflectionUpdate=!1,e=this.test?.time??e,this.renderer.render(t,e,0),i=!0,r&&this.renderer.hasReflections&&(this.requestRender(0),this._needsWaterReflectionUpdate=!0)}},update:({time:e})=>{this.view.state.animationsEnabled&&this.textures.update();const r=new K(t,this.renderer.fboCache);e=this.test?.time??e,this._screenshotManager.update(r,e)},finish:()=>{i&&(this.renderer.finish(2===t.mode?s:1),i=!1)}};this._frameTask=c(n)}_initializeContext(e){const{options:t}=e,r=t.canvas??document.createElement("canvas");r.setAttribute("style","width: 100%; height:100%; display:block;"),this._canvas=r;const s={alpha:t.alpha||!1,premultipliedAlpha:!0,antialias:!1,depth:!0,stencil:t.stencil??!0,powerPreference:"high-performance",preserveDrawingBuffer:t.preserveDrawingBuffer??!1},n=r.getContext("webgl2",s);if(null==n)return void i.getLogger(this).error("A WebGL2 context could not be created.");$(n,!0),this._rctx=te(n,e),this._loadShaderOnlyExtensions(),!t.alpha&&this._rctx.contextAttributes.alpha&&i.getLogger(this).error("WebGL context has alpha channel even though no alpha channel was requested");const{container:o}=e;!this._rctx.contextAttributes.alpha&&has("safari")>=11&&(o.style.backgroundColor="black"),o.contains(r)||o.appendChild(r)}_loadShaderOnlyExtensions(){this._rctx.capabilities.enable("textureFloatLinear")}get _viewingMode(){return this.stage.viewingMode}get stage(){return this.view.stage}getObjectAndLayerIdColor(e){return this.olidRenderHelper?.getObjectAndLayerIdColor(e)}get componentObjectCollection(){return this._componentObjectCollection??=new w(this.renderer.renderPassManager,this._viewingMode,this.view.spatialReference.isWebMercator),this._componentObjectCollection}updateQualitySettings(e){null!=this.test?.time&&null!=e.fadeDuration&&(this.test.savedFadeDuration=e.fadeDuration,e.fadeDuration=p(0)),this._rctx.updateOptions({maxPreferredTexturePixels:this.view.qualitySettings.maxTexturePixels})}};function te(e,t){const r=new N(t);if(Y.enabled){let t=re.get(e);return 1===t?.refCount?(t.configure(r),t.ref(),t):(t=new I(e,r),re.set(e,t),t.ref(),t)}return new I(e,r)}e([m({type:Boolean,readOnly:!0})],ee.prototype,"updating",null),e([m({constructOnly:!0})],ee.prototype,"view",void 0),e([m({readOnly:!0})],ee.prototype,"componentObjectCollection",null),e([m()],ee.prototype,"_componentObjectCollection",void 0),e([m()],ee.prototype,"_needsUpdate",void 0),e([m()],ee.prototype,"_needsWaterReflectionUpdate",void 0),ee=e([u("esri.views.3d.webgl-engine.parts.RenderView")],ee);const re=X();export{ee as RenderView};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as o}from"../materials/TriangleTechniqueConfiguration.js";class s extends o{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1}get textureCoordinateType(){return this.hasTextures?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}e([t({count:4})],s.prototype,"alphaDiscardMode",void 0),e([t({count:3})],s.prototype,"doubleSidedMode",void 0),e([t({count:7})],s.prototype,"pbrMode",void 0),e([t({count:3})],s.prototype,"cullFace",void 0),e([t({count:3})],s.prototype,"normalType",void 0),e([t({count:3})],s.prototype,"customDepthTest",void 0),e([t({count:8})],s.prototype,"emissionSource",void 0),e([t()],s.prototype,"hasVertexColors",void 0),e([t()],s.prototype,"hasSymbolColors",void 0),e([t()],s.prototype,"hasVerticalOffset",void 0),e([t()],s.prototype,"hasColorTexture",void 0),e([t()],s.prototype,"hasMetallicRoughnessTexture",void 0),e([t()],s.prototype,"hasOcclusionTexture",void 0),e([t()],s.prototype,"hasNormalTexture",void 0),e([t()],s.prototype,"hasScreenSizePerspective",void 0),e([t()],s.prototype,"hasVertexTangents",void 0),e([t()],s.prototype,"hasOccludees",void 0),e([t()],s.prototype,"instanced",void 0),e([t()],s.prototype,"instancedDoublePrecision",void 0),e([t()],s.prototype,"hasModelTransformation",void 0),e([t()],s.prototype,"offsetBackfaces",void 0),e([t()],s.prototype,"hasVVSize",void 0),e([t()],s.prototype,"hasVVColor",void 0),e([t()],s.prototype,"receiveShadows",void 0),e([t()],s.prototype,"hasShadowHighlights",void 0),e([t()],s.prototype,"receiveAmbientOcclusion",void 0),e([t()],s.prototype,"textureAlphaPremultiplied",void 0),e([t()],s.prototype,"instancedFeatureAttribute",void 0),e([t()],s.prototype,"instancedColor",void 0),e([t()],s.prototype,"writeDepth",void 0),e([t()],s.prototype,"terrainDepthTest",void 0),e([t()],s.prototype,"cullAboveTerrain",void 0),e([t()],s.prototype,"snowCover",void 0),e([t()],s.prototype,"hasColorTextureTransform",void 0),e([t()],s.prototype,"hasEmissionTextureTransform",void 0),e([t()],s.prototype,"hasNormalTextureTransform",void 0),e([t()],s.prototype,"hasOcclusionTextureTransform",void 0),e([t()],s.prototype,"hasMetallicRoughnessTextureTransform",void 0);export{s as DefaultMaterialTechniqueConfiguration};
2
+ import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as o}from"../materials/TriangleTechniqueConfiguration.js";class s extends o{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1}get textureCoordinateType(){return this.hasTextures?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}e([t({count:4})],s.prototype,"alphaDiscardMode",void 0),e([t({count:3})],s.prototype,"doubleSidedMode",void 0),e([t({count:7})],s.prototype,"pbrMode",void 0),e([t({count:3})],s.prototype,"cullFace",void 0),e([t({count:3})],s.prototype,"normalType",void 0),e([t({count:3})],s.prototype,"customDepthTest",void 0),e([t({count:8})],s.prototype,"emissionSource",void 0),e([t()],s.prototype,"hasVertexColors",void 0),e([t()],s.prototype,"hasSymbolColors",void 0),e([t()],s.prototype,"hasVerticalOffset",void 0),e([t()],s.prototype,"hasColorTexture",void 0),e([t()],s.prototype,"hasMetallicRoughnessTexture",void 0),e([t()],s.prototype,"hasOcclusionTexture",void 0),e([t()],s.prototype,"hasNormalTexture",void 0),e([t()],s.prototype,"hasScreenSizePerspective",void 0),e([t()],s.prototype,"hasVertexTangents",void 0),e([t()],s.prototype,"hasOccludees",void 0),e([t()],s.prototype,"instanced",void 0),e([t()],s.prototype,"instancedDoublePrecision",void 0),e([t()],s.prototype,"hasModelTransformation",void 0),e([t()],s.prototype,"offsetBackfaces",void 0),e([t()],s.prototype,"hasVVSize",void 0),e([t()],s.prototype,"hasVVColor",void 0),e([t()],s.prototype,"receiveShadows",void 0),e([t()],s.prototype,"hasShadowHighlights",void 0),e([t()],s.prototype,"receiveAmbientOcclusion",void 0),e([t()],s.prototype,"receiveGlobalIllumination",void 0),e([t()],s.prototype,"textureAlphaPremultiplied",void 0),e([t()],s.prototype,"instancedFeatureAttribute",void 0),e([t()],s.prototype,"instancedColor",void 0),e([t()],s.prototype,"writeDepth",void 0),e([t()],s.prototype,"terrainDepthTest",void 0),e([t()],s.prototype,"cullAboveTerrain",void 0),e([t()],s.prototype,"snowCover",void 0),e([t()],s.prototype,"hasColorTextureTransform",void 0),e([t()],s.prototype,"hasEmissionTextureTransform",void 0),e([t()],s.prototype,"hasNormalTextureTransform",void 0),e([t()],s.prototype,"hasOcclusionTextureTransform",void 0),e([t()],s.prototype,"hasMetallicRoughnessTextureTransform",void 0);export{s as DefaultMaterialTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{SliceConfiguration as t}from"../core/shaderLibrary/Slice.glsl.js";import{parameter as i}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";class r extends t{constructor(e){super(),this.spherical=e,this.alphaCutoff=1,this.fadingEnabled=!1,this.clippingEnabled=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.receiveAmbientOcclusion=!1,this.pbrMode=0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!1,this.hasColorTexture=!0}}function o(e){switch(e){case 2:return.005;case 0:return.05;default:return.01}}e([i({count:3})],r.prototype,"alphaCutoff",void 0),e([i()],r.prototype,"fadingEnabled",void 0),e([i()],r.prototype,"clippingEnabled",void 0),e([i()],r.prototype,"terrainDepthTest",void 0),e([i()],r.prototype,"cullAboveTerrain",void 0),e([i()],r.prototype,"receiveAmbientOcclusion",void 0);export{r as GaussianSplatTechniqueConfiguration,o as getGaussianSplatAlphaCutoffValue};
2
+ import{__decorate as e}from"tslib";import{SliceConfiguration as t}from"../core/shaderLibrary/Slice.glsl.js";import{parameter as i}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";class o extends t{constructor(e){super(),this.spherical=e,this.alphaCutoff=1,this.fadingEnabled=!1,this.clippingEnabled=!1,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.pbrMode=0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!1,this.hasColorTexture=!0}}function r(e){switch(e){case 2:return.005;case 0:return.05;default:return.01}}e([i({count:3})],o.prototype,"alphaCutoff",void 0),e([i()],o.prototype,"fadingEnabled",void 0),e([i()],o.prototype,"clippingEnabled",void 0),e([i()],o.prototype,"terrainDepthTest",void 0),e([i()],o.prototype,"cullAboveTerrain",void 0),e([i()],o.prototype,"receiveAmbientOcclusion",void 0),e([i()],o.prototype,"receiveGlobalIllumination",void 0);export{o as GaussianSplatTechniqueConfiguration,r as getGaussianSplatAlphaCutoffValue};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import"../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../core/shaderLibrary/output/ReadDepthLastFrame.glsl.js";import"../core/shaderLibrary/shading/EncodingColor.glsl.js";import"../core/shaderLibrary/shading/MainLighting.glsl.js";import"../core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js";import"../core/shaderLibrary/util/CameraSpace.glsl.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Matrix4BindUniform.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{G as GlobalIlluminationPassParameters,b as build}from"../../../../chunks/GlobalIllumination.glsl.js";
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import"../core/shaderLibrary/ScreenSpacePass.glsl.js";import"../core/shaderLibrary/output/ReadDepth.glsl.js";import"../core/shaderLibrary/shading/EncodingColor.glsl.js";import"../core/shaderLibrary/util/CameraSpace.glsl.js";import"../core/shaderModules/Float2DrawUniform.js";import"../core/shaderModules/FloatPassUniform.js";import"../core/shaderModules/glsl.js";import"../core/shaderModules/Texture2DDrawUniform.js";import"../core/shaderModules/Texture2DPassUniform.js";import"../../../webgl/NoParameters.js";import"../../../webgl/ShaderBuilder.js";export{G as GlobalIlluminationBlurDrawParameters,b as build}from"../../../../chunks/GlobalIlluminationBlur.glsl.js";
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{glLayout as t}from"../../support/buffer/glUtil.js";import{newLayout as o}from"../../support/buffer/InterleavedLayout.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as n}from"../core/shaderTechnique/ShaderTechnique.js";import{blending as i}from"../lib/OrderIndependentTransparency.js";import{M as p}from"../../../../chunks/MeasurementArrow.glsl.js";import{PrimitiveType as l}from"../../../webgl/enums.js";import{makePipelineState as m,defaultColorWrite as a,defaultDepthWrite as u}from"../../../webgl/renderState.js";let f=class extends n{constructor(e,r){super(e,r,t(c)),this.shader=new s(p,()=>import("./MeasurementArrow.glsl.js")),this.primitiveType=l.TRIANGLE_STRIP}initializePipeline(e){const{output:r,transparent:t,polygonOffsetEnabled:o}=e;return m({blending:t?i(r):null,polygonOffset:o?{factor:0,units:-4}:null,depthTest:{func:513},depthWrite:u,colorWrite:a})}};f=e([r("esri.views.3d.webgl-engine.shaders.MeasurementArrowTechnique")],f);const c=o().vec3f("position").vec3f("normal").vec2f("uv0").f32("length");export{f as MeasurementArrowTechnique,c as layout};
2
+ import{__decorate as e}from"tslib";import{subclass as r}from"../../../../core/accessorSupport/decorators.js";import{glLayout as o}from"../../support/buffer/glUtil.js";import{newLayout as t}from"../../support/buffer/InterleavedLayout.js";import{ReloadableShader as s}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as i}from"../core/shaderTechnique/ShaderTechnique.js";import{blending as n}from"../lib/OrderIndependentTransparency.js";import{polygonOffset as p}from"../materials/PolygonOffset.js";import{M as m}from"../../../../chunks/MeasurementArrow.glsl.js";import{PrimitiveType as l}from"../../../webgl/enums.js";import{makePipelineState as a,defaultColorWrite as f,defaultDepthWrite as u}from"../../../webgl/renderState.js";let c=class extends i{constructor(e,r){super(e,r,o(d)),this.shader=new s(m,()=>import("./MeasurementArrow.glsl.js")),this.primitiveType=l.TRIANGLE_STRIP}initializePipeline(e){const{output:r,transparent:o}=e;return a({blending:o?n(r):null,polygonOffset:p(e),depthTest:{func:513},depthWrite:u,colorWrite:f})}};c=e([r("esri.views.3d.webgl-engine.shaders.MeasurementArrowTechnique")],c);const d=t().vec3f("position").vec3f("normal").vec2f("uv0").f32("length");export{c as MeasurementArrowTechnique,d as layout};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as o}from"../materials/DefaultTechniqueConfiguration.js";class r extends o{constructor(){super(...arguments),this.polygonOffsetEnabled=!1,this.transparent=!1,this.discardInvisibleFragments=!0,this.draped=!1,this.emissionSource=0,this.snowCover=!1,this.textureCoordinateType=0}}e([t()],r.prototype,"polygonOffsetEnabled",void 0),e([t()],r.prototype,"transparent",void 0);export{r as MeasurementArrowTechniqueConfiguration};
2
+ import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as r}from"../materials/DefaultTechniqueConfiguration.js";class s extends r{constructor(){super(...arguments),this.enableOITOffset=!1,this.transparent=!1,this.polygonOffset=3,this.discardInvisibleFragments=!0,this.draped=!1,this.emissionSource=0,this.snowCover=!1,this.textureCoordinateType=0}}e([t()],s.prototype,"enableOITOffset",void 0),e([t()],s.prototype,"transparent",void 0);export{s as MeasurementArrowTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as o}from"../materials/DefaultTechniqueConfiguration.js";class i extends o{constructor(e){super(),this.spherical=e,this.overlayMode=0,this.tileBlendInput=0,this.transparencyMode=0,this.pbrMode=5,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.textureFadingEnabled=!1,this.renderOccluded=!1,this.screenSpaceReflections=!1,this.cloudReflections=!1,this.receiveAmbientOcclusion=!1,this.tileBorders=!1,this.normalType=1,this.textureCoordinateType=1,this.emissionSource=0,this.highStepCount=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!1,this.hasColorTexture=!0,this.draped=!1,this.discardInvisibleFragments=!0,this.oitPremultipliedAlpha=!0,this.snowCover=!1}get overlayEnabled(){return 0!==this.overlayMode}get hasWater(){return 11!==this.output}}e([t({count:3})],i.prototype,"overlayMode",void 0),e([t({count:3})],i.prototype,"tileBlendInput",void 0),e([t({count:4})],i.prototype,"transparencyMode",void 0),e([t({count:7})],i.prototype,"pbrMode",void 0),e([t()],i.prototype,"receiveShadows",void 0),e([t()],i.prototype,"hasShadowHighlights",void 0),e([t()],i.prototype,"textureFadingEnabled",void 0),e([t()],i.prototype,"renderOccluded",void 0),e([t()],i.prototype,"screenSpaceReflections",void 0),e([t()],i.prototype,"cloudReflections",void 0),e([t()],i.prototype,"receiveAmbientOcclusion",void 0),e([t()],i.prototype,"tileBorders",void 0);export{i as TerrainTechniqueConfiguration};
2
+ import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as o}from"../materials/DefaultTechniqueConfiguration.js";class i extends o{constructor(e){super(),this.spherical=e,this.overlayMode=0,this.tileBlendInput=0,this.transparencyMode=0,this.pbrMode=5,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.textureFadingEnabled=!1,this.renderOccluded=!1,this.screenSpaceReflections=!1,this.cloudReflections=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.tileBorders=!1,this.normalType=1,this.textureCoordinateType=1,this.emissionSource=0,this.highStepCount=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!1,this.hasColorTexture=!0,this.draped=!1,this.discardInvisibleFragments=!0,this.oitPremultipliedAlpha=!0,this.snowCover=!1}get overlayEnabled(){return 0!==this.overlayMode}get hasWater(){return 11!==this.output}}e([t({count:3})],i.prototype,"overlayMode",void 0),e([t({count:3})],i.prototype,"tileBlendInput",void 0),e([t({count:4})],i.prototype,"transparencyMode",void 0),e([t({count:7})],i.prototype,"pbrMode",void 0),e([t()],i.prototype,"receiveShadows",void 0),e([t()],i.prototype,"hasShadowHighlights",void 0),e([t()],i.prototype,"textureFadingEnabled",void 0),e([t()],i.prototype,"renderOccluded",void 0),e([t()],i.prototype,"screenSpaceReflections",void 0),e([t()],i.prototype,"cloudReflections",void 0),e([t()],i.prototype,"receiveAmbientOcclusion",void 0),e([t()],i.prototype,"receiveGlobalIllumination",void 0),e([t()],i.prototype,"tileBorders",void 0);export{i as TerrainTechniqueConfiguration};
@@ -1,10 +1,9 @@
1
- import type Graphic from "../../../Graphic.js";
2
- import type Collection from "../../../core/Collection.js";
3
- import type SelectionManager from "../../../views/SelectionManager.js";
4
- import type { EventedAccessor } from "../../../core/Evented.js";
5
- import type { DrawingMode } from "../../../views/draw/types.js";
6
- import type { SelectableView } from "../../../views/selection/types.js";
7
- import type { SelectionOperationCreateTool, SelectionOperationType, SelectionSource, ToolName } from "./types.js";
1
+ import type Graphic from "../../Graphic.js";
2
+ import type Collection from "../../core/Collection.js";
3
+ import type SelectionManager from "../SelectionManager.js";
4
+ import type { EventedAccessor } from "../../core/Evented.js";
5
+ import type { DrawingMode } from "../draw/types.js";
6
+ import type { SelectableViewUnion, SelectionOperationCreateTool, SelectionOperationType, SelectionSource, SelectionToolName } from "./types.js";
8
7
 
9
8
  /**
10
9
  * Construction properties for a selection operation.
@@ -46,13 +45,13 @@ export interface SelectionOperationProperties extends Partial<Pick<SelectionOper
46
45
  * @default ""
47
46
  * @since 5.1
48
47
  */
49
- toolName?: ToolName;
48
+ toolName?: SelectionToolName;
50
49
  /**
51
50
  * Reference to the view being used by the selection operation.
52
51
  *
53
52
  * @since 5.1
54
53
  */
55
- view?: SelectableView;
54
+ view?: SelectableViewUnion;
56
55
  }
57
56
 
58
57
  /**
@@ -162,7 +161,7 @@ export default class SelectionOperation extends EventedAccessor {
162
161
  * @default ""
163
162
  * @since 5.1
164
163
  */
165
- get toolName(): ToolName;
164
+ get toolName(): SelectionToolName;
166
165
  /**
167
166
  * Reference to the current type of selection operation.
168
167
  *
@@ -175,7 +174,7 @@ export default class SelectionOperation extends EventedAccessor {
175
174
  *
176
175
  * @since 5.1
177
176
  */
178
- get view(): SelectableView;
177
+ get view(): SelectableViewUnion;
179
178
  /**
180
179
  * Cancels the selection operation. Any existing selection identified by the operation is cleared.
181
180
  *
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import{createTask as t}from"../../core/asyncUtils.js";import o from"../../core/Collection.js";import{EventedAccessor as r}from"../../core/Evented.js";import{makeHandle as s}from"../../core/handleUtils.js";import i from"../../core/Logger.js";import{abortMaybe as n}from"../../core/maybe.js";import{debounce as l,onAbort as c,ignoreAbortErrors as a}from"../../core/promiseUtils.js";import{on as p}from"../../core/reactiveUtils.js";import{createScreenPoint as d}from"../../core/screenUtils.js";import{property as h,subclass as m}from"../../core/accessorSupport/decorators.js";import y from"../../geometry/Point.js";import u from"../../geometry/Polygon.js";import{isClockwise as f}from"../../geometry/support/coordsUtils.js";import{sketchKeys as v,selectionKeys as _}from"../interactive/keybindings.js";import{getSelectionFromGeometry as g}from"../../widgets/support/Selector2D/selectorUtils.js";const w=100;let T=class extends r{constructor(e){super(e),this._completed=!1,this._isConstraintKeyDown=!1,this._processTask=null,this.createTool="rectangle",this.mode=null,this.persistSelection=!0,this.returnFeatureTitleFields=!1,this.returnGeometry=!0,this.selection=new o,this.selectionManager=null,this.selectOnComplete=!0,this.sources=null,this.toolName="",this.type="add",this._process=l(async(e,o)=>{const{callback:r,selector:s,completed:i}=e,n=t(async e=>{const{effectiveSelectionManager:t,returnFeatureTitleFields:o,returnGeometry:n,selection:l,sources:c,view:a}=this;if(!(!c?.length&&!t.sources.length)&&a){if(s&&null!=c){const r=await g({returnFeatureTitleFields:o,returnGeometry:n,selector:s,signal:e,sources:c,view:a});if(l.removeAll(),l.addMany(r),i&&this.persistSelection)switch(this.effectiveType){case"remove":t.updateSelection({current:[],added:[],removed:r});break;case"replace":t.clear(),t.updateSelection({current:r,added:[],removed:[]});break;default:t.updateSelection({current:r,added:[],removed:[]})}}r&&r()}else l.removeAll()});return c(o,()=>n.abort()),this._processTask=n,n.promise},w),this._onOperationFinish=this._onOperationFinish.bind(this)}initialize(){this._setup()}get _defaultMode(){return"polygon"===this.createTool?"click":"hybrid"}get _selectionArea(){const e=this._tool.coordinates;if(0===e.length)return;const t=d(),o=this.view.spatialReference,r=e=>{t.x=e[0],t.y=e[1];const o=this.view.toMap(t);return[o?.x??0,o?.y??0]};if(1===e.length||e.every(([t,o])=>t===e[0][0]&&o===e[0][1])){const[t,s]=r(e[0]);return new y({x:t,y:s,spatialReference:o})}const s=e.map(r);if(0===s.length)return;f(s)||s.reverse();return new u({spatialReference:o,rings:[s]})}get completed(){return this._completed}get effectiveSelectionManager(){return this.selectionManager??this.view.selectionManager}get effectiveType(){const e=this.type??"add";if(this._isConstraintKeyDown)switch(e){case"add":return"remove";case"remove":case"replace":return"add";default:return e}return e}get processingFinalSelection(){return!(!this._processTask||!this._tool?.drawOperation?.isCompleted)}cancel(){this.selection.removeAll(),this._onOperationFinish(!0)}destroy(){this._toolImportController=n(this._toolImportController)}async _setup(){const{createTool:e,view:t}=this;if(await t.whenReady(),this.destroyed||this._toolImportController)return;const o=new AbortController;this._toolImportController=o;const r=await import("../draw/DrawScreenTool.js");if(o.signal.aborted)return;const n=Symbol();try{this._tool=new r.DrawScreenTool({view:t,mode:this.mode??this._defaultMode,geometryType:e,cursor:"point"===e?"default":"crosshair"})}finally{this._toolImportController=null}this._tool?(this.selectOnComplete||this.addHandles(this._tool.on(["cursor-update","vertex-add","vertex-remove"],()=>{this._syncConstraintKeyDown(),a(this._process({selector:this._selectionArea}))}),n),this._syncConstraintKeyDown(),this.addHandles([p(()=>t,"key-down",e=>{if(!e.repeat)switch(this._syncConstraintKeyDown(),e.key){case v.constraint:this._tool.uniformSizeToggled=!0,e.stopPropagation();break;case v.center:this._tool.centeredToggled=!0,e.stopPropagation()}}),p(()=>t,"key-up",e=>{switch(this._syncConstraintKeyDown(),e.key){case v.constraint:this._tool.uniformSizeToggled=!1,e.stopPropagation();break;case v.center:this._tool.centeredToggled=!1,e.stopPropagation()}}),this.selection.on("change",({added:e,removed:t})=>this.emit("selection-change",{operationType:this.effectiveType,added:e,removed:t})),this._tool.on("complete",async e=>{this._syncConstraintKeyDown(),this.removeHandles(n),e.aborted?this.cancel():(this._tool.cursor="progress",await this._process({selector:this._selectionArea,callback:this._onOperationFinish,completed:!0}))})],n),this.addHandles(s(()=>t.tools.remove(this._tool))),t.addAndActivateTool(this._tool)):i.getLogger(this).warn("Unable to import Draw module. SelectionOperation failed to load.")}_syncConstraintKeyDown(){const{inputManager:e}=this.view;this._isConstraintKeyDown=_.invertType.some(t=>e.isModifierKeyDown(t))}_onOperationFinish(e=!1){this.removeAllHandles(),this._processTask?.abort(),this._completed=!0,this.emit("complete",{aborted:e,operationType:this.effectiveType,selection:this.selection.toArray(),toolName:this.toolName})}};e([h()],T.prototype,"_completed",void 0),e([h()],T.prototype,"_defaultMode",null),e([h()],T.prototype,"_isConstraintKeyDown",void 0),e([h()],T.prototype,"_processTask",void 0),e([h()],T.prototype,"_selectionArea",null),e([h()],T.prototype,"completed",null),e([h({constructOnly:!0})],T.prototype,"createTool",void 0),e([h()],T.prototype,"effectiveSelectionManager",null),e([h()],T.prototype,"effectiveType",null),e([h({constructOnly:!0})],T.prototype,"mode",void 0),e([h()],T.prototype,"persistSelection",void 0),e([h()],T.prototype,"processingFinalSelection",null),e([h()],T.prototype,"returnFeatureTitleFields",void 0),e([h()],T.prototype,"returnGeometry",void 0),e([h({readOnly:!0})],T.prototype,"selection",void 0),e([h({constructOnly:!0})],T.prototype,"selectionManager",void 0),e([h({constructOnly:!0})],T.prototype,"selectOnComplete",void 0),e([h()],T.prototype,"sources",void 0),e([h({constructOnly:!0})],T.prototype,"toolName",void 0),e([h()],T.prototype,"type",void 0),e([h({constructOnly:!0})],T.prototype,"view",void 0),T=e([m("esri.views.selection.SelectionOperation")],T);const C=T;export{C as default};
@@ -6,26 +6,74 @@
6
6
  import type Graphic from "../../Graphic.js";
7
7
  import type Accessor from "../../core/Accessor.js";
8
8
  import type Collection from "../../core/Collection.js";
9
+ import type Extent from "../../geometry/Extent.js";
10
+ import type Multipoint from "../../geometry/Multipoint.js";
11
+ import type Point from "../../geometry/Point.js";
12
+ import type Polygon from "../../geometry/Polygon.js";
13
+ import type Polyline from "../../geometry/Polyline.js";
9
14
  import type GraphicsLayer from "../../layers/GraphicsLayer.js";
15
+ import type KnowledgeGraphLayer from "../../layers/KnowledgeGraphLayer.js";
16
+ import type LinkChartLayer from "../../layers/LinkChartLayer.js";
17
+ import type MapNotesLayer from "../../layers/MapNotesLayer.js";
18
+ import type SubtypeGroupLayer from "../../layers/SubtypeGroupLayer.js";
10
19
  import type Field from "../../layers/support/Field.js";
11
20
  import type FieldsIndex from "../../layers/support/FieldsIndex.js";
21
+ import type SubtypeSublayer from "../../layers/support/SubtypeSublayer.js";
12
22
  import type FeatureSet from "../../rest/support/FeatureSet.js";
13
23
  import type Query from "../../rest/support/Query.js";
14
24
  import type View from "../View.js";
15
25
  import type LinkChartView from "../LinkChartView.js";
26
+ import type FeatureLikeLayerView from "../layers/FeatureLikeLayerView.js";
16
27
  import type { LoadableMixin } from "../../core/Loadable.js";
17
28
  import type { FeatureTitleOptions } from "../../layers/types.js";
18
29
  import type { RendererUnion } from "../../renderers/types.js";
19
30
  import type { RequestOptions } from "../../request/types.js";
20
31
  import type { MapViewOrSceneView } from "../MapViewOrSceneView.js";
21
32
  import type { ObjectId } from "../types.js";
33
+ import type { CreateTool } from "../../widgets/Sketch/types.js";
34
+
35
+ /**
36
+ * Types of parent layers that include potential sources from which selections may be determined.
37
+ * Sublayers are typically included in SelectableLayer or SelectionSource.
38
+ *
39
+ * @since 5.1
40
+ */
41
+ export type SelectableParentLayerUnion = MapNotesLayer | KnowledgeGraphLayer | LinkChartLayer | SubtypeGroupLayer;
42
+
43
+ /**
44
+ * Layer source types from which selections can be determined.
45
+ *
46
+ * @since 5.1
47
+ */
48
+ export type SelectableLayerSourceUnion = SelectableLayer | SubtypeSublayer | SelectableParentLayerUnion;
49
+
50
+ /**
51
+ * Types of sources from which selections can be determined.
52
+ *
53
+ * @since 5.1
54
+ */
55
+ export type SelectionSource = SelectableLayerSourceUnion | SelectableLayerView | FeatureLikeLayerView | GraphicsLayer;
22
56
 
23
57
  /**
24
58
  * Types of views supported by a selection operation.
25
59
  *
26
60
  * @since 5.1
27
61
  */
28
- export type SelectableView = MapViewOrSceneView | LinkChartView;
62
+ export type SelectableViewUnion = MapViewOrSceneView | LinkChartView;
63
+
64
+ /**
65
+ * Types of geometries that can be used to determine selections.
66
+ *
67
+ * @since 5.1
68
+ */
69
+ export type SelectorGeometry = Extent | Multipoint | Point | Polygon | Polyline;
70
+
71
+ /**
72
+ * Types used to identify a specific selection tool by name.
73
+ *
74
+ * @since 5.1
75
+ */
76
+ export type SelectionToolName = "lasso" | "rectangle" | "point" | string;
29
77
 
30
78
  /**
31
79
  * An identifier used to represent a selected feature in a layer. This can either be a [Graphic](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) (for layers with graphics) or an object ID (for layers with object IDs).
@@ -34,6 +82,13 @@ export type SelectableView = MapViewOrSceneView | LinkChartView;
34
82
  */
35
83
  export type SelectionIdentifier = Graphic | ObjectId;
36
84
 
85
+ /**
86
+ * Types of selection operations.
87
+ *
88
+ * @since 5.1
89
+ */
90
+ export type SelectionOperationType = "add" | "remove" | "replace";
91
+
37
92
  /**
38
93
  * A simple object representing the selected features in a layer.
39
94
  *
@@ -237,4 +292,85 @@ export interface SelectableLayerViewWithObjectIds extends SelectableLayerViewBas
237
292
  *
238
293
  * @since 5.1
239
294
  */
240
- export type SelectableLayerView = SelectableLayerViewWithObjectIds | SelectableLayerViewWithGraphics;
295
+ export type SelectableLayerView = SelectableLayerViewWithObjectIds | SelectableLayerViewWithGraphics;
296
+
297
+ /**
298
+ * Types of events emitted by a selection operation.
299
+ *
300
+ * @since 5.1
301
+ */
302
+ export interface SelectionOperationEvents {
303
+ /**
304
+ * Fires when a selection operation is completed or cancelled.
305
+ *
306
+ * @since 5.1
307
+ */
308
+ complete: SelectionCompleteEventInfo;
309
+ /**
310
+ * Fires when a selection change is determined by the selection operation.
311
+ *
312
+ * @since 5.1
313
+ */
314
+ "selection-change": SelectionChangeEventInfo;
315
+ }
316
+
317
+ /** @since 5.1 */
318
+ export interface SelectionCompleteEventInfo {
319
+ /**
320
+ * Indicates the selection operation was cancelled.
321
+ *
322
+ * @since 5.1
323
+ */
324
+ aborted: boolean;
325
+ /**
326
+ * Indicates the current type of selection operation.
327
+ *
328
+ * @since 5.1
329
+ */
330
+ operationType: SelectionOperationType;
331
+ /**
332
+ * Reference to the current working selection set.
333
+ *
334
+ * @since 5.1
335
+ */
336
+ selection: Graphic[];
337
+ /**
338
+ * Indicates the selection tool used by the selection operation.
339
+ *
340
+ * @since 5.1
341
+ */
342
+ toolName: SelectionToolName;
343
+ }
344
+
345
+ /**
346
+ * Information shared by selection operation events.
347
+ *
348
+ * @since 5.1
349
+ */
350
+ export interface SelectionChangeEventInfo {
351
+ /**
352
+ * Reference to [graphics](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) which were added to the current selection set.
353
+ *
354
+ * @since 5.1
355
+ */
356
+ added: Graphic[];
357
+ /**
358
+ * Reference to [graphics](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) which were removed from the current selection set.
359
+ *
360
+ * @since 5.1
361
+ */
362
+ removed: Graphic[];
363
+ /**
364
+ * Indicates the current type of selection operation.
365
+ *
366
+ * @since 5.1
367
+ */
368
+ operationType: SelectionOperationType;
369
+ }
370
+
371
+ /**
372
+ * Reference to the type of sketch creation tool used by the selection operation.
373
+ *
374
+ * @since 5.1
375
+ */
376
+ export type SelectionOperationCreateTool = Extract<CreateTool, "point" | "polygon" | "circle" | "rectangle">;
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{deprecatedProperty as t}from"../../../core/deprecate.js";import{EventedAccessor as o}from"../../../core/Evented.js";import{handlesGroup as i}from"../../../core/handleUtils.js";import s from"../../../core/Logger.js";import{removeMaybe as r}from"../../../core/maybe.js";import{watch as n}from"../../../core/reactiveUtils.js";import{property as a,subclass as l}from"../../../core/accessorSupport/decorators.js";import{isKnowledgeGraphLayer as c,isLinkChartLayer as p}from"../../../layers/support/layerUtils.js";import{findLayerView as u}from"../../../views/draw/support/layerUtils.js";import{isSelectableLayerView2D as h}from"../../../views/support/layerViewUtils.js";import d from"../Selector2D/SelectionOperation.js";let v=class extends o{constructor(e){super(e),this._operationHandlesGroup=null,this.activeOperation=null,this.continuousSelectionEnabled=!1,this.defaultLassoToolOptions={createTool:"polygon",mode:"hybrid",toolName:"lasso"},this.defaultOperationType="add",this.defaultPointToolOptions={createTool:"point",toolName:"point"},this.defaultRectangleToolOptions={createTool:"rectangle",toolName:"rectangle"},this.layerViewPreferenceEnabled=!0,this.persistSelection=!0,this.selectionManager=null,this.returnFeatureTitleFields=!1,this.returnGeometry=!0,this.selectOnComplete=!0,this.sources=null,this.toolConfigs=[]}initialize(){this.addHandles([n(()=>this.effectiveSources,e=>{this.activeOperation&&(this.activeOperation.sources=e)}),n(()=>this.defaultOperationType,e=>{this.activeOperation&&(this.activeOperation.type=e)})])}destroy(){this.activeOperation?.cancel(),this.activeOperation?.destroy(),this._operationHandlesGroup=r(this._operationHandlesGroup)}get effectiveSelectionManager(){return this.selectionManager??this.view?.selectionManager}get effectiveSources(){const{layerViewPreferenceEnabled:e,sources:t,view:o}=this,i=t??this.effectiveSelectionManager?.sources;if(!i?.length)return[];const s=[];return i.forEach(t=>{if(h(t))s.push(t);else if(c(t)||p(t)){(t.layers||[]).forEach(t=>{const i=o?u(o,t):void 0,r=e&&h(i)?i:t;s.push(r)})}else if(e){const e=o?u(o,t):void 0,i=h(e)?e:t;s.push(i)}else s.push(t)}),s}get layers(){return t(s.getLogger(this),"layers",{replacement:"Use SelectionToolbar.sources instead."}),this.sources}set layers(e){t(s.getLogger(this),"layers",{replacement:"Use SelectionToolbar.sources instead."}),this.sources=e}get state(){return this.activeOperation?"active":this.view?.ready&&this.effectiveSources.length?"ready":"disabled"}activate(e){const{state:t}=this,o=e?.view||this.view,r=e?.sources||this.effectiveSources;if("disabled"===t||!o)return void s.getLogger(this).warn("Unable to start selection operation.");"active"===t&&this.cancel();const n=new CustomEvent("before-activate",{cancelable:!0,detail:{toolName:e?.toolName??null}});if(this.emit("before-activate",n),n.defaultPrevented)return;const a={type:this.defaultOperationType,persistSelection:this.persistSelection,returnFeatureTitleFields:this.returnFeatureTitleFields,returnGeometry:this.returnGeometry,selectOnComplete:this.selectOnComplete,selectionManager:this.effectiveSelectionManager,...e,sources:r,view:o},l=new d({...a});return this._operationHandlesGroup=i([l.on("selection-change",e=>this.emit("selection-change",e)),l.once("complete",e=>this._onOperationComplete(e,a))]),this._set("activeOperation",l),l}activateTool(e){this.cancel();const t=this._getToolOptions(e);if(t)return this.activate(t);s.getLogger(this).warn("Unable to activate tool: unable to determine options.")}cancel(){this.activeOperation?.cancel(),this._set("activeOperation",null)}toggleTool(e){const{activeOperation:t}=this;if(t){const o=t.toolName;if(this.cancel(),o===e)return}return this.activateTool(e)}_onOperationComplete(e,t){const o=this.activeOperation?.type??e.operationType;this._operationHandlesGroup=r(this._operationHandlesGroup),this.activeOperation?.destroy(),this._set("activeOperation",null),this.emit("complete",e),this.continuousSelectionEnabled&&!e.aborted&&this.activate({...t,type:o})}_getToolOptions(e){const t=this.toolConfigs.find(t=>t.toolName===e);return t||("lasso"===e?this.defaultLassoToolOptions:"point"===e?this.defaultPointToolOptions:"rectangle"===e?this.defaultRectangleToolOptions:void 0)}};e([a({readOnly:!0})],v.prototype,"activeOperation",void 0),e([a()],v.prototype,"continuousSelectionEnabled",void 0),e([a()],v.prototype,"defaultLassoToolOptions",void 0),e([a()],v.prototype,"defaultOperationType",void 0),e([a()],v.prototype,"defaultPointToolOptions",void 0),e([a()],v.prototype,"defaultRectangleToolOptions",void 0),e([a()],v.prototype,"effectiveSelectionManager",null),e([a()],v.prototype,"effectiveSources",null),e([a()],v.prototype,"layers",null),e([a()],v.prototype,"layerViewPreferenceEnabled",void 0),e([a()],v.prototype,"persistSelection",void 0),e([a()],v.prototype,"selectionManager",void 0),e([a()],v.prototype,"returnFeatureTitleFields",void 0),e([a()],v.prototype,"returnGeometry",void 0),e([a()],v.prototype,"selectOnComplete",void 0),e([a()],v.prototype,"sources",void 0),e([a({readOnly:!0})],v.prototype,"state",null),e([a()],v.prototype,"toolConfigs",void 0),e([a()],v.prototype,"view",void 0),v=e([l("esri.widgets.support.SelectionToolbar.SelectionToolbarViewModel")],v);const f=v;export{f as default};
2
+ import{__decorate as e}from"tslib";import{deprecatedProperty as t}from"../../../core/deprecate.js";import{EventedAccessor as o}from"../../../core/Evented.js";import{handlesGroup as i}from"../../../core/handleUtils.js";import s from"../../../core/Logger.js";import{removeMaybe as r}from"../../../core/maybe.js";import{watch as n}from"../../../core/reactiveUtils.js";import{property as a,subclass as l}from"../../../core/accessorSupport/decorators.js";import{isKnowledgeGraphLayer as c,isLinkChartLayer as p}from"../../../layers/support/layerUtils.js";import{findLayerView as u}from"../../../views/draw/support/layerUtils.js";import h from"../../../views/selection/SelectionOperation.js";import{isSelectableLayerView2D as d}from"../../../views/support/layerViewUtils.js";let v=class extends o{constructor(e){super(e),this._operationHandlesGroup=null,this.activeOperation=null,this.continuousSelectionEnabled=!1,this.defaultLassoToolOptions={createTool:"polygon",mode:"hybrid",toolName:"lasso"},this.defaultOperationType="add",this.defaultPointToolOptions={createTool:"point",toolName:"point"},this.defaultRectangleToolOptions={createTool:"rectangle",toolName:"rectangle"},this.layerViewPreferenceEnabled=!0,this.persistSelection=!0,this.selectionManager=null,this.returnFeatureTitleFields=!1,this.returnGeometry=!0,this.selectOnComplete=!0,this.sources=null,this.toolConfigs=[]}initialize(){this.addHandles([n(()=>this.effectiveSources,e=>{this.activeOperation&&(this.activeOperation.sources=e)}),n(()=>this.defaultOperationType,e=>{this.activeOperation&&(this.activeOperation.type=e)})])}destroy(){this.activeOperation?.cancel(),this.activeOperation?.destroy(),this._operationHandlesGroup=r(this._operationHandlesGroup)}get effectiveSelectionManager(){return this.selectionManager??this.view?.selectionManager}get effectiveSources(){const{layerViewPreferenceEnabled:e,sources:t,view:o}=this,i=t??this.effectiveSelectionManager?.sources;if(!i?.length)return[];const s=[];return i.forEach(t=>{if(d(t))s.push(t);else if(c(t)||p(t)){(t.layers||[]).forEach(t=>{const i=o?u(o,t):void 0,r=e&&d(i)?i:t;s.push(r)})}else if(e){const e=o?u(o,t):void 0,i=d(e)?e:t;s.push(i)}else s.push(t)}),s}get layers(){return t(s.getLogger(this),"layers",{replacement:"Use SelectionToolbar.sources instead."}),this.sources}set layers(e){t(s.getLogger(this),"layers",{replacement:"Use SelectionToolbar.sources instead."}),this.sources=e}get state(){return this.activeOperation?"active":this.view?.ready&&this.effectiveSources.length?"ready":"disabled"}activate(e){const{state:t}=this,o=e?.view||this.view,r=e?.sources||this.effectiveSources;if("disabled"===t||!o)return void s.getLogger(this).warn("Unable to start selection operation.");"active"===t&&this.cancel();const n=new CustomEvent("before-activate",{cancelable:!0,detail:{toolName:e?.toolName??null}});if(this.emit("before-activate",n),n.defaultPrevented)return;const a={type:this.defaultOperationType,persistSelection:this.persistSelection,returnFeatureTitleFields:this.returnFeatureTitleFields,returnGeometry:this.returnGeometry,selectOnComplete:this.selectOnComplete,selectionManager:this.effectiveSelectionManager,...e,sources:r,view:o},l=new h({...a});return this._operationHandlesGroup=i([l.on("selection-change",e=>this.emit("selection-change",e)),l.once("complete",e=>this._onOperationComplete(e,a))]),this._set("activeOperation",l),l}activateTool(e){this.cancel();const t=this._getToolOptions(e);if(t)return this.activate(t);s.getLogger(this).warn("Unable to activate tool: unable to determine options.")}cancel(){this.activeOperation?.cancel(),this._set("activeOperation",null)}toggleTool(e){const{activeOperation:t}=this;if(t){const o=t.toolName;if(this.cancel(),o===e)return}return this.activateTool(e)}_onOperationComplete(e,t){const o=this.activeOperation?.type??e.operationType;this._operationHandlesGroup=r(this._operationHandlesGroup),this.activeOperation?.destroy(),this._set("activeOperation",null),this.emit("complete",e),this.continuousSelectionEnabled&&!e.aborted&&this.activate({...t,type:o})}_getToolOptions(e){const t=this.toolConfigs.find(t=>t.toolName===e);return t||("lasso"===e?this.defaultLassoToolOptions:"point"===e?this.defaultPointToolOptions:"rectangle"===e?this.defaultRectangleToolOptions:void 0)}};e([a({readOnly:!0})],v.prototype,"activeOperation",void 0),e([a()],v.prototype,"continuousSelectionEnabled",void 0),e([a()],v.prototype,"defaultLassoToolOptions",void 0),e([a()],v.prototype,"defaultOperationType",void 0),e([a()],v.prototype,"defaultPointToolOptions",void 0),e([a()],v.prototype,"defaultRectangleToolOptions",void 0),e([a()],v.prototype,"effectiveSelectionManager",null),e([a()],v.prototype,"effectiveSources",null),e([a()],v.prototype,"layers",null),e([a()],v.prototype,"layerViewPreferenceEnabled",void 0),e([a()],v.prototype,"persistSelection",void 0),e([a()],v.prototype,"selectionManager",void 0),e([a()],v.prototype,"returnFeatureTitleFields",void 0),e([a()],v.prototype,"returnGeometry",void 0),e([a()],v.prototype,"selectOnComplete",void 0),e([a()],v.prototype,"sources",void 0),e([a({readOnly:!0})],v.prototype,"state",null),e([a()],v.prototype,"toolConfigs",void 0),e([a()],v.prototype,"view",void 0),v=e([l("esri.widgets.support.SelectionToolbar.SelectionToolbarViewModel")],v);const f=v;export{f as default};
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8311],{50692(n,t,e){e.r(t),e.d(t,{registerFunctions:()=>g});var a=e(66131),i=e(15695),r=e(85935),c=e(78878),u=e(334),s=e(55612),o=e(89696),f=e(92647),d=e(54218);async function l(n,t,e,a){if(1===e.length){if((0,d.cy)(e[0]))return(0,u.t)(n,e[0],(0,c.J)(e[1],-1));if((0,c.j)(e[0]))return(0,u.t)(n,e[0].toArray(),(0,c.J)(e[1],-1))}else if(2===e.length){if((0,d.cy)(e[0]))return(0,u.t)(n,e[0],(0,c.J)(e[1],-1));if((0,c.j)(e[0]))return(0,u.t)(n,e[0].toArray(),(0,c.J)(e[1],-1));if((0,c.m)(e[0])){const i=await e[0].load(),r=await y(o.A.create(e[1],{fieldsIndex:i.getFieldsIndex(),timeZone:i.dateFieldsTimeZoneDefaultUTC}),a,t);return m(t,await e[0].calculateStatistic(n,r,(0,c.J)(e[2],1e3),t.abortSignal))}}else if(3===e.length&&(0,c.m)(e[0])){const i=await e[0].load(),r=await y(o.A.create(e[1],{fieldsIndex:i.getFieldsIndex(),timeZone:i.dateFieldsTimeZoneDefaultUTC}),a,t);return m(t,await e[0].calculateStatistic(n,r,(0,c.J)(e[2],1e3),t.abortSignal))}return(0,u.t)(n,e,-1)}function m(n,t){return s.g.isTimestampOffset(t)?a.lY.fromReaderAsTimeStampOffset(t.toStorageFormat()):(0,d.$P)(t)?a.lY.dateJSAndZoneToArcadeDate(t,(0,c.K)(n)):f.c9.isDateTime(t)?a.lY.dateTimeToArcadeDate(t):t}async function y(n,t,e){const a=n.getVariables();if(a.length>0){const i={};for(const n of a)i[n]=t.evaluateIdentifier(e,{name:n});n.parameters=i}return n}function g(n){"async"===n.mode&&(n.functions.stdev=function(t,e){return n.standardFunctionAsync(t,e,(e,a,i)=>l("stdev",t,i,n))},n.functions.variance=function(t,e){return n.standardFunctionAsync(t,e,(e,a,i)=>l("variance",t,i,n))},n.functions.average=function(t,e){return n.standardFunctionAsync(t,e,(e,a,i)=>l("mean",t,i,n))},n.functions.mean=function(t,e){return n.standardFunctionAsync(t,e,(e,a,i)=>l("mean",t,i,n))},n.functions.sum=function(t,e){return n.standardFunctionAsync(t,e,(e,a,i)=>l("sum",t,i,n))},n.functions.min=function(t,e){return n.standardFunctionAsync(t,e,(e,a,i)=>l("min",t,i,n))},n.functions.max=function(t,e){return n.standardFunctionAsync(t,e,(e,a,i)=>l("max",t,i,n))},n.functions.count=function(t,e){return n.standardFunctionAsync(t,e,async(n,a,i)=>{if((0,c.B)(i,1,1,t,e),null==i[0])return 0;if((0,c.m)(i[0]))return i[0].count(n.abortSignal);if((0,d.cy)(i[0])||(0,d.Kg)(i[0]))return i[0].length;if((0,c.j)(i[0]))return i[0].length();if((0,c.n)(i[0]))return i[0].entryCount();throw new r.D$(t,"InvalidParameter",e)})},n.functions.isempty=function(t,e){return n.standardFunctionAsync(t,e,async(n,t,e)=>{if((0,c.B)(e,1,2,n,t),e.length>=2&&!(0,d.Lm)(e[1]))throw new r.D$(n,"InvalidParameter",t);return(0,c.J)(e[1],!1)?(0,c.m)(e[0])?await e[0].isEmpty(n.abortSignal):(0,i.Im)(e[0]):(0,c.L)(e[0])})})}}}]);