@arcgis/core 5.2.0-next.7 → 5.2.0-next.8

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 (446) hide show
  1. package/arcgisGlobal.d.ts +4 -0
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/07cc5743cb6a9fd68adb.js +1 -0
  4. package/assets/esri/core/workers/chunks/0cbd7f5fe24271942abd.js +1 -0
  5. package/assets/esri/core/workers/chunks/0ecc1bc1686844cdd60e.js +1 -0
  6. package/assets/esri/core/workers/chunks/0f75c19d8e296a32e329.js +1 -0
  7. package/assets/esri/core/workers/chunks/174cc2e69e5b5a13d880.js +1 -0
  8. package/assets/esri/core/workers/chunks/18f980465db5a86153d1.js +1 -0
  9. package/assets/esri/core/workers/chunks/1996f0a930abdd97b855.js +1 -0
  10. package/assets/esri/core/workers/chunks/1c8436b27a3d3cde5cfc.js +1 -0
  11. package/assets/esri/core/workers/chunks/1cb1f125dccbf8c8cac9.js +1 -0
  12. package/assets/esri/core/workers/chunks/1dd06335bb2d35c66339.js +1 -0
  13. package/assets/esri/core/workers/chunks/1f289aa69dd6b6be534a.js +1 -0
  14. package/assets/esri/core/workers/chunks/2185e8a52c5e29d46680.js +1 -0
  15. package/assets/esri/core/workers/chunks/{da29cf0e64065631a470.js → 24810c36ae09bb4e83dc.js} +1 -1
  16. package/assets/esri/core/workers/chunks/26583db2af1a1cc456e5.js +1 -0
  17. package/assets/esri/core/workers/chunks/274b82cb183ddd0042f3.js +1 -0
  18. package/assets/esri/core/workers/chunks/27c6def22c2b0791ce9e.js +1 -0
  19. package/assets/esri/core/workers/chunks/2c9ba638d1f31c82f9f5.js +1 -0
  20. package/assets/esri/core/workers/chunks/2d2895f1fdf44d212a4d.js +1 -0
  21. package/assets/esri/core/workers/chunks/2dbc2fd0f2dde505c465.js +1 -0
  22. package/assets/esri/core/workers/chunks/2dbcdfdf000226bfe746.js +1 -0
  23. package/assets/esri/core/workers/chunks/2e6382d50bf012064eae.js +1 -0
  24. package/assets/esri/core/workers/chunks/30f1909c5ef1835b8507.js +1 -0
  25. package/assets/esri/core/workers/chunks/31918a0d9886dedf385f.js +1 -0
  26. package/assets/esri/core/workers/chunks/{1c029b03ed836f393a50.js → 3248001d9dfb9153699e.js} +1 -1
  27. package/assets/esri/core/workers/chunks/3297658ccd8d4b9ce733.js +1 -0
  28. package/assets/esri/core/workers/chunks/{716a4d7e8b908b81870b.js → 32f26757e36704923286.js} +1 -1
  29. package/assets/esri/core/workers/chunks/3529afab0c2444275d91.js +1 -0
  30. package/assets/esri/core/workers/chunks/36dac6ab51d9dbdd091d.js +1 -0
  31. package/assets/esri/core/workers/chunks/390fda094fa8695d98cf.js +1 -0
  32. package/assets/esri/core/workers/chunks/39596715e84d0da2f803.js +30 -0
  33. package/assets/esri/core/workers/chunks/398eb3100a282e4736bb.js +1 -0
  34. package/assets/esri/core/workers/chunks/{b23009d9f8eb7c20ce45.js → 3b15933f65f59625a650.js} +1 -1
  35. package/assets/esri/core/workers/chunks/3b3f91a61e3f29af1fb2.js +1 -0
  36. package/assets/esri/core/workers/chunks/{f815106d439ff1f76e51.js → 3b837b512999e6ab24bc.js} +1 -1
  37. package/assets/esri/core/workers/chunks/3d20c86f1fe877bf884b.js +1 -0
  38. package/assets/esri/core/workers/chunks/3dc5fbecc427df1fd827.js +1 -0
  39. package/assets/esri/core/workers/chunks/3e65b4b18760bde8ceee.js +1 -0
  40. package/assets/esri/core/workers/chunks/3ff7aa216cd794d951e8.js +1 -0
  41. package/assets/esri/core/workers/chunks/{8e1865392681d390ab2e.js → 401ee7fa500adad77db1.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{60915a3708a34da1977e.js → 426156137f279d979ddd.js} +1 -1
  43. package/assets/esri/core/workers/chunks/4517630bf869205bab87.js +1 -0
  44. package/assets/esri/core/workers/chunks/48f1c3a7c9f16d6896f6.js +1 -0
  45. package/assets/esri/core/workers/chunks/{cfd28eba44cf5a296c6d.js → 49308bdc36373555f1af.js} +1 -1
  46. package/assets/esri/core/workers/chunks/5075e85e1eafd431a8c0.js +1 -0
  47. package/assets/esri/core/workers/chunks/5121768c70f1e03b685c.js +1 -0
  48. package/assets/esri/core/workers/chunks/5201105ca11a2d450460.js +1 -0
  49. package/assets/esri/core/workers/chunks/528ed0bd8dc149ead023.js +1 -0
  50. package/assets/esri/core/workers/chunks/52f354bf80ee5ab0379a.js +1 -0
  51. package/assets/esri/core/workers/chunks/538537f9bc866d9caa75.js +1 -0
  52. package/assets/esri/core/workers/chunks/58a7cdebc3d182c15ec6.js +1 -0
  53. package/assets/esri/core/workers/chunks/58ac245ff7fb57c1004f.js +1 -0
  54. package/assets/esri/core/workers/chunks/58acc18b92533166135d.js +1 -0
  55. package/assets/esri/core/workers/chunks/597aa39cdb5366ef9a74.js +1 -0
  56. package/assets/esri/core/workers/chunks/5bfae465872760e7af6d.js +1 -0
  57. package/assets/esri/core/workers/chunks/5cb274e5759f7ca0d4ed.js +1 -0
  58. package/assets/esri/core/workers/chunks/5d3ddbf94539cb4f493e.js +1 -0
  59. package/assets/esri/core/workers/chunks/{542f5469f7b42026b24f.js → 5d62d1920e3e35fc0192.js} +1 -1
  60. package/assets/esri/core/workers/chunks/5dd441db1e74dc9b56e9.js +1 -0
  61. package/assets/esri/core/workers/chunks/630ad47857de3cf726d1.js +1 -0
  62. package/assets/esri/core/workers/chunks/64114a7d2da162987958.js +1 -0
  63. package/assets/esri/core/workers/chunks/6821462e5c1e9c76010a.js +1 -0
  64. package/assets/esri/core/workers/chunks/684d3cb4fb233180b2d0.js +1 -0
  65. package/assets/esri/core/workers/chunks/686c51fd2144e132783e.js +1 -0
  66. package/assets/esri/core/workers/chunks/68f9b2da1fd08785320f.js +2 -0
  67. package/assets/esri/core/workers/chunks/69e98de578f467a35054.js +1 -0
  68. package/assets/esri/core/workers/chunks/6a3d207308b29651f397.js +1 -0
  69. package/assets/esri/core/workers/chunks/6aabde21b0b376d95888.js +1 -0
  70. package/assets/esri/core/workers/chunks/6c6396bfcdab12e68deb.js +1 -0
  71. package/assets/esri/core/workers/chunks/6d616b66fb32904b55a1.js +1 -0
  72. package/assets/esri/core/workers/chunks/{bcb021a167580bb1619f.js → 6ef3b8d67b498d655a99.js} +1 -1
  73. package/assets/esri/core/workers/chunks/6f125b4ed06c0022dee6.js +1 -0
  74. package/assets/esri/core/workers/chunks/6f4825c3ef1fe202ab82.js +1 -0
  75. package/assets/esri/core/workers/chunks/6f5d61f734ec40dafabb.js +1 -0
  76. package/assets/esri/core/workers/chunks/{fce7995c26953bfd8d3d.js → 70229007d594536ba6a3.js} +1 -1
  77. package/assets/esri/core/workers/chunks/71e55381fdff3fc2542e.js +1 -0
  78. package/assets/esri/core/workers/chunks/{90953a827bc89d0e6bd5.js → 72cfb186e50537bcdd19.js} +1 -1
  79. package/assets/esri/core/workers/chunks/72d67cc3a382e83bf1a2.js +1 -0
  80. package/assets/esri/core/workers/chunks/7748743d4be047094d67.js +1 -0
  81. package/assets/esri/core/workers/chunks/78c53aeb0a408ab3c80c.js +1 -0
  82. package/assets/esri/core/workers/chunks/7b5c1030a7cf0f382cc4.js +1 -0
  83. package/assets/esri/core/workers/chunks/7cee81c5aa1e6b7d2452.js +1 -0
  84. package/assets/esri/core/workers/chunks/7e89cb9ff615742e0894.js +1 -0
  85. package/assets/esri/core/workers/chunks/80f4f686ce403cb2693f.js +1 -0
  86. package/assets/esri/core/workers/chunks/{8477b5fdd99c6ac5c27b.js → 851705cf276eae8d4d37.js} +1 -1
  87. package/assets/esri/core/workers/chunks/89e09276086745aa21fa.js +1 -0
  88. package/assets/esri/core/workers/chunks/{4894997bfa438f66da36.js → 8a8c5e5ce457ca004687.js} +1 -1
  89. package/assets/esri/core/workers/chunks/{b79428c5093614174e76.js → 8b0a01ebc86ab226f01f.js} +1 -1
  90. package/assets/esri/core/workers/chunks/{452c01cecbbd1e370098.js → 8f93e6fc11a158d4f1ee.js} +1 -1
  91. package/assets/esri/core/workers/chunks/93bd56396b8cd020f965.js +1 -0
  92. package/assets/esri/core/workers/chunks/{359d3acb3953e64e5a78.js → 93ceb74ac88ef460fe5f.js} +1 -1
  93. package/assets/esri/core/workers/chunks/957f7b8de4aecb6f644e.js +1 -0
  94. package/assets/esri/core/workers/chunks/{875cce0be4f6c89f80f3.js → 9629601de5e44ffe90ea.js} +2 -2
  95. package/assets/esri/core/workers/chunks/976ab2be6c244768c08a.js +1 -0
  96. package/assets/esri/core/workers/chunks/{e785f76c1a75cb1d1e1f.js → 99101789035f1787c630.js} +1 -1
  97. package/assets/esri/core/workers/chunks/99e5296192ab98fd0d99.js +1 -0
  98. package/assets/esri/core/workers/chunks/9d5f7573bfe3b051daf1.js +1 -0
  99. package/assets/esri/core/workers/chunks/a0c00c6fe60db49b3ab9.js +1 -0
  100. package/assets/esri/core/workers/chunks/a2247f4c3116efb16c4f.js +1 -0
  101. package/assets/esri/core/workers/chunks/a4245bd4e67a428fd835.js +1 -0
  102. package/assets/esri/core/workers/chunks/a442534ac0956a68b769.js +1 -0
  103. package/assets/esri/core/workers/chunks/a4e9a17dacbb52444d75.js +1 -0
  104. package/assets/esri/core/workers/chunks/{8bdca6f06c8b5fedd917.js → a5abba59e738c3240c22.js} +1 -1
  105. package/assets/esri/core/workers/chunks/{62dfbdc847be4800e833.js → a9a1293b1d5302fb3b54.js} +8 -12
  106. package/assets/esri/core/workers/chunks/a9fc53ae040320e49834.js +1 -0
  107. package/assets/esri/core/workers/chunks/aa118c1bcd922b8ac328.js +1 -0
  108. package/assets/esri/core/workers/chunks/aae0049c2c3e15a813e8.js +1 -0
  109. package/assets/esri/core/workers/chunks/ac33b10fe65f9e9e824f.js +1 -0
  110. package/assets/esri/core/workers/chunks/adc32f6b45ea3026fc34.js +1 -0
  111. package/assets/esri/core/workers/chunks/af31e62499d45bdab3c3.js +1 -0
  112. package/assets/esri/core/workers/chunks/b22a1c98271c2e4d8808.js +1 -0
  113. package/assets/esri/core/workers/chunks/{9f4681713f03365a2a53.js → b666027b9022fa346a79.js} +1 -1
  114. package/assets/esri/core/workers/chunks/b73c146d3e550eaf07eb.js +1 -0
  115. package/assets/esri/core/workers/chunks/c0cbc50e5afd68bd485c.js +1 -0
  116. package/assets/esri/core/workers/chunks/c2a65de34f6a6c89c652.js +1 -0
  117. package/assets/esri/core/workers/chunks/c357c0a08b99c1e7f290.js +1 -0
  118. package/assets/esri/core/workers/chunks/{4a23b27bfbcfa08fd9a7.js → c3cf9e6e91f71c9cc5f3.js} +1 -1
  119. package/assets/esri/core/workers/chunks/c3ff2ff0a86a9143d7a5.js +1 -0
  120. package/assets/esri/core/workers/chunks/{e545df5ea7c0ced92cee.js → c424a66f1546275e2bcb.js} +1 -1
  121. package/assets/esri/core/workers/chunks/c60b4f2dd5fccdf362a7.js +1 -0
  122. package/assets/esri/core/workers/chunks/c6d0b4875b6b8d6bc25a.js +1 -0
  123. package/assets/esri/core/workers/chunks/c911f0b5bdd43b66b731.js +1 -0
  124. package/assets/esri/core/workers/chunks/c9a4601073e1a3eee9d0.js +1 -0
  125. package/assets/esri/core/workers/chunks/ccffaba50674adba7a0f.js +1 -0
  126. package/assets/esri/core/workers/chunks/{24646a1176ce34039155.js → cdf6ad970dc1893dac58.js} +1 -1
  127. package/assets/esri/core/workers/chunks/d13e003c9293cb7e2852.js +1 -0
  128. package/assets/esri/core/workers/chunks/d24e027bb8b2c09f25c8.js +1 -0
  129. package/assets/esri/core/workers/chunks/d2df8c328054dc6cb7b7.js +1 -0
  130. package/assets/esri/core/workers/chunks/d5c35a75fd4c41def420.js +1 -0
  131. package/assets/esri/core/workers/chunks/{5e3e0d7b85dfd52d1c7d.js → d78b7cac322755e87eb8.js} +1 -1
  132. package/assets/esri/core/workers/chunks/d7be278aed1fb37ad5ec.js +1 -0
  133. package/assets/esri/core/workers/chunks/d9695794cfaa014a55b1.js +1 -0
  134. package/assets/esri/core/workers/chunks/da1e8b338ab9fe9e0a8e.js +1 -0
  135. package/assets/esri/core/workers/chunks/e1bf87077541da6853c6.js +1 -0
  136. package/assets/esri/core/workers/chunks/e279bcbe4f10e87bde6c.js +1 -0
  137. package/assets/esri/core/workers/chunks/e4406baf206b9e4c7e4f.js +1 -0
  138. package/assets/esri/core/workers/chunks/e499252cb52f7aed49a0.js +1 -0
  139. package/assets/esri/core/workers/chunks/{e178cd0e9178d6716410.js → e5837e5ac6ef761f26a2.js} +1 -1
  140. package/assets/esri/core/workers/chunks/e6a7272b59a4c2e34dca.js +1 -0
  141. package/assets/esri/core/workers/chunks/e912b515704e20313e53.js +1 -0
  142. package/assets/esri/core/workers/chunks/eac683a37339aa558455.js +1 -0
  143. package/assets/esri/core/workers/chunks/ec1841e6e498d54012eb.js +1 -0
  144. package/assets/esri/core/workers/chunks/ed3d16a5b4084ef61f8a.js +1 -0
  145. package/assets/esri/core/workers/chunks/ee07f54bc77fe9f8575a.js +1 -0
  146. package/assets/esri/core/workers/chunks/{e094364e54981c91e1b4.js → eeea5710275c967e8d51.js} +1 -1
  147. package/assets/esri/core/workers/chunks/ef46ef4f0ee9f2aeaa4a.js +1 -0
  148. package/assets/esri/core/workers/chunks/efb4aa5886730ea377bd.js +1 -0
  149. package/assets/esri/core/workers/chunks/{485d20152495c27b8074.js → f2a268c69f2a5566381b.js} +1 -1
  150. package/assets/esri/core/workers/chunks/f590db684d88e72bd79b.js +1 -0
  151. package/assets/esri/core/workers/chunks/f69df22a5c64389ebe28.js +1 -0
  152. package/assets/esri/core/workers/chunks/{f60292d97bcdbf19165b.js → f6d047358d14328f3622.js} +1 -1
  153. package/assets/esri/core/workers/chunks/f7fca88d120d45bb782a.js +1 -0
  154. package/assets/esri/core/workers/chunks/f819854098d63fe4ccdb.js +1 -0
  155. package/assets/esri/core/workers/chunks/f8f3579d0c1b65762902.js +1 -0
  156. package/assets/esri/core/workers/chunks/f98118127469449ca145.js +1 -0
  157. package/assets/esri/core/workers/chunks/f9ed05d4ad1f44d033bb.js +1 -0
  158. package/assets/esri/core/workers/chunks/fb6605be0c5e36785543.js +1 -0
  159. package/assets/esri/core/workers/chunks/fbe7dae0b4bf2d172487.js +1 -0
  160. package/assets/esri/core/workers/chunks/fc4d9be62cf5e9758842.js +1 -0
  161. package/assets/esri/core/workers/chunks/fd70a25ffdf2cc6c5be2.js +1 -0
  162. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  163. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  164. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  165. package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
  166. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +38 -8
  167. package/assets/esri/themes/dark/main.css +1 -1
  168. package/assets/esri/themes/light/main.css +1 -1
  169. package/assets/esri/themes/light/view.css +1 -1
  170. package/chunks/GlowComposition.glsl.js +2 -2
  171. package/chunks/bundle2.js +1 -1
  172. package/chunks/lyr3DMain.js +1 -1
  173. package/chunks/lyr3DWorker.js +1 -1
  174. package/chunks/vxlLayer.js +1 -1
  175. package/config.js +1 -1
  176. package/core/screenUtils.js +1 -1
  177. package/core/sql.d.ts +1 -1
  178. package/geometry/Extent.d.ts +0 -13
  179. package/geometry/Geometry.d.ts +10 -8
  180. package/geometry/Multipoint.d.ts +9 -0
  181. package/geometry/Multipoint.js +1 -1
  182. package/geometry/Point.d.ts +15 -71
  183. package/geometry/Polygon.js +1 -1
  184. package/geometry/support/geometryUtils.js +1 -1
  185. package/graphic/AnnotationGraphicOrigin.d.ts +34 -0
  186. package/graphic/AnnotationGraphicOrigin.js +2 -0
  187. package/graphic/DimensionFeatureGraphicOrigin.d.ts +34 -0
  188. package/graphic/DimensionFeatureGraphicOrigin.js +2 -0
  189. package/identity/IdentityManagerBase.js +1 -1
  190. package/interfaces.d.ts +10 -0
  191. package/kernel.js +1 -1
  192. package/layers/AnnotationLayer.d.ts +263 -32
  193. package/layers/AnnotationLayer.js +1 -1
  194. package/layers/DimensionFeatureLayer.d.ts +263 -32
  195. package/layers/DimensionFeatureLayer.js +1 -1
  196. package/layers/FeatureLayer.d.ts +1 -1
  197. package/layers/GeoJSONLayer.d.ts +7 -7
  198. package/layers/SceneLayer.d.ts +4 -2
  199. package/layers/VideoLayer.d.ts +7 -1
  200. package/layers/VideoLayer.js +1 -1
  201. package/layers/catalog/CatalogFootprintLayer.d.ts +40 -10
  202. package/layers/graphics/sources/parquet/FileProvider.js +1 -1
  203. package/layers/graphics/sources/parquet/ParquetFileInfo.js +2 -0
  204. package/layers/graphics/sources/parquet/ParquetFileStatistics.js +2 -0
  205. package/layers/graphics/sources/parquet/PortalParquetFileProvider.js +1 -1
  206. package/layers/graphics/sources/parquet/PortalParquetLayerFileProvider.js +1 -1
  207. package/layers/graphics/sources/parquet/UrlsFileProvider.js +1 -1
  208. package/layers/graphics/sources/parquet/createFileProvider.js +1 -1
  209. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  210. package/layers/mixins/FeatureLayerBase.d.ts +40 -16
  211. package/layers/mixins/TemporalLayer.d.ts +4 -2
  212. package/layers/support/AnnotationSublayer.d.ts +44 -0
  213. package/layers/support/AnnotationSublayer.js +2 -0
  214. package/layers/support/commonProperties.js +1 -1
  215. package/layers/support/featureLayerUtils.js +1 -1
  216. package/layers/support/layerUtils.js +1 -1
  217. package/layers/support/parquetUtils.js +1 -1
  218. package/layers/support/tiles3DUtils.js +1 -1
  219. package/layers/support/timeSeriesUtils.js +1 -1
  220. package/layers/video/types.d.ts +61 -1
  221. package/libs/parquet/parquet.js +1 -1
  222. package/package.json +1 -1
  223. package/request/types.d.ts +18 -20
  224. package/support/revision.js +1 -1
  225. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  226. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
  227. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPolygonShader.js +1 -1
  228. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  229. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexOutlineFillShader.js +1 -1
  230. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapAccumulateShader.js +1 -1
  231. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
  232. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
  233. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  234. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  235. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  236. package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
  237. package/views/2d/layers/GraphicsLayerView2D.js +1 -1
  238. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  239. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  240. package/views/2d/layers/KMLLayerView2D.js +1 -1
  241. package/views/2d/layers/MapNotesLayerView2D.js +1 -1
  242. package/views/2d/layers/MediaLayerView2D.js +1 -1
  243. package/views/2d/layers/RouteLayerView2D.js +1 -1
  244. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
  245. package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
  246. package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
  247. package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
  248. package/views/2d/layers/graphics/GraphicStore.js +1 -1
  249. package/views/2d/support/hitTestUtils.js +1 -1
  250. package/views/3d/analysis/LineOfSight/LineOfSightAggregateManipulatedObject3D.js +2 -0
  251. package/views/3d/analysis/LineOfSight/LineOfSightAuthoringUtils.js +1 -1
  252. package/views/3d/analysis/LineOfSight/LineOfSightConfiguration.js +1 -1
  253. package/views/3d/analysis/LineOfSight/LineOfSightManipulators.js +1 -1
  254. package/views/3d/analysis/LineOfSight/LineOfSightObserverPlugin.js +1 -1
  255. package/views/3d/analysis/LineOfSight/LineOfSightPlacementLeafPlugin.js +2 -0
  256. package/views/3d/analysis/LineOfSight/LineOfSightPlacementTool.js +1 -1
  257. package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +2 -0
  258. package/views/3d/analysis/LineOfSight/LineOfSightRootPlugin.js +1 -1
  259. package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
  260. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  261. package/views/3d/analysis/LineOfSight/LineOfSightTool2.js +1 -1
  262. package/views/3d/analysis/Viewshed/ViewshedSnappingController.js +1 -1
  263. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  264. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  265. package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
  266. package/views/3d/interactive/editingTools/reshape/isSupportedObject.js +1 -1
  267. package/views/3d/interactive/editingTools/reshape/reshapeTooltipUtils3D.js +1 -1
  268. package/views/3d/interactive/editingTools/visualElementUtils.js +1 -1
  269. package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
  270. package/views/3d/layers/FlowSubView3D.js +1 -1
  271. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  272. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  273. package/views/3d/terrain/OverlayManager.js +1 -1
  274. package/views/3d/webgl/RenderNode.d.ts +25 -4
  275. package/views/3d/webgl-engine/shaders/ToneMapping.glsl.js +6 -10
  276. package/views/draw/plugins/PolygonPlugin.js +1 -1
  277. package/views/interactive/interactiveToolUtils.js +1 -1
  278. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  279. package/views/interactive/snapping/LineSnapper.js +1 -1
  280. package/views/interactive/snapping/ParallelLineSnapper.js +1 -1
  281. package/views/interactive/snapping/RightAngleSnapper.js +1 -1
  282. package/views/interactive/snapping/RightAngleTriangleSnapper.js +1 -1
  283. package/views/interactive/snapping/SnappingAlgorithm.js +1 -1
  284. package/views/interactive/snapping/SnappingManager.js +1 -1
  285. package/views/interactive/snapping/snappingUtils.js +1 -1
  286. package/views/layers/FeatureLikeLayerView.d.ts +25 -1
  287. package/views/layers/FeatureLikeLayerView.js +1 -1
  288. package/views/types.d.ts +4 -4
  289. package/webdoc/support/webdocSaveUtils.js +1 -1
  290. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +10 -2
  291. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  292. package/widgets/BatchAttributeForm/ReactiveContingentValuesManager.js +1 -1
  293. package/widgets/BatchAttributeForm/attachmentUtils.d.ts +14 -0
  294. package/widgets/BatchAttributeForm/attachmentUtils.js +1 -1
  295. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  296. package/widgets/BatchAttributeForm/css.js +1 -1
  297. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +8 -6
  298. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  299. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  300. package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +1 -1
  301. package/widgets/BatchAttributeForm/inputs/support/attachmentValidationCriteriaState.d.ts +5 -0
  302. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  303. package/widgets/BatchAttributeForm/inputs/types.d.ts +8 -1
  304. package/widgets/BatchAttributeForm/interfaceUtils.js +1 -1
  305. package/widgets/BatchAttributeForm/rendered-content/RelationshipDetails.js +1 -1
  306. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  307. package/widgets/BatchAttributeForm.d.ts +9 -1
  308. package/widgets/BatchAttributeForm.js +1 -1
  309. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  310. package/widgets/FeatureTable/Grid/Column.js +1 -1
  311. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  312. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  313. package/widgets/FeatureTable/Grid/GroupColumn.js +1 -1
  314. package/widgets/FeatureTable.js +1 -1
  315. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  316. package/widgets/Print/PrintViewModel.js +1 -1
  317. package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +7 -1
  318. package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
  319. package/widgets/support/ContingentValuesManager.js +1 -1
  320. package/assets/esri/core/workers/chunks/02aaeaa988e9e7d65a7f.js +0 -1
  321. package/assets/esri/core/workers/chunks/03354ad3d74d858173b4.js +0 -1
  322. package/assets/esri/core/workers/chunks/09a4139fc6d069ab6928.js +0 -1
  323. package/assets/esri/core/workers/chunks/0a510acf50915e00c62b.js +0 -1
  324. package/assets/esri/core/workers/chunks/0a780a883abfcdf0b900.js +0 -1
  325. package/assets/esri/core/workers/chunks/0fbf9bf52ecb4cd8293b.js +0 -1
  326. package/assets/esri/core/workers/chunks/119d352dd586f2bb61ec.js +0 -1
  327. package/assets/esri/core/workers/chunks/130784a27661de6b52a5.js +0 -1
  328. package/assets/esri/core/workers/chunks/145364aa20b4435294c2.js +0 -1
  329. package/assets/esri/core/workers/chunks/1595dc499a06b23b6a96.js +0 -1
  330. package/assets/esri/core/workers/chunks/16713986893adfbc9331.js +0 -1
  331. package/assets/esri/core/workers/chunks/179c9fe4ac83b42e5976.js +0 -1
  332. package/assets/esri/core/workers/chunks/19dcae83be0fc0aced02.js +0 -1
  333. package/assets/esri/core/workers/chunks/1c64e10f966e26af6fed.js +0 -1
  334. package/assets/esri/core/workers/chunks/1eabe746481e0b228498.js +0 -1
  335. package/assets/esri/core/workers/chunks/201007cf1a91e2b126fc.js +0 -1
  336. package/assets/esri/core/workers/chunks/20d0adc678f11981059c.js +0 -1
  337. package/assets/esri/core/workers/chunks/227eff8aa4a6f5f03bc2.js +0 -1
  338. package/assets/esri/core/workers/chunks/233ff588798c8a5eedf4.js +0 -1
  339. package/assets/esri/core/workers/chunks/238478cfe493fd4a6100.js +0 -1
  340. package/assets/esri/core/workers/chunks/24647e7424798dccdaf5.js +0 -1
  341. package/assets/esri/core/workers/chunks/249616ea2d90d40a8299.js +0 -1
  342. package/assets/esri/core/workers/chunks/24d9e4f1c7b8ff0d2cce.js +0 -1
  343. package/assets/esri/core/workers/chunks/2b36a54927f5a7281da3.js +0 -1
  344. package/assets/esri/core/workers/chunks/2bcd4d395bfe6a19ccc8.js +0 -1
  345. package/assets/esri/core/workers/chunks/2c8584ec1c3c9fd5aba2.js +0 -1
  346. package/assets/esri/core/workers/chunks/2d374cc8c54a722a7afe.js +0 -1
  347. package/assets/esri/core/workers/chunks/2e11b4e9d66474a60064.js +0 -1
  348. package/assets/esri/core/workers/chunks/2fa080539d039c92ce08.js +0 -1
  349. package/assets/esri/core/workers/chunks/3109b05fe4fc40d4f25b.js +0 -1
  350. package/assets/esri/core/workers/chunks/31442f25d550ead58fc4.js +0 -1
  351. package/assets/esri/core/workers/chunks/32323b0e0fcecd8f640e.js +0 -1
  352. package/assets/esri/core/workers/chunks/330da3828eefd8d72d3f.js +0 -1
  353. package/assets/esri/core/workers/chunks/33e0130e6a40fc768978.js +0 -1
  354. package/assets/esri/core/workers/chunks/343ba5ea459e96ba79c6.js +0 -1
  355. package/assets/esri/core/workers/chunks/388e71e8f2ec41bfa5a9.js +0 -1
  356. package/assets/esri/core/workers/chunks/3a5c1c501808352857bd.js +0 -1
  357. package/assets/esri/core/workers/chunks/3aacaa1be5efeac23a37.js +0 -1
  358. package/assets/esri/core/workers/chunks/3b765a8cac9e92f644f2.js +0 -1
  359. package/assets/esri/core/workers/chunks/3bf6d55511cd7722eb93.js +0 -1
  360. package/assets/esri/core/workers/chunks/3e012cd3ca4451f89f59.js +0 -1
  361. package/assets/esri/core/workers/chunks/3fbb6ff940156a981983.js +0 -1
  362. package/assets/esri/core/workers/chunks/40910c69307e2d2d3f28.js +0 -1
  363. package/assets/esri/core/workers/chunks/40c4e14e7bb505ef10a3.js +0 -1
  364. package/assets/esri/core/workers/chunks/4104fa1ede36bcee9be5.js +0 -1
  365. package/assets/esri/core/workers/chunks/423a9882abd4a6dadf86.js +0 -1
  366. package/assets/esri/core/workers/chunks/428561df7ba6f02e2d80.js +0 -1
  367. package/assets/esri/core/workers/chunks/45323491f9005629c602.js +0 -1
  368. package/assets/esri/core/workers/chunks/46d0a25d33b5b328cfce.js +0 -1
  369. package/assets/esri/core/workers/chunks/47dd2bfecc5c4b5f10f0.js +0 -1
  370. package/assets/esri/core/workers/chunks/4845df00f6ebcce6ea3e.js +0 -1
  371. package/assets/esri/core/workers/chunks/48fcc10768d93e95a04e.js +0 -1
  372. package/assets/esri/core/workers/chunks/4a9dd9f8aa98882218f3.js +0 -1
  373. package/assets/esri/core/workers/chunks/4bfffdfbe6d467f143a4.js +0 -1
  374. package/assets/esri/core/workers/chunks/518046d2b95a7590a092.js +0 -1
  375. package/assets/esri/core/workers/chunks/54dad475dc806a38c287.js +0 -1
  376. package/assets/esri/core/workers/chunks/552945a73a95cd2a9f54.js +0 -1
  377. package/assets/esri/core/workers/chunks/5553279998ae07b60f5f.js +0 -1
  378. package/assets/esri/core/workers/chunks/58155f24f8ed6aca7a21.js +0 -1
  379. package/assets/esri/core/workers/chunks/5838f46d341d2fde42ee.js +0 -1
  380. package/assets/esri/core/workers/chunks/592a599f514de373dead.js +0 -1
  381. package/assets/esri/core/workers/chunks/5aba23584e0b230c75f5.js +0 -1
  382. package/assets/esri/core/workers/chunks/5f9bacee6fbf9ac1bca0.js +0 -1
  383. package/assets/esri/core/workers/chunks/62206d5d497b95fc4caf.js +0 -1
  384. package/assets/esri/core/workers/chunks/624b1bb269744142b835.js +0 -1
  385. package/assets/esri/core/workers/chunks/62fc3c367f736c73b0d7.js +0 -1
  386. package/assets/esri/core/workers/chunks/643c33a98f2d30a92001.js +0 -1
  387. package/assets/esri/core/workers/chunks/64daa2a714e59d22bbd4.js +0 -1
  388. package/assets/esri/core/workers/chunks/65621650a53f69f7b05a.js +0 -1
  389. package/assets/esri/core/workers/chunks/6a5356ebed70e0f8f979.js +0 -1
  390. package/assets/esri/core/workers/chunks/6c9933f948efd7923aa1.js +0 -1
  391. package/assets/esri/core/workers/chunks/6cab67fc7044ee9b863b.js +0 -1
  392. package/assets/esri/core/workers/chunks/7014e73dfd3c8baa704c.js +0 -1
  393. package/assets/esri/core/workers/chunks/75839240022b280929f7.js +0 -1
  394. package/assets/esri/core/workers/chunks/76589434d573111a8fb4.js +0 -1
  395. package/assets/esri/core/workers/chunks/767ea5b455b3823afd09.js +0 -1
  396. package/assets/esri/core/workers/chunks/77859a61d059738d057f.js +0 -1
  397. package/assets/esri/core/workers/chunks/78aa5bc6af2758da20d0.js +0 -1
  398. package/assets/esri/core/workers/chunks/7b564226def99fcf79d8.js +0 -1
  399. package/assets/esri/core/workers/chunks/7bbffe07e62897928773.js +0 -1
  400. package/assets/esri/core/workers/chunks/7cadfd7444a2a05cf2fb.js +0 -1
  401. package/assets/esri/core/workers/chunks/7df94cb985db41815fad.js +0 -2
  402. package/assets/esri/core/workers/chunks/823789261ca3338f0fa8.js +0 -1
  403. package/assets/esri/core/workers/chunks/8419934bec7723b0feef.js +0 -1
  404. package/assets/esri/core/workers/chunks/84b0b6e099d949e0fea5.js +0 -1
  405. package/assets/esri/core/workers/chunks/9133c1b7cc1c9da27deb.js +0 -1
  406. package/assets/esri/core/workers/chunks/92ab5886aa2d8b9b179f.js +0 -1
  407. package/assets/esri/core/workers/chunks/9a6e62ef984e9c5babc4.js +0 -1
  408. package/assets/esri/core/workers/chunks/9b676606bf839b7aa433.js +0 -1
  409. package/assets/esri/core/workers/chunks/9d27cc631bab8aa7479e.js +0 -1
  410. package/assets/esri/core/workers/chunks/9dcfaca1f4fa8c8026ac.js +0 -1
  411. package/assets/esri/core/workers/chunks/9f23a61c60949459c14f.js +0 -30
  412. package/assets/esri/core/workers/chunks/a03c4c0bf138734a002e.js +0 -1
  413. package/assets/esri/core/workers/chunks/a0fa60a24e58f7a47e41.js +0 -1
  414. package/assets/esri/core/workers/chunks/a261f4c22224511fdfff.js +0 -1
  415. package/assets/esri/core/workers/chunks/a2ac139d0975085279a6.js +0 -1
  416. package/assets/esri/core/workers/chunks/a806ac351ef5da04c250.js +0 -1
  417. package/assets/esri/core/workers/chunks/ab94c9f62462d7a98f6a.js +0 -1
  418. package/assets/esri/core/workers/chunks/abdb05754c50776c3edd.js +0 -1
  419. package/assets/esri/core/workers/chunks/ad488985824fbb830ed6.js +0 -1
  420. package/assets/esri/core/workers/chunks/b0ac4b0b7aec70cfe6eb.js +0 -1
  421. package/assets/esri/core/workers/chunks/bfbd1ca28ed2f263e58f.js +0 -1
  422. package/assets/esri/core/workers/chunks/c1b6de0d728d25d7905a.js +0 -1
  423. package/assets/esri/core/workers/chunks/c44be4aaba829e6d149d.js +0 -1
  424. package/assets/esri/core/workers/chunks/ca6907e14b1dde4d5c07.js +0 -1
  425. package/assets/esri/core/workers/chunks/cbbd94c53e75efc99876.js +0 -1
  426. package/assets/esri/core/workers/chunks/ce0e627a5e1cb78adce8.js +0 -1
  427. package/assets/esri/core/workers/chunks/cf7acf5acb6d322fd996.js +0 -1
  428. package/assets/esri/core/workers/chunks/d21480b078ec9680d4c4.js +0 -1
  429. package/assets/esri/core/workers/chunks/d81291dac1932350eccd.js +0 -1
  430. package/assets/esri/core/workers/chunks/da3c54e27a808f4fcc18.js +0 -1
  431. package/assets/esri/core/workers/chunks/dc6d50e1097a920ff820.js +0 -1
  432. package/assets/esri/core/workers/chunks/dd58286dde3b20356f84.js +0 -1
  433. package/assets/esri/core/workers/chunks/dfeddb7b17fa9eaae64c.js +0 -1
  434. package/assets/esri/core/workers/chunks/e4e0c5a45cf32973d5d5.js +0 -1
  435. package/assets/esri/core/workers/chunks/e638391801ad83fe4a68.js +0 -1
  436. package/assets/esri/core/workers/chunks/e755477dc78e9d6038d4.js +0 -1
  437. package/assets/esri/core/workers/chunks/e7712467db46e1385cf4.js +0 -1
  438. package/assets/esri/core/workers/chunks/ed2cb60e4f17f46fb78d.js +0 -1
  439. package/assets/esri/core/workers/chunks/edb55329305becdb204f.js +0 -1
  440. package/assets/esri/core/workers/chunks/f02fe24177e56a7e42b2.js +0 -1
  441. package/assets/esri/core/workers/chunks/f1fb2f12371f4c562079.js +0 -1
  442. package/assets/esri/core/workers/chunks/f3dfe1bd1146a6927407.js +0 -1
  443. package/assets/esri/core/workers/chunks/ff48334528d2554db4fe.js +0 -1
  444. package/views/3d/analysis/LineOfSight/LineOfSightAuthoringStore.js +0 -2
  445. /package/assets/esri/core/workers/chunks/{7df94cb985db41815fad.js.LICENSE.txt → 68f9b2da1fd08785320f.js.LICENSE.txt} +0 -0
  446. /package/assets/esri/core/workers/chunks/{875cce0be4f6c89f80f3.js.LICENSE.txt → 9629601de5e44ffe90ea.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../core/Collection.js";import t from"../../core/Error.js";import{JSONMap as o}from"../../core/jsonMap.js";import r from"../../geometry/SpatialReference.js";import{createFileProvider as i}from"../graphics/sources/parquet/createFileProvider.js";import n from"./Field.js";import{isNumericField as s}from"./fieldUtils.js";import a from"./GeometryEncodingLocation.js";import l from"./GeometryEncodingWkb.js";import{inferLocationInfo as p}from"./locationUtils.js";import c from"./ParquetFilesData.js";import{createParquetFile as u,readGeoMetadata as m,readGeodisplayMetadata as d}from"../../libs/parquet/parquet.js";const f=new o({esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint"}),y=new Set(["uncompressed","snappy","gzip"]);function g(e){return f.toJSON(e)}function w(e){return f.fromJSON(e)}async function h(t,o={}){const r=Array.isArray(t)?new c({urls:new e(t)}):t,n=await k(r,o);return q(i(n,()=>o.customParameters),{data:r})}async function q(e,o){if(o.geometryType&&o.spatialReference&&o.geometryEncoding&&o.fields)return o;const i=await e.getFileList();if(!i.length)throw new t("parquet:bad-input","At least one url must be specified");const a=await u(i[0],{provider:e});for(const r of a.compressionCodecs())if(!y.has(r))throw new t("parquet:unsupported",`Compression codec ${r} is unsupported. Must be of type ${Array.from(y).join(",")}`);const l=m(a),p={...o,file:a};if(null==p.fields&&(p.fields=a.fields(!1).map(e=>n.fromJSON({name:e.name,alias:e.name,type:e.type}))),null!=p.geometryEncoding){const e=p.geometryEncoding;switch(e.type){case"wkb":{const o=p.fields.find(t=>t.name===e.field);if(!o)throw new t("parquet:unsupported",`Geometry encoding references field ${e.field} which does not exist`);if("blob"!==o.type)throw new t("parquet:unsupported",`Invalid field type for geometry encoding. Found ${o.type} but expected 'blob'`);break}case"location":for(const o of[e.xField,e.yField])if(null!=o){const e=p.fields.find(e=>e.name===o);if(!e)throw new t("parquet:unsupported",`Geometry encoding references field ${o} which does not exist`);if(!s(e))throw new t("parquet:unsupported",`Invalid field type for location geometry encoding. Found ${e.type} but expected a numeric`)}}}null==p.geometryEncoding&&(p.geometryEncoding=b(l,p.fields));const c=d(a);if(c&&(p.displayOptimization=c),p.geometryEncoding)switch(p.geometryEncoding.type){case"location":null==p.spatialReference&&(p.spatialReference=r.WGS84),null==p.geometryType&&(p.geometryType="point");break;case"wkb":{if(!l)return p;const e=l.primary_column,t=l.columns[e];if(p.geometryType||(p.geometryType=j(t)),p.spatialReference||(p.spatialReference=F(t)),p.fields)for(const o of Object.keys(l.columns))p.fields=p.fields.filter(e=>e.name!==o)}}if(p.displayOptimization){const e=p.displayOptimization.index;if(!p.spatialReference&&e.wkid&&(p.spatialReference=new r({wkid:e.wkid})),!p.geometryType)switch(e.type){case"z":p.geometryType="point";break;case"xz":p.geometryType=e.geometryType}}return p}function b(e,t){if(null!=e){const t=e.primary_column,o=e.columns[t];return new l({field:t,orientation:"counterclockwise"===o.orientation?"counter-clockwise":null})}const o=t.filter(e=>s(e)).map(e=>e.name),r=p(o);return r.latitudeFieldName&&r.longitudeFieldName?new a({xField:r.longitudeFieldName,yField:r.latitudeFieldName}):null}function P(e){switch(e){case"Point":return"point";case"Polygon":case"MultiPolygon":return"polygon";case"LineString":return"polyline";case"MultiPoint":return"multipoint";default:return null}}function j(e){const{geometry_types:o}=e,r=new Set;for(const t of o){const e=P(t);e&&r.add(e)}if(r.size>1)throw new t("parquet:unsupported","Parquet mixed geometry types are not supported",{geometryTypes:r});return 1===r.size?r.values().next().value:void 0}function F(e){const t=e.crs?.id?.code;return t&&"number"==typeof t?new r({wkid:t}):void 0}async function k(e,o){switch(e.type){case"files":return{type:"urls",urls:e.urls.toArray()};case"portal-item":{const r=await e.portalItem.load(o);switch(r.type){case"Apache Parquet":return{type:"portal-parquet-file",itemUrl:r.itemUrl,itemCdnUrl:r.itemCdnUrl,modified:r.modified,size:r.size};case"Parquet layer":case"Parquet Layer":case"Parquet feature layer":case"Parquet Feature Layer":if(!r.url)throw new t("parquet:bad-item",`Item of type ${r.type} must have a url defined`,r);return{type:"portal-parquet-layer",itemUrl:r.itemUrl,itemCdnUrl:r.itemCdnUrl,itemMetadata:{modified:r.modified,url:r.url}};default:throw new t("parquet:bad-item",`Item of type ${r.type} is not supported`,r)}}}}export{q as completeParquetLayerInfo,k as createFileProviderSchema,w as fromParquetJSONGeometryType,h as getParquetLayerInfo,f as parquetGeometryTypeKebabDict,g as toParquetJSONGeometryType};
