@arcgis/core 5.1.0-next.103 → 5.1.0-next.105

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 (169) hide show
  1. package/analysis/ShadowCastAnalysis.d.ts +81 -62
  2. package/assets/esri/core/t9n/Units.json +1 -1
  3. package/assets/esri/core/t9n/Units_en.json +1 -1
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/{f5bd0a4f82df5e942b70.js → 093f27e4e4781870b431.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{8e986167d4a393ee41ea.js → 130851b81f04e6a008cd.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{1cb0c4fc315bbc2bd00b.js → 1c8a21b7b60c0709e6b2.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{ce0c7070eeb723a718e7.js → 1e8d5bfc5f8c2664190c.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{7d571845292b1b7769c2.js → 2dced41ff2aa1bd86665.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{bff0c4094c14cb97b18f.js → 359dbfbfb9acfb18bc6e.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{9542ef3f6c2bc7c14d85.js → 39a8e6c9d710d3faea3c.js} +1 -1
  12. package/assets/esri/core/workers/chunks/3fed503185ea1913fb84.js +1 -0
  13. package/assets/esri/core/workers/chunks/466c250537415f12eb59.js +1 -0
  14. package/assets/esri/core/workers/chunks/4b130db9b7b4e2e32ea4.js +1 -0
  15. package/assets/esri/core/workers/chunks/{0cb8bc6dbbbe3b212712.js → 558606a1af22e4a0d536.js} +1 -1
  16. package/assets/esri/core/workers/chunks/6854b28853f5dd195110.js +262 -0
  17. package/assets/esri/core/workers/chunks/{b63cbf6c2c9ec1b02b9a.js → 6e21675bbd7a44070771.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{bb04aff0b4947408592c.js → 7617bd0f3a70dfe61637.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{cf3c0bee919bb509cd4f.js → 7b66691d133dabd87ce6.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{bf2c202dec5ab7bc770b.js → 829a0583b8a228c65379.js} +1 -1
  21. package/assets/esri/core/workers/chunks/8a1751187a20b6578875.js +1 -0
  22. package/assets/esri/core/workers/chunks/{d610f517fb3c6cb24365.js → 8ade869fa9bae446266a.js} +1 -1
  23. package/assets/esri/core/workers/chunks/9b89cc85c1b5d561df7c.js +2 -0
  24. package/assets/esri/core/workers/chunks/{2a5f6a8d282f2c391591.js → a0e72b107991ba38a9f0.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{f3a9100518b044e79501.js → a943bd2e6fb7443c2b66.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{037b36d415ae27e987f9.js → aec4a4cd7044fdbbbe34.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{29b00d07d3e1d095c590.js → b262478da29470abb72b.js} +2 -2
  28. package/assets/esri/core/workers/chunks/b7a81fd4994eabba1869.js +640 -0
  29. package/assets/esri/core/workers/chunks/{3c9482764c9e4f8bcbb0.js → c187bc997bad61b6c6e9.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{1c83e61fd9a4f8fc8372.js → d3f08f1a9a250cd8a2c8.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{c476f4979048e558baa7.js → e90afd914f2ccd4f5374.js} +57 -75
  32. package/assets/esri/core/workers/chunks/{5cffc7b49966201eccdb.js → f75295cdd5e84eb97d5a.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{95798e3de3419fdda6ac.js → fb415b01f0f1d644832d.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{64e268ebac0b62076f81.js → fbb23db01f3cf629d32e.js} +1 -1
  35. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  36. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  37. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  38. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  39. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  40. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  41. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  42. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  43. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  44. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  45. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  46. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  47. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  48. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  49. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  50. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  51. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  52. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  53. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  54. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  55. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  56. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  57. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  58. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  59. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  60. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  61. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  62. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  63. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  64. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  65. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  66. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  67. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  68. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  69. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  70. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  71. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  72. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  73. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  74. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  75. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  76. package/assets/esri/widgets/Sketch/t9n/Sketch_cs.json +1 -1
  77. package/chunks/ChapmanAtmosphere.glsl.js +14 -19
  78. package/chunks/Compositing.glsl.js +4 -4
  79. package/chunks/GaussianSplatShadow.glsl.js +7 -7
  80. package/chunks/GlobalIllumination.glsl.js +27 -50
  81. package/chunks/GlobalIlluminationBlur.glsl.js +16 -11
  82. package/chunks/Terrain.glsl.js +1 -1
  83. package/config.js +1 -1
  84. package/core/ReactiveSet.js +1 -1
  85. package/kernel.js +1 -1
  86. package/layers/VideoLayer.js +1 -1
  87. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  88. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +1 -1
  89. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  90. package/layers/knowledgeGraph/layerUtils.js +1 -1
  91. package/layers/orientedImagery/core/utils.js +1 -1
  92. package/package.json +2 -2
  93. package/support/revision.js +1 -1
  94. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  95. package/symbols/cim/utils.js +1 -1
  96. package/symbols/support/cimSymbolUtils.js +1 -1
  97. package/symbols/support/utils.js +1 -1
  98. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  99. package/views/2d/engine/webgl/RenderingDevice.js +1 -1
  100. package/views/2d/engine/webgl/effects/HittestEffect.js +1 -1
  101. package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
  102. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  103. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
  104. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/FillShader.js +1 -1
  105. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
  106. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
  107. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/constants.js +1 -1
  108. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
  109. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  110. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  111. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  112. package/views/2d/layers/features/FeatureContainer.js +1 -1
  113. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  114. package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +9 -5
  115. package/views/3d/layers/FlowSubView3D.js +1 -1
  116. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  117. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  118. package/views/3d/terrain/TerrainRenderer.js +1 -1
  119. package/views/3d/terrain/TileCompositor.js +1 -1
  120. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  121. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
  122. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.glsl.js +1 -1
  123. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
  124. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphereTechnique.js +1 -1
  125. package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
  126. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
  127. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  128. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  129. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
  130. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechniqueConfiguration.js +1 -1
  131. package/views/3d/webgl-engine/lib/Compositor.js +1 -1
  132. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  133. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  134. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  135. package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
  136. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  137. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  138. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  139. package/views/3d/webgl-engine/shaders/CompositingTechniqueConfiguration.js +1 -1
  140. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  141. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  142. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  143. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
  144. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  145. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  146. package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
  147. package/views/3d/webgl-engine/shaders/ditherNoise.glsl.js +1 -1
  148. package/views/layers/FeatureLikeLayerView.js +1 -1
  149. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  150. package/widgets/BatchAttributeForm/inputs/UtilityNetworkAssociationsElementInput.js +1 -1
  151. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  152. package/widgets/OrientedImageryViewer/components/VideoEnhancementTools.js +1 -1
  153. package/widgets/OrientedImageryViewer.js +1 -1
  154. package/widgets/TableList/TableListViewModel.js +1 -1
  155. package/widgets/Track/TrackViewModel.d.ts +1 -0
  156. package/widgets/Track/TrackViewModel.js +1 -1
  157. package/widgets/Track.js +1 -1
  158. package/widgets/support/GeolocationPositioning.d.ts +1 -0
  159. package/widgets/support/GeolocationPositioning.js +1 -1
  160. package/assets/esri/core/workers/chunks/35fdd62277fd06468a29.js +0 -2
  161. package/assets/esri/core/workers/chunks/40caf5e09e4382d81104.js +0 -640
  162. package/assets/esri/core/workers/chunks/4213aa844900fcf95287.js +0 -1
  163. package/assets/esri/core/workers/chunks/594e1f633527749d92d7.js +0 -1
  164. package/assets/esri/core/workers/chunks/cc8d55d1830d7542c3f5.js +0 -262
  165. package/assets/esri/core/workers/chunks/f196ad0c7dbcbf632776.js +0 -1
  166. package/assets/esri/core/workers/chunks/fae79769df54eb4c4154.js +0 -1
  167. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphereTechniqueConfiguration.js +0 -2
  168. /package/assets/esri/core/workers/chunks/{35fdd62277fd06468a29.js.LICENSE.txt → 9b89cc85c1b5d561df7c.js.LICENSE.txt} +0 -0
  169. /package/assets/esri/core/workers/chunks/{29b00d07d3e1d095c590.js.LICENSE.txt → b262478da29470abb72b.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import"../../../../core/has.js";import"../../../../core/Logger.js";import{TechniqueProgramCache as e}from"./shaderGraph/techniques/TechniqueProgramCache.js";class t{constructor(){this._currentPipelineStateNeedsUpdate=!1,this._programCache=new e}dispose(){this._programCache.destroy()}clearShaderCache(){this._programCache.destroy(),this._programCache=new e}setShader(e){return this._shaderState={shader:e.shader,uniforms:e.uniforms,textures:e.textures,defines:e.defines,optionalAttributes:e.optionalAttributes,useComputeBuffer:e.useComputeBuffer??!1},this._shaderState}setPipelineState(e){e!==this._currentPipelineState&&(this._currentPipelineState=e,this._currentPipelineStateNeedsUpdate=!0)}updatePipelineState(e){this._currentPipelineStateNeedsUpdate&&(this._currentPipelineStateNeedsUpdate=!1,this._updatePipelineState(e))}getPipelineState(){return this._currentPipelineState}setStencilRef(e,t){if(null==this._currentPipelineState)throw new Error("Pipeline state not defined. Call setPipelineState before calling submitDraw ");const{stencil:s}=this._currentPipelineState;if(s){const{test:r}=s;if(r){const{compare:s,mask:i}=r;if(null==t)throw new Error("InternalError: Stencil reference expected for target but not defined");e.setStencilFunctionSeparate(1032,s,t,i)}}}setPipelineStateNeedsUpdate(e){this._currentPipelineStateNeedsUpdate=e}getShaderState(){return this._shaderState}getProgramCache(){return this._programCache}submitDraw(e,t,s){let r=s?.stencilRef;if(!this._shaderState)return null;const{shader:i,uniforms:n,textures:a,defines:l,optionalAttributes:o}=this._shaderState,c=e.context,d=t.getAttributePrecisionPackFactors(),p=this._programCache.getProgram(i,d,n,a??{},l??{},o??{});if(p.setUniforms(n),p.setTextures(a),p.bind(c),this.updatePipelineState(c),null==r){const e=t.getStencilReference();null!=e&&(r=e)}return null!=r&&this.setStencilRef(c,r),t.draw(e,i.locationInfo),p.cleanupTemporaryTextures(),{vertexShader:p.vertexShader,fragmentShader:p.fragmentShader}}submitDrawMesh(e,t,s,r){this.submitDrawMeshUntyped(e,t,s,r)}submitDrawMeshUntyped(e,t,s,r){const i=r?.parts,n=r?.stencilRef,{precisionFactors:a,materialKey:l}=t,{shader:o,uniforms:c,textures:d,defines:p,optionalAttributes:h}=this.setShader(t),u=this._programCache.getProgram(o,a||{},c,d??{},p??{},h??{},l);if(u.setUniforms(c),u.setTextures(d),u.bind(e),this.updatePipelineState(e),this.setStencilRef(e,n),i)for(const S of i)s.bind(e,t.shader.locationInfo,S),s.draw(e);else for(let S=0;S<s.parts.length;S++)s.bind(e,t.shader.locationInfo,S),s.draw(e);s.unbind(e),u.cleanupTemporaryTextures()}_updatePipelineState(e){if(null==this._currentPipelineState)throw new Error("Pipeline state not defined. Call setPipelineState before calling submitDraw ");const{color:t,depth:s,stencil:r}=this._currentPipelineState;if(t){const{blendMode:s,write:r}=t;switch(e.setColorMask(...r),e.setBlendingEnabled("none"!==s),e.setBlendEquation(32774),s){case"composite":e.setBlendFunctionSeparate(1,771,1,771);break;case"additive":e.setBlendFunctionSeparate(1,1,1,1);break;case"custom":{const{blendParameters:s}=t,{dstAlpha:r,dstRGB:i,srcAlpha:n,srcRGB:a}=s;e.setBlendFunctionSeparate(a,i,n,r);break}case"delete":e.setBlendEquation(32779),e.setBlendFunctionSeparate(1,771,1,771);break;case"none":e.setBlendingEnabled(!1)}}else e.setColorMask(!1,!1,!1,!1);if(s){const{test:t,write:r}=s;r?(e.setDepthWriteEnabled(!0),e.setDepthRange(r.zNear,r.zFar)):e.setDepthWriteEnabled(!1),t?(e.setDepthTestEnabled(!0),e.setDepthFunction(t)):e.setDepthTestEnabled(!1)}else e.setDepthTestEnabled(!1),e.setDepthWriteEnabled(!1);if(r){const{test:t,write:s}=r;if(t){const{op:s}=t;e.setStencilTestEnabled(!0),e.setStencilOpSeparate(1032,s.fail,s.zFail,s.zPass)}else e.setStencilTestEnabled(!1);if(s){const{mask:t}=s;e.setStencilWriteMask(t)}else e.setStencilWriteMask(0)}else e.setStencilTestEnabled(!1),e.setStencilWriteMask(0)}}export{t as RenderingDevice};
2
+ import"../../../../core/has.js";import"../../../../core/Logger.js";import{TechniqueProgramCache as e}from"./shaderGraph/techniques/TechniqueProgramCache.js";class t{constructor(){this._currentPipelineStateNeedsUpdate=!1,this._programCache=new e}dispose(){this._programCache.destroy()}clearShaderCache(){this._programCache.destroy(),this._programCache=new e}setShader(e){return this._shaderState={shader:e.shader,uniforms:e.uniforms,textures:e.textures,defines:e.defines,optionalAttributes:e.optionalAttributes,useComputeBuffer:e.useComputeBuffer??!1},this._shaderState}setPipelineState(e){e!==this._currentPipelineState&&(this._currentPipelineState=e,this._currentPipelineStateNeedsUpdate=!0)}updatePipelineState(e){this._currentPipelineStateNeedsUpdate&&(this._currentPipelineStateNeedsUpdate=!1,this._updatePipelineState(e))}getPipelineState(){return this._currentPipelineState}setStencilRef(e,t){if(null==this._currentPipelineState)throw new Error("Pipeline state not defined. Call setPipelineState before calling submitDraw ");const{stencil:s}=this._currentPipelineState;if(s){const{test:r}=s;if(r){const{compare:s,mask:i}=r;if(null==t)throw new Error("InternalError: Stencil reference expected for target but not defined");e.setStencilFunctionSeparate(1032,s,t,i)}}}setPipelineStateNeedsUpdate(e){this._currentPipelineStateNeedsUpdate=e}getShaderState(){return this._shaderState}getProgramCache(){return this._programCache}submitDraw(e,t,s){let r=s?.stencilRef;if(!this._shaderState)return null;const{shader:i,uniforms:n,textures:a,defines:l,optionalAttributes:o}=this._shaderState,c=e.context,d=t.getAttributePrecisionPackFactors(),p=this._programCache.getProgram(i,d,n,a??{},l??{},o??{});if(p.setUniforms(n),p.setTextures(a),p.bind(c),this.updatePipelineState(c),null==r){const e=t.getStencilReference();null!=e&&(r=e)}return null!=r&&this.setStencilRef(c,r),t.draw(e,i.locationInfo),p.cleanupTemporaryTextures(),{vertexShader:p.vertexShader,fragmentShader:p.fragmentShader}}submitDrawMesh(e,t,s,r){this.submitDrawMeshUntyped(e,t,s,r)}submitDrawMeshUntyped(e,t,s,r){const i=r?.parts,n=r?.stencilRef,{precisionFactors:a,materialKey:l}=t,{shader:o,uniforms:c,textures:d,defines:p,optionalAttributes:h}=this.setShader(t),u=this._programCache.getProgram(o,a||{},c,d??{},p??{},h??{},l);if(u.setUniforms(c),u.setTextures(d),u.bind(e),this.updatePipelineState(e),this.setStencilRef(e,n),i)for(const S of i)s.bind(e,t.shader.locationInfo,S),s.draw(e);else for(let S=0;S<s.parts.length;S++)s.bind(e,t.shader.locationInfo,S),s.draw(e);s.unbind(e),u.cleanupTemporaryTextures()}_updatePipelineState(e){if(null==this._currentPipelineState)throw new Error("Pipeline state not defined. Call setPipelineState before calling submitDraw ");const{color:t,depth:s,stencil:r}=this._currentPipelineState;if(t){const{blendMode:s,write:r}=t;switch(e.setColorMask(...r),e.setBlendingEnabled("none"!==s),e.setBlendEquation(32774),s){case"composite":e.setBlendFunctionSeparate(1,771,1,771);break;case"additive":e.setBlendFunctionSeparate(1,1,1,1);break;case"custom":{const{blendParameters:s,blendEquation:r}=t,{dstAlpha:i,dstRGB:n,srcAlpha:a,srcRGB:l}=s;r&&e.setBlendEquation(r),e.setBlendFunctionSeparate(l,n,a,i);break}case"delete":e.setBlendEquation(32779),e.setBlendFunctionSeparate(1,771,1,771);break;case"none":e.setBlendingEnabled(!1)}}else e.setColorMask(!1,!1,!1,!1);if(s){const{test:t,write:r}=s;r?(e.setDepthWriteEnabled(!0),e.setDepthRange(r.zNear,r.zFar)):e.setDepthWriteEnabled(!1),t?(e.setDepthTestEnabled(!0),e.setDepthFunction(t)):e.setDepthTestEnabled(!1)}else e.setDepthTestEnabled(!1),e.setDepthWriteEnabled(!1);if(r){const{test:t,write:s}=r;if(t){const{op:s}=t;e.setStencilTestEnabled(!0),e.setStencilOpSeparate(1032,s.fail,s.zFail,s.zPass)}else e.setStencilTestEnabled(!1);if(s){const{mask:t}=s;e.setStencilWriteMask(t)}else e.setStencilWriteMask(0)}else e.setStencilTestEnabled(!1),e.setStencilWriteMask(0)}}export{t as RenderingDevice};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import has from"../../../../../core/has.js";import{hittestSmallSymbolThreshold as t,hittestToleranceMobile as e,hittestToleranceDesktop as s,hittestToleranceSmallSymbol as i}from"../definitions.js";import{Effect as o}from"./Effect.js";import{PixelType as n}from"../../../../webgl/enums.js";class r extends o{constructor(){super(...arguments),this.name=this.constructor.name,this.defines=["hittest"]}dispose(){null!=this._fbo&&this._fbo.dispose()}createOptions({pixelRatio:o},n){if(!n.length)return null;const r=n.shift();this._outstanding=r;const l=has("esri-mobile"),h=(l?e:s)*o,a=(l?e:i)*o,c=t,{query:u}=r,f=u.hittestType;let d=[-1,-1,-1,-1],m=[],p=[-1,-1];if("rect"===f){const t=u.input;m=[[t.x,t.y],[t.x,t.y+t.height],[t.x+t.width,t.y+t.height],[t.x+t.width,t.y]];let e=1/0,s=1/0,i=-1/0,o=-1/0;for(const[n,r]of m)e=Math.min(e,n),s=Math.min(s,r),i=Math.max(i,n),o=Math.max(o,r);d=[e,s,i,o]}else if("point"===f){const t=u.input;p=[t.x,t.y]}return{type:"hittest",distance:h,smallSymbolDistance:a,smallSymbolSizeThreshold:c,position:p,tlbr:d,hittestType:f}}bind(t){const{context:e,attributeView:s}=t;if(!s.size)return;const i=s.getBlock(2);if(null==i)return;const o=i.getFBO(e);e.setViewport(0,0,s.size,s.size),e.bindFramebuffer(o),e.setColorMask(!0,!0,!0,!0),e.setClearColor(0,0,0,0),e.clear(16640)}unbind(){}draw(t){if(null==this._outstanding)return;const e=this._outstanding;this._outstanding=null,this._resolve(t,e.resolvers)}async _resolve(t,e){const{context:s,attributeView:i}=t,o=i.getBlock(2);if(null==o)return void e.forEach(t=>t.resolve([]));const r=o.getFBO(s),l=new Uint8Array(r.width*r.height*4);try{await r.readPixelsAsync(0,0,r.width,r.height,6408,n.UNSIGNED_BYTE,l)}catch(a){return void e.forEach(t=>t.resolve([]))}const h=[];for(let n=0;n<l.length;n+=4){const t=n/4;l[n]&&h.push(t)}e.forEach(t=>t.resolve(h))}}export{r as HittestEffect};
2
+ import has from"../../../../../core/has.js";import{hittestSmallSymbolThreshold as t,hittestToleranceMobile as e,hittestToleranceDesktop as i,hittestToleranceSmallSymbol as s}from"../definitions.js";import{Effect as o}from"./Effect.js";import{PixelType as n}from"../../../../webgl/enums.js";class r extends o{constructor(){super(...arguments),this.name=this.constructor.name,this.defines=["hittest"]}dispose(){null!=this._fbo&&this._fbo.dispose()}createOptions({pixelRatio:o},n){if(!n.length)return null;const r=n.shift();this._outstanding=r;const l=has("esri-mobile"),a=(l?e:i)*o,h=(l?e:s)*o,c=t,{query:d}=r,u=d.hittestType;let f=[-1,-1,-1,-1],m=[],p=[-1,-1];if("rect"===u){const t=d.input;m=[[t.x,t.y],[t.x,t.y+t.height],[t.x+t.width,t.y+t.height],[t.x+t.width,t.y]];let e=1/0,i=1/0,s=-1/0,o=-1/0;for(const[n,r]of m)e=Math.min(e,n),i=Math.min(i,r),s=Math.max(s,n),o=Math.max(o,r);f=[e,i,s,o]}else if("point"===u){const t=d.input;p=[t.x,t.y]}return{type:"hittest",distance:a,smallSymbolDistance:h,smallSymbolSizeThreshold:c,position:p,tlbr:f,hittestType:u}}bind(t){const{context:e,attributeView:i}=t;if(!i.size)return;const s=i.getBlock(2);if(null==s)return;const o=s.getFBO(e);e.setViewport(0,0,i.size,i.size),e.bindFramebuffer(o),e.setColorMask(!0,!0,!0,!0),e.setClearColor(0,0,0,0),e.clear(16640)}unbind(){}draw(t){if(null==this._outstanding)return;const e=this._outstanding;this._outstanding=null,this._resolve(t,e.resolvers)}async _resolve(t,e){const{context:i,attributeView:s}=t,o=s.getBlock(2);if(null==o)return void e.forEach(t=>t.resolve({trueHitIds:[],candidateHitIds:[]}));const r=o.getFBO(i),l=new Uint8Array(r.width*r.height);try{await r.readPixelsAsync(0,0,r.width,r.height,6403,n.UNSIGNED_BYTE,l)}catch(c){return void e.forEach(t=>t.resolve({trueHitIds:[],candidateHitIds:[]}))}const a=[],h=[];for(let n=0;n<l.length;n++){const t=l[n];t>=2?a.push(n):t>=1&&h.push(n)}e.forEach(t=>t.resolve({trueHitIds:a,candidateHitIds:h}))}}export{r as HittestEffect};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{getMetersPerUnitForSR as t}from"../../../../../../core/units.js";import{maxRepresentableInt as e,tileSize as i}from"../../definitions.js";const o={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:{write:!1,test:{compare:514,mask:255,op:{fail:7680,zFail:7680,zPass:7681}}}},n={color:{write:[!0,!0,!0,!0],blendMode:"additive"},depth:!1,stencil:!1},r={...o,color:{write:[!0,!0,!0,!0],blendMode:"delete"}};function s({pixelRatio:e,state:i,displayLevel:o,requiredLevel:n},r){const s=1/2**(o-r.key.level),l=1/2**(n-r.key.level);return{displayMat3:i.displayMat3,displayViewMat3:i.displayViewMat3,displayViewScreenMat3:r.transforms.displayViewScreenMat3,viewMat3:i.viewMat3,tileMat3:r.transforms.tileMat3,displayZoomFactor:s,requiredZoomFactor:l,tileOffset:[r.x,r.y],currentScale:i.scale,currentZoom:o,metersPerSRUnit:t(i.spatialReference),rotation:i.rotation,pixelRatio:e}}function l(t){return"highlight"===t.passOptions?.type}function a(t){return"hittest"===t.passOptions?.type}function c(t){if(!a(t))return null;const{position:e,distance:i,smallSymbolDistance:o,smallSymbolSizeThreshold:n,tlbr:r}=t.passOptions;return{position:e,distance:i,smallSymbolDistance:o,smallSymbolSizeThreshold:n,tlbr:r}}function u(t){if(!l(t))return null;const{activeReasons:e,highlightAll:i}=t.passOptions;return{activeReasons:e,highlightAll:i?1:0}}function p(t,e,i){const o={};for(const n in i)"function"!=typeof i[n]?o[n]=i[n]:o[n]=i[n](t,e);return o}function f(t,e){return{storage:t.attributeView.getUniforms(),view:s(t,e),hittestRequest:c(t),highlight:u(t)}}function d(t){return t.attributeView.getTextures(t.context)}function m(t){return{storageTextures:d(t)}}function h(t){return{inside:2===t.selection,outside:3===t.selection}}function y(t){return a(t)?n:l(t)&&"clear"===t.passOptions.stepType?r:o}function M(t){const{row:o,col:n}=t.key,r=n*i,s=o*i;return{tileOffsetFromLocalOrigin:[r%e,s%e],maxIntsToLocalOrigin:[Math.floor(r/e),Math.floor(s/e)]}}export{y as getFeaturePipelineState,d as getFeatureStorageTextures,m as getFeatureTextures,f as getFeatureUniforms,M as getLocalTileOffset,h as getSelectionDefines,s as getViewUniforms,l as isHighlight,a as isHittest,p as resolveDynamicUniforms};
2
+ import{getMetersPerUnitForSR as t}from"../../../../../../core/units.js";import{maxRepresentableInt as e,tileSize as i}from"../../definitions.js";const o={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:{write:!1,test:{compare:514,mask:255,op:{fail:7680,zFail:7680,zPass:7681}}}},n={color:{write:[!0,!0,!0,!0],blendParameters:{srcRGB:1,dstRGB:1,srcAlpha:1,dstAlpha:1},blendEquation:32776,blendMode:"custom"},depth:!1,stencil:!1},s={...o,color:{write:[!0,!0,!0,!0],blendMode:"delete"}};function r({pixelRatio:e,state:i,displayLevel:o,requiredLevel:n},s){const r=1/2**(o-s.key.level),l=1/2**(n-s.key.level);return{displayMat3:i.displayMat3,displayViewMat3:i.displayViewMat3,displayViewScreenMat3:s.transforms.displayViewScreenMat3,viewMat3:i.viewMat3,tileMat3:s.transforms.tileMat3,displayZoomFactor:r,requiredZoomFactor:l,tileOffset:[s.x,s.y],currentScale:i.scale,currentZoom:o,metersPerSRUnit:t(i.spatialReference),rotation:i.rotation,pixelRatio:e}}function l(t){return"highlight"===t.passOptions?.type}function a(t){return"hittest"===t.passOptions?.type}function c(t){if(!a(t))return null;const{position:e,distance:i,smallSymbolDistance:o,smallSymbolSizeThreshold:n,tlbr:s}=t.passOptions;return{position:e,distance:i,smallSymbolDistance:o,smallSymbolSizeThreshold:n,tlbr:s}}function u(t){if(!l(t))return null;const{activeReasons:e,highlightAll:i}=t.passOptions;return{activeReasons:e,highlightAll:i?1:0}}function p(t,e,i){const o={};for(const n in i)"function"!=typeof i[n]?o[n]=i[n]:o[n]=i[n](t,e);return o}function f(t,e){return{storage:t.attributeView.getUniforms(),view:r(t,e),hittestRequest:c(t),highlight:u(t)}}function d(t){return t.attributeView.getTextures(t.context)}function m(t){return{storageTextures:d(t)}}function h(t){return{inside:2===t.selection,outside:3===t.selection}}function y(t){return a(t)?n:l(t)&&"clear"===t.passOptions.stepType?s:o}function M(t){const{row:o,col:n}=t.key,s=n*i,r=o*i;return{tileOffsetFromLocalOrigin:[s%e,r%e],maxIntsToLocalOrigin:[Math.floor(s/e),Math.floor(r/e)]}}export{y as getFeaturePipelineState,d as getFeatureStorageTextures,m as getFeatureTextures,f as getFeatureUniforms,M as getLocalTileOffset,h as getSelectionDefines,r as getViewUniforms,l as isHighlight,a as isHittest,p as resolveDynamicUniforms};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t,__param as e}from"tslib";import{location as i,option as o,uniform as s,texture as r,input as l,ComputeVertexInput as a}from"../../GraphShaderModule.js";import{Vec3 as p,min as n,max as u,Float as d,Mat3 as m,Vec4 as y,ifElse as h,lessThan as c,greaterThan as x,equal as v,texture2D as V,clamp as f,abs as w,mix as S,distance as b,Vec2 as g,negate as C,step as M,Sampler2D as z}from"../../graph/glsl.js";import{MarkerConstants as _}from"./markerConstants.js";import{AFeatureShader as R,FeatureVertexInput as j,FeatureFragmentInput as U}from"../shaders/AFeatureShader.js";import{c256ToRad as N,softEdgeRatio as T}from"../shaders/constants.js";import{isRectHittest as D,hittestScreenRect as q,distPointTriangle as F,xyToBarycentric as O,inTriangle as k,failHittest as A}from"../shaders/hittestUtils.js";import{MosaicInfo as P}from"../shaders/MosaicInfo.js";import{getBit as I,getBitBool as H,rgba2float as G}from"../shaders/utils.js";import{VisualVariableColor as L}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as B}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as E}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as J}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as K}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as Q}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as W}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as X,getVisualVariableColor as Y,getVisualVariableSize as Z,getVisualVariableRotation as $}from"../shaders/vvUtils.js";class tt extends j{}t([i(3,y)],tt.prototype,"color",void 0),t([i(4,y)],tt.prototype,"outlineColor",void 0),t([i(5,g)],tt.prototype,"offset",void 0),t([i(6,g)],tt.prototype,"textureUV",void 0),t([i(7,y)],tt.prototype,"sizing",void 0),t([i(8,d)],tt.prototype,"placementAngle",void 0),t([i(9,d)],tt.prototype,"sdfDecodeCoeff",void 0),t([i(10,g)],tt.prototype,"zoomRange",void 0);class et extends a{}t([i(11,g)],et.prototype,"offsetNextVertex1",void 0),t([i(12,g)],et.prototype,"offsetNextVertex2",void 0),t([i(13,g)],et.prototype,"textureUVNextVertex1",void 0),t([i(14,g)],et.prototype,"textureUVNextVertex2",void 0);class it extends U{}function ot(t,e,i,o){return e.multiply(t.x).add(i.multiply(t.y)).add(o.multiply(t.z))}function st(t){return t.multiply(t).divide(128)}class rt extends R{constructor(){super(...arguments),this.type="MarkerShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"],textureUV:["textureUVNextVertex1","textureUVNextVertex2"]}}vertex(t,e){const i=st(t.sizing.x),o=st(t.sizing.y),s=st(t.sizing.z),r=t.placementAngle,l=I(t.bitset,_.bitset.isSDF),a=I(t.bitset,_.bitset.isMapAligned),h=I(t.bitset,_.bitset.scaleSymbolsProportionally),c=H(t.bitset,_.bitset.colorLocked),x=X(this,t.id),v=Y(this,t.id,t.color,c).multiply(x),V=this.view.displayViewScreenMat3.multiply(new p(t.pos.xy,1)),f=Z(this,t.id,s).divide(s),w=i.multiply(f),S=t.offset.xy.multiply(f);let b=o.multiply(h.multiply(f.subtract(1)).add(1));b=n(b,u(w.subtract(.99),new d(0)));const g=u(b,new d(1)),C=n(b,new d(1)),M=m.fromRotation(r.multiply(N)),z=$(this,t.id),R=this._getViewRotationMatrix(a).multiply(z).multiply(M).multiply(new p(S.xy,0)),j=this.clip(t.id,t.zoomRange),U=new y(V.xy.add(R.xy),j,1),T=t.textureUV.divide(this.mosaicInfo.size),D=t.outlineColor.multiply(C),q=I(t.bitset,_.bitset.overrideOutlineColor),F=t.sdfDecodeCoeff.multiply(w);return{glPosition:U,color:v,textureUV:T,outlineColor:D,outlineSize:g,distanceToPx:F,isSDF:l,overrideOutlineColor:q,...this.maybeRunHittest(t,e,{pos:t.pos,size:w,sizeCorrection:f,isMapAligned:a,vvRotationMat3:z,placementMat3:M,outlineSize:g,distanceToPx:F,isSDF:l})}}fragment(t){const e=this._getColor(t.textureUV,t);return this.getFragmentOutput(e,t)}hittest(t,e,i){const{pos0:o,pos1:s,pos2:r}=this.computeHittestTriangle(t,e,i),l=D(this.hittestRequest);return h(l,()=>{const{tlbr:t}=this.hittestRequest;return q(o,s,r,t)},()=>{const o=h(c(i.size,this.hittestRequest.smallSymbolSizeThreshold),this._hittestSmallMarker(t,e,i),this._hittestMarker(t,e,i));return h(x(o,this.hittestRequest.distance),new d(0),new d(1))})}_getViewRotationMatrix(t){const e=this.view.displayViewMat3,i=this.view.displayMat3,o=new d(1).subtract(t);return e.multiply(t).add(i.multiply(o))}_getViewScreenMatrix(t){const e=this.view.viewMat3.multiply(this.view.tileMat3),i=this.view.tileMat3,o=new d(1).subtract(t);return e.multiply(t).add(i.multiply(o))}_getColor(t,e){return h(v(e.isSDF,new d(1)),this._getSDFColor(t,e),this._getSpriteColor(t,e))}_getSpriteColor(t,e){return V(this.mosaicTexture,t).multiply(e.color)}_getSDFColor(t,e){const i=V(this.mosaicTexture,t),o=new d(.5).subtract(G(i)).multiply(e.distanceToPx).multiply(T),s=f(new d(.5).subtract(o),new d(0),new d(1)),r=e.color.multiply(s);let l=e.outlineSize;this.highlight&&(l=u(l,e.overrideOutlineColor.multiply(4)));const a=l.multiply(.5),p=w(o).subtract(a),n=f(new d(.5).subtract(p),new d(0),new d(1)),m=S(e.outlineColor,e.color,e.overrideOutlineColor).multiply(n);return new d(1).subtract(m.a).multiply(r).add(m)}_hittestSmallMarker(t,e,i){const{position:o,distance:s,smallSymbolDistance:r}=this.hittestRequest,l=s.subtract(r),{viewMat3:a,tileMat3:n}=this.view,u=a.multiply(n).multiply(new p(i.pos,1)).xy,d=i.size.multiply(.5);return b(u,o).subtract(d).add(l)}_hittestMarker(t,e,i){const{pos0:o,pos1:s,pos2:r}=this.computeHittestTriangle(t,e,i),l=this.hittestRequest.position,a=this.hittestRequest.distance,p=F(l,o,s,r);return h(x(p,a),p,this._hittestSamples(o,s,r,t,e,i))}computeHittestTriangle(t,e,i){const{pos:o,sizeCorrection:s,isMapAligned:r}=i,l=new p(t.offset.multiply(s),0),a=new p(e.offsetNextVertex1.multiply(s),0),n=new p(e.offsetNextVertex2.multiply(s),0),{viewMat3:u,tileMat3:d}=this.view,m=u.multiply(d).multiply(new p(o,1)),y=this._getViewScreenMatrix(r).multiply(i.vvRotationMat3).multiply(i.placementMat3);return{pos0:m.add(y.multiply(l)).xy,pos1:m.add(y.multiply(a)).xy,pos2:m.add(y.multiply(n)).xy}}_hittestSamples(t,e,i,o,s,r){const{outlineSize:l,isSDF:a,distanceToPx:p}=r,n=this.hittestRequest.position,u=this.hittestRequest.distance,m=O(n.add(new g(C(u),C(u))),t,e,i),h=O(n.add(new g(0,C(u))),t,e,i),c=O(n.add(new g(u,C(u))),t,e,i),x=O(n.add(new g(C(u),0)),t,e,i),v=O(n,t,e,i),V=O(n.add(new g(u,0)),t,e,i),f=O(n.add(new g(C(u),u)),t,e,i),w=O(n.add(new g(0,u)),t,e,i),S=O(n.add(new g(u,u)),t,e,i),b=o.textureUV.divide(this.mosaicInfo.size),z=s.textureUVNextVertex1.divide(this.mosaicInfo.size),_=s.textureUVNextVertex2.divide(this.mosaicInfo.size),R={color:new y(1),outlineColor:new y(1),overrideOutlineColor:new d(1),outlineSize:l,distanceToPx:p,isSDF:a};let j=new d(0);return j=j.add(k(m).multiply(this._getColor(ot(m,b,z,_),R).a)),j=j.add(k(h).multiply(this._getColor(ot(h,b,z,_),R).a)),j=j.add(k(c).multiply(this._getColor(ot(c,b,z,_),R).a)),j=j.add(k(x).multiply(this._getColor(ot(x,b,z,_),R).a)),j=j.add(k(v).multiply(this._getColor(ot(v,b,z,_),R).a)),j=j.add(k(V).multiply(this._getColor(ot(V,b,z,_),R).a)),j=j.add(k(f).multiply(this._getColor(ot(f,b,z,_),R).a)),j=j.add(k(w).multiply(this._getColor(ot(w,b,z,_),R).a)),j=j.add(k(S).multiply(this._getColor(ot(S,b,z,_),R).a)),M(j,new d(.05)).multiply(A(this.hittestRequest))}}t([o(L)],rt.prototype,"visualVariableColor",void 0),t([o(B)],rt.prototype,"visualVariableOpacity",void 0),t([o(E)],rt.prototype,"visualVariableRotation",void 0),t([o(J)],rt.prototype,"visualVariableSizeMinMaxValue",void 0),t([o(K)],rt.prototype,"visualVariableSizeScaleStops",void 0),t([o(Q)],rt.prototype,"visualVariableSizeStops",void 0),t([o(W)],rt.prototype,"visualVariableSizeUnitValue",void 0),t([s(P)],rt.prototype,"mosaicInfo",void 0),t([r(z)],rt.prototype,"mosaicTexture",void 0),t([e(0,l(tt)),e(1,l(et))],rt.prototype,"vertex",null),t([e(0,l(it))],rt.prototype,"fragment",null);export{it as MarkerFragmentInput,rt as MarkerShader,tt as MarkerVertexInput};
2
+ import{__decorate as t,__param as e}from"tslib";import{location as i,option as o,uniform as s,texture as r,input as l,ComputeVertexInput as a}from"../../GraphShaderModule.js";import{Vec3 as p,min as n,max as u,Float as d,Mat3 as m,Vec4 as y,ifElse as h,lessThan as c,greaterThan as x,equal as v,texture2D as V,clamp as f,abs as w,mix as S,distance as b,Vec2 as g,negate as C,step as M,Sampler2D as z}from"../../graph/glsl.js";import{MarkerConstants as _}from"./markerConstants.js";import{AFeatureShader as R,FeatureVertexInput as j,FeatureFragmentInput as U}from"../shaders/AFeatureShader.js";import{c256ToRad as N,noHit as T,trueHit as D,softEdgeRatio as q}from"../shaders/constants.js";import{isRectHittest as F,hittestScreenRect as O,distPointTriangle as k,xyToBarycentric as A,inTriangle as P,failHittest as I}from"../shaders/hittestUtils.js";import{MosaicInfo as H}from"../shaders/MosaicInfo.js";import{getBit as G,getBitBool as L,rgba2float as B}from"../shaders/utils.js";import{VisualVariableColor as E}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as J}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as K}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as Q}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as W}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as X}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as Y}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as Z,getVisualVariableColor as $,getVisualVariableSize as tt,getVisualVariableRotation as et}from"../shaders/vvUtils.js";class it extends j{}t([i(3,y)],it.prototype,"color",void 0),t([i(4,y)],it.prototype,"outlineColor",void 0),t([i(5,g)],it.prototype,"offset",void 0),t([i(6,g)],it.prototype,"textureUV",void 0),t([i(7,y)],it.prototype,"sizing",void 0),t([i(8,d)],it.prototype,"placementAngle",void 0),t([i(9,d)],it.prototype,"sdfDecodeCoeff",void 0),t([i(10,g)],it.prototype,"zoomRange",void 0);class ot extends a{}t([i(11,g)],ot.prototype,"offsetNextVertex1",void 0),t([i(12,g)],ot.prototype,"offsetNextVertex2",void 0),t([i(13,g)],ot.prototype,"textureUVNextVertex1",void 0),t([i(14,g)],ot.prototype,"textureUVNextVertex2",void 0);class st extends U{}function rt(t,e,i,o){return e.multiply(t.x).add(i.multiply(t.y)).add(o.multiply(t.z))}function lt(t){return t.multiply(t).divide(128)}class at extends R{constructor(){super(...arguments),this.type="MarkerShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"],textureUV:["textureUVNextVertex1","textureUVNextVertex2"]}}vertex(t,e){const i=lt(t.sizing.x),o=lt(t.sizing.y),s=lt(t.sizing.z),r=t.placementAngle,l=G(t.bitset,_.bitset.isSDF),a=G(t.bitset,_.bitset.isMapAligned),h=G(t.bitset,_.bitset.scaleSymbolsProportionally),c=L(t.bitset,_.bitset.colorLocked),x=Z(this,t.id),v=$(this,t.id,t.color,c).multiply(x),V=this.view.displayViewScreenMat3.multiply(new p(t.pos.xy,1)),f=tt(this,t.id,s).divide(s),w=i.multiply(f),S=t.offset.xy.multiply(f);let b=o.multiply(h.multiply(f.subtract(1)).add(1));b=n(b,u(w.subtract(.99),new d(0)));const g=u(b,new d(1)),C=n(b,new d(1)),M=m.fromRotation(r.multiply(N)),z=et(this,t.id),R=this._getViewRotationMatrix(a).multiply(z).multiply(M).multiply(new p(S.xy,0)),j=this.clip(t.id,t.zoomRange),U=new y(V.xy.add(R.xy),j,1),T=t.textureUV.divide(this.mosaicInfo.size),D=t.outlineColor.multiply(C),q=G(t.bitset,_.bitset.overrideOutlineColor),F=t.sdfDecodeCoeff.multiply(w);return{glPosition:U,color:v,textureUV:T,outlineColor:D,outlineSize:g,distanceToPx:F,isSDF:l,overrideOutlineColor:q,...this.maybeRunHittest(t,e,{pos:t.pos,size:w,sizeCorrection:f,isMapAligned:a,vvRotationMat3:z,placementMat3:M,outlineSize:g,distanceToPx:F,isSDF:l})}}fragment(t){const e=this._getColor(t.textureUV,t);return this.getFragmentOutput(e,t)}hittest(t,e,i){const{pos0:o,pos1:s,pos2:r}=this.computeHittestTriangle(t,e,i),l=F(this.hittestRequest);return h(l,()=>{const{tlbr:t}=this.hittestRequest;return O(o,s,r,t)},()=>{const o=h(c(i.size,this.hittestRequest.smallSymbolSizeThreshold),this._hittestSmallMarker(t,e,i),this._hittestMarker(t,e,i));return h(x(o,this.hittestRequest.distance),new d(T),new d(D))})}_getViewRotationMatrix(t){const e=this.view.displayViewMat3,i=this.view.displayMat3,o=new d(1).subtract(t);return e.multiply(t).add(i.multiply(o))}_getViewScreenMatrix(t){const e=this.view.viewMat3.multiply(this.view.tileMat3),i=this.view.tileMat3,o=new d(1).subtract(t);return e.multiply(t).add(i.multiply(o))}_getColor(t,e){return h(v(e.isSDF,new d(1)),this._getSDFColor(t,e),this._getSpriteColor(t,e))}_getSpriteColor(t,e){return V(this.mosaicTexture,t).multiply(e.color)}_getSDFColor(t,e){const i=V(this.mosaicTexture,t),o=new d(.5).subtract(B(i)).multiply(e.distanceToPx).multiply(q),s=f(new d(.5).subtract(o),new d(0),new d(1)),r=e.color.multiply(s);let l=e.outlineSize;this.highlight&&(l=u(l,e.overrideOutlineColor.multiply(4)));const a=l.multiply(.5),p=w(o).subtract(a),n=f(new d(.5).subtract(p),new d(0),new d(1)),m=S(e.outlineColor,e.color,e.overrideOutlineColor).multiply(n);return new d(1).subtract(m.a).multiply(r).add(m)}_hittestSmallMarker(t,e,i){const{position:o,distance:s,smallSymbolDistance:r}=this.hittestRequest,l=s.subtract(r),{viewMat3:a,tileMat3:n}=this.view,u=a.multiply(n).multiply(new p(i.pos,1)).xy,d=i.size.multiply(.5);return b(u,o).subtract(d).add(l)}_hittestMarker(t,e,i){const{pos0:o,pos1:s,pos2:r}=this.computeHittestTriangle(t,e,i),l=this.hittestRequest.position,a=this.hittestRequest.distance,p=k(l,o,s,r);return h(x(p,a),p,this._hittestSamples(o,s,r,t,e,i))}computeHittestTriangle(t,e,i){const{pos:o,sizeCorrection:s,isMapAligned:r}=i,l=new p(t.offset.multiply(s),0),a=new p(e.offsetNextVertex1.multiply(s),0),n=new p(e.offsetNextVertex2.multiply(s),0),{viewMat3:u,tileMat3:d}=this.view,m=u.multiply(d).multiply(new p(o,1)),y=this._getViewScreenMatrix(r).multiply(i.vvRotationMat3).multiply(i.placementMat3);return{pos0:m.add(y.multiply(l)).xy,pos1:m.add(y.multiply(a)).xy,pos2:m.add(y.multiply(n)).xy}}_hittestSamples(t,e,i,o,s,r){const{outlineSize:l,isSDF:a,distanceToPx:p}=r,n=this.hittestRequest.position,u=this.hittestRequest.distance,m=A(n.add(new g(C(u),C(u))),t,e,i),h=A(n.add(new g(0,C(u))),t,e,i),c=A(n.add(new g(u,C(u))),t,e,i),x=A(n.add(new g(C(u),0)),t,e,i),v=A(n,t,e,i),V=A(n.add(new g(u,0)),t,e,i),f=A(n.add(new g(C(u),u)),t,e,i),w=A(n.add(new g(0,u)),t,e,i),S=A(n.add(new g(u,u)),t,e,i),b=o.textureUV.divide(this.mosaicInfo.size),z=s.textureUVNextVertex1.divide(this.mosaicInfo.size),_=s.textureUVNextVertex2.divide(this.mosaicInfo.size),R={color:new y(1),outlineColor:new y(1),overrideOutlineColor:new d(1),outlineSize:l,distanceToPx:p,isSDF:a};let j=new d(0);return j=j.add(P(m).multiply(this._getColor(rt(m,b,z,_),R).a)),j=j.add(P(h).multiply(this._getColor(rt(h,b,z,_),R).a)),j=j.add(P(c).multiply(this._getColor(rt(c,b,z,_),R).a)),j=j.add(P(x).multiply(this._getColor(rt(x,b,z,_),R).a)),j=j.add(P(v).multiply(this._getColor(rt(v,b,z,_),R).a)),j=j.add(P(V).multiply(this._getColor(rt(V,b,z,_),R).a)),j=j.add(P(f).multiply(this._getColor(rt(f,b,z,_),R).a)),j=j.add(P(w).multiply(this._getColor(rt(w,b,z,_),R).a)),j=j.add(P(S).multiply(this._getColor(rt(S,b,z,_),R).a)),M(j,new d(.05)).multiply(I(this.hittestRequest))}}t([o(E)],at.prototype,"visualVariableColor",void 0),t([o(J)],at.prototype,"visualVariableOpacity",void 0),t([o(K)],at.prototype,"visualVariableRotation",void 0),t([o(Q)],at.prototype,"visualVariableSizeMinMaxValue",void 0),t([o(W)],at.prototype,"visualVariableSizeScaleStops",void 0),t([o(X)],at.prototype,"visualVariableSizeStops",void 0),t([o(Y)],at.prototype,"visualVariableSizeUnitValue",void 0),t([s(H)],at.prototype,"mosaicInfo",void 0),t([r(z)],at.prototype,"mosaicTexture",void 0),t([e(0,l(it)),e(1,l(ot))],at.prototype,"vertex",null),t([e(0,l(st))],at.prototype,"fragment",null);export{st as MarkerFragmentInput,at as MarkerShader,it as MarkerVertexInput};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{maxHighlightReasons as e}from"../../../definitions.js";import{GraphShaderModule as i,FragmentOutput as o,location as r,define as s,option as a,uniform as l,texture as h,VertexInput as g,ComputeVertexInput as u,FragmentInput as n}from"../../GraphShaderModule.js";import{Float as p,float as d,step as m,Vec4 as c,Vec3 as y,ifElse as w,equal as b,Vec2 as x}from"../../graph/glsl.js";import{EntityStorage as v,EntityStorageTextures as f}from"./EntityStorage.js";import{ShaderHighlight as C}from"./ShaderHighlight.js";import{ShaderHittest as H}from"./ShaderHittest.js";import{getFilterBit as V,getHighlightBit as D,getBit as A,uvToClip as T}from"./utils.js";import{ViewInfo as _}from"./ViewInfo.js";class j extends g{}t([r(0,y)],j.prototype,"id",void 0),t([r(1,p)],j.prototype,"bitset",void 0),t([r(2,x)],j.prototype,"pos",void 0);class R extends u{}t([r(14,x)],R.prototype,"nextPos1",void 0),t([r(15,x)],R.prototype,"nextPos2",void 0);class F extends n{}class S extends i{clip(t,e){let i=new p(0);const o=this.getFilterFlags(t);if(i=i.add(d(2).multiply(d(1).subtract(V(o,0)))),this.inside?i=i.add(d(2).multiply(d(1).subtract(V(o,1)))):this.outside?i=i.add(d(2).multiply(V(o,1))):this.highlight&&(i=i.add(d(2).multiply(d(1).subtract(this._checkHighlight(o))))),null!=e){const t=new p(1).subtract(m(e.x,this.view.currentZoom)),o=m(e.y,this.view.currentZoom);i=i.add(new p(2).multiply(t.add(o)))}return i}getFragmentOutput(t,e,i=new p(1/255)){const r=new o;return r.fragColor=this._maybeWriteHittest(e)??this._maybeHighlight(t,i)??t,r}_maybeHighlight(t,e){return this.highlight?new c(t.rgb,m(e,t.a)):null}_checkHighlight(t){let i=this._checkHighlightBit(t,0);for(let o=1;o<e;o++)i=i.add(this._checkHighlightBit(t,o));return m(new p(.1),i.add(this.highlight.highlightAll))}_checkHighlightBit(t,e){return D(t,e).multiply(A(this.highlight.activeReasons,e))}computeHittestTriangle(t,e,i){const{viewMat3:o,tileMat3:r}=this.view,s=o.multiply(r),{nextPos1:a,nextPos2:l}=e;return{pos0:s.multiply(new y(t.pos,1)).xy,pos1:s.multiply(new y(a,1)).xy,pos2:s.multiply(new y(l,1)).xy}}maybeRunHittest(t,e,i){if(null==this.hittestRequest)return null;const o=this.hittest(t,e,i);let r=w(b(o,new p(1)),new p(0),new p(2));const s=this.getAttributeDataCoords(t.id),a=T(s);r=r.add(this.clip(t.id,t.zoomRange));const l=new c(new p(1/255),0,0,0);return{glPointSize:new p(1),glPosition:new c(a,r,1),color:l}}_maybeWriteHittest(t){return null!=this.hittestRequest?t.color:null}getAttributeDataCoords(t){return this.storage.getAttributeDataCoords(t)}getVVData(t){return this.storageTextures.getVVData(this.getAttributeDataCoords(t))}getFilterFlags(t){return this.storageTextures.getFilterFlags(this.getAttributeDataCoords(t))}getLocalTimeOrigin(t){return this.storageTextures.getLocalTimeOrigin(this.getAttributeDataCoords(t))}getSizeValue(t){return this.storageTextures.getSizeValue(this.getAttributeDataCoords(t))}getColorValue(t){return this.storageTextures.getColorValue(this.getAttributeDataCoords(t))}getOpacityValue(t){return this.storageTextures.getOpacityValue(this.getAttributeDataCoords(t))}getRotationValue(t){return this.storageTextures.getRotationValue(this.getAttributeDataCoords(t))}}t([s],S.prototype,"inside",void 0),t([s],S.prototype,"outside",void 0),t([a(C)],S.prototype,"highlight",void 0),t([l(v)],S.prototype,"storage",void 0),t([h(f)],S.prototype,"storageTextures",void 0),t([l(_)],S.prototype,"view",void 0),t([a(H)],S.prototype,"hittestRequest",void 0);export{S as AFeatureShader,R as BaseHittestVertexInput,F as FeatureFragmentInput,j as FeatureVertexInput};
2
+ import{__decorate as t}from"tslib";import{maxHighlightReasons as e}from"../../../definitions.js";import{GraphShaderModule as i,FragmentOutput as o,location as r,define as s,option as a,uniform as l,texture as h,VertexInput as g,ComputeVertexInput as n,FragmentInput as u}from"../../GraphShaderModule.js";import{Float as p,float as d,step as m,Vec4 as c,Vec3 as y,equal as w,ifElse as b,or as x,Vec2 as v}from"../../graph/glsl.js";import{trueHit as f,candidateHit as C,noHit as H}from"./constants.js";import{EntityStorage as V,EntityStorageTextures as D}from"./EntityStorage.js";import{ShaderHighlight as A}from"./ShaderHighlight.js";import{ShaderHittest as T}from"./ShaderHittest.js";import{getFilterBit as j,getHighlightBit as _,getBit as R,uvToClip as F}from"./utils.js";import{ViewInfo as S}from"./ViewInfo.js";class P extends g{}t([r(0,y)],P.prototype,"id",void 0),t([r(1,p)],P.prototype,"bitset",void 0),t([r(2,v)],P.prototype,"pos",void 0);class k extends n{}t([r(14,v)],k.prototype,"nextPos1",void 0),t([r(15,v)],k.prototype,"nextPos2",void 0);class O extends u{}class z extends i{clip(t,e){let i=new p(0);const o=this.getFilterFlags(t);if(i=i.add(d(2).multiply(d(1).subtract(j(o,0)))),this.inside?i=i.add(d(2).multiply(d(1).subtract(j(o,1)))):this.outside?i=i.add(d(2).multiply(j(o,1))):this.highlight&&(i=i.add(d(2).multiply(d(1).subtract(this._checkHighlight(o))))),null!=e){const t=new p(1).subtract(m(e.x,this.view.currentZoom)),o=m(e.y,this.view.currentZoom);i=i.add(new p(2).multiply(t.add(o)))}return i}getFragmentOutput(t,e,i=new p(1/255)){const r=new o;return r.fragColor=this._maybeWriteHittest(e)??this._maybeHighlight(t,i)??t,r}_maybeHighlight(t,e){return this.highlight?new c(t.rgb,m(e,t.a)):null}_checkHighlight(t){let i=this._checkHighlightBit(t,0);for(let o=1;o<e;o++)i=i.add(this._checkHighlightBit(t,o));return m(new p(.1),i.add(this.highlight.highlightAll))}_checkHighlightBit(t,e){return _(t,e).multiply(R(this.highlight.activeReasons,e))}computeHittestTriangle(t,e,i){const{viewMat3:o,tileMat3:r}=this.view,s=o.multiply(r),{nextPos1:a,nextPos2:l}=e;return{pos0:s.multiply(new y(t.pos,1)).xy,pos1:s.multiply(new y(a,1)).xy,pos2:s.multiply(new y(l,1)).xy}}maybeRunHittest(t,e,i){if(null==this.hittestRequest)return null;const o=this.hittest(t,e,i),r=w(o,new p(f)),s=w(o,new p(C)),a=b(s,()=>new c(new p(1/255),0,0,0),b(r,()=>new c(new p(2/255),0,0,0),new c(H)));let l=b(x(r,s),new p(0),new p(2));const h=this.getAttributeDataCoords(t.id),g=F(h);return l=l.add(this.clip(t.id,t.zoomRange)),{glPointSize:new p(1),glPosition:new c(g,l,1),color:a}}_maybeWriteHittest(t){return null!=this.hittestRequest?t.color:null}getAttributeDataCoords(t){return this.storage.getAttributeDataCoords(t)}getVVData(t){return this.storageTextures.getVVData(this.getAttributeDataCoords(t))}getFilterFlags(t){return this.storageTextures.getFilterFlags(this.getAttributeDataCoords(t))}getLocalTimeOrigin(t){return this.storageTextures.getLocalTimeOrigin(this.getAttributeDataCoords(t))}getSizeValue(t){return this.storageTextures.getSizeValue(this.getAttributeDataCoords(t))}getColorValue(t){return this.storageTextures.getColorValue(this.getAttributeDataCoords(t))}getOpacityValue(t){return this.storageTextures.getOpacityValue(this.getAttributeDataCoords(t))}getRotationValue(t){return this.storageTextures.getRotationValue(this.getAttributeDataCoords(t))}}t([s],z.prototype,"inside",void 0),t([s],z.prototype,"outside",void 0),t([a(A)],z.prototype,"highlight",void 0),t([l(V)],z.prototype,"storage",void 0),t([h(D)],z.prototype,"storageTextures",void 0),t([l(S)],z.prototype,"view",void 0),t([a(T)],z.prototype,"hittestRequest",void 0);export{z as AFeatureShader,k as BaseHittestVertexInput,O as FeatureFragmentInput,P as FeatureVertexInput};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t,__param as e}from"tslib";import{location as o,option as r,input as s}from"../../GraphShaderModule.js";import{Vec3 as i,Vec4 as l,Float as p,ifElse as n,greaterThan as a,Vec2 as u}from"../../graph/glsl.js";import{AFeatureShader as m,BaseHittestVertexInput as h,FeatureFragmentInput as c,FeatureVertexInput as d}from"./AFeatureShader.js";import{isRectHittest as y,hittestFill as v,hittestScreenRect as f}from"./hittestUtils.js";import{VisualVariableColor as g}from"./VisualVariableColor.js";import{VisualVariableOpacity as x}from"./VisualVariableOpacity.js";import{getVisualVariableOpacity as b,getVisualVariableColor as j}from"./vvUtils.js";class w extends d{}t([o(3,l)],w.prototype,"color",void 0),t([o(4,u)],w.prototype,"zoomRange",void 0);class V extends m{constructor(){super(...arguments),this.type="FillShader",this.computeAttributes={pos:["nextPos1","nextPos2"]}}vertex(t,e){const o=b(this,t.id),r=j(this,t.id,t.color).multiply(o),s=this.view.displayViewScreenMat3.multiply(new i(t.pos.xy,1)),p=this.clip(t.id,t.zoomRange);return{glPosition:new l(s.xy,p,1),color:r,...this.maybeRunHittest(t,e,null)}}fragment(t){return this.getFragmentOutput(t.color,t,new p(0))}hittest(t,e){const{pos0:o,pos1:r,pos2:s}=this.computeHittestTriangle(t,e,null),i=y(this.hittestRequest);return n(i,()=>{const{tlbr:t}=this.hittestRequest;return f(o,r,s,t)},()=>{const o=v(this,t,e);return n(a(o,this.hittestRequest.distance),new p(0),new p(1))})}}t([r(g)],V.prototype,"visualVariableColor",void 0),t([r(x)],V.prototype,"visualVariableOpacity",void 0),t([e(0,s(w)),e(1,s(h))],V.prototype,"vertex",null),t([e(0,s(c))],V.prototype,"fragment",null);export{V as FillShader,w as FillVertexInput};
2
+ import{__decorate as t,__param as o}from"tslib";import{location as e,option as s,input as r}from"../../GraphShaderModule.js";import{Vec3 as i,Vec4 as l,Float as p,ifElse as n,greaterThan as a,Vec2 as m}from"../../graph/glsl.js";import{AFeatureShader as u,BaseHittestVertexInput as h,FeatureFragmentInput as c,FeatureVertexInput as d}from"./AFeatureShader.js";import{noHit as y,trueHit as f}from"./constants.js";import{isRectHittest as v,hittestFill as g,hittestScreenRect as x}from"./hittestUtils.js";import{VisualVariableColor as b}from"./VisualVariableColor.js";import{VisualVariableOpacity as j}from"./VisualVariableOpacity.js";import{getVisualVariableOpacity as w,getVisualVariableColor as V}from"./vvUtils.js";class R extends d{}t([e(3,l)],R.prototype,"color",void 0),t([e(4,m)],R.prototype,"zoomRange",void 0);class S extends u{constructor(){super(...arguments),this.type="FillShader",this.computeAttributes={pos:["nextPos1","nextPos2"]}}vertex(t,o){const e=w(this,t.id),s=V(this,t.id,t.color).multiply(e),r=this.view.displayViewScreenMat3.multiply(new i(t.pos.xy,1)),p=this.clip(t.id,t.zoomRange);return{glPosition:new l(r.xy,p,1),color:s,...this.maybeRunHittest(t,o,null)}}fragment(t){return this.getFragmentOutput(t.color,t,new p(0))}hittest(t,o){const{pos0:e,pos1:s,pos2:r}=this.computeHittestTriangle(t,o,null),i=v(this.hittestRequest);return n(i,()=>{const{tlbr:t}=this.hittestRequest;return x(e,s,r,t)},()=>{const e=g(this,t,o);return n(a(e,this.hittestRequest.distance),new p(y),new p(f))})}}t([s(b)],S.prototype,"visualVariableColor",void 0),t([s(j)],S.prototype,"visualVariableOpacity",void 0),t([o(0,r(R)),o(1,r(h))],S.prototype,"vertex",null),t([o(0,r(c))],S.prototype,"fragment",null);export{S as FillShader,R as FillVertexInput};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t,__param as i}from"tslib";import{location as e,uniform as o,option as l,input as r,UniformGroup as a}from"../../GraphShaderModule.js";import{step as s,min as n,ifElse as p,greaterThan as u,Float as m,length as d,clamp as y,max as c,Vec3 as f,Vec4 as h,Vec2 as v}from"../../graph/glsl.js";import{AFeatureShader as w,BaseHittestVertexInput as b,FeatureVertexInput as V,FeatureFragmentInput as S}from"./AFeatureShader.js";import{thinLineWidthFactor as g,thinLineHalfWidth as x,epsilon as j}from"./constants.js";import{isRectHittest as z,distPointSegment as W,hittestScreenRect as M}from"./hittestUtils.js";import{VisualVariableColor as R}from"./VisualVariableColor.js";import{VisualVariableOpacity as C}from"./VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as H}from"./VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as O}from"./VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as U}from"./VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as q}from"./VisualVariableSizeUnitValue.js";import{getVisualVariableColor as P,getVisualVariableOpacity as A,hasVisualVariableSize as F,getVisualVariableSize as T}from"./vvUtils.js";class D extends V{}t([e(3,h)],D.prototype,"color",void 0),t([e(4,v)],D.prototype,"offset",void 0),t([e(5,v)],D.prototype,"normal",void 0),t([e(6,m)],D.prototype,"halfWidth",void 0),t([e(7,m)],D.prototype,"referenceHalfWidth",void 0),t([e(8,v)],D.prototype,"zoomRange",void 0);class G extends S{}class L extends a{}function k(t){return c(new m(g).multiply(s(t,new m(x))),new m(1))}function B(t,i){const{halfWidth:e,normal:o}=t,l=k(e),r=d(o).multiply(e);return y(l.multiply(e.subtract(r)).divide(i.add(l).subtract(new m(1))),new m(0),new m(1))}function E(t,i){const{id:e,halfWidth:o,referenceHalfWidth:l}=i;if(F(t)){const i=new m(2).multiply(l),r=T(t,e,i);return new m(.5).multiply(o.divide(c(l,new m(j)))).multiply(r)}return o}function I(t,i){const{id:e,offset:o,pos:l,normal:r,zoomRange:a}=i,{displayViewScreenMat3:n,displayViewMat3:p}=t.view,u=P(t,e,i.color),d=A(t,e),y=E(t,i),v=new m(.5).multiply(t.antialiasingControls.antialiasing),w=c(y.add(v),new m(.45)).add(new m(.1).multiply(v)),b=k(w).multiply(w).multiply(o),V=p.multiply(new f(b,new m(0))),S=n.multiply(new f(l,new m(1))).add(V),g=new m(2).multiply(s(y,new m(0))).add(t.clip(e,a)),x=new h(S.xy,g,1);return{color:u,opacity:d,halfWidth:w,normal:r,scaledOffset:b,scaledHalfWidth:y,glPosition:new h(x.xy,g,1)}}function J(t,i){const{opacity:e,color:o}=t,l=B(t,i);return e.multiply(o).multiply(l)}t([o(m)],L.prototype,"antialiasing",void 0),t([o(m)],L.prototype,"blur",void 0);class K extends w{constructor(){super(...arguments),this.type="LineShader",this.computeAttributes={pos:["nextPos1","nextPos2"]}}vertex(t,i){const e=I(this,t);return{...e,...this.maybeRunHittest(t,i,e.halfWidth)}}fragment(t){const i=J(t,this.antialiasingControls.blur);return this.getFragmentOutput(i,t)}hittest(t,i,e){const{pos0:o,pos1:l,pos2:r}=this.computeHittestTriangle(t,i,null),a=z(this.hittestRequest),{distance:d,smallSymbolDistance:y,smallSymbolSizeThreshold:c,tlbr:f}=this.hittestRequest,h=s(e,c.multiply(.5)).multiply(d.subtract(y)),v=this.hittestRequest.position,w=n(W(v,o,l),W(v,o,r)).subtract(e).add(h);return p(a,M(o,l,r,f),p(u(w,d),new m(0),new m(1)))}}t([o(L)],K.prototype,"antialiasingControls",void 0),t([l(R)],K.prototype,"visualVariableColor",void 0),t([l(C)],K.prototype,"visualVariableOpacity",void 0),t([l(H)],K.prototype,"visualVariableSizeMinMaxValue",void 0),t([l(O)],K.prototype,"visualVariableSizeScaleStops",void 0),t([l(U)],K.prototype,"visualVariableSizeStops",void 0),t([l(q)],K.prototype,"visualVariableSizeUnitValue",void 0),t([i(0,r(D)),i(1,r(b))],K.prototype,"vertex",null),t([i(0,r(G))],K.prototype,"fragment",null);export{L as AntialiasingControls,G as LineFragmentInput,K as LineShader,D as LineVertexInput,B as getLineAntialiasing,J as getLineFragmentColor,k as getLineThinFactor,I as getLineVertexData};
2
+ import{__decorate as t,__param as i}from"tslib";import{location as e,uniform as o,option as l,input as r,UniformGroup as a}from"../../GraphShaderModule.js";import{step as s,min as n,ifElse as p,greaterThan as u,Float as m,length as d,clamp as y,max as c,Vec3 as f,Vec4 as h,Vec2 as v}from"../../graph/glsl.js";import{AFeatureShader as w,BaseHittestVertexInput as b,FeatureVertexInput as V,FeatureFragmentInput as S}from"./AFeatureShader.js";import{noHit as g,trueHit as x,thinLineWidthFactor as j,thinLineHalfWidth as z,epsilon as W}from"./constants.js";import{isRectHittest as M,distPointSegment as R,hittestScreenRect as C}from"./hittestUtils.js";import{VisualVariableColor as H}from"./VisualVariableColor.js";import{VisualVariableOpacity as O}from"./VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as U}from"./VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as q}from"./VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as P}from"./VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as A}from"./VisualVariableSizeUnitValue.js";import{getVisualVariableColor as F,getVisualVariableOpacity as T,hasVisualVariableSize as D,getVisualVariableSize as G}from"./vvUtils.js";class L extends V{}t([e(3,h)],L.prototype,"color",void 0),t([e(4,v)],L.prototype,"offset",void 0),t([e(5,v)],L.prototype,"normal",void 0),t([e(6,m)],L.prototype,"halfWidth",void 0),t([e(7,m)],L.prototype,"referenceHalfWidth",void 0),t([e(8,v)],L.prototype,"zoomRange",void 0);class k extends S{}class B extends a{}function E(t){return c(new m(j).multiply(s(t,new m(z))),new m(1))}function I(t,i){const{halfWidth:e,normal:o}=t,l=E(e),r=d(o).multiply(e);return y(l.multiply(e.subtract(r)).divide(i.add(l).subtract(new m(1))),new m(0),new m(1))}function J(t,i){const{id:e,halfWidth:o,referenceHalfWidth:l}=i;if(D(t)){const i=new m(2).multiply(l),r=G(t,e,i);return new m(.5).multiply(o.divide(c(l,new m(W)))).multiply(r)}return o}function K(t,i){const{id:e,offset:o,pos:l,normal:r,zoomRange:a}=i,{displayViewScreenMat3:n,displayViewMat3:p}=t.view,u=F(t,e,i.color),d=T(t,e),y=J(t,i),v=new m(.5).multiply(t.antialiasingControls.antialiasing),w=c(y.add(v),new m(.45)).add(new m(.1).multiply(v)),b=E(w).multiply(w).multiply(o),V=p.multiply(new f(b,new m(0))),S=n.multiply(new f(l,new m(1))).add(V),g=new m(2).multiply(s(y,new m(0))).add(t.clip(e,a)),x=new h(S.xy,g,1);return{color:u,opacity:d,halfWidth:w,normal:r,scaledOffset:b,scaledHalfWidth:y,glPosition:new h(x.xy,g,1)}}function N(t,i){const{opacity:e,color:o}=t,l=I(t,i);return e.multiply(o).multiply(l)}t([o(m)],B.prototype,"antialiasing",void 0),t([o(m)],B.prototype,"blur",void 0);class Q extends w{constructor(){super(...arguments),this.type="LineShader",this.computeAttributes={pos:["nextPos1","nextPos2"]}}vertex(t,i){const e=K(this,t);return{...e,...this.maybeRunHittest(t,i,e.halfWidth)}}fragment(t){const i=N(t,this.antialiasingControls.blur);return this.getFragmentOutput(i,t)}hittest(t,i,e){const{pos0:o,pos1:l,pos2:r}=this.computeHittestTriangle(t,i,null),a=M(this.hittestRequest),{distance:d,smallSymbolDistance:y,smallSymbolSizeThreshold:c,tlbr:f}=this.hittestRequest,h=s(e,c.multiply(.5)).multiply(d.subtract(y)),v=this.hittestRequest.position,w=n(R(v,o,l),R(v,o,r)).subtract(e).add(h);return p(a,C(o,l,r,f),p(u(w,d),new m(g),new m(x)))}}t([o(B)],Q.prototype,"antialiasingControls",void 0),t([l(H)],Q.prototype,"visualVariableColor",void 0),t([l(O)],Q.prototype,"visualVariableOpacity",void 0),t([l(U)],Q.prototype,"visualVariableSizeMinMaxValue",void 0),t([l(q)],Q.prototype,"visualVariableSizeScaleStops",void 0),t([l(P)],Q.prototype,"visualVariableSizeStops",void 0),t([l(A)],Q.prototype,"visualVariableSizeUnitValue",void 0),t([i(0,r(L)),i(1,r(b))],Q.prototype,"vertex",null),t([i(0,r(k))],Q.prototype,"fragment",null);export{B as AntialiasingControls,k as LineFragmentInput,Q as LineShader,L as LineVertexInput,I as getLineAntialiasing,N as getLineFragmentColor,E as getLineThinFactor,K as getLineVertexData};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t,__param as o}from"tslib";import{location as i,uniform as e,option as r,input as s}from"../../GraphShaderModule.js";import{greaterThan as a,Float as l,ifElse as p,Vec3 as n,Vec4 as u,Vec2 as m}from"../../graph/glsl.js";import{AFeatureShader as c,BaseHittestVertexInput as d,FeatureVertexInput as h}from"./AFeatureShader.js";import{bitsetTypeFillOutline as f,bitsetOutlineUsesColorVV as y}from"./constants.js";import{isRectHittest as v,failHittest as V,hittestFill as S,hittestScreenRect as b}from"./hittestUtils.js";import{getLineFragmentColor as j,getLineVertexData as x,AntialiasingControls as g,LineFragmentInput as w}from"./LineShader.js";import{getBit as z,getBitBool as M}from"./utils.js";import{VisualVariableColor as O}from"./VisualVariableColor.js";import{VisualVariableOpacity as R}from"./VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as q}from"./VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as C}from"./VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as P}from"./VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as U}from"./VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as W,getVisualVariableColor as F}from"./vvUtils.js";class H extends h{}t([i(3,m)],H.prototype,"offset",void 0),t([i(4,u)],H.prototype,"color",void 0),t([i(5,m)],H.prototype,"normal",void 0),t([i(6,l)],H.prototype,"halfWidth",void 0),t([i(7,l)],H.prototype,"referenceHalfWidth",void 0),t([i(8,m)],H.prototype,"zoomRange",void 0);class A extends w{}function G(t,o,i){const{id:e,bitset:r}=o,s=z(r,f),m=a(s,new l(.5)),c=x(t,o),d=p(m,c.halfWidth,new l(0)),h=W(t,e),v=F(t,e,o.color),V=p(m,p(M(r,y),v,o.color),v.multiply(h)),S=t.view.displayViewScreenMat3.multiply(new n(o.pos.xy,1)),b=t.clip(o.id),j=new u(S.xy,b,1),g=p(m,c.glPosition,j),w=i&&t.maybeRunHittest(o,i,m);return{isOutline:s,color:V,opacity:new l(1),halfWidth:d,normal:c.normal,glPosition:g,...w}}class L extends c{constructor(){super(...arguments),this.computeAttributes={pos:["nextPos1","nextPos2"]}}}t([e(g)],L.prototype,"antialiasingControls",void 0),t([r(O)],L.prototype,"visualVariableColor",void 0),t([r(R)],L.prototype,"visualVariableOpacity",void 0),t([r(q)],L.prototype,"visualVariableSizeMinMaxValue",void 0),t([r(C)],L.prototype,"visualVariableSizeScaleStops",void 0),t([r(P)],L.prototype,"visualVariableSizeStops",void 0),t([r(U)],L.prototype,"visualVariableSizeUnitValue",void 0);class T extends L{constructor(){super(...arguments),this.type="OutlineFillShader"}vertex(t,o){return G(this,t,o)}fragment(t){const{color:o,isOutline:i}=t,e=a(i,new l(.5)),r=j(t,this.antialiasingControls.blur),s=p(e,r,o),n=p(e,new l(1/255),new l(0));return this.getFragmentOutput(s,t,n)}hittest(t,o,i){const{pos0:e,pos1:r,pos2:s}=this.computeHittestTriangle(t,o,null),n=v(this.hittestRequest);return p(n,()=>{const{tlbr:t}=this.hittestRequest;return b(e,r,s,t)},()=>{const e=p(i,V(this.hittestRequest),S(this,t,o));return p(a(e,this.hittestRequest.distance),new l(0),new l(1))})}}t([o(0,s(H)),o(1,s(d))],T.prototype,"vertex",null),t([o(0,s(A))],T.prototype,"fragment",null);export{L as AOutlineFillShader,A as OutlineFillFragmentInput,T as OutlineFillShader,H as OutlineFillVertexInput,G as getOutlineFillVertexData};
2
+ import{__decorate as t,__param as o}from"tslib";import{location as i,uniform as e,option as r,input as s}from"../../GraphShaderModule.js";import{greaterThan as a,Float as l,ifElse as p,Vec3 as n,Vec4 as u,Vec2 as m}from"../../graph/glsl.js";import{AFeatureShader as c,BaseHittestVertexInput as d,FeatureVertexInput as h}from"./AFeatureShader.js";import{noHit as f,trueHit as y,bitsetTypeFillOutline as v,bitsetOutlineUsesColorVV as V}from"./constants.js";import{isRectHittest as S,failHittest as b,hittestFill as j,hittestScreenRect as x}from"./hittestUtils.js";import{getLineFragmentColor as g,getLineVertexData as w,AntialiasingControls as z,LineFragmentInput as M}from"./LineShader.js";import{getBit as O,getBitBool as R}from"./utils.js";import{VisualVariableColor as q}from"./VisualVariableColor.js";import{VisualVariableOpacity as C}from"./VisualVariableOpacity.js";import{VisualVariableSizeMinMaxValue as P}from"./VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as U}from"./VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as W}from"./VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as F}from"./VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as H,getVisualVariableColor as A}from"./vvUtils.js";class G extends h{}t([i(3,m)],G.prototype,"offset",void 0),t([i(4,u)],G.prototype,"color",void 0),t([i(5,m)],G.prototype,"normal",void 0),t([i(6,l)],G.prototype,"halfWidth",void 0),t([i(7,l)],G.prototype,"referenceHalfWidth",void 0),t([i(8,m)],G.prototype,"zoomRange",void 0);class L extends M{}function T(t,o,i){const{id:e,bitset:r}=o,s=O(r,v),m=a(s,new l(.5)),c=w(t,o),d=p(m,c.halfWidth,new l(0)),h=H(t,e),f=A(t,e,o.color),y=p(m,p(R(r,V),f,o.color),f.multiply(h)),S=t.view.displayViewScreenMat3.multiply(new n(o.pos.xy,1)),b=t.clip(o.id),j=new u(S.xy,b,1),x=p(m,c.glPosition,j),g=i&&t.maybeRunHittest(o,i,m);return{isOutline:s,color:y,opacity:new l(1),halfWidth:d,normal:c.normal,glPosition:x,...g}}class k extends c{constructor(){super(...arguments),this.computeAttributes={pos:["nextPos1","nextPos2"]}}}t([e(z)],k.prototype,"antialiasingControls",void 0),t([r(q)],k.prototype,"visualVariableColor",void 0),t([r(C)],k.prototype,"visualVariableOpacity",void 0),t([r(P)],k.prototype,"visualVariableSizeMinMaxValue",void 0),t([r(U)],k.prototype,"visualVariableSizeScaleStops",void 0),t([r(W)],k.prototype,"visualVariableSizeStops",void 0),t([r(F)],k.prototype,"visualVariableSizeUnitValue",void 0);class B extends k{constructor(){super(...arguments),this.type="OutlineFillShader"}vertex(t,o){return T(this,t,o)}fragment(t){const{color:o,isOutline:i}=t,e=a(i,new l(.5)),r=g(t,this.antialiasingControls.blur),s=p(e,r,o),n=p(e,new l(1/255),new l(0));return this.getFragmentOutput(s,t,n)}hittest(t,o,i){const{pos0:e,pos1:r,pos2:s}=this.computeHittestTriangle(t,o,null),n=S(this.hittestRequest);return p(n,()=>{const{tlbr:t}=this.hittestRequest;return x(e,r,s,t)},()=>{const e=p(i,b(this.hittestRequest),j(this,t,o));return p(a(e,this.hittestRequest.distance),new l(f),new l(y))})}}t([o(0,s(G)),o(1,s(d))],B.prototype,"vertex",null),t([o(0,s(L))],B.prototype,"fragment",null);export{k as AOutlineFillShader,L as OutlineFillFragmentInput,B as OutlineFillShader,G as OutlineFillVertexInput,T as getOutlineFillVertexData};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- const e=3.14159265359/180,o=3.14159265359/128,t=180/3.141592654,c=1/8,n=1,p=1,r=1.1,s=1,x=1/4,a=1/8,b=.2,d=8,f=1e-5,g=.05,h=2,i=0,j=1,k=2,l=3,m=1e-30,q=1,u=4,v=0,w=2,y=3,z=0,A=2,B=2,C=3,D=0,E=3,F=16777216,G=1.1,H=16,I=128,J=1;export{j as attrVvColor,k as attrVvOpacity,l as attrVvRotation,i as attrVvSize,A as bitsetFillRandomPatternOffset,u as bitsetGenericConsiderAlphaOnly,q as bitsetGenericLockColor,C as bitsetLineIsSdf,B as bitsetLineScaleDash,v as bitsetMarkerAlignmentMap,w as bitsetMarkerOutlineAllowColorOverride,y as bitsetMarkerScaleSymbolsProportionally,J as bitsetOutlineUsesColorVV,D as bitsetTextIsBackground,E as bitsetTextIsMapAligned,z as bitsetTypeFillOutline,o as c256ToRad,e as cDegToRad,t as cRadToDeg,f as epsilon,g as epsilonHitTest,x as extrudeScalePlacementPadding,n as fillPositionPrecision,G as magnifierBarrelFactor,h as maxFilterCount,F as maxRepresentableInt,m as nanMagicNumber,a as offsetPrecision,b as outlineScale,H as packPrecision,d as placementPadding,c as positionPrecision,I as signedToUnsignedByte,p as softEdgeRatio,s as thinLineHalfWidth,r as thinLineWidthFactor};
2
+ const e=3.14159265359/180,o=3.14159265359/128,t=180/3.141592654,c=1/8,n=1,p=1,r=1.1,s=1,x=1/4,a=1/8,b=.2,d=8,f=1e-5,g=.05,h=2,i=0,j=1,k=2,l=3,m=1e-30,q=1,u=4,v=0,w=2,y=3,z=0,A=2,B=2,C=3,D=0,E=3,F=16777216,G=1.1,H=16,I=128,J=1,K=0,L=1,M=2;export{j as attrVvColor,k as attrVvOpacity,l as attrVvRotation,i as attrVvSize,A as bitsetFillRandomPatternOffset,u as bitsetGenericConsiderAlphaOnly,q as bitsetGenericLockColor,C as bitsetLineIsSdf,B as bitsetLineScaleDash,v as bitsetMarkerAlignmentMap,w as bitsetMarkerOutlineAllowColorOverride,y as bitsetMarkerScaleSymbolsProportionally,J as bitsetOutlineUsesColorVV,D as bitsetTextIsBackground,E as bitsetTextIsMapAligned,z as bitsetTypeFillOutline,o as c256ToRad,e as cDegToRad,t as cRadToDeg,L as candidateHit,f as epsilon,g as epsilonHitTest,x as extrudeScalePlacementPadding,n as fillPositionPrecision,G as magnifierBarrelFactor,h as maxFilterCount,F as maxRepresentableInt,m as nanMagicNumber,K as noHit,a as offsetPrecision,b as outlineScale,H as packPrecision,d as placementPadding,c as positionPrecision,I as signedToUnsignedByte,p as softEdgeRatio,s as thinLineHalfWidth,r as thinLineWidthFactor,M as trueHit};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{clamp as t,Float as y,length as n,distance as u,Vec3 as r,and as x,greaterThan as e,lessThan as i,cond as l,not as c,Mat3 as s,abs as a,step as d,greaterThanEqual as o,Vec2 as w,min as b,max as p,or as m,ifElse as f,dot as v,normalize as j,equal as g,lessThanEqual as h}from"../../graph/glsl.js";import{epsilonHitTest as z}from"./constants.js";import{cross2 as M}from"./utils.js";function P(t,y){return v(t,j(y))}function q(r,x,e){const i=e.subtract(x),l=P(r.subtract(x),i),c=t(l.divide(n(i)),new y(0),new y(1));return u(r,x.add(c.multiply(e.subtract(x))))}function R(t){const n=a(t);return d(n.x.add(n.y).add(n.z),new y(1.05))}function k(t,n,u,x){const e=new s(u.x.multiply(x.y).subtract(x.x.multiply(u.y)),x.x.multiply(n.y).subtract(n.x.multiply(x.y)),n.x.multiply(u.y).subtract(u.x.multiply(n.y)),u.y.subtract(x.y),x.y.subtract(n.y),n.y.subtract(u.y),x.x.subtract(u.x),n.x.subtract(x.x),u.x.subtract(n.x)),i=n.x.multiply(u.y.subtract(x.y)),l=u.x.multiply(x.y.subtract(n.y)),c=x.x.multiply(n.y.subtract(u.y)),a=i.add(l).add(c);return new y(1).divide(a).multiply(e.multiply(new r(1,t)))}function A(t,n,u,r){return g(R(k(t,n,u,r)),new y(1))}function B(t,n,u,r){const s=u.subtract(n),a=r.subtract(n),d=M(s,a),o=x(i(d,new y(z)),e(d,new y(-z)));return l([x(c(o),A(t.xy,n,u,r)),new y(-1)],[!0,()=>{const y=q(t,n,u),x=q(t,u,r),e=q(t,r,n);return b(b(y,x),e)}])}function C(t){return t.distance.add(1)}function D(t,y,n){const{viewMat3:u,tileMat3:x}=t.view,e=u.multiply(x),i=e.multiply(new r(y.pos,1)),l=e.multiply(new r(n.nextPos1,1)),c=e.multiply(new r(n.nextPos2,1));return B(t.hittestRequest.position,i.xy,l.xy,c.xy)}function E(t,y,n){return u(t,n).subtract(y)}function F(t,n,u,r){const e=t.x,i=t.y,l=n.x,s=n.y,a=u.x,d=u.y,w=r.x,b=r.y,p=w.subtract(a),m=e.subtract(a),v=l.subtract(e),j=b.subtract(d),z=i.subtract(d),M=s.subtract(i),P=j.multiply(v).subtract(p.multiply(M)),q=p.multiply(z).subtract(j.multiply(m)).divide(P),R=v.multiply(z).subtract(M.multiply(m)).divide(P),k=x(c(g(P,new y(0))),x(x(o(q,new y(0)),h(q,new y(1))),x(o(R,new y(0)),h(R,new y(1)))));return f(k,new y(1),new y(0))}function G(t,y,n,u,r){return x(x(o(t.x,y),o(t.y,n)),x(i(t.x,u),h(t.y,r)))}function H(t,n,u,r){const x=r.xy,i=r.zw,l=new w(i.x,x.y),c=new w(x.x,i.y),s=b(x.x,i.x),a=b(x.y,i.y),d=p(x.x,i.x),o=p(x.y,i.y),v=G(t.xy,s,a,d,o),j=G(n.xy,s,a,d,o),g=G(u.xy,s,a,d,o),h=m(v,j),z=F(x,l,t.xy,n.xy).add(F(l,i,t.xy,n.xy)).add(F(c,i,t.xy,n.xy)).add(F(c,x,t.xy,n.xy)),M=m(h,e(z,new y(0))),P=m(v,g),q=F(x,l,t.xy,u.xy).add(F(l,i,t.xy,u.xy)).add(F(c,i,t.xy,u.xy)).add(F(c,x,t.xy,u.xy)),R=m(P,e(q,new y(0))),k=m(j,g),A=F(x,l,n.xy,u.xy).add(F(l,i,n.xy,u.xy)).add(F(c,i,n.xy,u.xy)).add(F(c,x,n.xy,u.xy)),B=m(k,e(A,new y(0)));return f(m(M,R,B),new y(1),new y(0))}function I(t){return x(x(o(t.tlbr.x,new y(0)),o(t.tlbr.x,new y(0))),x(o(t.tlbr.y,new y(0)),o(t.tlbr.y,new y(0))))}export{q as distPointSegment,B as distPointTriangle,C as failHittest,D as hittestFill,E as hittestMarker,H as hittestScreenRect,R as inTriangle,I as isRectHittest,G as pointInRect,P as projectScalar,F as segmentIntersects,k as xyToBarycentric};
2
+ import{clamp as t,Float as n,length as y,distance as u,Vec3 as e,and as r,greaterThan as x,lessThan as i,cond as l,not as c,Mat3 as s,abs as a,step as w,greaterThanEqual as d,Vec2 as o,min as b,max as p,equal as m,or as f,ifElse as v,dot as j,normalize as z,lessThanEqual as g}from"../../graph/glsl.js";import{epsilonHitTest as h,trueHit as M,candidateHit as P}from"./constants.js";import{cross2 as q}from"./utils.js";function R(t,n){return j(t,z(n))}function k(e,r,x){const i=x.subtract(r),l=R(e.subtract(r),i),c=t(l.divide(y(i)),new n(0),new n(1));return u(e,r.add(c.multiply(x.subtract(r))))}function A(t){const y=a(t);return w(y.x.add(y.y).add(y.z),new n(1.05))}function B(t,y,u,r){const x=new s(u.x.multiply(r.y).subtract(r.x.multiply(u.y)),r.x.multiply(y.y).subtract(y.x.multiply(r.y)),y.x.multiply(u.y).subtract(u.x.multiply(y.y)),u.y.subtract(r.y),r.y.subtract(y.y),y.y.subtract(u.y),r.x.subtract(u.x),y.x.subtract(r.x),u.x.subtract(y.x)),i=y.x.multiply(u.y.subtract(r.y)),l=u.x.multiply(r.y.subtract(y.y)),c=r.x.multiply(y.y.subtract(u.y)),a=i.add(l).add(c);return new n(1).divide(a).multiply(x.multiply(new e(1,t)))}function C(t,y,u,e){return m(A(B(t,y,u,e)),new n(1))}function D(t,y,u,e){const s=u.subtract(y),a=e.subtract(y),w=q(s,a),d=r(i(w,new n(h)),x(w,new n(-h)));return l([r(c(d),C(t.xy,y,u,e)),new n(-1)],[!0,()=>{const n=k(t,y,u),r=k(t,u,e),x=k(t,e,y);return b(b(n,r),x)}])}function E(t){return t.distance.add(1)}function F(t,n,y){const{viewMat3:u,tileMat3:r}=t.view,x=u.multiply(r),i=x.multiply(new e(n.pos,1)),l=x.multiply(new e(y.nextPos1,1)),c=x.multiply(new e(y.nextPos2,1));return D(t.hittestRequest.position,i.xy,l.xy,c.xy)}function G(t,n,y){return u(t,y).subtract(n)}function H(t,y,u,e){const x=t.x,i=t.y,l=y.x,s=y.y,a=u.x,w=u.y,o=e.x,b=e.y,p=o.subtract(a),f=x.subtract(a),j=l.subtract(x),z=b.subtract(w),h=i.subtract(w),M=s.subtract(i),P=z.multiply(j).subtract(p.multiply(M)),q=p.multiply(h).subtract(z.multiply(f)).divide(P),R=j.multiply(h).subtract(M.multiply(f)).divide(P),k=r(c(m(P,new n(0))),r(r(d(q,new n(0)),g(q,new n(1))),r(d(R,new n(0)),g(R,new n(1)))));return v(k,new n(1),new n(0))}function I(t,n,y,u,e){return r(r(d(t.x,n),d(t.y,y)),r(i(t.x,u),g(t.y,e)))}function J(t,y,u,e){const i=e.xy,l=e.zw,c=new o(l.x,i.y),s=new o(i.x,l.y),a=b(i.x,l.x),w=b(i.y,l.y),d=p(i.x,l.x),j=p(i.y,l.y),z=B(new o(a,w),t,y,u),g=B(new o(d,j),t,y,u),h=B(new o(a,j),t,y,u),q=B(new o(d,w),t,y,u),R=r(m(A(z),new n(1)),r(m(A(g),new n(1)),r(m(A(h),new n(1)),m(A(q),new n(1))))),k=H(i,c,t.xy,y.xy).add(H(c,l,t.xy,y.xy)).add(H(s,l,t.xy,y.xy)).add(H(s,i,t.xy,y.xy)),C=H(i,c,t.xy,u.xy).add(H(c,l,t.xy,u.xy)).add(H(s,l,t.xy,u.xy)).add(H(s,i,t.xy,u.xy)),D=H(i,c,y.xy,u.xy).add(H(c,l,y.xy,u.xy)).add(H(s,l,y.xy,u.xy)).add(H(s,i,y.xy,u.xy)),E=I(t.xy,a,w,d,j),F=I(y.xy,a,w,d,j),G=I(u.xy,a,w,d,j),J=r(E,r(F,G)),K=f(x(k,new n(0)),f(x(C,new n(0)),x(D,new n(0))));return v(f(K,R),new n(P),v(J,new n(M),new n(0)))}function K(t){return r(d(t.tlbr.x,new n(0)),d(t.tlbr.y,new n(0)),d(t.tlbr.z,new n(0)),d(t.tlbr.w,new n(0)))}export{k as distPointSegment,D as distPointTriangle,E as failHittest,F as hittestFill,G as hittestMarker,J as hittestScreenRect,A as inTriangle,K as isRectHittest,I as pointInRect,R as projectScalar,H as segmentIntersects,B as xyToBarycentric};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t,__param as e}from"tslib";import{labelPlacementOffsetPadding as i}from"../../../definitions.js";import{location as o,option as s,uniform as l,texture as r,define as a,input as n,ComputeVertexInput as p}from"../../GraphShaderModule.js";import{mod as d,Float as u,step as y,and as m,lessThan as c,greaterThanEqual as h,Vec3 as f,Mat3 as v,Vec2 as w,ifElse as b,equal as x,greaterThan as V,Bool as S,Vec4 as R,texture2D as g,smoothstep as z,Int as j,bitRShift as A,bitAnd as C,Sampler2D as O}from"../../graph/glsl.js";import{AFeatureShader as M,FeatureVertexInput as T,FeatureFragmentInput as L}from"../shaders/AFeatureShader.js";import{bitsetTextIsBackground as P,bitsetTextIsMapAligned as H}from"../shaders/constants.js";import{isRectHittest as N,distPointTriangle as U,failHittest as q,hittestScreenRect as _}from"../shaders/hittestUtils.js";import{MosaicInfo as k}from"../shaders/MosaicInfo.js";import{getBit as D}from"../shaders/utils.js";import{VisualVariableColor as I}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as B}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as E}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as F}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as W}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as G}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as Z}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableSize as J,getVisualVariableRotation as K}from"../shaders/vvUtils.js";const Q=360/254;class X extends T{}t([o(3,R)],X.prototype,"color",void 0),t([o(4,w)],X.prototype,"offset",void 0),t([o(5,w)],X.prototype,"textureUV",void 0),t([o(6,R)],X.prototype,"fontAndReferenceSize",void 0),t([o(7,R)],X.prototype,"outlineColor",void 0),t([o(8,R)],X.prototype,"haloColor",void 0),t([o(9,w)],X.prototype,"outlineAndHaloSize",void 0),t([o(10,w)],X.prototype,"zoomRange",void 0),t([o(11,u)],X.prototype,"clipAngle",void 0),t([o(12,R)],X.prototype,"referenceSymbol",void 0),t([o(15,u)],X.prototype,"visibility",void 0);class Y extends p{}t([o(13,w)],Y.prototype,"offsetNextVertex1",void 0),t([o(14,w)],Y.prototype,"offsetNextVertex2",void 0);class $ extends L{}class tt extends M{constructor(){super(...arguments),this.type="TextShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"]},this.textRenderPassType=0,this.isBackgroundPass=!1,this.isLabel=!1}clipLabel(t,e){const{clipAngle:i,zoomRange:o,visibility:s}=t,l=i.multiply(Q),r=d(l.subtract(this.view.rotation),new u(360));let a=new u(0);const n=this.view.currentZoom,p=o.x,f=o.y,v=new u(1).subtract(y(p,n)).multiply(2),w=new u(m(h(r,new u(90)),c(r,new u(270)))).multiply(2),b=new u(2).multiply(new u(1).subtract(y(n,f)));return a=a.add(e.multiply(v)),a=a.add(e.multiply(w)),a=a.add(b),s&&(a=a.add(s)),a}vertex(t,e){const o=D(t.bitset,P),s=new u(1).subtract(o);let l=t.fontAndReferenceSize[0];const r=t.fontAndReferenceSize[1],a=t.fontAndReferenceSize[2],n=t.fontAndReferenceSize[3];let p=l.divide(a);const d=1===this.textRenderPassType?t.outlineColor:2===this.textRenderPassType?t.haloColor:this._getVertexColor(t),y=this.view.displayViewScreenMat3.multiply(new f(t.pos,1));let m=t.offset,c=new u(1),h=v.identity(),g=new w(0);if(this.isLabel){if(!t.referenceSymbol)throw new Error("InternalError: Optional attribute 'referenceSymbol' expected for labels");const e=t.referenceSymbol,o=e.xy,s=e.z,l=this._unpackDirection(e.w),r=J(this,t.id,s).divide(2),a=l.multiply(r.add(i));g=o.add(a),m=m.add(g)}else{c=J(this,t.id,r).divide(r),l=l.multiply(c),p=p.multiply(c),m=m.multiply(c),h=K(this,t.id),m=h.multiply(new f(m,0)).xy}const z=D(t.bitset,H),j=this._getViewRotationMatrix(z).multiply(new f(m,0));let A=this.isLabel?this.clipLabel(t,z):this.clip(t.id,t.zoomRange);A=this.isBackgroundPass?A.add(s.multiply(2)):A.add(o.multiply(2));let C=new u(0);if(1===this.textRenderPassType){A=A.add(b(x(t.outlineAndHaloSize.x,new u(0)),new u(2),new u(0)));C=new u(t.outlineAndHaloSize.x).divide(p).divide(n)}if(2===this.textRenderPassType){const e=t.outlineAndHaloSize.x,i=new u(t.outlineAndHaloSize.y);A=A.add(b(x(i,new u(0)),new u(2),new u(0)));C=i.add(e).divide(p).divide(n)}const O=this.isLabel?V(A,new u(1)):new S(!1);return{glPosition:new R(y.xy.add(j.xy),A,1),color:d,size:p,textureUV:t.textureUV.divide(this.mosaicInfo.size),antialiasingWidth:new u(.105).multiply(a).divide(l).divide(this.view.pixelRatio),outlineDistanceOffset:C,...this.maybeRunHittest(t,e,{vvSizeAdjustment:c,vvRotation:h,labelOffset:g,labelClipped:O})}}_getViewRotationMatrix(t){const e=this.view.displayViewMat3,i=this.view.displayMat3,o=new u(1).subtract(t);return e.multiply(t).add(i.multiply(o))}fragment(t){const e=new u(2/8),i=new u(1).subtract(e),o=g(this.mosaicTexture,t.textureUV).a;let s=i.subtract(t.outlineDistanceOffset);this.highlight&&(s=s.divide(2));const l=t.antialiasingWidth,r=z(s.subtract(l),s.add(l),o);return this.getFragmentOutput(t.color.multiply(r),t)}computeHittestTriangle(t,e,{vvSizeAdjustment:i,vvRotation:o,labelOffset:s}){let l,r,a;this.isLabel?(l=new f(t.offset.add(s),0),r=new f(e.offsetNextVertex1.add(s),0),a=new f(e.offsetNextVertex2.add(s),0)):(l=o.multiply(new f(t.offset.multiply(i),0)),r=o.multiply(new f(e.offsetNextVertex1.multiply(i),0)),a=o.multiply(new f(e.offsetNextVertex2.multiply(i),0)));const{viewMat3:n,tileMat3:p}=this.view,d=n.multiply(p).multiply(new f(t.pos,1));return{pos0:d.add(p.multiply(l)).xy,pos1:d.add(p.multiply(r)).xy,pos2:d.add(p.multiply(a)).xy}}hittest(t,e,i){const{vvSizeAdjustment:o,vvRotation:s,labelOffset:l,labelClipped:r}=i,a=N(this.hittestRequest),{pos0:n,pos1:p,pos2:d}=this.computeHittestTriangle(t,e,{vvSizeAdjustment:o,vvRotation:s,labelOffset:l});return b(a,()=>{const{tlbr:t}=this.hittestRequest;return this.isLabel?b(r,q(this.hittestRequest),_(n,p,d,t)):_(n,p,d,t)},()=>{const t=U(this.hittestRequest.position,n,p,d),e=this.isLabel?b(r,q(this.hittestRequest),t):t;return b(V(e,this.hittestRequest.distance),new u(0),new u(1))})}_unpackDirection(t){const e=new j(t),i=A(e,new j(2)),o=C(e,new j(3));return new w(new u(i).subtract(1),new u(o).subtract(1))}_getVertexColor(t){let e=t.color;if(this.visualVariableColor){const i=this.getColorValue(t.id);e=this.visualVariableColor.getColor(i,t.color,new S(!1))}if(this.visualVariableOpacity){const i=this.getOpacityValue(t.id),o=this.visualVariableOpacity.getOpacity(i);e=e.multiply(o)}return e}}t([s(I)],tt.prototype,"visualVariableColor",void 0),t([s(B)],tt.prototype,"visualVariableOpacity",void 0),t([s(E)],tt.prototype,"visualVariableRotation",void 0),t([s(F)],tt.prototype,"visualVariableSizeMinMaxValue",void 0),t([s(W)],tt.prototype,"visualVariableSizeScaleStops",void 0),t([s(G)],tt.prototype,"visualVariableSizeStops",void 0),t([s(Z)],tt.prototype,"visualVariableSizeUnitValue",void 0),t([l(k)],tt.prototype,"mosaicInfo",void 0),t([r(O)],tt.prototype,"mosaicTexture",void 0),t([a],tt.prototype,"textRenderPassType",void 0),t([a],tt.prototype,"isBackgroundPass",void 0),t([a],tt.prototype,"isLabel",void 0),t([e(0,n(X)),e(1,n(Y))],tt.prototype,"vertex",null),t([e(0,n($))],tt.prototype,"fragment",null);export{$ as TextFragmentInput,tt as TextShader,X as TextVertexInput};
2
+ import{__decorate as t,__param as e}from"tslib";import{labelPlacementOffsetPadding as i}from"../../../definitions.js";import{location as o,option as s,uniform as l,texture as r,define as a,input as n,ComputeVertexInput as p}from"../../GraphShaderModule.js";import{mod as d,Float as u,step as y,and as m,lessThan as c,greaterThanEqual as h,Vec3 as f,Mat3 as v,Vec2 as w,ifElse as b,equal as x,greaterThan as V,Bool as S,Vec4 as R,texture2D as g,smoothstep as z,Int as j,bitRShift as A,bitAnd as C,Sampler2D as O}from"../../graph/glsl.js";import{AFeatureShader as M,FeatureVertexInput as T,FeatureFragmentInput as L}from"../shaders/AFeatureShader.js";import{noHit as P,trueHit as H,bitsetTextIsBackground as N,bitsetTextIsMapAligned as U}from"../shaders/constants.js";import{isRectHittest as q,distPointTriangle as _,failHittest as k,hittestScreenRect as D}from"../shaders/hittestUtils.js";import{MosaicInfo as I}from"../shaders/MosaicInfo.js";import{getBit as B}from"../shaders/utils.js";import{VisualVariableColor as E}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as F}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as W}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as G}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as Z}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as J}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as K}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableSize as Q,getVisualVariableRotation as X}from"../shaders/vvUtils.js";const Y=360/254;class $ extends T{}t([o(3,R)],$.prototype,"color",void 0),t([o(4,w)],$.prototype,"offset",void 0),t([o(5,w)],$.prototype,"textureUV",void 0),t([o(6,R)],$.prototype,"fontAndReferenceSize",void 0),t([o(7,R)],$.prototype,"outlineColor",void 0),t([o(8,R)],$.prototype,"haloColor",void 0),t([o(9,w)],$.prototype,"outlineAndHaloSize",void 0),t([o(10,w)],$.prototype,"zoomRange",void 0),t([o(11,u)],$.prototype,"clipAngle",void 0),t([o(12,R)],$.prototype,"referenceSymbol",void 0),t([o(15,u)],$.prototype,"visibility",void 0);class tt extends p{}t([o(13,w)],tt.prototype,"offsetNextVertex1",void 0),t([o(14,w)],tt.prototype,"offsetNextVertex2",void 0);class et extends L{}class it extends M{constructor(){super(...arguments),this.type="TextShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"]},this.textRenderPassType=0,this.isBackgroundPass=!1,this.isLabel=!1}clipLabel(t,e){const{clipAngle:i,zoomRange:o,visibility:s}=t,l=i.multiply(Y),r=d(l.subtract(this.view.rotation),new u(360));let a=new u(0);const n=this.view.currentZoom,p=o.x,f=o.y,v=new u(1).subtract(y(p,n)).multiply(2),w=new u(m(h(r,new u(90)),c(r,new u(270)))).multiply(2),b=new u(2).multiply(new u(1).subtract(y(n,f)));return a=a.add(e.multiply(v)),a=a.add(e.multiply(w)),a=a.add(b),s&&(a=a.add(s)),a}vertex(t,e){const o=B(t.bitset,N),s=new u(1).subtract(o);let l=t.fontAndReferenceSize[0];const r=t.fontAndReferenceSize[1],a=t.fontAndReferenceSize[2],n=t.fontAndReferenceSize[3];let p=l.divide(a);const d=1===this.textRenderPassType?t.outlineColor:2===this.textRenderPassType?t.haloColor:this._getVertexColor(t),y=this.view.displayViewScreenMat3.multiply(new f(t.pos,1));let m=t.offset,c=new u(1),h=v.identity(),g=new w(0);if(this.isLabel){if(!t.referenceSymbol)throw new Error("InternalError: Optional attribute 'referenceSymbol' expected for labels");const e=t.referenceSymbol,o=e.xy,s=e.z,l=this._unpackDirection(e.w),r=Q(this,t.id,s).divide(2),a=l.multiply(r.add(i));g=o.add(a),m=m.add(g)}else{c=Q(this,t.id,r).divide(r),l=l.multiply(c),p=p.multiply(c),m=m.multiply(c),h=X(this,t.id),m=h.multiply(new f(m,0)).xy}const z=B(t.bitset,U),j=this._getViewRotationMatrix(z).multiply(new f(m,0));let A=this.isLabel?this.clipLabel(t,z):this.clip(t.id,t.zoomRange);A=this.isBackgroundPass?A.add(s.multiply(2)):A.add(o.multiply(2));let C=new u(0);if(1===this.textRenderPassType){A=A.add(b(x(t.outlineAndHaloSize.x,new u(0)),new u(2),new u(0)));C=new u(t.outlineAndHaloSize.x).divide(p).divide(n)}if(2===this.textRenderPassType){const e=t.outlineAndHaloSize.x,i=new u(t.outlineAndHaloSize.y);A=A.add(b(x(i,new u(0)),new u(2),new u(0)));C=i.add(e).divide(p).divide(n)}const O=this.isLabel?V(A,new u(1)):new S(!1);return{glPosition:new R(y.xy.add(j.xy),A,1),color:d,size:p,textureUV:t.textureUV.divide(this.mosaicInfo.size),antialiasingWidth:new u(.105).multiply(a).divide(l).divide(this.view.pixelRatio),outlineDistanceOffset:C,...this.maybeRunHittest(t,e,{vvSizeAdjustment:c,vvRotation:h,labelOffset:g,labelClipped:O})}}_getViewRotationMatrix(t){const e=this.view.displayViewMat3,i=this.view.displayMat3,o=new u(1).subtract(t);return e.multiply(t).add(i.multiply(o))}fragment(t){const e=new u(2/8),i=new u(1).subtract(e),o=g(this.mosaicTexture,t.textureUV).a;let s=i.subtract(t.outlineDistanceOffset);this.highlight&&(s=s.divide(2));const l=t.antialiasingWidth,r=z(s.subtract(l),s.add(l),o);return this.getFragmentOutput(t.color.multiply(r),t)}computeHittestTriangle(t,e,{vvSizeAdjustment:i,vvRotation:o,labelOffset:s}){let l,r,a;this.isLabel?(l=new f(t.offset.add(s),0),r=new f(e.offsetNextVertex1.add(s),0),a=new f(e.offsetNextVertex2.add(s),0)):(l=o.multiply(new f(t.offset.multiply(i),0)),r=o.multiply(new f(e.offsetNextVertex1.multiply(i),0)),a=o.multiply(new f(e.offsetNextVertex2.multiply(i),0)));const{viewMat3:n,tileMat3:p}=this.view,d=n.multiply(p).multiply(new f(t.pos,1));return{pos0:d.add(p.multiply(l)).xy,pos1:d.add(p.multiply(r)).xy,pos2:d.add(p.multiply(a)).xy}}hittest(t,e,i){const{vvSizeAdjustment:o,vvRotation:s,labelOffset:l,labelClipped:r}=i,a=q(this.hittestRequest),{pos0:n,pos1:p,pos2:d}=this.computeHittestTriangle(t,e,{vvSizeAdjustment:o,vvRotation:s,labelOffset:l});return b(a,()=>{const{tlbr:t}=this.hittestRequest;return this.isLabel?b(r,k(this.hittestRequest),D(n,p,d,t)):D(n,p,d,t)},()=>{const t=_(this.hittestRequest.position,n,p,d),e=this.isLabel?b(r,k(this.hittestRequest),t):t;return b(V(e,this.hittestRequest.distance),new u(P),new u(H))})}_unpackDirection(t){const e=new j(t),i=A(e,new j(2)),o=C(e,new j(3));return new w(new u(i).subtract(1),new u(o).subtract(1))}_getVertexColor(t){let e=t.color;if(this.visualVariableColor){const i=this.getColorValue(t.id);e=this.visualVariableColor.getColor(i,t.color,new S(!1))}if(this.visualVariableOpacity){const i=this.getOpacityValue(t.id),o=this.visualVariableOpacity.getOpacity(i);e=e.multiply(o)}return e}}t([s(E)],it.prototype,"visualVariableColor",void 0),t([s(F)],it.prototype,"visualVariableOpacity",void 0),t([s(W)],it.prototype,"visualVariableRotation",void 0),t([s(G)],it.prototype,"visualVariableSizeMinMaxValue",void 0),t([s(Z)],it.prototype,"visualVariableSizeScaleStops",void 0),t([s(J)],it.prototype,"visualVariableSizeStops",void 0),t([s(K)],it.prototype,"visualVariableSizeUnitValue",void 0),t([l(I)],it.prototype,"mosaicInfo",void 0),t([r(O)],it.prototype,"mosaicTexture",void 0),t([a],it.prototype,"textRenderPassType",void 0),t([a],it.prototype,"isBackgroundPass",void 0),t([a],it.prototype,"isLabel",void 0),t([e(0,n($)),e(1,n(tt))],it.prototype,"vertex",null),t([e(0,n(et))],it.prototype,"fragment",null);export{et as TextFragmentInput,it as TextShader,$ as TextVertexInput};