@arcgis/core 4.33.0-next.20250508 → 4.33.0-next.20250510

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 (431) hide show
  1. package/applications/SceneViewer/sceneViewerUtils.d.ts +2 -0
  2. package/applications/SceneViewer/sceneViewerUtils.js +1 -1
  3. package/arcade/featureset/support/RecentlyUsedCache.js +1 -1
  4. package/arcade/functions/aiServices.js +1 -1
  5. package/arcade.js +1 -1
  6. package/assets/components/assets/input-time-picker/t9n/messages.ar.json +1 -1
  7. package/assets/components/assets/input-time-picker/t9n/messages.bg.json +1 -1
  8. package/assets/components/assets/input-time-picker/t9n/messages.bs.json +1 -1
  9. package/assets/components/assets/input-time-picker/t9n/messages.ca.json +1 -1
  10. package/assets/components/assets/input-time-picker/t9n/messages.cs.json +1 -1
  11. package/assets/components/assets/input-time-picker/t9n/messages.da.json +1 -1
  12. package/assets/components/assets/input-time-picker/t9n/messages.de.json +1 -1
  13. package/assets/components/assets/input-time-picker/t9n/messages.el.json +1 -1
  14. package/assets/components/assets/input-time-picker/t9n/messages.en.json +1 -1
  15. package/assets/components/assets/input-time-picker/t9n/messages.es.json +1 -1
  16. package/assets/components/assets/input-time-picker/t9n/messages.et.json +1 -1
  17. package/assets/components/assets/input-time-picker/t9n/messages.fi.json +1 -1
  18. package/assets/components/assets/input-time-picker/t9n/messages.fr.json +1 -1
  19. package/assets/components/assets/input-time-picker/t9n/messages.he.json +1 -1
  20. package/assets/components/assets/input-time-picker/t9n/messages.hr.json +1 -1
  21. package/assets/components/assets/input-time-picker/t9n/messages.hu.json +1 -1
  22. package/assets/components/assets/input-time-picker/t9n/messages.id.json +1 -1
  23. package/assets/components/assets/input-time-picker/t9n/messages.it.json +1 -1
  24. package/assets/components/assets/input-time-picker/t9n/messages.ja.json +1 -1
  25. package/assets/components/assets/input-time-picker/t9n/messages.json +1 -1
  26. package/assets/components/assets/input-time-picker/t9n/messages.ko.json +1 -1
  27. package/assets/components/assets/input-time-picker/t9n/messages.lt.json +1 -1
  28. package/assets/components/assets/input-time-picker/t9n/messages.lv.json +1 -1
  29. package/assets/components/assets/input-time-picker/t9n/messages.nl.json +1 -1
  30. package/assets/components/assets/input-time-picker/t9n/messages.no.json +1 -1
  31. package/assets/components/assets/input-time-picker/t9n/messages.pl.json +1 -1
  32. package/assets/components/assets/input-time-picker/t9n/messages.pt-BR.json +1 -1
  33. package/assets/components/assets/input-time-picker/t9n/messages.pt-PT.json +1 -1
  34. package/assets/components/assets/input-time-picker/t9n/messages.ro.json +1 -1
  35. package/assets/components/assets/input-time-picker/t9n/messages.ru.json +1 -1
  36. package/assets/components/assets/input-time-picker/t9n/messages.sk.json +1 -1
  37. package/assets/components/assets/input-time-picker/t9n/messages.sl.json +1 -1
  38. package/assets/components/assets/input-time-picker/t9n/messages.sr.json +1 -1
  39. package/assets/components/assets/input-time-picker/t9n/messages.sv.json +1 -1
  40. package/assets/components/assets/input-time-picker/t9n/messages.th.json +1 -1
  41. package/assets/components/assets/input-time-picker/t9n/messages.tr.json +1 -1
  42. package/assets/components/assets/input-time-picker/t9n/messages.uk.json +1 -1
  43. package/assets/components/assets/input-time-picker/t9n/messages.vi.json +1 -1
  44. package/assets/components/assets/input-time-picker/t9n/messages.zh-CN.json +1 -1
  45. package/assets/components/assets/input-time-picker/t9n/messages.zh-HK.json +1 -1
  46. package/assets/components/assets/input-time-picker/t9n/messages.zh-TW.json +1 -1
  47. package/assets/esri/core/workers/RemoteClient.js +1 -1
  48. package/assets/esri/core/workers/chunks/06eb4832b6c86744e52e.js +1 -0
  49. package/assets/esri/core/workers/chunks/0766ecb677d667e5fb83.js +2 -0
  50. package/assets/esri/core/workers/chunks/{543eb46b55cacd6e1dbc.js.LICENSE.txt → 0766ecb677d667e5fb83.js.LICENSE.txt} +1 -1
  51. package/assets/esri/core/workers/chunks/{c607d618b64d3accecc4.js → 0aca29f7156b2b412f2e.js} +1 -1
  52. package/assets/esri/core/workers/chunks/170c346cf5a18adb25b0.js +1 -0
  53. package/assets/esri/core/workers/chunks/1c6542315390037053a6.js +1 -0
  54. package/assets/esri/core/workers/chunks/218a66d53f7cf4f285aa.js +2 -0
  55. package/assets/esri/core/workers/chunks/{d8dc922f7466300b668f.js.LICENSE.txt → 218a66d53f7cf4f285aa.js.LICENSE.txt} +2 -2
  56. package/assets/esri/core/workers/chunks/{037af6379f3e9278633b.js → 243dc74ec62891ba1ef7.js} +1 -1
  57. package/assets/esri/core/workers/chunks/253bcc3cc7bc4c2dc6ea.js +1 -0
  58. package/assets/esri/core/workers/chunks/{d874d24568b1acedebc4.js → 297d2c0a9d3f1e978318.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{f74b5659b6496a5c4c0c.js → 2e0af748eba93f3ea6cb.js} +1 -1
  60. package/assets/esri/core/workers/chunks/3596540ef49e5330ceb2.js +2 -0
  61. package/assets/esri/core/workers/chunks/{7b4523ab392966624d97.js.LICENSE.txt → 3596540ef49e5330ceb2.js.LICENSE.txt} +1 -7
  62. package/assets/esri/core/workers/chunks/{a22c88b0a525e602dce0.js → 3d0e09ef78dc2fd6957a.js} +1 -1
  63. package/assets/esri/core/workers/chunks/4bd5cbf6e0be2fc7e84d.js +1 -0
  64. package/assets/esri/core/workers/chunks/4feb774f123da26e9f2a.js +1 -0
  65. package/assets/esri/core/workers/chunks/{ee1d104e2bcc5d808fa4.js → 5228fc7fcdf57f44781e.js} +1 -1
  66. package/assets/esri/core/workers/chunks/54f4a1131f99468db076.js +1 -0
  67. package/assets/esri/core/workers/chunks/{49c968e91c3c48aaa110.js → 5583d18032ed8bc17c74.js} +1 -1
  68. package/assets/esri/core/workers/chunks/5e7f35bf1aab93cb1c52.js +1 -0
  69. package/assets/esri/core/workers/chunks/{69f7fe6c58e4931597f6.js → 631205dc4d73d49ec9ed.js} +1 -1
  70. package/assets/esri/core/workers/chunks/6e12900a9f4c3c9941ec.js +1 -0
  71. package/assets/esri/core/workers/chunks/7e8f78b96d43c224c7b6.js +1 -0
  72. package/assets/esri/core/workers/chunks/{e46c05ef7272c7f1f70c.js → 83d6a1b3db7d364d156b.js} +1 -1
  73. package/assets/esri/core/workers/chunks/8a87c181b85d0b86b9bb.js.LICENSE.txt +1 -1
  74. package/assets/esri/core/workers/chunks/90ae15ce22a49bd84876.js +2 -0
  75. package/assets/esri/core/workers/chunks/{ac9c6779771ec855da79.js.LICENSE.txt → 90ae15ce22a49bd84876.js.LICENSE.txt} +3 -3
  76. package/assets/esri/core/workers/chunks/92cbe9af8a6c061bfb57.js +346 -0
  77. package/assets/esri/core/workers/chunks/{9aedd7874da7c63865d6.js → 93cc26e5636040fdc0b8.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{77c7b7c4426c2b1a5b42.js → 9fc35ec8185beba96715.js} +1 -1
  79. package/assets/esri/core/workers/chunks/a1d697e2be1e892a666a.js +1 -0
  80. package/assets/esri/core/workers/chunks/{4f627eb62caee760215a.js → a1f27c4f4b5ef3e359f7.js} +1 -1
  81. package/assets/esri/core/workers/chunks/a31658f544ac6e1801d6.js +1 -0
  82. package/assets/esri/core/workers/chunks/{3a205f87f100832ef9f5.js → a5e746e10239a3bfe237.js} +1 -1
  83. package/assets/esri/core/workers/chunks/a6bcae413e62cd879b46.js +1 -0
  84. package/assets/esri/core/workers/chunks/{59d4c41172e921922cac.js → a8b42d8c0b76c234c09f.js} +100 -62
  85. package/assets/esri/core/workers/chunks/b4f38fe9cc948a39ad87.js +2 -0
  86. package/assets/esri/core/workers/chunks/{ce9de24cb96b56d20562.js.LICENSE.txt → b4f38fe9cc948a39ad87.js.LICENSE.txt} +1 -1
  87. package/assets/esri/core/workers/chunks/{752ef63d910852b7be44.js → c16e0da7a19310c71e8b.js} +1 -1
  88. package/assets/esri/core/workers/chunks/d22f91bc16a7641bcbef.js +1 -0
  89. package/assets/esri/core/workers/chunks/d551f70560a2b1ef5696.js +1 -0
  90. package/assets/esri/core/workers/chunks/d7b640f7a181bd26c7c7.js +1 -0
  91. package/assets/esri/core/workers/chunks/{2bdbf678d4f013543dbb.js → d971571a957de70d5a8d.js} +1 -1
  92. package/assets/esri/core/workers/chunks/dc3a6beb3028009b3c23.js +1 -0
  93. package/assets/esri/core/workers/chunks/e0dc8794343c2a949ffb.js +2 -0
  94. package/assets/esri/core/workers/chunks/{670a66617249f2d15a62.js.LICENSE.txt → e0dc8794343c2a949ffb.js.LICENSE.txt} +1 -1
  95. package/assets/esri/core/workers/chunks/e3c1aea34ece8336dae1.js +1 -0
  96. package/assets/esri/core/workers/chunks/e483d2f169e51a361742.js +1 -0
  97. package/assets/esri/core/workers/chunks/{a50cb1fc8c4c585c0e11.js → ec8e8048b3df2c92008d.js} +1 -1
  98. package/assets/esri/core/workers/chunks/f6a1fec33b0d81acce61.js +1 -0
  99. package/assets/esri/core/workers/chunks/f7ab3511f6627f467796.js +1 -0
  100. package/assets/esri/core/workers/chunks/{1eef9cf19634c038b59b.js → f98689562017583f73ee.js} +1 -1
  101. package/assets/esri/core/workers/chunks/fb2e28e6a87956267d1c.js +66 -0
  102. package/assets/esri/core/workers/chunks/fbcd94f60f92257a7303.js +2 -0
  103. package/assets/esri/core/workers/chunks/{c2594024d72133d3ed7b.js.LICENSE.txt → fbcd94f60f92257a7303.js.LICENSE.txt} +1 -1
  104. package/assets/esri/core/workers/chunks/fda48126f67e80034404.js +1 -0
  105. package/assets/esri/themes/base/widgets/_FeatureTable.scss +1 -0
  106. package/assets/esri/themes/dark/main.css +1 -1
  107. package/assets/esri/themes/light/main.css +1 -1
  108. package/assets/esri/themes/light/view.css +1 -1
  109. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ar.json +1 -1
  110. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bg.json +1 -1
  111. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bs.json +1 -1
  112. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ca.json +1 -1
  113. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_cs.json +1 -1
  114. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_da.json +1 -1
  115. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_de.json +1 -1
  116. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_el.json +1 -1
  117. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_es.json +1 -1
  118. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_et.json +1 -1
  119. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fi.json +1 -1
  120. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fr.json +1 -1
  121. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_he.json +1 -1
  122. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hr.json +1 -1
  123. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hu.json +1 -1
  124. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_id.json +1 -1
  125. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_it.json +1 -1
  126. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ja.json +1 -1
  127. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ko.json +1 -1
  128. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lt.json +1 -1
  129. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lv.json +1 -1
  130. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_nl.json +1 -1
  131. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_no.json +1 -1
  132. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pl.json +1 -1
  133. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-BR.json +1 -1
  134. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-PT.json +1 -1
  135. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ro.json +1 -1
  136. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ru.json +1 -1
  137. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sk.json +1 -1
  138. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sl.json +1 -1
  139. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sr.json +1 -1
  140. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sv.json +1 -1
  141. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_th.json +1 -1
  142. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_tr.json +1 -1
  143. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_uk.json +1 -1
  144. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_vi.json +1 -1
  145. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-CN.json +1 -1
  146. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-HK.json +1 -1
  147. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-TW.json +1 -1
  148. package/chunks/HUDMaterial.glsl.js +1 -1
  149. package/chunks/Laserlines.glsl.js +2 -2
  150. package/chunks/aiServices.js +1 -1
  151. package/chunks/boundedPlane.js +1 -1
  152. package/chunks/cameraUtilsSpherical.js +1 -1
  153. package/chunks/vec32.js +1 -1
  154. package/core/has.js +1 -1
  155. package/core/libs/gl-matrix-2/math/mat4.js +1 -1
  156. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  157. package/core/mapCollectionUtils.js +1 -1
  158. package/core/perspectiveUtils.js +1 -1
  159. package/core/sql/StandardizedFunctions.js +1 -1
  160. package/core/sql/WhereGrammar.js +1 -1
  161. package/geometry/support/axisAngleDegrees.js +1 -1
  162. package/geometry/support/curves/bezierCurveUtils.js +1 -1
  163. package/geometry/support/curves/circleUtils.js +1 -1
  164. package/geometry/support/curves/curveExtent.js +5 -0
  165. package/geometry/support/curves/curveLength.js +5 -0
  166. package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
  167. package/geometry/support/curves/ellipticArc4Utils.js +1 -1
  168. package/geometry/support/curves/ellipticArc7Utils.js +1 -1
  169. package/geometry/support/curves/mathUtils.js +1 -1
  170. package/geometry/support/curves/splitCurveAtPoint.js +1 -1
  171. package/geometry/support/frustum.js +1 -1
  172. package/geometry/support/meshUtils/External.js +1 -1
  173. package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
  174. package/geometry/support/meshUtils/loadExternal.js +1 -1
  175. package/geometry/support/meshUtils/primitives.js +1 -1
  176. package/geometry/support/meshUtils/projection.js +1 -1
  177. package/geometry/support/meshUtils/rotate.js +1 -1
  178. package/geometry/support/meshUtils/scale.js +1 -1
  179. package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
  180. package/geometry/support/meshVertexSpaceUtils.js +1 -1
  181. package/geometry/support/plane.js +1 -1
  182. package/interfaces.d.ts +401 -17
  183. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  184. package/layers/LinkChartLayer.js +1 -1
  185. package/layers/SceneLayer.js +1 -1
  186. package/layers/VideoLayer.js +1 -1
  187. package/layers/VoxelWasmPerSceneView.js +1 -1
  188. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  189. package/layers/graphics/sources/MemorySource.js +1 -1
  190. package/layers/graphics/sources/support/uploadAssets.js +1 -1
  191. package/layers/video/VideoCameraSensorModel.js +1 -1
  192. package/layers/video/VideoController.js +1 -1
  193. package/layers/voxel/VoxelVolume.js +1 -1
  194. package/layers/voxel/voxelPlaneUtils.js +1 -1
  195. package/package.json +1 -1
  196. package/rest/knowledgeGraph/wasmInterface/wasmToUpdateResponseFactories.js +1 -1
  197. package/rest/support/meshFeatureSet.js +1 -1
  198. package/smartMapping/renderers/size.js +1 -1
  199. package/smartMapping/renderers/support/spikeUtils.js +1 -1
  200. package/support/revision.js +1 -1
  201. package/symbols/cim/cimAnalyzer.js +1 -1
  202. package/views/2d/engine/webgl/AFeatureTile.js +1 -1
  203. package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js +1 -1
  204. package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js +1 -1
  205. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js +1 -1
  206. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
  207. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
  208. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/constants.js +1 -1
  209. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  210. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  211. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  212. package/views/2d/layers/features/layerAdapters/featureServiceUtils.js +1 -1
  213. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  214. package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
  215. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  216. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  217. package/views/3d/analysis/Dimension/DimensionTool.js +1 -1
  218. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  219. package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
  220. package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
  221. package/views/3d/analysis/DimensionAnalysisView3D.js +1 -1
  222. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  223. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  224. package/views/3d/analysis/Viewshed/ViewshedComputedData.js +1 -1
  225. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  226. package/views/3d/analysis/Viewshed/ViewshedVisualization.js +1 -1
  227. package/views/3d/analysis/Viewshed/viewshedToolUtils.js +1 -1
  228. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  229. package/views/3d/animation/pointToPoint/Camera.js +1 -1
  230. package/views/3d/camera/constraintUtils/distance.js +1 -1
  231. package/views/3d/camera/intersectionUtils.js +1 -1
  232. package/views/3d/interactive/Manipulator3D.js +1 -1
  233. package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
  234. package/views/3d/interactive/editingTools/reshape/edgeOffsetUtils.js +1 -1
  235. package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
  236. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  237. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  238. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  239. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  240. package/views/3d/layers/I3SMeshView3D.js +1 -1
  241. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  242. package/views/3d/layers/PointCloudWorker.js +1 -1
  243. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  244. package/views/3d/layers/SceneLayerView3D.js +1 -1
  245. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  246. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  247. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  248. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  249. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  250. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  251. package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
  252. package/views/3d/layers/graphics/LabelDeconflictor.js +1 -1
  253. package/views/3d/layers/graphics/Labeler.js +1 -1
  254. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  255. package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
  256. package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
  257. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  258. package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
  259. package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
  260. package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
  261. package/views/3d/layers/i3s/I3SQueryEngine.js +1 -1
  262. package/views/3d/layers/i3s/I3SQueryFeatureAdapter.js +1 -1
  263. package/views/3d/layers/i3s/I3SQueryResultGeometry.js +5 -0
  264. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  265. package/views/3d/layers/i3s/Intersector.js +1 -1
  266. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  267. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  268. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  269. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  270. package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
  271. package/views/3d/state/Frustum.js +1 -1
  272. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  273. package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
  274. package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
  275. package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
  276. package/views/3d/state/controllers/ZoomControllerLocal.js +1 -1
  277. package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
  278. package/views/3d/state/controllers/ZoomStepControllerLocal.js +1 -1
  279. package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
  280. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  281. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  282. package/views/3d/support/hitTest.js +1 -1
  283. package/views/3d/support/orientedBoundingBox.js +1 -1
  284. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  285. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  286. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  287. package/views/3d/support/viewpointUtils.js +1 -1
  288. package/views/3d/terrain/Intersector.js +1 -1
  289. package/views/3d/terrain/OverlayManager.js +1 -1
  290. package/views/3d/terrain/TerrainRenderer.js +1 -1
  291. package/views/3d/terrain/TerrainSurface.js +1 -1
  292. package/views/3d/webgl/ManagedDepthTexture.js +1 -1
  293. package/views/3d/webgl/ManagedFBOResource.js +1 -1
  294. package/views/3d/webgl/RenderCamera.js +1 -1
  295. package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
  296. package/views/3d/webgl-engine/collections/Component/ElevationAgnosticBVH.js +1 -1
  297. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  298. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  299. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  300. package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
  301. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  302. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  303. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  304. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  305. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  306. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechniqueConfiguration.js +1 -1
  307. package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +1 -1
  308. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  309. package/views/3d/webgl-engine/lib/HUDIntersectorResult.js +5 -0
  310. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  311. package/views/3d/webgl-engine/lib/IntersectorInterfaces.js +1 -1
  312. package/views/3d/webgl-engine/lib/IntersectorResult.js +5 -0
  313. package/views/3d/webgl-engine/lib/IntersectorTarget.js +1 -1
  314. package/views/3d/webgl-engine/lib/IntersectorType.js +5 -0
  315. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  316. package/views/3d/webgl-engine/lib/Material.js +1 -1
  317. package/views/3d/webgl-engine/lib/Normals.js +1 -1
  318. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  319. package/views/3d/webgl-engine/lib/ObjectIntersectorResult.js +5 -0
  320. package/views/3d/webgl-engine/lib/ObjectTarget.js +5 -0
  321. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  322. package/views/3d/webgl-engine/lib/PathVertex.js +1 -1
  323. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  324. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  325. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  326. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  327. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  328. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  329. package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
  330. package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
  331. package/views/3d/webgl-engine/lib/lodRendering/Intersector.js +1 -1
  332. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  333. package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
  334. package/views/3d/webgl-engine/lighting/SphericalHarmonics.js +1 -1
  335. package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
  336. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  337. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  338. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  339. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  340. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  341. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  342. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  343. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  344. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  345. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  346. package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
  347. package/views/3d/webgl-engine/materials/pbrUtils.js +1 -1
  348. package/views/3d/webgl-engine/shaders/CompositingTechniqueConfiguration.js +1 -1
  349. package/views/FocusArea.js +1 -1
  350. package/views/FocusAreaOutline.js +5 -0
  351. package/views/FocusAreaOutlineItem.js +5 -0
  352. package/views/FocusAreas.js +1 -1
  353. package/views/FocusAreasUtils.js +5 -0
  354. package/views/FocusAreasView.js +5 -0
  355. package/views/SceneView.js +1 -1
  356. package/views/analysis/DimensionAnalysisView.js +1 -1
  357. package/views/draw/support/surfaceCoordinateSystems.js +1 -1
  358. package/views/interactive/ToolIntersector.js +1 -1
  359. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  360. package/views/interactive/keybindings.js +1 -1
  361. package/views/interactive/sketch/constraints.js +1 -1
  362. package/views/interactive/snapping/candidates/ParallelLineSnappingCandidate.js +1 -1
  363. package/views/interactive/snapping/hints/IntersectionSnappingHint.js +1 -1
  364. package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
  365. package/views/interactive/snapping/hints/ParallelSnappingHint.js +1 -1
  366. package/views/interactive/snapping/hints/PointSnappingHint.js +1 -1
  367. package/views/interactive/snapping/hints/RightAngleSnappingHint.js +1 -1
  368. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  369. package/views/layers/DimensionLayerView.js +1 -1
  370. package/views/support/angularMeasurementUtils.js +1 -1
  371. package/views/support/geometry3dUtils.js +1 -1
  372. package/webdoc/IPSInfo.js +1 -1
  373. package/webdoc/ips/AppleIPSProperties.d.ts +4 -0
  374. package/webdoc/ips/AppleIPSProperties.js +5 -0
  375. package/webdoc/ips/Configuration.d.ts +4 -0
  376. package/webdoc/ips/Configuration.js +5 -0
  377. package/webdoc/ips/GNSSProperties.d.ts +4 -0
  378. package/webdoc/ips/GNSSProperties.js +5 -0
  379. package/webdoc/ips/PathSnappingProperties.d.ts +4 -0
  380. package/webdoc/ips/PathSnappingProperties.js +5 -0
  381. package/webdoc/ips/SmoothingProperties.d.ts +4 -0
  382. package/webdoc/ips/SmoothingProperties.js +5 -0
  383. package/widgets/BasemapLayerList.js +1 -1
  384. package/widgets/BatchAttributeForm.js +1 -1
  385. package/widgets/ElevationProfile/ElevationProfileLineView.js +1 -1
  386. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js +1 -1
  387. package/widgets/FeatureForm.js +1 -1
  388. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  389. package/widgets/FeatureTable.js +1 -1
  390. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  391. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
  392. package/widgets/UtilityNetworkTrace.js +1 -1
  393. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  394. package/widgets/VideoPlayer/components/MetadataSection.js +1 -1
  395. package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
  396. package/widgets/support/FilterBuilder.js +1 -1
  397. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  398. package/widgets/support/SketchTooltipControls.js +1 -1
  399. package/widgets/support/SnappingControls.js +1 -1
  400. package/assets/esri/core/workers/chunks/094300acbd24085cb063.js +0 -1
  401. package/assets/esri/core/workers/chunks/0c338364cb55afdbd580.js +0 -1
  402. package/assets/esri/core/workers/chunks/2da01fe20200b6d74851.js +0 -1
  403. package/assets/esri/core/workers/chunks/35c996f6fbff165b03f4.js +0 -1
  404. package/assets/esri/core/workers/chunks/3a517393619af3639b83.js +0 -1
  405. package/assets/esri/core/workers/chunks/45d64b72b7e93e9c64d7.js +0 -1
  406. package/assets/esri/core/workers/chunks/46104db7f77952bb6c12.js +0 -1
  407. package/assets/esri/core/workers/chunks/47bbfc10c2a3b9e4bdd6.js +0 -1
  408. package/assets/esri/core/workers/chunks/49f0e53b3c9ba8451442.js +0 -1
  409. package/assets/esri/core/workers/chunks/543eb46b55cacd6e1dbc.js +0 -2
  410. package/assets/esri/core/workers/chunks/5e0118a030cf741f78c6.js +0 -319
  411. package/assets/esri/core/workers/chunks/670a66617249f2d15a62.js +0 -2
  412. package/assets/esri/core/workers/chunks/6b5274d46a155d65dff1.js +0 -39
  413. package/assets/esri/core/workers/chunks/74187c771ee7083d1db7.js +0 -1
  414. package/assets/esri/core/workers/chunks/7b4523ab392966624d97.js +0 -2
  415. package/assets/esri/core/workers/chunks/7c2ec96749972e0b8a13.js +0 -1
  416. package/assets/esri/core/workers/chunks/7ffc1db10b00754398e8.js +0 -1
  417. package/assets/esri/core/workers/chunks/81546c6141d564ed59c9.js +0 -1
  418. package/assets/esri/core/workers/chunks/852dd5af8e704613310a.js +0 -1
  419. package/assets/esri/core/workers/chunks/ac9c6779771ec855da79.js +0 -2
  420. package/assets/esri/core/workers/chunks/bbff052a991a2dc36960.js +0 -1
  421. package/assets/esri/core/workers/chunks/bcab8b9ce2f9d2ebaae7.js +0 -1
  422. package/assets/esri/core/workers/chunks/bf190d672dcbaedc1a41.js +0 -1
  423. package/assets/esri/core/workers/chunks/c255c9279815359fdce5.js +0 -1
  424. package/assets/esri/core/workers/chunks/c2594024d72133d3ed7b.js +0 -2
  425. package/assets/esri/core/workers/chunks/ce9de24cb96b56d20562.js +0 -2
  426. package/assets/esri/core/workers/chunks/d8dc922f7466300b668f.js +0 -2
  427. package/assets/esri/core/workers/chunks/d9948763423784b68c09.js +0 -1
  428. package/assets/esri/core/workers/chunks/dbf6011dd7933f02d41d.js +0 -66
  429. package/assets/esri/core/workers/chunks/e4e9dd635bdef18d0bd5.js +0 -1
  430. package/assets/esri/core/workers/chunks/e69f2e3c2d5e71fbb42f.js +0 -1
  431. package/assets/esri/core/workers/chunks/f61632c06c05b72e7017.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{DerivedCircle as t,interpolateCircle as a}from"./circleUtils.js";import{correctSweepAndWinding as r,wrapAtan2 as n}from"./mathUtils.js";function o(a,o){const[s,c]=o.a,[h,e]=a,[i,m]=s,[M,f]=c,u=h-M,l=e-f,p=Math.sqrt(u*u+l*l),b=n(e-f,h-M),j=r(n(m-f,i-M),b,o);return new t(M,f,p,b,j,!1)}function s(t,r,n){const{cx:o,cy:s,thetaStart:c,thetaEnd:h}=t,[e,i,m,M]=r.a,f=c*(1-n)+h*n;return[{a:[a(t,n),[o,s],Math.abs(f-c)<Math.PI?1:0,M]},{a:[[...e],[o,s],Math.abs(h-f)<Math.PI?1:0,M]}]}export{o as deriveCircleFromEllipticArc4,s as splitEllipticArc4};
5
+ import{floatEqualRelative as t}from"../../../core/mathUtils.js";import{DerivedCircle as a,interpolateCircle as r}from"./circleUtils.js";import{correctSweepAndWinding as o,wrapAtan2 as s}from"./mathUtils.js";function h(r,h){const[n,c]=h.a,[i,e]=r,[m,M]=n,[f,l]=c,p=i-f,u=e-l,j=Math.sqrt(p*p+u*u),U=m-f,b=M-l,q=Math.sqrt(U*U+b*b),x=0===j||0===q||!t(j,q),I=j,P=s(e-l,i-f),d=o(s(M-l,m-f),P,h);return new a(f,l,I,P,d,x)}function n(t,a,o){const{cx:s,cy:h,thetaStart:n,thetaEnd:c}=t,[i,e,m,M]=a.a,f=n*(1-o)+c*o;return[{a:[r(t,o),[s,h],Math.abs(f-n)<Math.PI?1:0,M]},{a:[[...i],[s,h],Math.abs(c-f)<Math.PI?1:0,M]}]}export{h as deriveCircleFromEllipticArc4,n as splitEllipticArc4};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{cloneCurve as t}from"./curveUtils.js";import{correctSweepAndWinding as s,wrapAtan2 as n,findClosestAndFurthestCurveParametersToPoint as c,matchWindingAndWrap as o}from"./mathUtils.js";class i{constructor(t,s,n,c,o,i,r,u){this.cx=t,this.cy=s,this.a=n,this.b=c,this.cosR=o,this.sinR=i,this.u1=r,this.u2=u}}function r(t,c){const[o,r,u,a,h,e,f]=c.a,[M,m]=t,[R,b]=o,[p,l]=r,P=e*f,x=Math.cos(h),I=Math.sin(h),j=n(1/P*(m-l)*x-1/P*(M-p)*I,1/e*(m-l)*I+1/e*(M-p)*x),v=s(n(1/P*(b-l)*x-1/P*(R-p)*I,1/e*(b-l)*I+1/e*(R-p)*x),j,c);return new i(p,l,e,P,x,I,j,v)}function u(t,s){const{a:n,b:c,cosR:o,sinR:i,cx:r,cy:u}=t,a=Math.cos(s),h=Math.sin(s);return[n*a*o-c*h*i+r,n*a*i+c*h*o+u]}function a(t,s){const{u1:n,u2:c}=t;return u(t,n*(1-s)+c*s)}function h(s,n,c){if(c<0||c>1)return[];if(0===c||1===c)return[t(n)];const[o,[i,r],u,h,e,f,M]=n.a,{u1:m,u2:R}=s,b=m*(1-c)+R*c;return[{a:[[...a(s,c)],[i,r],Math.abs(b-m)<Math.PI?1:0,h,e,f,M]},{a:[[...o],[i,r],Math.abs(R-b)<Math.PI?1:0,h,e,f,M]}]}function e(t,s){const{a:n,b:i,cosR:r,sinR:a,u1:h,u2:e}=t,f=Math.PI/6,M=c(s,[1*f,2*f,4*f,5*f,7*f,8*f,10*f,11*f],(s=>{const c=Math.cos(s),o=Math.sin(s),[h,e]=u(t,s);return[h,e,-n*r*o-i*a*c,-n*a*o+i*r*c,-n*r*c+i*a*o,-n*a*c-i*r*o]})).map((t=>o(t,h,e)));M.push(h,e);let m,R,b=1/0;for(const c of M){const n=(c-h)/(e-h);if(n<0||n>1)continue;const o=u(t,c),[i,r]=o,a=s[0]-i,f=s[1]-r,M=a*a+f*f;M<b&&(m=n,R=o,b=M)}return{t:m,curvePoint:R,distance:Math.sqrt(b)}}export{i as DerivedEllipse,e as closestPointOnEllipse,r as deriveEllipse,a as interpolateEllipse,h as splitEllipticArc7};
5
+ import{set as t,invert as s,transpose as n,multiply as o}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as r}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{transformMat3 as a}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{expandPointInPlace as c}from"../aaBoundingRect.js";import{cloneCurve as i}from"./curveUtils.js";import{correctSweepAndWinding as u,wrapAtan2 as h,findClosestAndFurthestCurveParametersToPoint as e,matchWindingAndWrap as f,distance2 as M,intersectLineLine as l}from"./mathUtils.js";class m{constructor(t,s,n,o,r,a,c,i,u){this.cx=t,this.cy=s,this.a=n,this.b=o,this.cosR=r,this.sinR=a,this.u1=c,this.u2=i,this.isInvalid=u}}function b(t,s){const[n,o,r,a,c,i,e]=s.a,[f,M]=t,[l,b]=n,[p,R]=o,q=i*e,I=Math.cos(c),g=Math.sin(c),x=h(1/q*(M-R)*I-1/q*(f-p)*g,1/i*(M-R)*g+1/i*(f-p)*I),j=u(h(1/q*(b-R)*I-1/q*(l-p)*g,1/i*(b-R)*g+1/i*(l-p)*I),x,s);return new m(p,R,i,q,I,g,x,j,0===i||0===q)}function p(t,s){const{a:n,b:o,cosR:r,sinR:a,cx:c,cy:i}=t,u=Math.cos(s),h=Math.sin(s);return[n*u*r-o*h*a+c,n*u*a+o*h*r+i]}function R(t,s){const{u1:n,u2:o}=t;return p(t,n*(1-s)+o*s)}function q(t,s,n){if(n<0||n>1)return[];if(0===n||1===n)return[i(s)];const[o,[r,a],c,u,h,e,f]=s.a,{u1:M,u2:l}=t,m=M*(1-n)+l*n;return[{a:[[...R(t,n)],[r,a],Math.abs(m-M)<Math.PI?1:0,u,h,e,f]},{a:[[...o],[r,a],Math.abs(l-m)<Math.PI?1:0,u,h,e,f]}]}function I(t,s){const{a:n,b:o,cosR:r,sinR:a,u1:c,u2:i}=t,u=Math.PI/6,h=e(s,[1*u,2*u,4*u,5*u,7*u,8*u,10*u,11*u],(s=>{const c=Math.cos(s),i=Math.sin(s),[u,h]=p(t,s);return[u,h,-n*r*i-o*a*c,-n*a*i+o*r*c,-n*r*c+o*a*i,-n*a*c-o*r*i]})).map((t=>f(t,c,i)));h.push(c,i);let M,l,m=1/0;for(const e of h){const n=(e-c)/(i-c);if(n<0||n>1)continue;const o=p(t,e),[r,a]=o,u=s[0]-r,h=s[1]-a,f=u*u+h*h;f<m&&(M=n,l=o,m=f)}return{t:M,curvePoint:l,distance:Math.sqrt(m)}}function g(t,s,n){const o=b(s,n),{a:r,b:a,u1:i,u2:u,cosR:h,sinR:e,isInvalid:M}=o,l=u-i,m=n.a[0];if(c(t,s),c(t,m),M)return t;const R=Math.atan2(-a*e,r*h),q=R+Math.PI,I=Math.atan2(a*h,r*e),g=I+Math.PI;for(const b of[R,q,I,g]){const s=f(b,i,u),n=(s-i)/l;n>0&&n<1&&c(t,p(o,s))}return t}function x(t,s,n){const[o,r,a,c,i,u,h]=s.a,e=b(t,s),{u1:f,u2:m,isInvalid:q}=e,I=m-f;if(q)return Math.sqrt(M(t,o));const g=14,x=[0,0];let j=0,v=[R(e,0),R(e,.25),R(e,.5),R(e,.75),R(e,1)];for(let b=0;b<g;b++){const t=v.length-1,s=I/(2*t),o=[];for(let n=0;n<t;n++)o.push(v[n]),o.push(p(e,f+(2*n+1)*s));o.push(v[v.length-1]),v=o,j=0;let a=0;for(let n=1;n<v.length;n++){const t=v[n-1],s=v[n];if(j+=Math.sqrt(M(t,s)),n>1){const o=v[n-2],c=l(x,o,t,r,s);a+=c?Math.sqrt(M(t,c)):Math.abs(s[0]-t[0])+Math.abs(s[1]-t[1])}else a+=j}if(a-j<n)return j}return j}const j=r(),v=r(),P=r(),d=r();function y(r,c,i){const[u,e,f,l,m,p,R]=c.a,q=b(r,c),{cosR:I,sinR:g,a:x,b:y,cx:U,cy:w}=q,B=a([0,0],u,i),k=a([0,0],e,i),z=i[0]*i[4]<0?1-l:l;{const s=x*x*g*g+y*y*I*I,n=2*(y*y-x*x)*g*I,o=x*x*I*I+y*y*g*g,r=-2*s*U-n*w,a=-n*U-2*o*w;t(j,s,n/2,r/2,n/2,o,a/2,r/2,a/2,s*U*U+n*U*w+o*w*w-x*x*y*y)}if(s(v,i),null==v){const t=a([0,0],r,i);return{a:[B,k,f,l,h(B[1],B[0]),Math.sqrt(M(B,t))/2,0]}}n(P,v),o(d,o(d,P,j),v);{const t=d[0],s=2*d[1],n=d[4],o=2*d[2],r=2*d[5],a=s*s-4*t*n,c=2*(t*r*r+n*o*o-s*o*r+a*d[8]),i=Math.sqrt((t-n)**2+s*s),u=-Math.sqrt(c*(t+n+i))/a,e=-Math.sqrt(c*(t+n-i))/a;return{a:[B,k,f,z,.5*h(-s,n-t),u,e/u]}}}export{m as DerivedEllipse,I as closestPointOnEllipse,b as deriveEllipse,g as ellipticArcExtent,x as ellipticArcLength,R as interpolateEllipse,q as splitEllipticArc7,y as transformEllipticArc};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{floatEqualAbsolute as t}from"../../../core/mathUtils.js";import{squaredDistance as n}from"../../../core/libs/gl-matrix-2/math/vec2.js";function r(t,n,r,o){return t[0]=n[0]*(1-o)+r[0]*o,t[1]=n[1]*(1-o)+r[1]*o,t}function o(t,r){return n(t,r)}function a(t,n,r){const a=o(n,r);if(0===a)return o(n,t);const c=(n[0]-t[0])*(r[1]-t[1])-(n[1]-t[1])*(r[0]-t[0]);return c*c/a}function c(t,n){const r=Math.atan2(t,n);return r<0?r+2*Math.PI:r}function u(n,r,o){const[a,c,u,e]=o.a,i=Math.abs(n-r),h=i>Math.PI,s=i<Math.PI,M=t(i,Math.PI);return(!M&&(h&&u||s&&!u)||M&&(n>r&&e||n<r&&!e))&&(n+=2*(Math.sign(r-n)||1)*Math.PI),n}function e(t,n,r){const o=2*Math.PI,a=t-n;return(r-n)*a<0?t-=(Math.trunc(a/o)+Math.sign(a))*o:a>=o&&(t-=Math.trunc(a/o)*o),t}function i(t,n,r,o=10){return n.map((n=>{let a=n;for(let c=0;c<o;c++){const[n,o,c,u,e,i]=r(a),h=t[0]-n,s=t[1]-o,M=-c,f=-u;a+=-(2*h*M+2*s*f)/(2*M*M+2*h*-e+2*f*f+2*s*-i||1e-6)}return a}))}export{u as correctSweepAndWinding,o as distance2,i as findClosestAndFurthestCurveParametersToPoint,r as interpolateSegment,e as matchWindingAndWrap,a as pointToSegmentDistance2,c as wrapAtan2};
5
+ import{floatEqualAbsolute as t}from"../../../core/mathUtils.js";import{squaredDistance as n}from"../../../core/libs/gl-matrix-2/math/vec2.js";function r(t,n,r,o){return t[0]=n[0]*(1-o)+r[0]*o,t[1]=n[1]*(1-o)+r[1]*o,t}function o(t,r){return n(t,r)}function u(t,n,r){const u=o(n,r);if(0===u)return o(n,t);const c=(n[0]-t[0])*(r[1]-t[1])-(n[1]-t[1])*(r[0]-t[0]);return c*c/u}function c(t,n,r,o,u){const[c,a]=n,[e,i]=r,[s,h]=o,[f,M]=u,m=(c-e)*(h-M)-(a-i)*(s-f);if(0===m)return null;const l=(c*i-a*e)*(s-f)-(c-e)*(s*M-h*f),I=(c*i-a*e)*(h-M)-(a-i)*(s*M-h*f);return t[0]=l/m,t[1]=I/m,t}function a(t,n){const r=Math.atan2(t,n);return r<0?r+2*Math.PI:r}function e(n,r,o){const[u,c,a,e]=o.a,i=Math.abs(n-r),s=i>Math.PI,h=i<Math.PI,f=t(i,Math.PI);return(!f&&(s&&a||h&&!a)||f&&(n>r&&e||n<r&&!e))&&(n+=2*(Math.sign(r-n)||1)*Math.PI),n}function i(t,n,r){const o=2*Math.PI,u=t-n;return(r-n)*u<0?t-=(Math.trunc(u/o)+Math.sign(u))*o:u>=o&&(t-=Math.trunc(u/o)*o),t}function s(t,n,r,o=10){return n.map((n=>{let u=n;for(let c=0;c<o;c++){const[n,o,c,a,e,i]=r(u),s=t[0]-n,h=t[1]-o,f=-c,M=-a;u+=-(2*s*f+2*h*M)/(2*f*f+2*s*-e+2*M*M+2*h*-i||1e-6)}return u}))}export{e as correctSweepAndWinding,o as distance2,s as findClosestAndFurthestCurveParametersToPoint,r as interpolateSegment,c as intersectLineLine,i as matchWindingAndWrap,u as pointToSegmentDistance2,a as wrapAtan2};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{closestPointsOnBezierCurve as t,splitBezierCurve as r}from"./bezierCurveUtils.js";import{closestPointOnCircle as i}from"./circleUtils.js";import{deriveCircleFromCircularArc as n,splitCircularArc as o}from"./circularArcUtils.js";import{isBezierCurve as c,isCircularArc as s,isEllipticArc as e,isEllipticArc4 as u,cloneCurve as f}from"./curveUtils.js";import{deriveCircleFromEllipticArc4 as l,splitEllipticArc4 as m}from"./ellipticArc4Utils.js";import{deriveEllipse as p,closestPointOnEllipse as a,splitEllipticArc7 as j}from"./ellipticArc7Utils.js";const U=1e-6;function d(i,n,o,c){const s=t(i,n,o).filter((({distance:t})=>t<=c)),e=[];let u=0,f=n;for(const{t}of s){const n=(t-u)/(1-u);if(n<U||1-n<U)continue;const[o,c]=r(i,f,t);e.push(o),f=c,u=t}return e.push(f),e}function v(t,r,c,s){const e=n(t,r);if(e.isInvalid)return[f(r)];const{t:u,distance:l}=i(e,c);return l<=s?o(e,r,u):[f(r)]}function A(t,r,n,o){const c=l(t,r),{t:s,distance:e}=i(c,n);return e<=o?m(c,r,s):[f(r)]}function h(t,r,i,n){const o=p(t,r),{t:c,distance:s}=a(o,i);return s<=n?j(o,r,c):[f(r)]}function b(t,r,i,n){return c(r)?d(t,r,i,n):s(r)?v(t,r,i,n):e(r)?u(r)?A(t,r,i,n):h(t,r,i,n):[f(r)]}export{b as splitCurveAtPoint};
5
+ import{closestPointsOnBezierCurve as t,splitBezierCurve as i}from"./bezierCurveUtils.js";import{closestPointOnCircle as r}from"./circleUtils.js";import{deriveCircleFromCircularArc as n,splitCircularArc as o}from"./circularArcUtils.js";import{isBezierCurve as s,isCircularArc as c,isEllipticArc as e,isEllipticArc4 as u,cloneCurve as f}from"./curveUtils.js";import{deriveCircleFromEllipticArc4 as l,splitEllipticArc4 as m}from"./ellipticArc4Utils.js";import{deriveEllipse as p,closestPointOnEllipse as a,splitEllipticArc7 as d}from"./ellipticArc7Utils.js";const j=1e-6;function U(r,n,o,s){const c=t(r,n,o).filter((({distance:t})=>t<=s)),e=[];let u=0,f=n;for(const{t}of c){const n=(t-u)/(1-u);if(n<j||1-n<j)continue;const[o,s]=i(r,f,t);e.push(o),f=s,u=t}return e.push(f),e}function v(t,i,s,c){const e=n(t,i);if(e.isInvalid)return[f(i)];const{t:u,distance:l}=r(e,s);return l<=c?o(e,i,u):[f(i)]}function A(t,i,n,o){const s=l(t,i);if(s.isInvalid)return[f(i)];const{t:c,distance:e}=r(s,n);return e<=o?m(s,i,c):[f(i)]}function I(t,i,r,n){const o=p(t,i);if(o.isInvalid)return[f(i)];const{t:s,distance:c}=a(o,r);return c<=n?d(o,i,s):[f(i)]}function h(t,i,r,n){return s(i)?U(t,i,r,n):c(i)?v(t,i,r,n):e(i)?u(i)?A(t,i,r,n):I(t,i,r,n):[f(i)]}export{h as splitCurveAtPoint};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{ObjectStack as T}from"../../core/ObjectStack.js";import{multiply as _,invert as O}from"../../core/libs/gl-matrix-2/math/mat4.js";import{i as R}from"../../chunks/vec32.js";import{create as t}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{t as r}from"../../chunks/vec42.js";import{fromValues as A}from"../../core/libs/gl-matrix-2/factories/vec4f64.js";import{fromRay as E,fromLineSegmentAndDirection as F,create as o}from"./clipRay.js";import{create as n,fromPoints as e,signedDistance as c,clip as f,copy as i,clipInfinite as B}from"./plane.js";import{sm4d as M,sv4d as G}from"./vectorStacks.js";function H(T){return T?[n(T[0]),n(T[1]),n(T[2]),n(T[3]),n(T[4]),n(T[5])]:[n(),n(),n(),n(),n(),n()]}function I(){return[t(),t(),t(),t(),t(),t(),t(),t()]}function N(T,_){for(let O=0;O<b;O++)i(T[O],_[O]);return T}function L(T,t,A,E=y){const F=_(M.get(),t,T);O(F,F);for(let _=0;_<h;++_){const T=r(G.get(),k[_],F);R(E[_],T[0]/T[3],T[1]/T[3],T[2]/T[3])}P(A,E)}function P(T,_){e(_[g.FAR_BOTTOM_LEFT],_[g.NEAR_BOTTOM_LEFT],_[g.NEAR_TOP_LEFT],T[j.LEFT]),e(_[g.NEAR_BOTTOM_RIGHT],_[g.FAR_BOTTOM_RIGHT],_[g.FAR_TOP_RIGHT],T[j.RIGHT]),e(_[g.FAR_BOTTOM_LEFT],_[g.FAR_BOTTOM_RIGHT],_[g.NEAR_BOTTOM_RIGHT],T[j.BOTTOM]),e(_[g.NEAR_TOP_LEFT],_[g.NEAR_TOP_RIGHT],_[g.FAR_TOP_RIGHT],T[j.TOP]),e(_[g.NEAR_BOTTOM_LEFT],_[g.NEAR_BOTTOM_RIGHT],_[g.NEAR_TOP_RIGHT],T[j.NEAR]),e(_[g.FAR_BOTTOM_RIGHT],_[g.FAR_BOTTOM_LEFT],_[g.FAR_TOP_LEFT],T[j.FAR])}function s(T,_){for(let O=0;O<b;O++){const R=T[O];if(R[0]*_[0]+R[1]*_[1]+R[2]*_[2]+R[3]>=_[3])return!1}return!0}function u(T,_){return p(T,E(_,x.get()))}function m(T,_){for(let O=0;O<b;O++){const R=T[O];if(!B(R,_))return!1}return!0}function a(T,_,O){return p(T,F(_,O,x.get()))}function l(T,_){for(let O=0;O<b;O++){if(c(T[O],_)>0)return!1}return!0}function p(T,_){for(let O=0;O<b;O++)if(!f(T[O],_))return!1;return!0}var j,g;!function(T){T[T.LEFT=0]="LEFT",T[T.RIGHT=1]="RIGHT",T[T.BOTTOM=2]="BOTTOM",T[T.TOP=3]="TOP",T[T.NEAR=4]="NEAR",T[T.FAR=5]="FAR"}(j||(j={})),function(T){T[T.NEAR_BOTTOM_LEFT=0]="NEAR_BOTTOM_LEFT",T[T.NEAR_BOTTOM_RIGHT=1]="NEAR_BOTTOM_RIGHT",T[T.NEAR_TOP_RIGHT=2]="NEAR_TOP_RIGHT",T[T.NEAR_TOP_LEFT=3]="NEAR_TOP_LEFT",T[T.FAR_BOTTOM_LEFT=4]="FAR_BOTTOM_LEFT",T[T.FAR_BOTTOM_RIGHT=5]="FAR_BOTTOM_RIGHT",T[T.FAR_TOP_RIGHT=6]="FAR_TOP_RIGHT",T[T.FAR_TOP_LEFT=7]="FAR_TOP_LEFT"}(g||(g={}));const v={bottom:[g.FAR_BOTTOM_RIGHT,g.NEAR_BOTTOM_RIGHT,g.NEAR_BOTTOM_LEFT,g.FAR_BOTTOM_LEFT],near:[g.NEAR_BOTTOM_LEFT,g.NEAR_BOTTOM_RIGHT,g.NEAR_TOP_RIGHT,g.NEAR_TOP_LEFT],far:[g.FAR_BOTTOM_RIGHT,g.FAR_BOTTOM_LEFT,g.FAR_TOP_LEFT,g.FAR_TOP_RIGHT],right:[g.NEAR_BOTTOM_RIGHT,g.FAR_BOTTOM_RIGHT,g.FAR_TOP_RIGHT,g.NEAR_TOP_RIGHT],left:[g.FAR_BOTTOM_LEFT,g.NEAR_BOTTOM_LEFT,g.NEAR_TOP_LEFT,g.FAR_TOP_LEFT],top:[g.FAR_TOP_LEFT,g.NEAR_TOP_LEFT,g.NEAR_TOP_RIGHT,g.FAR_TOP_RIGHT]},b=6,h=8,k=[A(-1,-1,-1,1),A(1,-1,-1,1),A(1,1,-1,1),A(-1,1,-1,1),A(-1,-1,1,1),A(1,-1,1,1),A(1,1,1,1),A(-1,1,1,1)],x=new T(o),y=I();export{j as PlaneIndex,g as PointIndex,P as computePlanes,N as copy,H as create,I as createPoints,L as fromMatrix,m as intersectClipRay,a as intersectsLineSegment,l as intersectsPoint,u as intersectsRay,s as intersectsSphere,b as numPlanes,h as numPoints,v as planePointIndices};
5
+ import{ObjectStack as T}from"../../core/ObjectStack.js";import{multiply as _,invert as O}from"../../core/libs/gl-matrix-2/math/mat4.js";import{i as R}from"../../chunks/vec32.js";import{create as t}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{t as r}from"../../chunks/vec42.js";import{fromValues as A}from"../../core/libs/gl-matrix-2/factories/vec4f64.js";import{fromRay as E,fromLineSegmentAndDirection as F,create as o}from"./clipRay.js";import{create as n,fromPoints as e,signedDistance as c,clip as f,clipInfinite as i,copy as B}from"./plane.js";import{sm4d as M,sv4d as G}from"./vectorStacks.js";function H(T){return T?[n(T[0]),n(T[1]),n(T[2]),n(T[3]),n(T[4]),n(T[5])]:[n(),n(),n(),n(),n(),n()]}function I(){return[t(),t(),t(),t(),t(),t(),t(),t()]}function N(T,_){for(let O=0;O<b;O++)B(T[O],_[O]);return T}function L(T,t,A,E=y){const F=_(M.get(),t,T);O(F,F);for(let _=0;_<h;++_){const T=r(G.get(),k[_],F);R(E[_],T[0]/T[3],T[1]/T[3],T[2]/T[3])}P(A,E)}function P(T,_){e(_[g.FAR_BOTTOM_LEFT],_[g.NEAR_BOTTOM_LEFT],_[g.NEAR_TOP_LEFT],T[j.LEFT]),e(_[g.NEAR_BOTTOM_RIGHT],_[g.FAR_BOTTOM_RIGHT],_[g.FAR_TOP_RIGHT],T[j.RIGHT]),e(_[g.FAR_BOTTOM_LEFT],_[g.FAR_BOTTOM_RIGHT],_[g.NEAR_BOTTOM_RIGHT],T[j.BOTTOM]),e(_[g.NEAR_TOP_LEFT],_[g.NEAR_TOP_RIGHT],_[g.FAR_TOP_RIGHT],T[j.TOP]),e(_[g.NEAR_BOTTOM_LEFT],_[g.NEAR_BOTTOM_RIGHT],_[g.NEAR_TOP_RIGHT],T[j.NEAR]),e(_[g.FAR_BOTTOM_RIGHT],_[g.FAR_BOTTOM_LEFT],_[g.FAR_TOP_LEFT],T[j.FAR])}function s(T,_){for(let O=0;O<b;O++){const R=T[O];if(R[0]*_[0]+R[1]*_[1]+R[2]*_[2]+R[3]>=_[3])return!1}return!0}function u(T,_){return p(T,E(_,x.get()))}function m(T,_){for(let O=0;O<b;O++){const R=T[O];if(!i(R,_))return!1}return!0}function a(T,_,O){return p(T,F(_,O,x.get()))}function l(T,_){for(let O=0;O<b;O++){if(c(T[O],_)>0)return!1}return!0}function p(T,_){for(let O=0;O<b;O++)if(!f(T[O],_))return!1;return!0}var j,g;!function(T){T[T.LEFT=0]="LEFT",T[T.RIGHT=1]="RIGHT",T[T.BOTTOM=2]="BOTTOM",T[T.TOP=3]="TOP",T[T.NEAR=4]="NEAR",T[T.FAR=5]="FAR"}(j||(j={})),function(T){T[T.NEAR_BOTTOM_LEFT=0]="NEAR_BOTTOM_LEFT",T[T.NEAR_BOTTOM_RIGHT=1]="NEAR_BOTTOM_RIGHT",T[T.NEAR_TOP_RIGHT=2]="NEAR_TOP_RIGHT",T[T.NEAR_TOP_LEFT=3]="NEAR_TOP_LEFT",T[T.FAR_BOTTOM_LEFT=4]="FAR_BOTTOM_LEFT",T[T.FAR_BOTTOM_RIGHT=5]="FAR_BOTTOM_RIGHT",T[T.FAR_TOP_RIGHT=6]="FAR_TOP_RIGHT",T[T.FAR_TOP_LEFT=7]="FAR_TOP_LEFT"}(g||(g={}));const v={bottom:[g.FAR_BOTTOM_RIGHT,g.NEAR_BOTTOM_RIGHT,g.NEAR_BOTTOM_LEFT,g.FAR_BOTTOM_LEFT],near:[g.NEAR_BOTTOM_LEFT,g.NEAR_BOTTOM_RIGHT,g.NEAR_TOP_RIGHT,g.NEAR_TOP_LEFT],far:[g.FAR_BOTTOM_RIGHT,g.FAR_BOTTOM_LEFT,g.FAR_TOP_LEFT,g.FAR_TOP_RIGHT],right:[g.NEAR_BOTTOM_RIGHT,g.FAR_BOTTOM_RIGHT,g.FAR_TOP_RIGHT,g.NEAR_TOP_RIGHT],left:[g.FAR_BOTTOM_LEFT,g.NEAR_BOTTOM_LEFT,g.NEAR_TOP_LEFT,g.FAR_TOP_LEFT],top:[g.FAR_TOP_LEFT,g.NEAR_TOP_LEFT,g.NEAR_TOP_RIGHT,g.FAR_TOP_RIGHT]},b=6,h=8,k=[A(-1,-1,-1,1),A(1,-1,-1,1),A(1,1,-1,1),A(-1,1,-1,1),A(-1,-1,1,1),A(1,-1,1,1),A(1,1,1,1),A(-1,1,1,1)],x=new T(o),y=I();export{j as PlaneIndex,g as PointIndex,P as computePlanes,N as copy,H as create,I as createPoints,L as fromMatrix,m as intersectClipRay,a as intersectsLineSegment,l as intersectsPoint,u as intersectsRay,s as intersectsSphere,b as numPlanes,h as numPoints,v as planePointIndices};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../request.js";import{equals as r}from"../../../core/arrayUtils.js";import{throwIfAborted as e}from"../../../core/promiseUtils.js";import{getFileFormatId as s,getMimeTypeOrFilenameFormatId as n}from"../../../layers/support/infoFor3D.js";class a{constructor(t,r,e){this.assetName=t,this.assetMimeType=r,this.parts=e}equals(t){return this===t||this.assetName===t.assetName&&this.assetMimeType===t.assetMimeType&&r(this.parts,t.parts,((t,r)=>t.equals(r)))}isOnService(t){return this.parts.every((r=>r.isOnService(t)))}makeHash(){let t="";for(const r of this.parts)t+=r.partHash;return t}async toBlob(t){const{parts:r}=this;if(1===r.length)return r[0].toBlob(t);const s=await Promise.all(r.map((r=>r.toBlob(t))));return e(t),new Blob(s)}}class i{constructor(t,r){this.partUrl=t,this.partHash=r}equals(t){return this===t||this.partUrl===t.partUrl&&this.partHash===t.partHash}isOnService(t){return this.partUrl.startsWith(`${t.path}/assets/`)}async toBlob(r){const{data:s}=await t(this.partUrl,{responseType:"blob"});return e(r),s}}function o(t){return l(t?.source)}function u(t){if(!Array.isArray(t))return!1;return t.every((t=>t instanceof a))}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,f=/\.(gltf|glb)/i;function l(t){if(!t)return!1;if(Array.isArray(t)){return t.some(p)}return p(t)}function p(t){if(t instanceof File){const{type:r,name:e}=t;return c.test(r)||f.test(e)}return c.test(t.assetMimeType)||f.test(t.assetName)}function m(t,r){if(!t)return!1;const{source:e}=t;return y(e,r)}function h(t,r){if(t===r)return!0;const{source:e}=t,{source:s}=r;if(e===s)return!0;if(u(e)&&u(s)){if(e.length!==s.length)return!1;const t=(t,r)=>t.assetName<r.assetName?-1:t.assetName>r.assetName?1:0,r=[...e].sort(t),n=[...s].sort(t);for(let e=0;e<r.length;++e)if(!r[e].equals(n[e]))return!1;return!0}return!1}function y(t,r){if(Array.isArray(t)){const e=t;return e.length>0&&e.every((t=>g(t,r)))}return g(t,r)}function g(t,r){return t instanceof a&&t.isOnService(r)}function b(t,r){return t instanceof File?s(t,r):n(t.assetMimeType,t.assetName,r)}function N(t){return Array.isArray(t)?t:[t]}function A(t){return!!t.original}export{a as ServiceAsset,i as ServiceAssetPart,b as assetFormatId,g as assetIsOnService,m as externalIsOnService,N as externalSourceToMultiPart,h as externalSourcesAreEqual,p as isDisplayAsset,o as isDisplayExternal,l as isDisplaySource,A as isOriginalExternal,y as sourceIsOnService};
5
+ import s from"../../../request.js";import{equals as t}from"../../../core/arrayUtils.js";import"../../../core/has.js";import{throwIfAborted as e}from"../../../core/promiseUtils.js";import{getFileFormatId as r,getMimeTypeOrFilenameFormatId as a}from"../../../layers/support/infoFor3D.js";class i{constructor(s,t,e){this.assetName=s,this.assetMimeType=t,this.parts=e}equals(s){return this===s||this.assetName===s.assetName&&this.assetMimeType===s.assetMimeType&&t(this.parts,s.parts,((s,t)=>s.equals(t)))}isOnService(s){return this.parts.every((t=>t.isOnService(s)))}makeHash(){let s="";for(const t of this.parts)s+=t.partHash;return s}async toBlob(s){const{parts:t}=this;if(1===t.length)return t[0].toBlob(s);const r=await Promise.all(t.map((t=>t.toBlob(s))));return e(s),new Blob(r)}}class n{constructor(s,t){this.partUrl=s,this.partHash=t}equals(s){return this===s||this.partUrl===s.partUrl&&this.partHash===s.partHash}isOnService(s){return this.partUrl.startsWith(`${s.path}/assets/`)}async toBlob(t){const{data:r}=await s(this.partUrl,{responseType:"blob"});return e(t),r}}function o(s){return l(s?.source)}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,u=/\.(gltf|glb)/i;function l(s){switch(s?.type){case"client":return Array.isArray(s.files)?s.files.some(p):p(s.files);case"service":return s.assets.some(p);case"loadable":return!0;default:return!1}}function p(s){if(s instanceof File){const{type:t,name:e}=s;return c.test(t)||u.test(e)}return c.test(s.assetMimeType)||u.test(s.assetName)}function f(s,t){if(!s)return!1;const{source:e}=s;return h(e,t)}function m(s,t){if(s===t)return!0;const{source:e}=s,{source:r}=t;if(e===r)return!0;if("service"===e.type&&"service"===r.type){if(e.assets.length!==r.assets.length)return!1;const s=(s,t)=>s.assetName<t.assetName?-1:s.assetName>t.assetName?1:0,t=[...e.assets].sort(s),a=[...r.assets].sort(s);for(let e=0;e<t.length;++e)if(!t[e].equals(a[e]))return!1;return!0}return!1}function h(s,t){return"service"===s.type&&s.assets.every((s=>s.isOnService(t)))}function y(s,t){return s instanceof File?r(s,t):a(s.assetMimeType,s.assetName,t)}function b(s){switch(s.type){case"client":return Array.isArray(s.files)?s.files:[s.files];case"service":return s.assets;case"loadable":return}}function v(s){return!!s.original}export{i as ServiceAsset,n as ServiceAssetPart,y as assetFormatId,f as externalIsOnService,b as externalSourceToMultiPart,m as externalSourcesAreEqual,p as isDisplayAsset,o as isDisplayExternal,l as isDisplaySource,v as isOriginalExternal};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{colorGamma as e}from"../../../../../colorUtils.js";import t from"../../../../../core/Logger.js";import{getOrCreateMapValue as s}from"../../../../../core/MapUtils.js";import{deg2rad as r}from"../../../../../core/mathUtils.js";import{exactEquals as i}from"../../../../../core/libs/gl-matrix-2/math/quat.js";import{clone as o,IDENTITY as a}from"../../../../../core/libs/gl-matrix-2/factories/quatf64.js";import{p as n}from"../../../../../chunks/vec32.js";import{ZEROS as l,clone as c,ONES as u}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import h from"../../../MeshMaterialMetallicRoughness.js";import{convertVertexSpace as f}from"../../vertexSpaceConversion.js";import{Buffer as m}from"./buffer.js";import{smoothNormals as p}from"./geometry.js";import{BufferOutputType as d,ImageOutputType as g,AttributeType as x,TargetBuffer as _,AlphaMode as T}from"./types.js";import{imageToArrayBuffer as R,imageToDataURI as A}from"./imageutils.js";import{isEncodedMeshTexture as b}from"../../../../../views/3d/glTF/internal/resourceUtils.js";import{DataType as M,TextureWrapMode as E}from"../../../../../views/webgl/enums.js";const O=()=>t.getLogger("esri.geometry.support.meshUtils.exporters.gltf.gltf");class w{constructor(e,t){this.options=t,this._materialMap=new Array,this._imageMap=new Map,this._textureMap=new Map,this.gltf={asset:{version:"2.0",copyright:e.copyright,generator:e.generator},extras:{output:t.output,binChunkBuffer:null,promises:[]}},this._addScenes(e)}_addScenes(e){this.gltf.scene=e.defaultScene;const t=this.gltf.extras,s=t.output.buffer===d.GLB||t.output.image===g.GLB;s&&(t.binChunkBuffer=new m(this.gltf)),e.forEachScene((e=>{this._addScene(e)})),s&&t.binChunkBuffer.finalize()}_addScene(e){this.gltf.scenes||(this.gltf.scenes=[]);const t={};e.name&&(t.name=e.name),e.forEachNode((e=>{t.nodes||(t.nodes=[]),t.nodes.push(...this._addNodes(e))})),this.gltf.scenes.push(t)}_addNodes(e){this.gltf.nodes||(this.gltf.nodes=[]);const t={};e.name&&(t.name=e.name);const s=e.translation;n(s,l)||(t.translation=c(s));const r=e.rotation;i(r,a)||(t.rotation=o(r));const h=e.scale;n(h,u)||(t.scale=c(h));const f=this.gltf.nodes.length;if(this.gltf.nodes.push(t),e.mesh&&e.mesh.vertexAttributes.position){const s=this._createMeshes(e.mesh),r=[f];if(1===s.length)this._addMesh(t,s[0]);else for(const e of s){const t={};this._addMesh(t,e),r.push(this.gltf.nodes.length),this.gltf.nodes.push(t)}return r}return e.forEachNode((e=>{t.children||(t.children=[]),t.children.push(...this._addNodes(e))})),[f]}_addMesh(e,t){this.gltf.meshes??=[];const s=this.gltf.meshes.length;this.gltf.meshes.push(t),e.mesh=s}_createMeshes(e){const t=this.gltf.extras,s=t.output.buffer===d.GLB;let r;r=s?t.binChunkBuffer:new m(this.gltf);const i=this.options.origin,o=e.vertexSpace.clone();o.origin=[i.x,i.y,i.z??0];const a=f({vertexAttributes:e.vertexAttributes,vertexSpace:e.vertexSpace,transform:this.options?.ignoreLocalTransform?null:e.transform,spatialReference:e.spatialReference},o,{targetUnit:this.options.unitConversionDisabled?void 0:"meters"});if(!a)return[];p(e,a),v(a);const{position:n,normal:l,tangent:c}=a,{uv:u,color:h}=e.vertexAttributes,g=r.addBufferView(M.FLOAT,x.VEC3,_.ARRAY_BUFFER);let T,R,A,b;l&&(T=r.addBufferView(M.FLOAT,x.VEC3,_.ARRAY_BUFFER)),u&&(R=r.addBufferView(M.FLOAT,x.VEC2,_.ARRAY_BUFFER)),c&&(A=r.addBufferView(M.FLOAT,x.VEC4,_.ARRAY_BUFFER)),h&&(b=r.addBufferView(M.FLOAT,x.VEC4,_.ARRAY_BUFFER)),g.startAccessor("POSITION"),T&&T.startAccessor("NORMAL"),R&&R.startAccessor("TEXCOORD_0"),A&&A.startAccessor("TANGENT"),b&&b.startAccessor("COLOR_0");const E=a.position.length/3;for(let f=0;f<E;++f)g.push(n[3*f]),g.push(n[3*f+1]),g.push(n[3*f+2]),T&&null!=l&&(T.push(l[3*f]),T.push(l[3*f+1]),T.push(l[3*f+2])),R&&null!=u&&(R.push(u[2*f]),R.push(u[2*f+1])),A&&null!=c&&(A.push(c[4*f]),A.push(c[4*f+1]),A.push(c[4*f+2]),A.push(c[4*f+3])),b&&null!=h&&(b.push(I(h[4*f]/255)),b.push(I(h[4*f+1]/255)),b.push(I(h[4*f+2]/255)),b.push(h[4*f+3]/255));const O=g.endAccessor(),w=this._addAccessor(g.index,O);let C,N,L,S,B;if(T){const e=T.endAccessor();C=this._addAccessor(T.index,e)}if(R){const e=R.endAccessor();N=this._addAccessor(R.index,e)}if(A){const e=A.endAccessor();L=this._addAccessor(A.index,e)}if(b){const e=b.endAccessor();S=this._addAccessor(b.index,e)}const F=[];return e.components&&e.components.length>0&&e.components[0].faces?(B=r.addBufferView(M.UNSIGNED_INT,x.SCALAR,_.ELEMENT_ARRAY_BUFFER),this._addMeshVertexIndexed(B,e.components,F,w,C,N,L,S)):this._addMeshVertexNonIndexed(e.components,F,w,C,N,L,S),g.finalize(),T&&T.finalize(),R&&R.finalize(),A&&A.finalize(),B&&B.finalize(),b&&b.finalize(),s||r.finalize(),F}_addMaterial(e){if(null==e)return;const t=this._materialMap.indexOf(e);if(-1!==t)return t;this.gltf.materials||(this.gltf.materials=[]);const s={};switch(e.alphaMode){case"mask":s.alphaMode=T.MASK;break;case"auto":case"blend":s.alphaMode=T.BLEND}s.alphaCutoff=e.alphaCutoff,e.doubleSided&&(s.doubleSided=e.doubleSided),s.pbrMetallicRoughness={};const r=e=>{const t=e.toRgba();return t[0]=I(t[0]/255),t[1]=I(t[1]/255),t[2]=I(t[2]/255),t};if(null!=e.color&&(s.pbrMetallicRoughness.baseColorFactor=r(e.color)),null!=e.colorTexture&&(s.pbrMetallicRoughness.baseColorTexture=this._createTextureInfo(e.colorTexture,e.colorTextureTransform)),null!=e.normalTexture&&(s.normalTexture=this._createTextureInfo(e.normalTexture,e.normalTextureTransform)),e instanceof h){if(null!=e.emissiveTexture&&(s.emissiveTexture=this._createTextureInfo(e.emissiveTexture,e.emissiveTextureTransform)),null!=e.emissiveColor){const t=r(e.emissiveColor);s.emissiveFactor=[t[0],t[1],t[2]]}null!=e.occlusionTexture&&(s.occlusionTexture=this._createTextureInfo(e.occlusionTexture,e.occlusionTextureTransform)),null!=e.metallicRoughnessTexture&&(s.pbrMetallicRoughness.metallicRoughnessTexture=this._createTextureInfo(e.metallicRoughnessTexture,e.metallicRoughnessTextureTransform)),s.pbrMetallicRoughness.metallicFactor=e.metallic,s.pbrMetallicRoughness.roughnessFactor=e.roughness}else s.pbrMetallicRoughness.metallicFactor=1,s.pbrMetallicRoughness.roughnessFactor=1,O().warnOnce("Meshes exported to GLTF without MeshMaterialMetallicRoughness material will appear different when imported back.");const i=this.gltf.materials.length;return this.gltf.materials.push(s),this._materialMap.push(e),i}_createTextureInfo(e,t){const s={index:this._addTexture(e)};return t?(s.extensions||(s.extensions={}),s.extensions.KHR_texture_transform={scale:t.scale,offset:t.offset,rotation:r(t.rotation)},s):s}_addTexture(e){const t=this.gltf.textures??[];return this.gltf.textures=t,s(this._textureMap,e,(()=>{const s={sampler:this._addSampler(e),source:this._addImage(e)},r=t.length;return t.push(s),r}))}_addImage(e){const t=this._imageMap.get(e);if(null!=t)return t;this.gltf.images||(this.gltf.images=[]);const s={};if(e.url)s.uri=e.url;else{const t=e.data;s.extras=t;for(let e=0;e<this.gltf.images.length;++e)if(t===this.gltf.images[e].extras)return e;const r=this.gltf.extras;switch(r.output.image){case g.GLB:{const e=r.binChunkBuffer.addBufferView(M.UNSIGNED_BYTE,x.SCALAR);if(b(t))null!=t.data&&e.writeOutToBuffer(t.data,0);else{const i=R(t,this.options.signal).then((({data:e,type:t})=>(s.mimeType=t,e)));r.promises.push(e.writeAsync(i).then((()=>{e.finalize()})))}s.bufferView=e.index;break}case g.DataURI:if(b(t)){O().warnOnce("Image export for basis compressed textures not available.");break}s.uri=A(t);break;default:if(b(t)){O().warnOnce("Image export for basis compressed textures not available.");break}r.promises.push(R(t,this.options.signal).then((({data:e,type:t})=>{s.uri=e,s.mimeType=t})))}}const r=this.gltf.images.length;return this.gltf.images.push(s),this._imageMap.set(e,r),r}_addSampler(e){this.gltf.samplers||(this.gltf.samplers=[]);let t=E.REPEAT,s=E.REPEAT;if("string"==typeof e.wrap)switch(e.wrap){case"clamp":t=E.CLAMP_TO_EDGE,s=E.CLAMP_TO_EDGE;break;case"mirror":t=E.MIRRORED_REPEAT,s=E.MIRRORED_REPEAT}else{switch(e.wrap.vertical){case"clamp":s=E.CLAMP_TO_EDGE;break;case"mirror":s=E.MIRRORED_REPEAT}switch(e.wrap.horizontal){case"clamp":t=E.CLAMP_TO_EDGE;break;case"mirror":t=E.MIRRORED_REPEAT}}const r={wrapS:t,wrapT:s};for(let o=0;o<this.gltf.samplers.length;++o)if(JSON.stringify(r)===JSON.stringify(this.gltf.samplers[o]))return o;const i=this.gltf.samplers.length;return this.gltf.samplers.push(r),i}_addAccessor(e,t){this.gltf.accessors||(this.gltf.accessors=[]);const s={bufferView:e,byteOffset:t.byteOffset,componentType:t.componentType,count:t.count,type:t.type,min:t.min,max:t.max,name:t.name};t.normalized&&(s.normalized=!0);const r=this.gltf.accessors.length;return this.gltf.accessors.push(s),r}_addMeshVertexIndexed(e,t,s,r,i,o,a,n){const l=new Map;for(const c of t){if(e.startAccessor("INDICES"),c.faces)for(let s=0;s<c.faces.length;++s)e.push(c.faces[s]);const t=e.endAccessor(),u={attributes:{POSITION:r},indices:this._addAccessor(e.index,t),material:this._addMaterial(c.material)};i&&"flat"!==c.shading&&(u.attributes.NORMAL=i),o&&(u.attributes.TEXCOORD_0=o),a&&"flat"!==c.shading&&(u.attributes.TANGENT=a),n&&(u.attributes.COLOR_0=n);const h=l.get(c.name);if(h)h.primitives.push(u);else{const e={name:c.name,primitives:[u]};l.set(c.name,e),s.push(e)}}}_addMeshVertexNonIndexed(e,t,s,r,i,o,a){const n={primitives:[]};t.push(n);const l={attributes:{POSITION:s}};r&&(l.attributes.NORMAL=r),i&&(l.attributes.TEXCOORD_0=i),o&&(l.attributes.TANGENT=o),a&&(l.attributes.COLOR_0=a),e&&(l.material=this._addMaterial(e[0].material)),n.primitives.push(l)}}function v({position:e,normal:t,tangent:s}){C(e,3),C(t,3),C(s,4)}function C(e,t){if(null!=e)for(let s=1,r=2;s<e.length;s+=t,r+=t){const t=e[s],i=e[r];e[s]=i,e[r]=-t}}function I(t){return t**e}export{w as GLTF};
5
+ import{colorGamma as e}from"../../../../../colorUtils.js";import t from"../../../../../core/Logger.js";import{getOrCreateMapValue as s}from"../../../../../core/MapUtils.js";import{deg2rad as r}from"../../../../../core/mathUtils.js";import{exactEquals as i}from"../../../../../core/libs/gl-matrix-2/math/quat.js";import{clone as o,IDENTITY as a}from"../../../../../core/libs/gl-matrix-2/factories/quatf64.js";import{q as n}from"../../../../../chunks/vec32.js";import{ZEROS as l,clone as c,ONES as u}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import h from"../../../MeshMaterialMetallicRoughness.js";import{convertVertexSpace as f}from"../../vertexSpaceConversion.js";import{Buffer as m}from"./buffer.js";import{smoothNormals as p}from"./geometry.js";import{BufferOutputType as d,ImageOutputType as g,AttributeType as x,TargetBuffer as _,AlphaMode as T}from"./types.js";import{imageToArrayBuffer as R,imageToDataURI as A}from"./imageutils.js";import{isEncodedMeshTexture as b}from"../../../../../views/3d/glTF/internal/resourceUtils.js";import{DataType as M,TextureWrapMode as E}from"../../../../../views/webgl/enums.js";const O=()=>t.getLogger("esri.geometry.support.meshUtils.exporters.gltf.gltf");class w{constructor(e,t){this.options=t,this._materialMap=new Array,this._imageMap=new Map,this._textureMap=new Map,this.gltf={asset:{version:"2.0",copyright:e.copyright,generator:e.generator},extras:{output:t.output,binChunkBuffer:null,promises:[]}},this._addScenes(e)}_addScenes(e){this.gltf.scene=e.defaultScene;const t=this.gltf.extras,s=t.output.buffer===d.GLB||t.output.image===g.GLB;s&&(t.binChunkBuffer=new m(this.gltf)),e.forEachScene((e=>{this._addScene(e)})),s&&t.binChunkBuffer.finalize()}_addScene(e){this.gltf.scenes||(this.gltf.scenes=[]);const t={};e.name&&(t.name=e.name),e.forEachNode((e=>{t.nodes||(t.nodes=[]),t.nodes.push(...this._addNodes(e))})),this.gltf.scenes.push(t)}_addNodes(e){this.gltf.nodes||(this.gltf.nodes=[]);const t={};e.name&&(t.name=e.name);const s=e.translation;n(s,l)||(t.translation=c(s));const r=e.rotation;i(r,a)||(t.rotation=o(r));const h=e.scale;n(h,u)||(t.scale=c(h));const f=this.gltf.nodes.length;if(this.gltf.nodes.push(t),e.mesh&&e.mesh.vertexAttributes.position){const s=this._createMeshes(e.mesh),r=[f];if(1===s.length)this._addMesh(t,s[0]);else for(const e of s){const t={};this._addMesh(t,e),r.push(this.gltf.nodes.length),this.gltf.nodes.push(t)}return r}return e.forEachNode((e=>{t.children||(t.children=[]),t.children.push(...this._addNodes(e))})),[f]}_addMesh(e,t){this.gltf.meshes??=[];const s=this.gltf.meshes.length;this.gltf.meshes.push(t),e.mesh=s}_createMeshes(e){const t=this.gltf.extras,s=t.output.buffer===d.GLB;let r;r=s?t.binChunkBuffer:new m(this.gltf);const i=this.options.origin,o=e.vertexSpace.clone();o.origin=[i.x,i.y,i.z??0];const a=f({vertexAttributes:e.vertexAttributes,vertexSpace:e.vertexSpace,transform:this.options?.ignoreLocalTransform?null:e.transform,spatialReference:e.spatialReference},o,{targetUnit:this.options.unitConversionDisabled?void 0:"meters"});if(!a)return[];p(e,a),v(a);const{position:n,normal:l,tangent:c}=a,{uv:u,color:h}=e.vertexAttributes,g=r.addBufferView(M.FLOAT,x.VEC3,_.ARRAY_BUFFER);let T,R,A,b;l&&(T=r.addBufferView(M.FLOAT,x.VEC3,_.ARRAY_BUFFER)),u&&(R=r.addBufferView(M.FLOAT,x.VEC2,_.ARRAY_BUFFER)),c&&(A=r.addBufferView(M.FLOAT,x.VEC4,_.ARRAY_BUFFER)),h&&(b=r.addBufferView(M.FLOAT,x.VEC4,_.ARRAY_BUFFER)),g.startAccessor("POSITION"),T&&T.startAccessor("NORMAL"),R&&R.startAccessor("TEXCOORD_0"),A&&A.startAccessor("TANGENT"),b&&b.startAccessor("COLOR_0");const E=a.position.length/3;for(let f=0;f<E;++f)g.push(n[3*f]),g.push(n[3*f+1]),g.push(n[3*f+2]),T&&null!=l&&(T.push(l[3*f]),T.push(l[3*f+1]),T.push(l[3*f+2])),R&&null!=u&&(R.push(u[2*f]),R.push(u[2*f+1])),A&&null!=c&&(A.push(c[4*f]),A.push(c[4*f+1]),A.push(c[4*f+2]),A.push(c[4*f+3])),b&&null!=h&&(b.push(I(h[4*f]/255)),b.push(I(h[4*f+1]/255)),b.push(I(h[4*f+2]/255)),b.push(h[4*f+3]/255));const O=g.endAccessor(),w=this._addAccessor(g.index,O);let C,N,L,S,B;if(T){const e=T.endAccessor();C=this._addAccessor(T.index,e)}if(R){const e=R.endAccessor();N=this._addAccessor(R.index,e)}if(A){const e=A.endAccessor();L=this._addAccessor(A.index,e)}if(b){const e=b.endAccessor();S=this._addAccessor(b.index,e)}const F=[];return e.components&&e.components.length>0&&e.components[0].faces?(B=r.addBufferView(M.UNSIGNED_INT,x.SCALAR,_.ELEMENT_ARRAY_BUFFER),this._addMeshVertexIndexed(B,e.components,F,w,C,N,L,S)):this._addMeshVertexNonIndexed(e.components,F,w,C,N,L,S),g.finalize(),T&&T.finalize(),R&&R.finalize(),A&&A.finalize(),B&&B.finalize(),b&&b.finalize(),s||r.finalize(),F}_addMaterial(e){if(null==e)return;const t=this._materialMap.indexOf(e);if(-1!==t)return t;this.gltf.materials||(this.gltf.materials=[]);const s={};switch(e.alphaMode){case"mask":s.alphaMode=T.MASK;break;case"auto":case"blend":s.alphaMode=T.BLEND}s.alphaCutoff=e.alphaCutoff,e.doubleSided&&(s.doubleSided=e.doubleSided),s.pbrMetallicRoughness={};const r=e=>{const t=e.toRgba();return t[0]=I(t[0]/255),t[1]=I(t[1]/255),t[2]=I(t[2]/255),t};if(null!=e.color&&(s.pbrMetallicRoughness.baseColorFactor=r(e.color)),null!=e.colorTexture&&(s.pbrMetallicRoughness.baseColorTexture=this._createTextureInfo(e.colorTexture,e.colorTextureTransform)),null!=e.normalTexture&&(s.normalTexture=this._createTextureInfo(e.normalTexture,e.normalTextureTransform)),e instanceof h){if(null!=e.emissiveTexture&&(s.emissiveTexture=this._createTextureInfo(e.emissiveTexture,e.emissiveTextureTransform)),null!=e.emissiveColor){const t=r(e.emissiveColor);s.emissiveFactor=[t[0],t[1],t[2]]}null!=e.occlusionTexture&&(s.occlusionTexture=this._createTextureInfo(e.occlusionTexture,e.occlusionTextureTransform)),null!=e.metallicRoughnessTexture&&(s.pbrMetallicRoughness.metallicRoughnessTexture=this._createTextureInfo(e.metallicRoughnessTexture,e.metallicRoughnessTextureTransform)),s.pbrMetallicRoughness.metallicFactor=e.metallic,s.pbrMetallicRoughness.roughnessFactor=e.roughness}else s.pbrMetallicRoughness.metallicFactor=1,s.pbrMetallicRoughness.roughnessFactor=1,O().warnOnce("Meshes exported to GLTF without MeshMaterialMetallicRoughness material will appear different when imported back.");const i=this.gltf.materials.length;return this.gltf.materials.push(s),this._materialMap.push(e),i}_createTextureInfo(e,t){const s={index:this._addTexture(e)};return t?(s.extensions||(s.extensions={}),s.extensions.KHR_texture_transform={scale:t.scale,offset:t.offset,rotation:r(t.rotation)},s):s}_addTexture(e){const t=this.gltf.textures??[];return this.gltf.textures=t,s(this._textureMap,e,(()=>{const s={sampler:this._addSampler(e),source:this._addImage(e)},r=t.length;return t.push(s),r}))}_addImage(e){const t=this._imageMap.get(e);if(null!=t)return t;this.gltf.images||(this.gltf.images=[]);const s={};if(e.url)s.uri=e.url;else{const t=e.data;s.extras=t;for(let e=0;e<this.gltf.images.length;++e)if(t===this.gltf.images[e].extras)return e;const r=this.gltf.extras;switch(r.output.image){case g.GLB:{const e=r.binChunkBuffer.addBufferView(M.UNSIGNED_BYTE,x.SCALAR);if(b(t))null!=t.data&&e.writeOutToBuffer(t.data,0);else{const i=R(t,this.options.signal).then((({data:e,type:t})=>(s.mimeType=t,e)));r.promises.push(e.writeAsync(i).then((()=>{e.finalize()})))}s.bufferView=e.index;break}case g.DataURI:if(b(t)){O().warnOnce("Image export for basis compressed textures not available.");break}s.uri=A(t);break;default:if(b(t)){O().warnOnce("Image export for basis compressed textures not available.");break}r.promises.push(R(t,this.options.signal).then((({data:e,type:t})=>{s.uri=e,s.mimeType=t})))}}const r=this.gltf.images.length;return this.gltf.images.push(s),this._imageMap.set(e,r),r}_addSampler(e){this.gltf.samplers||(this.gltf.samplers=[]);let t=E.REPEAT,s=E.REPEAT;if("string"==typeof e.wrap)switch(e.wrap){case"clamp":t=E.CLAMP_TO_EDGE,s=E.CLAMP_TO_EDGE;break;case"mirror":t=E.MIRRORED_REPEAT,s=E.MIRRORED_REPEAT}else{switch(e.wrap.vertical){case"clamp":s=E.CLAMP_TO_EDGE;break;case"mirror":s=E.MIRRORED_REPEAT}switch(e.wrap.horizontal){case"clamp":t=E.CLAMP_TO_EDGE;break;case"mirror":t=E.MIRRORED_REPEAT}}const r={wrapS:t,wrapT:s};for(let o=0;o<this.gltf.samplers.length;++o)if(JSON.stringify(r)===JSON.stringify(this.gltf.samplers[o]))return o;const i=this.gltf.samplers.length;return this.gltf.samplers.push(r),i}_addAccessor(e,t){this.gltf.accessors||(this.gltf.accessors=[]);const s={bufferView:e,byteOffset:t.byteOffset,componentType:t.componentType,count:t.count,type:t.type,min:t.min,max:t.max,name:t.name};t.normalized&&(s.normalized=!0);const r=this.gltf.accessors.length;return this.gltf.accessors.push(s),r}_addMeshVertexIndexed(e,t,s,r,i,o,a,n){const l=new Map;for(const c of t){if(e.startAccessor("INDICES"),c.faces)for(let s=0;s<c.faces.length;++s)e.push(c.faces[s]);const t=e.endAccessor(),u={attributes:{POSITION:r},indices:this._addAccessor(e.index,t),material:this._addMaterial(c.material)};i&&"flat"!==c.shading&&(u.attributes.NORMAL=i),o&&(u.attributes.TEXCOORD_0=o),a&&"flat"!==c.shading&&(u.attributes.TANGENT=a),n&&(u.attributes.COLOR_0=n);const h=l.get(c.name);if(h)h.primitives.push(u);else{const e={name:c.name,primitives:[u]};l.set(c.name,e),s.push(e)}}}_addMeshVertexNonIndexed(e,t,s,r,i,o,a){const n={primitives:[]};t.push(n);const l={attributes:{POSITION:s}};r&&(l.attributes.NORMAL=r),i&&(l.attributes.TEXCOORD_0=i),o&&(l.attributes.TANGENT=o),a&&(l.attributes.COLOR_0=a),e&&(l.material=this._addMaterial(e[0].material)),n.primitives.push(l)}}function v({position:e,normal:t,tangent:s}){C(e,3),C(t,3),C(s,4)}function C(e,t){if(null!=e)for(let s=1,r=2;s<e.length;s+=t,r+=t){const t=e[s],i=e[r];e[s]=i,e[r]=-t}}function I(t){return t**e}export{w as GLTF};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../core/Error.js";import{whenOrAbort as t,throwIfAborted as s,allSettledValues as n,isAborted as r,createAbortError as o}from"../../../core/promiseUtils.js";import{removeFile as i,makeRelative as l}from"../../../core/urlUtils.js";import a from"../../Point.js";async function c(e,n,r){const{source:o}=n,{loadGLTFMesh:i}=await t(import("./loadGLTFMesh.js"),r),l=await f(o,r);s(r);const c=i(new a({x:0,y:0,z:0,spatialReference:e.spatialReference}),l.url,{resolveFile:u(l),signal:r?.signal,expectedType:l.type,unitConversionDisabled:n.unitConversionDisabled});c.then((()=>l.dispose()),(()=>l.dispose()));const{vertexAttributes:m,components:p}=await c;e.vertexAttributes=m,e.components=p}function u(e){const t=i(e.url);return s=>{const n=l(s,t,t),r=n?n.replace(/^ *\.\//,""):null;return(r?e.files.get(r):null)??s}}async function f(t,s){if(Array.isArray(t)){if(!t.length)throw new e("mesh-load-external:missing-assets","There must be at least one file to load");return t[0]instanceof File?y(t):h(t,s)}return p(t)}async function m(e,t){const{parts:n,assetMimeType:r,assetName:o}=e;if(1===n.length)return new v(n[0].partUrl);const i=await e.toBlob(t);return s(t),v.fromBlob(i,x(o,r))}function p(e){return v.fromBlob(e,x(e.name,e.type))}function y(e){return j(e.map((e=>({name:e.name,mimeType:e.type,source:p(e)}))))}async function h(e,t){const i=await n(e.map((async e=>{const n=await m(e);return s(t),{name:e.assetName,mimeType:e.assetMimeType,source:n}})));if(r(t))throw i.forEach((e=>e.source.dispose())),o();return j(i)}const d=/^model\/gltf\+json$/,g=/^model\/gltf-binary$/,w=/\.gltf$/i,b=/\.glb$/i;function T({mimeType:e,source:t,name:s}){return d.test(e)||w.test(s)?{url:t.url,type:"gltf"}:g.test(e)||b.test(s)?{url:t.url,type:"glb"}:null}function j(t){const s=new Map;let n=null,r=null;for(const e of t){const{source:t,name:o}=e;n??=T(e),"ESRI3DO_NORM.glb"===o&&(r=T(e)),s.set(o,t.url),t.files.forEach(((e,t)=>s.set(t,e)))}const o=r??n;if(null==o)throw new e("mesh-load-external:missing-files","Missing files to load external mesh source");return new v(o.url,(()=>t.forEach((({source:e})=>e.dispose()))),s,o.type)}class v{constructor(e,t=()=>{},s=new Map,n){this.url=e,this.dispose=t,this.files=s,this.type=n}static fromBlob(e,t){const s=URL.createObjectURL(e);return new v(s,(()=>URL.revokeObjectURL(s)),void 0,t)}}function x(e,t){return d.test(t)||w.test(e)?"gltf":g.test(t)||w.test(e)?"glb":void 0}export{c as loadExternal};
5
+ import{neverReached as e}from"../../../core/compilerUtils.js";import t from"../../../core/Error.js";import{whenOrAbort as s,throwIfAborted as r,allSettledValues as n,isAborted as o,createAbortError as i}from"../../../core/promiseUtils.js";import{removeFile as l,makeRelative as a}from"../../../core/urlUtils.js";import c from"../../Point.js";async function u(t,s,r){switch(s.source.type){case"client":case"service":return f(t,s,r);case"loadable":return s.source.load(t,r);default:e(s.source)}}async function f(e,t,n){const{source:o}=t,{loadGLTFMesh:i}=await s(import("./loadGLTFMesh.js"),n),l=await p(o,n);r(n);const a=i(new c({x:0,y:0,z:0,spatialReference:e.spatialReference}),l.url,{resolveFile:m(l),signal:n?.signal,expectedType:l.type,unitConversionDisabled:t.unitConversionDisabled});a.then((()=>l.dispose()),(()=>l.dispose()));const{vertexAttributes:u,components:f}=await a;e.vertexAttributes=u,e.components=f}function m(e){const t=l(e.url);return s=>{const r=a(s,t,t),n=r?r.replace(/^ *\.\//,""):null;return(n?e.files.get(n):null)??s}}async function p(e,s){switch(e.type){case"client":return Array.isArray(e.files)?y(e.files):h(e.files);case"service":return w(e.assets,s);default:throw new t("mesh-load-external:invalid-source","Invalid source type")}}async function d(e,t){const{parts:s,assetMimeType:n,assetName:o}=e;if(1===s.length)return new M(s[0].partUrl);const i=await e.toBlob(t);return r(t),M.fromBlob(i,R(o,n))}function h(e){return M.fromBlob(e,R(e.name,e.type))}function y(e){if(!e.length)throw new t("mesh-load-external:missing-assets","There must be at least one file to load");return j(e.map((e=>({name:e.name,mimeType:e.type,source:h(e)}))))}async function w(e,s){if(!e.length)throw new t("mesh-load-external:missing-assets","There must be at least one file to load");const l=await n(e.map((async e=>{const t=await d(e);return r(s),{name:e.assetName,mimeType:e.assetMimeType,source:t}})));if(o(s))throw l.forEach((e=>e.source.dispose())),i();return j(l)}const g=/^model\/gltf\+json$/,b=/^model\/gltf-binary$/,v=/\.gltf$/i,x=/\.glb$/i;function T({mimeType:e,source:t,name:s}){return g.test(e)||v.test(s)?{url:t.url,type:"gltf"}:b.test(e)||x.test(s)?{url:t.url,type:"glb"}:null}function j(e){const s=new Map;let r=null,n=null;for(const t of e){const{source:e,name:o}=t;r??=T(t),"ESRI3DO_NORM.glb"===o&&(n=T(t)),s.set(o,e.url),e.files.forEach(((e,t)=>s.set(t,e)))}const o=n??r;if(null==o)throw new t("mesh-load-external:missing-files","Missing files to load external mesh source");return new M(o.url,(()=>e.forEach((({source:e})=>e.dispose()))),s,o.type)}class M{constructor(e,t=()=>{},s=new Map,r){this.url=e,this.dispose=t,this.files=s,this.type=r}static fromBlob(e,t){const s=URL.createObjectURL(e);return new M(s,(()=>URL.revokeObjectURL(s)),void 0,t)}}function R(e,t){return g.test(t)||v.test(e)?"gltf":b.test(t)||v.test(e)?"glb":void 0}export{u as loadExternal};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{create as t}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{q as e,n as r}from"../../../chunks/vec32.js";import{create as n}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import o from"../MeshComponent.js";import{MeshVertexAttributes as s}from"../MeshVertexAttributes.js";import{selectVertexSpace as a}from"../meshVertexSpaceUtils.js";import{convertVertexSpace as i,getUnitToSpatialReferenceScaleConversion as l}from"./vertexSpaceConversion.js";function c(){const{faceDescriptions:t,faceVertexOffsets:e,uvScales:r}=F,n=4*t.length,o=new Float64Array(3*n),s=new Float32Array(3*n),a=new Float32Array(2*n),i=new Uint32Array(2*t.length*3);let l=0,c=0,f=0,u=0;for(let h=0;h<t.length;h++){const n=t[h],p=l/3;for(const t of e)i[u++]=p+t;const m=n.corners;for(let t=0;t<4;t++){const e=m[t];let i=0;a[f++]=.25*r[t][0]+n.uvOrigin[0],a[f++]=n.uvOrigin[1]-.25*r[t][1];for(let t=0;t<3;t++)0!==n.axis[t]?(o[l++]=.5*n.axis[t],s[c++]=n.axis[t]):(o[l++]=.5*e[i++],s[c++]=0)}}return{position:o,normal:s,uv:a,faces:i}}function f(t,e){const r=t.components[0],n=r.faces,s=b[e],a=6*s,i=new Array(6),l=new Array(n.length-6);let c=0,f=0;for(let o=0;o<n.length;o++)o>=a&&o<a+6?i[c++]=n[o]:l[f++]=n[o];if(null!=t.vertexAttributes.uv){const e=new Float32Array(t.vertexAttributes.uv),r=4*s*2,n=[0,1,1,1,1,0,0,0];for(let t=0;t<n.length;t++)e[r+t]=n[t];t.vertexAttributes.uv=e}return t.components=[new o({faces:i,material:r.material}),new o({faces:l})],t}function u(t=0){const e=Math.round(8*2**t),r=2*e,n=(e-1)*(r+1)+2*r,o=new Float64Array(3*n),s=new Float32Array(3*n),a=new Float32Array(2*n),i=new Uint32Array(3*((e-1)*r*2));let l=0,c=0,f=0,u=0;for(let h=0;h<=e;h++){const t=h/e*Math.PI+.5*Math.PI,n=Math.cos(t),p=Math.sin(t);O[2]=p;const m=0===h||h===e,w=m?r-1:r;for(let v=0;v<=w;v++){const t=v/w*2*Math.PI;O[0]=-Math.sin(t)*n,O[1]=Math.cos(t)*n;for(let e=0;e<3;e++)o[l]=.5*O[e],s[l]=O[e],++l;a[c++]=(v+(m?.5:0))/r,a[c++]=h/e,0!==h&&v!==r&&(h!==e&&(i[f++]=u,i[f++]=u+1,i[f++]=u-r),1!==h&&(i[f++]=u,i[f++]=u-r,i[f++]=u-r-1)),u++}}return{position:o,normal:s,uv:a,faces:i}}function h(t=0){const e=5,r=Math.round(16*2**t),n=(e-1)*(r+1)+2*r,o=new Float64Array(3*n),s=new Float32Array(3*n),a=new Float32Array(2*n),i=new Uint32Array(3*(4*r));let l=0,c=0,f=0,u=0,h=0;for(let p=0;p<=e;p++){const t=0===p||p===e,n=p<=1||p>=e-1,m=2===p||4===p,w=t?r-1:r;for(let v=0;v<=w;v++){const g=v/w*2*Math.PI,A=t?0:.5;O[0]=A*Math.sin(g),O[1]=A*-Math.cos(g),O[2]=p<=2?.5:-.5;for(let t=0;t<3;t++)o[l++]=O[t],s[c++]=n?2===t?p<=1?1:-1:0:2===t?0:O[t]/A;a[f++]=(v+(t?.5:0))/r,a[f++]=p<=1?1*p/3:p<=3?1*(p-2)/3+1/3:1*(p-4)/3+2/3,m||0===p||v===r||(p!==e&&(i[u++]=h,i[u++]=h+1,i[u++]=h-r),1!==p&&(i[u++]=h,i[u++]=h-r,i[u++]=h-r-1)),h++}}return{position:o,normal:s,uv:a,faces:i}}function p(t,e){const r="number"==typeof e?e:null!=e?e.width:1,n="number"==typeof e?e:null!=e?e.height:1;switch(t){case"up":case"down":return{width:r,depth:n};case"north":case"south":return{width:r,height:n};case"east":case"west":return{depth:r,height:n}}}function m(t){const e=A.facingAxisOrderSwap[t],r=A.position,n=A.normal,o=new Float64Array(r.length),s=new Float32Array(n.length);let a=0;for(let i=0;i<4;i++){const t=a;for(let i=0;i<3;i++){const l=e[i],c=Math.abs(l)-1,f=l>=0?1:-1;o[a]=r[t+c]*f,s[a]=n[t+c]*f,a++}}return{position:o,normal:s,uv:new Float32Array(A.uv),faces:new Uint32Array(A.faces),isPlane:!0}}const w=1,v=2,g=3,A={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[g,w,v],west:[-3,-1,v],north:[-1,g,v],south:[w,-3,v],up:[w,v,g],down:[w,-2,-3]}};function x(t,e,r){t.isPlane||y(t),M(t,d(r?.size,r?.unit,e.spatialReference));const n=a(e,r),l=e.spatialReference.isGeographic?a(e):n,c=i({vertexAttributes:t,vertexSpace:l,spatialReference:e.spatialReference},n,{allowBufferReuse:!0});return{vertexAttributes:new s({...c,uv:t.uv}),vertexSpace:n,components:[new o({faces:t.faces,material:r?.material||null})],spatialReference:e.spatialReference}}function y(t){for(let e=0;e<t.position.length;e+=3)t.position[e+2]+=.5}function d(t,e,r){const n=l(e,r);if(null==t&&1===n)return null;if(null==t)return[n,n,n];if("number"==typeof t){const e=t*n;return[e,e,e]}return[null!=t.width?t.width*n:n,null!=t.depth?t.depth*n:n,null!=t.height?t.height*n:n]}function M(t,n){if(null!=n){S[0]=n[0],S[4]=n[1],S[8]=n[2];for(let r=0;r<t.position.length;r+=3){for(let e=0;e<3;e++)O[e]=t.position[r+e];e(O,O,S);for(let e=0;e<3;e++)t.position[r+e]=O[e]}if(n[0]!==n[1]||n[1]!==n[2]){S[0]=1/n[0],S[4]=1/n[1],S[8]=1/n[2];for(let n=0;n<t.normal.length;n+=3){for(let e=0;e<3;e++)O[e]=t.normal[n+e];e(O,O,S),r(O,O);for(let e=0;e<3;e++)t.normal[n+e]=O[e]}}}}const F={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},b={south:0,east:1,north:2,west:3,up:4,down:5},O=n(),S=t();export{b as boxFaceOrder,p as convertPlaneSizeParameter,x as convertUnitGeometry,c as createUnitSizeBox,h as createUnitSizeCylinder,m as createUnitSizePlane,u as createUnitSizeSphere,f as extractSingleFaceOfBox};
5
+ import{create as t}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{o as e,n as r}from"../../../chunks/vec32.js";import{create as n}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import o from"../MeshComponent.js";import{MeshVertexAttributes as s}from"../MeshVertexAttributes.js";import{selectVertexSpace as a}from"../meshVertexSpaceUtils.js";import{convertVertexSpace as i,getUnitToSpatialReferenceScaleConversion as l}from"./vertexSpaceConversion.js";function c(){const{faceDescriptions:t,faceVertexOffsets:e,uvScales:r}=F,n=4*t.length,o=new Float64Array(3*n),s=new Float32Array(3*n),a=new Float32Array(2*n),i=new Uint32Array(2*t.length*3);let l=0,c=0,f=0,u=0;for(let h=0;h<t.length;h++){const n=t[h],p=l/3;for(const t of e)i[u++]=p+t;const m=n.corners;for(let t=0;t<4;t++){const e=m[t];let i=0;a[f++]=.25*r[t][0]+n.uvOrigin[0],a[f++]=n.uvOrigin[1]-.25*r[t][1];for(let t=0;t<3;t++)0!==n.axis[t]?(o[l++]=.5*n.axis[t],s[c++]=n.axis[t]):(o[l++]=.5*e[i++],s[c++]=0)}}return{position:o,normal:s,uv:a,faces:i}}function f(t,e){const r=t.components[0],n=r.faces,s=b[e],a=6*s,i=new Array(6),l=new Array(n.length-6);let c=0,f=0;for(let o=0;o<n.length;o++)o>=a&&o<a+6?i[c++]=n[o]:l[f++]=n[o];if(null!=t.vertexAttributes.uv){const e=new Float32Array(t.vertexAttributes.uv),r=4*s*2,n=[0,1,1,1,1,0,0,0];for(let t=0;t<n.length;t++)e[r+t]=n[t];t.vertexAttributes.uv=e}return t.components=[new o({faces:i,material:r.material}),new o({faces:l})],t}function u(t=0){const e=Math.round(8*2**t),r=2*e,n=(e-1)*(r+1)+2*r,o=new Float64Array(3*n),s=new Float32Array(3*n),a=new Float32Array(2*n),i=new Uint32Array(3*((e-1)*r*2));let l=0,c=0,f=0,u=0;for(let h=0;h<=e;h++){const t=h/e*Math.PI+.5*Math.PI,n=Math.cos(t),p=Math.sin(t);O[2]=p;const m=0===h||h===e,w=m?r-1:r;for(let v=0;v<=w;v++){const t=v/w*2*Math.PI;O[0]=-Math.sin(t)*n,O[1]=Math.cos(t)*n;for(let e=0;e<3;e++)o[l]=.5*O[e],s[l]=O[e],++l;a[c++]=(v+(m?.5:0))/r,a[c++]=h/e,0!==h&&v!==r&&(h!==e&&(i[f++]=u,i[f++]=u+1,i[f++]=u-r),1!==h&&(i[f++]=u,i[f++]=u-r,i[f++]=u-r-1)),u++}}return{position:o,normal:s,uv:a,faces:i}}function h(t=0){const e=5,r=Math.round(16*2**t),n=(e-1)*(r+1)+2*r,o=new Float64Array(3*n),s=new Float32Array(3*n),a=new Float32Array(2*n),i=new Uint32Array(3*(4*r));let l=0,c=0,f=0,u=0,h=0;for(let p=0;p<=e;p++){const t=0===p||p===e,n=p<=1||p>=e-1,m=2===p||4===p,w=t?r-1:r;for(let v=0;v<=w;v++){const g=v/w*2*Math.PI,A=t?0:.5;O[0]=A*Math.sin(g),O[1]=A*-Math.cos(g),O[2]=p<=2?.5:-.5;for(let t=0;t<3;t++)o[l++]=O[t],s[c++]=n?2===t?p<=1?1:-1:0:2===t?0:O[t]/A;a[f++]=(v+(t?.5:0))/r,a[f++]=p<=1?1*p/3:p<=3?1*(p-2)/3+1/3:1*(p-4)/3+2/3,m||0===p||v===r||(p!==e&&(i[u++]=h,i[u++]=h+1,i[u++]=h-r),1!==p&&(i[u++]=h,i[u++]=h-r,i[u++]=h-r-1)),h++}}return{position:o,normal:s,uv:a,faces:i}}function p(t,e){const r="number"==typeof e?e:null!=e?e.width:1,n="number"==typeof e?e:null!=e?e.height:1;switch(t){case"up":case"down":return{width:r,depth:n};case"north":case"south":return{width:r,height:n};case"east":case"west":return{depth:r,height:n}}}function m(t){const e=A.facingAxisOrderSwap[t],r=A.position,n=A.normal,o=new Float64Array(r.length),s=new Float32Array(n.length);let a=0;for(let i=0;i<4;i++){const t=a;for(let i=0;i<3;i++){const l=e[i],c=Math.abs(l)-1,f=l>=0?1:-1;o[a]=r[t+c]*f,s[a]=n[t+c]*f,a++}}return{position:o,normal:s,uv:new Float32Array(A.uv),faces:new Uint32Array(A.faces),isPlane:!0}}const w=1,v=2,g=3,A={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[g,w,v],west:[-3,-1,v],north:[-1,g,v],south:[w,-3,v],up:[w,v,g],down:[w,-2,-3]}};function x(t,e,r){t.isPlane||y(t),M(t,d(r?.size,r?.unit,e.spatialReference));const n=a(e,r),l=e.spatialReference.isGeographic?a(e):n,c=i({vertexAttributes:t,vertexSpace:l,spatialReference:e.spatialReference},n,{allowBufferReuse:!0});return{vertexAttributes:new s({...c,uv:t.uv}),vertexSpace:n,components:[new o({faces:t.faces,material:r?.material||null})],spatialReference:e.spatialReference}}function y(t){for(let e=0;e<t.position.length;e+=3)t.position[e+2]+=.5}function d(t,e,r){const n=l(e,r);if(null==t&&1===n)return null;if(null==t)return[n,n,n];if("number"==typeof t){const e=t*n;return[e,e,e]}return[null!=t.width?t.width*n:n,null!=t.depth?t.depth*n:n,null!=t.height?t.height*n:n]}function M(t,n){if(null!=n){S[0]=n[0],S[4]=n[1],S[8]=n[2];for(let r=0;r<t.position.length;r+=3){for(let e=0;e<3;e++)O[e]=t.position[r+e];e(O,O,S);for(let e=0;e<3;e++)t.position[r+e]=O[e]}if(n[0]!==n[1]||n[1]!==n[2]){S[0]=1/n[0],S[4]=1/n[1],S[8]=1/n[2];for(let n=0;n<t.normal.length;n+=3){for(let e=0;e<3;e++)O[e]=t.normal[n+e];e(O,O,S),r(O,O);for(let e=0;e<3;e++)t.normal[n+e]=O[e]}}}}const F={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},b={south:0,east:1,north:2,west:3,up:4,down:5},O=n(),S=t();export{b as boxFaceOrder,p as convertPlaneSizeParameter,x as convertUnitGeometry,c as createUnitSizeBox,h as createUnitSizeCylinder,m as createUnitSizePlane,u as createUnitSizeSphere,f as extractSingleFaceOfBox};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{hasScaling as r,deg2rad as t}from"../../../core/mathUtils.js";import{normalFromMat4 as o,fromMat4 as e}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as n}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{invert as i}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as f}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{q as c,n as a}from"../../../chunks/vec32.js";import{create as s}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{computeTranslationToOriginAndRotation as m}from"../../projection/computeTranslationToOriginAndRotation.js";import{projectBuffer as u}from"../../projection/projectBuffer.js";import{earth as l}from"../Ellipsoid.js";import{isCGCS2000 as p,isMars as T,isMoon as y}from"../spatialReferenceUtils.js";import{y2lat as A}from"../webMercatorUtils.js";import{BufferViewVec3f as d,BufferViewVec3f64 as P}from"../buffer/BufferView.js";import{b as N,n as j}from"../../../chunks/vec3.js";import{t as M}from"../../../chunks/vec4.js";const O="Projection may be possible after calling projection.load().";function F(r,t,o,e){r.error(`Failed to project from (wkid:${t.wkid}) to (wkid:${o.wkid}).${e?" ":""}${e}`)}function E(r,t,o,e,n,i){return B(x.TO_PCPF,d.fromTypedArray(r),V.NORMAL,P.fromTypedArray(t),o,P.fromTypedArray(e),n,d.fromTypedArray(i))?i:null}function R(r,t,o,e,n,i){return B(x.FROM_PCPF,d.fromTypedArray(r),V.NORMAL,P.fromTypedArray(t),o,P.fromTypedArray(e),n,d.fromTypedArray(i))?i:null}function g(r,t,o,e){return u(r,t,0,o,e,0)?o:null}function h(r,t,o,e){return u(r,t,0,o,e,0)?o:null}function _(t,e,n){return o(Y,n),N(e,t,Y),r(Y)&&j(e,e),e}function C(t,o,n){return e(Y,n),M(o,t,Y),r(Y)&&j(o,o,4),o}function b(r,o,e,n){const i=o===V.NORMAL;return k(r,o,e,((r,o)=>{const e=Math.cos(t(r));o[0]=i?e:1/e,o[1]=1}),n)}function L(r,t,o,e){const n=t===V.NORMAL;return k(r,t,o,((r,t)=>{const o=Math.cosh(-r/l.radius);t[0]=1,t[1]=n?o:1/o}),e)}function k(r,t,o,e,n){const i=t===V.NORMAL?3:4,f=[0,0];for(let c=0,a=1;c<r.length;c+=i,a+=3){e(o[a],f);const t=r[c]*f[0],s=r[c+1]*f[1],m=r[c+2],u=1/Math.sqrt(t*t+s*s+m*m);n[c]=t*u,n[c+1]=s*u,n[c+2]=m*u,4===i&&(n[c+3]=r[c+3])}return n}function w(r,t,o,e,n,i){if(!B(x.TO_PCPF,d.fromTypedArray(r,4*Float32Array.BYTES_PER_ELEMENT),V.TANGENT,P.fromTypedArray(t),o,P.fromTypedArray(e),n,d.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT)))return null;for(let f=3;f<r.length;f+=4)i[f]=r[f];return i}function G(r,t,o,e,n,i){if(!B(x.FROM_PCPF,d.fromTypedArray(r,16),V.TANGENT,P.fromTypedArray(t),o,P.fromTypedArray(e),n,d.fromTypedArray(i,16)))return null;for(let f=3;f<r.length;f+=4)i[f]=r[f];return i}var V,x;function v(r,t,n,f,c){switch(m(f,n,q,f),r===x.FROM_PCPF&&i(q,q),t){case V.NORMAL:return o(c,q);case V.TANGENT:return e(c,q)}}function B(r,t,o,e,n,i,f,s){if(!t)return;const m=e.count;if($(n))for(let a=0;a<m;a++)i.getVec(a,S),t.getVec(a,U),c(U,U,v(r,o,S,f,Y)),s.setVec(a,U);else for(let u=0;u<m;u++){i.getVec(u,S),t.getVec(u,U);const n=A(e.get(u,1));let m=Math.cos(n);o===V.TANGENT!=(r===x.TO_PCPF)&&(m=1/m),v(r,o,S,f,Y),r===x.TO_PCPF?(Y[0]*=m,Y[1]*=m,Y[2]*=m,Y[3]*=m,Y[4]*=m,Y[5]*=m):(Y[0]*=m,Y[3]*=m,Y[6]*=m,Y[1]*=m,Y[4]*=m,Y[7]*=m),c(U,U,Y),a(U,U),s.setVec(u,U)}return s}function $(r){return r.isWGS84||p(r)||T(r)||y(r)}!function(r){r[r.NORMAL=0]="NORMAL",r[r.TANGENT=1]="TANGENT"}(V||(V={})),function(r){r[r.TO_PCPF=0]="TO_PCPF",r[r.FROM_PCPF=1]="FROM_PCPF"}(x||(x={}));const S=s(),U=s(),q=f(),Y=n();export{V as VectorType,O as loadProjectErrorMessage,F as logProjectionError,h as projectFromPCPF,R as projectNormalFromPCPF,E as projectNormalToPCPF,G as projectTangentFromPCPF,w as projectTangentToPCPF,g as projectToPCPF,_ as transformNormal,C as transformTangent,b as transformVectorENUPlateCarree,L as transformVectorWMPlateCarree};
5
+ import{hasScaling as r,deg2rad as t}from"../../../core/mathUtils.js";import{normalFromMat4 as o,fromMat4 as e}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as n}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{invert as i}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as f}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{o as c,n as a}from"../../../chunks/vec32.js";import{create as s}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{computeTranslationToOriginAndRotation as m}from"../../projection/computeTranslationToOriginAndRotation.js";import{projectBuffer as u}from"../../projection/projectBuffer.js";import{earth as l}from"../Ellipsoid.js";import{isCGCS2000 as p,isMars as T,isMoon as y}from"../spatialReferenceUtils.js";import{y2lat as A}from"../webMercatorUtils.js";import{BufferViewVec3f as d,BufferViewVec3f64 as P}from"../buffer/BufferView.js";import{b as N,n as j}from"../../../chunks/vec3.js";import{t as M}from"../../../chunks/vec4.js";const O="Projection may be possible after calling projection.load().";function F(r,t,o,e){r.error(`Failed to project from (wkid:${t.wkid}) to (wkid:${o.wkid}).${e?" ":""}${e}`)}function E(r,t,o,e,n,i){return B(x.TO_PCPF,d.fromTypedArray(r),V.NORMAL,P.fromTypedArray(t),o,P.fromTypedArray(e),n,d.fromTypedArray(i))?i:null}function R(r,t,o,e,n,i){return B(x.FROM_PCPF,d.fromTypedArray(r),V.NORMAL,P.fromTypedArray(t),o,P.fromTypedArray(e),n,d.fromTypedArray(i))?i:null}function g(r,t,o,e){return u(r,t,0,o,e,0)?o:null}function h(r,t,o,e){return u(r,t,0,o,e,0)?o:null}function _(t,e,n){return o(q,n),N(e,t,q),r(q)&&j(e,e),e}function C(t,o,n){return e(q,n),M(o,t,q),r(q)&&j(o,o,4),o}function b(r,o,e,n){const i=o===V.NORMAL;return k(r,o,e,((r,o)=>{const e=Math.cos(t(r));o[0]=i?e:1/e,o[1]=1}),n)}function L(r,t,o,e){const n=t===V.NORMAL;return k(r,t,o,((r,t)=>{const o=Math.cosh(-r/l.radius);t[0]=1,t[1]=n?o:1/o}),e)}function k(r,t,o,e,n){const i=t===V.NORMAL?3:4,f=[0,0];for(let c=0,a=1;c<r.length;c+=i,a+=3){e(o[a],f);const t=r[c]*f[0],s=r[c+1]*f[1],m=r[c+2],u=1/Math.sqrt(t*t+s*s+m*m);n[c]=t*u,n[c+1]=s*u,n[c+2]=m*u,4===i&&(n[c+3]=r[c+3])}return n}function w(r,t,o,e,n,i){if(!B(x.TO_PCPF,d.fromTypedArray(r,4*Float32Array.BYTES_PER_ELEMENT),V.TANGENT,P.fromTypedArray(t),o,P.fromTypedArray(e),n,d.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT)))return null;for(let f=3;f<r.length;f+=4)i[f]=r[f];return i}function G(r,t,o,e,n,i){if(!B(x.FROM_PCPF,d.fromTypedArray(r,16),V.TANGENT,P.fromTypedArray(t),o,P.fromTypedArray(e),n,d.fromTypedArray(i,16)))return null;for(let f=3;f<r.length;f+=4)i[f]=r[f];return i}var V,x;function v(r,t,n,f,c){switch(m(f,n,Y,f),r===x.FROM_PCPF&&i(Y,Y),t){case V.NORMAL:return o(c,Y);case V.TANGENT:return e(c,Y)}}function B(r,t,o,e,n,i,f,s){if(!t)return;const m=e.count;if($(n))for(let a=0;a<m;a++)i.getVec(a,S),t.getVec(a,U),c(U,U,v(r,o,S,f,q)),s.setVec(a,U);else for(let u=0;u<m;u++){i.getVec(u,S),t.getVec(u,U);const n=A(e.get(u,1));let m=Math.cos(n);o===V.TANGENT!=(r===x.TO_PCPF)&&(m=1/m),v(r,o,S,f,q),r===x.TO_PCPF?(q[0]*=m,q[1]*=m,q[2]*=m,q[3]*=m,q[4]*=m,q[5]*=m):(q[0]*=m,q[3]*=m,q[6]*=m,q[1]*=m,q[4]*=m,q[7]*=m),c(U,U,q),a(U,U),s.setVec(u,U)}return s}function $(r){return r.isWGS84||p(r)||T(r)||y(r)}!function(r){r[r.NORMAL=0]="NORMAL",r[r.TANGENT=1]="TANGENT"}(V||(V={})),function(r){r[r.TO_PCPF=0]="TO_PCPF",r[r.FROM_PCPF=1]="FROM_PCPF"}(x||(x={}));const S=s(),U=s(),Y=f(),q=n();export{V as VectorType,O as loadProjectErrorMessage,F as logProjectionError,h as projectFromPCPF,R as projectNormalFromPCPF,E as projectNormalToPCPF,G as projectTangentFromPCPF,w as projectTangentToPCPF,g as projectToPCPF,_ as transformNormal,C as transformTangent,b as transformVectorENUPlateCarree,L as transformVectorWMPlateCarree};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../core/Logger.js";import{fromMat4 as e}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as r}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{fromRotationTranslationScaleOrigin as o,multiply as i,getScaling as n,scale as s,getTranslation as a,fromRotation as l}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as c}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{setAxisAngle as m}from"../../../core/libs/gl-matrix-2/math/quat.js";import{create as f}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{i as p,u,q as g,t as x}from"../../../chunks/vec32.js";import{create as j,ZEROS as v,ONES as b}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import A from"../../Point.js";import{getSphericalPCPF as h}from"../../spatialReferenceEllipsoidUtils.js";import{computeTranslationToOriginAndRotation as R}from"../../projection/computeTranslationToOriginAndRotation.js";import{projectPointToVector as d}from"../../projection/projectPointToVector.js";import{angleRad as y,axis as w,fromMatrix as q,create as F}from"../axisAngleDegrees.js";import S from"../MeshTransform.js";import{isMeshWithRelativeVertexSpace as T}from"../meshVertexSpaceUtils.js";import{performGlobalOperation as U}from"./geographicUtils.js";import{logProjectionError as C,loadProjectErrorMessage as k,projectToPCPF as z,projectNormalToPCPF as L,projectTangentToPCPF as M,projectFromPCPF as P,projectNormalFromPCPF as V,projectTangentFromPCPF as D}from"./projection.js";import{projectPointToVertexSpace as E}from"./vertexSpaceConversion.js";const O=()=>t.getLogger("esri.geometry.support.meshUtils.rotate");function B(t,e,r){if(!t.vertexAttributes?.position||0===e[3])return;const{spatialReference:o,vertexSpace:i}=t,n=r?.origin??t.origin,s=r?.geographic,a=U(O,i,o,s);T(t)?G(t,e,n):a?H(t,e,n):I(t,e,n)}function G(t,e,r){t.transform??=new S;const{vertexSpace:l,transform:c,spatialReference:f}=t,[g,x,h]=l.origin,R=new A({x:g,y:x,z:h,spatialReference:f}),d=K;if(R.equals(r))p(d,0,0,0);else if(!E(d,r,t))return void C(O(),r.spatialReference,f,k);m(Z,w(e),y(e));const F=o(N,Z,v,b,d),{localMatrix:T}=c,U=i(N,F,T);c.scale=n(j(),U),s(U,U,u(K,c.scale));const z=c.rotationAxis;c.rotation=q(U),0===c.rotationAngle&&(c.rotationAxis=z),c.translation=a(j(),U)}function H(t,r,o){const i=t.spatialReference,n=h(i),s=Y;if(!d(o,s,n)&&(C(O(),o.spatialReference,n,"Falling back to mesh origin"),!d(t.origin,s,n)))return void C(O(),t.origin.spatialReference,n);const a=t.vertexAttributes.position,l=t.vertexAttributes.normal,c=t.vertexAttributes.tangent,m=new Float64Array(a.length),f=null!=l?new Float32Array(l.length):null,p=null!=c?new Float32Array(c.length):null;R(n,s,W,n),e(X,W);const u=Q;g(w(Q),w(r),X),u[3]=r[3],z(a,i,m,n)&&(null==l||null==f||L(l,a,i,m,n,f))&&(null==c||null==p||M(c,a,i,m,n,p))?(J(m,u,3,s),P(m,n,a,i)&&(null==l||null==f||(J(f,u,3),V(f,a,i,m,n,l)))&&(null==c||null==p||(J(p,u,4),D(p,a,i,m,n,c)))?t.vertexAttributesChanged():C(O(),n,i)):C(O(),i,n)}function I(t,e,r){const o=Y;if(!d(r,o,t.spatialReference)){const e=t.origin;return o[0]=e.x,o[1]=e.y,o[2]=e.z,void C(O(),r.spatialReference,t.spatialReference,k)}J(t.vertexAttributes.position,e,3,o),J(t.vertexAttributes.normal,e,3),J(t.vertexAttributes.tangent,e,4),t.vertexAttributesChanged()}function J(t,e,r,o=v){if(null!=t){l(W,y(e),w(e));for(let e=0;e<t.length;e+=r){for(let r=0;r<3;r++)K[r]=t[e+r]-o[r];x(K,K,W);for(let r=0;r<3;r++)t[e+r]=K[r]+o[r]}}}const K=j(),N=c(),Q=F(),W=c(),X=r(),Y=j(),Z=f();export{B as rotate};
5
+ import t from"../../../core/Logger.js";import{fromMat4 as e}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as r}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{fromRotationTranslationScaleOrigin as o,multiply as i,getScale as n,scale as s,getTranslation as a,fromRotation as l}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as c}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{setAxisAngle as m}from"../../../core/libs/gl-matrix-2/math/quat.js";import{create as f}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{i as p,r as g,o as u,t as x}from"../../../chunks/vec32.js";import{create as j,ZEROS as v,ONES as b}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import A from"../../Point.js";import{getSphericalPCPF as h}from"../../spatialReferenceEllipsoidUtils.js";import{computeTranslationToOriginAndRotation as R}from"../../projection/computeTranslationToOriginAndRotation.js";import{projectPointToVector as d}from"../../projection/projectPointToVector.js";import{angleRad as y,axis as w,fromMatrix as F,create as S}from"../axisAngleDegrees.js";import T from"../MeshTransform.js";import{isMeshWithRelativeVertexSpace as U}from"../meshVertexSpaceUtils.js";import{performGlobalOperation as q}from"./geographicUtils.js";import{logProjectionError as C,loadProjectErrorMessage as k,projectToPCPF as z,projectNormalToPCPF as L,projectTangentToPCPF as M,projectFromPCPF as P,projectNormalFromPCPF as V,projectTangentFromPCPF as D}from"./projection.js";import{projectPointToVertexSpace as E}from"./vertexSpaceConversion.js";const O=()=>t.getLogger("esri.geometry.support.meshUtils.rotate");function B(t,e,r){if(!t.vertexAttributes?.position||0===e[3])return;const{spatialReference:o,vertexSpace:i}=t,n=r?.origin??t.origin,s=r?.geographic,a=q(O,i,o,s);U(t)?G(t,e,n):a?H(t,e,n):I(t,e,n)}function G(t,e,r){t.transform??=new T;const{vertexSpace:l,transform:c,spatialReference:f}=t,[u,x,h]=l.origin,R=new A({x:u,y:x,z:h,spatialReference:f}),d=K;if(R.equals(r))p(d,0,0,0);else if(!E(d,r,t))return void C(O(),r.spatialReference,f,k);m(Z,w(e),y(e));const S=o(N,Z,v,b,d),{localMatrix:U}=c,q=i(N,S,U);c.scale=n(j(),q),s(q,q,g(K,c.scale));const z=c.rotationAxis;c.rotation=F(q),0===c.rotationAngle&&(c.rotationAxis=z),c.translation=a(j(),q)}function H(t,r,o){const i=t.spatialReference,n=h(i),s=Y;if(!d(o,s,n)&&(C(O(),o.spatialReference,n,"Falling back to mesh origin"),!d(t.origin,s,n)))return void C(O(),t.origin.spatialReference,n);const a=t.vertexAttributes.position,l=t.vertexAttributes.normal,c=t.vertexAttributes.tangent,m=new Float64Array(a.length),f=null!=l?new Float32Array(l.length):null,p=null!=c?new Float32Array(c.length):null;R(n,s,W,n),e(X,W);const g=Q;u(w(Q),w(r),X),g[3]=r[3],z(a,i,m,n)&&(null==l||null==f||L(l,a,i,m,n,f))&&(null==c||null==p||M(c,a,i,m,n,p))?(J(m,g,3,s),P(m,n,a,i)&&(null==l||null==f||(J(f,g,3),V(f,a,i,m,n,l)))&&(null==c||null==p||(J(p,g,4),D(p,a,i,m,n,c)))?t.vertexAttributesChanged():C(O(),n,i)):C(O(),i,n)}function I(t,e,r){const o=Y;if(!d(r,o,t.spatialReference)){const e=t.origin;return o[0]=e.x,o[1]=e.y,o[2]=e.z,void C(O(),r.spatialReference,t.spatialReference,k)}J(t.vertexAttributes.position,e,3,o),J(t.vertexAttributes.normal,e,3),J(t.vertexAttributes.tangent,e,4),t.vertexAttributesChanged()}function J(t,e,r,o=v){if(null!=t){l(W,y(e),w(e));for(let e=0;e<t.length;e+=r){for(let r=0;r<3;r++)K[r]=t[e+r]-o[r];x(K,K,W);for(let r=0;r<3;r++)t[e+r]=K[r]+o[r]}}}const K=j(),N=c(),Q=S(),W=c(),X=r(),Y=j(),Z=f();export{B as rotate};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../core/Logger.js";import{fromRotationTranslationScaleOrigin as t,multiply as r,getScaling as o,scale as i,getTranslation as n}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as s}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{IDENTITY as a}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{i as l,u as c,g as f}from"../../../chunks/vec32.js";import{create as m,ZEROS as p}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import g from"../../Point.js";import{getSphericalPCPF as u}from"../../spatialReferenceEllipsoidUtils.js";import{projectPointToVector as x}from"../../projection/projectPointToVector.js";import{fromMatrix as j}from"../axisAngleDegrees.js";import v from"../MeshTransform.js";import{isMeshWithRelativeVertexSpace as h}from"../meshVertexSpaceUtils.js";import{performGlobalOperation as A}from"./geographicUtils.js";import{logProjectionError as b,loadProjectErrorMessage as R,projectToPCPF as d,projectNormalToPCPF as y,projectTangentToPCPF as w,projectFromPCPF as F,projectNormalFromPCPF as S,projectTangentFromPCPF as U}from"./projection.js";import{projectPointToVertexSpace as C}from"./vertexSpaceConversion.js";const k=()=>e.getLogger("esri.geometry.support.meshUtils.scale");function q(e,t,r){if(!e.vertexAttributes?.position)return;const{vertexSpace:o,spatialReference:i}=e,n=r?.origin??e.origin,s=r?.geographic,a=A(k,o,i,s);h(e)?z(e,t,n):a?L(e,t,n):M(e,t,n)}function z(e,s,f){e.transform??=new v;const{vertexSpace:u,transform:x,spatialReference:h}=e,[A,d,y]=u.origin,w=new g({x:A,y:d,z:y,spatialReference:h}),F=T;if(w.equals(f))l(F,0,0,0);else if(!C(F,f,e))return void b(k(),f.spatialReference,h,R);const S=l(V,s,s,s),U=t(D,a,p,S,F),{localMatrix:q}=x,z=r(D,U,q);x.scale=o(m(),z),i(z,z,c(T,x.scale));const L=x.rotationAxis;x.rotation=j(z),0===x.rotationAngle&&(x.rotationAxis=L),x.translation=n(m(),z)}function L(e,t,r){const o=e.spatialReference,i=u(o),n=E;if(!x(r,n,i)&&(b(k(),r.spatialReference,i,"Falling back to mesh origin"),!x(e.origin,n,i)))return void b(k(),e.origin.spatialReference,i);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),f=null!=a?new Float32Array(a.length):null,m=null!=l?new Float32Array(l.length):null;d(s,o,c,i)&&(null==a||null==f||y(a,s,o,c,i,f))&&(null==l||null==m||w(l,s,o,c,i,m))?(P(c,t,n),F(c,i,s,o)&&(null==a||null==f||S(f,s,o,c,i,a))&&(null==l||null==m||U(m,s,o,c,i,l))?e.vertexAttributesChanged():b(k(),i,o)):b(k(),o,i)}function M(e,t,r){const o=E;if(!x(r,o,e.spatialReference)){const t=e.origin;return o[0]=t.x,o[1]=t.y,o[2]=t.z,void b(k(),r.spatialReference,e.spatialReference,R)}P(e.vertexAttributes.position,t,o),e.vertexAttributesChanged()}function P(e,t,r=p){if(e)for(let o=0;o<e.length;o+=3){for(let t=0;t<3;t++)T[t]=e[o+t]-r[t];f(T,T,t);for(let t=0;t<3;t++)e[o+t]=T[t]+r[t]}}const T=m(),V=m(),D=s(),E=m();export{q as scale};
5
+ import e from"../../../core/Logger.js";import{fromRotationTranslationScaleOrigin as t,multiply as r,getScale as o,scale as i,getTranslation as n}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as s}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{IDENTITY as a}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{i as l,r as c,g as f}from"../../../chunks/vec32.js";import{create as m,ZEROS as p}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import g from"../../Point.js";import{getSphericalPCPF as u}from"../../spatialReferenceEllipsoidUtils.js";import{projectPointToVector as x}from"../../projection/projectPointToVector.js";import{fromMatrix as j}from"../axisAngleDegrees.js";import v from"../MeshTransform.js";import{isMeshWithRelativeVertexSpace as h}from"../meshVertexSpaceUtils.js";import{performGlobalOperation as A}from"./geographicUtils.js";import{logProjectionError as b,loadProjectErrorMessage as R,projectToPCPF as d,projectNormalToPCPF as y,projectTangentToPCPF as w,projectFromPCPF as F,projectNormalFromPCPF as S,projectTangentFromPCPF as U}from"./projection.js";import{projectPointToVertexSpace as C}from"./vertexSpaceConversion.js";const k=()=>e.getLogger("esri.geometry.support.meshUtils.scale");function q(e,t,r){if(!e.vertexAttributes?.position)return;const{vertexSpace:o,spatialReference:i}=e,n=r?.origin??e.origin,s=r?.geographic,a=A(k,o,i,s);h(e)?z(e,t,n):a?L(e,t,n):M(e,t,n)}function z(e,s,f){e.transform??=new v;const{vertexSpace:u,transform:x,spatialReference:h}=e,[A,d,y]=u.origin,w=new g({x:A,y:d,z:y,spatialReference:h}),F=T;if(w.equals(f))l(F,0,0,0);else if(!C(F,f,e))return void b(k(),f.spatialReference,h,R);const S=l(V,s,s,s),U=t(D,a,p,S,F),{localMatrix:q}=x,z=r(D,U,q);x.scale=o(m(),z),i(z,z,c(T,x.scale));const L=x.rotationAxis;x.rotation=j(z),0===x.rotationAngle&&(x.rotationAxis=L),x.translation=n(m(),z)}function L(e,t,r){const o=e.spatialReference,i=u(o),n=E;if(!x(r,n,i)&&(b(k(),r.spatialReference,i,"Falling back to mesh origin"),!x(e.origin,n,i)))return void b(k(),e.origin.spatialReference,i);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,c=new Float64Array(s.length),f=null!=a?new Float32Array(a.length):null,m=null!=l?new Float32Array(l.length):null;d(s,o,c,i)&&(null==a||null==f||y(a,s,o,c,i,f))&&(null==l||null==m||w(l,s,o,c,i,m))?(P(c,t,n),F(c,i,s,o)&&(null==a||null==f||S(f,s,o,c,i,a))&&(null==l||null==m||U(m,s,o,c,i,l))?e.vertexAttributesChanged():b(k(),i,o)):b(k(),o,i)}function M(e,t,r){const o=E;if(!x(r,o,e.spatialReference)){const t=e.origin;return o[0]=t.x,o[1]=t.y,o[2]=t.z,void b(k(),r.spatialReference,e.spatialReference,R)}P(e.vertexAttributes.position,t,o),e.vertexAttributesChanged()}function P(e,t,r=p){if(e)for(let o=0;o<e.length;o+=3){for(let t=0;t<3;t++)T[t]=e[o+t]-r[t];f(T,T,t);for(let t=0;t<3;t++)e[o+t]=T[t]+r[t]}}const T=m(),V=m(),D=s(),E=m();export{q as scale};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../core/Logger.js";import{floatEqualUlp as n}from"../../../core/mathUtils.js";import{getMetersPerCartesianUnitForSR as r,convertUnit as e}from"../../../core/unitUtils.js";import{normalFromMat4 as o}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{exactEquals as l,scale as a,invert as s,copy as c,multiply as u}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as f,IDENTITY as m}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{v as p,d as g,t as A}from"../../../chunks/vec32.js";import{create as R}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{WGS84ECEFSpatialReference as x,getSphericalPCPF as E}from"../../spatialReferenceEllipsoidUtils.js";import{computeTranslationToOriginAndRotation as v}from"../../projection/computeTranslationToOriginAndRotation.js";import{projectPointToVector as T}from"../../projection/projectPointToVector.js";import{isRelativeVertexSpace as h,vertexSpaceEquals as j}from"../meshVertexSpaceUtils.js";import{isEarth as S}from"../spatialReferenceUtils.js";import{a as w,t as y,b as U}from"../../../chunks/vec3.js";import{logProjectionError as F,projectToPCPF as O,projectNormalToPCPF as _,projectTangentToPCPF as b,transformNormal as C,transformTangent as d,projectFromPCPF as G,projectNormalFromPCPF as N,projectTangentFromPCPF as D}from"./projection.js";const M=()=>t.getLogger("esri.geometry.support.meshUtils.vertexSpaceConversion");function k(t,n,{vertexSpace:r,spatialReference:e}){if("georeferenced"===r.type){const o=t;if(!T(n,o,e))return!1;const{origin:i}=r;return g(t,o,i),!0}const o=E(e),i=t;if(!T(n,i,o))return!1;const{origin:l}=r,a=lt;if(!v(e,l,a,o))return!1;const c=s(lt,a);return null!=c&&(A(t,i,c),!0)}function B(t,n,r){const{vertexSpace:e,transform:o,vertexAttributes:i}=t,a=h(e)?o:null,s=X(t.spatialReference,r,at.SOURCE_AND_TARGET);if(j(e,n)&&(!a||l(a.localMatrix,m))&&Y(s)){const{position:t,normal:n,tangent:e}=i,o=r?.allowBufferReuse;return{position:o?t:t.slice(),normal:o?n:n?.slice(),tangent:o?e:e?.slice()}}switch(t.vertexSpace.type){case"local":return"local"===n.type?H(t,t.vertexSpace,n.origin,r):P(t,t.vertexSpace,n.origin,r);case"georeferenced":return"local"===n.type?q(t,t.vertexSpace,n.origin,r):L(t,t.vertexSpace,n.origin,r)}}function L({vertexAttributes:t,transform:n,spatialReference:r},{origin:e},o,i){const l=X(r,i,at.SOURCE_AND_TARGET),a=e||!Y(l)?c(rt,n?.localMatrix??m):null;a&&W(a,r,i,at.SOURCE_AND_TARGET);const{position:s,normal:u,tangent:f}=a?I(t,a):t,g=i?.allowBufferReuse,A=g?s:new Float64Array(s.length);let R=s;if(e&&(R=w(A,R,e)),o){const t=p(it,o);R=w(A,R,t)}return{position:R!==t.position||g?R:R.slice(),normal:u!==t.normal||g?u:u?.slice(),tangent:f!==t.tangent||g?f:f?.slice()}}function V(t,n){return n?.useEllipsoid&&S(t)?x:E(t)}function P({spatialReference:t,vertexAttributes:n,transform:r},{origin:e},o,i){const l=V(t,i);if(!v(t,e,rt,l))return F(M(),t,l),null;r&&u(rt,rt,r.localMatrix),W(rt,t,i,at.SOURCE);const a=new Float64Array(n.position.length),s=J(n.position,rt,t,a,l);if(!s)return null;const c=K(s,t,a,l,n.normal,rt);if(n.normal&&!c)return null;const f=Q(s,t,a,l,n.tangent,rt);if(n.tangent&&!f)return null;if(o){const t=p(it,o);w(s,s,t)}return{position:s,normal:c,tangent:f}}function q({vertexAttributes:t,spatialReference:n,transform:r},{origin:e},i,l){const c=V(n,l);if(!v(n,i,rt,c))return F(M(),n,c),null;const u=1/X(n,l,at.TARGET);a(rt,rt,[u,u,u]);const f=s(et,rt),{position:m,normal:p,tangent:g}=z(t,e,r),A=new Float64Array(m.length),R=Z(m,n,f,A,c);if(!R)return null;const x=o(ot,f),E=$(p,m,n,A,c,x,p!==t.normal?p:void 0);if(!E&&p)return null;const T=tt(g,m,n,A,c,x,g!==t.tangent?g:void 0);return!T&&g?null:{position:R,normal:E,tangent:T}}function z(t,n,r){if(!n)return t;if(!r){const{position:r,normal:e,tangent:o}=t;return{position:w(new Float64Array(r.length),r,n),tangent:o,normal:e}}const e=I(t,r.localMatrix);return w(e.position,e.position,n),e}function H({vertexAttributes:t,spatialReference:n,transform:r},{origin:e},o,i){const l=V(n,i);if(!v(n,e,rt,l))return F(M(),n,l),null;if(r&&u(rt,rt,r.localMatrix),!v(n,o,et,l))return F(M(),l,n),null;s(et,et);const a=u(rt,et,rt);return W(a,n,i,at.SOURCE_AND_TARGET),I(t,a)}function I(t,n){const r=new Float64Array(t.position.length);y(r,t.position,n);const e=t.normal?new Float32Array(t.normal.length):null,o=t.tangent?new Float32Array(t.tangent.length):null;return e&&t.normal&&C(t.normal,e,n),o&&t.tangent&&d(t.tangent,o,n),{position:r,normal:e,tangent:o}}function J(t,n,r,e,o){y(e,t,n);const i=new Float64Array(t.length);return G(e,o,i,r)?i:(F(M(),o,r),null)}function K(t,n,r,e,o,i){if(null==o)return null;const l=new Float32Array(o.length);return C(o,l,i),N(l,t,n,r,e,l)?l:(F(M(),e,n),null)}function Q(t,n,r,e,o,i){if(null==o)return null;const l=new Float32Array(o.length);return d(o,l,i),D(l,t,n,r,e,l)?l:(F(M(),e,n),null)}function W(t,n,r,e){const o=X(n,r,e);Y(o)||a(t,t,[o,o,o])}function X(t,n,r){const e=!!(r&at.SOURCE),o=!!(r&at.TARGET),i=n?.sourceUnit,l=n?.targetUnit;if(!i&&!l)return 1;let a=nt(i,t);e||!i||Y(a)||(M().warn("source unit conversion not supported"),a=1);let s=1/nt(l,t);return o||!l||Y(s)||(M().warn("target unit conversion not supported"),s=1),a*s}function Y(t){return n(t,1)}function Z(t,n,r,e,o){const i=O(t,n,e,o);if(!i)return F(M(),n,o),null;const l=new Float64Array(i.length);return y(l,i,r),l}function $(t,n,r,e,o,i,l){if(null==t)return null;const a=l??new Float32Array(t.length);return _(t,n,r,e,o,a)?(U(a,a,i),a):(F(M(),r,o),null)}function tt(t,n,r,e,o,i,l){if(null==t)return null;const a=l??new Float32Array(t.length);return b(t,n,r,e,o,a)?(U(a,a,i,4),a):(F(M(),r,o),null)}function nt(t,n){if(null==t)return 1;const o=r(n);return 1/e(o,"meters",t)}const rt=f(),et=f(),ot=i(),it=R(),lt=f();var at;!function(t){t[t.NONE=0]="NONE",t[t.SOURCE=1]="SOURCE",t[t.TARGET=2]="TARGET",t[t.SOURCE_AND_TARGET=3]="SOURCE_AND_TARGET"}(at||(at={}));export{B as convertVertexSpace,nt as getUnitToSpatialReferenceScaleConversion,k as projectPointToVertexSpace};
5
+ import t from"../../../core/Logger.js";import{floatEqualUlp as n}from"../../../core/mathUtils.js";import{getMetersPerCartesianUnitForSR as r,convertUnit as e}from"../../../core/unitUtils.js";import{normalFromMat4 as o}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{exactEquals as l,scale as a,invert as s,copy as c,multiply as u}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{create as f,IDENTITY as m}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{u as p,d as g,t as A}from"../../../chunks/vec32.js";import{create as R}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{WGS84ECEFSpatialReference as x,getSphericalPCPF as E}from"../../spatialReferenceEllipsoidUtils.js";import{computeTranslationToOriginAndRotation as T}from"../../projection/computeTranslationToOriginAndRotation.js";import{projectPointToVector as v}from"../../projection/projectPointToVector.js";import{isRelativeVertexSpace as h,vertexSpaceEquals as j}from"../meshVertexSpaceUtils.js";import{isEarth as S}from"../spatialReferenceUtils.js";import{a as w,t as y,b as U}from"../../../chunks/vec3.js";import{logProjectionError as F,projectToPCPF as O,projectNormalToPCPF as _,projectTangentToPCPF as b,transformNormal as C,transformTangent as d,projectFromPCPF as G,projectNormalFromPCPF as N,projectTangentFromPCPF as D}from"./projection.js";const M=()=>t.getLogger("esri.geometry.support.meshUtils.vertexSpaceConversion");function k(t,n,{vertexSpace:r,spatialReference:e}){if("georeferenced"===r.type){const o=t;if(!v(n,o,e))return!1;const{origin:i}=r;return g(t,o,i),!0}const o=E(e),i=t;if(!v(n,i,o))return!1;const{origin:l}=r,a=lt;if(!T(e,l,a,o))return!1;const c=s(lt,a);return null!=c&&(A(t,i,c),!0)}function B(t,n,r){const{vertexSpace:e,transform:o,vertexAttributes:i}=t,a=h(e)?o:null,s=X(t.spatialReference,r,at.SOURCE_AND_TARGET);if(j(e,n)&&(!a||l(a.localMatrix,m))&&Y(s)){const{position:t,normal:n,tangent:e}=i,o=r?.allowBufferReuse;return{position:o?t:t.slice(),normal:o?n:n?.slice(),tangent:o?e:e?.slice()}}switch(t.vertexSpace.type){case"local":return"local"===n.type?H(t,t.vertexSpace,n.origin,r):P(t,t.vertexSpace,n.origin,r);case"georeferenced":return"local"===n.type?q(t,t.vertexSpace,n.origin,r):L(t,t.vertexSpace,n.origin,r)}}function L({vertexAttributes:t,transform:n,spatialReference:r},{origin:e},o,i){const l=X(r,i,at.SOURCE_AND_TARGET),a=e||!Y(l)?c(rt,n?.localMatrix??m):null;a&&W(a,r,i,at.SOURCE_AND_TARGET);const{position:s,normal:u,tangent:f}=a?I(t,a):t,g=i?.allowBufferReuse,A=g?s:new Float64Array(s.length);let R=s;if(e&&(R=w(A,R,e)),o){const t=p(it,o);R=w(A,R,t)}return{position:R!==t.position||g?R:R.slice(),normal:u!==t.normal||g?u:u?.slice(),tangent:f!==t.tangent||g?f:f?.slice()}}function V(t,n){return n?.useEllipsoid&&S(t)?x:E(t)}function P({spatialReference:t,vertexAttributes:n,transform:r},{origin:e},o,i){const l=V(t,i);if(!T(t,e,rt,l))return F(M(),t,l),null;r&&u(rt,rt,r.localMatrix),W(rt,t,i,at.SOURCE);const a=new Float64Array(n.position.length),s=J(n.position,rt,t,a,l);if(!s)return null;const c=K(s,t,a,l,n.normal,rt);if(n.normal&&!c)return null;const f=Q(s,t,a,l,n.tangent,rt);if(n.tangent&&!f)return null;if(o){const t=p(it,o);w(s,s,t)}return{position:s,normal:c,tangent:f}}function q({vertexAttributes:t,spatialReference:n,transform:r},{origin:e},i,l){const c=V(n,l);if(!T(n,i,rt,c))return F(M(),n,c),null;const u=1/X(n,l,at.TARGET);a(rt,rt,[u,u,u]);const f=s(et,rt),{position:m,normal:p,tangent:g}=z(t,e,r),A=new Float64Array(m.length),R=Z(m,n,f,A,c);if(!R)return null;const x=o(ot,f),E=$(p,m,n,A,c,x,p!==t.normal?p:void 0);if(!E&&p)return null;const v=tt(g,m,n,A,c,x,g!==t.tangent?g:void 0);return!v&&g?null:{position:R,normal:E,tangent:v}}function z(t,n,r){if(!n)return t;if(!r){const{position:r,normal:e,tangent:o}=t;return{position:w(new Float64Array(r.length),r,n),tangent:o,normal:e}}const e=I(t,r.localMatrix);return w(e.position,e.position,n),e}function H({vertexAttributes:t,spatialReference:n,transform:r},{origin:e},o,i){const l=V(n,i);if(!T(n,e,rt,l))return F(M(),n,l),null;if(r&&u(rt,rt,r.localMatrix),!T(n,o,et,l))return F(M(),l,n),null;s(et,et);const a=u(rt,et,rt);return W(a,n,i,at.SOURCE_AND_TARGET),I(t,a)}function I(t,n){const r=new Float64Array(t.position.length);y(r,t.position,n);const e=t.normal?new Float32Array(t.normal.length):null,o=t.tangent?new Float32Array(t.tangent.length):null;return e&&t.normal&&C(t.normal,e,n),o&&t.tangent&&d(t.tangent,o,n),{position:r,normal:e,tangent:o}}function J(t,n,r,e,o){y(e,t,n);const i=new Float64Array(t.length);return G(e,o,i,r)?i:(F(M(),o,r),null)}function K(t,n,r,e,o,i){if(null==o)return null;const l=new Float32Array(o.length);return C(o,l,i),N(l,t,n,r,e,l)?l:(F(M(),e,n),null)}function Q(t,n,r,e,o,i){if(null==o)return null;const l=new Float32Array(o.length);return d(o,l,i),D(l,t,n,r,e,l)?l:(F(M(),e,n),null)}function W(t,n,r,e){const o=X(n,r,e);Y(o)||a(t,t,[o,o,o])}function X(t,n,r){const e=!!(r&at.SOURCE),o=!!(r&at.TARGET),i=n?.sourceUnit,l=n?.targetUnit;if(!i&&!l)return 1;let a=nt(i,t);e||!i||Y(a)||(M().warn("source unit conversion not supported"),a=1);let s=1/nt(l,t);return o||!l||Y(s)||(M().warn("target unit conversion not supported"),s=1),a*s}function Y(t){return n(t,1)}function Z(t,n,r,e,o){const i=O(t,n,e,o);if(!i)return F(M(),n,o),null;const l=new Float64Array(i.length);return y(l,i,r),l}function $(t,n,r,e,o,i,l){if(null==t)return null;const a=l??new Float32Array(t.length);return _(t,n,r,e,o,a)?(U(a,a,i),a):(F(M(),r,o),null)}function tt(t,n,r,e,o,i,l){if(null==t)return null;const a=l??new Float32Array(t.length);return b(t,n,r,e,o,a)?(U(a,a,i,4),a):(F(M(),r,o),null)}function nt(t,n){if(null==t)return 1;const o=r(n);return 1/e(o,"meters",t)}const rt=f(),et=f(),ot=i(),it=R(),lt=f();var at;!function(t){t[t.NONE=0]="NONE",t[t.SOURCE=1]="SOURCE",t[t.TARGET=2]="TARGET",t[t.SOURCE_AND_TARGET=3]="SOURCE_AND_TARGET"}(at||(at={}));export{B as convertVertexSpace,nt as getUnitToSpatialReferenceScaleConversion,k as projectPointToVertexSpace};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{p as e}from"../../chunks/vec32.js";import n from"../Point.js";import r from"./MeshGeoreferencedVertexSpace.js";import i from"./MeshLocalVertexSpace.js";function o(e){return null==e.origin}function t(e){return null!=e.origin}function c(e){return t(e.vertexSpace)}function u(e,r){if(!t(e))return null;const[i,o,c]=e.origin;return new n({x:i,y:o,z:c,spatialReference:r})}function l(e,n){const{x:o,y:t,z:c,spatialReference:u}=e,l=[o,t,c??0];return"local"===(n?.vertexSpace??f(u))?new i({origin:l}):new r({origin:l})}function f(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}function p(n,r){return n.type===r.type&&(n.origin===r.origin||null!=n.origin&&null!=r.origin&&e(n.origin,r.origin))}export{o as isAbsoluteVertexSpace,c as isMeshWithRelativeVertexSpace,t as isRelativeVertexSpace,l as selectVertexSpace,p as vertexSpaceEquals,u as vertexSpaceOriginToPoint};
5
+ import{q as e}from"../../chunks/vec32.js";import n from"../Point.js";import r from"./MeshGeoreferencedVertexSpace.js";import i from"./MeshLocalVertexSpace.js";function o(e){return null==e.origin}function t(e){return null!=e.origin}function c(e){return t(e.vertexSpace)}function u(e,r){if(!t(e))return null;const[i,o,c]=e.origin;return new n({x:i,y:o,z:c,spatialReference:r})}function l(e,n){const{x:o,y:t,z:c,spatialReference:u}=e,l=[o,t,c??0];return"local"===(n?.vertexSpace??f(u))?new i({origin:l}):new r({origin:l})}function f(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}function a(n,r){return n.type===r.type&&(n.origin===r.origin||null!=n.origin&&null!=r.origin&&e(n.origin,r.origin))}export{o as isAbsoluteVertexSpace,c as isMeshWithRelativeVertexSpace,t as isRelativeVertexSpace,l as selectVertexSpace,a as vertexSpaceEquals,u as vertexSpaceOriginToPoint};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{clamp as t}from"../../core/mathUtils.js";import{e as n,f as r,g as o,h as c,d as e,p as u,n as I,i,c as f}from"../../chunks/vec32.js";import{create as s}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a as N,e as E}from"../../chunks/vec42.js";import{projectPointSignedLength as a}from"./vector.js";import{sv4d as T,sv3d as S}from"./vectorStacks.js";import{tangentFrame as _}from"../../views/3d/support/mathUtils.js";function M(t=$){return[t[0],t[1],t[2],t[3]]}const m=N,g=E;function D(t=$[0],n=$[1],r=$[2],o=$[3]){return U(t,n,r,o,T.get())}function h(t,n){return U(n[0],n[1],n[2],n[3],t)}function O(t){return t}function U(t,n,r,o,c=M()){return c[0]=t,c[1]=n,c[2]=r,c[3]=o,c}function C(t,n,r){return f(r,t),r[3]=n,r}function l(t,n,r){const o=n[0]*n[0]+n[1]*n[1]+n[2]*n[2],c=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return r[0]=n[0]*c,r[1]=n[1]*c,r[2]=n[2]*c,r[3]=-(r[0]*t[0]+r[1]*t[1]+r[2]*t[2]),r}function p(t,n,r,o=M()){const c=r[0]-n[0],e=r[1]-n[1],u=r[2]-n[2],I=t[0]-n[0],i=t[1]-n[1],f=t[2]-n[2],s=e*f-u*i,N=u*I-c*f,E=c*i-e*I,a=s*s+N*N+E*E,T=Math.abs(a-1)>1e-5&&a>1e-12?1/Math.sqrt(a):1;return o[0]=s*T,o[1]=N*T,o[2]=E*T,o[3]=-(o[0]*t[0]+o[1]*t[1]+o[2]*t[2]),o}function v(t,r,o,c=0,i=Math.floor(o*(1/3)),f=Math.floor(o*(2/3))){if(o<3)return!1;r(R,c);let s=i,N=!1;for(;s<o-1&&!N;)r(j,s),s++,N=!u(R,j);if(!N)return!1;for(s=Math.max(s,f),N=!1;s<o&&!N;)r(b,s),s++,e(d,R,j),I(d,d),e(X,j,b),I(X,X),N=!u(R,b)&&!u(j,b)&&Math.abs(n(d,X))<F;return N?(p(R,j,b,t),!0):(0!==c||1!==i||2!==f)&&v(t,r,o,0,1,2)}function A(t,n,r=!0){const o=n.length/3;return v(t,((t,r)=>i(t,n[3*r+0],n[3*r+1],n[3*r+2])),r?o-1:o)}const F=.99619469809,R=s(),j=s(),b=s(),d=s(),X=s();function y(t,r,o){return r!==t&&h(t,r),t[3]=-n(O(t),o),t}function L(t,n){return n[0]=-t[0],n[1]=-t[1],n[2]=-t[2],n[3]=-t[3],n}function P(t,n,r,o){return c(b,n,t),l(r,b,o)}function k(t,n,r,o){return Y(Z(t,n,e(S.get(),r,n),nt,o))}function x(t,n,r){return null!=n&&Y(Z(t,n.origin,n.direction,rt,r))}function q(t,n,r){return Y(Z(t,n.origin,n.vector,tt.NONE,r))}function w(t,n,r){return Y(Z(t,n.origin,n.vector,tt.CLAMP,r))}function z(t,n){return V(t,n)>=0}function B(t,r){const o=n(O(t),r.ray.direction),c=-V(t,r.ray.origin);if(c<0&&o>=0)return!1;if(o>-1e-6&&o<1e-6)return c>0;if((c<0||o<0)&&!(c<0&&o<0))return!0;const e=c/o;return o>0?e<r.c1&&(r.c1=e):e>r.c0&&(r.c0=e),r.c0<=r.c1}function G(t,r){const o=n(O(t),r.ray.direction),c=-V(t,r.ray.origin);if(o>-1e-6&&o<1e-6)return c>0;const e=c/o;return o>0?e<r.c1&&(r.c1=e):e>r.c0&&(r.c0=e),r.c0<=r.c1}function H(t,n,c){const u=o(S.get(),O(t),-t[3]),I=K(t,e(S.get(),n,u),S.get());return r(c,I,u),c}function J(t,n,r,o){const c=O(t),u=S.get(),I=S.get();_(c,u,I);const f=e(S.get(),r,n),s=a(u,f),N=a(I,f),E=a(c,f);return i(o,s,N,E)}function K(t,r,c){const u=o(S.get(),O(t),n(O(t),r));return e(c,r,u),c}function Q(t,n){return Math.abs(V(t,n))}function V(t,r){return n(O(t),r)+t[3]}var W;function Y(t){return t===W.INTERSECTS_INSIDE_OUT||t===W.INTERSECTS_OUTSIDE_IN}function Z(c,e,u,I,i){const f=n(O(c),u),s=V(c,e);if(0===f)return s>=0?W.INSIDE:W.OUTSIDE;let N=-s/f;return I&tt.CLAMP&&(N=t(N,0,1)),!(I&tt.INFINITE_MIN)&&N<0||!(I&tt.INFINITE_MAX)&&N>1?s>=0?W.INSIDE:W.OUTSIDE:(r(i,e,o(i,u,N)),s>=0?W.INTERSECTS_INSIDE_OUT:W.INTERSECTS_OUTSIDE_IN)}!function(t){t[t.INTERSECTS_INSIDE_OUT=0]="INTERSECTS_INSIDE_OUT",t[t.INTERSECTS_OUTSIDE_IN=1]="INTERSECTS_OUTSIDE_IN",t[t.INSIDE=2]="INSIDE",t[t.OUTSIDE=3]="OUTSIDE"}(W||(W={}));const $=[0,0,1,0];var tt;!function(t){t[t.NONE=0]="NONE",t[t.CLAMP=1]="CLAMP",t[t.INFINITE_MIN=4]="INFINITE_MIN",t[t.INFINITE_MAX=8]="INFINITE_MAX"}(tt||(tt={}));const nt=tt.INFINITE_MIN|tt.INFINITE_MAX,rt=tt.INFINITE_MAX;export{tt as IntersectFlags,W as IntersectResult,B as clip,G as clipInfinite,h as copy,M as create,Q as distance,g as equals,m as exactEquals,A as fromArray,v as fromManyPoints,C as fromNormalAndOffset,p as fromPoints,l as fromPositionAndNormal,U as fromValues,P as fromVectorsAndPoint,O as getNormal,k as intersectLine,Z as intersectLineOrRay,q as intersectLineSegment,w as intersectLineSegmentClamp,x as intersectRay,z as isPointInside,L as negate,H as projectPoint,J as projectPointLocal,K as projectVector,y as setOffsetFromPoint,V as signedDistance,$ as up,D as wrap};
5
+ import{clamp as t}from"../../core/mathUtils.js";import{e as n,f as r,g as o,h as c,d as e,q as u,n as I,i,c as f}from"../../chunks/vec32.js";import{create as s}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{a as N,e as E}from"../../chunks/vec42.js";import{projectPointSignedLength as a}from"./vector.js";import{sv4d as T,sv3d as S}from"./vectorStacks.js";import{tangentFrame as _}from"../../views/3d/support/mathUtils.js";function M(t=$){return[t[0],t[1],t[2],t[3]]}const m=N,g=E;function D(t=$[0],n=$[1],r=$[2],o=$[3]){return U(t,n,r,o,T.get())}function h(t,n){return U(n[0],n[1],n[2],n[3],t)}function O(t){return t}function U(t,n,r,o,c=M()){return c[0]=t,c[1]=n,c[2]=r,c[3]=o,c}function C(t,n,r){return f(r,t),r[3]=n,r}function l(t,n,r){const o=n[0]*n[0]+n[1]*n[1]+n[2]*n[2],c=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return r[0]=n[0]*c,r[1]=n[1]*c,r[2]=n[2]*c,r[3]=-(r[0]*t[0]+r[1]*t[1]+r[2]*t[2]),r}function p(t,n,r,o=M()){const c=r[0]-n[0],e=r[1]-n[1],u=r[2]-n[2],I=t[0]-n[0],i=t[1]-n[1],f=t[2]-n[2],s=e*f-u*i,N=u*I-c*f,E=c*i-e*I,a=s*s+N*N+E*E,T=Math.abs(a-1)>1e-5&&a>1e-12?1/Math.sqrt(a):1;return o[0]=s*T,o[1]=N*T,o[2]=E*T,o[3]=-(o[0]*t[0]+o[1]*t[1]+o[2]*t[2]),o}function v(t,r,o,c=0,i=Math.floor(o*(1/3)),f=Math.floor(o*(2/3))){if(o<3)return!1;r(R,c);let s=i,N=!1;for(;s<o-1&&!N;)r(j,s),s++,N=!u(R,j);if(!N)return!1;for(s=Math.max(s,f),N=!1;s<o&&!N;)r(b,s),s++,e(d,R,j),I(d,d),e(X,j,b),I(X,X),N=!u(R,b)&&!u(j,b)&&Math.abs(n(d,X))<F;return N?(p(R,j,b,t),!0):(0!==c||1!==i||2!==f)&&v(t,r,o,0,1,2)}function A(t,n,r=!0){const o=n.length/3;return v(t,((t,r)=>i(t,n[3*r+0],n[3*r+1],n[3*r+2])),r?o-1:o)}const F=.99619469809,R=s(),j=s(),b=s(),d=s(),X=s();function y(t,r,o){return r!==t&&h(t,r),t[3]=-n(O(t),o),t}function L(t,n){return n[0]=-t[0],n[1]=-t[1],n[2]=-t[2],n[3]=-t[3],n}function P(t,n,r,o){return c(b,n,t),l(r,b,o)}function k(t,n,r,o){return Y(Z(t,n,e(S.get(),r,n),nt,o))}function q(t,n,r){return null!=n&&Y(Z(t,n.origin,n.direction,rt,r))}function x(t,n,r){return Y(Z(t,n.origin,n.vector,tt.NONE,r))}function w(t,n,r){return Y(Z(t,n.origin,n.vector,tt.CLAMP,r))}function z(t,n){return V(t,n)>=0}function B(t,r){const o=n(O(t),r.ray.direction),c=-V(t,r.ray.origin);if(c<0&&o>=0)return!1;if(o>-1e-6&&o<1e-6)return c>0;if((c<0||o<0)&&!(c<0&&o<0))return!0;const e=c/o;return o>0?e<r.c1&&(r.c1=e):e>r.c0&&(r.c0=e),r.c0<=r.c1}function G(t,r){const o=n(O(t),r.ray.direction),c=-V(t,r.ray.origin);if(o>-1e-6&&o<1e-6)return c>0;const e=c/o;return o>0?e<r.c1&&(r.c1=e):e>r.c0&&(r.c0=e),r.c0<=r.c1}function H(t,n,c){const u=o(S.get(),O(t),-t[3]),I=K(t,e(S.get(),n,u),S.get());return r(c,I,u),c}function J(t,n,r,o){const c=O(t),u=S.get(),I=S.get();_(c,u,I);const f=e(S.get(),r,n),s=a(u,f),N=a(I,f),E=a(c,f);return i(o,s,N,E)}function K(t,r,c){const u=o(S.get(),O(t),n(O(t),r));return e(c,r,u),c}function Q(t,n){return Math.abs(V(t,n))}function V(t,r){return n(O(t),r)+t[3]}var W;function Y(t){return t===W.INTERSECTS_INSIDE_OUT||t===W.INTERSECTS_OUTSIDE_IN}function Z(c,e,u,I,i){const f=n(O(c),u),s=V(c,e);if(0===f)return s>=0?W.INSIDE:W.OUTSIDE;let N=-s/f;return I&tt.CLAMP&&(N=t(N,0,1)),!(I&tt.INFINITE_MIN)&&N<0||!(I&tt.INFINITE_MAX)&&N>1?s>=0?W.INSIDE:W.OUTSIDE:(r(i,e,o(i,u,N)),s>=0?W.INTERSECTS_INSIDE_OUT:W.INTERSECTS_OUTSIDE_IN)}!function(t){t[t.INTERSECTS_INSIDE_OUT=0]="INTERSECTS_INSIDE_OUT",t[t.INTERSECTS_OUTSIDE_IN=1]="INTERSECTS_OUTSIDE_IN",t[t.INSIDE=2]="INSIDE",t[t.OUTSIDE=3]="OUTSIDE"}(W||(W={}));const $=[0,0,1,0];var tt;!function(t){t[t.NONE=0]="NONE",t[t.CLAMP=1]="CLAMP",t[t.INFINITE_MIN=4]="INFINITE_MIN",t[t.INFINITE_MAX=8]="INFINITE_MAX"}(tt||(tt={}));const nt=tt.INFINITE_MIN|tt.INFINITE_MAX,rt=tt.INFINITE_MAX;export{tt as IntersectFlags,W as IntersectResult,B as clip,G as clipInfinite,h as copy,M as create,Q as distance,g as equals,m as exactEquals,A as fromArray,v as fromManyPoints,C as fromNormalAndOffset,p as fromPoints,l as fromPositionAndNormal,U as fromValues,P as fromVectorsAndPoint,O as getNormal,k as intersectLine,Z as intersectLineOrRay,x as intersectLineSegment,w as intersectLineSegmentClamp,q as intersectRay,z as isPointInside,L as negate,H as projectPoint,J as projectPointLocal,K as projectVector,y as setOffsetFromPoint,V as signedDistance,$ as up,D as wrap};