2
+ import e from"../../core/Collection.js";import t from"../../core/Error.js";import{JSONMap as r}from"../../core/jsonMap.js";import o from"../../geometry/SpatialReference.js";import{createFileProvider as i}from"../graphics/sources/parquet/createFileProvider.js";import n from"./Field.js";import{isNumericField as a}from"./fieldUtils.js";import{fromParquetGeometryEncodingJSON as l}from"./parquetEncodingUtils.js";import s from"./ParquetFilesData.js";const p=new r({esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint"});function m(e){return p.toJSON(e)}function d(e){return p.fromJSON(e)}async function u(t,r={}){const o=Array.isArray(t)?new s({urls:new e(t)}):t,n=await y(o,r),a=i(n,null,()=>r.customParameters);return f(await a.getMetadata(),{data:o})}async function f(e,r){if(r.geometryType&&r.spatialReference&&r.geometryEncoding&&r.fields)return r;if(!e)throw new t("parquet:bad-input","No metadata found");const i={...r};if(null==i.fields&&(i.fields=e.fields.map(e=>n.fromJSON(e))),null!=i.geometryEncoding){const e=i.geometryEncoding;switch(e.type){case"wkb":{const r=i.fields.find(t=>t.name===e.field);if(!r)throw new t("parquet:unsupported",`Geometry encoding references field ${e.field} which does not exist`);if("blob"!==r.type)throw new t("parquet:unsupported",`Invalid field type for geometry encoding. Found ${r.type} but expected 'blob'`);break}case"location":for(const r of[e.xField,e.yField])if(null!=r){const e=i.fields.find(e=>e.name===r);if(!e)throw new t("parquet:unsupported",`Geometry encoding references field ${r} which does not exist`);if(!a(e))throw new t("parquet:unsupported",`Invalid field type for location geometry encoding. Found ${e.type} but expected a numeric`)}}}return null==i.geometryEncoding&&(i.geometryEncoding=e.geometryEncoding?l(e.geometryEncoding):null),i.fields=c(i.fields,e),e.displayOptimization&&(i.displayOptimization=e.displayOptimization),!i.geometryType&&e.geometryType&&(i.geometryType=d(e.geometryType)),!i.spatialReference&&e.spatialReference&&(i.spatialReference=o.fromJSON(e.spatialReference)),i}function c(e,t){const r=t.geoMetadata;if(null==r)return e;const o=new Set(Object.keys(r.columns));return e.filter(e=>!o.has(e.name))}async function y(e,r){switch(e.type){case"files":return{type:"urls",urls:e.urls.toArray()};case"portal-item":{const o=await e.portalItem.load(r);switch(o.type){case"Apache Parquet":return{type:"portal-parquet-file",itemUrl:o.itemUrl,itemCdnUrl:o.itemCdnUrl,modified:o.modified,size:o.size};case"Parquet layer":case"Parquet Layer":case"Parquet feature layer":case"Parquet Feature Layer":if(!o.url)throw new t("parquet:bad-item",`Item of type ${o.type} must have a url defined`,o);return{type:"portal-parquet-layer",itemUrl:o.itemUrl,itemCdnUrl:o.itemCdnUrl,itemMetadata:{modified:o.modified,url:o.url}};default:throw new t("parquet:bad-item",`Item of type ${o.type} is not supported`,o)}}}}export{f as completeParquetLayerInfo,y as createFileProviderSchema,d as fromParquetJSONGeometryType,u as getParquetLayerInfo,p as parquetGeometryTypeKebabDict,m as toParquetJSONGeometryType};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{rad2deg as e}from"../../core/mathUtils.js";import{subtract as t,add as r,transformMat4 as n,copy as i,min as o,max as s,sub as m}from"../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as h,create as l}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{WGS84ECEFSpatialReferenceLike as a}from"../../geometry/ellipsoidUtils.js";import c from"../../geometry/Extent.js";import g from"../../geometry/HeightModelInfo.js";import f from"../../geometry/SpatialReference.js";import{projectBuffer as u}from"../../geometry/projection/projectBuffer.js";const x=new f({wkid:4326,vcsWkid:115700}),d=new c(-180,-90,180,90,x);function S(e,t){if(!Array.isArray(e)||e.length<t)return!1;for(const r of e)if("number"!=typeof r)return!1;return!0}const p=7645211,R={xmin:-180,ymin:-90,zmin:-450,xmax:180,ymax:90,zmax:8850},_=new Map([[5773,new g({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"EGM96_Geoid"})],[3855,new g({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"EGM2008_Geoid"})],[115700,new g({heightModel:"ellipsoidal",heightUnit:"meters",vertCRS:"WGS_1984"})],[115701,new g({heightModel:"ellipsoidal",heightUnit:"meters",vertCRS:"ETRS_1989"})],[6360,new g({heightModel:"gravity-related-height",heightUnit:"us-feet",vertCRS:"NAVD88_height_(ftUS)"})],[7837,new g({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"DHHN2016_(height)"})],[5709,new g({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"NAP"})]]);function w(e){let t=null;return e?(_.forEach((r,n)=>{t||r.vertCRS!==e.vertCRS||r.heightUnit!==e.heightUnit||(t=n)}),t):t}function E(e){if(!e)return null;const t=e.vcsWkid||e.latestVcsWkid;return t?_.get(t):null}function b(e){return!(!(e.extensions?.ESRI_crs?.wkid||e.extensions?.ESRI_crs?.latestWkid||e.extensions?.ESRI_crs?.wkt)||!e.root?.extensions?.ESRI_crs?.boundingVolume?.box&&!e.root?.extensions?.ESRI_crs?.boundingVolume?.sphere)}function y(g,x=!1){let d=new f({wkid:4326,vcsWkid:115700}),_=g.root?.boundingVolume,w=!1,E=g?.root?.transform;if(x&&(g.extensions?.ESRI_crs?.wkid||g.extensions?.ESRI_crs?.latestWkid||g.extensions?.ESRI_crs?.wkt)&&(g.root?.extensions?.ESRI_crs?.boundingVolume?.box||g.root?.extensions?.ESRI_crs?.boundingVolume?.sphere))d=new f(g.extensions?.ESRI_crs),_=g.root?.extensions?.ESRI_crs?.boundingVolume,E=g.root?.transform,w=!0;else if(!_)return new c(-180,-90,180,90,d);if(_.box){const e=_?.box;if(e[3]>p&&e[7]>p&&e[11]>p)return new c({...R,spatialReference:d})}const b=l();if(!w&&_.region&&S(_.region,6)){const t=_.region,r=e(t[0]),n=e(t[1]),i=t[4],o=e(t[2]),s=e(t[3]),m=t[5];return new c({xmin:r,ymin:n,zmin:i,xmax:o,ymax:s,zmax:m,spatialReference:d})}if(_.sphere&&S(_.sphere,4)){const e=_.sphere,m=h(e[0],e[1],e[2]),g=e[3]/Math.sqrt(3),x=l();t(x,m,h(g,g,g));const p=l();if(r(p,m,h(g,g,g)),E&&S(E,16)){const e=E;n(b,x,e),i(x,b),n(b,p,e),i(p,b)}w||(u(x,a,0,x,f.WGS84,0),u(p,a,0,p,f.WGS84,0));const R=l(),y=l();return o(R,x,p),s(y,x,p),new c({xmin:R[0],ymin:R[1],zmin:R[2],xmax:y[0],ymax:y[1],zmax:y[2],spatialReference:d})}if(_.box&&S(_.box,12)){const e=_.box,t=h(e[0],e[1],e[2]),i=h(e[3],e[4],e[5]),g=h(e[6],e[7],e[8]),x=h(e[9],e[10],e[11]),p=[];for(let r=0;r<8;++r)p.push(l());if(r(p[0],t,i),r(p[0],p[0],g),r(p[0],p[0],x),m(p[1],t,i),r(p[1],p[1],g),r(p[1],p[1],x),r(p[2],t,i),m(p[2],p[2],g),r(p[2],p[2],x),m(p[3],t,i),m(p[3],p[3],g),r(p[3],p[3],x),r(p[4],t,i),r(p[4],p[4],g),m(p[4],p[4],x),m(p[5],t,i),r(p[5],p[5],g),m(p[5],p[5],x),r(p[6],t,i),m(p[6],p[6],g),m(p[6],p[6],x),m(p[7],t,i),m(p[7],p[7],g),m(p[7],p[7],x),E&&S(E,16)){const e=E;for(let t=0;t<8;++t)n(p[t],p[t],e)}const R=h(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),b=h(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE);for(let r=0;r<8;++r)w||u(p[r],a,0,p[r],f.WGS84,0),o(b,b,p[r]),s(R,R,p[r]);return new c({xmin:b[0],ymin:b[1],zmin:b[2],xmax:R[0],ymax:R[1],zmax:R[2],spatialReference:d})}return new c(-180,-90,180,90,d)}export{d as default3DTilesFullExtent,x as default3DTilesSpatialReference,E as getHeightModelInfoFromVCS,w as getVCSFromHeightModelInfo,b as hasEsriCrs,y as initFullExtent,S as verifyArray};
2
+ import{rad2deg as e}from"../../core/mathUtils.js";import{subtract as t,add as r,transformMat4 as n,copy as i,min as o,max as s,sub as m}from"../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as h,create as l}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{WGS84ECEFSpatialReferenceLike as c}from"../../geometry/ellipsoidUtils.js";import a from"../../geometry/Extent.js";import f from"../../geometry/HeightModelInfo.js";import u from"../../geometry/SpatialReference.js";import{projectBuffer as g}from"../../geometry/projection/projectBuffer.js";const x=new u({wkid:4326,vcsWkid:115700}),d=new a(-180,-90,180,90,x);function p(e,t){if(!Array.isArray(e)||e.length<t)return!1;for(const r of e)if("number"!=typeof r)return!1;return!0}const S=7645211,R={xmin:-180,ymin:-90,zmin:-450,xmax:180,ymax:90,zmax:8850},_=new Map([[5773,new f({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"EGM96_Geoid"})],[3855,new f({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"EGM2008_Geoid"})],[115700,new f({heightModel:"ellipsoidal",heightUnit:"meters",vertCRS:"WGS_1984"})],[115701,new f({heightModel:"ellipsoidal",heightUnit:"meters",vertCRS:"ETRS_1989"})],[6360,new f({heightModel:"gravity-related-height",heightUnit:"us-feet",vertCRS:"NAVD88_height_(ftUS)"})],[7837,new f({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"DHHN2016_(height)"})],[5709,new f({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"NAP"})]]);function w(e){let t=null;return e?(_.forEach((r,n)=>{t||r.vertCRS!==e.vertCRS||r.heightUnit!==e.heightUnit||(t=n)}),t):t}function E(e){if(!e)return null;const t=e.vcsWkid||e.latestVcsWkid;return t?_.get(t):null}function b(e){return!(!(e.extensions?.ESRI_crs?.wkid||e.extensions?.ESRI_crs?.latestWkid||e.extensions?.ESRI_crs?.wkt)||!e.root?.extensions?.ESRI_crs?.boundingVolume?.box&&!e.root?.extensions?.ESRI_crs?.boundingVolume?.sphere)}function y(f,x=!1){let d=new u({wkid:4326,vcsWkid:115700}),_=f.root?.boundingVolume,w=!1,E=f?.root?.transform;if(x&&(f.extensions?.ESRI_crs?.wkid||f.extensions?.ESRI_crs?.latestWkid||f.extensions?.ESRI_crs?.wkt)&&(f.root?.extensions?.ESRI_crs?.boundingVolume?.box||f.root?.extensions?.ESRI_crs?.boundingVolume?.sphere))d=new u(f.extensions?.ESRI_crs),_=f.root?.extensions?.ESRI_crs?.boundingVolume,E=f.root?.transform,w=!0;else if(!_)return new a(-180,-90,180,90,d);if(_.box){const e=_?.box;if(e[3]>S&&e[7]>S&&e[11]>S)return new a({...R,spatialReference:d})}const b=l();if(!w&&_.region&&p(_.region,6)){const t=_.region,r=e(t[0]),n=e(t[1]),i=t[4],o=e(t[2]),s=e(t[3]),m=t[5];return new a({xmin:r,ymin:n,zmin:i,xmax:o,ymax:s,zmax:m,spatialReference:d})}if(_.sphere&&p(_.sphere,4)){const e=_.sphere,m=h(e[0],e[1],e[2]),f=e[3]/Math.sqrt(3),x=l();t(x,m,h(f,f,f));const S=l();if(r(S,m,h(f,f,f)),E&&p(E,16)){const e=E;n(b,x,e),i(x,b),n(b,S,e),i(S,b)}w||(g(x,c,0,x,u.WGS84,0),g(S,c,0,S,u.WGS84,0));const R=l(),y=l();return o(R,x,S),s(y,x,S),new a({xmin:R[0],ymin:R[1],zmin:R[2],xmax:y[0],ymax:y[1],zmax:y[2],spatialReference:d})}if(_.box&&p(_.box,12)){const e=_.box,t=h(e[0],e[1],e[2]),i=h(e[3],e[4],e[5]),f=h(e[6],e[7],e[8]),x=h(e[9],e[10],e[11]),S=[];for(let r=0;r<8;++r)S.push(l());if(r(S[0],t,i),r(S[0],S[0],f),r(S[0],S[0],x),m(S[1],t,i),r(S[1],S[1],f),r(S[1],S[1],x),r(S[2],t,i),m(S[2],S[2],f),r(S[2],S[2],x),m(S[3],t,i),m(S[3],S[3],f),r(S[3],S[3],x),r(S[4],t,i),r(S[4],S[4],f),m(S[4],S[4],x),m(S[5],t,i),r(S[5],S[5],f),m(S[5],S[5],x),r(S[6],t,i),m(S[6],S[6],f),m(S[6],S[6],x),m(S[7],t,i),m(S[7],S[7],f),m(S[7],S[7],x),E&&p(E,16)){const e=E;for(let t=0;t<8;++t)n(S[t],S[t],e)}const R=h(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),b=h(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE);for(let r=0;r<8;++r)w||g(S[r],c,0,S[r],u.WGS84,0),o(b,b,S[r]),s(R,R,S[r]);return new a({xmin:b[0],ymin:b[1],zmin:b[2],xmax:R[0],ymax:R[1],zmax:R[2],spatialReference:d})}return new a(-180,-90,180,90,d)}function v(e){return null!=e.data&&("string"==typeof e.desc&&(e.desc=JSON.parse(e.desc)),null!=e.desc)}function M(e){return`${e}`}export{d as default3DTilesFullExtent,x as default3DTilesSpatialReference,E as getHeightModelInfoFromVCS,w as getVCSFromHeightModelInfo,b as hasEsriCrs,y as initFullExtent,M as makeCacheKey,v as validateMeshData,p as verifyArray};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- function e(e){const t=e.fieldTimeMappings??[],n=e.timeValueUnits??"years",a=t.map(({fieldName:e,timeValue:r})=>` "${r}", $feature.${e},`);return`var timeFormat = "${r(n)}";\n\nvar hasCurrentStart = HasValue($view, ["timeProperties", "currentStart"]);\nvar hasCurrentEnd = HasValue($view, ["timeProperties", "currentEnd"]);\n\nvar hasCurrentTime = hasCurrentStart || hasCurrentEnd;\n\nif (!hasCurrentTime) {\n return $feature.${t[0].fieldName};\n}\n\nvar currentTime = DefaultValue($view.timeProperties.currentEnd, $view.timeProperties.currentStart);\nvar formattedCurrentTime = Text(currentTime, timeFormat);\n\nvar result = Decode(formattedCurrentTime,\n${a.join("\n")}\n null\n);\n\nreturn result`}function r(e){switch(e){case"years":default:return"Y";case"months":return"Y-M";case"days":return"Y-M-D";case"hours":case"minutes":return"Y-M-D-H-mm";case"seconds":return"Y-M-D-H-mm-ss"}}export{e as createTimeSeriesExpression,r as getArcadeTimeFormatString};
2
+ function e(e){const t=e.fieldTimeMappings??[],n=e.timeValueUnits??"years",a=t.map(({fieldName:e,timeValue:r})=>` "${r}", $feature.${e},`);return`var timeFormat = "${r(n)}";\n\nvar hasCurrentStart = HasValue($view, ["timeProperties", "currentStart"]);\nvar hasCurrentEnd = HasValue($view, ["timeProperties", "currentEnd"]);\n\nvar hasCurrentTime = hasCurrentStart || hasCurrentEnd;\n\nif (!hasCurrentTime) {\n return $feature.${t[0].fieldName};\n}\n\nvar currentTime = DefaultValue($view.timeProperties.currentEnd, $view.timeProperties.currentStart);\nvar formattedCurrentTime = Text(currentTime, timeFormat);\n\nvar result = Decode(formattedCurrentTime,\n${a.join("\n")}\n null\n);\n\nreturn result;`}function r(e){switch(e){case"years":default:return"Y";case"months":return"Y-M";case"days":return"Y-M-D";case"hours":case"minutes":return"Y-M-D-H-mm";case"seconds":return"Y-M-D-H-mm-ss"}}export{e as createTimeSeriesExpression,r as getArcadeTimeFormatString};
@@ -113,4 +113,64 @@ export interface LivestreamStatus {
113
113
  *
114
114
  * @since 5.1
115
115
  */
116
- export interface Coverage {}
116
+ export interface Coverage {}
117
+
118
+ /**
119
+ * Defines an object that contains metadata defining layer previews information.
120
+ *
121
+ * @since 5.1
122
+ */
123
+ export interface PreviewsInfo {
124
+ /**
125
+ * The number of preview thumbnails in the sprite sheet.
126
+ *
127
+ * @since 5.1
128
+ */
129
+ count: number;
130
+ /**
131
+ * The height in pixels of each preview thumbnail in the sprite sheet.
132
+ *
133
+ * @since 5.1
134
+ */
135
+ height: number;
136
+ /**
137
+ * The time in milliseconds between each preview thumbnail in the sprite sheet.
138
+ *
139
+ * @since 5.1
140
+ */
141
+ interval: number;
142
+ /**
143
+ * The number of columns of preview thumbnails in the sprite sheet.
144
+ *
145
+ * @since 5.1
146
+ */
147
+ numCols: number;
148
+ /**
149
+ * The number of rows of preview thumbnails in the sprite sheet.
150
+ *
151
+ * @since 5.1
152
+ */
153
+ numRows: number;
154
+ /**
155
+ * An array of objects containing metadata for each preview thumbnail in
156
+ * the sprite sheet, including the time offset of each thumbnail in
157
+ * milliseconds.
158
+ *
159
+ * @since 5.1
160
+ */
161
+ thumbnailInfo: { offset: number; }[];
162
+ /**
163
+ * The URL fragment for fetching the sprite sheet containing the thumbnails.
164
+ * This URL is relative to the video source URL and can be used to construct
165
+ * the full URL to the sprite sheet.
166
+ *
167
+ * @since 5.1
168
+ */
169
+ urlFragment: string;
170
+ /**
171
+ * The width in pixels of each preview thumbnail in the sprite sheet.
172
+ *
173
+ * @since 5.1
174
+ */
175
+ width: number;
176
+ }
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../core/Error.js";import{loadParquetModule as t}from"./loadParquetModule.js";function n(t,n){switch(n){case"esriGeometryPoint":return t.GeometryType.Point;case"esriGeometryPolygon":case"polygon":return t.GeometryType.Polygon;case"esriGeometryPolyline":case"polyline":return t.GeometryType.Polyline;case"esriGeometryMultipoint":case"multipoint":return t.GeometryType.Multipoint;default:throw new e("parquet",`Found unexpected GeometryType: ${n}`)}}function o(e,t){const o=t.encoding,r=n(e,t.geometryType),i=t.spatialReference.wkid;if(null==i)throw new Error("InternalError: Wkid must be defined.");switch(o.type){case"wkb":return e.GeometryField.fromWkb(o.field,i,r);case"location":{const{yField:t,xField:n}=o;return e.GeometryField.fromLocation(t,n,i,r)}}}function r(e,t){const r=e.GeometryInfo.new();t.geometry&&r.setGeometry(o(e,t.geometry));const i=t.displayOptimization;if(i){const{index:t,parentColumn:o}=i,a=e=>null!=o?[o,e].join("."):e;if("z"===t.type){const n=e.DisplayOptimizationZBuilder.new();n.setCodeField(a(t.code)),n.setXColumn(a(t.xColumn)),n.setYColumn(a(t.yColumn)),n.setCooordinatePrecision(t.coordinatePrecision),n.setFullExtent(t.fullExtent),n.setSpatialReference(t.wkid,t.wkt),n.setHasZ(!!t.zColumn),n.setHasM(!!t.mColumn),r.setOptmizationZ(n)}if("xz"===t.type){const o=n(e,t.geometryType),i=e.DisplayOptimizationXZBuilder.new();i.setCodeField(a(t.code)),i.setEncoding(t.encoding),i.setFullExtent(t.fullExtent),i.setGeometryType(o),i.setSpatialReference(t.wkid,t.wkt),i.setMaxLevel(t.maxLevel),i.setHasZ(t.hasZ??!1),i.setHasM(t.hasM??!1);for(const n of t.levels??[]){const[t,o]=n.transform.translate,[r,l]=n.transform.scale,s=new Float64Array([t,o]),d=new Float64Array([r,l]),u=a(n.column);i.addLevel(e.MultiscaleGeometryField.new(n.level,n.scale,u,s,d))}r.setOptmizationXZ(i)}}return r}async function i(n,o){const i=await t(),a=o.geometryInfo?r(i,o.geometryInfo):null,l=o.provider.fetchRange.bind(o.provider),s=o.provider.fetchLength.bind(o.provider);try{return await i.ParquetFile.fromUrl(n,l,s,a)}catch(d){throw new e("parquet","Failed to parse file",{error:d})}}function a(e){const t=e.keyValueMetadata("geo");return null!=t?JSON.parse(t):null}function l(t){if(t.keyValueMetadata("esri"))throw new e("parquet:unsupported","File was created using an unsupported experimental display index. Please regenerate the file.");const n=t.keyValueMetadata("geodisplay");if(null!=n)return JSON.parse(n);const o=t.keyValueMetadata("org.apache.spark.sql.parquet.row.metadata");if(null!=o){const t=JSON.parse(o);for(const n of t.fields)if(null!=n.metadata&&"type"in n.metadata&&("xz"===n.metadata.type||"z"===n.metadata.type)){const t={parentColumn:n.name,index:n.metadata};if("xz"===t.index.type&&(t.index.geometryType=t.index.geometryType.toLowerCase(),"esri-pbf"===t.index.encoding&&(t.index.encoding="esriPBF"),"esriPBF"!==t.index.encoding))throw new e("parquet:unsupported",`Encoding for display index must be of type esriPBF, but found ${t.index.encoding}`);return t}}return null}export{i as createParquetFile,a as readGeoMetadata,l as readGeodisplayMetadata};
2
+ import e from"../../core/Error.js";import{latitudeFieldNames as t,longitudeFieldNames as n}from"../../layers/support/locationUtils.js";import{loadParquetModule as o}from"./loadParquetModule.js";const i=new Set(["uncompressed","snappy","gzip"]),r=new Set(["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeBigInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]);function l(t,n){switch(n){case"esriGeometryPoint":return t.GeometryType.Point;case"esriGeometryPolygon":case"polygon":return t.GeometryType.Polygon;case"esriGeometryPolyline":case"polyline":return t.GeometryType.Polyline;case"esriGeometryMultipoint":case"multipoint":return t.GeometryType.Multipoint;default:throw new e("parquet",`Found unexpected GeometryType: ${n}`)}}function a(e,t){const n=t.encoding,o=l(e,t.geometryType),i=t.spatialReference.wkid;if(null==i)throw new Error("InternalError: Wkid must be defined.");switch(n.type){case"wkb":return e.GeometryField.fromWkb(n.field,i,o);case"location":{const{yField:t,xField:r}=n;return e.GeometryField.fromLocation(t,r,i,o)}}}function s(e,t){const n=e.GeometryInfo.new();t.geometry&&n.setGeometry(a(e,t.geometry));const o=t.displayOptimization;if(o){const{index:t,parentColumn:i}=o,r=e=>null!=i?[i,e].join("."):e;if("z"===t.type){const o=e.DisplayOptimizationZBuilder.new();o.setCodeField(r(t.code)),o.setXColumn(r(t.xColumn)),o.setYColumn(r(t.yColumn)),o.setCooordinatePrecision(t.coordinatePrecision),o.setFullExtent(t.fullExtent),o.setSpatialReference(t.wkid,t.wkt),o.setHasZ(!!t.zColumn),o.setHasM(!!t.mColumn),n.setOptmizationZ(o)}if("xz"===t.type){const o=l(e,t.geometryType),i=e.DisplayOptimizationXZBuilder.new();i.setCodeField(r(t.code)),i.setEncoding(t.encoding),i.setFullExtent(t.fullExtent),i.setGeometryType(o),i.setSpatialReference(t.wkid,t.wkt),i.setMaxLevel(t.maxLevel),i.setHasZ(t.hasZ??!1),i.setHasM(t.hasM??!1);for(const n of t.levels??[]){const[t,o]=n.transform.translate,[l,a]=n.transform.scale,s=new Float64Array([t,o]),u=new Float64Array([l,a]),c=r(n.column);i.addLevel(e.MultiscaleGeometryField.new(n.level,n.scale,c,s,u))}n.setOptmizationXZ(i)}}return n}async function u(t,n){const i=await o(),r=n.geometryInfo?s(i,n.geometryInfo):null,l=n.provider.fetchRange.bind(n.provider),a=n.provider.fetchLength.bind(n.provider);try{return await i.ParquetFile.fromUrl(t,l,a,r)}catch(u){throw new e("parquet","Failed to parse file",{error:u})}}function c(e){const t=e.keyValueMetadata("geo");return null!=t?JSON.parse(t):null}function p(t){if(t.keyValueMetadata("esri"))throw new e("parquet:unsupported","File was created using an unsupported experimental display index. Please regenerate the file.");const n=t.keyValueMetadata("geodisplay");if(null!=n)return JSON.parse(n);const o=t.keyValueMetadata("org.apache.spark.sql.parquet.row.metadata");if(null!=o){const t=JSON.parse(o);for(const n of t.fields)if(null!=n.metadata&&"type"in n.metadata&&("xz"===n.metadata.type||"z"===n.metadata.type)){const t={parentColumn:n.name,index:n.metadata};if("xz"===t.index.type&&(t.index.geometryType=h(t.index.geometryType),"esri-pbf"===t.index.encoding&&(t.index.encoding="esriPBF"),"esriPBF"!==t.index.encoding))throw new e("parquet:unsupported",`Encoding for display index must be of type esriPBF, but found ${t.index.encoding}`);return t}}return null}function d(e){y(e);const t=m(e),n=c(e),o=p(e),i=f(n,t);let r,l;if(i)switch(i.type){case"location":l={wkid:4326},r="esriGeometryPoint";break;case"wkb":if(n){const e=n.primary_column,t=n.columns[e];r=w(t),l=G(t)}}if(o){const e=o.index;!l&&e.wkid&&(l={wkid:e.wkid}),r||(r="z"===e.type?"esriGeometryPoint":F(e.geometryType))}return{geoMetadata:n,displayOptimization:o,geometryEncoding:i,geometryInfo:l&&r?{geometry:i?{geometryType:r,spatialReference:l,encoding:i}:null,displayOptimization:o}:null,geometryType:r,spatialReference:l,extent:P(n,o,l),fields:t}}function y(t){for(const n of t.compressionCodecs())if(!i.has(n))throw new e("parquet:unsupported",`Compression codec ${n} is unsupported. Must be of type ${Array.from(i).join(",")}`)}function m(e){return e.fields(!1).map(e=>({name:e.name,alias:e.name,type:e.type}))}function f(e,t){if(null!=e){const t=e.primary_column;return{type:"wkb",field:t,orientation:"counterclockwise"===e.columns[t].orientation?"counter-clockwise":null}}const n=g(t.filter(e=>r.has(e.type)).map(e=>e.name));return n.latitudeFieldName&&n.longitudeFieldName?{type:"location",xField:n.longitudeFieldName,yField:n.latitudeFieldName}:null}function g(e){const o=e.map(e=>e.toLowerCase());return{longitudeFieldName:e[o.indexOf(n.find(e=>o.includes(e)))],latitudeFieldName:e[o.indexOf(t.find(e=>o.includes(e)))]}}function w(t){const{geometry_types:n}=t,o=new Set;for(const e of n){const t=x(e);t&&o.add(t)}if(o.size>1)throw new e("parquet:unsupported","Parquet mixed geometry types are not supported",{geometryTypes:o});return 1===o.size?o.values().next().value:void 0}function x(e){switch(e){case"Point":return"esriGeometryPoint";case"Polygon":case"MultiPolygon":return"esriGeometryPolygon";case"LineString":return"esriGeometryPolyline";case"MultiPoint":return"esriGeometryMultipoint";default:return null}}function F(e){switch(e){case"polygon":return"esriGeometryPolygon";case"polyline":return"esriGeometryPolyline";case"multipoint":return"esriGeometryMultipoint"}}function h(t){switch(t.toLowerCase()){case"polygon":return"polygon";case"polyline":return"polyline";case"multipoint":return"multipoint";default:throw new e("parquet:unsupported",`Geometry type ${t} is unsupported`)}}function G(e){const t=e.crs?.id?.code;return t&&"number"==typeof t?{wkid:t}:void 0}function P(t,n,o){if(!o)return null;const i=t?t.columns[t.primary_column]:null,r=i?.bbox;if(r)switch(r.length){case 4:return{xmin:r[0],ymin:r[1],xmax:r[2],ymax:r[3],spatialReference:o};case 6:return{xmin:r[0],ymin:r[1],xmax:r[3],ymax:r[4],spatialReference:o};default:throw new e("parquet:protocol-violation","Invalid Geoparquet file. BoundingBox size must be 4 or 6.",{bbox:r})}const l=n?.index.fullExtent;return l?{...l,spatialReference:o}:null}export{u as createParquetFile,c as readGeoMetadata,p as readGeodisplayMetadata,d as readMetadata};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "5.2.0-next.7",
3
+ "version": "5.2.0-next.8",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -321,7 +321,7 @@ export interface RequestParameters {
321
321
  * // use the BeforeInterceptorCallback to check if the query of the
322
322
  * // FeatureLayer has a maxAllowableOffset property set.
323
323
  * // if so, then set the maxAllowableOffset to 0
324
- * before: function(params) {
324
+ * before: (params) => {
325
325
  * if (params.requestOptions.query.maxAllowableOffset) {
326
326
  * params.requestOptions.query.maxAllowableOffset = 0;
327
327
  * }
@@ -329,7 +329,7 @@ export interface RequestParameters {
329
329
  * // use the AfterInterceptorCallback to check if `ssl` is set to 'true'
330
330
  * // on the response to the request, if it's set to 'false', change
331
331
  * // the value to 'true' before returning the response
332
- * after: function(response) {
332
+ * after: (response) => {
333
333
  * if (!response.ssl) {
334
334
  * response.ssl = true;
335
335
  * }
@@ -344,7 +344,7 @@ export interface RequestParameters {
344
344
  * urls: featureLayer.url,
345
345
  * // set the error function and check if an error occurs, and if it's name is "AbortError"
346
346
  * // if so, display a useful error about the layer, if not, ignore the error
347
- * error: function(error) {
347
+ * error: (error) => {
348
348
  * if (error.name == "AbortError") {
349
349
  * // we're only interested in aborted request errors
350
350
  * console.error(`An error happened with layer ${featureLayer.title}`, error);
@@ -415,7 +415,7 @@ export interface RequestInterceptor {
415
415
  * // use the AfterInterceptorCallback to check if `ssl` is set to 'true'
416
416
  * // on the response to the request, if it's set to 'false', change
417
417
  * // the value to 'true' before returning the response
418
- * after: function(response) {
418
+ * after: (response) => {
419
419
  * if (!response.ssl) {
420
420
  * response.ssl = true;
421
421
  * }
@@ -447,7 +447,7 @@ export type AfterInterceptorCallback = (response: RequestResponse<any>) => void;
447
447
  * // use the BeforeInterceptorCallback to check if the query of the
448
448
  * // FeatureLayer has a maxAllowableOffset property set.
449
449
  * // if so, then set the maxAllowableOffset to 0
450
- * before: function(params) {
450
+ * before: (params) => {
451
451
  * if (params.requestOptions.query.maxAllowableOffset) {
452
452
  * params.requestOptions.query.maxAllowableOffset = 0;
453
453
  * }
@@ -459,22 +459,20 @@ export type AfterInterceptorCallback = (response: RequestResponse<any>) => void;
459
459
  *
460
460
  * esriConfig.request.interceptors.push({
461
461
  * urls: wmsLayerUrl,
462
- * before: function(params) {
462
+ * before: (params) => {
463
463
  * if (params.url === url && params.requestOptions.responseType === "xml") {
464
- * if ("fetch" in window && "TextDecoder" in window) {
465
- * // decode the response as ISO-8859-1 if it's not UTF-8 as expected
466
- * return fetch(url + "?SERVICE=WMS&REQUEST=GetCapabilities")
467
- * .then(function(response) {
468
- * return response.arrayBuffer();
469
- * })
470
- * .then(function(buffer) {
471
- * let textDecoder = new TextDecoder("ISO-8859-1"); // specified in the Capabilities XML declaration
472
- * let xmlText = textDecoder.decode(buffer);
473
- * let parser = new DOMParser();
474
- * xml = parser.parseFromString(xmlText, "application/xml");
475
- * return xml;
476
- * });
477
- * }
464
+ * // decode the response as ISO-8859-1 if it's not UTF-8 as expected
465
+ * return fetch(url + "?SERVICE=WMS&REQUEST=GetCapabilities")
466
+ * .then((response) => {
467
+ * return response.arrayBuffer();
468
+ * })
469
+ * .then((buffer) => {
470
+ * let textDecoder = new TextDecoder("ISO-8859-1"); // specified in the Capabilities XML declaration
471
+ * let xmlText = textDecoder.decode(buffer);
472
+ * let parser = new DOMParser();
473
+ * let xml = parser.parseFromString(xmlText, "application/xml");
474
+ * return xml;
475
+ * });
478
476
  * }
479
477
  * }
480
478
  * });
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- const a="20260604",b="f0d9f89ba3a2742a8b37cb479094ab1fcad64ad7";export{a as buildDate,b as commitHash};
2
+ const a="20260605",c="29a0414596c027f0d26ff49791b307a2a8ac4e4b";export{a as buildDate,c as commitHash};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{defaultFontFamily as t}from"../../core/fontUtils.js";import has from"../../core/has.js";import{clone as e}from"../../core/lang.js";import r from"../../core/Logger.js";import{deg2rad as s}from"../../core/mathUtils.js";import i from"../../core/ObjectPool.js";import{px2pt as n,pt2px as o}from"../../core/screenUtils.js";import{GeometryCursor as a}from"../../geometry/GeometryCursor.js";import{fromValues as l,empty as h,expandPointInPlace as c,center as m,width as f,height as u,diagonal as d,create as g}from"../../geometry/support/aaBoundingRect.js";import{getBoundsXY as p}from"../../geometry/support/boundsUtils.js";import{polygonCentroid as _}from"../../geometry/support/centroid.js";import{segmentIntersects as y}from"../../geometry/support/intersectsBase.js";import{isPolygon as P,isPolyline as S,isExtent as x,isMultipoint as w,isPoint as M}from"../../geometry/support/jsonTypeUtils.js";import{SimpleEffectCursor as b}from"./CIMEffects.js";import k from"./CIMImageColorSubstitutionHelper.js";import{getEffectOperator as T,getPlacementOperator as C}from"./CIMOperators.js";import{Placement as v}from"./CIMPlacements.js";import{defaultCIMValues as I}from"./defaultCIMValues.js";import{getFirstFrame as R}from"./imageUtils.js";import{rotate as z}from"./mathUtils.js";import{addColorStops as L}from"./rasterizingUtils.js";import U from"./Rect.js";import F from"./TextRasterizer.js";import{getNumericValue as A,isSVGImage as j,getRelativeGradientSize as G,getEffectsInflateSize as D,fromCIMFontDecoration as H,fromCIMFontStyle as E,fromCIMHorizontalAlignment as B,fromCIMVerticalAlignment as X,getFillColor as J,getStrokeColor as N,getStrokeWidth as O,getFontWeight as q,getFontStyle as V,isCIMFill as W,getSize as Y}from"./utils.js";import{destroyHiddenSvg as K,createHiddenSvg as $,createSvgElement as Q}from"../../views/2d/engine/svgUtils.js";import{magicLabelLineHeight as Z,glyphSize as tt,hittestToleranceSmallSymbol as et,hittestSmallSymbolThreshold as rt}from"../../views/2d/engine/webgl/definitions.js";import{shapeGlyphs as st}from"../../views/2d/engine/webgl/mesh/templates/shapingUtils.js";import{roundPtToWholePixel as it,getLineWidth as nt}from"../../views/2d/layers/graphics/graphicsUtils.js";const ot=Math.PI/180,at=.5,lt=()=>r.getLogger("esri.symbols.cim.CIMSymbolDrawHelper");class ht{constructor(t){this._t=t}static createIdentity(){return new ht([1,0,0,0,1,0])}clone(){const t=this._t;return new ht(t.slice())}transform(t){const e=this._t;return[e[0]*t[0]+e[1]*t[1]+e[2],e[3]*t[0]+e[4]*t[1]+e[5]]}static createScale(t,e){return new ht([t,0,0,0,e,0])}scale(t,e){const r=this._t;return r[0]*=t,r[1]*=t,r[2]*=t,r[3]*=e,r[4]*=e,r[5]*=e,this}scaleRatio(){return Math.sqrt(this._t[0]*this._t[0]+this._t[1]*this._t[1])}static createTranslate(t,e){return new ht([0,0,t,0,0,e])}translate(t,e){const r=this._t;return r[2]+=t,r[5]+=e,this}static createRotate(t){const e=Math.cos(t),r=Math.sin(t);return new ht([e,-r,0,r,e,0])}rotate(t){return ht.multiply(this,ht.createRotate(t),this)}angle(){const t=this._t[0],e=this._t[3],r=Math.sqrt(t*t+e*e);return[t/r,e/r]}static multiply(t,e,r){const s=t._t,i=e._t,n=s[0]*i[0]+s[3]*i[1],o=s[1]*i[0]+s[4]*i[1],a=s[2]*i[0]+s[5]*i[1]+i[2],l=s[0]*i[3]+s[3]*i[4],h=s[1]*i[3]+s[4]*i[4],c=s[2]*i[3]+s[5]*i[4]+i[5],m=r._t;return m[0]=n,m[1]=o,m[2]=a,m[3]=l,m[4]=h,m[5]=c,r}invert(){const t=this._t;let e=t[0]*t[4]-t[1]*t[3];if(0===e)return new ht([0,0,0,0,0,0]);e=1/e;const r=(t[1]*t[5]-t[2]*t[4])*e,s=(t[2]*t[3]-t[0]*t[5])*e,i=t[4]*e,n=-t[1]*e,o=-t[3]*e,a=t[0]*e;return new ht([i,n,r,o,a,s])}}class ct{constructor(t,e){this._resourceManager=t,this._transfos=[],this._sizeTransfos=[],this._geomUnitsPerPoint=1,this._placementPool=new i(()=>new v,void 0,void 0,100),this._earlyReturn=!1,this._mapRotation=0,this._transfos.push(e||ht.createIdentity()),this._sizeTransfos.push(e?e.scaleRatio():1)}setTransform(t,e){this._transfos=[t||ht.createIdentity()],this._sizeTransfos=[e||(t?t.scaleRatio():1)]}setGeomUnitsPerPoint(t){this._geomUnitsPerPoint=t}transformPt(t){return this._transfos[this._transfos.length-1].transform(t)}transformSize(t){return t*this._sizeTransfos[this._sizeTransfos.length-1]}reverseTransformPt(t){return this._transfos[this._transfos.length-1].invert().transform(t)}reverseTransformSize(t){return t/this._sizeTransfos[this._sizeTransfos.length-1]}reverseTransformScalar(t){return t/this._transfos[this._transfos.length-1].scaleRatio()}getTransformAngle(){return this._transfos[this._transfos.length-1].angle()}geomUnitsPerPoint(){return this.isEmbedded()?1:this._geomUnitsPerPoint}prevGeomUnitsPerPoint(){return this._transfos.length>2?1:this._geomUnitsPerPoint}isEmbedded(){return this._transfos.length>1}back(){return this._transfos[this._transfos.length-1]}push(t,e){const r=e?t.scaleRatio():1;ht.multiply(t,this.back(),t),this._transfos.push(t),this._sizeTransfos.push(this._sizeTransfos[this._sizeTransfos.length-1]*r)}pop(){this._transfos.splice(-1,1),this._sizeTransfos.splice(-1,1)}drawSymbol(t,e,r){if(t)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":this.drawMultiLayerSymbol(t,e);break;case"CIMTextSymbol":this.drawTextSymbol(t,e,r)}}drawMultiLayerSymbol(t,e){if(!t||!e)return;const r=t.symbolLayers;if(!r)return;const s=t.effects;if(s&&s.length>0){const t=this.executeEffects(s,e);if(t){let e=t.next();for(;e;)this.drawSymbolLayers(r,e.asJSON()),e=t.next()}}else this.drawSymbolLayers(r,e)}executeEffects(t,e){const r=this.geomUnitsPerPoint(),s=null,i=D(t),n=!1;let o=new b(a.fromJSONCIM(e));for(const a of t){const t=T(a);t&&(o=t.execute(o,a,{geomUnitsPerPoint:r,tileKey:s,maxInflateSize:i,scale:null,spatialReference:e.spatialReference,preventClipping:n}))}return o}drawSymbolLayers(t,e){let r=t.length;for(;r--;){const s=t[r];if(!s||!1===s.enable)continue;const i=s.effects;if(i&&i.length>0){const t=this.executeEffects(i,e);if(t){let e=null;for(;(e=t.next())&&(this.drawSymbolLayer(s,e.asJSON()),!this._earlyReturn););}}else this.drawSymbolLayer(s,e);if(this._earlyReturn)return}}drawSymbolLayer(t,e){switch(t.type){case"CIMSolidFill":this.drawSolidFill(e,t.color,t.path);break;case"CIMHatchFill":this.drawHatchFill(e,t);break;case"CIMPictureFill":this.drawPictureFill(e,t);break;case"CIMGradientFill":this.drawGradientFill(e,t);break;case"CIMSolidStroke":this.drawSolidStroke(e,t.color,t.width,t.capStyle,t.joinStyle,t.miterLimit,t.path);break;case"CIMPictureStroke":this.drawPictureStroke(e,t);break;case"CIMGradientStroke":this.drawGradientStroke(e,t);break;case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":this.drawMarkerLayer(t,e)}}drawHatchFill(t,e){const r=dt(e,t,this.geomUnitsPerPoint());r&&(this.pushClipPath(t),this.drawMultiLayerSymbol(e.lineSymbol,r),this.popClipPath())}drawPictureFill(t,e){}drawGradientFill(t,e){}drawPictureStroke(t,e){}drawGradientStroke(t,e){}drawMarkerLayer(t,e){const r=t.markerPlacement;if(r){const s=C(r);if(s){const i="CIMMarkerPlacementInsidePolygon"===r.type||"CIMMarkerPlacementPolygonCenter"===r.type&&r.clipAtBoundary;i&&this.pushClipPath(e);const n=s.execute(a.fromJSONCIM(e),r,this.geomUnitsPerPoint(),null);if(n){let e=null;for(;(e=n.next())&&(this.drawMarker(t,e),!this._earlyReturn););}i&&this.popClipPath()}}else{const r=this._placementPool.acquire();if(M(e))r.tx=e.x,r.ty=e.y,this.drawMarker(t,r);else if(P(e)){const s=_(e);s&&([r.tx,r.ty]=s,this.drawMarker(t,r))}else if(S(e)){for(const s of e.paths)for(const e of s)if(r.tx=e[0],r.ty=e[1],this.drawMarker(t,r),this._earlyReturn)break}else for(const s of e.points)if(r.tx=s[0],r.ty=s[1],this.drawMarker(t,r),this._earlyReturn)break;this._placementPool.release(r)}}drawMarker(t,e){switch(t.type){case"CIMCharacterMarker":case"CIMPictureMarker":this.drawPictureMarker(t,e);break;case"CIMVectorMarker":this.drawVectorMarker(t,e)}}drawPictureMarker(t,e){if(!t)return;const r=this._resourceManager.getResource(t.url),s=A(t.size,I.CIMPictureMarker.size);if(null==r||s<=0)return;const i=r.width,n=r.height;if(!i||!n)return;const o=i/n,a=A(t.scaleX,1),l=ht.createIdentity(),h=t.anchorPoint;if(h){let e=h.x,r=h.y;"Absolute"!==t.anchorPointUnits&&(e*=s*o*a,r*=s),l.translate(-e,-r)}let c=A(t.rotation);t.rotateClockwise&&(c=-c),this._mapRotation&&(c+=this._mapRotation),c&&l.rotate(c*ot);let m=A(t.offsetX),f=A(t.offsetY);if(m||f){if(this._mapRotation){const t=ot*this._mapRotation,e=Math.cos(t),r=Math.sin(t),s=m*r+f*e;m=m*e-f*r,f=s}l.translate(m,f)}const u=this.geomUnitsPerPoint();1!==u&&l.scale(u,u);const d=e.getAngle();d&&l.rotate(d),l.translate(e.tx,e.ty),this.push(l,!1),this.drawImage(t,s),this.pop()}drawVectorMarker(t,e){if(!t)return;const r=t.markerGraphics;if(!r)return;const s=A(t.size,I.CIMVectorMarker.size),i=t.frame,n=i?i.ymax-i.ymin:0,o=s&&n?s/n:1,a=ht.createIdentity();i&&a.translate(.5*-(i.xmax+i.xmin),.5*-(i.ymax+i.ymin));const l=t.anchorPoint;if(l){let e=l.x,r=l.y;"Absolute"!==t.anchorPointUnits?i&&(e*=i.xmax-i.xmin,r*=i.ymax-i.ymin):(e/=o,r/=o),a.translate(-e,-r)}1!==o&&a.scale(o,o);let h=A(t.rotation);t.rotateClockwise&&(h=-h),this._mapRotation&&(h+=this._mapRotation),h&&a.rotate(h*ot);let c=A(t.offsetX),m=A(t.offsetY);if(c||m){if(this._mapRotation){const t=ot*this._mapRotation,e=Math.cos(t),r=Math.sin(t),s=c*r+m*e;c=c*e-m*r,m=s}a.translate(c,m)}const f=this.geomUnitsPerPoint();1!==f&&a.scale(f,f);const u=e.getAngle();u&&a.rotate(u),a.translate(e.tx,e.ty),this.push(a,t.scaleSymbolsProportionally);for(const d of r){d?.symbol&&d.geometry||lt().error("Invalid marker graphic",d);let t=d.textString;if("number"==typeof t&&(t=t.toString()),this.drawSymbol(d.symbol,d.geometry,t),this._earlyReturn)break}this.pop()}drawTextSymbol(t,e,r){if(!t)return;if(!M(e))return;if(A(t.height,I.CIMTextSymbol.height)<=0)return;const s=ht.createIdentity();let i=A(t.angle);i=-i,i&&s.rotate(i*ot);const n=A(t.offsetX),o=A(t.offsetY);(n||o)&&s.translate(n,o);const a=this.geomUnitsPerPoint();1!==a&&s.scale(a,a),s.translate(e.x,e.y),this.push(s,!1),this.drawText(t,r),this.pop()}}class mt extends ct{constructor(t,e){super(t,e),this.reset()}reset(){this._xmin=this._ymin=1/0,this._xmax=this._ymax=-1/0,this._clipCount=0}envelope(){return new U(this._xmin,this._ymin,this._xmax-this._xmin,this._ymax-this._ymin)}bounds(){return l(this._xmin,this._ymin,this._xmax,this._ymax)}drawSolidFill(t){if(t&&!(this._clipCount>0))if(P(t))this._processPath(t.rings,0);else if(S(t))this._processPath(t.paths,0);else if(x(t)){const e=yt(t);e&&this._processPath(e.rings,0)}else console.error("drawSolidFill Unexpected geometry type!")}drawSolidStroke(t,e,r){if(!t||this._clipCount>0||null==r||r<=0)return;const s=Math.max(.5*this.transformSize(A(r,I.CIMSolidStroke.width)),.5*at);if(P(t))this._processPath(t.rings,s);else if(S(t))this._processPath(t.paths,s);else if(x(t)){const e=yt(t);e&&this._processPath(e.rings,s)}else console.error("drawSolidStroke unexpected geometry type!")}drawMarkerLayer(t,e){P(e)&&t.markerPlacement&&("CIMMarkerPlacementInsidePolygon"===t.markerPlacement.type||"CIMMarkerPlacementPolygonCenter"===t.markerPlacement.type&&t.markerPlacement.clipAtBoundary)?this._processPath(e.rings,0):super.drawMarkerLayer(t,e)}drawHatchFill(t,e){this.drawSolidFill(t)}drawPictureFill(t,e){this.drawSolidFill(t)}drawGradientFill(t,e){this.drawSolidFill(t)}drawPictureStroke(t,e){this.drawSolidStroke(t,null,e.width)}drawGradientStroke(t,e){this.drawSolidStroke(t,null,e.width)}pushClipPath(t){this.drawSolidFill(t),this._clipCount++}popClipPath(){this._clipCount--}drawImage(t,e){const{url:r}=t,s=A(t.scaleX,1);let i=s*e,n=e;const o=this._resourceManager.getResource(r);if(null!=o){const t=o.height/o.width;i=s*(e?t>1?e:e/t:o.width),n=e?t>1?e*t:e:o.height}this._merge(this.transformPt([-i/2,-n/2]),0),this._merge(this.transformPt([-i/2,n/2]),0),this._merge(this.transformPt([i/2,-n/2]),0),this._merge(this.transformPt([i/2,n/2]),0)}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new F);const r=St(t);let[s,i]=this._textRasterizer.computeTextSize(e,r);s=n(s),i=n(i);const o=this.transformSize(1)*this.reverseTransformScalar(1);s*=o,i*=o;const a=t.horizontalAlignment??I.CIMTextSymbol.horizontalalignment,l=t.verticalAlignment??I.CIMTextSymbol.verticalalignment;let h=0;switch(a){case"Left":h=s/2;break;case"Right":h=-s/2}let c=0;switch(l){case"Bottom":c=i/2;break;case"Top":c=-i/2;break;case"Baseline":c=i/6}this._merge(this.transformPt([-s/2+h,-i/2+c]),0),this._merge(this.transformPt([-s/2+h,i/2+c]),0),this._merge(this.transformPt([s/2+h,-i/2+c]),0),this._merge(this.transformPt([s/2+h,i/2+c]),0)}_processPath(t,e){if(t)for(const r of t){const t=r?r.length:0;if(t>1){this._merge(this.transformPt(r[0]),e);for(let s=1;s<t;s++)this._merge(this.transformPt(r[s]),e)}}}_merge(t,e){t[0]-e<this._xmin&&(this._xmin=t[0]-e),t[0]+e>this._xmax&&(this._xmax=t[0]+e),t[1]-e<this._ymin&&(this._ymin=t[1]-e),t[1]+e>this._ymax&&(this._ymax=t[1]+e)}}class ft extends ct{constructor(){super(...arguments),this._hittestType="point",this._searchTarget=[],this._searchDistPoint=0,this._textInfo=null,this._svg=null,this._path=null,this._canvas=null}destroy(){this._svg=K(this._svg),this._path=null,this._canvas=null}hitTest(t,e,r,s,i,a,l,h){this._resetHittest();const c=a*o(1);switch(this.setGeomUnitsPerPoint(c),h){case"point":if(1!==t.length)return lt().error("Unexpected hittest area",t),!1;this._hittestType="point",this._searchDistPoint=l/2/c,this._searchTarget=[[t[0].x,t[0].y]];break;case"rect":if(4!==t.length)return lt().error("Unexpected hittest area",t),!1;this._hittestType="rect",this._searchDistPoint=0,this._searchTarget=t.map(t=>[t.x,t.y])}this._textInfo=s;const m=e&&("CIMPointSymbol"===e.type&&"Map"!==e.angleAlignment||"CIMTextSymbol"===e.type);if(this._mapRotation=m?i:0,!has("esri-mobile")){const t=n(et*window.devicePixelRatio),r=n(rt);!(("CIMLineSymbol"===e?.type||"CIMPolygonSymbol"===e?.type)&&e.symbolLayers?.some(W))&&"CIMMeshSymbol"!==e?.type&&(Y(e)??0)<r&&(this._searchDistPoint=t)}return this._earlyReturn=!1,this.drawSymbol(e,r),this._earlyReturn}executeEffects(t,e){return"CIMGeometricEffectDashes"===t.at(-1)?.type&&(t=t.slice(0,-1)),super.executeEffects(t,e)}drawSolidFill(t,e,r){null!=r?this._hittestSvgPath(t,r,!0):this._hitTestFill(t)}drawHatchFill(t,e){this._hitTestFill(t)}drawPictureFill(t,e){this._hitTestFill(t)}drawGradientFill(t,e){this._hitTestFill(t)}drawSolidStroke(t,e,r,s,i,n,o){null!=o?this._hittestSvgPath(t,o,!1,r):this._hitTestStroke(t,r)}drawPictureStroke(t,e){this._hitTestStroke(t,e.width)}drawGradientStroke(t,e){this._hitTestStroke(t,e.width)}drawMarkerLayer(t,e){t.markerPlacement&&("CIMMarkerPlacementInsidePolygon"===t.markerPlacement.type||"CIMMarkerPlacementPolygonCenter"===t.markerPlacement.type&&t.markerPlacement.clipAtBoundary)?this._hitTestFill(e):super.drawMarkerLayer(t,e)}pushClipPath(t){}popClipPath(){}drawImage(t,e){const{url:r}=t,s=A(t.scaleX,1),i=this._resourceManager.getResource(r);if(null==i||0===i.height||0===e)return;const n=e*this.geomUnitsPerPoint(),o=n*s*(i.width/i.height);if("point"===this._hittestType){const t=this.reverseTransformPt(this._searchTarget[0]),e=this._searchDistPoint;Math.abs(t[0])<o/2+e&&Math.abs(t[1])<n/2+e&&(this._earlyReturn=!0)}else{const t=o/2,e=n/2,r=[[-t,e],[t,e],[t,-e],[-t,-e],[-t,e]];bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,[r])&&(this._earlyReturn=!0)}}drawText(t,e){const r=this._textInfo;if(!r)return;const s=r.get(t);if(!s)return;if(!s.glyphMosaicItems.glyphs.length)return;const i=it(A(t.height,I.CIMTextSymbol.height)),{lineGapType:n,lineGap:o}=t,a=n?Pt(n,A(o),i):0,l=t.horizontalAlignment??I.CIMTextSymbol.horizontalalignment,h=t.verticalAlignment??I.CIMTextSymbol.verticalalignment,c="CIMBackgroundCallout"===t.callout?.type,m=st(s.glyphMosaicItems,{scale:i/tt,angle:0,xOffset:0,yOffset:0,horizontalAlignment:l,verticalAlignment:h,maxLineWidth:nt(t.lineWidth),lineHeight:Z*Math.max(.25,Math.min(a||1,4)),decoration:t.font.decoration||"none",useCIMAngleBehavior:!0,hasBackground:c});if("point"===this._hittestType){const t=this.reverseTransformPt(this._searchTarget[0]),e=t[0],r=t[1];for(const s of m.glyphs){const[t,i]=s.offsets.topLeft,[n,o]=s.offsets.bottomRight;if(e>t&&e<n&&r>-o&&r<-i){this._earlyReturn=!0;break}}}else for(const f of m.glyphs){const[t,e]=f.offsets.topLeft,[r,s]=f.offsets.bottomRight,i=[[t,-e],[r,-e],[r,-s],[t,-s],[t,-e]];if(bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,[i])){this._earlyReturn=!0;break}}}_hitTestFill(t){let e=null;if(x(t)){const r=t;e=[[[r.xmin,r.ymin],[r.xmin,r.ymax],[r.xmax,r.ymax],[r.xmax,r.ymin],[r.xmin,r.ymin]]]}else if(P(t))e=t.rings;else{if(!S(t))return;e=t.paths}if("point"===this._hittestType){const t=this.reverseTransformPt(this._searchTarget[0]);if(gt(t,e)&&(this._earlyReturn=!0),!this._earlyReturn){pt(t,e,this.reverseTransformScalar(this._searchDistPoint)*this.prevGeomUnitsPerPoint())&&(this._earlyReturn=!0)}}else{bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,e)&&(this._earlyReturn=!0)}}_getSvgPath(){return null!=this._svg&&null!=this._path||(this._svg??=$(),this._path??=Q("path"),this._svg.appendChild(this._path)),this._path}_getCanvasContext(t,e){return this._canvas??=document.createElement("canvas"),this._canvas.width=t,this._canvas.height=e,this._canvas.getContext("2d",{willReadFrequently:!0})}_hittestSvgPath(t,e,r,s=0){const i=g();p(i,t);const n={x:i[0],y:i[1],width:i[2]-i[0],height:i[3]-i[1]},o=this._getSvgPath();o.setAttribute("d",e);const a=o.getBBox();if("point"===this._hittestType){const t=this.reverseTransformScalar(this._searchDistPoint)*this.prevGeomUnitsPerPoint(),i=this.reverseTransformPt(this._searchTarget[0]);let o=Math.max(a.width/n.width,a.height/n.height),l=1;const h=2*t*o;h<1&&(l=2/h,o*=l,a.x*=l,a.y*=l,a.width*=l,a.height*=l);const c=1+s*o/2,m=this._getCanvasContext(a.width+2*c,a.height+2*c);m.setTransform(l,0,0,l,-a.x+c,-a.y+c);const f=new Path2D(e);r?m.fill(f):(m.lineWidth=s*(o/l),m.stroke(f));const u=(n.width*o-a.width)/2,d=(n.height*o-a.height)/2,g=Math.floor((i[0]-n.x-t)*o-u+c),p=Math.floor((n.height-(i[1]-n.y)-t)*o+d+c),_=Math.ceil(2*t*o),y=Math.ceil(2*t*o),P=m.getImageData(g,p,_,y).data;for(let e=3;e<P.length;e+=4)if(P[e]>127.5)return void(this._earlyReturn=!0)}else{const t=[[n.x,n.y],[n.x,n.y+n.height],[n.x+n.width,n.y+n.height],[n.x+n.width,n.y],[n.x,n.y]];if(bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,[t]))return void(this._earlyReturn=!0)}}_hitTestStroke(t,e){let r=null;if(x(t)){const e=t;r=[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}else if(P(t))r=t.rings;else{if(!S(t))return;r=t.paths}if("point"===this._hittestType){pt(this.reverseTransformPt(this._searchTarget[0]),r,A(e,I.CIMSolidStroke.width)*this.geomUnitsPerPoint()/2+this.reverseTransformScalar(this._searchDistPoint)*this.prevGeomUnitsPerPoint())&&(this._earlyReturn=!0)}else{bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,r)&&(this._earlyReturn=!0)}}_resetHittest(){this.setTransform(),this._hittestType="point",this._searchTarget=[],this._searchDistPoint=0,this._textInfo=null}}class ut extends ct{constructor(t,e,r,s){super(e,r),this._applyAdditionalRenderProps=s,this._colorSubstitutionHelper=new k,this._ctx=t}drawSolidFill(t,e){if(!t)return;if(P(t))this._buildPath(t.rings,!0);else if(S(t))this._buildPath(t.paths,!0);else if(x(t))this._buildPath(yt(t).rings,!0);else{if(!w(t))return;console.log("CanvasDrawHelper.drawSolidFill - No implementation!")}const r=this._ctx;r.fillStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+(e[3]??255)/255+")",r.fill("evenodd")}drawSolidStroke(t,e,r,s,i,n){if(!t||!e||0===r)return;if(P(t))this._buildPath(t.rings,!0);else if(S(t))this._buildPath(t.paths,!1);else{if(!x(t))return void console.log("CanvasDrawHelper.drawSolidStroke isn't implemented!");this._buildPath(yt(t).rings,!0)}const o=this._ctx;o.strokeStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+(e[3]??255)/255+")",o.lineWidth=Math.max(this.transformSize(r),at),this._setCapStyle(s),this._setJoinStyle(i),o.miterLimit=n,o.stroke()}pushClipPath(t){if(this._ctx.save(),P(t))this._buildPath(t.rings,!0);else if(S(t))this._buildPath(t.paths,!0);else{if(!x(t))return;this._buildPath(yt(t).rings,!0)}this._ctx.clip("evenodd")}popClipPath(){this._ctx.restore()}drawImage(t,e){const{colorSubstitutions:r,url:s,tintColor:i}=t,n=A(t.scaleX,1),o=this._resourceManager.getResource(s);if(null==o)return;let a=e*(o.width/o.height),l=e;e||(a=o.width,l=o.height);const h=j(s)||"src"in o&&j(o.src);let c="getFrame"in o?R(o):o;r&&(c=this._colorSubstitutionHelper.applyColorSubstitution(c,r)),this._applyAdditionalRenderProps&&!h&&i&&(c=this._colorSubstitutionHelper.tintImageData(c,i));const m=this.transformPt([0,0]),[f,u]=this.getTransformAngle(),d=this.transformSize(1),g=this._ctx;g.save(),g.setTransform({m11:n*d*f,m12:n*d*u,m21:-d*u,m22:d*f,m41:m[0],m42:m[1]}),g.drawImage(c,-a/2,-l/2,a,l),g.restore()}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new F);const r=St(t,this.transformSize(n(1))),s=this._textRasterizer.rasterizeText(e,r);if(!s)return;const{size:i,anchorX:o,anchorY:a,canvas:l}=s,h=i[0]*(o+.5),c=i[1]*(a-.5),m=this._ctx,f=this.transformPt([0,0]),[u,d]=this.getTransformAngle(),g=1;m.save(),m.setTransform({m11:g*u,m12:g*d,m21:-g*d,m22:g*u,m41:f[0]-g*h,m42:f[1]+g*c}),m.drawImage(l,0,0),m.restore()}drawPictureFill(t,e){if(!t)return;let{colorSubstitutions:r,height:s,offsetX:i,offsetY:n,rotation:o,scaleX:a,tintColor:l,url:h}=e;const c=this._resourceManager.getResource(h);if(null==c)return;if(P(t))this._buildPath(t.rings,!0);else if(S(t))this._buildPath(t.paths,!0);else if(x(t))this._buildPath(yt(t).rings,!0);else{if(!w(t))return;console.log("CanvasDrawHelper.drawPictureFill - No implementation!")}const m=this._ctx,f=j(h)||"src"in c&&j(c.src);let u,d="getFrame"in c?R(c):c;if(r&&(d=this._colorSubstitutionHelper.applyColorSubstitution(d,r)),this._applyAdditionalRenderProps){f||l&&(d=this._colorSubstitutionHelper.tintImageData(d,l)),u=m.createPattern(d,"repeat");const t=this.transformSize(1);o||(o=0),i?i*=t:i=0,n?n*=t:n=0,s&&(s*=t);const e=s?s/c.height:1,r=a&&s?a*s/c.width:1;if(0!==o||1!==e||1!==r||0!==i||0!==n){const t=new DOMMatrix;t.rotateSelf(0,0,-o).translateSelf(i,n).scaleSelf(r,e,1),u.setTransform(t)}}else u=m.createPattern(d,"repeat");m.save(),m.fillStyle=u,m.fill("evenodd"),m.restore()}drawPictureStroke(t,r){if(!t)return;let{colorSubstitutions:s,capStyle:i,joinStyle:n,miterLimit:a,tintColor:l,url:h,width:c}=r;const m=this._resourceManager.getResource(h);if(null==m)return;let f;if(P(t))f=t.rings;else if(S(t))f=t.paths;else{if(!x(t))return w(t)?void console.log("CanvasDrawHelper.drawPictureStroke - No implementation!"):void 0;f=yt(t).rings}c||(c=m.width);const u=j(h)||"src"in m&&j(m.src);let d="getFrame"in m?R(m):m;s&&(d=this._colorSubstitutionHelper.applyColorSubstitution(d,s)),this._applyAdditionalRenderProps&&(u||l&&(d=this._colorSubstitutionHelper.tintImageData(d,l)));const g=Math.max(this.transformSize(o(c)),.5),p=g/d.width,_=this._ctx,y=_.createPattern(d,"repeat-y");let M,b;_.save(),this._setCapStyle(i),this._setJoinStyle(n),void 0!==a&&(_.miterLimit=a),_.lineWidth=g;for(let o of f)if(o=e(o),wt(o),o&&!(o.length<=1)){M=this.transformPt(o[0]);for(let t=1;t<o.length;t++){b=this.transformPt(o[t]);const e=_t(M,b),r=new DOMMatrix;r.translateSelf(0,M[1]-g/2).scaleSelf(p,p,1).rotateSelf(0,0,90-e),y.setTransform(r),_.strokeStyle=y,_.beginPath(),_.moveTo(M[0],M[1]),_.lineTo(b[0],b[1]),_.stroke(),M=b}}_.restore()}drawGradientFill(t,e){if(!t)return;let r;if(P(t))r=t.rings;else if(S(t))r=t.paths;else{if(!x(t))return void lt().error("Unable to draw gradient fill");r=yt(t).rings}this._buildPath(r,!0);const{angle:i,gradientMethod:n,gradientSize:a,gradientSizeUnits:l}=e,g=I.CIMGradientFill,p=e.gradientType??g.gradientType,_=-s(i??0),y=h();for(const s of r){const t=s?s.length:0;if(t>1)for(let e=0;e<t;e++){let t=this.transformPt(s[e]);"Linear"!==n&&"Rectangular"!==n||(t=z(t,-_)),c(y,t)}}const[w,M,b,k]=y,T=this._ctx;switch(T.save(),n){case"Buffered":lt().error(`Gradient method "${n}" currently unsupported.`);break;case"Linear":{const t=(M+k)/2,r="Absolute"===l?this.transformSize(o(a)):G(a,g.gradientSize)*(b-w),[s,i]="Discrete"===p?[b,b-r]:[w+r,w],n=z([s,t],_),h=z([i,t],_),c=T.createLinearGradient(n[0],n[1],h[0],h[1]);L(c,e),T.fillStyle=c,T.fill("evenodd");break}case"Circular":{const t=m(y),r=d(y)/2,s="Absolute"===l?this.transformSize(o(a)):G(a,g.gradientSize)*r,[i,n]="Discrete"===p?[r,r-s]:[s,0],h=T.createRadialGradient(t[0],t[1],i,t[0],t[1],n);L(h,e),T.fillStyle=h,T.fill("evenodd");break}case"Rectangular":{const r=m(y),s=r[0],i=r[1],n=z(r,_),h=(r,s,i,o,a,l,h,c)=>{T.save(),this.pushClipPath(t);const m=z([a,l],_),f=z([h,c],_);T.beginPath(),T.moveTo(n[0],n[1]),T.lineTo(m[0],m[1]),T.lineTo(f[0],f[1]),T.lineTo(n[0],n[1]),T.clip();const u=z([r,s],_),d=z([i,o],_),g=T.createLinearGradient(u[0],u[1],d[0],d[1]);L(g,e),T.fillStyle=g,T.fill("evenodd"),T.restore()};let c="Absolute"===l?this.transformSize(o(a)):G(a,g.gradientSize)*(f(y)/2),[d,P]="Discrete"===p?[b,b-c]:[s+c,s];h(d,i,P,i,b,M,b,k),[d,P]="Discrete"===p?[w,w+c]:[s-c,s],h(d,i,P,i,w,k,w,M),c="Absolute"===l?this.transformSize(o(a)):G(a,g.gradientSize)*(u(y)/2);let[S,x]="Discrete"===p?[k,k-c]:[i+c,i];h(s,S,s,x,b,k,w,k),[S,x]="Discrete"===p?[M,M+c]:[i-c,i],h(s,S,s,x,w,M,b,M);break}}T.restore()}drawGradientStroke(t,r){const{capStyle:s,gradientMethod:i,gradientSize:n,gradientSizeUnits:a,joinStyle:l,miterLimit:h,width:c}=r;if(!t||0===c)return;let m;if(P(t))m=t.rings;else if(S(t))m=t.paths;else{if(!x(t))return void lt().error("Unable to draw gradient stroke");m=yt(t).rings}const f=r.gradientType??I.CIMGradientStroke.gradientType,u=Math.max(this.transformSize(o(c)),.5),d=this._ctx;let g,p;d.save(),this._setCapStyle(s),this._setJoinStyle(l),void 0!==h&&(d.miterLimit=h),d.lineWidth=u;for(let _ of m){if(_=e(_),wt(_),!_||_.length<=1)continue;let t=0;g=this.transformPt(_[0]);for(let e=1;e<_.length;e++){p=this.transformPt(_[e]);const r=p[0]-g[0],s=p[1]-g[1];t+=Math.sqrt(r*r+s*s),g=p}const s="Absolute"===a?this.transformSize(o(n)):G(n,I.CIMGradientStroke.gradientSize)*("AcrossLine"===i?u:t);let l=0;g=this.transformPt(_[0]);for(let e=1;e<_.length;e++){p=this.transformPt(_[e]);const n=p[0]-g[0],o=p[1]-g[1],a=Math.sqrt(n*n+o*o);let h,c,m,y;switch(i){case"AcrossLine":{const[t,e]=z([n/a,o/a],-Math.PI/2),r=u/2,i="Discrete"===f?r:s-r;h=(g[0]+p[0])/2+t*i,c=(g[1]+p[1])/2+e*i,m=h-t*s,y=c-e*s;break}case"AlongLine":{const e=n/a,r=o/a;"Discrete"===f?(h=g[0]-e*l,c=g[1]-r*l,m=h+e*s,y=c+r*s):(m=g[0]+e*(t-l),y=g[1]+r*(t-l),h=m-e*s,c=y-r*s);break}default:return lt().error("Unrecognized gradient method:",i),void d.restore()}const P=d.createLinearGradient(h,c,m,y);L(P,r),d.strokeStyle=P,d.beginPath(),d.moveTo(g[0],g[1]),d.lineTo(p[0],p[1]),d.stroke(),l+=a,g=p}}d.restore()}_buildPath(t,e){const r=this._ctx;if(r.beginPath(),t)for(const s of t){const t=s?s.length:0;if(t>1){let i=this.transformPt(s[0]);r.moveTo(i[0],i[1]);for(let e=1;e<t;e++)i=this.transformPt(s[e]),r.lineTo(i[0],i[1]);e&&r.closePath()}}}_setCapStyle(t){switch(t){case"Butt":this._ctx.lineCap="butt";break;case"Round":this._ctx.lineCap="round";break;case"Square":this._ctx.lineCap="square"}}_setJoinStyle(t){switch(t){case"Bevel":this._ctx.lineJoin="bevel";break;case"Round":this._ctx.lineJoin="round";break;case"Miter":this._ctx.lineJoin="miter"}}}function dt(t,e,r){let s=A(t.separation,I.CIMHatchFill.separation)*r,i=A(t.rotation);if(0===s)return null;s<0&&(s=-s);let n=0;const o=.5*s;for(;n>o;)n-=s;for(;n<-o;)n+=s;const a=g();p(a,e),a[0]-=o,a[1]-=o,a[2]+=o,a[3]+=o;const l=[[a[0],a[1]],[a[0],a[3]],[a[2],a[3]],[a[2],a[1]]];for(;i>180;)i-=180;for(;i<0;)i+=180;const h=Math.cos(i*ot),c=Math.sin(i*ot),m=-s*c,f=s*h;let u,d,_,y;n=A(t.offsetX)*r*c-A(t.offsetY)*r*h,u=_=Number.MAX_VALUE,d=y=-Number.MAX_VALUE;for(const g of l){const t=g[0],e=g[1],r=h*t+c*e,s=-c*t+h*e;u=Math.min(u,r),_=Math.min(_,s),d=Math.max(d,r),y=Math.max(y,s)}_=Math.floor(_/s)*s;let P=h*u-c*_-m*n/s,S=c*u+h*_-f*n/s,x=h*d-c*_-m*n/s,w=c*d+h*_-f*n/s;const M=1+Math.round((y-_)/s),b=[];for(let g=0;g<M;g++)P+=m,S+=f,x+=m,w+=f,b.push([[P,S],[x,w]]);return{paths:b}}function gt(t,e){let r=0;for(const s of e){const e=s.length;for(let i=1;i<e;i++){const e=s[i-1],n=s[i];if(e[1]>t[1]==n[1]>t[1])continue;(n[0]-e[0])*(t[1]-e[1])-(n[1]-e[1])*(t[0]-e[0])>0?r++:r--}}return 0!==r}function pt(t,e,r){for(const s of e){const e=s.length;for(let i=1;i<e;i++){const e=s[i-1],n=s[i];let o=(n[0]-e[0])*(n[0]-e[0])+(n[1]-e[1])*(n[1]-e[1]);if(0===o)continue;o=Math.sqrt(o);const a=((n[0]-e[0])*(t[1]-e[1])-(n[1]-e[1])*(t[0]-e[0]))/o;if(Math.abs(a)<r){const s=((n[0]-e[0])*(t[0]-e[0])+(n[1]-e[1])*(t[1]-e[1]))/o;if(s>-r&&s<o+r)return!0}}}return!1}function _t(t,e){const r=e[0]-t[0],s=e[1]-t[1];return 180/Math.PI*Math.atan2(s,r)}const yt=t=>t?{spatialReference:t.spatialReference,rings:[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]]}:null,Pt=(t,e,r)=>{switch(t){case"ExtraLeading":return 1+e/r;case"Multiple":return e;case"Exact":return e/r}};function St(e,r=1){const s=H(e),i=E(e.fontStyleName),n=e.fontFamilyName??t,{weight:o,style:a}=i,l=r*(e.height||5),h=B(e.horizontalAlignment),c=X(e.verticalAlignment),m=J(e),f=J(e.haloSymbol),u=null!=f?r*(e.haloSize??0):0,d=N(e.symbol),g=r*(O(e.symbol)||0),p="CIMBackgroundCallout"===e.callout?.type?e.callout.backgroundSymbol:null,_=J(p),y=O(p),P=N(p);return{color:m,size:l,horizontalAlignment:h,verticalAlignment:c,font:{family:n,style:V(a),weight:q(o),decoration:s},outline:{size:g||0,color:d},halo:{size:u||0,color:f,style:a},backgroundColor:_,borderLine:null!=y&&null!=P?{size:y,color:P}:null,pixelRatio:1,premultiplyColors:!0}}const xt=1e-4;function wt(t){let e,r,s,i,n,o=t[0],a=1;for(;a<t.length;)e=t[a][0]-o[0],r=t[a][1]-o[1],i=0!==e?r/e:Math.PI/2,void 0!==s&&Math.abs(i-s)<=xt?(t.splice(a-1,1),o=n):(n=o,o=t[a],a++),s=i}function Mt(t){const e=1e-6,r=t[0],s=t[t.length-1];return Math.abs(r[0]-s[0])<=e&&Math.abs(r[1]-s[1])<=e}function bt(t,e){t.length>1&&!Mt(t)&&(t=[...t,t[0]]);for(let r=0;r<e.length;r++){const s=e[r],i=s.length;for(const e of s)if(gt(e,[t]))return!0;if(Mt(s))for(const r of t)if(gt(r,e))return!0;for(let e=1;e<i;e++){const r=s[e-1],i=s[e];for(let e=0;e<t.length;e++){const s=t[e],n=t[(e+1)%t.length];if(y(r,i,s,n))return!0}}}return!1}export{ct as CIMSymbolDrawHelper,ut as CanvasDrawHelper,mt as EnvDrawHelper,ft as HittestDrawHelper,ht as Transformation,ot as cDegToRad,Pt as lineGapType2LineHeight};
2
+ import{defaultFontFamily as t}from"../../core/fontUtils.js";import has from"../../core/has.js";import{clone as e}from"../../core/lang.js";import r from"../../core/Logger.js";import{deg2rad as i}from"../../core/mathUtils.js";import s from"../../core/ObjectPool.js";import{px2pt as n,pt2px as a}from"../../core/screenUtils.js";import{GeometryCursor as o}from"../../geometry/GeometryCursor.js";import{fromValues as l,empty as h,expandPointInPlace as c,center as m,width as f,height as u,diagonal as d,create as g}from"../../geometry/support/aaBoundingRect.js";import{getBoundsXY as p}from"../../geometry/support/boundsUtils.js";import{polygonCentroid as _}from"../../geometry/support/centroid.js";import{segmentIntersects as y}from"../../geometry/support/intersectsBase.js";import{isPolygon as P,isPolyline as S,isExtent as x,isMultipoint as w,isPoint as M}from"../../geometry/support/jsonTypeUtils.js";import{SimpleEffectCursor as b}from"./CIMEffects.js";import T from"./CIMImageColorSubstitutionHelper.js";import{getEffectOperator as k,getPlacementOperator as C}from"./CIMOperators.js";import{Placement as v}from"./CIMPlacements.js";import{defaultCIMValues as I}from"./defaultCIMValues.js";import{getFirstFrame as R}from"./imageUtils.js";import{rotate as z}from"./mathUtils.js";import{addColorStops as L}from"./rasterizingUtils.js";import U from"./Rect.js";import F from"./TextRasterizer.js";import{getNumericValue as A,isSVGImage as j,getRelativeGradientSize as D,getEffectsInflateSize as G,fromCIMFontDecoration as H,fromCIMFontStyle as E,fromCIMHorizontalAlignment as B,fromCIMVerticalAlignment as X,getFillColor as J,getStrokeColor as N,getStrokeWidth as O,getFontWeight as q,getFontStyle as V,isCIMFill as Y,getSize as W}from"./utils.js";import{destroyHiddenSvg as K,createHiddenSvg as $,createSvgElement as Q}from"../../views/2d/engine/svgUtils.js";import{magicLabelLineHeight as Z,glyphSize as tt,hittestToleranceSmallSymbol as et,hittestSmallSymbolThreshold as rt}from"../../views/2d/engine/webgl/definitions.js";import{shapeGlyphs as it}from"../../views/2d/engine/webgl/mesh/templates/shapingUtils.js";import{roundPtToWholePixel as st,getLineWidth as nt}from"../../views/2d/layers/graphics/graphicsUtils.js";const at=Math.PI/180,ot=.5,lt=()=>r.getLogger("esri.symbols.cim.CIMSymbolDrawHelper");class ht{constructor(t){this._t=t}static createIdentity(){return new ht([1,0,0,0,1,0])}clone(){const t=this._t;return new ht(t.slice())}transform(t){const e=this._t;return[e[0]*t[0]+e[1]*t[1]+e[2],e[3]*t[0]+e[4]*t[1]+e[5]]}static createScale(t,e){return new ht([t,0,0,0,e,0])}scale(t,e){const r=this._t;return r[0]*=t,r[1]*=t,r[2]*=t,r[3]*=e,r[4]*=e,r[5]*=e,this}scaleRatio(){return Math.sqrt(this._t[0]*this._t[0]+this._t[1]*this._t[1])}static createTranslate(t,e){return new ht([0,0,t,0,0,e])}translate(t,e){const r=this._t;return r[2]+=t,r[5]+=e,this}static createRotate(t){const e=Math.cos(t),r=Math.sin(t);return new ht([e,-r,0,r,e,0])}rotate(t){return ht.multiply(this,ht.createRotate(t),this)}angle(){const t=this._t[0],e=this._t[3],r=Math.sqrt(t*t+e*e);return[t/r,e/r]}static multiply(t,e,r){const i=t._t,s=e._t,n=i[0]*s[0]+i[3]*s[1],a=i[1]*s[0]+i[4]*s[1],o=i[2]*s[0]+i[5]*s[1]+s[2],l=i[0]*s[3]+i[3]*s[4],h=i[1]*s[3]+i[4]*s[4],c=i[2]*s[3]+i[5]*s[4]+s[5],m=r._t;return m[0]=n,m[1]=a,m[2]=o,m[3]=l,m[4]=h,m[5]=c,r}invert(){const t=this._t;let e=t[0]*t[4]-t[1]*t[3];if(0===e)return new ht([0,0,0,0,0,0]);e=1/e;const r=(t[1]*t[5]-t[2]*t[4])*e,i=(t[2]*t[3]-t[0]*t[5])*e,s=t[4]*e,n=-t[1]*e,a=-t[3]*e,o=t[0]*e;return new ht([s,n,r,a,o,i])}}class ct{constructor(t,e){this._resourceManager=t,this._transfos=[],this._sizeTransfos=[],this._textScaling=[],this._geomUnitsPerPoint=1,this._placementPool=new s(()=>new v,void 0,void 0,100),this._earlyReturn=!1,this._mapRotation=0,this._transfos.push(e||ht.createIdentity()),this._sizeTransfos.push(e?e.scaleRatio():1),this._textScaling.push(1)}setTransform(t,e){this._transfos=[t||ht.createIdentity()],this._sizeTransfos=[e||(t?t.scaleRatio():1)],this._textScaling=[1]}setGeomUnitsPerPoint(t){this._geomUnitsPerPoint=t}transformPt(t){return this._transfos[this._transfos.length-1].transform(t)}transformSize(t){return t*this._sizeTransfos[this._sizeTransfos.length-1]}scaleText(t){return t*this._textScaling[this._textScaling.length-1]}reverseTransformPt(t){return this._transfos[this._transfos.length-1].invert().transform(t)}reverseTransformSize(t){return t/this._sizeTransfos[this._sizeTransfos.length-1]}reverseTransformScalar(t){return t/this._transfos[this._transfos.length-1].scaleRatio()}reverseScaleText(t){return t/this._textScaling[this._textScaling.length-1]}getTransformAngle(){return this._transfos[this._transfos.length-1].angle()}geomUnitsPerPoint(){return this.isEmbedded()?1:this._geomUnitsPerPoint}prevGeomUnitsPerPoint(){return this._transfos.length>2?1:this._geomUnitsPerPoint}isEmbedded(){return this._transfos.length>1}back(){return this._transfos[this._transfos.length-1]}push(t,e=!1,r=1){const i=e?t.scaleRatio():1;ht.multiply(t,this.back(),t),this._transfos.push(t),this._sizeTransfos.push(this._sizeTransfos[this._sizeTransfos.length-1]*i),this._textScaling.push(this._textScaling[this._textScaling.length-1]*r)}pop(){this._transfos.splice(-1,1),this._sizeTransfos.splice(-1,1),this._textScaling.splice(-1,1)}drawSymbol(t,e,r){if(t)switch(t.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":this.drawMultiLayerSymbol(t,e);break;case"CIMTextSymbol":this.drawTextSymbol(t,e,r)}}drawMultiLayerSymbol(t,e){if(!t||!e)return;const r=t.symbolLayers;if(!r)return;const i=t.effects;if(i&&i.length>0){const t=this.executeEffects(i,e);if(t){let e=t.next();for(;e;)this.drawSymbolLayers(r,e.asJSON()),e=t.next()}}else this.drawSymbolLayers(r,e)}executeEffects(t,e){const r=this.geomUnitsPerPoint(),i=null,s=G(t),n=!1;let a=new b(o.fromJSONCIM(e));for(const o of t){const t=k(o);t&&(a=t.execute(a,o,{geomUnitsPerPoint:r,tileKey:i,maxInflateSize:s,scale:null,spatialReference:e.spatialReference,preventClipping:n}))}return a}drawSymbolLayers(t,e){let r=t.length;for(;r--;){const i=t[r];if(!i||!1===i.enable)continue;const s=i.effects;if(s&&s.length>0){const t=this.executeEffects(s,e);if(t){let e=null;for(;(e=t.next())&&(this.drawSymbolLayer(i,e.asJSON()),!this._earlyReturn););}}else this.drawSymbolLayer(i,e);if(this._earlyReturn)return}}drawSymbolLayer(t,e){switch(t.type){case"CIMSolidFill":this.drawSolidFill(e,t.color,t.path);break;case"CIMHatchFill":this.drawHatchFill(e,t);break;case"CIMPictureFill":this.drawPictureFill(e,t);break;case"CIMGradientFill":this.drawGradientFill(e,t);break;case"CIMSolidStroke":this.drawSolidStroke(e,t.color,t.width,t.capStyle,t.joinStyle,t.miterLimit,t.path);break;case"CIMPictureStroke":this.drawPictureStroke(e,t);break;case"CIMGradientStroke":this.drawGradientStroke(e,t);break;case"CIMCharacterMarker":case"CIMPictureMarker":case"CIMVectorMarker":this.drawMarkerLayer(t,e)}}drawHatchFill(t,e){const r=dt(e,t,this.geomUnitsPerPoint());r&&(this.pushClipPath(t),this.drawMultiLayerSymbol(e.lineSymbol,r),this.popClipPath())}drawPictureFill(t,e){}drawGradientFill(t,e){}drawPictureStroke(t,e){}drawGradientStroke(t,e){}drawMarkerLayer(t,e){const r=t.markerPlacement;if(r){const i=C(r);if(i){const s="CIMMarkerPlacementInsidePolygon"===r.type||"CIMMarkerPlacementPolygonCenter"===r.type&&r.clipAtBoundary;s&&this.pushClipPath(e);const n=i.execute(o.fromJSONCIM(e),r,this.geomUnitsPerPoint(),null);if(n){let e=null;for(;(e=n.next())&&(this.drawMarker(t,e),!this._earlyReturn););}s&&this.popClipPath()}}else{const r=this._placementPool.acquire();if(M(e))r.tx=e.x,r.ty=e.y,this.drawMarker(t,r);else if(P(e)){const i=_(e);i&&([r.tx,r.ty]=i,this.drawMarker(t,r))}else if(S(e)){for(const i of e.paths)for(const e of i)if(r.tx=e[0],r.ty=e[1],this.drawMarker(t,r),this._earlyReturn)break}else for(const i of e.points)if(r.tx=i[0],r.ty=i[1],this.drawMarker(t,r),this._earlyReturn)break;this._placementPool.release(r)}}drawMarker(t,e){switch(t.type){case"CIMCharacterMarker":case"CIMPictureMarker":this.drawPictureMarker(t,e);break;case"CIMVectorMarker":this.drawVectorMarker(t,e)}}drawPictureMarker(t,e){if(!t)return;const r=this._resourceManager.getResource(t.url),i=A(t.size,I.CIMPictureMarker.size);if(null==r||i<=0)return;const s=r.width,n=r.height;if(!s||!n)return;const a=s/n,o=A(t.scaleX,1),l=ht.createIdentity(),h=t.anchorPoint;if(h){let e=h.x,r=h.y;"Absolute"!==t.anchorPointUnits&&(e*=i*a*o,r*=i),l.translate(-e,-r)}let c=A(t.rotation);t.rotateClockwise&&(c=-c),this._mapRotation&&(c+=this._mapRotation),c&&l.rotate(c*at);let m=A(t.offsetX),f=A(t.offsetY);if(m||f){if(this._mapRotation){const t=at*this._mapRotation,e=Math.cos(t),r=Math.sin(t),i=m*r+f*e;m=m*e-f*r,f=i}l.translate(m,f)}const u=this.geomUnitsPerPoint();1!==u&&l.scale(u,u);const d=e.getAngle();d&&l.rotate(d),l.translate(e.tx,e.ty),this.push(l),this.drawImage(t,i),this.pop()}drawVectorMarker(t,e){if(!t)return;const r=t.markerGraphics;if(!r)return;const i=A(t.size,I.CIMVectorMarker.size),s=t.frame,n=s?s.ymax-s.ymin:0,a=i&&n?i/n:1,o=ht.createIdentity();s&&o.translate(.5*-(s.xmax+s.xmin),.5*-(s.ymax+s.ymin));const l=t.anchorPoint;if(l){let e=l.x,r=l.y;"Absolute"!==t.anchorPointUnits?s&&(e*=s.xmax-s.xmin,r*=s.ymax-s.ymin):(e/=a,r/=a),o.translate(-e,-r)}1!==a&&o.scale(a,a);let h=A(t.rotation);t.rotateClockwise&&(h=-h),this._mapRotation&&(h+=this._mapRotation),h&&o.rotate(h*at);let c=A(t.offsetX),m=A(t.offsetY);if(c||m){if(this._mapRotation){const t=at*this._mapRotation,e=Math.cos(t),r=Math.sin(t),i=c*r+m*e;c=c*e-m*r,m=i}o.translate(c,m)}const f=this.geomUnitsPerPoint();1!==f&&o.scale(f,f);const u=e.getAngle();u&&o.rotate(u),o.translate(e.tx,e.ty);const d=t.scaleSymbolsProportionally?1:a;this.push(o,t.scaleSymbolsProportionally,d);for(const g of r){g?.symbol&&g.geometry||lt().error("Invalid marker graphic",g);let t=g.textString;if("number"==typeof t&&(t=t.toString()),this.drawSymbol(g.symbol,g.geometry,t),this._earlyReturn)break}this.pop()}drawTextSymbol(t,e,r){if(!t)return;if(!M(e))return;if(A(t.height,I.CIMTextSymbol.height)<=0)return;const i=ht.createIdentity();let s=A(t.angle);s=-s,s&&i.rotate(s*at);const n=A(t.offsetX),a=A(t.offsetY);(n||a)&&i.translate(n,a);const o=this.geomUnitsPerPoint();1!==o&&i.scale(o,o),i.translate(e.x,e.y),this.push(i),this.drawText(t,r),this.pop()}}class mt extends ct{constructor(t,e){super(t,e),this.reset()}reset(){this._xmin=this._ymin=1/0,this._xmax=this._ymax=-1/0,this._clipCount=0}envelope(){return new U(this._xmin,this._ymin,this._xmax-this._xmin,this._ymax-this._ymin)}bounds(){return l(this._xmin,this._ymin,this._xmax,this._ymax)}drawSolidFill(t){if(t&&!(this._clipCount>0))if(P(t))this._processPath(t.rings,0);else if(S(t))this._processPath(t.paths,0);else if(x(t)){const e=yt(t);e&&this._processPath(e.rings,0)}else console.error("drawSolidFill Unexpected geometry type!")}drawSolidStroke(t,e,r){if(!t||this._clipCount>0||null==r||r<=0)return;const i=Math.max(.5*this.transformSize(A(r,I.CIMSolidStroke.width)),.5*ot);if(P(t))this._processPath(t.rings,i);else if(S(t))this._processPath(t.paths,i);else if(x(t)){const e=yt(t);e&&this._processPath(e.rings,i)}else console.error("drawSolidStroke unexpected geometry type!")}drawMarkerLayer(t,e){P(e)&&t.markerPlacement&&("CIMMarkerPlacementInsidePolygon"===t.markerPlacement.type||"CIMMarkerPlacementPolygonCenter"===t.markerPlacement.type&&t.markerPlacement.clipAtBoundary)?this._processPath(e.rings,0):super.drawMarkerLayer(t,e)}drawHatchFill(t,e){this.drawSolidFill(t)}drawPictureFill(t,e){this.drawSolidFill(t)}drawGradientFill(t,e){this.drawSolidFill(t)}drawPictureStroke(t,e){this.drawSolidStroke(t,null,e.width)}drawGradientStroke(t,e){this.drawSolidStroke(t,null,e.width)}pushClipPath(t){this.drawSolidFill(t),this._clipCount++}popClipPath(){this._clipCount--}drawImage(t,e){const{url:r}=t,i=A(t.scaleX,1);let s=i*e,n=e;const a=this._resourceManager.getResource(r);if(null!=a){const t=a.height/a.width;s=i*(e?t>1?e:e/t:a.width),n=e?t>1?e*t:e:a.height}this._merge(this.transformPt([-s/2,-n/2]),0),this._merge(this.transformPt([-s/2,n/2]),0),this._merge(this.transformPt([s/2,-n/2]),0),this._merge(this.transformPt([s/2,n/2]),0)}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new F);const r=St(t);let[i,s]=this._textRasterizer.computeTextSize(e,r);i=n(i),s=n(s);const a=this.transformSize(1)*this.reverseTransformScalar(1);i*=a,s*=a;const o=t.horizontalAlignment??I.CIMTextSymbol.horizontalalignment,l=t.verticalAlignment??I.CIMTextSymbol.verticalalignment;let h=0;switch(o){case"Left":h=i/2;break;case"Right":h=-i/2}let c=0;switch(l){case"Bottom":c=s/2;break;case"Top":c=-s/2;break;case"Baseline":c=s/6}this._merge(this.transformPt([-i/2+h,-s/2+c]),0),this._merge(this.transformPt([-i/2+h,s/2+c]),0),this._merge(this.transformPt([i/2+h,-s/2+c]),0),this._merge(this.transformPt([i/2+h,s/2+c]),0)}_processPath(t,e){if(t)for(const r of t){const t=r?r.length:0;if(t>1){this._merge(this.transformPt(r[0]),e);for(let i=1;i<t;i++)this._merge(this.transformPt(r[i]),e)}}}_merge(t,e){t[0]-e<this._xmin&&(this._xmin=t[0]-e),t[0]+e>this._xmax&&(this._xmax=t[0]+e),t[1]-e<this._ymin&&(this._ymin=t[1]-e),t[1]+e>this._ymax&&(this._ymax=t[1]+e)}}class ft extends ct{constructor(){super(...arguments),this._hittestType="point",this._searchTarget=[],this._searchDistPoint=0,this._textInfo=null,this._svg=null,this._path=null,this._canvas=null}destroy(){this._svg=K(this._svg),this._path=null,this._canvas=null}hitTest(t,e,r,i){const{textInfo:s,mapRotation:o,resolution:l,searchDist:h,hittestType:c,isScreenAligned:m}=i;this._resetHittest();const f=l*a(1);switch(this.setGeomUnitsPerPoint(f),c){case"point":if(1!==t.length)return lt().error("Unexpected hittest area",t),!1;this._hittestType="point",this._searchDistPoint=h/2/f,this._searchTarget=[[t[0].x,t[0].y]];break;case"rect":if(4!==t.length)return lt().error("Unexpected hittest area",t),!1;this._hittestType="rect",this._searchDistPoint=0,this._searchTarget=t.map(t=>[t.x,t.y])}if(this._textInfo=s,this._mapRotation=m?o:0,!has("esri-mobile")){const t=n(et*window.devicePixelRatio),r=n(rt);!(("CIMLineSymbol"===e?.type||"CIMPolygonSymbol"===e?.type)&&e.symbolLayers?.some(Y))&&"CIMMeshSymbol"!==e?.type&&(W(e)??0)<r&&(this._searchDistPoint=t)}return this._earlyReturn=!1,this.drawSymbol(e,r),this._earlyReturn}executeEffects(t,e){return"CIMGeometricEffectDashes"===t.at(-1)?.type&&(t=t.slice(0,-1)),super.executeEffects(t,e)}drawSolidFill(t,e,r){null!=r?this._hittestSvgPath(t,r,!0):this._hitTestFill(t)}drawHatchFill(t,e){this._hitTestFill(t)}drawPictureFill(t,e){this._hitTestFill(t)}drawGradientFill(t,e){this._hitTestFill(t)}drawSolidStroke(t,e,r,i,s,n,a){null!=a?this._hittestSvgPath(t,a,!1,r):this._hitTestStroke(t,r)}drawPictureStroke(t,e){this._hitTestStroke(t,e.width)}drawGradientStroke(t,e){this._hitTestStroke(t,e.width)}drawMarkerLayer(t,e){t.markerPlacement&&("CIMMarkerPlacementInsidePolygon"===t.markerPlacement.type||"CIMMarkerPlacementPolygonCenter"===t.markerPlacement.type&&t.markerPlacement.clipAtBoundary)?this._hitTestFill(e):super.drawMarkerLayer(t,e)}drawTextSymbol(t,e,r){if(!t||!M(e))return;if(A(t.height,I.CIMTextSymbol.height)<=0)return;const i=ht.createIdentity(),s=this.geomUnitsPerPoint();1!==s&&i.scale(s,s),i.translate(e.x,e.y),this.push(i),this.drawText(t,r),this.pop()}pushClipPath(t){}popClipPath(){}drawImage(t,e){const{url:r}=t,i=A(t.scaleX,1),s=this._resourceManager.getResource(r);if(null==s||0===s.height||0===e)return;const n=e*this.geomUnitsPerPoint(),a=n*i*(s.width/s.height);if("point"===this._hittestType){const t=this.reverseTransformPt(this._searchTarget[0]),e=this._searchDistPoint;Math.abs(t[0])<a/2+e&&Math.abs(t[1])<n/2+e&&(this._earlyReturn=!0)}else{const t=a/2,e=n/2,r=[[-t,e],[t,e],[t,-e],[-t,-e],[-t,e]];bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,[r])&&(this._earlyReturn=!0)}}drawText(t,e){const r=this._textInfo;if(!r)return;const i=r.get(t);if(!i)return;if(!i.glyphMosaicItems.glyphs.length)return;const s=st(A(t.height,I.CIMTextSymbol.height)),{lineGapType:n,lineGap:a}=t,o=n?Pt(n,A(a),s):0,l=t.horizontalAlignment??I.CIMTextSymbol.horizontalalignment,h=t.verticalAlignment??I.CIMTextSymbol.verticalalignment,c="CIMBackgroundCallout"===t.callout?.type,m=it(i.glyphMosaicItems,{scale:s/tt,angle:A(t.angle),xOffset:A(t.offsetX),yOffset:A(t.offsetY),horizontalAlignment:l,verticalAlignment:h,maxLineWidth:nt(t.lineWidth),lineHeight:Z*Math.max(.25,Math.min(o||1,4)),decoration:t.font.decoration||"none",useCIMAngleBehavior:!1,hasBackground:c}),f=this.reverseScaleText(1);for(const u of m.glyphs){const t=u.offsets,e=[[t.topLeft[0]*f,-t.topLeft[1]*f],[t.topRight[0]*f,-t.topRight[1]*f],[t.bottomRight[0]*f,-t.bottomRight[1]*f],[t.bottomLeft[0]*f,-t.bottomLeft[1]*f],[t.topLeft[0]*f,-t.topLeft[1]*f]];if("point"===this._hittestType){gt(this.reverseTransformPt(this._searchTarget[0]),[e])&&(this._earlyReturn=!0)}else{bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,[e])&&(this._earlyReturn=!0)}}}_hitTestFill(t){let e=null;if(x(t)){const r=t;e=[[[r.xmin,r.ymin],[r.xmin,r.ymax],[r.xmax,r.ymax],[r.xmax,r.ymin],[r.xmin,r.ymin]]]}else if(P(t))e=t.rings;else{if(!S(t))return;e=t.paths}if("point"===this._hittestType){const t=this.reverseTransformPt(this._searchTarget[0]);if(gt(t,e)&&(this._earlyReturn=!0),!this._earlyReturn){pt(t,e,this.reverseTransformScalar(this._searchDistPoint)*this.prevGeomUnitsPerPoint())&&(this._earlyReturn=!0)}}else{bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,e)&&(this._earlyReturn=!0)}}_getSvgPath(){return null!=this._svg&&null!=this._path||(this._svg??=$(),this._path??=Q("path"),this._svg.appendChild(this._path)),this._path}_getCanvasContext(t,e){return this._canvas??=document.createElement("canvas"),this._canvas.width=t,this._canvas.height=e,this._canvas.getContext("2d",{willReadFrequently:!0})}_hittestSvgPath(t,e,r,i=0){const s=g();p(s,t);const n={x:s[0],y:s[1],width:s[2]-s[0],height:s[3]-s[1]},a=this._getSvgPath();a.setAttribute("d",e);const o=a.getBBox();if("point"===this._hittestType){const t=this.reverseTransformScalar(this._searchDistPoint)*this.prevGeomUnitsPerPoint(),s=this.reverseTransformPt(this._searchTarget[0]);let a=Math.max(o.width/n.width,o.height/n.height),l=1;const h=2*t*a;h<1&&(l=2/h,a*=l,o.x*=l,o.y*=l,o.width*=l,o.height*=l);const c=1+i*a/2,m=this._getCanvasContext(o.width+2*c,o.height+2*c);m.setTransform(l,0,0,l,-o.x+c,-o.y+c);const f=new Path2D(e);r?m.fill(f):(m.lineWidth=i*(a/l),m.stroke(f));const u=(n.width*a-o.width)/2,d=(n.height*a-o.height)/2,g=Math.floor((s[0]-n.x-t)*a-u+c),p=Math.floor((n.height-(s[1]-n.y)-t)*a+d+c),_=Math.ceil(2*t*a),y=Math.ceil(2*t*a),P=m.getImageData(g,p,_,y).data;for(let e=3;e<P.length;e+=4)if(P[e]>127.5)return void(this._earlyReturn=!0)}else{const t=[[n.x,n.y],[n.x,n.y+n.height],[n.x+n.width,n.y+n.height],[n.x+n.width,n.y],[n.x,n.y]];if(bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,[t]))return void(this._earlyReturn=!0)}}_hitTestStroke(t,e){let r=null;if(x(t)){const e=t;r=[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}else if(P(t))r=t.rings;else{if(!S(t))return;r=t.paths}if("point"===this._hittestType){pt(this.reverseTransformPt(this._searchTarget[0]),r,A(e,I.CIMSolidStroke.width)*this.geomUnitsPerPoint()/2+this.reverseTransformScalar(this._searchDistPoint)*this.prevGeomUnitsPerPoint())&&(this._earlyReturn=!0)}else{bt(this.isEmbedded()?this._searchTarget.map(t=>this.reverseTransformPt(t)):this._searchTarget,r)&&(this._earlyReturn=!0)}}_resetHittest(){this.setTransform(),this._hittestType="point",this._searchTarget=[],this._searchDistPoint=0,this._textInfo=null}}class ut extends ct{constructor(t,e,r,i){super(e,r),this._applyAdditionalRenderProps=i,this._colorSubstitutionHelper=new T,this._ctx=t}drawSolidFill(t,e){if(!t)return;if(P(t))this._buildPath(t.rings,!0);else if(S(t))this._buildPath(t.paths,!0);else if(x(t))this._buildPath(yt(t).rings,!0);else{if(!w(t))return;console.log("CanvasDrawHelper.drawSolidFill - No implementation!")}const r=this._ctx;r.fillStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+(e[3]??255)/255+")",r.fill("evenodd")}drawSolidStroke(t,e,r,i,s,n){if(!t||!e||0===r)return;if(P(t))this._buildPath(t.rings,!0);else if(S(t))this._buildPath(t.paths,!1);else{if(!x(t))return void console.log("CanvasDrawHelper.drawSolidStroke isn't implemented!");this._buildPath(yt(t).rings,!0)}const a=this._ctx;a.strokeStyle="string"==typeof e?e:"rgba("+Math.round(e[0])+","+Math.round(e[1])+","+Math.round(e[2])+","+(e[3]??255)/255+")",a.lineWidth=Math.max(this.transformSize(r),ot),this._setCapStyle(i),this._setJoinStyle(s),a.miterLimit=n,a.stroke()}pushClipPath(t){if(this._ctx.save(),P(t))this._buildPath(t.rings,!0);else if(S(t))this._buildPath(t.paths,!0);else{if(!x(t))return;this._buildPath(yt(t).rings,!0)}this._ctx.clip("evenodd")}popClipPath(){this._ctx.restore()}drawImage(t,e){const{colorSubstitutions:r,url:i,tintColor:s}=t,n=A(t.scaleX,1),a=this._resourceManager.getResource(i);if(null==a)return;let o=e*(a.width/a.height),l=e;e||(o=a.width,l=a.height);const h=j(i)||"src"in a&&j(a.src);let c="getFrame"in a?R(a):a;r&&(c=this._colorSubstitutionHelper.applyColorSubstitution(c,r)),this._applyAdditionalRenderProps&&!h&&s&&(c=this._colorSubstitutionHelper.tintImageData(c,s));const m=this.transformPt([0,0]),[f,u]=this.getTransformAngle(),d=this.transformSize(1),g=this._ctx;g.save(),g.setTransform({m11:n*d*f,m12:n*d*u,m21:-d*u,m22:d*f,m41:m[0],m42:m[1]}),g.drawImage(c,-o/2,-l/2,o,l),g.restore()}drawText(t,e){if(!e||0===e.length)return;this._textRasterizer||(this._textRasterizer=new F);const r=St(t,this.transformSize(n(1))),i=this._textRasterizer.rasterizeText(e,r);if(!i)return;const{size:s,anchorX:a,anchorY:o,canvas:l}=i,h=s[0]*(a+.5),c=s[1]*(o-.5),m=this._ctx,f=this.transformPt([0,0]),[u,d]=this.getTransformAngle(),g=1;m.save(),m.setTransform({m11:g*u,m12:g*d,m21:-g*d,m22:g*u,m41:f[0]-g*h,m42:f[1]+g*c}),m.drawImage(l,0,0),m.restore()}drawPictureFill(t,e){if(!t)return;let{colorSubstitutions:r,height:i,offsetX:s,offsetY:n,rotation:a,scaleX:o,tintColor:l,url:h}=e;const c=this._resourceManager.getResource(h);if(null==c)return;if(P(t))this._buildPath(t.rings,!0);else if(S(t))this._buildPath(t.paths,!0);else if(x(t))this._buildPath(yt(t).rings,!0);else{if(!w(t))return;console.log("CanvasDrawHelper.drawPictureFill - No implementation!")}const m=this._ctx,f=j(h)||"src"in c&&j(c.src);let u,d="getFrame"in c?R(c):c;if(r&&(d=this._colorSubstitutionHelper.applyColorSubstitution(d,r)),this._applyAdditionalRenderProps){f||l&&(d=this._colorSubstitutionHelper.tintImageData(d,l)),u=m.createPattern(d,"repeat");const t=this.transformSize(1);a||(a=0),s?s*=t:s=0,n?n*=t:n=0,i&&(i*=t);const e=i?i/c.height:1,r=o&&i?o*i/c.width:1;if(0!==a||1!==e||1!==r||0!==s||0!==n){const t=new DOMMatrix;t.rotateSelf(0,0,-a).translateSelf(s,n).scaleSelf(r,e,1),u.setTransform(t)}}else u=m.createPattern(d,"repeat");m.save(),m.fillStyle=u,m.fill("evenodd"),m.restore()}drawPictureStroke(t,r){if(!t)return;let{colorSubstitutions:i,capStyle:s,joinStyle:n,miterLimit:o,tintColor:l,url:h,width:c}=r;const m=this._resourceManager.getResource(h);if(null==m)return;let f;if(P(t))f=t.rings;else if(S(t))f=t.paths;else{if(!x(t))return w(t)?void console.log("CanvasDrawHelper.drawPictureStroke - No implementation!"):void 0;f=yt(t).rings}c||(c=m.width);const u=j(h)||"src"in m&&j(m.src);let d="getFrame"in m?R(m):m;i&&(d=this._colorSubstitutionHelper.applyColorSubstitution(d,i)),this._applyAdditionalRenderProps&&(u||l&&(d=this._colorSubstitutionHelper.tintImageData(d,l)));const g=Math.max(this.transformSize(a(c)),.5),p=g/d.width,_=this._ctx,y=_.createPattern(d,"repeat-y");let M,b;_.save(),this._setCapStyle(s),this._setJoinStyle(n),void 0!==o&&(_.miterLimit=o),_.lineWidth=g;for(let a of f)if(a=e(a),wt(a),a&&!(a.length<=1)){M=this.transformPt(a[0]);for(let t=1;t<a.length;t++){b=this.transformPt(a[t]);const e=_t(M,b),r=new DOMMatrix;r.translateSelf(0,M[1]-g/2).scaleSelf(p,p,1).rotateSelf(0,0,90-e),y.setTransform(r),_.strokeStyle=y,_.beginPath(),_.moveTo(M[0],M[1]),_.lineTo(b[0],b[1]),_.stroke(),M=b}}_.restore()}drawGradientFill(t,e){if(!t)return;let r;if(P(t))r=t.rings;else if(S(t))r=t.paths;else{if(!x(t))return void lt().error("Unable to draw gradient fill");r=yt(t).rings}this._buildPath(r,!0);const{angle:s,gradientMethod:n,gradientSize:o,gradientSizeUnits:l}=e,g=I.CIMGradientFill,p=e.gradientType??g.gradientType,_=-i(s??0),y=h();for(const i of r){const t=i?i.length:0;if(t>1)for(let e=0;e<t;e++){let t=this.transformPt(i[e]);"Linear"!==n&&"Rectangular"!==n||(t=z(t,-_)),c(y,t)}}const[w,M,b,T]=y,k=this._ctx;switch(k.save(),n){case"Buffered":lt().error(`Gradient method "${n}" currently unsupported.`);break;case"Linear":{const t=(M+T)/2,r="Absolute"===l?this.transformSize(a(o)):D(o,g.gradientSize)*(b-w),[i,s]="Discrete"===p?[b,b-r]:[w+r,w],n=z([i,t],_),h=z([s,t],_),c=k.createLinearGradient(n[0],n[1],h[0],h[1]);L(c,e),k.fillStyle=c,k.fill("evenodd");break}case"Circular":{const t=m(y),r=d(y)/2,i="Absolute"===l?this.transformSize(a(o)):D(o,g.gradientSize)*r,[s,n]="Discrete"===p?[r,r-i]:[i,0],h=k.createRadialGradient(t[0],t[1],s,t[0],t[1],n);L(h,e),k.fillStyle=h,k.fill("evenodd");break}case"Rectangular":{const r=m(y),i=r[0],s=r[1],n=z(r,_),h=(r,i,s,a,o,l,h,c)=>{k.save(),this.pushClipPath(t);const m=z([o,l],_),f=z([h,c],_);k.beginPath(),k.moveTo(n[0],n[1]),k.lineTo(m[0],m[1]),k.lineTo(f[0],f[1]),k.lineTo(n[0],n[1]),k.clip();const u=z([r,i],_),d=z([s,a],_),g=k.createLinearGradient(u[0],u[1],d[0],d[1]);L(g,e),k.fillStyle=g,k.fill("evenodd"),k.restore()};let c="Absolute"===l?this.transformSize(a(o)):D(o,g.gradientSize)*(f(y)/2),[d,P]="Discrete"===p?[b,b-c]:[i+c,i];h(d,s,P,s,b,M,b,T),[d,P]="Discrete"===p?[w,w+c]:[i-c,i],h(d,s,P,s,w,T,w,M),c="Absolute"===l?this.transformSize(a(o)):D(o,g.gradientSize)*(u(y)/2);let[S,x]="Discrete"===p?[T,T-c]:[s+c,s];h(i,S,i,x,b,T,w,T),[S,x]="Discrete"===p?[M,M+c]:[s-c,s],h(i,S,i,x,w,M,b,M);break}}k.restore()}drawGradientStroke(t,r){const{capStyle:i,gradientMethod:s,gradientSize:n,gradientSizeUnits:o,joinStyle:l,miterLimit:h,width:c}=r;if(!t||0===c)return;let m;if(P(t))m=t.rings;else if(S(t))m=t.paths;else{if(!x(t))return void lt().error("Unable to draw gradient stroke");m=yt(t).rings}const f=r.gradientType??I.CIMGradientStroke.gradientType,u=Math.max(this.transformSize(a(c)),.5),d=this._ctx;let g,p;d.save(),this._setCapStyle(i),this._setJoinStyle(l),void 0!==h&&(d.miterLimit=h),d.lineWidth=u;for(let _ of m){if(_=e(_),wt(_),!_||_.length<=1)continue;let t=0;g=this.transformPt(_[0]);for(let e=1;e<_.length;e++){p=this.transformPt(_[e]);const r=p[0]-g[0],i=p[1]-g[1];t+=Math.sqrt(r*r+i*i),g=p}const i="Absolute"===o?this.transformSize(a(n)):D(n,I.CIMGradientStroke.gradientSize)*("AcrossLine"===s?u:t);let l=0;g=this.transformPt(_[0]);for(let e=1;e<_.length;e++){p=this.transformPt(_[e]);const n=p[0]-g[0],a=p[1]-g[1],o=Math.sqrt(n*n+a*a);let h,c,m,y;switch(s){case"AcrossLine":{const[t,e]=z([n/o,a/o],-Math.PI/2),r=u/2,s="Discrete"===f?r:i-r;h=(g[0]+p[0])/2+t*s,c=(g[1]+p[1])/2+e*s,m=h-t*i,y=c-e*i;break}case"AlongLine":{const e=n/o,r=a/o;"Discrete"===f?(h=g[0]-e*l,c=g[1]-r*l,m=h+e*i,y=c+r*i):(m=g[0]+e*(t-l),y=g[1]+r*(t-l),h=m-e*i,c=y-r*i);break}default:return lt().error("Unrecognized gradient method:",s),void d.restore()}const P=d.createLinearGradient(h,c,m,y);L(P,r),d.strokeStyle=P,d.beginPath(),d.moveTo(g[0],g[1]),d.lineTo(p[0],p[1]),d.stroke(),l+=o,g=p}}d.restore()}_buildPath(t,e){const r=this._ctx;if(r.beginPath(),t)for(const i of t){const t=i?i.length:0;if(t>1){let s=this.transformPt(i[0]);r.moveTo(s[0],s[1]);for(let e=1;e<t;e++)s=this.transformPt(i[e]),r.lineTo(s[0],s[1]);e&&r.closePath()}}}_setCapStyle(t){switch(t){case"Butt":this._ctx.lineCap="butt";break;case"Round":this._ctx.lineCap="round";break;case"Square":this._ctx.lineCap="square"}}_setJoinStyle(t){switch(t){case"Bevel":this._ctx.lineJoin="bevel";break;case"Round":this._ctx.lineJoin="round";break;case"Miter":this._ctx.lineJoin="miter"}}}function dt(t,e,r){let i=A(t.separation,I.CIMHatchFill.separation)*r,s=A(t.rotation);if(0===i)return null;i<0&&(i=-i);let n=0;const a=.5*i;for(;n>a;)n-=i;for(;n<-a;)n+=i;const o=g();p(o,e),o[0]-=a,o[1]-=a,o[2]+=a,o[3]+=a;const l=[[o[0],o[1]],[o[0],o[3]],[o[2],o[3]],[o[2],o[1]]];for(;s>180;)s-=180;for(;s<0;)s+=180;const h=Math.cos(s*at),c=Math.sin(s*at),m=-i*c,f=i*h;let u,d,_,y;n=A(t.offsetX)*r*c-A(t.offsetY)*r*h,u=_=Number.MAX_VALUE,d=y=-Number.MAX_VALUE;for(const g of l){const t=g[0],e=g[1],r=h*t+c*e,i=-c*t+h*e;u=Math.min(u,r),_=Math.min(_,i),d=Math.max(d,r),y=Math.max(y,i)}_=Math.floor(_/i)*i;let P=h*u-c*_-m*n/i,S=c*u+h*_-f*n/i,x=h*d-c*_-m*n/i,w=c*d+h*_-f*n/i;const M=1+Math.round((y-_)/i),b=[];for(let g=0;g<M;g++)P+=m,S+=f,x+=m,w+=f,b.push([[P,S],[x,w]]);return{paths:b}}function gt(t,e){let r=0;for(const i of e){const e=i.length;for(let s=1;s<e;s++){const e=i[s-1],n=i[s];if(e[1]>t[1]==n[1]>t[1])continue;(n[0]-e[0])*(t[1]-e[1])-(n[1]-e[1])*(t[0]-e[0])>0?r++:r--}}return 0!==r}function pt(t,e,r){for(const i of e){const e=i.length;for(let s=1;s<e;s++){const e=i[s-1],n=i[s];let a=(n[0]-e[0])*(n[0]-e[0])+(n[1]-e[1])*(n[1]-e[1]);if(0===a)continue;a=Math.sqrt(a);const o=((n[0]-e[0])*(t[1]-e[1])-(n[1]-e[1])*(t[0]-e[0]))/a;if(Math.abs(o)<r){const i=((n[0]-e[0])*(t[0]-e[0])+(n[1]-e[1])*(t[1]-e[1]))/a;if(i>-r&&i<a+r)return!0}}}return!1}function _t(t,e){const r=e[0]-t[0],i=e[1]-t[1];return 180/Math.PI*Math.atan2(i,r)}const yt=t=>t?{spatialReference:t.spatialReference,rings:[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]]}:null,Pt=(t,e,r)=>{switch(t){case"ExtraLeading":return 1+e/r;case"Multiple":return e;case"Exact":return e/r}};function St(e,r=1){const i=H(e),s=E(e.fontStyleName),n=e.fontFamilyName??t,{weight:a,style:o}=s,l=r*(e.height||5),h=B(e.horizontalAlignment),c=X(e.verticalAlignment),m=J(e),f=J(e.haloSymbol),u=null!=f?r*(e.haloSize??0):0,d=N(e.symbol),g=r*(O(e.symbol)||0),p="CIMBackgroundCallout"===e.callout?.type?e.callout.backgroundSymbol:null,_=J(p),y=O(p),P=N(p);return{color:m,size:l,horizontalAlignment:h,verticalAlignment:c,font:{family:n,style:V(o),weight:q(a),decoration:i},outline:{size:g||0,color:d},halo:{size:u||0,color:f,style:o},backgroundColor:_,borderLine:null!=y&&null!=P?{size:y,color:P}:null,pixelRatio:1,premultiplyColors:!0}}const xt=1e-4;function wt(t){let e,r,i,s,n,a=t[0],o=1;for(;o<t.length;)e=t[o][0]-a[0],r=t[o][1]-a[1],s=0!==e?r/e:Math.PI/2,void 0!==i&&Math.abs(s-i)<=xt?(t.splice(o-1,1),a=n):(n=a,a=t[o],o++),i=s}function Mt(t){const e=1e-6,r=t[0],i=t[t.length-1];return Math.abs(r[0]-i[0])<=e&&Math.abs(r[1]-i[1])<=e}function bt(t,e){t.length>1&&!Mt(t)&&(t=[...t,t[0]]);for(let r=0;r<e.length;r++){const i=e[r],s=i.length;for(const e of i)if(gt(e,[t]))return!0;if(Mt(i))for(const r of t)if(gt(r,e))return!0;for(let e=1;e<s;e++){const r=i[e-1],s=i[e];for(let e=0;e<t.length;e++){const i=t[e],n=t[(e+1)%t.length];if(y(r,s,i,n))return!0}}}return!1}export{ct as CIMSymbolDrawHelper,ut as CanvasDrawHelper,mt as EnvDrawHelper,ft as HittestDrawHelper,ht as Transformation,at as cDegToRad,Pt as lineGapType2LineHeight};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t,__param as e}from"tslib";import{animationDebugFlags as i}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{location as s,input as o,ComputeVertexInput as l}from"../../GraphShaderModule.js";import{Vec2 as r,Float as a,Vec4 as n,ifElse as d,or as u,Bool as m,mix as p,Mat3 as h,lessThan as c,greaterThan as x,Vec3 as y,distance as f,negate as w,step as g}from"../../graph/glsl.js";import{AAnimatedVertexInput as v,AAnimatedShader as b,getValue as S,AAnimatedFragmentInput as _}from"./AAnimatedShader.js";import{MarkerConstants as V}from"../markers/markerConstants.js";import{noHit as z,trueHit as C}from"../shaders/constants.js";import{isRectHittest as P,hittestScreenRect as N,distPointTriangle as R,xyToBarycentric as k,inTriangle as M,failHittest as q}from"../shaders/hittestUtils.js";import{getBitBool as D}from"../shaders/utils.js";import{getVisualVariableColor as j,getVisualVariableOpacity as F}from"../shaders/vvUtils.js";class T extends v{}t([s(9,r)],T.prototype,"uv",void 0),t([s(10,a)],T.prototype,"angle",void 0);class U extends l{}t([s(11,r)],U.prototype,"offsetNextVertex1",void 0),t([s(12,r)],U.prototype,"offsetNextVertex2",void 0),t([s(13,r)],U.prototype,"textureUVNextVertex1",void 0),t([s(14,r)],U.prototype,"textureUVNextVertex2",void 0);class A extends _{}function I(t,e,i,s){return e.multiply(t.x).add(i.multiply(t.y)).add(s.multiply(t.z))}class L extends b{constructor(){super(...arguments),this.type="AnimatedMarkerShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"],uv:["textureUVNextVertex1","textureUVNextVertex2"]}}vertex(t,e){const i=t.uv.divide(this.mosaicInfo.size),{position:s,animationPointer:o,evalParams:l,isOutline:r,unscaledDistanceToPx:c,vvScale:x,strokeWidth:y,scaleSymbolsProportionally:f,scale:w,isSDF:g,baseSize:v,clip:b}=this._vertexPreamble(t,t.angle,t.lineLength||new a(0)),_=this._toNdc(s);let z=S(o,1,l);z=new n(z.rgb.multiply(z.a),z.a);let C=d(D(t.bitset,V.bitset.colorLocked),z,S(o,2,l));C=new n(C.rgb.multiply(C.a),C.a);let P=S(o,3,l);P=new n(P.rgb.multiply(P.a),P.a);const N=S(o,4,l).a,R=S(o,5,l).a,k=j(this,t.id,z,u(D(t.bitset,V.bitset.colorLocked),new m(r))),M=p(k,C,P),q=F(this,t.id),T=p(q,N,R),U=M.multiply(T),A=this.clip(t.id,t.zoomRange).add(b.multiply(2)),I=c.multiply(x);return{glPosition:new n(_,A,1),uv:i,color:U.multiply(new a(1).subtract(r)),outlineColor:U.multiply(r),distanceToPx:I,strokeWidth:y.multiply(p(new a(1),w,f)),isOutline:r,isSDF:g,...this.maybeRunHittest(t,e,{pos:t.pos,size:v,sizeCorrection:new a(1),isMapAligned:new a(1),vvRotationMat3:new h(1,0,0,0,1,0,0,0,1),placementMat3:new h(1,0,0,0,1,0,0,0,1),outlineSize:new a(1),distanceToPx:I,isSDF:g})}}fragment(t){let e=this._getColor(t.uv,{color:t.color,distanceToPx:t.distanceToPx,isSDF:t.isSDF,outlineColor:t.outlineColor,outlineSize:t.strokeWidth});return i.spotlightAnimatedSymbols&&(e=e.add(new n(0,.3,0,.3))),this.getFragmentOutput(e,t)}hittest(t,e,i){const{pos0:s,pos1:o,pos2:l}=this.computeHittestTriangle(t,e,i),r=P(this.hittestRequest);return d(r,()=>{const{tlbr:t}=this.hittestRequest;return N(s,o,l,t)},()=>{const s=d(c(i.size,this.hittestRequest.smallSymbolSizeThreshold),this._hittestSmallMarker(t,e,i),this._hittestMarker(t,e,i));return d(x(s,this.hittestRequest.distance),new a(z),new a(C))})}_hittestSmallMarker(t,e,i){const{position:s,distance:o,smallSymbolDistance:l}=this.hittestRequest,r=o.subtract(l),{viewMat3:a,tileMat3:n}=this.view,d=a.multiply(n).multiply(new y(i.pos,1)).xy,u=i.size.multiply(.5);return f(d,s).subtract(u).add(r)}_hittestMarker(t,e,i){const s=this._vertexPreamble({...t},t.angle,new a(0)).position,o=this._vertexPreamble({...t,offset:e.offsetNextVertex1},t.angle,new a(0)).position,l=this._vertexPreamble({...t,offset:e.offsetNextVertex2},t.angle,new a(0)).position,r=this.hittestRequest.position,n=this.hittestRequest.distance,u=R(r,s,o,l);return d(x(u,n),u,this._hittestSamples(s,o,l,t,e,i))}_hittestSamples(t,e,i,s,o,l){const{outlineSize:d,isSDF:u,distanceToPx:m}=l,p=this.hittestRequest.position,h=this.hittestRequest.distance,c=k(p.add(new r(w(h),w(h))),t,e,i),x=k(p.add(new r(0,w(h))),t,e,i),y=k(p.add(new r(h,w(h))),t,e,i),f=k(p.add(new r(w(h),0)),t,e,i),v=k(p,t,e,i),b=k(p.add(new r(h,0)),t,e,i),S=k(p.add(new r(w(h),h)),t,e,i),_=k(p.add(new r(0,h)),t,e,i),V=k(p.add(new r(h,h)),t,e,i),z=s.uv.divide(this.mosaicInfo.size),C=o.textureUVNextVertex1.divide(this.mosaicInfo.size),P=o.textureUVNextVertex2.divide(this.mosaicInfo.size),N={color:new n(1,1,1,1),outlineSize:d,outlineColor:new n(1,1,1,1),isSDF:u,distanceToPx:m};let R=new a(0);return R=R.add(M(c).multiply(this._getColor(I(c,z,C,P),N).a)),R=R.add(M(x).multiply(this._getColor(I(x,z,C,P),N).a)),R=R.add(M(y).multiply(this._getColor(I(y,z,C,P),N).a)),R=R.add(M(f).multiply(this._getColor(I(f,z,C,P),N).a)),R=R.add(M(v).multiply(this._getColor(I(v,z,C,P),N).a)),R=R.add(M(b).multiply(this._getColor(I(b,z,C,P),N).a)),R=R.add(M(S).multiply(this._getColor(I(S,z,C,P),N).a)),R=R.add(M(_).multiply(this._getColor(I(_,z,C,P),N).a)),R=R.add(M(V).multiply(this._getColor(I(V,z,C,P),N).a)),g(R,new a(.05)).multiply(q(this.hittestRequest))}}t([e(0,o(T)),e(1,o(U))],L.prototype,"vertex",null),t([e(0,o(A))],L.prototype,"fragment",null);export{A as AnimatedMarkerFragmentInput,L as AnimatedMarkerShader,T as AnimatedMarkerVertexInput};
2
+ import{__decorate as t,__param as e}from"tslib";import{animationDebugFlags as i}from"../../../../../../../symbols/cim/animationDebugFlags.js";import{location as s,input as o,ComputeVertexInput as l}from"../../GraphShaderModule.js";import{Vec2 as r,Float as a,Vec4 as n,ifElse as d,or as u,Bool as m,mix as p,Mat3 as h,lessThan as c,Vec3 as x,distance as y,greaterThan as w,negate as f}from"../../graph/glsl.js";import{AAnimatedVertexInput as g,AAnimatedShader as v,getValue as b,AAnimatedFragmentInput as S}from"./AAnimatedShader.js";import{MarkerConstants as _}from"../markers/markerConstants.js";import{trueHit as V,noHit as z}from"../shaders/constants.js";import{isRectHittest as C,hittestMarkerScreenRect as P,distPointTriangle as N,xyToBarycentric as k,inTriangle as R}from"../shaders/hittestUtils.js";import{getBitBool as M}from"../shaders/utils.js";import{getVisualVariableColor as D,getVisualVariableOpacity as j}from"../shaders/vvUtils.js";class q extends g{}t([s(9,r)],q.prototype,"uv",void 0),t([s(10,a)],q.prototype,"angle",void 0);class F extends l{}t([s(11,r)],F.prototype,"offsetNextVertex1",void 0),t([s(12,r)],F.prototype,"offsetNextVertex2",void 0),t([s(13,r)],F.prototype,"textureUVNextVertex1",void 0),t([s(14,r)],F.prototype,"textureUVNextVertex2",void 0);class T extends S{}function U(t,e,i,s){return e.multiply(t.x).add(i.multiply(t.y)).add(s.multiply(t.z))}class A extends v{constructor(){super(...arguments),this.type="AnimatedMarkerShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"],uv:["textureUVNextVertex1","textureUVNextVertex2"]}}vertex(t,e){const i=t.uv.divide(this.mosaicInfo.size),{position:s,animationPointer:o,evalParams:l,isOutline:r,unscaledDistanceToPx:c,vvScale:x,strokeWidth:y,scaleSymbolsProportionally:w,scale:f,isSDF:g,baseSize:v,clip:S}=this._vertexPreamble(t,t.angle,t.lineLength||new a(0)),V=this._toNdc(s);let z=b(o,1,l);z=new n(z.rgb.multiply(z.a),z.a);let C=d(M(t.bitset,_.bitset.colorLocked),z,b(o,2,l));C=new n(C.rgb.multiply(C.a),C.a);let P=b(o,3,l);P=new n(P.rgb.multiply(P.a),P.a);const N=b(o,4,l).a,k=b(o,5,l).a,R=D(this,t.id,z,u(M(t.bitset,_.bitset.colorLocked),new m(r))),q=p(R,C,P),F=j(this,t.id),T=p(F,N,k),U=q.multiply(T),A=this.clip(t.id,t.zoomRange).add(S.multiply(2)),I=c.multiply(x);return{glPosition:new n(V,A,1),uv:i,color:U.multiply(new a(1).subtract(r)),outlineColor:U.multiply(r),distanceToPx:I,strokeWidth:y.multiply(p(new a(1),f,w)),isOutline:r,isSDF:g,...this.maybeRunHittest(t,e,{pos:t.pos,size:v,sizeCorrection:new a(1),isMapAligned:new a(1),vvRotationMat3:new h(1,0,0,0,1,0,0,0,1),placementMat3:new h(1,0,0,0,1,0,0,0,1),outlineSize:new a(1),distanceToPx:I,isSDF:g})}}fragment(t){let e=this._getColor(t.uv,{color:t.color,distanceToPx:t.distanceToPx,isSDF:t.isSDF,outlineColor:t.outlineColor,outlineSize:t.strokeWidth});return i.spotlightAnimatedSymbols&&(e=e.add(new n(0,.3,0,.3))),this.getFragmentOutput(e,t)}hittest(t,e,i){const{pos0:s,pos1:o,pos2:l}=this.computeHittestTriangle(t,e,i),r=C(this.hittestRequest);return d(r,()=>{const{tlbr:t}=this.hittestRequest;return P(s,o,l,t)},()=>d(c(i.size,this.hittestRequest.smallSymbolSizeThreshold),this._hittestSmallMarker(t,e,i),this._hittestMarker(t,e,i)))}_hittestSmallMarker(t,e,i){const{position:s,distance:o,smallSymbolDistance:l}=this.hittestRequest,r=o.subtract(l),{viewMat3:n,tileMat3:u}=this.view,m=n.multiply(u).multiply(new x(i.pos,1)).xy,p=i.size.multiply(.5),h=y(m,s).subtract(p).add(r);return d(w(h,this.hittestRequest.distance),new a(z),new a(V))}_hittestMarker(t,e,i){const s=this._vertexPreamble({...t},t.angle,new a(0)).position,o=this._vertexPreamble({...t,offset:e.offsetNextVertex1},t.angle,new a(0)).position,l=this._vertexPreamble({...t,offset:e.offsetNextVertex2},t.angle,new a(0)).position,r=this.hittestRequest.position,n=this.hittestRequest.distance,u=N(r,s,o,l);return d(w(u,n),new a(z),this._hittestSamples(s,o,l,t,e,i))}_hittestSamples(t,e,i,s,o,l){const{outlineSize:u,isSDF:m,distanceToPx:p}=l,h=this.hittestRequest.position,c=this.hittestRequest.distance,x=k(h.add(new r(f(c),f(c))),t,e,i),y=k(h.add(new r(0,f(c))),t,e,i),g=k(h.add(new r(c,f(c))),t,e,i),v=k(h.add(new r(f(c),0)),t,e,i),b=k(h,t,e,i),S=k(h.add(new r(c,0)),t,e,i),_=k(h.add(new r(f(c),c)),t,e,i),C=k(h.add(new r(0,c)),t,e,i),P=k(h.add(new r(c,c)),t,e,i),N=s.uv.divide(this.mosaicInfo.size),M=o.textureUVNextVertex1.divide(this.mosaicInfo.size),D=o.textureUVNextVertex2.divide(this.mosaicInfo.size),j={color:new n(1,1,1,1),outlineSize:u,outlineColor:new n(1,1,1,1),isSDF:m,distanceToPx:p};let q=new a(0);return q=q.add(R(x).multiply(this._getColor(U(x,N,M,D),j).a)),q=q.add(R(y).multiply(this._getColor(U(y,N,M,D),j).a)),q=q.add(R(g).multiply(this._getColor(U(g,N,M,D),j).a)),q=q.add(R(v).multiply(this._getColor(U(v,N,M,D),j).a)),q=q.add(R(b).multiply(this._getColor(U(b,N,M,D),j).a)),q=q.add(R(S).multiply(this._getColor(U(S,N,M,D),j).a)),q=q.add(R(_).multiply(this._getColor(U(_,N,M,D),j).a)),q=q.add(R(C).multiply(this._getColor(U(C,N,M,D),j).a)),q=q.add(R(P).multiply(this._getColor(U(P,N,M,D),j).a)),d(w(q,new a(.05)),new a(V),new a(z))}}t([e(0,o(q)),e(1,o(F))],A.prototype,"vertex",null),t([e(0,o(T))],A.prototype,"fragment",null);export{T as AnimatedMarkerFragmentInput,A as AnimatedMarkerShader,q as AnimatedMarkerVertexInput};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t,__param as e}from"tslib";import{tileSize as o}from"../../../definitions.js";import{location as s,uniform as i,texture as r,define as d,input as l,UniformGroup as n,TextureGroup as a,FragmentOutput as p}from"../../GraphShaderModule.js";import{Float as h,FixedArray as u,Vec4 as c,Sampler2D as m,Mat3 as y,Vec3 as v,texture2D as g,Mat4 as x,step as w,dot as f,max as T}from"../../graph/glsl.js";import{FeatureFragmentInput as A,FeatureVertexInput as D,AFeatureShader as b}from"../shaders/AFeatureShader.js";import{failHittest as C}from"../shaders/hittestUtils.js";import{max4 as j}from"../shaders/utils.js";class V extends D{}t([s(3,h)],V.prototype,"inverseArea",void 0);class F extends A{}class O extends n{}t([i(u.ofType(c,2))],O.prototype,"isActive",void 0),t([i(u.ofType(c,8))],O.prototype,"colors",void 0),t([i(h)],O.prototype,"dotValue",void 0);class R extends n{}t([i(h)],R.prototype,"tileZoomFactor",void 0),t([i(h)],R.prototype,"pixelRatio",void 0),t([i(h)],R.prototype,"tileDotsOverArea",void 0);class S extends a{}t([r(m)],S.prototype,"dotTexture0",void 0),t([r(m)],S.prototype,"dotTexture1",void 0);class _ extends b{constructor(){super(...arguments),this.type="DotDensityPolygonShader"}_dotThreshold(t,e,o){return t.divide(e).divide(o)}vertex(t){const e=new y(2/o,0,0,0,-2/o,0,-1,1,1).multiply(new v(t.pos,1)),s=this.clip(t.id),i=new c(e.xy,s,1),r=this.getVVData(t.id).multiply(this.instance.isActive.get(0)).multiply(t.inverseArea),d=this.storageTextures.getDataDrivenData0(this.getAttributeDataCoords(t.id)).multiply(this.instance.isActive.get(1)).multiply(t.inverseArea),l=this.draw.tileZoomFactor.multiply(o).divide(this.draw.pixelRatio),n=this._dotThreshold(r,this.instance.dotValue,this.draw.tileDotsOverArea),a=this._dotThreshold(d,this.instance.dotValue,this.draw.tileDotsOverArea),p=t.pos.add(.5).divide(l);return{glPosition:i,color:new c(0,0,0,0),textureCoords:p,thresholds0:n,thresholds1:a}}fragment(t){const e=new p,o=g(this.drawTextures.dotTexture0,t.textureCoords),s=g(this.drawTextures.dotTexture1,t.textureCoords),i=t.thresholds0.subtract(o),r=t.thresholds1.subtract(s);let d;const l=x.fromColumns(this.instance.colors.get(0),this.instance.colors.get(1),this.instance.colors.get(2),this.instance.colors.get(3)),n=x.fromColumns(this.instance.colors.get(4),this.instance.colors.get(5),this.instance.colors.get(6),this.instance.colors.get(7));if(this.blending){const t=w(new h(0),i),e=w(new h(0),r),o=f(t,i).add(f(e,r)),s=w(o,new h(0)),a=new h(1).subtract(s),p=o.add(s),u=i.multiply(t).divide(p),c=r.multiply(e).divide(p),m=l.multiply(u).add(n.multiply(c));d=a.multiply(m)}else{const t=T(j(i),j(r)),e=w(t,new h(0)),o=new h(1).subtract(e),s=w(t,i),a=w(t,r),p=l.multiply(s).add(n.multiply(a));d=o.multiply(p)}return e.fragColor=d,e}hittest(t){return C(this.hittestRequest)}}t([d],_.prototype,"blending",void 0),t([i(O)],_.prototype,"instance",void 0),t([i(R)],_.prototype,"draw",void 0),t([r(S)],_.prototype,"drawTextures",void 0),t([e(0,l(V))],_.prototype,"vertex",null),t([e(0,l(A))],_.prototype,"fragment",null);export{S as DotDensityPolygonDrawTextures,R as DotDensityPolygonDrawUniforms,F as DotDensityPolygonFragmentInput,O as DotDensityPolygonInstanceUniforms,_ as DotDensityPolygonShader,V as DotDensityPolygonVertexInput};
2
+ import{__decorate as t,__param as e}from"tslib";import{tileSize as o}from"../../../definitions.js";import{location as s,uniform as i,texture as r,define as d,input as l,UniformGroup as n,TextureGroup as a,FragmentOutput as p}from"../../GraphShaderModule.js";import{Float as h,FixedArray as c,Vec4 as u,Sampler2D as m,Mat3 as y,Vec3 as v,texture2D as g,Mat4 as x,step as w,dot as f,max as T}from"../../graph/glsl.js";import{FeatureFragmentInput as A,FeatureVertexInput as D,AFeatureShader as b}from"../shaders/AFeatureShader.js";import{noHit as C}from"../shaders/constants.js";import{max4 as j}from"../shaders/utils.js";class V extends D{}t([s(3,h)],V.prototype,"inverseArea",void 0);class F extends A{}class O extends n{}t([i(c.ofType(u,2))],O.prototype,"isActive",void 0),t([i(c.ofType(u,8))],O.prototype,"colors",void 0),t([i(h)],O.prototype,"dotValue",void 0);class S extends n{}t([i(h)],S.prototype,"tileZoomFactor",void 0),t([i(h)],S.prototype,"pixelRatio",void 0),t([i(h)],S.prototype,"tileDotsOverArea",void 0);class _ extends a{}t([r(m)],_.prototype,"dotTexture0",void 0),t([r(m)],_.prototype,"dotTexture1",void 0);class P extends b{constructor(){super(...arguments),this.type="DotDensityPolygonShader"}_dotThreshold(t,e,o){return t.divide(e).divide(o)}vertex(t){const e=new y(2/o,0,0,0,-2/o,0,-1,1,1).multiply(new v(t.pos,1)),s=this.clip(t.id),i=new u(e.xy,s,1),r=this.getVVData(t.id).multiply(this.instance.isActive.get(0)).multiply(t.inverseArea),d=this.storageTextures.getDataDrivenData0(this.getAttributeDataCoords(t.id)).multiply(this.instance.isActive.get(1)).multiply(t.inverseArea),l=this.draw.tileZoomFactor.multiply(o).divide(this.draw.pixelRatio),n=this._dotThreshold(r,this.instance.dotValue,this.draw.tileDotsOverArea),a=this._dotThreshold(d,this.instance.dotValue,this.draw.tileDotsOverArea),p=t.pos.add(.5).divide(l);return{glPosition:i,color:new u(0,0,0,0),textureCoords:p,thresholds0:n,thresholds1:a}}fragment(t){const e=new p,o=g(this.drawTextures.dotTexture0,t.textureCoords),s=g(this.drawTextures.dotTexture1,t.textureCoords),i=t.thresholds0.subtract(o),r=t.thresholds1.subtract(s);let d;const l=x.fromColumns(this.instance.colors.get(0),this.instance.colors.get(1),this.instance.colors.get(2),this.instance.colors.get(3)),n=x.fromColumns(this.instance.colors.get(4),this.instance.colors.get(5),this.instance.colors.get(6),this.instance.colors.get(7));if(this.blending){const t=w(new h(0),i),e=w(new h(0),r),o=f(t,i).add(f(e,r)),s=w(o,new h(0)),a=new h(1).subtract(s),p=o.add(s),c=i.multiply(t).divide(p),u=r.multiply(e).divide(p),m=l.multiply(c).add(n.multiply(u));d=a.multiply(m)}else{const t=T(j(i),j(r)),e=w(t,new h(0)),o=new h(1).subtract(e),s=w(t,i),a=w(t,r),p=l.multiply(s).add(n.multiply(a));d=o.multiply(p)}return e.fragColor=d,e}hittest(t){return new h(C)}}t([d],P.prototype,"blending",void 0),t([i(O)],P.prototype,"instance",void 0),t([i(S)],P.prototype,"draw",void 0),t([r(_)],P.prototype,"drawTextures",void 0),t([e(0,l(V))],P.prototype,"vertex",null),t([e(0,l(A))],P.prototype,"fragment",null);export{_ as DotDensityPolygonDrawTextures,S as DotDensityPolygonDrawUniforms,F as DotDensityPolygonFragmentInput,O as DotDensityPolygonInstanceUniforms,P as DotDensityPolygonShader,V as DotDensityPolygonVertexInput};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t,__param as e}from"tslib";import{location as i,option as o,uniform as s,texture as l,input as r,ComputeVertexInput as a}from"../../GraphShaderModule.js";import{Vec4 as p,Vec2 as n,Float as u,Sampler2D as d,Vec3 as m,min as y,max as h,Mat3 as c,ifElse as x,lessThan as v,greaterThan as w,equal as V,texture2D as f,clamp as S,abs as b,mix as g,distance as C,negate as M,step as z}from"../../graph/glsl.js";import{MarkerConstants as _}from"./markerConstants.js";import{FeatureVertexInput as R,AFeatureShader as j,FeatureFragmentInput as U}from"../shaders/AFeatureShader.js";import{c256ToRad as N,noHit as T,trueHit as D,softEdgeRatio as F}from"../shaders/constants.js";import{isRectHittest as q,hittestScreenRect as O,distPointTriangle as k,xyToBarycentric as A,inTriangle as P,failHittest as I}from"../shaders/hittestUtils.js";import{MosaicInfo as H}from"../shaders/MosaicInfo.js";import{getBit as G,getBitBool as L,rgba2float as B}from"../shaders/utils.js";import{VisualVariableColor as E}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as J}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as K}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as Q}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as W}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as X}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as Y}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as Z,getVisualVariableColor as $,getVisualVariableSize as tt,getVisualVariableRotation as et}from"../shaders/vvUtils.js";class it extends R{}t([i(3,p)],it.prototype,"color",void 0),t([i(4,p)],it.prototype,"outlineColor",void 0),t([i(5,n)],it.prototype,"offset",void 0),t([i(6,n)],it.prototype,"textureUV",void 0),t([i(7,p)],it.prototype,"sizing",void 0),t([i(8,u)],it.prototype,"placementAngle",void 0),t([i(9,u)],it.prototype,"sdfDecodeCoeff",void 0),t([i(10,n)],it.prototype,"zoomRange",void 0);class ot extends a{}t([i(11,n)],ot.prototype,"offsetNextVertex1",void 0),t([i(12,n)],ot.prototype,"offsetNextVertex2",void 0),t([i(13,n)],ot.prototype,"textureUVNextVertex1",void 0),t([i(14,n)],ot.prototype,"textureUVNextVertex2",void 0);class st extends U{}function lt(t,e,i,o){return e.multiply(t.x).add(i.multiply(t.y)).add(o.multiply(t.z))}function rt(t){return t.multiply(t).divide(128)}class at extends j{constructor(){super(...arguments),this.type="MarkerShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"],textureUV:["textureUVNextVertex1","textureUVNextVertex2"]}}vertex(t,e){const i=rt(t.sizing.x),o=rt(t.sizing.y),s=rt(t.sizing.z),l=t.placementAngle,r=G(t.bitset,_.bitset.isSDF),a=G(t.bitset,_.bitset.isMapAligned),n=G(t.bitset,_.bitset.scaleSymbolsProportionally),d=L(t.bitset,_.bitset.colorLocked),x=Z(this,t.id),v=$(this,t.id,t.color,d).multiply(x),w=this.view.displayViewScreenMat3.multiply(new m(t.pos.xy,1)),V=tt(this,t.id,s).divide(s),f=i.multiply(V),S=t.offset.xy.multiply(V);let b=o.multiply(n.multiply(V.subtract(1)).add(1));b=y(b,h(f.subtract(.99),new u(0)));const g=h(b,new u(1)),C=y(b,new u(1)),M=c.fromRotation(l.multiply(N)),z=et(this,t.id),R=this._getViewRotationMatrix(a).multiply(z).multiply(M).multiply(new m(S.xy,0)).multiply(this.view.scaleFactor),j=this.clip(t.id,t.zoomRange),U=new p(w.xy.add(R.xy),j,1),T=t.textureUV.divide(this.mosaicInfo.size),D=t.outlineColor.multiply(C),F=G(t.bitset,_.bitset.overrideOutlineColor),q=t.sdfDecodeCoeff.multiply(f);return{glPosition:U,color:v,textureUV:T,outlineColor:D,outlineSize:g,distanceToPx:q,isSDF:r,overrideOutlineColor:F,...this.maybeRunHittest(t,e,{pos:t.pos,size:f,sizeCorrection:V,isMapAligned:a,vvRotationMat3:z,placementMat3:M,outlineSize:g,distanceToPx:q,isSDF:r})}}fragment(t){const e=this._getColor(t.textureUV,t);return this.getFragmentOutput(e,t)}hittest(t,e,i){const{pos0:o,pos1:s,pos2:l}=this.computeHittestTriangle(t,e,i),r=q(this.hittestRequest);return x(r,()=>{const{tlbr:t}=this.hittestRequest;return O(o,s,l,t)},()=>{const o=x(v(i.size,this.hittestRequest.smallSymbolSizeThreshold),this._hittestSmallMarker(t,e,i),this._hittestMarker(t,e,i));return x(w(o,this.hittestRequest.distance),new u(T),new u(D))})}_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))}_getViewScreenMatrix(t){const e=this.view.viewMat3.multiply(this.view.tileMat3),i=this.view.tileMat3,o=new u(1).subtract(t);return e.multiply(t).add(i.multiply(o))}_getColor(t,e){return x(V(e.isSDF,new u(1)),this._getSDFColor(t,e),this._getSpriteColor(t,e))}_getSpriteColor(t,e){return f(this.mosaicTexture,t).multiply(e.color)}_getSDFColor(t,e){const i=f(this.mosaicTexture,t),o=new u(.5).subtract(B(i)).multiply(e.distanceToPx).multiply(F),s=S(new u(.5).subtract(o),new u(0),new u(1)),l=e.color.multiply(s);let r=e.outlineSize;this.highlight&&(r=h(r,e.overrideOutlineColor.multiply(4)));const a=r.multiply(.5),p=b(o).subtract(a),n=S(new u(.5).subtract(p),new u(0),new u(1)),d=g(e.outlineColor,e.color,e.overrideOutlineColor).multiply(n);return new u(1).subtract(d.a).multiply(l).add(d)}_hittestSmallMarker(t,e,i){const{position:o,distance:s,smallSymbolDistance:l}=this.hittestRequest,r=s.subtract(l),{viewMat3:a,tileMat3:p}=this.view,n=a.multiply(p).multiply(new m(i.pos,1)).xy,u=i.size.multiply(.5);return C(n,o).subtract(u).add(r)}_hittestMarker(t,e,i){const{pos0:o,pos1:s,pos2:l}=this.computeHittestTriangle(t,e,i),r=this.hittestRequest.position,a=this.hittestRequest.distance,p=k(r,o,s,l);return x(w(p,a),p,this._hittestSamples(o,s,l,t,e,i))}computeHittestTriangle(t,e,i){const{pos:o,sizeCorrection:s,isMapAligned:l}=i,r=new m(t.offset.multiply(s),0),a=new m(e.offsetNextVertex1.multiply(s),0),p=new m(e.offsetNextVertex2.multiply(s),0),{viewMat3:n,tileMat3:u}=this.view,d=n.multiply(u).multiply(new m(o,1)),y=this._getViewScreenMatrix(l).multiply(i.vvRotationMat3).multiply(i.placementMat3);return{pos0:d.add(y.multiply(r)).xy,pos1:d.add(y.multiply(a)).xy,pos2:d.add(y.multiply(p)).xy}}_hittestSamples(t,e,i,o,s,l){const{outlineSize:r,isSDF:a,distanceToPx:d}=l,m=this.hittestRequest.position,y=this.hittestRequest.distance,h=A(m.add(new n(M(y),M(y))),t,e,i),c=A(m.add(new n(0,M(y))),t,e,i),x=A(m.add(new n(y,M(y))),t,e,i),v=A(m.add(new n(M(y),0)),t,e,i),w=A(m,t,e,i),V=A(m.add(new n(y,0)),t,e,i),f=A(m.add(new n(M(y),y)),t,e,i),S=A(m.add(new n(0,y)),t,e,i),b=A(m.add(new n(y,y)),t,e,i),g=o.textureUV.divide(this.mosaicInfo.size),C=s.textureUVNextVertex1.divide(this.mosaicInfo.size),_=s.textureUVNextVertex2.divide(this.mosaicInfo.size),R={color:new p(1),outlineColor:new p(1),overrideOutlineColor:new u(1),outlineSize:r,distanceToPx:d,isSDF:a};let j=new u(0);return j=j.add(P(h).multiply(this._getColor(lt(h,g,C,_),R).a)),j=j.add(P(c).multiply(this._getColor(lt(c,g,C,_),R).a)),j=j.add(P(x).multiply(this._getColor(lt(x,g,C,_),R).a)),j=j.add(P(v).multiply(this._getColor(lt(v,g,C,_),R).a)),j=j.add(P(w).multiply(this._getColor(lt(w,g,C,_),R).a)),j=j.add(P(V).multiply(this._getColor(lt(V,g,C,_),R).a)),j=j.add(P(f).multiply(this._getColor(lt(f,g,C,_),R).a)),j=j.add(P(S).multiply(this._getColor(lt(S,g,C,_),R).a)),j=j.add(P(b).multiply(this._getColor(lt(b,g,C,_),R).a)),z(j,new u(.05)).multiply(I(this.hittestRequest))}}t([o(E)],at.prototype,"visualVariableColor",void 0),t([o(J)],at.prototype,"visualVariableOpacity",void 0),t([o(K)],at.prototype,"visualVariableRotation",void 0),t([o(Q)],at.prototype,"visualVariableSizeMinMaxValue",void 0),t([o(W)],at.prototype,"visualVariableSizeScaleStops",void 0),t([o(X)],at.prototype,"visualVariableSizeStops",void 0),t([o(Y)],at.prototype,"visualVariableSizeUnitValue",void 0),t([s(H)],at.prototype,"mosaicInfo",void 0),t([l(d)],at.prototype,"mosaicTexture",void 0),t([e(0,r(it)),e(1,r(ot))],at.prototype,"vertex",null),t([e(0,r(st))],at.prototype,"fragment",null);export{st as MarkerFragmentInput,at as MarkerShader,it as MarkerVertexInput};
2
+ import{__decorate as t,__param as e}from"tslib";import{location as i,option as o,uniform as s,texture as l,input as r,ComputeVertexInput as a}from"../../GraphShaderModule.js";import{Vec4 as p,Vec2 as n,Float as u,Sampler2D as d,Vec3 as m,min as y,max as h,Mat3 as c,ifElse as x,lessThan as v,equal as w,texture2D as V,clamp as f,abs as S,mix as b,distance as g,greaterThan as C,negate as M}from"../../graph/glsl.js";import{MarkerConstants as z}from"./markerConstants.js";import{FeatureVertexInput as _,AFeatureShader as R,FeatureFragmentInput as j}from"../shaders/AFeatureShader.js";import{c256ToRad as U,softEdgeRatio as N,trueHit as T,noHit as D}from"../shaders/constants.js";import{isRectHittest as F,hittestMarkerScreenRect as q,distPointTriangle as O,xyToBarycentric as k,inTriangle as A}from"../shaders/hittestUtils.js";import{MosaicInfo as P}from"../shaders/MosaicInfo.js";import{getBit as I,getBitBool as H,rgba2float as G}from"../shaders/utils.js";import{VisualVariableColor as L}from"../shaders/VisualVariableColor.js";import{VisualVariableOpacity as B}from"../shaders/VisualVariableOpacity.js";import{VisualVariableRotation as E}from"../shaders/VisualVariableRotation.js";import{VisualVariableSizeMinMaxValue as J}from"../shaders/VisualVariableSizeMinMaxValue.js";import{VisualVariableSizeScaleStops as K}from"../shaders/VisualVariableSizeScaleStops.js";import{VisualVariableSizeStops as Q}from"../shaders/VisualVariableSizeStops.js";import{VisualVariableSizeUnitValue as W}from"../shaders/VisualVariableSizeUnitValue.js";import{getVisualVariableOpacity as X,getVisualVariableColor as Y,getVisualVariableSize as Z,getVisualVariableRotation as $}from"../shaders/vvUtils.js";class tt extends _{}t([i(3,p)],tt.prototype,"color",void 0),t([i(4,p)],tt.prototype,"outlineColor",void 0),t([i(5,n)],tt.prototype,"offset",void 0),t([i(6,n)],tt.prototype,"textureUV",void 0),t([i(7,p)],tt.prototype,"sizing",void 0),t([i(8,u)],tt.prototype,"placementAngle",void 0),t([i(9,u)],tt.prototype,"sdfDecodeCoeff",void 0),t([i(10,n)],tt.prototype,"zoomRange",void 0);class et extends a{}t([i(11,n)],et.prototype,"offsetNextVertex1",void 0),t([i(12,n)],et.prototype,"offsetNextVertex2",void 0),t([i(13,n)],et.prototype,"textureUVNextVertex1",void 0),t([i(14,n)],et.prototype,"textureUVNextVertex2",void 0);class it extends j{}function ot(t,e,i,o){return e.multiply(t.x).add(i.multiply(t.y)).add(o.multiply(t.z))}function st(t){return t.multiply(t).divide(128)}class lt extends R{constructor(){super(...arguments),this.type="MarkerShader",this.computeAttributes={offset:["offsetNextVertex1","offsetNextVertex2"],textureUV:["textureUVNextVertex1","textureUVNextVertex2"]}}vertex(t,e){const i=st(t.sizing.x),o=st(t.sizing.y),s=st(t.sizing.z),l=t.placementAngle,r=I(t.bitset,z.bitset.isSDF),a=I(t.bitset,z.bitset.isMapAligned),n=I(t.bitset,z.bitset.scaleSymbolsProportionally),d=H(t.bitset,z.bitset.colorLocked),x=X(this,t.id),v=Y(this,t.id,t.color,d).multiply(x),w=this.view.displayViewScreenMat3.multiply(new m(t.pos.xy,1)),V=Z(this,t.id,s).divide(s),f=i.multiply(V),S=t.offset.xy.multiply(V);let b=o.multiply(n.multiply(V.subtract(1)).add(1));b=y(b,h(f.subtract(.99),new u(0)));const g=h(b,new u(1)),C=y(b,new u(1)),M=c.fromRotation(l.multiply(U)),_=$(this,t.id),R=this._getViewRotationMatrix(a).multiply(_).multiply(M).multiply(new m(S.xy,0)).multiply(this.view.scaleFactor),j=this.clip(t.id,t.zoomRange),N=new p(w.xy.add(R.xy),j,1),T=t.textureUV.divide(this.mosaicInfo.size),D=t.outlineColor.multiply(C),F=I(t.bitset,z.bitset.overrideOutlineColor),q=t.sdfDecodeCoeff.multiply(f);return{glPosition:N,color:v,textureUV:T,outlineColor:D,outlineSize:g,distanceToPx:q,isSDF:r,overrideOutlineColor:F,...this.maybeRunHittest(t,e,{pos:t.pos,size:f,sizeCorrection:V,isMapAligned:a,vvRotationMat3:_,placementMat3:M,outlineSize:g,distanceToPx:q,isSDF:r})}}fragment(t){const e=this._getColor(t.textureUV,t);return this.getFragmentOutput(e,t)}hittest(t,e,i){const{pos0:o,pos1:s,pos2:l}=this.computeHittestTriangle(t,e,i),r=F(this.hittestRequest);return x(r,()=>{const{tlbr:t}=this.hittestRequest;return q(o,s,l,t)},()=>x(v(i.size,this.hittestRequest.smallSymbolSizeThreshold),this._hittestSmallMarker(t,e,i),this._hittestMarker(t,e,i)))}_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))}_getViewScreenMatrix(t){const e=this.view.viewMat3.multiply(this.view.tileMat3),i=this.view.tileMat3,o=new u(1).subtract(t);return e.multiply(t).add(i.multiply(o))}_getColor(t,e){return x(w(e.isSDF,new u(1)),this._getSDFColor(t,e),this._getSpriteColor(t,e))}_getSpriteColor(t,e){return V(this.mosaicTexture,t).multiply(e.color)}_getSDFColor(t,e){const i=V(this.mosaicTexture,t),o=new u(.5).subtract(G(i)).multiply(e.distanceToPx).multiply(N),s=f(new u(.5).subtract(o),new u(0),new u(1)),l=e.color.multiply(s);let r=e.outlineSize;this.highlight&&(r=h(r,e.overrideOutlineColor.multiply(4)));const a=r.multiply(.5),p=S(o).subtract(a),n=f(new u(.5).subtract(p),new u(0),new u(1)),d=b(e.outlineColor,e.color,e.overrideOutlineColor).multiply(n);return new u(1).subtract(d.a).multiply(l).add(d)}_hittestSmallMarker(t,e,i){const{position:o,distance:s,smallSymbolDistance:l}=this.hittestRequest,r=s.subtract(l),{viewMat3:a,tileMat3:p}=this.view,n=a.multiply(p).multiply(new m(i.pos,1)).xy,d=i.size.multiply(.5),y=g(n,o).subtract(d).add(r);return x(C(y,this.hittestRequest.distance),new u(D),new u(T))}_hittestMarker(t,e,i){const{pos0:o,pos1:s,pos2:l}=this.computeHittestTriangle(t,e,i),r=this.hittestRequest.position,a=this.hittestRequest.distance,p=O(r,o,s,l);return x(C(p,a),new u(D),this._hittestSamples(o,s,l,t,e,i))}computeHittestTriangle(t,e,i){const{pos:o,sizeCorrection:s,isMapAligned:l}=i,r=new m(t.offset.multiply(s),0),a=new m(e.offsetNextVertex1.multiply(s),0),p=new m(e.offsetNextVertex2.multiply(s),0),{viewMat3:n,tileMat3:u}=this.view,d=n.multiply(u).multiply(new m(o,1)),y=this._getViewScreenMatrix(l).multiply(i.vvRotationMat3).multiply(i.placementMat3);return{pos0:d.add(y.multiply(r)).xy,pos1:d.add(y.multiply(a)).xy,pos2:d.add(y.multiply(p)).xy}}_hittestSamples(t,e,i,o,s,l){const{outlineSize:r,isSDF:a,distanceToPx:d}=l,m=this.hittestRequest.position,y=this.hittestRequest.distance,h=k(m.add(new n(M(y),M(y))),t,e,i),c=k(m.add(new n(0,M(y))),t,e,i),v=k(m.add(new n(y,M(y))),t,e,i),w=k(m.add(new n(M(y),0)),t,e,i),V=k(m,t,e,i),f=k(m.add(new n(y,0)),t,e,i),S=k(m.add(new n(M(y),y)),t,e,i),b=k(m.add(new n(0,y)),t,e,i),g=k(m.add(new n(y,y)),t,e,i),z=o.textureUV.divide(this.mosaicInfo.size),_=s.textureUVNextVertex1.divide(this.mosaicInfo.size),R=s.textureUVNextVertex2.divide(this.mosaicInfo.size),j={color:new p(1),outlineColor:new p(1),overrideOutlineColor:new u(1),outlineSize:r,distanceToPx:d,isSDF:a};let U=new u(0);return U=U.add(A(h).multiply(this._getColor(ot(h,z,_,R),j).a)),U=U.add(A(c).multiply(this._getColor(ot(c,z,_,R),j).a)),U=U.add(A(v).multiply(this._getColor(ot(v,z,_,R),j).a)),U=U.add(A(w).multiply(this._getColor(ot(w,z,_,R),j).a)),U=U.add(A(V).multiply(this._getColor(ot(V,z,_,R),j).a)),U=U.add(A(f).multiply(this._getColor(ot(f,z,_,R),j).a)),U=U.add(A(S).multiply(this._getColor(ot(S,z,_,R),j).a)),U=U.add(A(b).multiply(this._getColor(ot(b,z,_,R),j).a)),U=U.add(A(g).multiply(this._getColor(ot(g,z,_,R),j).a)),x(C(U,new u(.05)),new u(T),new u(D))}}t([o(L)],lt.prototype,"visualVariableColor",void 0),t([o(B)],lt.prototype,"visualVariableOpacity",void 0),t([o(E)],lt.prototype,"visualVariableRotation",void 0),t([o(J)],lt.prototype,"visualVariableSizeMinMaxValue",void 0),t([o(K)],lt.prototype,"visualVariableSizeScaleStops",void 0),t([o(Q)],lt.prototype,"visualVariableSizeStops",void 0),t([o(W)],lt.prototype,"visualVariableSizeUnitValue",void 0),t([s(P)],lt.prototype,"mosaicInfo",void 0),t([l(d)],lt.prototype,"mosaicTexture",void 0),t([e(0,r(tt)),e(1,r(et))],lt.prototype,"vertex",null),t([e(0,r(it))],lt.prototype,"fragment",null);export{it as MarkerFragmentInput,lt as MarkerShader,tt as MarkerVertexInput};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t,__param as o}from"tslib";import{location as e,uniform as r,texture as i,input as s}from"../../GraphShaderModule.js";import{Vec4 as p,Float as l,Vec2 as a,Sampler2D as n,greaterThan as m,ifElse as u}from"../../graph/glsl.js";import{BaseHittestVertexInput as f,FeatureVertexInput as h}from"./AFeatureShader.js";import{getComplexFillVertexData as d,getComplexFillFragmentColor as c}from"./ComplexFillShader.js";import{signedToUnsignedByte as x,packPrecision as y}from"./constants.js";import{hittestFill as v,failHittest as j}from"./hittestUtils.js";import{getLineFragmentColor as g}from"./LineShader.js";import{LocalTileOffset as O}from"./LocalTileOffset.js";import{MosaicInfo as S}from"./MosaicInfo.js";import{AOutlineFillShader as b,getOutlineFillVertexData as F}from"./OutlineFillShader.js";import{PatternOutlineFillFragmentInput as w}from"./PatternOutlineFillShader.js";const C=1/y;class R extends h{}t([e(3,p)],R.prototype,"color",void 0),t([e(4,p)],R.prototype,"tlbr",void 0),t([e(5,l)],R.prototype,"angle",void 0),t([e(6,l)],R.prototype,"aux1",void 0),t([e(7,l)],R.prototype,"aux2",void 0),t([e(8,a)],R.prototype,"aux3",void 0),t([e(9,a)],R.prototype,"aux4",void 0),t([e(10,a)],R.prototype,"zoomRange",void 0);class T extends w{}class H extends b{constructor(){super(...arguments),this.type="ComplexOutlineFillShader"}vertex(t,o){const{aux1:e,aux2:r,aux3:i,aux4:s}=t,p={...t,width:e,height:r,offset:i,scale:s.multiply(C)},a={...t,halfWidth:e,referenceHalfWidth:r,offset:i,normal:s.subtract(x).multiply(C)},n=F(this,a),u=d(this,p),f=m(n.isOutline,new l(.5));return{...n,...u,...Object.assign({},this.maybeRunHittest(t,o,f))}}fragment(t){const{isOutline:o}=t,e=m(o,new l(.5)),r=g(t,this.antialiasingControls.blur),i=c(this,t),s=u(e,r,i),p=u(e,new l(1/255),new l(0));return this.getFragmentOutput(s,t,p)}hittest(t,o,e){return u(e,j(this.hittestRequest),v(this,t,o))}}t([r(S)],H.prototype,"mosaicInfo",void 0),t([i(n)],H.prototype,"mosaicTexture",void 0),t([r(O)],H.prototype,"localTileOffset",void 0),t([o(0,s(R)),o(1,s(f))],H.prototype,"vertex",null),t([o(0,s(T))],H.prototype,"fragment",null);export{H as ComplexOutlineFillShader,R as ComplexOutlineFillVertexInput};
2
+ import{__decorate as t,__param as e}from"tslib";import{location as o,uniform as r,texture as s,input as i}from"../../GraphShaderModule.js";import{Vec4 as p,Float as l,Vec2 as n,Sampler2D as a,greaterThan as m,ifElse as u,or as h}from"../../graph/glsl.js";import{BaseHittestVertexInput as f,FeatureVertexInput as d}from"./AFeatureShader.js";import{getComplexFillVertexData as c,getComplexFillFragmentColor as x}from"./ComplexFillShader.js";import{signedToUnsignedByte as y,noHit as v,trueHit as g,packPrecision as j}from"./constants.js";import{isRectHittest as O,hittestFill as b,hittestScreenRect as w}from"./hittestUtils.js";import{getLineFragmentColor as S}from"./LineShader.js";import{LocalTileOffset as F}from"./LocalTileOffset.js";import{MosaicInfo as R}from"./MosaicInfo.js";import{AOutlineFillShader as T,getOutlineFillVertexData as q}from"./OutlineFillShader.js";import{PatternOutlineFillFragmentInput as C}from"./PatternOutlineFillShader.js";const H=1/j;class I extends d{}t([o(3,p)],I.prototype,"color",void 0),t([o(4,p)],I.prototype,"tlbr",void 0),t([o(5,l)],I.prototype,"angle",void 0),t([o(6,l)],I.prototype,"aux1",void 0),t([o(7,l)],I.prototype,"aux2",void 0),t([o(8,n)],I.prototype,"aux3",void 0),t([o(9,n)],I.prototype,"aux4",void 0),t([o(10,n)],I.prototype,"zoomRange",void 0);class L extends C{}class M extends T{constructor(){super(...arguments),this.type="ComplexOutlineFillShader"}vertex(t,e){const{aux1:o,aux2:r,aux3:s,aux4:i}=t,p={...t,width:o,height:r,offset:s,scale:i.multiply(H)},n={...t,halfWidth:o,referenceHalfWidth:r,offset:s,normal:i.subtract(y).multiply(H)},a=q(this,n),u=c(this,p),h=m(a.isOutline,new l(.5));return{...a,...u,...Object.assign({},this.maybeRunHittest(t,e,h))}}fragment(t){const{isOutline:e}=t,o=m(e,new l(.5)),r=S(t,this.antialiasingControls.blur),s=x(this,t),i=u(o,r,s),p=u(o,new l(1/255),new l(0));return this.getFragmentOutput(i,t,p)}hittest(t,e,o){const{pos0:r,pos1:s,pos2:i}=this.computeHittestTriangle(t,e,null),p=O(this.hittestRequest);return u(p,()=>{const{tlbr:t}=this.hittestRequest;return w(r,s,i,t)},()=>{const r=b(this,t,e);return u(h(o,m(r,this.hittestRequest.distance)),new l(v),new l(g))})}}t([r(R)],M.prototype,"mosaicInfo",void 0),t([s(a)],M.prototype,"mosaicTexture",void 0),t([r(F)],M.prototype,"localTileOffset",void 0),t([e(0,i(I)),e(1,i(f))],M.prototype,"vertex",null),t([e(0,i(L))],M.prototype,"fragment",null);export{M as ComplexOutlineFillShader,I as ComplexOutlineFillVertexInput};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as t,__param as e}from"tslib";import{location as i,uniform as s,define as l,input as o,UniformGroup as r}from"../../GraphShaderModule.js";import{Vec2 as p,Float as a,Vec3 as n,Vec4 as u,length as m,step as d}from"../../graph/glsl.js";import{FeatureVertexInput as y,AFeatureShader as h,FeatureFragmentInput as c}from"./AFeatureShader.js";import{getHeatmapCompressionFactor as f}from"./heatmapUtils.js";import{hittestMarker as w}from"./hittestUtils.js";class v extends y{}t([i(5,p)],v.prototype,"offset",void 0);class x extends c{}class g extends r{}t([s(a)],g.prototype,"radius",void 0),t([s(a)],g.prototype,"isFieldActive",void 0);class F extends h{constructor(){super(...arguments),this.type="HeatmapAccumulateShader",this.usesHalfFloatPrecision=!1}vertex(t){const{radius:e,isFieldActive:i}=this.kernelControls,s=t.offset,l=i.multiply(this.getVVData(t.id).x).add(new a(1).subtract(i)),o=this.view.displayViewScreenMat3.multiply(new n(t.pos,1)).add(this.view.displayViewMat3.multiply(new n(s,0)).multiply(e)),r=this.clip(t.id);return{glPosition:new u(o.xy,r,1),offset:s,fieldValue:l,color:new u(0),...this.maybeRunHittest(t,{},null)}}fragment(t){const{offset:e,fieldValue:i}=t,s=m(e),l=d(s,new a(1)),o=new a(1).subtract(s.multiply(s)),r=o.multiply(o),p=l.multiply(r).multiply(i).multiply(new a(f(this.usesHalfFloatPrecision)));return this.getFragmentOutput(new u(p),t)}hittest(t){const{viewMat3:e,tileMat3:i}=this.view,s=e.multiply(i).multiply(new n(t.pos,1));return w(s.xy,this.kernelControls.radius,this.hittestRequest.position)}}t([l],F.prototype,"usesHalfFloatPrecision",void 0),t([s(g)],F.prototype,"kernelControls",void 0),t([e(0,o(v))],F.prototype,"vertex",null),t([e(0,o(x))],F.prototype,"fragment",null);export{x as HeatmapAccumulateFragmentInput,F as HeatmapAccumulateShader,v as HeatmapAccumulateVertexInput};
2
+ import{__decorate as t,__param as e}from"tslib";import{location as s,uniform as i,define as o,input as l,UniformGroup as r}from"../../GraphShaderModule.js";import{Vec2 as p,Float as n,Vec3 as a,Vec4 as u,length as m,step as d,ifElse as h,greaterThan as y}from"../../graph/glsl.js";import{FeatureVertexInput as c,AFeatureShader as f,FeatureFragmentInput as w}from"./AFeatureShader.js";import{trueHit as v,noHit as x}from"./constants.js";import{getHeatmapCompressionFactor as g}from"./heatmapUtils.js";import{hittestMarker as F}from"./hittestUtils.js";class j extends c{}t([s(5,p)],j.prototype,"offset",void 0);class V extends w{}class H extends r{}t([i(n)],H.prototype,"radius",void 0),t([i(n)],H.prototype,"isFieldActive",void 0);class M extends f{constructor(){super(...arguments),this.type="HeatmapAccumulateShader",this.usesHalfFloatPrecision=!1}vertex(t){const{radius:e,isFieldActive:s}=this.kernelControls,i=t.offset,o=s.multiply(this.getVVData(t.id).x).add(new n(1).subtract(s)),l=this.view.displayViewScreenMat3.multiply(new a(t.pos,1)).add(this.view.displayViewMat3.multiply(new a(i,0)).multiply(e)),r=this.clip(t.id);return{glPosition:new u(l.xy,r,1),offset:i,fieldValue:o,color:new u(0),...this.maybeRunHittest(t,{},null)}}fragment(t){const{offset:e,fieldValue:s}=t,i=m(e),o=d(i,new n(1)),l=new n(1).subtract(i.multiply(i)),r=l.multiply(l),p=o.multiply(r).multiply(s).multiply(new n(g(this.usesHalfFloatPrecision)));return this.getFragmentOutput(new u(p),t)}hittest(t){const{viewMat3:e,tileMat3:s}=this.view,i=e.multiply(s).multiply(new a(t.pos,1)),o=F(i.xy,this.kernelControls.radius,this.hittestRequest.position);return h(y(o,this.hittestRequest.distance),new n(x),new n(v))}}t([o],M.prototype,"usesHalfFloatPrecision",void 0),t([i(H)],M.prototype,"kernelControls",void 0),t([e(0,l(j))],M.prototype,"vertex",null),t([e(0,l(V))],M.prototype,"fragment",null);export{V as HeatmapAccumulateFragmentInput,M as HeatmapAccumulateShader,j as HeatmapAccumulateVertexInput};