@arcgis/core 5.1.0-next.78 → 5.1.0-next.79

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 (464) hide show
  1. package/analysis/ShadowCast/DiscreteOptions.d.ts +33 -6
  2. package/analysis/ShadowCast/DiscreteOptions.js +1 -1
  3. package/analysis/ShadowCast/MinDurationOptions.d.ts +6 -4
  4. package/analysis/ShadowCast/TotalDurationOptions.d.ts +33 -6
  5. package/analysis/ShadowCast/TotalDurationOptions.js +1 -1
  6. package/analysis/ShadowCast/colorStopsUtils.js +2 -0
  7. package/analysis/ShadowCastAnalysis.d.ts +24 -1
  8. package/analysis/ShadowCastAnalysis.js +1 -1
  9. package/analysis/Viewshed.d.ts +27 -0
  10. package/analysis/Viewshed.js +1 -1
  11. package/analysis/ViewshedAnalysis.js +1 -1
  12. package/arcade/FunctionWrapper.js +1 -1
  13. package/arcade/arcadeAsyncRuntime.js +1 -1
  14. package/arcade/arcadeCompiler.js +1 -1
  15. package/arcade/arcadeRuntime.js +1 -1
  16. package/arcade/compilerUtils.js +1 -1
  17. package/arcade/debug.d.ts +139 -0
  18. package/arcade/debug.js +2 -0
  19. package/arcade/featureSetCollection.js +1 -1
  20. package/arcade/featureSetUtils.js +1 -1
  21. package/arcade/featureset/actions/GroupBy.js +1 -1
  22. package/arcade/featureset/actions/OrderBy.js +1 -1
  23. package/arcade/functions/featuresetstring.js +1 -1
  24. package/arcade/languageUtils.js +1 -1
  25. package/arcade.d.ts +46 -2
  26. package/arcade.js +1 -1
  27. package/assets/esri/core/workers/RemoteClient.js +1 -1
  28. package/assets/esri/core/workers/chunks/{1c7183551f5269bdcf13.js → 01bd1b86ba899c6aa4c0.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{1f8ccf96069ac3a40c3d.js → 01ee18782a50279f907e.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{f81c6f6ccc201f584970.js → 022067e807905cabeaa1.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{11ea4be441a26134ce1f.js → 052cdc7aaa803b5873f0.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{b7bb7072dbee978f3ca3.js → 056fd7847caaff2c9514.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{8acee3fba488f202f82f.js → 05c3146d87d917606193.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{a8ca5d8740cc7e39197b.js → 0aebcbf41cb193e76809.js} +5 -5
  35. package/assets/esri/core/workers/chunks/{54023458195549f66215.js → 0b77c124b743067e4155.js} +1 -1
  36. package/assets/esri/core/workers/chunks/10408183681fd6c7b4ed.js +2 -0
  37. package/assets/esri/core/workers/chunks/{7595ceba529ed01c7590.js → 2c87c3112a43db8624f6.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{13e60f19f436b8d683ae.js → 3c9482764c9e4f8bcbb0.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{322c54081b25f1c53661.js → 3e37019eee1c49d2bf64.js} +1 -1
  40. package/assets/esri/core/workers/chunks/45c83eb7c2a06166e3b0.js +1 -0
  41. package/assets/esri/core/workers/chunks/48acd146bf0241d87647.js +1 -0
  42. package/assets/esri/core/workers/chunks/5818f1f526577068d6ca.js +2 -0
  43. package/assets/esri/core/workers/chunks/{34fe97bcacc0dfc5bce6.js → 5ccc325d83cec4f5ccdb.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{30e710ec4d22c43d4e7e.js → 5cffc7b49966201eccdb.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{1a87e9bbd85ba29b1514.js → 5da2051f548c2942e01a.js} +1 -1
  46. package/assets/esri/core/workers/chunks/5ec66e39e53c11e75179.js +2 -0
  47. package/assets/esri/core/workers/chunks/{0b1454a77a6a682541dc.js.LICENSE.txt → 5ec66e39e53c11e75179.js.LICENSE.txt} +9 -1
  48. package/assets/esri/core/workers/chunks/5f6fd20a7f4e80eafa25.js +1 -0
  49. package/assets/esri/core/workers/chunks/{abc06d10c7ac8ba5b0e4.js → 67ec1694d6e18b7c234c.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{32e22d6eee9fed1f70b0.js → 6d696beddcc5fbed5875.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{f590b60fca607d66001a.js → 716a4d7e8b908b81870b.js} +1 -1
  52. package/assets/esri/core/workers/chunks/71fe127734f33d020a44.js +1 -0
  53. package/assets/esri/core/workers/chunks/7cdd0492b2191df95102.js +2 -0
  54. package/assets/esri/core/workers/chunks/7cea68257d24ffd205bb.js +1 -0
  55. package/assets/esri/core/workers/chunks/7e530e635325dba07864.js +1 -0
  56. package/assets/esri/core/workers/chunks/8f6f5dad52747d252aac.js +596 -0
  57. package/assets/esri/core/workers/chunks/{d950d5c2844206502ff0.js → 992cd87ba0ab6346f692.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{73c87eb9bd8f0f848481.js → 9c11e1fe785e1385fdb1.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{5ed8d8b5336c81fbcda3.js → 9d216e30d04ea21fc8a2.js} +1 -1
  60. package/assets/esri/core/workers/chunks/a54aa93b6012a2597f82.js +1 -0
  61. package/assets/esri/core/workers/chunks/{cf14b3a44705dacefac4.js → a9b5ce00323cd5574bf7.js} +1 -1
  62. package/assets/esri/core/workers/chunks/ae6b3dfe5f757df539d6.js +1 -0
  63. package/assets/esri/core/workers/chunks/b14c4c3f295970f731ab.js +1 -0
  64. package/assets/esri/core/workers/chunks/{c70df6ed190f9ebcf6aa.js → bf2c202dec5ab7bc770b.js} +1 -1
  65. package/assets/esri/core/workers/chunks/c1d4110aa494a1dba3c4.js +1 -0
  66. package/assets/esri/core/workers/chunks/{85d8c7cc7f8decbe975d.js → c442916805975744dd92.js} +1 -1
  67. package/assets/esri/core/workers/chunks/dacc2e5fa462495ed1cc.js +2 -0
  68. package/assets/esri/core/workers/chunks/f227b34cce6843df0fb6.js +1 -0
  69. package/assets/esri/core/workers/chunks/{dda2cb5c073d1e65f14f.js → f43d628d47eec7d530c7.js} +1 -1
  70. package/assets/esri/core/workers/chunks/f7531aa69a87814c60d1.js +1 -0
  71. package/assets/esri/core/workers/chunks/{4ccb56333de0247dcb6f.js → fb100935fd8948d779f5.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{5ee4b630ad39c21d11db.js → fb9e3e7cd532ac4353f1.js} +12 -12
  73. package/assets/esri/core/workers/chunks/fc6ca7ffb9f1b875059c.js +1 -0
  74. package/assets/esri/core/workers/chunks/{3d9fcbe95dd22dbe730e.js → ffc4f3406ce383b9bd88.js} +1 -1
  75. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +6 -0
  76. package/assets/esri/themes/dark/main.css +1 -1
  77. package/assets/esri/themes/light/main.css +1 -1
  78. package/assets/esri/themes/light/view.css +1 -1
  79. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  80. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  81. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  82. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  83. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  84. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  85. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  86. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  87. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  88. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  89. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  90. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  91. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  92. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  93. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  94. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  95. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  96. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  97. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  98. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  99. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  100. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  101. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  102. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  103. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  104. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  105. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  106. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  107. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  108. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  109. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  110. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  111. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  112. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  113. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  114. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  115. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  116. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  117. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  118. package/assets/esri/widgets/Sketch/t9n/Sketch_ar.json +1 -1
  119. package/assets/esri/widgets/Sketch/t9n/Sketch_bg.json +1 -1
  120. package/assets/esri/widgets/Sketch/t9n/Sketch_bs.json +1 -1
  121. package/assets/esri/widgets/Sketch/t9n/Sketch_ca.json +1 -1
  122. package/assets/esri/widgets/Sketch/t9n/Sketch_cs.json +1 -1
  123. package/assets/esri/widgets/Sketch/t9n/Sketch_da.json +1 -1
  124. package/assets/esri/widgets/Sketch/t9n/Sketch_de.json +1 -1
  125. package/assets/esri/widgets/Sketch/t9n/Sketch_el.json +1 -1
  126. package/assets/esri/widgets/Sketch/t9n/Sketch_es.json +1 -1
  127. package/assets/esri/widgets/Sketch/t9n/Sketch_et.json +1 -1
  128. package/assets/esri/widgets/Sketch/t9n/Sketch_fi.json +1 -1
  129. package/assets/esri/widgets/Sketch/t9n/Sketch_fr.json +1 -1
  130. package/assets/esri/widgets/Sketch/t9n/Sketch_he.json +1 -1
  131. package/assets/esri/widgets/Sketch/t9n/Sketch_hr.json +1 -1
  132. package/assets/esri/widgets/Sketch/t9n/Sketch_hu.json +1 -1
  133. package/assets/esri/widgets/Sketch/t9n/Sketch_id.json +1 -1
  134. package/assets/esri/widgets/Sketch/t9n/Sketch_it.json +1 -1
  135. package/assets/esri/widgets/Sketch/t9n/Sketch_ja.json +1 -1
  136. package/assets/esri/widgets/Sketch/t9n/Sketch_ko.json +1 -1
  137. package/assets/esri/widgets/Sketch/t9n/Sketch_lt.json +1 -1
  138. package/assets/esri/widgets/Sketch/t9n/Sketch_lv.json +1 -1
  139. package/assets/esri/widgets/Sketch/t9n/Sketch_nl.json +1 -1
  140. package/assets/esri/widgets/Sketch/t9n/Sketch_no.json +1 -1
  141. package/assets/esri/widgets/Sketch/t9n/Sketch_pl.json +1 -1
  142. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-BR.json +1 -1
  143. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-PT.json +1 -1
  144. package/assets/esri/widgets/Sketch/t9n/Sketch_ro.json +1 -1
  145. package/assets/esri/widgets/Sketch/t9n/Sketch_ru.json +1 -1
  146. package/assets/esri/widgets/Sketch/t9n/Sketch_sk.json +1 -1
  147. package/assets/esri/widgets/Sketch/t9n/Sketch_sl.json +1 -1
  148. package/assets/esri/widgets/Sketch/t9n/Sketch_sr.json +1 -1
  149. package/assets/esri/widgets/Sketch/t9n/Sketch_sv.json +1 -1
  150. package/assets/esri/widgets/Sketch/t9n/Sketch_th.json +1 -1
  151. package/assets/esri/widgets/Sketch/t9n/Sketch_tr.json +1 -1
  152. package/assets/esri/widgets/Sketch/t9n/Sketch_uk.json +1 -1
  153. package/assets/esri/widgets/Sketch/t9n/Sketch_vi.json +1 -1
  154. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-CN.json +1 -1
  155. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-HK.json +1 -1
  156. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-TW.json +1 -1
  157. package/chunks/ImageMaterial.glsl.js +7 -5
  158. package/chunks/SlicePlaneMaterial.glsl.js +21 -13
  159. package/chunks/arcade.js +1 -1
  160. package/chunks/languageUtils.js +1 -1
  161. package/config.js +1 -1
  162. package/core/MapUtils.js +1 -1
  163. package/core/arrayUtils.js +1 -1
  164. package/kernel.js +1 -1
  165. package/layers/IntegratedMeshLayer.d.ts +18 -14
  166. package/layers/SceneLayer.d.ts +35 -1
  167. package/layers/SceneLayer.js +1 -1
  168. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  169. package/layers/scene/ModelFileInfo.d.ts +29 -0
  170. package/layers/scene/ModelFileInfo.js +2 -0
  171. package/layers/scene/ModelInfo.d.ts +38 -0
  172. package/layers/scene/ModelInfo.js +2 -0
  173. package/layers/scene/modelQuerySupport.js +2 -0
  174. package/layers/scene/types.d.ts +14 -0
  175. package/layers/support/infoFor3D.js +1 -1
  176. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  177. package/layers/types.d.ts +13 -1
  178. package/package.json +3 -3
  179. package/popup/Features.d.ts +1 -6
  180. package/popup/Features.js +1 -1
  181. package/popup/actions.js +1 -1
  182. package/renderers/visualVariables/support/ColorStop.js +1 -1
  183. package/support/arcadeUtils.js +1 -1
  184. package/support/revision.js +1 -1
  185. package/views/2d/engine/flow/styles/Imagery.js +1 -1
  186. package/views/2d/engine/flow/styles/Particles.js +1 -1
  187. package/views/2d/engine/flow/styles/Streamlines.js +1 -1
  188. package/views/2d/engine/vectorTiles/Placement.js +1 -1
  189. package/views/2d/engine/vectorTiles/TextShaping.js +1 -1
  190. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  191. package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
  192. package/views/2d/engine/webgl/GlyphSource.js +1 -1
  193. package/views/2d/engine/webgl/Overlay.js +1 -1
  194. package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
  195. package/views/2d/engine/webgl/RenderingDevice.js +1 -1
  196. package/views/2d/engine/webgl/TextureManager.js +1 -1
  197. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  198. package/views/2d/engine/webgl/shaderGraph/GLSLShaderModule.js +1 -1
  199. package/views/2d/engine/webgl/shaderGraph/GraphShaderModule.js +1 -1
  200. package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphContext.js +1 -1
  201. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueProgramCache.js +1 -1
  202. package/views/2d/engine/webgl/shaderGraph/techniques/TestTechnique.js +1 -1
  203. package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
  204. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
  205. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
  206. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimationUniformInfo.js +1 -1
  207. package/views/2d/engine/webgl/shaderGraph/techniques/bitmap/BitmapTechnique.js +1 -1
  208. package/views/2d/engine/webgl/shaderGraph/techniques/blend/BlendTechnique.js +1 -1
  209. package/views/2d/engine/webgl/shaderGraph/techniques/bloom/BloomTechnique.js +1 -1
  210. package/views/2d/engine/webgl/shaderGraph/techniques/blur/BlurTechnique.js +1 -1
  211. package/views/2d/engine/webgl/shaderGraph/techniques/clip/ClipTechnique.js +1 -1
  212. package/views/2d/engine/webgl/shaderGraph/techniques/colorize/ColorizeTechnique.js +1 -1
  213. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPointShader.js +1 -1
  214. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPolygonShader.js +1 -1
  215. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityTechnique.js +1 -1
  216. package/views/2d/engine/webgl/shaderGraph/techniques/drop-shadow/DropShadowTechnique.js +1 -1
  217. package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
  218. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexFillTechnique.js +1 -1
  219. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillTechnique.js +1 -1
  220. package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillTechnique.js +1 -1
  221. package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillTechnique.js +1 -1
  222. package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillTechnique.js +1 -1
  223. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillTechnique.js +1 -1
  224. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique.js +1 -1
  225. package/views/2d/engine/webgl/shaderGraph/techniques/flow/FlowTechnique.js +1 -1
  226. package/views/2d/engine/webgl/shaderGraph/techniques/grid/GridTechnique.js +1 -1
  227. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
  228. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
  229. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
  230. package/views/2d/engine/webgl/shaderGraph/techniques/line/LineTechnique.js +1 -1
  231. package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineTechnique.js +1 -1
  232. package/views/2d/engine/webgl/shaderGraph/techniques/magnifier/MagnifierTechnique.js +1 -1
  233. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  234. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerTechnique.js +1 -1
  235. package/views/2d/engine/webgl/shaderGraph/techniques/opacity/OpacityTechnique.js +1 -1
  236. package/views/2d/engine/webgl/shaderGraph/techniques/overlay/OverlayTechnique.js +1 -1
  237. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartShader.js +1 -1
  238. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique.js +1 -1
  239. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
  240. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterHighlightTechnique.js +1 -1
  241. package/views/2d/engine/webgl/shaderGraph/techniques/raster/VectorFieldTechnique.js +1 -1
  242. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/AspectTechnique.js +1 -1
  243. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/BandArithmeticTechnique.js +1 -1
  244. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/BaseRasterProcessorTechnique.js +1 -1
  245. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ColormapToRGBTechnique.js +1 -1
  246. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/CompositeBandTechnique.js +1 -1
  247. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ComputeChangeTechnique.js +1 -1
  248. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ContrastBrightnessTechnique.js +1 -1
  249. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ConvolutionTechnique.js +1 -1
  250. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/CurvatureTechnique.js +1 -1
  251. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ExtractBandTechnique.js +1 -1
  252. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/FocalStatisticsTechnique.js +1 -1
  253. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/GrayscaleTechnique.js +1 -1
  254. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/HillshadeTechnique.js +1 -1
  255. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/LocalTechnique.js +1 -1
  256. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/MaskTechnique.js +1 -1
  257. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/NDVITechnique.js +1 -1
  258. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/RemapTechnique.js +1 -1
  259. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ReprojectTechnique.js +1 -1
  260. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ShadedReliefTechnique.js +1 -1
  261. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/SlopeTechnique.js +1 -1
  262. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/SpectralConversionTechnique.js +1 -1
  263. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/StretchTechnique.js +1 -1
  264. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
  265. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BitmapShader.js +1 -1
  266. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlendShader.js +1 -1
  267. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlitShader.js +1 -1
  268. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BloomShader.js +1 -1
  269. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BlurShader.js +1 -1
  270. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ColorizeShader.js +1 -1
  271. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexFillShader.js +1 -1
  272. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexOutlineFillShader.js +1 -1
  273. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/DropShadowShader.js +1 -1
  274. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/EntityStorage.js +1 -1
  275. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientFillShader.js +1 -1
  276. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/GradientStrokeShader.js +1 -1
  277. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapAccumulateShader.js +1 -1
  278. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapResolveShader.js +1 -1
  279. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js +1 -1
  280. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/MosaicInfo.js +1 -1
  281. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js +1 -1
  282. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OverlayShader.js +1 -1
  283. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PatternFillShader.js +1 -1
  284. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/PatternOutlineFillShader.js +1 -1
  285. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsDiffShader.js +1 -1
  286. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsMinMaxSumShader.js +1 -1
  287. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsStdDevShader.js +1 -1
  288. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsSumOfSquaredDiffShader.js +1 -1
  289. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TexturedLineShader.js +1 -1
  290. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TileDebugInfoShader.js +1 -1
  291. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js +1 -1
  292. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowImageryShader.js +1 -1
  293. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowUtils.js +1 -1
  294. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/BaseRasterColorizerShader.js +1 -1
  295. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/BaseRasterHighlightShader.js +1 -1
  296. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterColorizerLUTShader.js +1 -1
  297. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterColorizerShadedReliefShader.js +1 -1
  298. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterColorizerStretchShader.js +1 -1
  299. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterXYBandHighlightShader.js +1 -1
  300. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/lut.js +1 -1
  301. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/AspectShader.js +1 -1
  302. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/BaseRasterProcessorShader.js +1 -1
  303. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ColormapToRGBShader.js +1 -1
  304. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ConvolutionShader.js +1 -1
  305. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/CurvatureShader.js +1 -1
  306. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/FocalStatisticsShader.js +1 -1
  307. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/HillshadeShader.js +1 -1
  308. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/MultiRasterMixin.js +1 -1
  309. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/ShadedReliefShader.js +1 -1
  310. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/SlopeShader.js +1 -1
  311. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/projection.js +1 -1
  312. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/stretch.js +1 -1
  313. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderBackground.js +1 -1
  314. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderFill.js +1 -1
  315. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderIcon.js +1 -1
  316. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderLine.js +1 -1
  317. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vector-tiles/VTLShaderText.js +1 -1
  318. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/vvUtils.js +1 -1
  319. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  320. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextTechnique.js +1 -1
  321. package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileDebugInfoTechnique.js +1 -1
  322. package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileStencilTechnique.js +1 -1
  323. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +1 -1
  324. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueCircle.js +1 -1
  325. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
  326. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueLine.js +1 -1
  327. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueSymbol.js +1 -1
  328. package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js +1 -1
  329. package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
  330. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  331. package/views/3d/FocusAreasView.js +1 -1
  332. package/views/3d/StencilGeometry.js +2 -0
  333. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  334. package/views/3d/analysis/Viewshed/ViewshedComputedData.js +1 -1
  335. package/views/3d/analysis/Viewshed/ViewshedConfiguration.js +1 -1
  336. package/views/3d/analysis/Viewshed/ViewshedFieldOfViewManipulation.js +1 -1
  337. package/views/3d/analysis/Viewshed/ViewshedScaleOrientManipulation.js +1 -1
  338. package/views/3d/analysis/Viewshed/ViewshedShapeVisualElement.js +1 -1
  339. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  340. package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +1 -1
  341. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  342. package/views/3d/analysis/Viewshed/viewshedToolUtils.js +1 -1
  343. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  344. package/views/3d/focusAreaUtils.js +2 -0
  345. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  346. package/views/3d/layers/I3SMeshView3D.js +1 -1
  347. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  348. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  349. package/views/3d/layers/IntegratedMeshNormals.js +1 -1
  350. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  351. package/views/3d/layers/SceneLayerView3D.js +1 -1
  352. package/views/3d/layers/SceneLayerWorker.js +1 -1
  353. package/views/3d/layers/i3s/I3SQueryEngine.js +1 -1
  354. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  355. package/views/3d/layers/support/DefinitionExpressionSceneLayerView.js +1 -1
  356. package/views/3d/layers/support/TemporalSceneLayerView.js +1 -1
  357. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  358. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
  359. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
  360. package/views/3d/webgl-engine/effects/atmosphere/LocalAtmosphere.js +1 -1
  361. package/views/3d/webgl-engine/effects/atmosphere/MarsAtmosphere.js +1 -1
  362. package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
  363. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
  364. package/views/3d/webgl-engine/effects/clouds/CloudsRenderer.js +1 -1
  365. package/views/3d/webgl-engine/effects/clouds/CloudsTechnique.js +1 -1
  366. package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.js +1 -1
  367. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  368. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  369. package/views/3d/webgl-engine/effects/focusArea/focusAreaMaskUtils.js +2 -0
  370. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  371. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  372. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  373. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  374. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  375. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  376. package/views/3d/webgl-engine/effects/highlight/ShadowHighlightBuffer.js +1 -1
  377. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  378. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechnique.js +1 -1
  379. package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
  380. package/views/3d/webgl-engine/effects/precipitation/Precipitation.js +1 -1
  381. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  382. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  383. package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
  384. package/views/3d/webgl-engine/effects/stars/StarsTechnique.js +1 -1
  385. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  386. package/views/3d/webgl-engine/lib/Compositor.js +1 -1
  387. package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
  388. package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
  389. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  390. package/views/3d/webgl-engine/lib/Material.js +1 -1
  391. package/views/3d/webgl-engine/lib/Normals.js +1 -1
  392. package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
  393. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  394. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  395. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  396. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  397. package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
  398. package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
  399. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  400. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  401. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  402. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  403. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  404. package/views/3d/webgl-engine/shaders/MeasurementArrowTechnique.js +1 -1
  405. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +10 -10
  406. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  407. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
  408. package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique.js +1 -1
  409. package/views/View2D.js +1 -1
  410. package/views/draw/support/GraphicMover.js +1 -1
  411. package/views/draw/support/Reshape.js +1 -1
  412. package/views/draw/support/editingSessionUtils.js +1 -1
  413. package/views/webgl/FramebufferObject.js +1 -1
  414. package/widgets/BatchAttributeForm/css.js +1 -1
  415. package/widgets/BatchAttributeForm/inputs/GroupInput.d.ts +2 -1
  416. package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.d.ts +54 -0
  417. package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +2 -0
  418. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  419. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  420. package/widgets/BatchAttributeForm/inputs/types.d.ts +4 -3
  421. package/widgets/BatchAttributeForm/templates/AttachmentElementTemplate.js +1 -1
  422. package/widgets/BatchAttributeForm/templates/RelationshipElementTemplate.js +2 -0
  423. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  424. package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
  425. package/widgets/BatchAttributeForm/templates/support/templateUtils.js +1 -1
  426. package/widgets/BatchAttributeForm.js +1 -1
  427. package/widgets/CoordinateConversion/CoordinateConversionViewModel.d.ts +21 -1
  428. package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
  429. package/widgets/CoordinateConversion/support/Format.js +1 -1
  430. package/widgets/CoordinateConversion/support/coordinateConversionUtils.js +1 -1
  431. package/widgets/CoordinateConversion.d.ts +21 -1
  432. package/widgets/CoordinateConversion.js +1 -1
  433. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  434. package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
  435. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  436. package/widgets/Editor/support/SketchController.js +1 -1
  437. package/widgets/Editor/workflowUtils.js +1 -1
  438. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  439. package/widgets/Sketch/SketchViewModel.js +1 -1
  440. package/widgets/support/ContingentValuesManager.js +1 -1
  441. package/widgets/types.d.ts +1 -1
  442. package/assets/esri/core/workers/chunks/07eff82916681fcff069.js +0 -1
  443. package/assets/esri/core/workers/chunks/0b1454a77a6a682541dc.js +0 -2
  444. package/assets/esri/core/workers/chunks/1c7fd0a229a8112b0539.js +0 -596
  445. package/assets/esri/core/workers/chunks/3697e51e1e4cf442f39a.js +0 -1
  446. package/assets/esri/core/workers/chunks/3cce9dad8ee0e4971d50.js +0 -1
  447. package/assets/esri/core/workers/chunks/3df8493b91aa3bce824d.js +0 -1
  448. package/assets/esri/core/workers/chunks/68a313155ddc29bd024d.js +0 -1
  449. package/assets/esri/core/workers/chunks/751609831b283903ba48.js +0 -1
  450. package/assets/esri/core/workers/chunks/7bacdd65a6cc4d284e0a.js +0 -2
  451. package/assets/esri/core/workers/chunks/7e97684e851274efd11f.js +0 -1
  452. package/assets/esri/core/workers/chunks/85aac8539996372f1ee8.js +0 -1
  453. package/assets/esri/core/workers/chunks/99d298d0039c536fcf3e.js +0 -1
  454. package/assets/esri/core/workers/chunks/9aaf78b831f8739bc127.js +0 -1
  455. package/assets/esri/core/workers/chunks/9b9916864b6575c42c8a.js +0 -1
  456. package/assets/esri/core/workers/chunks/bf7e019437a3b6036300.js +0 -2
  457. package/assets/esri/core/workers/chunks/d304343a781acfa3ff96.js +0 -1
  458. package/assets/esri/core/workers/chunks/dbb9bb28696ff9536678.js +0 -2
  459. package/assets/esri/core/workers/chunks/f09a41ad239d467d9438.js +0 -2
  460. package/assets/esri/core/workers/chunks/f6912532aae1638cbe8f.js +0 -1
  461. /package/assets/esri/core/workers/chunks/{7bacdd65a6cc4d284e0a.js.LICENSE.txt → 10408183681fd6c7b4ed.js.LICENSE.txt} +0 -0
  462. /package/assets/esri/core/workers/chunks/{f09a41ad239d467d9438.js.LICENSE.txt → 5818f1f526577068d6ca.js.LICENSE.txt} +0 -0
  463. /package/assets/esri/core/workers/chunks/{dbb9bb28696ff9536678.js.LICENSE.txt → 7cdd0492b2191df95102.js.LICENSE.txt} +0 -0
  464. /package/assets/esri/core/workers/chunks/{bf7e019437a3b6036300.js.LICENSE.txt → dacc2e5fa462495ed1cc.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{uniform as t,define as o,UniformGroup as i}from"../../../../GraphShaderModule.js";import{pow as r,Vec2 as p,sqrt as s,atan as l,Vec4 as d,Float as u}from"../../../../graph/glsl.js";import{getSurfaceValues as c,computeDeltaZ as m}from"../surface.js";import{BaseRasterProcessorShader as a}from"./BaseRasterProcessorShader.js";import{roundOutput as n}from"./math.js";class y extends i{}e([t(u)],y.prototype,"pixelSizePower",void 0),e([t(u)],y.prototype,"pixelSizeFactor",void 0),e([t(u)],y.prototype,"zFactor",void 0),e([t(p)],y.prototype,"cellSize",void 0);class h extends a{constructor(){super(...arguments),this.type="SlopeShader",this.isOutputRounded=!1,this.percentRise=!1}_process(e){const{cellSize:t,pixelSizePower:o,pixelSizeFactor:i,zFactor:u}=this.slopeConfig,a=r(t,new p(o)).multiply(i).add(u).divide(t.multiply(8)),{texture:y}=this.config,h=c(y,e,this.config.srcImageSize),{x:f,y:S}=m(h,a),x=s(f.multiply(f).add(S.multiply(S))),z=this.percentRise?x.multiply(100):l(x).multiply(57.2957795),v=new d(z,z,z,h[9]);return this.isOutputRounded?n(v):v}}e([o],h.prototype,"isOutputRounded",void 0),e([o],h.prototype,"percentRise",void 0),e([t(y)],h.prototype,"slopeConfig",void 0);export{h as SlopeShader};
2
+ import{__decorate as e}from"tslib";import{uniform as t,define as o,UniformGroup as i}from"../../../../GraphShaderModule.js";import{pow as r,Vec2 as p,sqrt as s,atan as l,Vec4 as d,Float as u}from"../../../../graph/glsl.js";import{getSurfaceValues as m,computeDeltaZ as c}from"../surface.js";import{BaseRasterProcessorShader as a}from"./BaseRasterProcessorShader.js";import{roundOutput as n}from"./math.js";class y extends i{}e([t(u)],y.prototype,"pixelSizePower",void 0),e([t(u)],y.prototype,"pixelSizeFactor",void 0),e([t(u)],y.prototype,"zFactor",void 0),e([t(p)],y.prototype,"cellSize",void 0);class h extends a{constructor(){super(...arguments),this.type="SlopeShader",this.isOutputRounded=!1,this.percentRise=!1}_process(e){const{cellSize:t,pixelSizePower:o,pixelSizeFactor:i,zFactor:u}=this.slopeConfig,a=r(t,new p(o)).multiply(i).add(u).divide(t.multiply(8)),y=m(this.texture,e,this.config.srcImageSize),{x:h,y:S}=c(y,a),f=s(h.multiply(h).add(S.multiply(S))),x=this.percentRise?f.multiply(100):l(f).multiply(57.2957795),z=new d(x,x,x,y[9]);return this.isOutputRounded?n(z):z}}e([o],h.prototype,"isOutputRounded",void 0),e([o],h.prototype,"percentRise",void 0),e([t(y)],h.prototype,"slopeConfig",void 0);export{h as SlopeShader};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{uniform as r,UniformGroup as t}from"../../../GraphShaderModule.js";import{step as n,Vec2 as o,Bool as i,texture2D as m,floor as s,fract as a,IVec2 as u,int as p,Vec3 as d,ifElse as c,lessThanEqual as f,texelFetch as l,Int as w,dot as g,Sampler2D as x}from"../../../graph/glsl.js";import{sampleBicubicBSpline as y}from"../bitmapUtils.js";import{oneMinus as b}from"../utils.js";import{sampleBilinear as S}from"./sampleBilinear.js";class v extends t{}function j(e,r){const t=m(r.transformTexture,e);return new o(t.r,t.g)}function z(e,r){const{transformTexture:t,targetImageSize:n,transformSpacing:i}=r,m=s(e.multiply(n)),l=new o(4,1),w=s(m.divide(i)).multiply(l),g=a(m.add(new o(.5,.5)).divide(i)),x=new u(p(w.x),p(w.y)),y=new d(g,1);return c(f(g.x,g.y),I(t,x,y),h(t,x,y))}function I(e,r,t){const n=l(e,r,new w(0)),i=new u(r.x.add(1),r.y),m=l(e,i,new w(0));return new o(g(n.rgb,t),g(m.rgb,t))}function h(e,r,t){const n=new u(r.x.add(2),r.y),i=l(e,n,new w(0)),m=new u(r.x.add(3),r.y),s=l(e,m,new w(0));return new o(g(i.rgb,t),g(s.rgb,t))}function T(e){const r=n(new o(-1e-5,-1e-5),e).multiply(n(e,new o(1.00001,1.00001))),t=b(r.x.multiply(r.y));return new i(t)}function G(e,r,t=!1){return r?t?j(e,r):z(e,r):e}function B(e,r,t){const{bicubic:n=!1,bilinear:o=!1,nearestOnEdge:i=!1}=t??{};return n||o?n?y(r.texture,e,r.srcImageSize):S(r.texture,e,r.srcImageSize,i):m(r.texture,e)}e([r(x)],v.prototype,"transformTexture",void 0),e([r(o)],v.prototype,"targetImageSize",void 0),e([r(o)],v.prototype,"transformSpacing",void 0),e([r(o)],v.prototype,"transformGridSize",void 0);export{v as ProjectionConfig,B as getPixel,G as getPixelLocation,T as isOutside};
2
+ import{__decorate as e}from"tslib";import{uniform as r,texture as t,UniformGroup as n,TextureGroup as o}from"../../../GraphShaderModule.js";import{step as i,Vec2 as s,Bool as a,texture2D as m,floor as u,fract as p,IVec2 as d,int as c,Vec3 as f,ifElse as l,lessThanEqual as w,texelFetch as g,Int as x,dot as y,Sampler2D as b}from"../../../graph/glsl.js";import{sampleBicubicBSpline as S}from"../bitmapUtils.js";import{oneMinus as v}from"../utils.js";import{sampleBilinear as j}from"./sampleBilinear.js";class z extends n{}e([r(s)],z.prototype,"targetImageSize",void 0),e([r(s)],z.prototype,"transformSpacing",void 0),e([r(s)],z.prototype,"transformGridSize",void 0);class I extends o{}function h(e,r){const t=m(r.transformTexture,e);return new s(t.r,t.g)}function T(e,r,t){const{targetImageSize:n,transformSpacing:o}=r,{transformTexture:i}=t,a=u(e.multiply(n)),m=new s(4,1),g=u(a.divide(o)).multiply(m),x=p(a.add(new s(.5,.5)).divide(o)),y=new d(c(g.x),c(g.y)),b=new f(x,1);return l(w(x.x,x.y),G(i,y,b),B(i,y,b))}function G(e,r,t){const n=g(e,r,new x(0)),o=new d(r.x.add(1),r.y),i=g(e,o,new x(0));return new s(y(n.rgb,t),y(i.rgb,t))}function B(e,r,t){const n=new d(r.x.add(2),r.y),o=g(e,n,new x(0)),i=new d(r.x.add(3),r.y),a=g(e,i,new x(0));return new s(y(o.rgb,t),y(a.rgb,t))}function E(e){const r=i(new s(-1e-5,-1e-5),e).multiply(i(e,new s(1.00001,1.00001))),t=v(r.x.multiply(r.y));return new a(t)}function M(e,r,t,n=!1){return r&&t?n?h(e,t):T(e,r,t):e}function O(e,r,t){const{bicubic:n=!1,bilinear:o=!1,nearestOnEdge:i=!1}=t??{};return n||o?n?S(r.texture,e,r.srcImageSize):j(r.texture,e,r.srcImageSize,i):m(r.texture,e)}e([t(b)],I.prototype,"transformTexture",void 0);export{z as ProjectionConfig,I as ProjectionTextures,O as getPixel,M as getPixelLocation,E as isOutside};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{uniform as r,UniformGroup as o}from"../../../GraphShaderModule.js";import{Vec4 as e,IVec2 as i,Int as u,texelFetch as m,max as p,min as a,Vec3 as n,clamp as d,step as s,Float as f,sign as c,pow as l,Sampler2D as v}from"../../../graph/glsl.js";import{oneMinus as x}from"../utils.js";import{invertValue as y}from"./processor/math.js";class b extends o{}t([r(f)],b.prototype,"minOutput",void 0),t([r(f)],b.prototype,"maxOutput",void 0),t([r(n)],b.prototype,"minCutOff",void 0),t([r(n)],b.prototype,"maxCutOff",void 0),t([r(n)],b.prototype,"factor",void 0),t([r(n)],b.prototype,"gamma",void 0),t([r(n)],b.prototype,"gammaCorrection",void 0);class O extends o{}function g(t,r){const{minCutOff:o,maxCutOff:e,factor:i,minOutput:u}=r;return d(t,o,e).subtract(o).multiply(i).add(u)}function C(t,r){const{minCutOff:o,maxCutOff:e,minOutput:i,maxOutput:u,gamma:m,gammaCorrection:p}=r,a=d(t,o,e).subtract(o),v=e.subtract(o),y=a.divide(v),b=s(new f(1),m),O=c(m.subtract(1)),g=u.subtract(i),C=new n(1),T=l(C.divide(g),y.multiply(p)),w=x(b.multiply(O).multiply(T)),h=l(y,C.divide(m)),j=w.multiply(g).multiply(h).add(i);return d(j,i,u)}function T(t,r,o,i=255){const u=o?C(t.rgb,r).divide(i):g(t.rgb,r);return new e(u,t.a)}function w(t,r,o,d,s){const f=new i(0,0),c=new u(0);let l=m(o.minTexture,f,c).rgb,v=m(o.maxTexture,f,c).rgb;if(s){const t=m(o.meanTexture,f,c).rgb,r=m(o.stddevTexture,f,c).rgb.multiply(o.numberOfStandardDeviations);l=p(l,t.subtract(r)),v=a(v,t.add(r))}const x=v.subtract(l),b=new n(y(x.x),y(x.y),y(x.z)),O=r.maxOutput.subtract(r.minOutput).multiply(b),T={...r,minCutOff:l,maxCutOff:v,factor:O},w=d?C(t.rgb,T).divide(255):g(t.rgb,T);return new e(w,t.a)}t([r(v)],O.prototype,"minTexture",void 0),t([r(v)],O.prototype,"maxTexture",void 0),t([r(v)],O.prototype,"meanTexture",void 0),t([r(v)],O.prototype,"stddevTexture",void 0),t([r(f)],O.prototype,"numberOfStandardDeviations",void 0);export{O as StatisticsConfig,b as StretchConfig,T as stretch,w as stretchWithStatisticsTexture};
2
+ import{__decorate as t}from"tslib";import{uniform as r,texture as o,UniformGroup as e,TextureGroup as i}from"../../../GraphShaderModule.js";import{Vec4 as u,IVec2 as m,Int as a,texelFetch as n,max as p,min as d,Vec3 as s,clamp as f,step as c,Float as l,sign as x,pow as v,Sampler2D as y}from"../../../graph/glsl.js";import{oneMinus as b}from"../utils.js";import{invertValue as O}from"./processor/math.js";class g extends e{}t([r(l)],g.prototype,"minOutput",void 0),t([r(l)],g.prototype,"maxOutput",void 0),t([r(s)],g.prototype,"minCutOff",void 0),t([r(s)],g.prototype,"maxCutOff",void 0),t([r(s)],g.prototype,"factor",void 0),t([r(s)],g.prototype,"gamma",void 0),t([r(s)],g.prototype,"gammaCorrection",void 0);class C extends e{}t([r(l)],C.prototype,"numberOfStandardDeviations",void 0);class T extends i{}function w(t,r){const{minCutOff:o,maxCutOff:e,factor:i,minOutput:u}=r;return f(t,o,e).subtract(o).multiply(i).add(u)}function h(t,r){const{minCutOff:o,maxCutOff:e,minOutput:i,maxOutput:u,gamma:m,gammaCorrection:a}=r,n=f(t,o,e).subtract(o),p=e.subtract(o),d=n.divide(p),y=c(new l(1),m),O=x(m.subtract(1)),g=u.subtract(i),C=new s(1),T=v(C.divide(g),d.multiply(a)),w=b(y.multiply(O).multiply(T)),h=v(d,C.divide(m)),j=w.multiply(g).multiply(h).add(i);return f(j,i,u)}function j(t,r,o,e=255){const i=o?h(t.rgb,r).divide(e):w(t.rgb,r);return new u(i,t.a)}function S(t,r,o,e,i,f){const c=new m(0,0),l=new a(0);let x=n(e.minTexture,c,l).rgb,v=n(e.maxTexture,c,l).rgb;if(f){const t=n(e.meanTexture,c,l).rgb,r=n(e.stddevTexture,c,l).rgb.multiply(o.numberOfStandardDeviations);x=p(x,t.subtract(r)),v=d(v,t.add(r))}const y=v.subtract(x),b=new s(O(y.x),O(y.y),O(y.z)),g=r.maxOutput.subtract(r.minOutput).multiply(b),C={...r,minCutOff:x,maxCutOff:v,factor:g},T=i?h(t.rgb,C).divide(255):w(t.rgb,C);return new u(T,t.a)}t([o(y)],T.prototype,"minTexture",void 0),t([o(y)],T.prototype,"maxTexture",void 0),t([o(y)],T.prototype,"meanTexture",void 0),t([o(y)],T.prototype,"stddevTexture",void 0);export{C as StatisticsConfig,T as StatisticsTextures,g as StretchConfig,j as stretch,S as stretchWithStatisticsTexture};
@@ -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{GraphShaderModule as e,FragmentOutput as r,location as i,uniform as p,define as l,option as s,input as d,FragmentInput as n,VertexInput as a,UniformGroup as y}from"../../../GraphShaderModule.js";import{Vec3 as c,Vec4 as v,Vec2 as u,fract as h,mix as x,texture2D as m,Float as f,Mat3 as g,Sampler2D as w}from"../../../graph/glsl.js";class C extends a{}t([i(0,u)],C.prototype,"position",void 0);class M extends y{}t([p(f)],M.prototype,"coordRange",void 0),t([p(f)],M.prototype,"depth",void 0);class b extends y{}t([p(g)],b.prototype,"dvsMat",void 0);class S extends y{}t([p(v)],S.prototype,"tlbr",void 0),t([p(u)],S.prototype,"mosaicSize",void 0),t([p(f)],S.prototype,"opacity",void 0),t([p(w)],S.prototype,"texture",void 0);class I extends y{}t([p(g)],I.prototype,"mat",void 0);class z extends y{}t([p(v)],z.prototype,"color",void 0);class T extends e{constructor(){super(...arguments),this.type="VTLShaderBackground"}vertex(t){const o=new c(this.layerInfo.coordRange.multiply(t.position),1),e=this.tileInfo.dvsMat.multiply(o).xy,r=new v(e,this.layerInfo.depth,1);let i,p=null;if(1===this.renderMode){const o=this.pattern,{tlbr:e,mosaicSize:r}=o;p=this.patternMat.mat.multiply(new c(t.position,1)).xy,i=e.divide(r.xyxy)}else i=new v(0),p=new u(0);return{glPosition:r,tlbr:i,tileTextureCoord:p}}fragment(t){const o=new r;switch(this.renderMode){case 1:{const e=h(t.tileTextureCoord),{texture:r,opacity:i}=this.pattern,p=x(t.tlbr.xy,t.tlbr.zw,e),l=m(r,p);o.fragColor=i.multiply(l);break}default:o.fragColor=this.getSolidColor()}return o}getSolidColor(){return null!=this.solidColor?this.solidColor.color:new v(1,0,0,1)}}t([l],T.prototype,"renderMode",void 0),t([p(M)],T.prototype,"layerInfo",void 0),t([p(b)],T.prototype,"tileInfo",void 0),t([s(z)],T.prototype,"solidColor",void 0),t([s(S)],T.prototype,"pattern",void 0),t([s(I)],T.prototype,"patternMat",void 0),t([o(0,d(C))],T.prototype,"vertex",null),t([o(0,d(n))],T.prototype,"fragment",null);export{T as VTLShaderBackground};
2
+ import{__decorate as t,__param as o}from"tslib";import{GraphShaderModule as e,FragmentOutput as r,location as i,uniform as p,define as s,option as l,texture as n,input as d,FragmentInput as a,VertexInput as y,UniformGroup as c}from"../../../GraphShaderModule.js";import{Vec3 as v,Vec4 as h,Vec2 as u,fract as x,mix as m,texture2D as f,Float as g,Mat3 as w,Sampler2D as C}from"../../../graph/glsl.js";class M extends y{}t([i(0,u)],M.prototype,"position",void 0);class b extends c{}t([p(g)],b.prototype,"coordRange",void 0),t([p(g)],b.prototype,"depth",void 0);class S extends c{}t([p(w)],S.prototype,"dvsMat",void 0);class I extends c{}t([p(h)],I.prototype,"tlbr",void 0),t([p(u)],I.prototype,"mosaicSize",void 0),t([p(g)],I.prototype,"opacity",void 0);class T extends c{}t([p(w)],T.prototype,"mat",void 0);class z extends c{}t([p(h)],z.prototype,"color",void 0);class j extends e{constructor(){super(...arguments),this.type="VTLShaderBackground"}vertex(t){const o=new v(this.layerInfo.coordRange.multiply(t.position),1),e=this.tileInfo.dvsMat.multiply(o).xy,r=new h(e,this.layerInfo.depth,1);let i,p=null;if(1===this.renderMode){const o=this.pattern,{tlbr:e,mosaicSize:r}=o;p=this.patternMat.mat.multiply(new v(t.position,1)).xy,i=e.divide(r.xyxy)}else i=new h(0),p=new u(0);return{glPosition:r,tlbr:i,tileTextureCoord:p}}fragment(t){const o=new r;switch(this.renderMode){case 1:{const e=x(t.tileTextureCoord),{opacity:r}=this.pattern,i=m(t.tlbr.xy,t.tlbr.zw,e),p=f(this.patternTexture,i);o.fragColor=r.multiply(p);break}default:o.fragColor=this.getSolidColor()}return o}getSolidColor(){return null!=this.solidColor?this.solidColor.color:new h(1,0,0,1)}}t([s],j.prototype,"renderMode",void 0),t([p(b)],j.prototype,"layerInfo",void 0),t([p(S)],j.prototype,"tileInfo",void 0),t([l(z)],j.prototype,"solidColor",void 0),t([l(I)],j.prototype,"pattern",void 0),t([l(T)],j.prototype,"patternMat",void 0),t([n(C)],j.prototype,"patternTexture",void 0),t([o(0,d(M))],j.prototype,"vertex",null),t([o(0,d(a))],j.prototype,"fragment",null);export{j as VTLShaderBackground};
@@ -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{GraphShaderModule as e,FragmentOutput as i,location as r,uniform as p,option as l,define as s,input as a,VertexInput as n,UniformGroup as y,FragmentInput as c}from"../../../GraphShaderModule.js";import{Vec2 as d,Float as v,Mat3 as u,negate as x,Vec3 as h,Vec4 as f,fract as w,mix as m,texture2D as g,pow as T,ceil as M,log2 as b,abs as C,Sampler2D as O}from"../../../graph/glsl.js";class z extends n{}t([r(0,d)],z.prototype,"position",void 0),t([r(1,f)],z.prototype,"color",void 0),t([r(2,v)],z.prototype,"opacity",void 0),t([r(3,f)],z.prototype,"tlbr",void 0),t([r(4,f)],z.prototype,"colorTo",void 0),t([r(5,v)],z.prototype,"opacityTo",void 0);class S extends c{}class F extends y{}t([p(u)],F.prototype,"dvsMat",void 0),t([p(u)],F.prototype,"displayMat",void 0);class L extends y{}t([p(v)],L.prototype,"depth",void 0),t([p(d)],L.prototype,"fillTranslation",void 0),t([p(v)],L.prototype,"tileOpacity",void 0);class j extends y{}t([p(d)],j.prototype,"mosaicSize",void 0),t([p(v)],j.prototype,"patternFactor",void 0),t([p(f)],j.prototype,"tlbr",void 0),t([p(O)],j.prototype,"texture",void 0);class B extends y{}t([p(v)],B.prototype,"value",void 0);class R extends y{}t([p(v)],R.prototype,"value",void 0);class G extends y{}t([p(f)],G.prototype,"value",void 0);class P extends y{}t([p(v)],P.prototype,"value",void 0);class V extends e{constructor(){super(...arguments),this.type="VTLShaderFill"}vertex(t){const o=this.getColor(t).multiply(this.getOpacity(t));let e=new d(0),i=this.getTLBR(t);if(1===this.fillType){const{mosaicSize:o,patternFactor:r}=this.patternOptions,p=k(i.z.subtract(i.x)),l=k(i.w.subtract(i.y)),s=new v(1).divide(p.multiply(r)),a=new v(1).divide(l.multiply(r));e=new u(s,new v(0),new v(0),new v(0),x(a),new v(0),new v(0),new v(0),new v(1)).multiply(new h(t.position,new v(1))).xy,i=i.divide(o.xyxy)}const r=this.transform.dvsMat.multiply(new h(t.position,1)).add(this.transform.displayMat.multiply(new h(this.config.fillTranslation,0)));return{glPosition:new f(r.xy,this.config.depth,1),color:o,tlbr:i,tileTextureCoord:e}}fragment(t){const o=new i;if(1===this.fillType){const{tlbr:e,tileTextureCoord:i}=t,{texture:r}=this.patternOptions,p=w(i),l=m(e.xy,e.zw,p),s=g(r,l);o.fragColor=t.color.a.multiply(s)}else o.fragColor=t.color;return o.fragColor=this.config.tileOpacity.multiply(o.fragColor),o}getColor(t){return this.colorMix?.value&&t.color&&t.colorTo?m(t.color,t.colorTo,this.colorMix.value):t.color?t.color:this.color?.value||new f(0)}getOpacity(t){return this.opacityMix?.value&&t.opacity&&t.opacityTo?m(t.opacity,t.opacityTo,this.opacityMix.value):t.opacity?t.opacity:this.opacity?.value||new v(1)}getTLBR(t){return t.tlbr?t.tlbr:this.patternOptions?.tlbr||new f(0)}}function k(t){return T(new v(2),M(b(C(t))))}t([p(F)],V.prototype,"transform",void 0),t([p(L)],V.prototype,"config",void 0),t([l(j)],V.prototype,"patternOptions",void 0),t([l(B)],V.prototype,"opacity",void 0),t([l(R)],V.prototype,"opacityMix",void 0),t([l(G)],V.prototype,"color",void 0),t([l(P)],V.prototype,"colorMix",void 0),t([s],V.prototype,"fillType",void 0),t([o(0,a(z))],V.prototype,"vertex",null),t([o(0,a(S))],V.prototype,"fragment",null);export{V as VTLShaderFill};
2
+ import{__decorate as t,__param as o}from"tslib";import{GraphShaderModule as e,FragmentOutput as i,location as r,uniform as p,option as l,texture as s,define as a,input as n,VertexInput as y,UniformGroup as c,FragmentInput as d}from"../../../GraphShaderModule.js";import{Vec2 as v,Float as u,Mat3 as x,negate as h,Vec3 as f,Vec4 as w,fract as m,mix as g,texture2D as T,pow as M,ceil as b,log2 as C,abs as O,Sampler2D as z}from"../../../graph/glsl.js";class S extends y{}t([r(0,v)],S.prototype,"position",void 0),t([r(1,w)],S.prototype,"color",void 0),t([r(2,u)],S.prototype,"opacity",void 0),t([r(3,w)],S.prototype,"tlbr",void 0),t([r(4,w)],S.prototype,"colorTo",void 0),t([r(5,u)],S.prototype,"opacityTo",void 0);class F extends d{}class L extends c{}t([p(x)],L.prototype,"dvsMat",void 0),t([p(x)],L.prototype,"displayMat",void 0);class j extends c{}t([p(u)],j.prototype,"depth",void 0),t([p(v)],j.prototype,"fillTranslation",void 0),t([p(u)],j.prototype,"tileOpacity",void 0);class B extends c{}t([p(v)],B.prototype,"mosaicSize",void 0),t([p(u)],B.prototype,"patternFactor",void 0),t([p(w)],B.prototype,"tlbr",void 0);class R extends c{}t([p(u)],R.prototype,"value",void 0);class G extends c{}t([p(u)],G.prototype,"value",void 0);class P extends c{}t([p(w)],P.prototype,"value",void 0);class V extends c{}t([p(u)],V.prototype,"value",void 0);class k extends e{constructor(){super(...arguments),this.type="VTLShaderFill"}vertex(t){const o=this.getColor(t).multiply(this.getOpacity(t));let e=new v(0),i=this.getTLBR(t);if(1===this.fillType){const{mosaicSize:o,patternFactor:r}=this.patternOptions,p=q(i.z.subtract(i.x)),l=q(i.w.subtract(i.y)),s=new u(1).divide(p.multiply(r)),a=new u(1).divide(l.multiply(r));e=new x(s,new u(0),new u(0),new u(0),h(a),new u(0),new u(0),new u(0),new u(1)).multiply(new f(t.position,new u(1))).xy,i=i.divide(o.xyxy)}const r=this.transform.dvsMat.multiply(new f(t.position,1)).add(this.transform.displayMat.multiply(new f(this.config.fillTranslation,0)));return{glPosition:new w(r.xy,this.config.depth,1),color:o,tlbr:i,tileTextureCoord:e}}fragment(t){const o=new i;if(1===this.fillType){const{tlbr:e,tileTextureCoord:i}=t,r=m(i),p=g(e.xy,e.zw,r),l=T(this.patternTexture,p);o.fragColor=t.color.a.multiply(l)}else o.fragColor=t.color;return o.fragColor=this.config.tileOpacity.multiply(o.fragColor),o}getColor(t){return this.colorMix?.value&&t.color&&t.colorTo?g(t.color,t.colorTo,this.colorMix.value):t.color?t.color:this.color?.value||new w(0)}getOpacity(t){return this.opacityMix?.value&&t.opacity&&t.opacityTo?g(t.opacity,t.opacityTo,this.opacityMix.value):t.opacity?t.opacity:this.opacity?.value||new u(1)}getTLBR(t){return t.tlbr?t.tlbr:this.patternOptions?.tlbr||new w(0)}}function q(t){return M(new u(2),b(C(O(t))))}t([p(L)],k.prototype,"transform",void 0),t([p(j)],k.prototype,"config",void 0),t([l(B)],k.prototype,"patternOptions",void 0),t([l(R)],k.prototype,"opacity",void 0),t([l(G)],k.prototype,"opacityMix",void 0),t([l(P)],k.prototype,"color",void 0),t([l(V)],k.prototype,"colorMix",void 0),t([s(z)],k.prototype,"patternTexture",void 0),t([a],k.prototype,"fillType",void 0),t([o(0,n(S))],k.prototype,"vertex",null),t([o(0,n(F))],k.prototype,"fragment",null);export{k as VTLShaderFill};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as o,__param as t}from"tslib";import{GraphShaderModule as e,FragmentOutput as i,location as l,uniform as p,option as r,define as a,input as s,VertexInput as d,UniformGroup as n,FragmentInput as y}from"../../../GraphShaderModule.js";import{mod as c,Float as v,unpackVec4 as u,clamp as h,step as w,abs as x,Vec3 as m,Vec4 as g,texture2D as f,max as T,ifElse as C,greaterThan as M,and as z,lessThan as W,equal as b,min as O,mix as S,Mat3 as I,Vec2 as B,Sampler2D as H}from"../../../graph/glsl.js";import{oneMinus as j,rgba2float as P}from"../utils.js";const V=new v(1/8),k=new v(120/86),A=new v(1/255.5),D=new v(16/86),R=new v(.248062016);class U extends d{}o([l(0,g)],U.prototype,"positionAndOffset",void 0),o([l(1,g)],U.prototype,"iconInfo",void 0),o([l(2,g)],U.prototype,"color",void 0),o([l(3,v)],U.prototype,"opacity",void 0),o([l(4,g)],U.prototype,"haloColor",void 0),o([l(5,v)],U.prototype,"haloWidth",void 0),o([l(6,v)],U.prototype,"haloBlur",void 0),o([l(7,v)],U.prototype,"size",void 0),o([l(8,g)],U.prototype,"colorTo",void 0),o([l(9,v)],U.prototype,"opacityTo",void 0),o([l(10,g)],U.prototype,"haloColorTo",void 0),o([l(11,v)],U.prototype,"haloWidthTo",void 0),o([l(12,v)],U.prototype,"haloBlurTo",void 0),o([l(13,v)],U.prototype,"sizeTo",void 0),o([l(14,v)],U.prototype,"opacityInfo",void 0);class G extends y{}class L extends n{}o([p(I)],L.prototype,"dvsMat3",void 0),o([p(I)],L.prototype,"displayMat3",void 0),o([p(I)],L.prototype,"displayViewMat3",void 0),o([p(v)],L.prototype,"mapRotation",void 0);class q extends n{}o([p(B)],q.prototype,"mosaicSize",void 0),o([p(H)],q.prototype,"texture",void 0);class E extends n{}o([p(B)],E.prototype,"iconTranslation",void 0),o([p(v)],E.prototype,"depth",void 0),o([p(v)],E.prototype,"level",void 0),o([p(v)],E.prototype,"keepUpright",void 0),o([p(v)],E.prototype,"fadeDuration",void 0),o([p(v)],E.prototype,"time",void 0),o([p(v)],E.prototype,"isStencilPass",void 0),o([p(v)],E.prototype,"tileOpacity",void 0);class F extends n{}o([p(v)],F.prototype,"value",void 0);class J extends n{}o([p(v)],J.prototype,"value",void 0);class K extends n{}o([p(v)],K.prototype,"value",void 0);class N extends n{}o([p(v)],N.prototype,"value",void 0);class Q extends n{}o([p(g)],Q.prototype,"value",void 0);class X extends n{}o([p(v)],X.prototype,"value",void 0);class Y extends n{}o([p(g)],Y.prototype,"value",void 0);class Z extends n{}o([p(v)],Z.prototype,"value",void 0);class $ extends n{}o([p(v)],$.prototype,"value",void 0);class _ extends n{}o([p(v)],_.prototype,"value",void 0);class oo extends e{constructor(){super(...arguments),this.type="VTLShaderIcon",this.iconType=0}vertex(o){const t=this.getSize(o),e=this.getColor(o),i=this.getHaloColor(o),l=this.getHaloWidth(o);let p=this.getOpacity(o);const{iconInfo:r,opacityInfo:a,positionAndOffset:s}=o,{mapRotation:d,displayMat3:n,displayViewMat3:y,dvsMat3:f}=this.transform,{depth:T,fadeDuration:C,iconTranslation:M,keepUpright:z,level:W,time:b}=this.config,{mosaicSize:O}=this.page,S=c(a,new v(128)),I=a.subtract(S).divide(new v(128)),B=S.divide(new v(127)),[H,P]=u(r,8),A=h(B.add(new v(2).multiply(I.subtract(new v(.5)).multiply(b.divide(C)))),new v(0),new v(1));p=p.multiply(A);const D=P[1],R=P[2],U=P[3],G=H.xy.divide(O);let L=new v(0);const q=c(D.add(d),new v(256));L=L.add(new v(1).subtract(w(z,new v(0))).multiply(w(new v(64),q).multiply(j(w(new v(192),q))))),L=L.add(j(w(R,W))),L=L.add(w(U,W)),L=L.add(w(p,new v(0)));let E=V.multiply(s.zw);const F=x(E);1===this.iconType&&(E=E.multiply(k));const J=f.multiply(new m(s.xy,new v(1))).add(y.multiply(new m(t.multiply(E),0))).add(n.multiply(new m(M,0)));return{glPosition:new g(J.xy,T.add(L),new v(1)),color:e,opacity:p,haloWidth:l,haloColor:i,size:F,tex:G}}fragment(o){const t=new i,{color:e,tex:l,opacity:p,size:r,haloWidth:a,haloColor:s}=o,{texture:d}=this.page,{isStencilPass:n,tileOpacity:y}=this.config;if(1===this.iconType){let o=e;const i=P(f(d,l)).subtract(new v(.5)).multiply(R).multiply(T(r.x,r.y));o=o.multiply(h(new v(.5).subtract(i),new v(0),new v(1))),t.fragColor=C(M(a,new v(.25)),this.getColorWithOutline(i,r,a,o,s,p),o.multiply(p)).multiply(y)}else{const o=f(d,l);z(b(n,new v(1)),W(o.a,A)),t.discard=z(b(n,new v(1)),W(o.a,A)),t.fragColor=o.multiply(p).multiply(y)}return t}getColorWithOutline(o,t,e,i,l,p){const r=R.multiply(O(e,D.multiply(T(t.x,t.y))));let a=l;return a=a.multiply(h(new v(.5).subtract(x(o).subtract(r)),new v(0),new v(1))),p.multiply(to(i,a))}getSize(o){return this.sizeMix?.value&&o.size&&o.sizeTo?S(o.size,o.sizeTo,this.sizeMix.value):o.size?o.size:this.size?.value||new v(0)}getColor(o){return this.colorMix?.value&&o.color&&o.colorTo?S(o.color,o.colorTo,this.colorMix.value):o.color?o.color:this.color?.value||new g(0)}getOpacity(o){return this.opacityMix?.value&&o.opacity&&o.opacityTo?S(o.opacity,o.opacityTo,this.opacityMix.value):o.opacity?o.opacity:this.opacity?.value||new v(1)}getHaloColor(o){return this.haloColorMix?.value&&o.haloColor&&o.haloColorTo?S(o.haloColor,o.haloColorTo,this.haloColorMix.value):o.haloColor?o.haloColor:this.haloColor?.value||new g(1)}getHaloWidth(o){if(1===this.iconType){if(this.opacityMix?.value&&o.haloWidth&&o.haloWidthTo)return S(o.haloWidth,o.haloWidthTo,this.opacityMix.value);if(o.haloWidth)return o.haloWidth}return new v(0)}}function to(o,t){const e=t.a.add(o.a.multiply(j(t.a))),i=t.rgb.add(o.rgb.multiply(j(t.a)));return new g(i,e)}o([p(L)],oo.prototype,"transform",void 0),o([p(q)],oo.prototype,"page",void 0),o([p(E)],oo.prototype,"config",void 0),o([r(F)],oo.prototype,"size",void 0),o([r(J)],oo.prototype,"sizeMix",void 0),o([r(K)],oo.prototype,"opacity",void 0),o([r(N)],oo.prototype,"opacityMix",void 0),o([r(Q)],oo.prototype,"color",void 0),o([r(X)],oo.prototype,"colorMix",void 0),o([r(Y)],oo.prototype,"haloColor",void 0),o([r(Z)],oo.prototype,"haloColorMix",void 0),o([r($)],oo.prototype,"haloBlur",void 0),o([r(_)],oo.prototype,"haloBlurMix",void 0),o([a],oo.prototype,"iconType",void 0),o([t(0,s(U))],oo.prototype,"vertex",null),o([t(0,s(G))],oo.prototype,"fragment",null);export{oo as VTLShaderIcon};
2
+ import{__decorate as o,__param as t}from"tslib";import{GraphShaderModule as e,FragmentOutput as i,location as l,uniform as p,texture as r,option as a,define as s,input as d,VertexInput as n,UniformGroup as y,FragmentInput as c}from"../../../GraphShaderModule.js";import{mod as v,Float as u,unpackVec4 as h,clamp as w,step as x,abs as m,Vec3 as g,Vec4 as f,texture2D as T,max as C,ifElse as M,greaterThan as z,and as W,lessThan as b,equal as O,min as S,mix as I,Mat3 as B,Vec2 as H,Sampler2D as j}from"../../../graph/glsl.js";import{oneMinus as P,rgba2float as V}from"../utils.js";const k=new u(1/8),A=new u(120/86),D=new u(1/255.5),R=new u(16/86),U=new u(.248062016);class G extends n{}o([l(0,f)],G.prototype,"positionAndOffset",void 0),o([l(1,f)],G.prototype,"iconInfo",void 0),o([l(2,f)],G.prototype,"color",void 0),o([l(3,u)],G.prototype,"opacity",void 0),o([l(4,f)],G.prototype,"haloColor",void 0),o([l(5,u)],G.prototype,"haloWidth",void 0),o([l(6,u)],G.prototype,"haloBlur",void 0),o([l(7,u)],G.prototype,"size",void 0),o([l(8,f)],G.prototype,"colorTo",void 0),o([l(9,u)],G.prototype,"opacityTo",void 0),o([l(10,f)],G.prototype,"haloColorTo",void 0),o([l(11,u)],G.prototype,"haloWidthTo",void 0),o([l(12,u)],G.prototype,"haloBlurTo",void 0),o([l(13,u)],G.prototype,"sizeTo",void 0),o([l(14,u)],G.prototype,"opacityInfo",void 0);class L extends c{}class q extends y{}o([p(B)],q.prototype,"dvsMat3",void 0),o([p(B)],q.prototype,"displayMat3",void 0),o([p(B)],q.prototype,"displayViewMat3",void 0),o([p(u)],q.prototype,"mapRotation",void 0);class E extends y{}o([p(H)],E.prototype,"mosaicSize",void 0);class F extends y{}o([p(H)],F.prototype,"iconTranslation",void 0),o([p(u)],F.prototype,"depth",void 0),o([p(u)],F.prototype,"level",void 0),o([p(u)],F.prototype,"keepUpright",void 0),o([p(u)],F.prototype,"fadeDuration",void 0),o([p(u)],F.prototype,"time",void 0),o([p(u)],F.prototype,"isStencilPass",void 0),o([p(u)],F.prototype,"tileOpacity",void 0);class J extends y{}o([p(u)],J.prototype,"value",void 0);class K extends y{}o([p(u)],K.prototype,"value",void 0);class N extends y{}o([p(u)],N.prototype,"value",void 0);class Q extends y{}o([p(u)],Q.prototype,"value",void 0);class X extends y{}o([p(f)],X.prototype,"value",void 0);class Y extends y{}o([p(u)],Y.prototype,"value",void 0);class Z extends y{}o([p(f)],Z.prototype,"value",void 0);class $ extends y{}o([p(u)],$.prototype,"value",void 0);class _ extends y{}o([p(u)],_.prototype,"value",void 0);class oo extends y{}o([p(u)],oo.prototype,"value",void 0);class to extends e{constructor(){super(...arguments),this.type="VTLShaderIcon",this.iconType=0}vertex(o){const t=this.getSize(o),e=this.getColor(o),i=this.getHaloColor(o),l=this.getHaloWidth(o);let p=this.getOpacity(o);const{iconInfo:r,opacityInfo:a,positionAndOffset:s}=o,{mapRotation:d,displayMat3:n,displayViewMat3:y,dvsMat3:c}=this.transform,{depth:T,fadeDuration:C,iconTranslation:M,keepUpright:z,level:W,time:b}=this.config,{mosaicSize:O}=this.page,S=v(a,new u(128)),I=a.subtract(S).divide(new u(128)),B=S.divide(new u(127)),[H,j]=h(r,8),V=w(B.add(new u(2).multiply(I.subtract(new u(.5)).multiply(b.divide(C)))),new u(0),new u(1));p=p.multiply(V);const D=j[1],R=j[2],U=j[3],G=H.xy.divide(O);let L=new u(0);const q=v(D.add(d),new u(256));L=L.add(new u(1).subtract(x(z,new u(0))).multiply(x(new u(64),q).multiply(P(x(new u(192),q))))),L=L.add(P(x(R,W))),L=L.add(x(U,W)),L=L.add(x(p,new u(0)));let E=k.multiply(s.zw);const F=m(E);1===this.iconType&&(E=E.multiply(A));const J=c.multiply(new g(s.xy,new u(1))).add(y.multiply(new g(t.multiply(E),0))).add(n.multiply(new g(M,0)));return{glPosition:new f(J.xy,T.add(L),new u(1)),color:e,opacity:p,haloWidth:l,haloColor:i,size:F,tex:G}}fragment(o){const t=new i,{color:e,tex:l,opacity:p,size:r,haloWidth:a,haloColor:s}=o,{isStencilPass:d,tileOpacity:n}=this.config;if(1===this.iconType){let o=e;const i=V(T(this.pageTexture,l)).subtract(new u(.5)).multiply(U).multiply(C(r.x,r.y));o=o.multiply(w(new u(.5).subtract(i),new u(0),new u(1))),t.fragColor=M(z(a,new u(.25)),this.getColorWithOutline(i,r,a,o,s,p),o.multiply(p)).multiply(n)}else{const o=T(this.pageTexture,l);W(O(d,new u(1)),b(o.a,D)),t.discard=W(O(d,new u(1)),b(o.a,D)),t.fragColor=o.multiply(p).multiply(n)}return t}getColorWithOutline(o,t,e,i,l,p){const r=U.multiply(S(e,R.multiply(C(t.x,t.y))));let a=l;return a=a.multiply(w(new u(.5).subtract(m(o).subtract(r)),new u(0),new u(1))),p.multiply(eo(i,a))}getSize(o){return this.sizeMix?.value&&o.size&&o.sizeTo?I(o.size,o.sizeTo,this.sizeMix.value):o.size?o.size:this.size?.value||new u(0)}getColor(o){return this.colorMix?.value&&o.color&&o.colorTo?I(o.color,o.colorTo,this.colorMix.value):o.color?o.color:this.color?.value||new f(0)}getOpacity(o){return this.opacityMix?.value&&o.opacity&&o.opacityTo?I(o.opacity,o.opacityTo,this.opacityMix.value):o.opacity?o.opacity:this.opacity?.value||new u(1)}getHaloColor(o){return this.haloColorMix?.value&&o.haloColor&&o.haloColorTo?I(o.haloColor,o.haloColorTo,this.haloColorMix.value):o.haloColor?o.haloColor:this.haloColor?.value||new f(1)}getHaloWidth(o){if(1===this.iconType){if(this.opacityMix?.value&&o.haloWidth&&o.haloWidthTo)return I(o.haloWidth,o.haloWidthTo,this.opacityMix.value);if(o.haloWidth)return o.haloWidth}return new u(0)}}function eo(o,t){const e=t.a.add(o.a.multiply(P(t.a))),i=t.rgb.add(o.rgb.multiply(P(t.a)));return new f(i,e)}o([p(q)],to.prototype,"transform",void 0),o([p(E)],to.prototype,"page",void 0),o([r(j)],to.prototype,"pageTexture",void 0),o([p(F)],to.prototype,"config",void 0),o([a(J)],to.prototype,"size",void 0),o([a(K)],to.prototype,"sizeMix",void 0),o([a(N)],to.prototype,"opacity",void 0),o([a(Q)],to.prototype,"opacityMix",void 0),o([a(X)],to.prototype,"color",void 0),o([a(Y)],to.prototype,"colorMix",void 0),o([a(Z)],to.prototype,"haloColor",void 0),o([a($)],to.prototype,"haloColorMix",void 0),o([a(_)],to.prototype,"haloBlur",void 0),o([a(oo)],to.prototype,"haloBlurMix",void 0),o([s],to.prototype,"iconType",void 0),o([t(0,d(G))],to.prototype,"vertex",null),o([t(0,d(L))],to.prototype,"fragment",null);export{to as VTLShaderIcon};
@@ -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{GraphShaderModule as e,FragmentOutput as i,location as l,uniform as p,define as r,option as a,input as s,FragmentInput as d,VertexInput as y,UniformGroup as n}from"../../../GraphShaderModule.js";import{Vec2 as u,Float as v,Vec3 as c,Vec4 as h,dot as f,length as m,clamp as w,fract as x,mix as b,texture2D as g,Mat3 as T,Sampler2D as M}from"../../../graph/glsl.js";import{rgba2float as z}from"../utils.js";const I=1/31,L=15.5,O=8;class S extends y{}t([l(0,u)],S.prototype,"position",void 0),t([l(1,h)],S.prototype,"extrudeOffset",void 0),t([l(2,h)],S.prototype,"directionNormal",void 0),t([l(3,u)],S.prototype,"accumulatedDistance",void 0),t([l(4,h)],S.prototype,"color",void 0),t([l(5,v)],S.prototype,"width",void 0),t([l(6,v)],S.prototype,"opacity",void 0),t([l(7,v)],S.prototype,"blur",void 0),t([l(8,v)],S.prototype,"offset",void 0),t([l(9,h)],S.prototype,"tlbr",void 0),t([l(10,h)],S.prototype,"colorTo",void 0),t([l(11,v)],S.prototype,"widthTo",void 0),t([l(12,v)],S.prototype,"opacityTo",void 0),t([l(13,v)],S.prototype,"blurTo",void 0),t([l(14,v)],S.prototype,"offsetTo",void 0);class C extends n{}t([p(T)],C.prototype,"displayMat3",void 0),t([p(T)],C.prototype,"displayViewMat3",void 0),t([p(u)],C.prototype,"lineTranslation",void 0),t([p(v)],C.prototype,"depth",void 0),t([p(v)],C.prototype,"antialiasing",void 0);class W extends n{}t([p(u)],W.prototype,"mosaicSize",void 0),t([p(M)],W.prototype,"texture",void 0);class R extends n{}t([p(v)],R.prototype,"zoomFactor",void 0),t([p(T)],R.prototype,"dvsMat3",void 0),t([p(v)],R.prototype,"tileOpacity",void 0);class D extends n{}t([p(h)],D.prototype,"value",void 0);class B extends n{}t([p(v)],B.prototype,"value",void 0);class j extends n{}t([p(v)],j.prototype,"value",void 0);class F extends n{}t([p(v)],F.prototype,"value",void 0);class N extends n{}t([p(v)],N.prototype,"value",void 0);class V extends n{}t([p(v)],V.prototype,"value",void 0);class G extends n{}t([p(v)],G.prototype,"value",void 0);class P extends n{}t([p(v)],P.prototype,"value",void 0);class k extends n{}t([p(v)],k.prototype,"value",void 0);class q extends n{}t([p(v)],q.prototype,"value",void 0);class A extends n{}t([p(h)],A.prototype,"value",void 0);class E extends e{constructor(){super(...arguments),this.type="VTLShaderLine"}vertex(t){const o=this.getColor(t).multiply(this.getOpacity(t)),e=this.getBlur(t).add(this.layerInfo.antialiasing),i=t.directionNormal.zw.multiply(I);let l=this.getTLBR(t);const p=this.getWidth(t);let r=new u(0),a=new v(1);1!==this.lineType&&2!==this.lineType||(r=new u(l.z.subtract(l.x),l.y.subtract(l.w)),l=l.divide(this.page.mosaicSize.xyxy),a=1===this.lineType?p.divide(r.y):p.divide(L).multiply(.5));const s=new v(p.add(this.layerInfo.antialiasing)).multiply(.5),d=t.directionNormal.xy.multiply(I),y=t.extrudeOffset.zw.multiply(I).multiply(this.getOffset(t)),n=s.multiply(I).multiply(t.extrudeOffset.xy),m=new v(O).divide(this.tileInfo.zoomFactor),w=this.tileInfo.dvsMat3.multiply(new c(t.position.add(y.multiply(m)),1)),x=new c(this.layerInfo.displayViewMat3.multiply(new c(n,0))).add(this.layerInfo.displayMat3.multiply(new c(this.layerInfo.lineTranslation,0))),b=w.add(x),g=new h(b.xy,this.layerInfo.depth,1);let T=new v(0);return 1!==this.lineType&&2!==this.lineType||(T=t.accumulatedDistance.x.multiply(this.tileInfo.zoomFactor.divide(new v(O))).add(f(d,n.add(y)))),{glPosition:g,color:o,tlbr:l,normal:i,patternSize:r,widthRatio:a,halfLineWidth:s,blur:e,accumulatedDistance:T}}fragment(t){const o=new i,e=m(t.normal).multiply(t.halfLineWidth),l=new v(t.halfLineWidth.subtract(e)).divide(t.blur),p=w(l,new v(0),new v(1));if(1===this.lineType){const e=x(t.accumulatedDistance.divide(t.patternSize.x.multiply(t.widthRatio))),i=new v(.5).add(t.normal.y.multiply(t.halfLineWidth.divide(t.patternSize.y.multiply(t.widthRatio)))),l=b(t.tlbr.xy,t.tlbr.zw,new u(e,i)),r=g(this.page.texture,l);o.fragColor=r.multiply(p).multiply(t.color.a)}else if(2===this.lineType){const e=x(t.accumulatedDistance.multiply(.5).divide(t.patternSize.x.multiply(t.widthRatio))),i=new v(.5).add(new v(.25).multiply(t.normal.y)),l=b(t.tlbr.xy,t.tlbr.zw,new u(e,i)),r=z(g(this.page.texture,l)).subtract(new v(.5)).multiply(t.halfLineWidth.add(this.layerInfo.antialiasing.multiply(.5)));o.fragColor=p.multiply(w(new v(.5).subtract(r),new v(0),new v(1))).multiply(t.color)}else o.fragColor=t.color.multiply(p);return o.fragColor=this.tileInfo.tileOpacity.multiply(o.fragColor),o}getColor(t){return this.colorMix?.value&&t.color&&t.colorTo?b(t.color,t.colorTo,this.colorMix.value):t.color?t.color:this.color?.value||new h(0)}getWidth(t){return this.widthMix?.value&&t.width&&t.widthTo?b(t.width,t.widthTo,this.widthMix.value):t.width?t.width:this.width?.value||new v(0)}getBlur(t){return this.blurMix?.value&&t.blur&&t.blurTo?b(t.blur,t.blurTo,this.blurMix.value):t.blur?t.blur:this.blur?.value||new v(0)}getOpacity(t){return this.opacityMix?.value&&t.opacity&&t.opacityTo?b(t.opacity,t.opacityTo,this.opacityMix.value):t.opacity?t.opacity:this.opacity?.value||new v(1)}getOffset(t){return this.offsetMix?.value&&t.offset&&t.offsetTo?b(t.offset,t.offsetTo,this.offsetMix.value):t.offset?t.offset:this.offset?.value||new v(0)}getTLBR(t){return t.tlbr?t.tlbr:this.tlbr?.value||new h(0)}}t([r],E.prototype,"lineType",void 0),t([p(C)],E.prototype,"layerInfo",void 0),t([p(R)],E.prototype,"tileInfo",void 0),t([a(W)],E.prototype,"page",void 0),t([a(D)],E.prototype,"color",void 0),t([a(B)],E.prototype,"colorMix",void 0),t([a(j)],E.prototype,"width",void 0),t([a(F)],E.prototype,"widthMix",void 0),t([a(N)],E.prototype,"opacity",void 0),t([a(V)],E.prototype,"opacityMix",void 0),t([a(G)],E.prototype,"blur",void 0),t([a(P)],E.prototype,"blurMix",void 0),t([a(k)],E.prototype,"offset",void 0),t([a(q)],E.prototype,"offsetMix",void 0),t([a(A)],E.prototype,"tlbr",void 0),t([o(0,s(S))],E.prototype,"vertex",null),t([o(0,s(d))],E.prototype,"fragment",null);export{E as VTLShaderLine};
2
+ import{__decorate as t,__param as o}from"tslib";import{GraphShaderModule as e,FragmentOutput as i,location as l,uniform as p,define as r,option as a,texture as s,input as d,FragmentInput as y,VertexInput as n,UniformGroup as u}from"../../../GraphShaderModule.js";import{Vec2 as v,Float as c,Vec3 as h,Vec4 as f,dot as m,length as w,clamp as x,fract as b,mix as g,texture2D as T,Mat3 as M,Sampler2D as z}from"../../../graph/glsl.js";import{rgba2float as I}from"../utils.js";const L=1/31,O=15.5,S=8;class C extends n{}t([l(0,v)],C.prototype,"position",void 0),t([l(1,f)],C.prototype,"extrudeOffset",void 0),t([l(2,f)],C.prototype,"directionNormal",void 0),t([l(3,v)],C.prototype,"accumulatedDistance",void 0),t([l(4,f)],C.prototype,"color",void 0),t([l(5,c)],C.prototype,"width",void 0),t([l(6,c)],C.prototype,"opacity",void 0),t([l(7,c)],C.prototype,"blur",void 0),t([l(8,c)],C.prototype,"offset",void 0),t([l(9,f)],C.prototype,"tlbr",void 0),t([l(10,f)],C.prototype,"colorTo",void 0),t([l(11,c)],C.prototype,"widthTo",void 0),t([l(12,c)],C.prototype,"opacityTo",void 0),t([l(13,c)],C.prototype,"blurTo",void 0),t([l(14,c)],C.prototype,"offsetTo",void 0);class W extends u{}t([p(M)],W.prototype,"displayMat3",void 0),t([p(M)],W.prototype,"displayViewMat3",void 0),t([p(v)],W.prototype,"lineTranslation",void 0),t([p(c)],W.prototype,"depth",void 0),t([p(c)],W.prototype,"antialiasing",void 0);class R extends u{}t([p(v)],R.prototype,"mosaicSize",void 0);class D extends u{}t([p(c)],D.prototype,"zoomFactor",void 0),t([p(M)],D.prototype,"dvsMat3",void 0),t([p(c)],D.prototype,"tileOpacity",void 0);class B extends u{}t([p(f)],B.prototype,"value",void 0);class j extends u{}t([p(c)],j.prototype,"value",void 0);class F extends u{}t([p(c)],F.prototype,"value",void 0);class N extends u{}t([p(c)],N.prototype,"value",void 0);class V extends u{}t([p(c)],V.prototype,"value",void 0);class G extends u{}t([p(c)],G.prototype,"value",void 0);class P extends u{}t([p(c)],P.prototype,"value",void 0);class k extends u{}t([p(c)],k.prototype,"value",void 0);class q extends u{}t([p(c)],q.prototype,"value",void 0);class A extends u{}t([p(c)],A.prototype,"value",void 0);class E extends u{}t([p(f)],E.prototype,"value",void 0);class H extends e{constructor(){super(...arguments),this.type="VTLShaderLine"}vertex(t){const o=this.getColor(t).multiply(this.getOpacity(t)),e=this.getBlur(t).add(this.layerInfo.antialiasing),i=t.directionNormal.zw.multiply(L);let l=this.getTLBR(t);const p=this.getWidth(t);let r=new v(0),a=new c(1);1!==this.lineType&&2!==this.lineType||(r=new v(l.z.subtract(l.x),l.y.subtract(l.w)),l=l.divide(this.page.mosaicSize.xyxy),a=1===this.lineType?p.divide(r.y):p.divide(O).multiply(.5));const s=new c(p.add(this.layerInfo.antialiasing)).multiply(.5),d=t.directionNormal.xy.multiply(L),y=t.extrudeOffset.zw.multiply(L).multiply(this.getOffset(t)),n=s.multiply(L).multiply(t.extrudeOffset.xy),u=new c(S).divide(this.tileInfo.zoomFactor),w=this.tileInfo.dvsMat3.multiply(new h(t.position.add(y.multiply(u)),1)),x=new h(this.layerInfo.displayViewMat3.multiply(new h(n,0))).add(this.layerInfo.displayMat3.multiply(new h(this.layerInfo.lineTranslation,0))),b=w.add(x),g=new f(b.xy,this.layerInfo.depth,1);let T=new c(0);return 1!==this.lineType&&2!==this.lineType||(T=t.accumulatedDistance.x.multiply(this.tileInfo.zoomFactor.divide(new c(S))).add(m(d,n.add(y)))),{glPosition:g,color:o,tlbr:l,normal:i,patternSize:r,widthRatio:a,halfLineWidth:s,blur:e,accumulatedDistance:T}}fragment(t){const o=new i,e=w(t.normal).multiply(t.halfLineWidth),l=new c(t.halfLineWidth.subtract(e)).divide(t.blur),p=x(l,new c(0),new c(1));if(1===this.lineType){const e=b(t.accumulatedDistance.divide(t.patternSize.x.multiply(t.widthRatio))),i=new c(.5).add(t.normal.y.multiply(t.halfLineWidth.divide(t.patternSize.y.multiply(t.widthRatio)))),l=g(t.tlbr.xy,t.tlbr.zw,new v(e,i)),r=T(this.pageTexture,l);o.fragColor=r.multiply(p).multiply(t.color.a)}else if(2===this.lineType){const e=b(t.accumulatedDistance.multiply(.5).divide(t.patternSize.x.multiply(t.widthRatio))),i=new c(.5).add(new c(.25).multiply(t.normal.y)),l=g(t.tlbr.xy,t.tlbr.zw,new v(e,i)),r=I(T(this.pageTexture,l)).subtract(new c(.5)).multiply(t.halfLineWidth.add(this.layerInfo.antialiasing.multiply(.5)));o.fragColor=p.multiply(x(new c(.5).subtract(r),new c(0),new c(1))).multiply(t.color)}else o.fragColor=t.color.multiply(p);return o.fragColor=this.tileInfo.tileOpacity.multiply(o.fragColor),o}getColor(t){return this.colorMix?.value&&t.color&&t.colorTo?g(t.color,t.colorTo,this.colorMix.value):t.color?t.color:this.color?.value||new f(0)}getWidth(t){return this.widthMix?.value&&t.width&&t.widthTo?g(t.width,t.widthTo,this.widthMix.value):t.width?t.width:this.width?.value||new c(0)}getBlur(t){return this.blurMix?.value&&t.blur&&t.blurTo?g(t.blur,t.blurTo,this.blurMix.value):t.blur?t.blur:this.blur?.value||new c(0)}getOpacity(t){return this.opacityMix?.value&&t.opacity&&t.opacityTo?g(t.opacity,t.opacityTo,this.opacityMix.value):t.opacity?t.opacity:this.opacity?.value||new c(1)}getOffset(t){return this.offsetMix?.value&&t.offset&&t.offsetTo?g(t.offset,t.offsetTo,this.offsetMix.value):t.offset?t.offset:this.offset?.value||new c(0)}getTLBR(t){return t.tlbr?t.tlbr:this.tlbr?.value||new f(0)}}t([r],H.prototype,"lineType",void 0),t([p(W)],H.prototype,"layerInfo",void 0),t([p(D)],H.prototype,"tileInfo",void 0),t([a(R)],H.prototype,"page",void 0),t([a(B)],H.prototype,"color",void 0),t([a(j)],H.prototype,"colorMix",void 0),t([a(F)],H.prototype,"width",void 0),t([a(N)],H.prototype,"widthMix",void 0),t([a(V)],H.prototype,"opacity",void 0),t([a(G)],H.prototype,"opacityMix",void 0),t([a(P)],H.prototype,"blur",void 0),t([a(k)],H.prototype,"blurMix",void 0),t([a(q)],H.prototype,"offset",void 0),t([a(A)],H.prototype,"offsetMix",void 0),t([a(E)],H.prototype,"tlbr",void 0),t([s(z)],H.prototype,"pageTexture",void 0),t([o(0,d(C))],H.prototype,"vertex",null),t([o(0,d(y))],H.prototype,"fragment",null);export{H as VTLShaderLine};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as o,__param as t}from"tslib";import{GraphShaderModule as e,FragmentOutput as i,location as l,uniform as p,option as a,input as r,VertexInput as d,UniformGroup as s,FragmentInput as y}from"../../../GraphShaderModule.js";import{mod as n,Float as v,unpackVec4 as h,ifElse as u,greaterThan as c,clamp as x,step as w,lessThan as m,Vec3 as g,Vec4 as M,texture2D as f,smoothstep as T,mix as z,Mat3 as W,Vec2 as C,Sampler2D as B}from"../../../graph/glsl.js";import{oneMinus as S}from"../utils.js";class H extends d{}o([l(0,M)],H.prototype,"positionAndOffset",void 0),o([l(1,M)],H.prototype,"iconInfo",void 0),o([l(2,v)],H.prototype,"size",void 0),o([l(3,v)],H.prototype,"opacity",void 0),o([l(4,M)],H.prototype,"color",void 0),o([l(5,M)],H.prototype,"haloColor",void 0),o([l(6,v)],H.prototype,"haloWidth",void 0),o([l(7,v)],H.prototype,"haloBlur",void 0),o([l(8,v)],H.prototype,"sizeTo",void 0),o([l(9,v)],H.prototype,"opacityTo",void 0),o([l(10,M)],H.prototype,"colorTo",void 0),o([l(11,M)],H.prototype,"haloColorTo",void 0),o([l(12,v)],H.prototype,"haloWidthTo",void 0),o([l(13,v)],H.prototype,"haloBlurTo",void 0),o([l(14,v)],H.prototype,"opacityInfo",void 0);class O extends y{}class b extends s{}o([p(W)],b.prototype,"dvsMat3",void 0),o([p(W)],b.prototype,"displayMat3",void 0),o([p(W)],b.prototype,"displayViewMat3",void 0),o([p(v)],b.prototype,"mapRotation",void 0);class D extends s{}o([p(v)],D.prototype,"halo",void 0),o([p(v)],D.prototype,"depth",void 0),o([p(v)],D.prototype,"level",void 0),o([p(v)],D.prototype,"keepUpright",void 0),o([p(v)],D.prototype,"fadeDuration",void 0),o([p(v)],D.prototype,"time",void 0),o([p(v)],D.prototype,"isStencilPass",void 0),o([p(v)],D.prototype,"antialiasingWidth",void 0),o([p(C)],D.prototype,"textTranslation",void 0),o([p(v)],D.prototype,"tileOpacity",void 0);class I extends s{}o([p(C)],I.prototype,"mosaicSize",void 0),o([p(B)],I.prototype,"texture",void 0);class j extends s{}o([p(v)],j.prototype,"value",void 0);class V extends s{}o([p(v)],V.prototype,"value",void 0);class k extends s{}o([p(M)],k.prototype,"value",void 0);class A extends s{}o([p(v)],A.prototype,"value",void 0);class P extends s{}o([p(M)],P.prototype,"value",void 0);class R extends s{}o([p(v)],R.prototype,"value",void 0);class U extends s{}o([p(v)],U.prototype,"value",void 0);class G extends s{}o([p(v)],G.prototype,"value",void 0);class L extends s{}o([p(v)],L.prototype,"value",void 0);class q extends s{}o([p(v)],q.prototype,"value",void 0);class E extends s{}o([p(v)],E.prototype,"value",void 0);class F extends s{}o([p(v)],F.prototype,"value",void 0);const J=new v(1/8),K=new v(1/24),N=new v(3),Q=new v(.75);class X extends e{constructor(){super(...arguments),this.type="VTLShaderText"}vertex(o){const t=this.getSize(o),e=this.getHaloColor(o),i=this.getColor(o);let l=this.getHaloWidth(o),p=this.getHaloBlur(o);const a=this.getOpacity(o),{iconInfo:r,opacityInfo:d,positionAndOffset:s}=o,{dvsMat3:y,displayViewMat3:f,displayMat3:T,mapRotation:z}=this.transform,{antialiasingWidth:W,depth:C,halo:B,level:H,keepUpright:O,fadeDuration:b,textTranslation:D,time:I}=this.config,{mosaicSize:j}=this.page,V=n(d,new v(128)),k=d.subtract(V).divide(new v(128)),A=V.divide(new v(127)),[P,R]=h(r,8);let U=u(c(B,new v(.5)),e.multiply(a),i.multiply(a));l=u(c(B,new v(.5)),l.multiply(N),new v(0)),p=u(c(B,new v(.5)),p.multiply(N),new v(0));const G=x(A.add(new v(2).multiply(k.subtract(new v(.5)).multiply(I.divide(b)))),new v(0),new v(1));U=U.multiply(G);const L=R[1],q=R[2],E=R[3],F=P.xy.divide(j),X=P.z,Y=P.w,Z=n(L.add(z),new v(256));let $=new v(0);$=u(m(X,Y),S(w(O,new v(0))).multiply(w(Y,Z).add(S(w(X,Z)))),S(w(O,new v(0))).multiply(w(Y,Z).multiply(S(w(X,Z))))),$=$.add(S(w(q,H))),$=$.add(w(E,H)),$=$.add(w(U[3],new v(0)));const _=Q.subtract(l.divide(t)),oo=W.add(p).divide(t),to=y.multiply(new g(s.xy,new v(1))).add(f.multiply(K).multiply(new g(J.multiply(t.multiply(s.zw)),new v(0)))).add(T.multiply(new g(D,0)));return{glPosition:new M(to.xy,C.add($),new v(1)),color:U,tex:F,edgeDistance:_,edgeWidth:oo}}fragment(o){const t=new i,{color:e,tex:l,edgeDistance:p,edgeWidth:a}=o,{texture:r}=this.page,{tileOpacity:d}=this.config,s=f(r,l).a,y=T(p.subtract(a),p.add(a),s);return t.fragColor=e.multiply(y).multiply(d),t}getSize(o){return this.sizeMix?.value&&o.size&&o.sizeTo?z(o.size,o.sizeTo,this.sizeMix.value):o.size?o.size:this.size?.value||new v(0)}getHaloColor(o){return this.haloColorMix?.value&&o.haloColor&&o.haloColorTo?z(o.haloColor,o.haloColorTo,this.haloColorMix.value):o.haloColor?o.haloColor:this.haloColor?.value||new M(0)}getHaloBlur(o){return this.haloBlurMix?.value&&o.haloBlur&&o.haloBlurTo?z(o.haloBlur,o.haloBlurTo,this.haloBlurMix.value):o.haloBlur?o.haloBlur:this.haloBlur?.value||new v(0)}getHaloWidth(o){return this.haloWidthMix?.value&&o.haloWidth&&o.haloWidthTo?z(o.haloWidth,o.haloWidthTo,this.haloWidthMix.value):o.haloWidth?o.haloWidth:this.haloWidth?.value||new v(0)}getColor(o){return this.colorMix?.value&&o.color&&o.colorTo?z(o.color,o.colorTo,this.colorMix.value):o.color?o.color:this.color?.value||new M(0)}getOpacity(o){return this.opacityMix?.value&&o.opacity&&o.opacityTo?z(o.opacity,o.opacityTo,this.opacityMix.value):o.opacity?o.opacity:this.opacity?.value||new v(1)}}o([p(b)],X.prototype,"transform",void 0),o([p(D)],X.prototype,"config",void 0),o([p(I)],X.prototype,"page",void 0),o([a(E)],X.prototype,"size",void 0),o([a(k)],X.prototype,"color",void 0),o([a(P)],X.prototype,"haloColor",void 0),o([a(U)],X.prototype,"haloWidth",void 0),o([a(G)],X.prototype,"haloBlur",void 0),o([a(j)],X.prototype,"opacity",void 0),o([a(F)],X.prototype,"sizeMix",void 0),o([a(A)],X.prototype,"colorMix",void 0),o([a(R)],X.prototype,"haloColorMix",void 0),o([a(L)],X.prototype,"haloWidthMix",void 0),o([a(q)],X.prototype,"haloBlurMix",void 0),o([a(V)],X.prototype,"opacityMix",void 0),o([t(0,r(H))],X.prototype,"vertex",null),o([t(0,r(O))],X.prototype,"fragment",null);export{X as VTLShaderText};
2
+ import{__decorate as o,__param as t}from"tslib";import{GraphShaderModule as e,FragmentOutput as i,location as l,uniform as p,option as a,texture as r,input as d,VertexInput as s,UniformGroup as y,FragmentInput as n}from"../../../GraphShaderModule.js";import{mod as v,Float as h,unpackVec4 as u,ifElse as c,greaterThan as x,clamp as w,step as m,lessThan as g,Vec3 as M,Vec4 as T,texture2D as f,smoothstep as z,mix as W,Mat3 as C,Vec2 as B,Sampler2D as S}from"../../../graph/glsl.js";import{oneMinus as H}from"../utils.js";class O extends s{}o([l(0,T)],O.prototype,"positionAndOffset",void 0),o([l(1,T)],O.prototype,"iconInfo",void 0),o([l(2,h)],O.prototype,"size",void 0),o([l(3,h)],O.prototype,"opacity",void 0),o([l(4,T)],O.prototype,"color",void 0),o([l(5,T)],O.prototype,"haloColor",void 0),o([l(6,h)],O.prototype,"haloWidth",void 0),o([l(7,h)],O.prototype,"haloBlur",void 0),o([l(8,h)],O.prototype,"sizeTo",void 0),o([l(9,h)],O.prototype,"opacityTo",void 0),o([l(10,T)],O.prototype,"colorTo",void 0),o([l(11,T)],O.prototype,"haloColorTo",void 0),o([l(12,h)],O.prototype,"haloWidthTo",void 0),o([l(13,h)],O.prototype,"haloBlurTo",void 0),o([l(14,h)],O.prototype,"opacityInfo",void 0);class b extends n{}class D extends y{}o([p(C)],D.prototype,"dvsMat3",void 0),o([p(C)],D.prototype,"displayMat3",void 0),o([p(C)],D.prototype,"displayViewMat3",void 0),o([p(h)],D.prototype,"mapRotation",void 0);class I extends y{}o([p(h)],I.prototype,"halo",void 0),o([p(h)],I.prototype,"depth",void 0),o([p(h)],I.prototype,"level",void 0),o([p(h)],I.prototype,"keepUpright",void 0),o([p(h)],I.prototype,"fadeDuration",void 0),o([p(h)],I.prototype,"time",void 0),o([p(h)],I.prototype,"isStencilPass",void 0),o([p(h)],I.prototype,"antialiasingWidth",void 0),o([p(B)],I.prototype,"textTranslation",void 0),o([p(h)],I.prototype,"tileOpacity",void 0);class j extends y{}o([p(B)],j.prototype,"mosaicSize",void 0);class V extends y{}o([p(h)],V.prototype,"value",void 0);class k extends y{}o([p(h)],k.prototype,"value",void 0);class A extends y{}o([p(T)],A.prototype,"value",void 0);class P extends y{}o([p(h)],P.prototype,"value",void 0);class R extends y{}o([p(T)],R.prototype,"value",void 0);class U extends y{}o([p(h)],U.prototype,"value",void 0);class G extends y{}o([p(h)],G.prototype,"value",void 0);class L extends y{}o([p(h)],L.prototype,"value",void 0);class q extends y{}o([p(h)],q.prototype,"value",void 0);class E extends y{}o([p(h)],E.prototype,"value",void 0);class F extends y{}o([p(h)],F.prototype,"value",void 0);class J extends y{}o([p(h)],J.prototype,"value",void 0);const K=new h(1/8),N=new h(1/24),Q=new h(3),X=new h(.75);class Y extends e{constructor(){super(...arguments),this.type="VTLShaderText"}vertex(o){const t=this.getSize(o),e=this.getHaloColor(o),i=this.getColor(o);let l=this.getHaloWidth(o),p=this.getHaloBlur(o);const a=this.getOpacity(o),{iconInfo:r,opacityInfo:d,positionAndOffset:s}=o,{dvsMat3:y,displayViewMat3:n,displayMat3:f,mapRotation:z}=this.transform,{antialiasingWidth:W,depth:C,halo:B,level:S,keepUpright:O,fadeDuration:b,textTranslation:D,time:I}=this.config,{mosaicSize:j}=this.page,V=v(d,new h(128)),k=d.subtract(V).divide(new h(128)),A=V.divide(new h(127)),[P,R]=u(r,8);let U=c(x(B,new h(.5)),e.multiply(a),i.multiply(a));l=c(x(B,new h(.5)),l.multiply(Q),new h(0)),p=c(x(B,new h(.5)),p.multiply(Q),new h(0));const G=w(A.add(new h(2).multiply(k.subtract(new h(.5)).multiply(I.divide(b)))),new h(0),new h(1));U=U.multiply(G);const L=R[1],q=R[2],E=R[3],F=P.xy.divide(j),J=P.z,Y=P.w,Z=v(L.add(z),new h(256));let $=new h(0);$=c(g(J,Y),H(m(O,new h(0))).multiply(m(Y,Z).add(H(m(J,Z)))),H(m(O,new h(0))).multiply(m(Y,Z).multiply(H(m(J,Z))))),$=$.add(H(m(q,S))),$=$.add(m(E,S)),$=$.add(m(U[3],new h(0)));const _=X.subtract(l.divide(t)),oo=W.add(p).divide(t),to=y.multiply(new M(s.xy,new h(1))).add(n.multiply(N).multiply(new M(K.multiply(t.multiply(s.zw)),new h(0)))).add(f.multiply(new M(D,0)));return{glPosition:new T(to.xy,C.add($),new h(1)),color:U,tex:F,edgeDistance:_,edgeWidth:oo}}fragment(o){const t=new i,{color:e,tex:l,edgeDistance:p,edgeWidth:a}=o,{tileOpacity:r}=this.config,d=f(this.pageTexture,l).a,s=z(p.subtract(a),p.add(a),d);return t.fragColor=e.multiply(s).multiply(r),t}getSize(o){return this.sizeMix?.value&&o.size&&o.sizeTo?W(o.size,o.sizeTo,this.sizeMix.value):o.size?o.size:this.size?.value||new h(0)}getHaloColor(o){return this.haloColorMix?.value&&o.haloColor&&o.haloColorTo?W(o.haloColor,o.haloColorTo,this.haloColorMix.value):o.haloColor?o.haloColor:this.haloColor?.value||new T(0)}getHaloBlur(o){return this.haloBlurMix?.value&&o.haloBlur&&o.haloBlurTo?W(o.haloBlur,o.haloBlurTo,this.haloBlurMix.value):o.haloBlur?o.haloBlur:this.haloBlur?.value||new h(0)}getHaloWidth(o){return this.haloWidthMix?.value&&o.haloWidth&&o.haloWidthTo?W(o.haloWidth,o.haloWidthTo,this.haloWidthMix.value):o.haloWidth?o.haloWidth:this.haloWidth?.value||new h(0)}getColor(o){return this.colorMix?.value&&o.color&&o.colorTo?W(o.color,o.colorTo,this.colorMix.value):o.color?o.color:this.color?.value||new T(0)}getOpacity(o){return this.opacityMix?.value&&o.opacity&&o.opacityTo?W(o.opacity,o.opacityTo,this.opacityMix.value):o.opacity?o.opacity:this.opacity?.value||new h(1)}}o([p(D)],Y.prototype,"transform",void 0),o([p(I)],Y.prototype,"config",void 0),o([p(j)],Y.prototype,"page",void 0),o([a(F)],Y.prototype,"size",void 0),o([a(A)],Y.prototype,"color",void 0),o([a(R)],Y.prototype,"haloColor",void 0),o([a(G)],Y.prototype,"haloWidth",void 0),o([a(L)],Y.prototype,"haloBlur",void 0),o([a(V)],Y.prototype,"opacity",void 0),o([a(J)],Y.prototype,"sizeMix",void 0),o([a(P)],Y.prototype,"colorMix",void 0),o([a(U)],Y.prototype,"haloColorMix",void 0),o([a(q)],Y.prototype,"haloWidthMix",void 0),o([a(E)],Y.prototype,"haloBlurMix",void 0),o([a(k)],Y.prototype,"opacityMix",void 0),o([r(S)],Y.prototype,"pageTexture",void 0),o([t(0,d(O))],Y.prototype,"vertex",null),o([t(0,d(b))],Y.prototype,"fragment",null);export{Y as VTLShaderText};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{Bool as a,Float as e,Mat3 as i}from"../../graph/glsl.js";function t(a){return null!=a.visualVariableSizeMinMaxValue||null!=a.visualVariableSizeScaleStops||null!=a.visualVariableSizeStops||null!=a.visualVariableSizeUnitValue}function l(a,e,i){if(t(a)){const t=a.storage.getSizeValue(e);return a.visualVariableSizeMinMaxValue?.getSize(t,i)??a.visualVariableSizeScaleStops?.getSizeForViewScale(a.view.currentScale)??a.visualVariableSizeStops?.getSize(t,i)??a.visualVariableSizeUnitValue?.getSize(t,i)}return i}function r(e,i,t,l=new a(!1)){if(null==e.visualVariableColor)return t;const r=e.storage.getColorValue(i);return e.visualVariableColor.getColor(r,t,l)}function n(a,i){if(null==a.visualVariableOpacity)return new e(1);const t=a.storage.getOpacityValue(i);return a.visualVariableOpacity.getOpacity(t)}function u(a,e){if(null==a.visualVariableRotation)return i.identity();const t=a.storage.getRotationValue(e);return a.visualVariableRotation.getVVRotationMat3(t)}function o(a,i){if(null==a.visualVariableRotation)return new e(0);const t=a.storage.getRotationValue(i);return a.visualVariableRotation.getNormalizedAngle(t)}export{o as getVisualVariableAngle,r as getVisualVariableColor,n as getVisualVariableOpacity,u as getVisualVariableRotation,l as getVisualVariableSize,t as hasVisualVariableSize};
2
+ import{Bool as a,Float as i,Mat3 as e}from"../../graph/glsl.js";function l(a){return null!=a.visualVariableSizeMinMaxValue||null!=a.visualVariableSizeScaleStops||null!=a.visualVariableSizeStops||null!=a.visualVariableSizeUnitValue}function t(a,i,e){if(l(a)){const l=a.getSizeValue(i);return a.visualVariableSizeMinMaxValue?.getSize(l,e)??a.visualVariableSizeScaleStops?.getSizeForViewScale(a.view.currentScale)??a.visualVariableSizeStops?.getSize(l,e)??a.visualVariableSizeUnitValue?.getSize(l,e)}return e}function n(i,e,l,t=new a(!1)){if(null==i.visualVariableColor)return l;const n=i.getColorValue(e);return i.visualVariableColor.getColor(n,l,t)}function u(a,e){if(null==a.visualVariableOpacity)return new i(1);const l=a.getOpacityValue(e);return a.visualVariableOpacity.getOpacity(l)}function r(a,i){if(null==a.visualVariableRotation)return e.identity();const l=a.getRotationValue(i);return a.visualVariableRotation.getVVRotationMat3(l)}function o(a,e){if(null==a.visualVariableRotation)return new i(0);const l=a.getRotationValue(e);return a.visualVariableRotation.getNormalizedAngle(l)}export{o as getVisualVariableAngle,n as getVisualVariableColor,u as getVisualVariableOpacity,r as getVisualVariableRotation,t as getVisualVariableSize,l as hasVisualVariableSize};
@@ -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{minMaxZoomPrecisionFactor as i,labelPlacementOffsetPadding as o}from"../../../definitions.js";import{location as s,option as l,uniform as a,define as r,input as n,ComputeVertexInput as d}from"../../GraphShaderModule.js";import{mod as p,Float as u,floor as y,step as m,and as f,lessThan as c,greaterThanEqual as v,Vec3 as h,Mat3 as w,Vec2 as x,ifElse as b,equal as V,greaterThan as S,Bool as g,Vec4 as z,texture2D as R,smoothstep as j,Int as A,bitRShift as C,bitAnd as O}from"../../graph/glsl.js";import{AFeatureShader as M,FeatureVertexInput as P,FeatureFragmentInput as L}from"../shaders/AFeatureShader.js";import{bitsetTextIsBackground as T,bitsetTextIsMapAligned as H}from"../shaders/constants.js";import{distPointTriangle as N,failHittest as U}from"../shaders/hittestUtils.js";import{MosaicInfo as _}from"../shaders/MosaicInfo.js";import{getBit as k}from"../shaders/utils.js";import{VisualVariableColor as I}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as D}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as B}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as q}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as E}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as F}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as W}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableSize as G,getVisualVariableRotation as Z}from"../shaders/vvUtils.js";const J=360/254;class K extends P{}t([s(3,z)],K.prototype,"color",void 0),t([s(4,x)],K.prototype,"offset",void 0),t([s(5,x)],K.prototype,"textureUV",void 0),t([s(6,z)],K.prototype,"fontAndReferenceSize",void 0),t([s(7,z)],K.prototype,"outlineColor",void 0),t([s(8,z)],K.prototype,"haloColor",void 0),t([s(9,x)],K.prototype,"outlineAndHaloSize",void 0),t([s(10,x)],K.prototype,"zoomRange",void 0),t([s(11,u)],K.prototype,"clipAngle",void 0),t([s(12,z)],K.prototype,"referenceSymbol",void 0),t([s(15,u)],K.prototype,"visibility",void 0);class Q extends d{}t([s(13,x)],Q.prototype,"offsetNextVertex1",void 0),t([s(14,x)],Q.prototype,"offsetNextVertex2",void 0);class X extends L{}class Y 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:o,zoomRange:s,visibility:l}=t,a=o.multiply(J),r=p(a.subtract(this.view.rotation),new u(360));let n=new u(0);const d=y(this.view.currentZoom.multiply(i)).divide(i),h=s.x,w=s.y,x=new u(1).subtract(m(h,d)).multiply(2),b=new u(f(v(r,new u(90)),c(r,new u(270)))).multiply(2),V=new u(2).multiply(new u(1).subtract(m(d,w)));return n=n.add(e.multiply(x)),n=n.add(e.multiply(b)),n=n.add(V),l&&(n=n.add(l)),n}vertex(t,e){const i=k(t.bitset,T),s=new u(1).subtract(i);let l=t.fontAndReferenceSize[0];const a=t.fontAndReferenceSize[1],r=t.fontAndReferenceSize[2],n=t.fontAndReferenceSize[3];let d=l.divide(r);const p=1===this.textRenderPassType?t.outlineColor:2===this.textRenderPassType?t.haloColor:this._getVertexColor(t),y=this.view.displayViewScreenMat3.multiply(new h(t.pos,1));let m=t.offset,f=new u(1),c=w.identity(),v=new x(0);if(this.isLabel){if(!t.referenceSymbol)throw new Error("InternalError: Optional attribute 'referenceSymbol' expected for labels");const e=t.referenceSymbol,i=e.xy,s=e.z,l=this._unpackDirection(e.w),a=G(this,t.id,s).divide(2),r=l.multiply(a.add(o));v=i.add(r),m=m.add(v)}else{f=G(this,t.id,a).divide(a),l=l.multiply(f),d=d.multiply(f),m=m.multiply(f),c=Z(this,t.id),m=c.multiply(new h(m,0)).xy}const R=k(t.bitset,H),j=this._getViewRotationMatrix(R).multiply(new h(m,0));let A=this.isLabel?this.clipLabel(t,R):this.clip(t.id,t.zoomRange);A=this.isBackgroundPass?A.add(s.multiply(2)):A.add(i.multiply(2));let C=new u(0);if(1===this.textRenderPassType){A=A.add(b(V(t.outlineAndHaloSize.x,new u(0)),new u(2),new u(0)));C=new u(t.outlineAndHaloSize.x).divide(d).divide(n)}if(2===this.textRenderPassType){const e=t.outlineAndHaloSize.x,i=new u(t.outlineAndHaloSize.y);A=A.add(b(V(i,new u(0)),new u(2),new u(0)));C=i.add(e).divide(d).divide(n)}const O=this.isLabel?S(A,new u(1)):new g(!1);return{glPosition:new z(y.xy.add(j.xy),A,1),color:p,size:d,textureUV:t.textureUV.divide(this.mosaicInfo.size),antialiasingWidth:new u(.315).divide(r.divide(n)).multiply(r).divide(l).divide(this.view.pixelRatio),outlineDistanceOffset:C,...this.maybeRunHittest(t,e,{vvSizeAdjustment:f,vvRotation:c,labelOffset:v,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=R(this.mosaicInfo.texture,t.textureUV).a;let s=i.subtract(t.outlineDistanceOffset);this.highlight&&(s=s.divide(2));const l=t.antialiasingWidth,a=j(s.subtract(l),s.add(l),o);return this.getFragmentOutput(t.color.multiply(a),t)}computeHittestTriangle(t,e,{vvSizeAdjustment:i,vvRotation:o,labelOffset:s}){let l,a,r;this.isLabel?(l=new h(t.offset.add(s),0),a=new h(e.offsetNextVertex1.add(s),0),r=new h(e.offsetNextVertex2.add(s),0)):(l=o.multiply(new h(t.offset.multiply(i),0)),a=o.multiply(new h(e.offsetNextVertex1.multiply(i),0)),r=o.multiply(new h(e.offsetNextVertex2.multiply(i),0)));const{viewMat3:n,tileMat3:d}=this.view,p=n.multiply(d).multiply(new h(t.pos,1));return{pos0:p.add(d.multiply(l)).xy,pos1:p.add(d.multiply(a)).xy,pos2:p.add(d.multiply(r)).xy}}hittest(t,e,{vvSizeAdjustment:i,vvRotation:o,labelOffset:s,labelClipped:l}){const{pos0:a,pos1:r,pos2:n}=this.computeHittestTriangle(t,e,{vvSizeAdjustment:i,vvRotation:o,labelOffset:s}),d=N(this.hittestRequest.position,a.xy,r.xy,n.xy);return this.isLabel?b(l,U(this.hittestRequest),d):d}_unpackDirection(t){const e=new A(t),i=C(e,new A(2)),o=O(e,new A(3));return new x(new u(i).subtract(1),new u(o).subtract(1))}_getVertexColor(t){let e=t.color;if(this.visualVariableColor){const i=this.storage.getColorValue(t.id);e=this.visualVariableColor.getColor(i,t.color,new g(!1))}if(this.visualVariableOpacity){const i=this.storage.getOpacityValue(t.id),o=this.visualVariableOpacity.getOpacity(i);e=e.multiply(o)}return e}}t([l(I)],Y.prototype,"visualVariableColor",void 0),t([l(D)],Y.prototype,"visualVariableOpacity",void 0),t([l(B)],Y.prototype,"visualVariableRotation",void 0),t([l(q)],Y.prototype,"visualVariableSizeMinMaxValue",void 0),t([l(E)],Y.prototype,"visualVariableSizeScaleStops",void 0),t([l(F)],Y.prototype,"visualVariableSizeStops",void 0),t([l(W)],Y.prototype,"visualVariableSizeUnitValue",void 0),t([a(_)],Y.prototype,"mosaicInfo",void 0),t([r],Y.prototype,"textRenderPassType",void 0),t([r],Y.prototype,"isBackgroundPass",void 0),t([r],Y.prototype,"isLabel",void 0),t([e(0,n(K)),e(1,n(Q))],Y.prototype,"vertex",null),t([e(0,n(X))],Y.prototype,"fragment",null);export{X as TextFragmentInput,Y as TextShader,K as TextVertexInput};
2
+ import{__decorate as t,__param as e}from"tslib";import{minMaxZoomPrecisionFactor as i,labelPlacementOffsetPadding as o}from"../../../definitions.js";import{location as s,option as l,uniform as r,texture as a,define as n,input as d,ComputeVertexInput as p}from"../../GraphShaderModule.js";import{mod as u,Float as y,floor as m,step as c,and as f,lessThan as v,greaterThanEqual as h,Vec3 as w,Mat3 as x,Vec2 as b,ifElse as V,equal as S,greaterThan as g,Bool as z,Vec4 as R,texture2D as j,smoothstep as A,Int as C,bitRShift as O,bitAnd as M,Sampler2D as T}from"../../graph/glsl.js";import{AFeatureShader as P,FeatureVertexInput as L,FeatureFragmentInput as H}from"../shaders/AFeatureShader.js";import{bitsetTextIsBackground as N,bitsetTextIsMapAligned as U}from"../shaders/constants.js";import{distPointTriangle as _,failHittest as k}from"../shaders/hittestUtils.js";import{MosaicInfo as D}from"../shaders/MosaicInfo.js";import{getBit as I}from"../shaders/utils.js";import{VisualVariableColor as B}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as q}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 L{}t([s(3,R)],X.prototype,"color",void 0),t([s(4,b)],X.prototype,"offset",void 0),t([s(5,b)],X.prototype,"textureUV",void 0),t([s(6,R)],X.prototype,"fontAndReferenceSize",void 0),t([s(7,R)],X.prototype,"outlineColor",void 0),t([s(8,R)],X.prototype,"haloColor",void 0),t([s(9,b)],X.prototype,"outlineAndHaloSize",void 0),t([s(10,b)],X.prototype,"zoomRange",void 0),t([s(11,y)],X.prototype,"clipAngle",void 0),t([s(12,R)],X.prototype,"referenceSymbol",void 0),t([s(15,y)],X.prototype,"visibility",void 0);class Y extends p{}t([s(13,b)],Y.prototype,"offsetNextVertex1",void 0),t([s(14,b)],Y.prototype,"offsetNextVertex2",void 0);class $ extends H{}class tt extends P{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:o,zoomRange:s,visibility:l}=t,r=o.multiply(Q),a=u(r.subtract(this.view.rotation),new y(360));let n=new y(0);const d=m(this.view.currentZoom.multiply(i)).divide(i),p=s.x,w=s.y,x=new y(1).subtract(c(p,d)).multiply(2),b=new y(f(h(a,new y(90)),v(a,new y(270)))).multiply(2),V=new y(2).multiply(new y(1).subtract(c(d,w)));return n=n.add(e.multiply(x)),n=n.add(e.multiply(b)),n=n.add(V),l&&(n=n.add(l)),n}vertex(t,e){const i=I(t.bitset,N),s=new y(1).subtract(i);let l=t.fontAndReferenceSize[0];const r=t.fontAndReferenceSize[1],a=t.fontAndReferenceSize[2],n=t.fontAndReferenceSize[3];let d=l.divide(a);const p=1===this.textRenderPassType?t.outlineColor:2===this.textRenderPassType?t.haloColor:this._getVertexColor(t),u=this.view.displayViewScreenMat3.multiply(new w(t.pos,1));let m=t.offset,c=new y(1),f=x.identity(),v=new b(0);if(this.isLabel){if(!t.referenceSymbol)throw new Error("InternalError: Optional attribute 'referenceSymbol' expected for labels");const e=t.referenceSymbol,i=e.xy,s=e.z,l=this._unpackDirection(e.w),r=J(this,t.id,s).divide(2),a=l.multiply(r.add(o));v=i.add(a),m=m.add(v)}else{c=J(this,t.id,r).divide(r),l=l.multiply(c),d=d.multiply(c),m=m.multiply(c),f=K(this,t.id),m=f.multiply(new w(m,0)).xy}const h=I(t.bitset,U),j=this._getViewRotationMatrix(h).multiply(new w(m,0));let A=this.isLabel?this.clipLabel(t,h):this.clip(t.id,t.zoomRange);A=this.isBackgroundPass?A.add(s.multiply(2)):A.add(i.multiply(2));let C=new y(0);if(1===this.textRenderPassType){A=A.add(V(S(t.outlineAndHaloSize.x,new y(0)),new y(2),new y(0)));C=new y(t.outlineAndHaloSize.x).divide(d).divide(n)}if(2===this.textRenderPassType){const e=t.outlineAndHaloSize.x,i=new y(t.outlineAndHaloSize.y);A=A.add(V(S(i,new y(0)),new y(2),new y(0)));C=i.add(e).divide(d).divide(n)}const O=this.isLabel?g(A,new y(1)):new z(!1);return{glPosition:new R(u.xy.add(j.xy),A,1),color:p,size:d,textureUV:t.textureUV.divide(this.mosaicInfo.size),antialiasingWidth:new y(.315).divide(a.divide(n)).multiply(a).divide(l).divide(this.view.pixelRatio),outlineDistanceOffset:C,...this.maybeRunHittest(t,e,{vvSizeAdjustment:c,vvRotation:f,labelOffset:v,labelClipped:O})}}_getViewRotationMatrix(t){const e=this.view.displayViewMat3,i=this.view.displayMat3,o=new y(1).subtract(t);return e.multiply(t).add(i.multiply(o))}fragment(t){const e=new y(2/8),i=new y(1).subtract(e),o=j(this.mosaicTexture,t.textureUV).a;let s=i.subtract(t.outlineDistanceOffset);this.highlight&&(s=s.divide(2));const l=t.antialiasingWidth,r=A(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 w(t.offset.add(s),0),r=new w(e.offsetNextVertex1.add(s),0),a=new w(e.offsetNextVertex2.add(s),0)):(l=o.multiply(new w(t.offset.multiply(i),0)),r=o.multiply(new w(e.offsetNextVertex1.multiply(i),0)),a=o.multiply(new w(e.offsetNextVertex2.multiply(i),0)));const{viewMat3:n,tileMat3:d}=this.view,p=n.multiply(d).multiply(new w(t.pos,1));return{pos0:p.add(d.multiply(l)).xy,pos1:p.add(d.multiply(r)).xy,pos2:p.add(d.multiply(a)).xy}}hittest(t,e,{vvSizeAdjustment:i,vvRotation:o,labelOffset:s,labelClipped:l}){const{pos0:r,pos1:a,pos2:n}=this.computeHittestTriangle(t,e,{vvSizeAdjustment:i,vvRotation:o,labelOffset:s}),d=_(this.hittestRequest.position,r.xy,a.xy,n.xy);return this.isLabel?V(l,k(this.hittestRequest),d):d}_unpackDirection(t){const e=new C(t),i=O(e,new C(2)),o=M(e,new C(3));return new b(new y(i).subtract(1),new y(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 z(!1))}if(this.visualVariableOpacity){const i=this.getOpacityValue(t.id),o=this.visualVariableOpacity.getOpacity(i);e=e.multiply(o)}return e}}t([l(B)],tt.prototype,"visualVariableColor",void 0),t([l(q)],tt.prototype,"visualVariableOpacity",void 0),t([l(E)],tt.prototype,"visualVariableRotation",void 0),t([l(F)],tt.prototype,"visualVariableSizeMinMaxValue",void 0),t([l(W)],tt.prototype,"visualVariableSizeScaleStops",void 0),t([l(G)],tt.prototype,"visualVariableSizeStops",void 0),t([l(Z)],tt.prototype,"visualVariableSizeUnitValue",void 0),t([r(D)],tt.prototype,"mosaicInfo",void 0),t([a(T)],tt.prototype,"mosaicTexture",void 0),t([n],tt.prototype,"textRenderPassType",void 0),t([n],tt.prototype,"isBackgroundPass",void 0),t([n],tt.prototype,"isLabel",void 0),t([e(0,d(X)),e(1,d(Y))],tt.prototype,"vertex",null),t([e(0,d($))],tt.prototype,"fragment",null);export{$ as TextFragmentInput,tt as TextShader,X as TextVertexInput};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{FeatureTechnique as e}from"../FeatureTechnique.js";import{getSelectionDefines as s,isHittest as t,getFeatureUniforms as r,resolveDynamicUniforms as a,getFeaturePipelineState as i}from"../featureTechniqueUtils.js";import{TextShader as n}from"./TextShader.js";class o extends e{constructor(){super(...arguments),this.type=32,this.shaders={geometry:new n},this.symbologyPlane=3}render(e,n){const{painter:o}=e,u=s(e),d=n.instance.getInput(),m={shader:this.shaders.geometry,uniforms:{...a(e,n.target,d.uniforms),...r(e,n.target),mosaicInfo:o.textureManager.getMosaicInfo(e,n.textureKey)},defines:{...u,isBackgroundPass:!0,isLabel:!1,textRenderPassType:0},optionalAttributes:d.optionalAttributes,useComputeBuffer:t(e)};o.setShader(m),o.setPipelineState(i(e)),o.submitDraw(e,n),o.setShader({...m,defines:{...u,isBackgroundPass:!1,isLabel:!1,textRenderPassType:2}}),o.submitDraw(e,n),o.setShader({...m,defines:{...u,isBackgroundPass:!1,isLabel:!1,textRenderPassType:1}}),o.submitDraw(e,n),o.setShader({...m,defines:{...u,isBackgroundPass:!1,isLabel:!1,textRenderPassType:0}}),o.submitDraw(e,n)}}export{o as TextTechnique};
2
+ import{FeatureTechnique as e}from"../FeatureTechnique.js";import{getSelectionDefines as t,isHittest as s,getFeatureTextures as r,getFeatureUniforms as a,resolveDynamicUniforms as i,getFeaturePipelineState as n}from"../featureTechniqueUtils.js";import{TextShader as o}from"./TextShader.js";class u extends e{constructor(){super(...arguments),this.type=32,this.shaders={geometry:new o},this.symbologyPlane=3}render(e,o){const{painter:u}=e,d=t(e),m=o.instance.getInput(),p={shader:this.shaders.geometry,uniforms:{...i(e,o.target,m.uniforms),...a(e,o.target),mosaicInfo:u.textureManager.getMosaicInfo(e,o.textureKey)},textures:{...r(e),mosaicTexture:u.textureManager.getMosaicTexture(e,o.textureKey)},defines:{...d,isBackgroundPass:!0,isLabel:!1,textRenderPassType:0},optionalAttributes:m.optionalAttributes,useComputeBuffer:s(e)};u.setShader(p),u.setPipelineState(n(e)),u.submitDraw(e,o),u.setShader({...p,defines:{...d,isBackgroundPass:!1,isLabel:!1,textRenderPassType:2}}),u.submitDraw(e,o),u.setShader({...p,defines:{...d,isBackgroundPass:!1,isLabel:!1,textRenderPassType:1}}),u.submitDraw(e,o),u.setShader({...p,defines:{...d,isBackgroundPass:!1,isLabel:!1,textRenderPassType:0}}),u.submitDraw(e,o)}}export{u as TextTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{destroyMaybe as e}from"../../../../../../../core/maybe.js";import{fromValues as t}from"../../../../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{FeatureTile as s}from"../../../FeatureTile.js";import{Mesh as i}from"../../../meshing/Mesh.js";import{Technique as r}from"../Technique.js";import{TileDebugInfoShader as o,TileDebugInfoOutlineShader as n}from"../shaders/TileDebugInfoShader.js";import{TileDebugInfoTexture as h}from"./TileDebugInfoTexture.js";import{PrimitiveType as a,DataType as u}from"../../../../../../webgl/enums.js";import{VertexElementDescriptor as d}from"../../../../../../webgl/VertexElementDescriptor.js";class l extends r{constructor(){super(...arguments),this.type=34,this.drawPhase=64,this.shaders={outline:new n,tileInfo:new o},this._outlineMesh=null,this._color=t(1,0,0,1),this._texture=new h}render(e,t){if(!(this.drawPhase&e.drawPhase))return;const{context:i,painter:r}=e;if(!t.isReady&&t instanceof s&&t.hasData)return;const o=this._getOutlineMesh(i);r.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!1});const n={shader:this.shaders.outline,uniforms:{config:{dvsMat3:t.transforms.displayViewScreenMat3,coordRange:[t.rangeX,t.rangeY],depth:0,color:this._color}},defines:void 0,optionalAttributes:void 0,useComputeBuffer:!1};r.submitDrawMeshUntyped(i,n,o);const h=this._texture.getTexture(i,t);r.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!1});const a={shader:this.shaders.tileInfo,uniforms:{config:{dvsMat3:t.transforms.displayViewScreenMat3,depth:0,coordRatio:[t.rangeX/t.width,t.rangeY/t.height],delta:[0,0],dimensions:[h.descriptor.width,h.descriptor.height],texture:{texture:h,unit:0}}},defines:void 0,optionalAttributes:void 0,useComputeBuffer:!1};r.submitDrawMesh(i,a,r.quadMesh)}shutdown(){this._outlineMesh=e(this._outlineMesh),this._texture.shutdown()}_getOutlineMesh(e){return this._outlineMesh||(this._outlineMesh=new i(e,{vertex:{geometry:{data:new Int8Array([0,0,1,0,1,1,0,1]),layout:[new d("position",2,u.BYTE,0,2)]}},groups:[{primitive:a.LINE_STRIP}],parts:[{group:0,start:0,count:4}]})),this._outlineMesh}}export{l as TileDebugInfoTechnique};
2
+ import{destroyMaybe as e}from"../../../../../../../core/maybe.js";import{fromValues as t}from"../../../../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{FeatureTile as s}from"../../../FeatureTile.js";import{Mesh as i}from"../../../meshing/Mesh.js";import{Technique as r}from"../Technique.js";import{TileDebugInfoShader as o,TileDebugInfoOutlineShader as n}from"../shaders/TileDebugInfoShader.js";import{TileDebugInfoTexture as h}from"./TileDebugInfoTexture.js";import{PrimitiveType as a,DataType as u}from"../../../../../../webgl/enums.js";import{VertexElementDescriptor as d}from"../../../../../../webgl/VertexElementDescriptor.js";class l extends r{constructor(){super(...arguments),this.type=34,this.drawPhase=64,this.shaders={outline:new n,tileInfo:new o},this._outlineMesh=null,this._color=t(1,0,0,1),this._texture=new h}render(e,t){if(!(this.drawPhase&e.drawPhase))return;const{context:i,painter:r}=e;if(!t.isReady&&t instanceof s&&t.hasData)return;const o=this._getOutlineMesh(i);r.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!1});const n={shader:this.shaders.outline,uniforms:{config:{dvsMat3:t.transforms.displayViewScreenMat3,coordRange:[t.rangeX,t.rangeY],depth:0,color:this._color}},textures:void 0,defines:void 0,optionalAttributes:void 0,useComputeBuffer:!1};r.submitDrawMeshUntyped(i,n,o);const h=this._texture.getTexture(i,t);r.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!1});const a={shader:this.shaders.tileInfo,uniforms:{config:{dvsMat3:t.transforms.displayViewScreenMat3,depth:0,coordRatio:[t.rangeX/t.width,t.rangeY/t.height],delta:[0,0],dimensions:[h.descriptor.width,h.descriptor.height]}},textures:{texture:{texture:h,unit:0}},defines:void 0,optionalAttributes:void 0,useComputeBuffer:!1};r.submitDrawMesh(i,a,r.quadMesh)}shutdown(){this._outlineMesh=e(this._outlineMesh),this._texture.shutdown()}_getOutlineMesh(e){return this._outlineMesh||(this._outlineMesh=new i(e,{vertex:{geometry:{data:new Int8Array([0,0,1,0,1,1,0,1]),layout:[new d("position",2,u.BYTE,0,2)]}},groups:[{primitive:a.LINE_STRIP}],parts:[{group:0,start:0,count:4}]})),this._outlineMesh}}export{l as TileDebugInfoTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{fromValues as e}from"../../../../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{Technique as s}from"../Technique.js";import{TileStencilShader as t}from"../shaders/TileStencilShader.js";class i extends s{constructor(){super(...arguments),this.type=35,this.drawPhase=211,this.shaders={tileStencil:new t},this._color=e(1,0,0,1)}render(e,s){if(!(this.drawPhase&e.drawPhase&&s.visible))return;const{context:t,painter:i}=e;i.setPipelineState({color:!1,depth:!1,stencil:{write:{mask:255},test:{compare:516,op:{fail:7680,zFail:7680,zPass:7681},mask:255}}});const r={shader:this.shaders.tileStencil,uniforms:{config:{dvsMat3:s.transforms.displayViewScreenMat3,coordRange:[s.rangeX,s.rangeY],depth:0,color:this._color}},defines:void 0,optionalAttributes:void 0,useComputeBuffer:!1};i.submitDrawMesh(t,r,i.quadMesh,{stencilRef:s.stencilRef})}}export{i as TileStencilTechnique};
2
+ import{fromValues as e}from"../../../../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{Technique as s}from"../Technique.js";import{TileStencilShader as t}from"../shaders/TileStencilShader.js";class i extends s{constructor(){super(...arguments),this.type=35,this.drawPhase=211,this.shaders={tileStencil:new t},this._color=e(1,0,0,1)}render(e,s){if(!(this.drawPhase&e.drawPhase&&s.visible))return;const{context:t,painter:i}=e;i.setPipelineState({color:!1,depth:!1,stencil:{write:{mask:255},test:{compare:516,op:{fail:7680,zFail:7680,zPass:7681},mask:255}}});const r={shader:this.shaders.tileStencil,uniforms:{config:{dvsMat3:s.transforms.displayViewScreenMat3,coordRange:[s.rangeX,s.rangeY],depth:0,color:this._color}},textures:void 0,defines:void 0,optionalAttributes:void 0,useComputeBuffer:!1};i.submitDrawMesh(t,r,i.quadMesh,{stencilRef:s.stencilRef})}}export{i as TileStencilTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{nextPowerOfTwo as t}from"../../../../../../../core/mathUtils.js";import{create as e}from"../../../../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{fromValues as r}from"../../../../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{getDefinesKey as s}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as o,vtlHighResCutoff as i}from"../../../definitions.js";import{Mesh as a}from"../../../meshing/Mesh.js";import{simplePipelineState as n}from"../../utils.js";import{Technique as l}from"../Technique.js";import{VTLShaderBackground as c}from"../shaders/vector-tiles/VTLShaderBackground.js";import{PrimitiveType as h}from"../../../../../../webgl/enums.js";class m extends l{constructor(){super(...arguments),this.type=38,this._color=r(1,0,0,1),this._patternMatrix=e(),this._mesh=null,this.shaders={background:new c}}render(r,a){if(0===a.tiles.length)return;this._loadResources(r);const{context:l,displayLevel:c,painter:h,spriteMosaic:m,state:u,styleLayer:d}=r,p=d,f=p.backgroundMaterial,g=p.getPaintValue("background-color",c),y=p.getPaintValue("background-opacity",c),M=p.getPaintValue("background-pattern",c),_=void 0!==M,b=1|window.devicePixelRatio;let x,v;const w=f.key+s({hasPattern:_}),j=b>i?2:1,k={layerInfo:{depth:p.z,coordRange:a.tiles[0].rangeX},tileInfo:{dvsMat:u.displayViewMat3},solidColor:null,pattern:null,patternMat:{mat:e()}};if(_){const t=m.getMosaicItemPosition(M,!0);if(null!=t){const{tl:e,br:r,page:s}=t;x=r[0]-e[0],v=r[1]-e[1];const i=m.getPageSize(s);null!=i&&(m.bind(l,9729,s,o),k.pattern={tlbr:[e[0],e[1],r[0],r[1]],mosaicSize:i,texture:{texture:m.getTexture(s),unit:o},opacity:y})}}else{const t=g[3]*y;this._color[0]=t*g[0],this._color[1]=t*g[1],this._color[2]=t*g[2],this._color[3]=t,k.solidColor={color:this._color}}h.setPipelineState(n);for(const e of a.tiles){if(k.tileInfo.dvsMat=e.transforms.displayViewScreenMat3,k.layerInfo.coordRange=e.rangeX,_){const r=Math.max(2**(Math.round(c)-e.key.level),1),s=j*e.width*r,o=s/t(x),i=s/t(v);this._patternMatrix[0]=o,this._patternMatrix[4]=i,k.patternMat={mat:this._patternMatrix}}const r={shader:this.shaders.background,uniforms:k,defines:{renderMode:_?1:0},optionalAttributes:f.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:f.getPrecisionFactors(),materialKey:w};h.submitDrawMeshUntyped(l,r,this._mesh,{stencilRef:e.stencilRef})}}shutdown(){this._mesh&&(this._mesh.destroy(),this._mesh=null)}_loadResources(t){if(this._mesh)return;const{context:e,styleLayer:r}=t,s=r,o=new Int16Array([0,0,1,0,0,1,1,1]),i=s.backgroundMaterial.geometryLayout;if(!i)return;const n={vertex:{geometryVB:{data:o,layout:i}},groups:[{primitive:h.TRIANGLE_STRIP}],parts:[{group:0,start:0,count:4}]};this._mesh=new a(e,n)}}export{m as VTLTechniqueBackground};
2
+ import{nextPowerOfTwo as t}from"../../../../../../../core/mathUtils.js";import{create as e}from"../../../../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{fromValues as r}from"../../../../../../../core/libs/gl-matrix-2/factories/vec4f32.js";import{getDefinesKey as s}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as o,vtlHighResCutoff as i}from"../../../definitions.js";import{Mesh as a}from"../../../meshing/Mesh.js";import{simplePipelineState as n}from"../../utils.js";import{Technique as l}from"../Technique.js";import{VTLShaderBackground as c}from"../shaders/vector-tiles/VTLShaderBackground.js";import{PrimitiveType as u}from"../../../../../../webgl/enums.js";class h extends l{constructor(){super(...arguments),this.type=38,this._color=r(1,0,0,1),this._patternMatrix=e(),this._mesh=null,this.shaders={background:new c}}render(r,a){if(0===a.tiles.length)return;this._loadResources(r);const{context:l,displayLevel:c,painter:u,spriteMosaic:h,state:m,styleLayer:d}=r,p=d,f=p.backgroundMaterial,g=p.getPaintValue("background-color",c),y=p.getPaintValue("background-opacity",c),M=p.getPaintValue("background-pattern",c),_=void 0!==M,x=1|window.devicePixelRatio;let b,v;const w=f.key+s({hasPattern:_}),j=x>i?2:1,k={layerInfo:{depth:p.z,coordRange:a.tiles[0].rangeX},tileInfo:{dvsMat:m.displayViewMat3},solidColor:null,pattern:null,patternMat:{mat:e()}};let P=null;if(_){const t=h.getMosaicItemPosition(M,!0);if(null!=t){const{tl:e,br:r,page:s}=t;b=r[0]-e[0],v=r[1]-e[1];const i=h.getPageSize(s);null!=i&&(h.bind(l,9729,s,o),k.pattern={tlbr:[e[0],e[1],r[0],r[1]],mosaicSize:i,opacity:y},P={patternTexture:{texture:h.getTexture(s),unit:o}})}}else{const t=g[3]*y;this._color[0]=t*g[0],this._color[1]=t*g[1],this._color[2]=t*g[2],this._color[3]=t,k.solidColor={color:this._color}}u.setPipelineState(n);for(const e of a.tiles){if(k.tileInfo.dvsMat=e.transforms.displayViewScreenMat3,k.layerInfo.coordRange=e.rangeX,_){const r=Math.max(2**(Math.round(c)-e.key.level),1),s=j*e.width*r,o=s/t(b),i=s/t(v);this._patternMatrix[0]=o,this._patternMatrix[4]=i,k.patternMat={mat:this._patternMatrix}}const r={shader:this.shaders.background,uniforms:k,textures:P,defines:{renderMode:_?1:0},optionalAttributes:f.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:f.getPrecisionFactors(),materialKey:w};u.submitDrawMeshUntyped(l,r,this._mesh,{stencilRef:e.stencilRef})}}shutdown(){this._mesh&&(this._mesh.destroy(),this._mesh=null)}_loadResources(t){if(this._mesh)return;const{context:e,styleLayer:r}=t,s=r,o=new Int16Array([0,0,1,0,0,1,1,1]),i=s.backgroundMaterial.geometryLayout;if(!i)return;const n={vertex:{geometryVB:{data:o,layout:i}},groups:[{primitive:u.TRIANGLE_STRIP}],parts:[{group:0,start:0,count:4}]};this._mesh=new a(e,n)}}export{h as VTLTechniqueBackground};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{simplePipelineState as e}from"../../utils.js";import{Technique as t}from"../Technique.js";import{VTLShaderCircle as s}from"../shaders/vector-tiles/VTLShaderCircle.js";class l extends t{constructor(){super(...arguments),this.type=39,this._mesh=null,this.shaders={circle:new s}}shutdown(){this._mesh&&(this._mesh.destroy(),this._mesh=null)}render(t,s){const{context:l,displayLevel:i,drawPhase:r,painter:n,requiredLevel:a,spriteMosaic:o,state:c,styleLayer:u,styleLayerUID:h}=t,{tiles:d}=s;if(!d.some(e=>e.layerData.get(h)?.circleIndexCount??!1))return;const p=u,{circleMaterial:f}=p,m=1.2,y=p.getPaintValue("circle-translate",i),M={transform:{dvsMat:null,displayMat:1===p.getPaintValue("circle-translate-anchor",i)?c.displayMat3:c.displayViewMat3},config:{circleTranslation:y,depth:p.z,antialiasingWidth:m,tileOpacity:1},radius:null,radiusMix:null,blur:null,blurMix:null,opacity:null,opacityMix:null,strokeOpacity:null,strokeOpacityMix:null,strokeWidth:null,strokeWidthMix:null,color:null,colorMix:null,strokeColor:null,strokeColorMix:null};let g=-1;for(const x of d){if(!x.layerData.has(h))continue;if(M.transform.dvsMat=x.transforms.displayViewScreenMat3,x.key.level!==g){g=x.key.level;const e=f.getUniforms();for(const t of e){const e=t.getValue(p,i,g,o);t.name in M&&(M[t.name]={value:e})}}const t=x.layerData.get(h);if(!t.circleIndexCount)continue;if(this._mesh=t.getMesh(l),!this._mesh)continue;const s=a!==x.key.level?514:516,c=a!==x.key.level?x.stencilRef:255;M.config.tileOpacity=1===r?x.fader.value():1,n.setPipelineState({...e,stencil:{write:!1,test:{compare:s,op:{fail:7680,zFail:7680,zPass:7681},mask:255}}});const u={shader:this.shaders.circle,uniforms:M,defines:null,optionalAttributes:f.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:f.getPrecisionFactors()};n.submitDrawMeshUntyped(l,u,this._mesh,{stencilRef:c}),x.triangleCount+=t.circleIndexCount/3}}}export{l as VTLTechniqueCircle};
2
+ import{simplePipelineState as e}from"../../utils.js";import{Technique as t}from"../Technique.js";import{VTLShaderCircle as s}from"../shaders/vector-tiles/VTLShaderCircle.js";class l extends t{constructor(){super(...arguments),this.type=39,this._mesh=null,this.shaders={circle:new s}}shutdown(){this._mesh&&(this._mesh.destroy(),this._mesh=null)}render(t,s){const{context:l,displayLevel:i,drawPhase:r,painter:n,requiredLevel:a,spriteMosaic:o,state:c,styleLayer:u,styleLayerUID:h}=t,{tiles:d}=s;if(!d.some(e=>e.layerData.get(h)?.circleIndexCount??!1))return;const p=u,{circleMaterial:f}=p,m=1.2,y=p.getPaintValue("circle-translate",i),M={transform:{dvsMat:null,displayMat:1===p.getPaintValue("circle-translate-anchor",i)?c.displayMat3:c.displayViewMat3},config:{circleTranslation:y,depth:p.z,antialiasingWidth:m,tileOpacity:1},radius:null,radiusMix:null,blur:null,blurMix:null,opacity:null,opacityMix:null,strokeOpacity:null,strokeOpacityMix:null,strokeWidth:null,strokeWidthMix:null,color:null,colorMix:null,strokeColor:null,strokeColorMix:null};let x=-1;for(const g of d){if(!g.layerData.has(h))continue;if(M.transform.dvsMat=g.transforms.displayViewScreenMat3,g.key.level!==x){x=g.key.level;const e=f.getUniforms();for(const t of e){const e=t.getValue(p,i,x,o);t.name in M&&(M[t.name]={value:e})}}const t=g.layerData.get(h);if(!t.circleIndexCount)continue;if(this._mesh=t.getMesh(l),!this._mesh)continue;const s=a!==g.key.level?514:516,c=a!==g.key.level?g.stencilRef:255;M.config.tileOpacity=1===r?g.fader.value():1,n.setPipelineState({...e,stencil:{write:!1,test:{compare:s,op:{fail:7680,zFail:7680,zPass:7681},mask:255}}});const u={shader:this.shaders.circle,uniforms:M,textures:null,defines:null,optionalAttributes:f.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:f.getPrecisionFactors()};n.submitDrawMeshUntyped(l,u,this._mesh,{stencilRef:c}),g.triangleCount+=t.circleIndexCount/3}}}export{l as VTLTechniqueCircle};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{getDefinesKey as t}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as e,vtlHighResCutoff as i}from"../../../definitions.js";import{Technique as l}from"../Technique.js";import{VTLShaderFill as s}from"../shaders/vector-tiles/VTLShaderFill.js";import{VTLShaderOutline as a}from"../shaders/vector-tiles/VTLShaderOutline.js";const n=1/65536;class o extends l{constructor(){super(...arguments),this.type=40,this._fillMesh=null,this._outlineMesh=null,this.shaders={fill:new s,outline:new a}}shutdown(){this._fillMesh&&(this._fillMesh.destroy(),this._fillMesh=null),this._outlineMesh&&(this._outlineMesh.destroy(),this._outlineMesh=null)}render(t,e){const{displayLevel:i,is3D:l,renderPass:s,spriteMosaic:a,styleLayer:n,styleLayerUID:o}=t,{tiles:r}=e;let u=!1;for(const D of r)if(D.layerData.has(o)){const t=D.layerData.get(o);if(t.fillIndexCount>0||t.outlineIndexCount>0){u=!0;break}}if(!u)return;const c=n,f=c.getPaintProperty("fill-pattern"),p=void 0!==f,h=p&&f.isDataDriven;let d;if(p&&!h){const t=f.getValue(i);d=a.getMosaicItemPosition(t,!0)}const y=!p&&c.getPaintValue("fill-antialias",i);let M=!l||p,g=1;if(!p){const t=c.getPaintProperty("fill-color"),e=c.getPaintProperty("fill-opacity");if(!t?.isDataDriven&&!e?.isDataDriven){const t=c.getPaintValue("fill-color",i);g=c.getPaintValue("fill-opacity",i)*t[3],g<1&&(M=!0)}}if((c.hasDataDrivenColor||c.hasDataDrivenOpacity)&&(M=!0),M&&"opaque"===s)return;const m=c.getPaintValue("fill-translate",i),v=c.getPaintValue("fill-translate-anchor",i);("opaque"===s&&!M||"translucent"===s&&M)&&this._drawFill(t,o,c,r,m,v,p,d,h);const x=!c.hasDataDrivenOutlineColor&&c.outlineUsesFillColor&&g<1;y&&"translucent"===s&&!x&&this._drawOutline(t,o,c,r,m,v)}_drawFill(l,s,a,o,r,u,c,f,p){if(c&&!p&&null==f)return;const{context:h,displayLevel:d,drawPhase:y,state:M,painter:g,pixelRatio:m,spriteMosaic:v}=l,x=m>i?2:1,D=a.fillMaterial,P={transform:{dvsMat:null,displayMat:1===u?M.displayMat3:M.displayViewMat3},config:{depth:a.z+n,fillTranslation:r,tileOpacity:1},patternOptions:p||c&&null!=f?{mosaicSize:[0,0],patternFactor:1,tlbr:[0,0,0,0],texture:{texture:null,unit:0}}:null,color:null,opacity:null,colorMix:null,opacityMix:null},_=c?1:0,w=D.key+t({hasPattern:c});if(null!=f){const{page:t,tl:i,br:l}=f,s=i[0],a=l[1],n=l[0],o=i[1],r=v.getPageSize(t);null!=r&&(v.bind(h,9729,t,e),P.patternOptions={mosaicSize:[r[0],r[1]],patternFactor:1,tlbr:[s,a,n,o],texture:{texture:v.getTexture(t),unit:e}})}let O=-1;for(const t of o){if(!t.layerData.has(s))continue;if(t.key.level!==O){O=t.key.level;const e=D.getUniforms();for(const t of e){const e=t.getValue(a,d,O,v);P[t.name]={value:e}}if(c&&null!=P.patternOptions){const e=Math.max(2**(Math.round(d)-t.key.level),1),i=t.rangeX/(x*t.width*e);P.patternOptions.patternFactor=i}}const i=t.layerData.get(s);if(this._fillMesh=i.getMesh(h,{value:0}),!this._fillMesh)continue;const{transform:l,config:n}=P;l.dvsMat=t.transforms.displayViewScreenMat3,n.tileOpacity=1===y?t.fader.value():1;const o={shader:this.shaders.fill,uniforms:P,defines:{fillType:_},optionalAttributes:D.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:D.getPrecisionFactors(),materialKey:w};if(p){const l=P.patternOptions,s=i.patternMap;if(!s||null==l)continue;let a=0;for(const[i,n]of s){const s=v.getPageSize(i);null!=s&&(v.bind(h,9729,i,e),l.mosaicSize=s,l.texture={texture:v.getTexture(i),unit:e},g.submitDrawMeshUntyped(h,o,this._fillMesh,{stencilRef:t.stencilRef,parts:[a++]}))}}else g.submitDrawMeshUntyped(h,o,this._fillMesh,{stencilRef:t.stencilRef});t.triangleCount+=i.fillIndexCount/3}}_drawOutline(t,e,i,l,s,a){const{context:o,displayLevel:r,drawPhase:u,state:c,spriteMosaic:f,painter:p,pixelRatio:h}=t,d=i.outlineMaterial,y=d.key,M=.75/h,g={transform:{dvsMat3:null,displayMat3:1===a?c.displayMat3:c.displayViewMat3},config:{depth:i.z+n,fillTranslation:s,outlineWidth:M,tileOpacity:1},color:null,opacity:null,colorMix:null,opacityMix:null};let m=-1;for(const n of l){if(!n.layerData.has(e))continue;if(n.key.level!==m){m=n.key.level;const t=d.getUniforms();for(const e of t){const t=e.getValue(i,r,m,f);e.name in g&&(g[e.name]={value:t})}}const t=n.layerData.get(e);if(this._outlineMesh=t.getMesh(o,{value:1}),null==this._outlineMesh)continue;const{transform:l,config:s}=g;l.dvsMat3=n.transforms.displayViewScreenMat3,s.tileOpacity=1===u?n.fader.value():1;const a={shader:this.shaders.outline,uniforms:g,defines:{},optionalAttributes:d.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:d.getPrecisionFactors(),materialKey:y};p.submitDrawMeshUntyped(o,a,this._outlineMesh,{stencilRef:n.stencilRef}),n.triangleCount+=t.outlineIndexCount/3}}}export{o as VTLTechniqueFill};
2
+ import{getDefinesKey as t}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as e,vtlHighResCutoff as i}from"../../../definitions.js";import{Technique as l}from"../Technique.js";import{VTLShaderFill as s}from"../shaders/vector-tiles/VTLShaderFill.js";import{VTLShaderOutline as a}from"../shaders/vector-tiles/VTLShaderOutline.js";const n=1/65536;class o extends l{constructor(){super(...arguments),this.type=40,this._fillMesh=null,this._outlineMesh=null,this.shaders={fill:new s,outline:new a}}shutdown(){this._fillMesh&&(this._fillMesh.destroy(),this._fillMesh=null),this._outlineMesh&&(this._outlineMesh.destroy(),this._outlineMesh=null)}render(t,e){const{displayLevel:i,is3D:l,renderPass:s,spriteMosaic:a,styleLayer:n,styleLayerUID:o}=t,{tiles:r}=e;let u=!1;for(const D of r)if(D.layerData.has(o)){const t=D.layerData.get(o);if(t.fillIndexCount>0||t.outlineIndexCount>0){u=!0;break}}if(!u)return;const c=n,f=c.getPaintProperty("fill-pattern"),p=void 0!==f,h=p&&f.isDataDriven;let d;if(p&&!h){const t=f.getValue(i);d=a.getMosaicItemPosition(t,!0)}const y=!p&&c.getPaintValue("fill-antialias",i);let M=!l||p,g=1;if(!p){const t=c.getPaintProperty("fill-color"),e=c.getPaintProperty("fill-opacity");if(!t?.isDataDriven&&!e?.isDataDriven){const t=c.getPaintValue("fill-color",i);g=c.getPaintValue("fill-opacity",i)*t[3],g<1&&(M=!0)}}if((c.hasDataDrivenColor||c.hasDataDrivenOpacity)&&(M=!0),M&&"opaque"===s)return;const m=c.getPaintValue("fill-translate",i),v=c.getPaintValue("fill-translate-anchor",i);("opaque"===s&&!M||"translucent"===s&&M)&&this._drawFill(t,o,c,r,m,v,p,d,h);const x=!c.hasDataDrivenOutlineColor&&c.outlineUsesFillColor&&g<1;y&&"translucent"===s&&!x&&this._drawOutline(t,o,c,r,m,v)}_drawFill(l,s,a,o,r,u,c,f,p){if(c&&!p&&null==f)return;const{context:h,displayLevel:d,drawPhase:y,state:M,painter:g,pixelRatio:m,spriteMosaic:v}=l,x=m>i?2:1,D=a.fillMaterial,P={transform:{dvsMat:null,displayMat:1===u?M.displayMat3:M.displayViewMat3},config:{depth:a.z+n,fillTranslation:r,tileOpacity:1},patternOptions:p||c&&null!=f?{mosaicSize:[0,0],patternFactor:1,tlbr:[0,0,0,0]}:null,color:null,opacity:null,colorMix:null,opacityMix:null},_={patternTexture:null},w=c?1:0,O=D.key+t({hasPattern:c});if(null!=f){const{page:t,tl:i,br:l}=f,s=i[0],a=l[1],n=l[0],o=i[1],r=v.getPageSize(t);null!=r&&(v.bind(h,9729,t,e),P.patternOptions={mosaicSize:[r[0],r[1]],patternFactor:1,tlbr:[s,a,n,o]},_.patternTexture={texture:v.getTexture(t),unit:e})}let V=-1;for(const t of o){if(!t.layerData.has(s))continue;if(t.key.level!==V){V=t.key.level;const e=D.getUniforms();for(const t of e){const e=t.getValue(a,d,V,v);P[t.name]={value:e}}if(c&&null!=P.patternOptions){const e=Math.max(2**(Math.round(d)-t.key.level),1),i=t.rangeX/(x*t.width*e);P.patternOptions.patternFactor=i}}const i=t.layerData.get(s);if(this._fillMesh=i.getMesh(h,{value:0}),!this._fillMesh)continue;const{transform:l,config:n}=P;l.dvsMat=t.transforms.displayViewScreenMat3,n.tileOpacity=1===y?t.fader.value():1;const o={shader:this.shaders.fill,uniforms:P,textures:_,defines:{fillType:w},optionalAttributes:D.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:D.getPrecisionFactors(),materialKey:O};if(p){const l=P.patternOptions,s=i.patternMap;if(!s||null==l)continue;let a=0;for(const[i,n]of s){const s=v.getPageSize(i);null!=s&&(v.bind(h,9729,i,e),l.mosaicSize=s,_.patternTexture={texture:v.getTexture(i),unit:e},g.submitDrawMeshUntyped(h,o,this._fillMesh,{stencilRef:t.stencilRef,parts:[a++]}))}}else g.submitDrawMeshUntyped(h,o,this._fillMesh,{stencilRef:t.stencilRef});t.triangleCount+=i.fillIndexCount/3}}_drawOutline(t,e,i,l,s,a){const{context:o,displayLevel:r,drawPhase:u,state:c,spriteMosaic:f,painter:p,pixelRatio:h}=t,d=i.outlineMaterial,y=d.key,M=.75/h,g={transform:{dvsMat3:null,displayMat3:1===a?c.displayMat3:c.displayViewMat3},config:{depth:i.z+n,fillTranslation:s,outlineWidth:M,tileOpacity:1},color:null,opacity:null,colorMix:null,opacityMix:null};let m=-1;for(const n of l){if(!n.layerData.has(e))continue;if(n.key.level!==m){m=n.key.level;const t=d.getUniforms();for(const e of t){const t=e.getValue(i,r,m,f);e.name in g&&(g[e.name]={value:t})}}const t=n.layerData.get(e);if(this._outlineMesh=t.getMesh(o,{value:1}),null==this._outlineMesh)continue;const{transform:l,config:s}=g;l.dvsMat3=n.transforms.displayViewScreenMat3,s.tileOpacity=1===u?n.fader.value():1;const a={shader:this.shaders.outline,uniforms:g,textures:{},defines:{},optionalAttributes:d.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:d.getPrecisionFactors(),materialKey:y};p.submitDrawMeshUntyped(o,a,this._outlineMesh,{stencilRef:n.stencilRef}),n.triangleCount+=t.outlineIndexCount/3}}}export{o as VTLTechniqueFill};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{getDefinesKey as e}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as t}from"../../../definitions.js";import{Technique as i}from"../Technique.js";import{VTLShaderLine as s}from"../shaders/vector-tiles/VTLShaderLine.js";class n extends i{constructor(){super(...arguments),this.type=41,this._mesh=null,this.shaders={line:new s}}shutdown(){this._mesh&&(this._mesh.destroy(),this._mesh=null)}render(i,s){const{context:n,displayLevel:l,drawPhase:a,is3D:o,painter:r,pixelRatio:u,spriteMosaic:c,state:p,styleLayer:f,styleLayerUID:d}=i,{tiles:h}=s;if(!h.some(e=>e.layerData.get(d)?.lineIndexCount??!1))return;const m=f,y=m.lineMaterial,g=m.getPaintValue("line-translate",l),M=m.getPaintValue("line-translate-anchor",l),x=1/u,v={layerInfo:{displayViewMat3:p.displayViewMat3,displayMat3:1===M?p.displayMat3:p.displayViewMat3,lineTranslation:g,depth:m.z,antialiasing:x},tileInfo:{dvsMat3:null,zoomFactor:1,tileOpacity:1},page:null,color:null,width:null,opacity:null,blur:null,offset:null,colorMix:null,widthMix:null,opacityMix:null,blurMix:null,offsetMix:null,tlbr:null},w=m.getPaintProperty("line-pattern"),P=void 0!==w,D=P&&w.isDataDriven;let V,b;if(P&&!D){const e=w.getValue(l);V=c.getMosaicItemPosition(e)}let z=!1;if(!P){const e=m.getPaintProperty("line-dasharray");if(b=void 0!==e,z=b&&e.isDataDriven,b&&!z){const t=e.getValue(l),i=m.getDashKey(t,m.getLayoutValue("line-cap",l));if(V=c.getMosaicItemPosition(i),null==V)return}}const I=P?1:b?2:0,T=y.key+e({lineType:I});if(null!=V){const{page:e}=V,i=c.getPageSize(e);if(null!=i){c.bind(n,9729,e,t);const s={texture:{texture:c.getTexture(e),unit:t},mosaicSize:[i[0],i[1]]};v.page=s}}o||r.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:{write:!1,test:{compare:514,op:{fail:7680,zFail:7680,zPass:7681},mask:255}},depth:{write:!1,test:515}});const{tileInfo:_}=v;let S=-1;for(const e of h){if(!e.layerData.has(d))continue;if(_.dvsMat3=e.transforms.displayViewScreenMat3,e.key.level!==S){S=e.key.level;const t=y.getUniforms();for(const e of t){const t=e.getValue(m,l,S,c);e.name in v&&(v[e.name]={value:t})}}const i=2**(l-S)/u;_.zoomFactor=i;const s=e.layerData.get(d);if(!s.lineIndexCount)continue;if(this._mesh=s.getMesh(n),!this._mesh)continue;_.tileOpacity=1===a?e.fader.value():1;const o={shader:this.shaders.line,uniforms:v,defines:{lineType:I},optionalAttributes:y.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:y.getPrecisionFactors(),materialKey:T};if(D||z){const i=s.patternMap;if(!i)continue;let l=0;for(const s of i.keys()){const i=c.getPageSize(s);null!=i&&(c.bind(n,9729,s,t),v.page={texture:{texture:c.getTexture(s),unit:t},mosaicSize:[i[0],i[1]]},r.submitDrawMeshUntyped(n,o,this._mesh,{stencilRef:e.stencilRef,parts:[l++]}))}}else r.submitDrawMeshUntyped(n,o,this._mesh,{stencilRef:e.stencilRef});e.triangleCount+=s.lineIndexCount/3}}}export{n as VTLTechniqueLine};
2
+ import{getDefinesKey as e}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as t}from"../../../definitions.js";import{Technique as i}from"../Technique.js";import{VTLShaderLine as s}from"../shaders/vector-tiles/VTLShaderLine.js";class n extends i{constructor(){super(...arguments),this.type=41,this._mesh=null,this.shaders={line:new s}}shutdown(){this._mesh&&(this._mesh.destroy(),this._mesh=null)}render(i,s){const{context:n,displayLevel:l,drawPhase:a,is3D:o,painter:r,pixelRatio:u,spriteMosaic:c,state:p,styleLayer:f,styleLayerUID:d}=i,{tiles:h}=s;if(!h.some(e=>e.layerData.get(d)?.lineIndexCount??!1))return;const m=f,y=m.lineMaterial,g=m.getPaintValue("line-translate",l),M=m.getPaintValue("line-translate-anchor",l),x=1/u,v={layerInfo:{displayViewMat3:p.displayViewMat3,displayMat3:1===M?p.displayMat3:p.displayViewMat3,lineTranslation:g,depth:m.z,antialiasing:x},tileInfo:{dvsMat3:null,zoomFactor:1,tileOpacity:1},page:null,color:null,width:null,opacity:null,blur:null,offset:null,colorMix:null,widthMix:null,opacityMix:null,blurMix:null,offsetMix:null,tlbr:null},w=m.getPaintProperty("line-pattern"),P=void 0!==w,D=P&&w.isDataDriven;let T,V;if(P&&!D){const e=w.getValue(l);T=c.getMosaicItemPosition(e)}let b=!1;if(!P){const e=m.getPaintProperty("line-dasharray");if(V=void 0!==e,b=V&&e.isDataDriven,V&&!b){const t=e.getValue(l),i=m.getDashKey(t,m.getLayoutValue("line-cap",l));if(T=c.getMosaicItemPosition(i),null==T)return}}const z=P?1:V?2:0,I=y.key+e({lineType:z}),_={pageTexture:null};if(null!=T){const{page:e}=T,i=c.getPageSize(e);if(null!=i){c.bind(n,9729,e,t);const s={mosaicSize:[i[0],i[1]]};_.pageTexture={texture:c.getTexture(e),unit:t},v.page=s}}o||r.setPipelineState({color:{write:[!0,!0,!0,!0],blendMode:"composite"},stencil:{write:!1,test:{compare:514,op:{fail:7680,zFail:7680,zPass:7681},mask:255}},depth:{write:!1,test:515}});const{tileInfo:S}=v;let L=-1;for(const e of h){if(!e.layerData.has(d))continue;if(S.dvsMat3=e.transforms.displayViewScreenMat3,e.key.level!==L){L=e.key.level;const t=y.getUniforms();for(const e of t){const t=e.getValue(m,l,L,c);e.name in v&&(v[e.name]={value:t})}}const i=2**(l-L)/u;S.zoomFactor=i;const s=e.layerData.get(d);if(!s.lineIndexCount)continue;if(this._mesh=s.getMesh(n),!this._mesh)continue;S.tileOpacity=1===a?e.fader.value():1;const o={shader:this.shaders.line,uniforms:v,textures:_,defines:{lineType:z},optionalAttributes:y.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:y.getPrecisionFactors(),materialKey:I};if(D||b){const i=s.patternMap;if(!i)continue;let l=0;for(const s of i.keys()){const i=c.getPageSize(s);null!=i&&(c.bind(n,9729,s,t),v.page={mosaicSize:[i[0],i[1]]},_.pageTexture={texture:c.getTexture(s),unit:t},r.submitDrawMeshUntyped(n,o,this._mesh,{stencilRef:e.stencilRef,parts:[l++]}))}}else r.submitDrawMeshUntyped(n,o,this._mesh,{stencilRef:e.stencilRef});e.triangleCount+=s.lineIndexCount/3}}}export{n as VTLTechniqueLine};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{fadeDuration as e}from"../../../../vectorTiles/decluttering/config.js";import{getDefinesKey as t}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as i,vtlTextureBindingUnitGlyphs as a}from"../../../definitions.js";import{degToByte as l}from"../../../GeometryUtils.js";import{Technique as n}from"../Technique.js";import{VTLShaderIcon as s}from"../shaders/vector-tiles/VTLShaderIcon.js";import{VTLShaderText as o}from"../shaders/vector-tiles/VTLShaderText.js";const r=1/65536;class c extends n{constructor(){super(...arguments),this.type=42,this._iconMesh=null,this._textMesh=null,this.shaders={icon:new s,text:new o}}shutdown(){this._iconMesh&&(this._iconMesh.destroy(),this._iconMesh=null),this._textMesh&&(this._textMesh.destroy(),this._textMesh=null)}render(e,t){const{painter:i}=e,a=e.styleLayer,{tiles:l}=t,n=i.getPipelineState();this._setRenderState(e),this._drawIcons(e,a,l),this._drawText(e,a,l),i.setPipelineState(n)}_drawIcons(t,a,n){const{context:s,displayLevel:o,drawPhase:r,spriteMosaic:c,state:u,styleLayerUID:h}=t,p=a.iconMaterial;let y,d=!1;for(const e of n)if(e.layerData.has(h)&&(y=e.layerData.get(h),y.iconPerPageElementsMap.size>0)){d=!0;break}if(!d)return;const g=a.getPaintValue("icon-translate",o),f=a.getPaintValue("icon-translate-anchor",o);let m=a.getLayoutValue("icon-rotation-alignment",o);2===m&&(m=0===a.getLayoutValue("symbol-placement",o)?1:0);const M=0===m,x=a.getLayoutValue("icon-keep-upright",o)&&M,P=y.isIconSDF,v={transform:{dvsMat3:null,displayViewMat3:0===m?u.displayViewMat3:u.displayMat3,displayMat3:1===f?u.displayMat3:u.displayViewMat3,mapRotation:l(u.rotation)},config:{depth:a.z,iconTranslation:g,level:10*o,keepUpright:x?1:0,fadeDuration:e/1e3,isStencilPass:t.stencilSymbols?1:0,time:null,tileOpacity:1},page:{mosaicSize:null,texture:{texture:null,unit:i}},color:null,opacity:null,haloBlur:null,haloColor:null,haloWidth:null,size:null,colorMix:null,opacityMix:null,haloBlurMix:null,haloColorMix:null,haloWidthMix:null,sizeMix:null};let w=-1;for(const e of n){if(!e.layerData.has(h))continue;if(e.key.level!==w){w=e.key.level;const t=p.getUniforms();for(const e of t){const t=e.getValue(a,o,w,c);v[e.name]={value:t}}}if(y=e.layerData.get(h),0===y.iconPerPageElementsMap.size)continue;if(this._iconMesh=y.getMesh(s,{value:0}),!this._iconMesh)continue;y.updateOpacityInfo(),v.transform.dvsMat3=e.transforms.displayViewScreenMat3,v.config.time=(performance.now()-y.lastOpacityUpdate)/1e3,v.config.tileOpacity=1===r?e.fader.value():1;let i=0;for(const[a,l]of y.iconPerPageElementsMap)this._renderIconRange(t,p,l,a,e,v,this._iconMesh,P,i++)}}_drawText(t,i,n){const{context:s,displayLevel:o,drawPhase:c,glyphMosaic:u,spriteMosaic:h,pixelRatio:p,state:y,styleLayerUID:d,requestRender:g,allowDelayedRender:f}=t,m=i.textMaterial;let M,x=!1;for(const e of n)if(e.layerData.has(d)&&(M=e.layerData.get(d),M.glyphPerPageElementsMap.size>0)){x=!0;break}if(!x)return;const P=i.getPaintProperty("text-opacity");if(P&&!P.isDataDriven&&0===P.getValue(o))return;const v=i.getPaintProperty("text-color"),w=v&&v.getValue(o),D=!v||v.isDataDriven||w&&4===w.length&&w[3]>0,_=i.getPaintProperty("text-halo-width"),V=i.getPaintProperty("text-halo-color"),S=V&&V.getValue(o),z=(!_||_.isDataDriven||_.getValue(o)>0)&&(!V||V.isDataDriven||S&&4===S.length&&S[3]>0);if(!D&&!z)return;const b=24/8;let R=i.getLayoutValue("text-rotation-alignment",o);2===R&&(R=0===i.getLayoutValue("symbol-placement",o)?1:0);const T=0===R,U=i.getLayoutValue("text-keep-upright",o)&&T,k=.8*b/p;this._glyphTextureSize||(this._glyphTextureSize=[u.width/4,u.height/4]);const L=i.getPaintValue("text-translate",o),I=i.getPaintValue("text-translate-anchor",o);if(f&&null!=g)return void g();const C={transform:{dvsMat3:null,displayViewMat3:0===R?y.displayViewMat3:y.displayMat3,displayMat3:1===I?y.displayMat3:y.displayViewMat3,mapRotation:l(y.rotation)},config:{depth:i.z+r,textTranslation:L,keepUpright:U?1:0,level:10*o,fadeDuration:e/1e3,antialiasingWidth:k,time:null,halo:null,isStencilPass:t.stencilSymbols?1:0,tileOpacity:1},page:{mosaicSize:null,texture:{texture:null,unit:a}},size:null,color:null,haloColor:null,opacity:null,haloWidth:null,haloBlur:null,sizeMix:null,colorMix:null,haloColorMix:null,opacityMix:null,haloWidthMix:null,haloBlurMix:null};let O=-1;for(const e of n){if(!e.layerData.has(d))continue;if(e.key.level!==O){O=e.key.level;const t=m.getUniforms();for(const e of t){const t=e.getValue(i,o,O,h);e.name in C&&(C[e.name]={value:t})}}if(M=e.layerData.get(d),0===M.glyphPerPageElementsMap.size)continue;if(C.transform.dvsMat3=e.transforms.displayViewScreenMat3,C.config.time=(performance.now()-M.lastOpacityUpdate)/1e3,C.config.tileOpacity=1===c?e.fader.value():1,this._textMesh=M.getMesh(s,{value:1}),!this._textMesh)continue;M.updateOpacityInfo();let a=0;M.glyphPerPageElementsMap.forEach((i,l)=>{this._renderGlyphRange(t,i,l,z,D,e,C,m,this._textMesh,a++)})}}_renderIconRange(e,a,l,n,s,o,r,c,u){const{context:h,is3D:p,painter:y,spriteMosaic:d}=e,g={iconType:c?1:0},f=a.key+t(g);d.bind(h,9729,n,i),o.page={mosaicSize:[d.getWidth(n)/4,d.getHeight(n)/4],texture:{texture:d.getTexture(n),unit:i}};const m={shader:this.shaders.icon,uniforms:o,defines:g,optionalAttributes:a.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:a.getPrecisionFactors(),materialKey:f};y.submitDrawMeshUntyped(h,m,r,{stencilRef:p?s.stencilRef:255,parts:[u]}),s.triangleCount+=l[1]/3}_renderGlyphRange(e,t,i,l,n,s,o,r,c,u){const{context:h,is3D:p,painter:y,glyphMosaic:d}=e;d.bind(h,9729,i,a),o.page={mosaicSize:this._glyphTextureSize,texture:{texture:d.getTexture(h,i),unit:a}};const g={shader:this.shaders.text,uniforms:o,defines:null,optionalAttributes:r.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:r.getPrecisionFactors(),materialKey:r.key};l&&(o.config.halo=1,y.submitDrawMeshUntyped(h,g,c,{stencilRef:p?s.stencilRef:255,parts:[u]}),s.triangleCount+=t[1]/3),n&&(o.config.halo=0,y.submitDrawMeshUntyped(h,g,c,{stencilRef:p?s.stencilRef:255,parts:[u]}),s.triangleCount+=t[1]/3)}_setRenderState(e){const{is3D:t,painter:i,stencilSymbols:a}=e;i.setPipelineState({color:{write:[!a,!a,!a,!a],blendMode:a?"none":"composite"},stencil:{write:!!a&&{mask:255},test:{compare:a?519:t?514:516,op:{fail:7680,zFail:7680,zPass:7681},mask:255}},depth:{write:!1,test:515}})}}export{c as VTLTechniqueSymbol};
2
+ import{fadeDuration as e}from"../../../../vectorTiles/decluttering/config.js";import{getDefinesKey as t}from"../../../../vectorTiles/shaders/vtlMaterialUtils.js";import{vtlTextureBindingUnitSprites as i,vtlTextureBindingUnitGlyphs as a}from"../../../definitions.js";import{degToByte as l}from"../../../GeometryUtils.js";import{Technique as s}from"../Technique.js";import{VTLShaderIcon as n}from"../shaders/vector-tiles/VTLShaderIcon.js";import{VTLShaderText as o}from"../shaders/vector-tiles/VTLShaderText.js";const r=1/65536;class c extends s{constructor(){super(...arguments),this.type=42,this._iconMesh=null,this._textMesh=null,this.shaders={icon:new n,text:new o}}shutdown(){this._iconMesh&&(this._iconMesh.destroy(),this._iconMesh=null),this._textMesh&&(this._textMesh.destroy(),this._textMesh=null)}render(e,t){const{painter:i}=e,a=e.styleLayer,{tiles:l}=t,s=i.getPipelineState();this._setRenderState(e),this._drawIcons(e,a,l),this._drawText(e,a,l),i.setPipelineState(s)}_drawIcons(t,i,a){const{context:s,displayLevel:n,drawPhase:o,spriteMosaic:r,state:c,styleLayerUID:u}=t,h=i.iconMaterial;let p,g=!1;for(const e of a)if(e.layerData.has(u)&&(p=e.layerData.get(u),p.iconPerPageElementsMap.size>0)){g=!0;break}if(!g)return;const y=i.getPaintValue("icon-translate",n),d=i.getPaintValue("icon-translate-anchor",n);let f=i.getLayoutValue("icon-rotation-alignment",n);2===f&&(f=0===i.getLayoutValue("symbol-placement",n)?1:0);const m=0===f,M=i.getLayoutValue("icon-keep-upright",n)&&m,x=p.isIconSDF,P={transform:{dvsMat3:null,displayViewMat3:0===f?c.displayViewMat3:c.displayMat3,displayMat3:1===d?c.displayMat3:c.displayViewMat3,mapRotation:l(c.rotation)},config:{depth:i.z,iconTranslation:y,level:10*n,keepUpright:M?1:0,fadeDuration:e/1e3,isStencilPass:t.stencilSymbols?1:0,time:null,tileOpacity:1},page:{mosaicSize:null},color:null,opacity:null,haloBlur:null,haloColor:null,haloWidth:null,size:null,colorMix:null,opacityMix:null,haloBlurMix:null,haloColorMix:null,haloWidthMix:null,sizeMix:null};let v=-1;for(const e of a){if(!e.layerData.has(u))continue;if(e.key.level!==v){v=e.key.level;const t=h.getUniforms();for(const e of t){const t=e.getValue(i,n,v,r);P[e.name]={value:t}}}if(p=e.layerData.get(u),0===p.iconPerPageElementsMap.size)continue;if(this._iconMesh=p.getMesh(s,{value:0}),!this._iconMesh)continue;p.updateOpacityInfo(),P.transform.dvsMat3=e.transforms.displayViewScreenMat3,P.config.time=(performance.now()-p.lastOpacityUpdate)/1e3,P.config.tileOpacity=1===o?e.fader.value():1;let a=0;for(const[i,l]of p.iconPerPageElementsMap)this._renderIconRange(t,h,l,i,e,P,this._iconMesh,x,a++)}}_drawText(t,i,a){const{context:s,displayLevel:n,drawPhase:o,glyphMosaic:c,spriteMosaic:u,pixelRatio:h,state:p,styleLayerUID:g,requestRender:y,allowDelayedRender:d}=t,f=i.textMaterial;let m,M=!1;for(const e of a)if(e.layerData.has(g)&&(m=e.layerData.get(g),m.glyphPerPageElementsMap.size>0)){M=!0;break}if(!M)return;const x=i.getPaintProperty("text-opacity");if(x&&!x.isDataDriven&&0===x.getValue(n))return;const P=i.getPaintProperty("text-color"),v=P&&P.getValue(n),w=!P||P.isDataDriven||v&&4===v.length&&v[3]>0,D=i.getPaintProperty("text-halo-width"),_=i.getPaintProperty("text-halo-color"),V=_&&_.getValue(n),S=(!D||D.isDataDriven||D.getValue(n)>0)&&(!_||_.isDataDriven||V&&4===V.length&&V[3]>0);if(!w&&!S)return;const z=24/8;let T=i.getLayoutValue("text-rotation-alignment",n);2===T&&(T=0===i.getLayoutValue("symbol-placement",n)?1:0);const b=0===T,R=i.getLayoutValue("text-keep-upright",n)&&b,U=.8*z/h;this._glyphTextureSize||(this._glyphTextureSize=[c.width/4,c.height/4]);const k=i.getPaintValue("text-translate",n),L=i.getPaintValue("text-translate-anchor",n);if(d&&null!=y)return void y();const I={transform:{dvsMat3:null,displayViewMat3:0===T?p.displayViewMat3:p.displayMat3,displayMat3:1===L?p.displayMat3:p.displayViewMat3,mapRotation:l(p.rotation)},config:{depth:i.z+r,textTranslation:k,keepUpright:R?1:0,level:10*n,fadeDuration:e/1e3,antialiasingWidth:U,time:null,halo:null,isStencilPass:t.stencilSymbols?1:0,tileOpacity:1},page:{mosaicSize:null},size:null,color:null,haloColor:null,opacity:null,haloWidth:null,haloBlur:null,sizeMix:null,colorMix:null,haloColorMix:null,opacityMix:null,haloWidthMix:null,haloBlurMix:null};let C=-1;for(const e of a){if(!e.layerData.has(g))continue;if(e.key.level!==C){C=e.key.level;const t=f.getUniforms();for(const e of t){const t=e.getValue(i,n,C,u);e.name in I&&(I[e.name]={value:t})}}if(m=e.layerData.get(g),0===m.glyphPerPageElementsMap.size)continue;if(I.transform.dvsMat3=e.transforms.displayViewScreenMat3,I.config.time=(performance.now()-m.lastOpacityUpdate)/1e3,I.config.tileOpacity=1===o?e.fader.value():1,this._textMesh=m.getMesh(s,{value:1}),!this._textMesh)continue;m.updateOpacityInfo();let a=0;m.glyphPerPageElementsMap.forEach((i,l)=>{this._renderGlyphRange(t,i,l,S,w,e,I,f,this._textMesh,a++)})}}_renderIconRange(e,a,l,s,n,o,r,c,u){const{context:h,is3D:p,painter:g,spriteMosaic:y}=e,d={iconType:c?1:0},f=a.key+t(d);y.bind(h,9729,s,i),o.page={mosaicSize:[y.getWidth(s)/4,y.getHeight(s)/4]};const m={shader:this.shaders.icon,uniforms:o,textures:{pageTexture:{texture:y.getTexture(s),unit:i}},defines:d,optionalAttributes:a.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:a.getPrecisionFactors(),materialKey:f};g.submitDrawMeshUntyped(h,m,r,{stencilRef:p?n.stencilRef:255,parts:[u]}),n.triangleCount+=l[1]/3}_renderGlyphRange(e,t,i,l,s,n,o,r,c,u){const{context:h,is3D:p,painter:g,glyphMosaic:y}=e;y.bind(h,9729,i,a),o.page={mosaicSize:this._glyphTextureSize};const d={shader:this.shaders.text,uniforms:o,textures:{pageTexture:{texture:y.getTexture(h,i),unit:a}},defines:null,optionalAttributes:r.getUsedAttributes(),useComputeBuffer:!1,precisionFactors:r.getPrecisionFactors(),materialKey:r.key};l&&(o.config.halo=1,g.submitDrawMeshUntyped(h,d,c,{stencilRef:p?n.stencilRef:255,parts:[u]}),n.triangleCount+=t[1]/3),s&&(o.config.halo=0,g.submitDrawMeshUntyped(h,d,c,{stencilRef:p?n.stencilRef:255,parts:[u]}),n.triangleCount+=t[1]/3)}_setRenderState(e){const{is3D:t,painter:i,stencilSymbols:a}=e;i.setPipelineState({color:{write:[!a,!a,!a,!a],blendMode:a?"none":"composite"},stencil:{write:!!a&&{mask:255},test:{compare:a?519:t?514:516,op:{fail:7680,zFail:7680,zPass:7681},mask:255}},depth:{write:!1,test:515}})}}export{c as VTLTechniqueSymbol};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{destroyMaybe as e}from"../../../../../../../core/maybe.js";import{Mesh as t}from"../../../meshing/Mesh.js";import{simplePipelineState as r}from"../../utils.js";import{Technique as s}from"../Technique.js";import{VideoScreenShader as o}from"../shaders/VideoScreenShader.js";import{PrimitiveType as n,DataType as i}from"../../../../../../webgl/enums.js";import{VertexElementDescriptor as m}from"../../../../../../webgl/VertexElementDescriptor.js";class c extends s{constructor(){super(...arguments),this.type=37,this._mesh=null,this.shaders={geometry:new o}}render(e,t){const{context:s,painter:o}=e,{texture:n,textureCoords:i}=t,m=this._getMesh(e),c=t.ndcRect[2],a=t.ndcRect[3],h=t.ndcRect[0],u=t.ndcRect[1],d=new Float32Array(180);for(let r=0;r<6;r++){const e=a*r/5;for(let t=0;t<6;t++){const s=c*t/5,{u:o,v:n}=i[6*r+t];d[5*(6*r+t)]=h+s,d[5*(6*r+t)+1]=u-e,d[5*(6*r+t)+2]=o,d[5*(6*r+t)+3]=n,d[5*(6*r+t)+4]=1}}m.vertexBuffers.get("geometry")?.setData(d);const p={texture:{texture:n,unit:0},opacity:t.opacity},l={shader:this.shaders.geometry,uniforms:{config:p},defines:{},optionalAttributes:null,useComputeBuffer:!1};o.setPipelineState(r),o.submitDrawMeshUntyped(s,l,m)}shutdown(){e(this._mesh)}_getMesh(e){const{context:r}=e,s=new Uint32Array(150);for(let t=0;t<5;t++)for(let e=0;e<5;e++){const r=6*(5*t+e),o=6*(t+1)+e+1,n=o-1,i=o-6,m=o-7;s[r]=o,s[r+1]=n,s[r+2]=i,s[r+3]=n,s[r+4]=m,s[r+5]=i}return this._mesh||(this._mesh=new t(r,{vertex:{geometry:{data:new Float32Array(180),layout:[new m("position",2,i.FLOAT,0,20),new m("texcoord",2,i.FLOAT,8,20),new m("w",1,i.FLOAT,16,20)]}},index:{index:{data:s}},groups:[{primitive:n.TRIANGLES,index:"index"}],parts:[{group:0,start:0,count:s.length}]})),this._mesh}}export{c as VideoScreenTechnique};
2
+ import{destroyMaybe as e}from"../../../../../../../core/maybe.js";import{Mesh as t}from"../../../meshing/Mesh.js";import{simplePipelineState as r}from"../../utils.js";import{Technique as s}from"../Technique.js";import{VideoScreenShader as o}from"../shaders/VideoScreenShader.js";import{PrimitiveType as n,DataType as i}from"../../../../../../webgl/enums.js";import{VertexElementDescriptor as m}from"../../../../../../webgl/VertexElementDescriptor.js";class c extends s{constructor(){super(...arguments),this.type=37,this._mesh=null,this.shaders={geometry:new o}}render(e,t){const{context:s,painter:o}=e,{texture:n,textureCoords:i}=t,m=this._getMesh(e),c=t.ndcRect[2],a=t.ndcRect[3],h=t.ndcRect[0],u=t.ndcRect[1],d=new Float32Array(180);for(let r=0;r<6;r++){const e=a*r/5;for(let t=0;t<6;t++){const s=c*t/5,{u:o,v:n}=i[6*r+t];d[5*(6*r+t)]=h+s,d[5*(6*r+t)+1]=u-e,d[5*(6*r+t)+2]=o,d[5*(6*r+t)+3]=n,d[5*(6*r+t)+4]=1}}m.vertexBuffers.get("geometry")?.setData(d);const p={opacity:t.opacity},l={shader:this.shaders.geometry,uniforms:{config:p},textures:{texture:{texture:n,unit:0}},defines:{},optionalAttributes:null,useComputeBuffer:!1};o.setPipelineState(r),o.submitDrawMeshUntyped(s,l,m)}shutdown(){e(this._mesh)}_getMesh(e){const{context:r}=e,s=new Uint32Array(150);for(let t=0;t<5;t++)for(let e=0;e<5;e++){const r=6*(5*t+e),o=6*(t+1)+e+1,n=o-1,i=o-6,m=o-7;s[r]=o,s[r+1]=n,s[r+2]=i,s[r+3]=n,s[r+4]=m,s[r+5]=i}return this._mesh||(this._mesh=new t(r,{vertex:{geometry:{data:new Float32Array(180),layout:[new m("position",2,i.FLOAT,0,20),new m("texcoord",2,i.FLOAT,8,20),new m("w",1,i.FLOAT,16,20)]}},index:{index:{data:s}},groups:[{primitive:n.TRIANGLES,index:"index"}],parts:[{group:0,start:0,count:s.length}]})),this._mesh}}export{c as VideoScreenTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"../../../../../../core/Error.js";import r from"../../../../../../core/Logger.js";import{disposeMaybe as t}from"../../../../../../core/maybe.js";import{getDeepValue as o}from"../../../../../../core/object.js";import{createTexture as a}from"../../textureUtils.js";import{DisposableProgram as n}from"../../../../../webgl/Program.js";import{transpileShader as i}from"../../../../../webgl/ShaderTranspiler.js";const s=()=>r.getLogger("esri.views.2d.engine.webgl.shaderGraph.typed.TypedShaderProgram");function f(r,t,o){const a=t.length;if(a!==o){const n=new e("Invalid Uniform",`Invalid length, expected ${o} but got ${a}`,{uniformName:r,values:t});s().errorOnce(n)}}class m{constructor(e,r,t,o,a,n){this.debugName=e,this.vertexShader=r,this.fragmentShader=t,this._locations=o,this._uniformBindings=a,this._transformFeedbackBindings=n,this._vao=null,this._temporaryTextures=[]}destroy(){this._program=t(this._program),this.cleanupTemporaryTextures()}[Symbol.dispose](){this.destroy()}setUniforms(e){this._uniforms=e}validate(e){if(!this._validation){const r=this._validateWebGL2(e);"error"===r.type&&(r.error=`Validation failed for ShaderModule '${this.debugName}'\n${r.error}`),this._validation=r}return this._validation}cleanupTemporaryTextures(){for(const e of this._temporaryTextures)e.dispose();this._temporaryTextures=[]}prepare(e){if(!this._program){const r=[];for(const e of this._transformFeedbackBindings??[]){const{index:t,propertyKey:o}=e;r[t]=`v_${o}`}this._program=new n(e,this.vertexShader,this.fragmentShader,this._locations,new Map,r)}}get compiled(){return this._program?.compiled??!1}bind(e){const r=this._uniforms;this.prepare(e);const t=this._program;e.useProgram(t);for(const n of this._uniformBindings){const{shaderModulePath:i,uniformName:s,uniformType:m,uniformArrayLength:h}=n,c=o(i,r);if(null==c){if("sampler2D"===m)continue;throw new Error(`Failed to find uniform value for ${i}`)}switch("array"===m||"array-2d"===m?n.uniformArrayElementType:m){case"sampler2D":{const{unit:r,texture:o}=c;if(t.setUniform1i(s,r),"type"in o)e.bindTexture(o,r);else{const t=a(e,o.descriptor,o.data);e.bindTexture(t,r)}break}case"int":if(!h){t.setUniform1i(s,c);break}f(n.uniformName,c,h),t.setUniform1iv(s,c);break;case"float":if(!h){t.setUniform1f(s,c);break}f(n.uniformName,c,h),t.setUniform1fv(s,c);break;case"vec2":if(!h){t.setUniform2f(s,c[0],c[1]);break}f(n.uniformName,c,h),t.setUniform2fv(s,c.flat());break;case"vec3":if(!h){t.setUniform3f(s,c[0],c[1],c[2]);break}f(n.uniformName,c,h),t.setUniform3fv(s,c.flat());break;case"vec4":if(!h){t.setUniform4f(s,c[0],c[1],c[2],c[3]);break}f(n.uniformName,c,h),t.setUniform4fv(s,c.flat());break;case"mat3":t.setUniformMatrix3fv(s,c);break;case"mat4":t.setUniformMatrix4fv(s,c);break;default:throw new Error(`Unable to set uniform for type ${m}`)}}}_validateWebGL2(e){const r=e.gl,t=c(r,35633,this.vertexShader);if("error"===t.type)return t;const o=c(r,35632,this.fragmentShader);if("error"===o.type)return o;const a=t.value,n=o.value,i=r.createProgram();if(r.attachShader(i,a),r.attachShader(i,n),r.linkProgram(i),!r.getProgramParameter(i,r.LINK_STATUS)){return{type:"error",error:`Failed to link shader:\nvalidated: ${r.getProgramParameter(i,r.VALIDATE_STATUS)}, gl error ${r.getError()}, vertex: ${r.getShaderParameter(a,r.COMPILE_STATUS)}, fragment: ${r.getShaderParameter(n,r.COMPILE_STATUS)}, info log: ${r.getProgramInfoLog(i)}, vertex source: ${this.vertexShader}, fragment source: ${this.fragmentShader}`}}return r.deleteProgram(i),{type:"ok",value:null}}}function h(e){const r=e.match(/\d+:(\d+):/);if(void 0!==r?.index&&r?.length>1){const e=r.index+r[0].length;return{lineNumber:parseInt(r[1],10),offset:e}}return null}function c(e,r,t){const o=e.createShader(r),a=i(t,r);if(e.shaderSource(o,a),e.compileShader(o),!e.getShaderParameter(o,e.COMPILE_STATUS)){const a=e.getShaderInfoLog(o)??"";let n="";const i=a.split("\n"),s=new Map,f=[];for(const e of i){const r=h(a);if(!r){f.push(e);continue}let t=s.get(r.lineNumber);t||(t=[],s.set(r.lineNumber,t)),t.push({text:e,offset:r.offset})}const m=Array.from(s.entries()).sort();for(const[e,r]of m){const o=t.split("\n"),a=Math.max(e-2,0),i=Math.min(e+2,o.length);for(let t=a;t!==i;t++){if(n+=`${(t+1).toString().padEnd(4)}${o[t]}\n`,t===e-1){const e=o[t].length;n+=" "+new Array(e).join("^")+"\n";for(const{text:t,offset:o}of r)n+=" "+t.slice(o).trim()+"\n"}}}for(const e of f)n+=e+"\n";const c=`Failed to compile ${35633===r?"vertex":"fragment"} shader:\n\n${n}`;return e.deleteShader(o),{type:"error",error:c}}return{type:"ok",value:o}}export{m as TypedShaderProgram};
2
+ import e from"../../../../../../core/Error.js";import r from"../../../../../../core/Logger.js";import{disposeMaybe as t}from"../../../../../../core/maybe.js";import{getDeepValue as o}from"../../../../../../core/object.js";import{createTexture as i}from"../../textureUtils.js";import{DisposableProgram as n}from"../../../../../webgl/Program.js";import{transpileShader as a}from"../../../../../webgl/ShaderTranspiler.js";const s=()=>r.getLogger("esri.views.2d.engine.webgl.shaderGraph.typed.TypedShaderProgram");function f(r,t,o){const i=t.length;if(i!==o){const n=new e("Invalid Uniform",`Invalid length, expected ${o} but got ${i}`,{uniformName:r,values:t});s().errorOnce(n)}}class m{constructor(e,r,t,o,i,n,a){this.debugName=e,this.vertexShader=r,this.fragmentShader=t,this._locations=o,this._uniformBindings=i,this._textureBindings=n,this._transformFeedbackBindings=a,this._vao=null,this._temporaryTextures=[]}destroy(){this._program=t(this._program),this.cleanupTemporaryTextures()}[Symbol.dispose](){this.destroy()}setUniforms(e){this._uniforms=e}setTextures(e){this._textures=e}validate(e){if(!this._validation){const r=this._validateWebGL2(e);"error"===r.type&&(r.error=`Validation failed for ShaderModule '${this.debugName}'\n${r.error}`),this._validation=r}return this._validation}cleanupTemporaryTextures(){for(const e of this._temporaryTextures)e.dispose();this._temporaryTextures=[]}prepare(e){if(!this._program){const r=[];for(const e of this._transformFeedbackBindings??[]){const{index:t,propertyKey:o}=e;r[t]=`v_${o}`}this._program=new n(e,this.vertexShader,this.fragmentShader,this._locations,new Map,r)}}get compiled(){return this._program?.compiled??!1}bind(e){const r=this._uniforms,t=this._textures;this.prepare(e);const n=this._program;e.useProgram(n);for(const i of this._uniformBindings){const{shaderModulePath:e,uniformName:t,uniformType:a,uniformArrayLength:s}=i,m=o(e,r);if(null==m)throw new Error(`Failed to find uniform value for ${e}`);switch("array"===a||"array-2d"===a?i.uniformArrayElementType:a){case"int":if(!s){n.setUniform1i(t,m);break}f(i.uniformName,m,s),n.setUniform1iv(t,m);break;case"float":if(!s){n.setUniform1f(t,m);break}f(i.uniformName,m,s),n.setUniform1fv(t,m);break;case"vec2":if(!s){n.setUniform2f(t,m[0],m[1]);break}f(i.uniformName,m,s),n.setUniform2fv(t,m.flat());break;case"vec3":if(!s){n.setUniform3f(t,m[0],m[1],m[2]);break}f(i.uniformName,m,s),n.setUniform3fv(t,m.flat());break;case"vec4":if(!s){n.setUniform4f(t,m[0],m[1],m[2],m[3]);break}f(i.uniformName,m,s),n.setUniform4fv(t,m.flat());break;case"mat3":n.setUniformMatrix3fv(t,m);break;case"mat4":n.setUniformMatrix4fv(t,m);break;default:throw new Error(`Unable to set uniform for type ${a}`)}}for(const a of this._textureBindings){const r=o(a.shaderModulePath,t);if(null==r)continue;const{unit:s,texture:f}=r;if(n.setUniform1i(a.textureName,s),"type"in f)e.bindTexture(f,s);else{const r=i(e,f.descriptor,f.data);e.bindTexture(r,s)}}}_validateWebGL2(e){const r=e.gl,t=d(r,35633,this.vertexShader);if("error"===t.type)return t;const o=d(r,35632,this.fragmentShader);if("error"===o.type)return o;const i=t.value,n=o.value,a=r.createProgram();if(r.attachShader(a,i),r.attachShader(a,n),r.linkProgram(a),!r.getProgramParameter(a,r.LINK_STATUS)){return{type:"error",error:`Failed to link shader:\nvalidated: ${r.getProgramParameter(a,r.VALIDATE_STATUS)}, gl error ${r.getError()}, vertex: ${r.getShaderParameter(i,r.COMPILE_STATUS)}, fragment: ${r.getShaderParameter(n,r.COMPILE_STATUS)}, info log: ${r.getProgramInfoLog(a)}, vertex source: ${this.vertexShader}, fragment source: ${this.fragmentShader}`}}return r.deleteProgram(a),{type:"ok",value:null}}}function h(e){const r=e.match(/\d+:(\d+):/);if(void 0!==r?.index&&r?.length>1){const e=r.index+r[0].length;return{lineNumber:parseInt(r[1],10),offset:e}}return null}function d(e,r,t){const o=e.createShader(r),i=a(t,r);if(e.shaderSource(o,i),e.compileShader(o),!e.getShaderParameter(o,e.COMPILE_STATUS)){const i=e.getShaderInfoLog(o)??"";let n="";const a=i.split("\n"),s=new Map,f=[];for(const e of a){const r=h(i);if(!r){f.push(e);continue}let t=s.get(r.lineNumber);t||(t=[],s.set(r.lineNumber,t)),t.push({text:e,offset:r.offset})}const m=Array.from(s.entries()).sort();for(const[e,r]of m){const o=t.split("\n"),i=Math.max(e-2,0),a=Math.min(e+2,o.length);for(let t=i;t!==a;t++){if(n+=`${(t+1).toString().padEnd(4)}${o[t]}\n`,t===e-1){const e=o[t].length;n+=" "+new Array(e).join("^")+"\n";for(const{text:t,offset:o}of r)n+=" "+t.slice(o).trim()+"\n"}}}for(const e of f)n+=e+"\n";const d=`Failed to compile ${35633===r?"vertex":"fragment"} shader:\n\n${n}`;return e.deleteShader(o),{type:"error",error:d}}return{type:"ok",value:o}}export{m as TypedShaderProgram};