@arcgis/core 4.33.0-next.20250211 → 4.33.0-next.20250212

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 (301) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{3c23e567cfb7372c44ba.js → 0a5689348d544090006d.js} +1 -1
  3. package/assets/esri/core/workers/chunks/0b8bf1966653c326e95a.js +1 -0
  4. package/assets/esri/core/workers/chunks/{baee20c14763bef80b09.js → 1249fd2f83caeaefd8ce.js} +1 -1
  5. package/assets/esri/core/workers/chunks/135fb580d8afd8d60811.js +1 -0
  6. package/assets/esri/core/workers/chunks/{946a9890f3621d1dfbc5.js → 144e534d4ac1aafab60d.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{cee3a38b92a48a58c4d0.js → 152becae48572299b07f.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{f200dca22f9f9bbb8670.js → 17213c3fc63f580e5b73.js} +1 -1
  9. package/assets/esri/core/workers/chunks/24e6476f32ad2014d39d.js +1 -0
  10. package/assets/esri/core/workers/chunks/272662e4e28341419b4f.js +1 -0
  11. package/assets/esri/core/workers/chunks/{5fbdb5fea7d6676fcf19.js → 2c1a85a801cb4d9d737e.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{7f87cf3d6a365d987f69.js → 30bd5b3204e09f516ea2.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{c04091eea7089dc2e864.js → 35bcb0622234b38d85b4.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{92984981afcbb95828cd.js → 37cfd102b6ab5b959f9d.js} +1 -1
  15. package/assets/esri/core/workers/chunks/3835c2884c55e73dc202.js +1 -0
  16. package/assets/esri/core/workers/chunks/{6c9bb00f33649ab59dab.js → 3ba85f1d660b8887f963.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{1d51c064045e9c47bd2e.js → 3bad184751fcb26c003c.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{e468bf4ec7402942ad8c.js → 3ebdd0701e77bb28c75d.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{a559db8654b4f83fd79b.js → 3f6516af411256d90a03.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{c83b26ff96e39266adc2.js → 4300c80fa10c5d9141e8.js} +1 -1
  21. package/assets/esri/core/workers/chunks/4848a3e31632d15dc4ce.js +1 -0
  22. package/assets/esri/core/workers/chunks/{77764ca90bdd13ee2167.js → 486df1e042204b90b0dd.js} +2 -2
  23. package/assets/esri/core/workers/chunks/{77764ca90bdd13ee2167.js.LICENSE.txt → 486df1e042204b90b0dd.js.LICENSE.txt} +1 -1
  24. package/assets/esri/core/workers/chunks/52f61e1f5972a72b6b54.js +1 -0
  25. package/assets/esri/core/workers/chunks/{354531dc2f0dea2ad96f.js → 5693d9ce4472a4c5959f.js} +2 -2
  26. package/assets/esri/core/workers/chunks/{354531dc2f0dea2ad96f.js.LICENSE.txt → 5693d9ce4472a4c5959f.js.LICENSE.txt} +1 -1
  27. package/assets/esri/core/workers/chunks/{e56647e61296643c5f84.js → 5719471414810b6a9aec.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{1accbc048b74857269e4.js → 57924f4909f2cbe5d64c.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{b21b152fa15896577242.js → 5b56b271afb0fadf48b4.js} +2 -2
  30. package/assets/esri/core/workers/chunks/{b21b152fa15896577242.js.LICENSE.txt → 5b56b271afb0fadf48b4.js.LICENSE.txt} +1 -1
  31. package/assets/esri/core/workers/chunks/{b3aeda290470dcb2bdd2.js → 5cf08ee5114273163e09.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{76794184ba8c2e66745e.js → 629f4621ba6ffdcaa2f9.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{32d3657dcae89b740f8b.js → 6518954889df2e781c47.js} +2 -2
  34. package/assets/esri/core/workers/chunks/{32d3657dcae89b740f8b.js.LICENSE.txt → 6518954889df2e781c47.js.LICENSE.txt} +1 -1
  35. package/assets/esri/core/workers/chunks/{220b12654b94c94f8d8a.js → 6fa1f1e431aae1794ce3.js} +1 -1
  36. package/assets/esri/core/workers/chunks/82facb23dfaba2819bc7.js +1 -0
  37. package/assets/esri/core/workers/chunks/8722d05ae9b0aa5162a4.js +1 -0
  38. package/assets/esri/core/workers/chunks/8de4280080296adb1757.js +1 -0
  39. package/assets/esri/core/workers/chunks/{1f443b99653708470f31.js → 96d7f47ea8fbf345101c.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{e6087eda5e3b7e5ad3e1.js → a12afed58acff17708ca.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{95ad76e58452b60fb79f.js → a864ef9b584c83ebf6ae.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{df3d1a8d3f11d52eb30d.js → afdbdc1569b56489c14d.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{308ec51ff4a66f7fcb0d.js → b0952b81d5be214262dd.js} +2 -2
  44. package/assets/esri/core/workers/chunks/{308ec51ff4a66f7fcb0d.js.LICENSE.txt → b0952b81d5be214262dd.js.LICENSE.txt} +1 -1
  45. package/assets/esri/core/workers/chunks/{89e3f7880abd014a62c0.js → b42d26123784997c66e8.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{4040158835f9036967cd.js → b83151b03bbeba466f82.js} +2 -2
  47. package/assets/esri/core/workers/chunks/{4040158835f9036967cd.js.LICENSE.txt → b83151b03bbeba466f82.js.LICENSE.txt} +1 -1
  48. package/assets/esri/core/workers/chunks/bf0bf2b912d668575a9b.js +1 -0
  49. package/assets/esri/core/workers/chunks/{94490937dca566fe2640.js → c061cad8323f0469e7e4.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{fef135e55706d84d1947.js → c4ce3c35b52b7999e877.js} +1 -1
  51. package/assets/esri/core/workers/chunks/cc8eb975a543556f88ae.js +1 -0
  52. package/assets/esri/core/workers/chunks/{6e6422eda398774acbc7.js → d60da671aba70485050e.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{88a34690480d3658bad8.js → d7b260d6187f29e0c136.js} +1 -1
  54. package/assets/esri/core/workers/chunks/de638753a30c9aa41bad.js +1 -0
  55. package/assets/esri/core/workers/chunks/de87009542886fad9a2f.js +2 -0
  56. package/assets/esri/core/workers/chunks/{b765670b47d209d7655a.js.LICENSE.txt → de87009542886fad9a2f.js.LICENSE.txt} +1 -1
  57. package/assets/esri/core/workers/chunks/{bb73cd34fbae935ccbcc.js → dff4a9d656b84fe3e052.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{12199e8abf377ffc27cd.js → e490f70f192780d7ad50.js} +1 -1
  59. package/assets/esri/core/workers/chunks/f088e7db4e7ac85aaff1.js +1 -0
  60. package/assets/esri/core/workers/chunks/{a38cb1fff519bad8abe3.js → f0d28fe4deb7cd894765.js} +1 -1
  61. package/assets/esri/core/workers/chunks/f52ed527b46c316eb369.js +1 -0
  62. package/assets/esri/core/workers/chunks/{140d0c4285c6978103ea.js → f5ce6af342c02a4b0d15.js} +7 -7
  63. package/assets/esri/core/workers/chunks/{1cbeac3301b6943bb28a.js → fc07d47d44c04f123650.js} +1 -1
  64. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  65. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  66. package/assets/esri/themes/base/_core.scss +4 -0
  67. package/assets/esri/themes/base/widgets/_BasemapGallery.scss +0 -5
  68. package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationLayers.scss +80 -0
  69. package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationList.scss +14 -0
  70. package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationSettings.scss +41 -0
  71. package/assets/esri/themes/base/widgets/_FilterBuilder.scss +1 -6
  72. package/assets/esri/themes/dark/main.css +1 -1
  73. package/assets/esri/themes/light/main.css +1 -1
  74. package/assets/esri/themes/light/view.css +1 -1
  75. package/chunks/Bufferer-B-V7yYm-.js +5 -0
  76. package/chunks/Distance2DCalculator-Coa0qAFt.js +5 -0
  77. package/chunks/Envelope.js +1 -1
  78. package/chunks/{GeodeticDistanceCalculator-BsWHOuqE.js → GeodeticDistanceCalculator-D4iQ-_NX.js} +1 -1
  79. package/chunks/Geometry.js +1 -1
  80. package/chunks/OperatorClip.js +1 -1
  81. package/chunks/OperatorCut.js +1 -1
  82. package/chunks/OperatorGeneralize.js +1 -1
  83. package/chunks/OperatorGeodesicBuffer.js +1 -1
  84. package/chunks/OperatorGeodeticArea.js +1 -1
  85. package/chunks/OperatorGeodeticDistance.js +1 -1
  86. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  87. package/chunks/OperatorProximity.js +1 -1
  88. package/chunks/OperatorProximityGeodesic.js +1 -1
  89. package/chunks/OperatorShapePreservingLength.js +1 -1
  90. package/chunks/OperatorShapePreservingProject.js +1 -1
  91. package/chunks/Point2D.js +1 -1
  92. package/chunks/ProjectionTransformation.js +1 -1
  93. package/chunks/QuadraticBezier.js +1 -1
  94. package/chunks/ShadowHighlight.glsl.js +2 -4
  95. package/chunks/SideCalculator2D-BNwb5gvz.js +1 -1
  96. package/chunks/disjointOperator.js +1 -1
  97. package/chunks/distanceOperator.js +1 -1
  98. package/chunks/lyr3DWorker.js +1 -1
  99. package/core/sql.js +1 -1
  100. package/editing/sharedTemplates/SharedTemplate.d.ts +4 -0
  101. package/editing/sharedTemplates/SharedTemplate.js +1 -1
  102. package/editing/sharedTemplates/SharedTemplateMetadata.js +1 -1
  103. package/editing/sharedTemplates/SharedTemplateProvider.js +1 -1
  104. package/editing/sharedTemplates/executor/builders/bufferLineToPolygon.js +1 -1
  105. package/editing/sharedTemplates/executor/builders/bufferPointToPolygon.js +1 -1
  106. package/editing/sharedTemplates/executor/builders/bufferPolygonToPolygon.js +1 -1
  107. package/editing/sharedTemplates/executor/builders/equallySpaced.js +1 -1
  108. package/editing/sharedTemplates/executor/builders/offsetLine.js +1 -1
  109. package/editing/sharedTemplates/executor/builders/offsetPrimaryLine.js +1 -1
  110. package/editing/sharedTemplates/executor/builders/pointAtAllVerticesOfLine.js +1 -1
  111. package/editing/sharedTemplates/executor/builders/pointAtBeginningOfLine.js +1 -1
  112. package/editing/sharedTemplates/executor/builders/pointAtBeginningOfRadial.js +1 -1
  113. package/editing/sharedTemplates/executor/builders/pointAtEndOfLine.js +1 -1
  114. package/editing/sharedTemplates/executor/builders/pointAtInteriorVertices.js +1 -1
  115. package/editing/sharedTemplates/executor/builders/pointAtIntersectionVerticesOfLine.js +1 -1
  116. package/editing/sharedTemplates/executor/builders/pointAtNotBeginningOfLine.js +1 -1
  117. package/editing/sharedTemplates/executor/builders/pointAtNotEndOfLine.js +1 -1
  118. package/editing/sharedTemplates/executor/builders/pointAtPolygonCentroid.js +1 -1
  119. package/editing/sharedTemplates/executor/builders/pointAtPolygonNotStart.js +1 -1
  120. package/editing/sharedTemplates/executor/builders/pointAtPolygonStart.js +1 -1
  121. package/editing/sharedTemplates/executor/builders/pointIdentity.js +1 -1
  122. package/editing/sharedTemplates/executor/builders/pointPrimaryIdentity.js +1 -1
  123. package/editing/sharedTemplates/executor/builders/polygonBoundary.js +1 -1
  124. package/editing/sharedTemplates/executor/builders/polygonBoundaryTwoPoint.js +1 -1
  125. package/editing/sharedTemplates/executor/builders/polygonIdentity.js +1 -1
  126. package/editing/sharedTemplates/executor/builders/polygonPrimaryIdentity.js +1 -1
  127. package/editing/sharedTemplates/executor/builders/polygonVertices.js +1 -1
  128. package/editing/sharedTemplates/executor/builders/support/builderUtils.js +1 -1
  129. package/editing/sharedTemplates/executor/builders/twoPointLines.js +1 -1
  130. package/editing/sharedTemplates/executor/createTemplateExecutor.js +1 -1
  131. package/editing/sharedTemplates/executor/support/createServiceEdit.js +1 -1
  132. package/editing/sharedTemplates/executor/support/executorUtils.js +1 -1
  133. package/editing/sharedTemplates/templateDefinitions/GroupTemplateDefinition.js +1 -1
  134. package/editing/sharedTemplates/templateDefinitions/PresetTemplateDefinition.js +1 -1
  135. package/editing/sharedTemplates/templateDefinitions/parts/builders/builderUtils.js +1 -1
  136. package/editing/templateUtils.js +1 -1
  137. package/geometry/operators/extendOperator.js +1 -1
  138. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  139. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  140. package/geometry/operators/gx/operatorBuffer.js +1 -1
  141. package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
  142. package/geometry/operators/gx/operatorIntegrate.js +1 -1
  143. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  144. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  145. package/geometry/operators/gx/operatorOffset.js +1 -1
  146. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  147. package/geometry/operators/gx/operatorSimplify.js +1 -1
  148. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  149. package/geometry/operators/gx/operatorUnion.js +1 -1
  150. package/geometry/operators/isNearOperator.js +1 -1
  151. package/geometry/operators/json/disjointOperator.js +1 -1
  152. package/geometry/operators/projectOperator.js +1 -1
  153. package/geometry/operators/reshapeOperator.js +1 -1
  154. package/geometry/operators/shapePreservingProjectOperator.js +1 -1
  155. package/geometry/operators/support/apiConverter.js +1 -1
  156. package/geometry/operators/support/initNoPeFactory.js +1 -1
  157. package/geometry/operators/support/jsonConverter.js +1 -1
  158. package/geometry/support/DoubleArray.js +1 -1
  159. package/geometry/support/UCharArray.js +5 -0
  160. package/geometry/support/UShortArray.js +5 -0
  161. package/interfaces.d.ts +117 -67
  162. package/layers/VectorTileLayer.js +1 -1
  163. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  164. package/layers/mixins/operationalLayers.js +1 -1
  165. package/layers/save/featureLayerUtils.js +1 -1
  166. package/layers/save/utils.js +1 -1
  167. package/layers/support/SubtypeSublayer.js +1 -1
  168. package/layers/support/commonProperties.js +1 -1
  169. package/layers/support/rasterFunctions/stretchUtils.js +1 -1
  170. package/layers/support/wmsUtils.js +1 -1
  171. package/networks/Network.js +1 -1
  172. package/networks/RulesTable.js +1 -1
  173. package/networks/UtilityNetwork.js +1 -1
  174. package/networks/support/typeUtils.js +1 -1
  175. package/package.json +3 -3
  176. package/portal/Portal.js +1 -1
  177. package/renderers/support/RasterSymbolizer.js +1 -1
  178. package/rest/print.js +1 -1
  179. package/support/revision.js +1 -1
  180. package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
  181. package/views/2d/engine/webgl/meshing/Mesh.js +1 -1
  182. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
  183. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  184. package/views/2d/layers/LayerView2D.js +1 -1
  185. package/views/2d/layers/MapNotesLayerView2D.js +1 -1
  186. package/views/2d/layers/RouteLayerView2D.js +1 -1
  187. package/views/2d/layers/features/FeatureContainer.js +1 -1
  188. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  189. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  190. package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +1 -1
  191. package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
  192. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  193. package/views/2d/layers/support/HighlightCounter.js +1 -1
  194. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  195. package/views/3d/layers/I3SMeshView3D.js +1 -1
  196. package/views/3d/layers/MediaLayerView3D.js +1 -1
  197. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  198. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  199. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  200. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  201. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  202. package/views/3d/layers/graphics/GraphicsCorePerformanceInfo.js +1 -1
  203. package/views/3d/layers/i3s/I3SBinaryReader.js +1 -1
  204. package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
  205. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  206. package/views/3d/layers/i3s/I3SNodeLoader.js +1 -1
  207. package/views/3d/layers/i3s/PointCloudWorkerUtil.js +1 -1
  208. package/views/3d/layers/support/DefinitionExpressionSceneLayerView.js +1 -1
  209. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  210. package/views/3d/support/DisplayQualityProfile.js +1 -1
  211. package/views/3d/support/QualitySettings.js +1 -1
  212. package/views/3d/terrain/OverlayManager.js +1 -1
  213. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  214. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  215. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  216. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  217. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  218. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  219. package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
  220. package/views/3d/webgl-engine/lib/textureUtils.js +1 -1
  221. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  222. package/views/SceneView.js +1 -1
  223. package/views/layers/LayerView.js +1 -1
  224. package/views/support/Scheduler.js +1 -1
  225. package/views/webgl/Parameters.js +1 -1
  226. package/views/webgl/RenderingContext.js +1 -1
  227. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  228. package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.js +1 -1
  229. package/widgets/AreaMeasurement2D.js +1 -1
  230. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  231. package/widgets/BatchAttributeForm/ReactiveGraphic.js +1 -1
  232. package/widgets/BatchAttributeForm/inputs/EditableInput.js +1 -1
  233. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  234. package/widgets/BatchAttributeForm/inputs/GroupInput.js +1 -1
  235. package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
  236. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  237. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  238. package/widgets/BatchAttributeForm.js +1 -1
  239. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
  240. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
  241. package/widgets/DistanceMeasurement2D.js +1 -1
  242. package/widgets/Editor/AddAssociationWorkflow.js +5 -0
  243. package/widgets/Editor/AddAssociationWorkflowData.js +5 -0
  244. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  245. package/widgets/Editor/CreateFeaturesWorkflowData.js +1 -1
  246. package/widgets/Editor/EditorViewModel.js +1 -1
  247. package/widgets/Editor/UpdateWorkflow.js +1 -1
  248. package/widgets/Editor/UpdateWorkflowData.js +1 -1
  249. package/widgets/Editor/components/PendingFeatureList.js +1 -1
  250. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  251. package/widgets/Editor/modelUploadUtils.js +1 -1
  252. package/widgets/Editor/workflowUtils.js +1 -1
  253. package/widgets/Editor.js +1 -1
  254. package/widgets/Feature/FeatureUtilityNetworkAssociationList.js +1 -1
  255. package/widgets/Feature/FeatureUtilityNetworkAssociations.js +1 -1
  256. package/widgets/Feature/FeatureViewModel.js +1 -1
  257. package/widgets/Feature/support/featureUtils.js +1 -1
  258. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
  259. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +5 -0
  260. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js +5 -0
  261. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  262. package/widgets/FeatureForm/UtilityNetworkAssociationAddAssociationViewModel.js +5 -0
  263. package/widgets/FeatureForm/UtilityNetworkAssociationInput.js +1 -1
  264. package/widgets/FeatureForm.js +1 -1
  265. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  266. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  267. package/widgets/OrientedImageryViewer/constants.js +1 -1
  268. package/widgets/OrientedImageryViewer/galleryUtils.js +5 -0
  269. package/widgets/OrientedImageryViewer/utils.js +1 -1
  270. package/widgets/OrientedImageryViewer.js +1 -1
  271. package/widgets/Sketch/support/sketchUtils.js +1 -1
  272. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.d.ts +2 -2
  273. package/widgets/support/FilterBuilder/FilterBuilderViewModel.js +1 -1
  274. package/widgets/support/FilterBuilder.js +1 -1
  275. package/widgets/support/FilterCondition/FilterConditionViewModel.js +1 -1
  276. package/widgets/support/FilterCondition.js +1 -1
  277. package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +5 -0
  278. package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationList.js +1 -1
  279. package/widgets/support/UtilityNetworkAssociations/utilityNetworkUtils.js +1 -1
  280. package/assets/esri/core/workers/chunks/08c4b585290efc98ca5d.js +0 -1
  281. package/assets/esri/core/workers/chunks/117e7a12af77c761efb5.js +0 -1
  282. package/assets/esri/core/workers/chunks/324a5547c64a3bae670d.js +0 -1
  283. package/assets/esri/core/workers/chunks/4be5e453fe54f5631659.js +0 -1
  284. package/assets/esri/core/workers/chunks/5be7cf1564e756c24066.js +0 -1
  285. package/assets/esri/core/workers/chunks/6d79ec15d1858839f576.js +0 -1
  286. package/assets/esri/core/workers/chunks/7966c245a073c85f04b1.js +0 -1
  287. package/assets/esri/core/workers/chunks/8bd51b5b392dfacc922f.js +0 -1
  288. package/assets/esri/core/workers/chunks/9c6380af3bc3130658e1.js +0 -1
  289. package/assets/esri/core/workers/chunks/b18620fc15707e4413a1.js +0 -1
  290. package/assets/esri/core/workers/chunks/b765670b47d209d7655a.js +0 -2
  291. package/assets/esri/core/workers/chunks/c249ad935f54d3b49ae3.js +0 -1
  292. package/assets/esri/core/workers/chunks/c7927c2d5414f19defd5.js +0 -1
  293. package/assets/esri/core/workers/chunks/d27a199fd8e2ade69254.js +0 -1
  294. package/assets/esri/core/workers/chunks/f9070edd8e0b2a57af79.js +0 -1
  295. package/assets/esri/core/workers/chunks/faf9063420262ea40fd8.js +0 -1
  296. package/chunks/Bufferer-DjC-SKTJ.js +0 -5
  297. package/chunks/Distance2DCalculator-8-JrFGHH.js +0 -5
  298. package/editing/sharedTemplates/support/sharedTemplateUtils.js +0 -5
  299. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationSettings.js +0 -5
  300. package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.d.ts +0 -4
  301. package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +0 -5
@@ -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{readOffsetDistance as t,readIsProportional as e,readVertexBeforeOffset as r,readDistance as s,getHeightUnitCorrectionFactor as o,makeFeatureFromGroupPart as n}from"./support/builderUtils.js";import{offset as a}from"./support/offsetUtils.js";import{getSegmentLength3d as i,getSegmentLength as p,pointAlongLineWithZAndOffset as l,pointAlongLineAndOffset as f,offsetPointFromSegment as c}from"./support/shapeUtils.js";import{maxDigitizingDisplayEdits as h,isPolyline as u}from"../support/executorUtils.js";import m from"../../../../geometry/Multipoint.js";import{e as g}from"../../../../chunks/intersectsOperator.js";import{fromSpatialReference as y}from"../../../../geometry/operators/support/apiConverter.js";function d(t){if(b(t)&&"digitizing"!==t.mode)return j(t)}async function j({templatePart:u,parentTemplate:m,shape:d,edits:j,relationships:b,mode:M}){const{builderConfig:P}=u,U=t(P),Z=e(P),V=r(P),k=s(P,Z),w=V||0===U?d:a(d,U);if(null===w)return;const x=m.layer.createQuery();x.geometry=w,x.spatialRelationship="intersects",x.returnM=!0,x.returnZ=!0,x.outSpatialReference=w.spatialReference,x.cacheHint=!1,x.returnGeometry=!0,x.historicMoment=m.layer.historicMoment,x.gdbVersion=m.layer.gdbVersion;const C=2*(y(w.spatialReference)?.getTolerance()??.001);x.distance=C;const{features:S}=await m.layer.queryFeatures(x);if(0===S.length)return;const T=[];for(const t of S)T.push(R(t.geometry));const q=o(w);let v=0,z=0;for(let t=0;t<w.paths.length&&!(j.length>h);t++){const e=w.paths[t].length;for(let r=0;r<e;r++){let s=w.getPoint(t,r);if(null!=s){for(const o of T)if(g(s,o)){if(r>0&&0!==k&&(v+=w.hasZ?i(w.paths[t][r-1],w.paths[t][r],q):p(w.paths[t][r-1],w.paths[t][r])),0!==k){let o=1;if(Z){const s=k<0?r-1:r+1;if(s>=e||s<0)return;o=w.hasZ?i(w.paths[t][r],w.paths[t][s],q):p(w.paths[t][r],w.paths[t][s])}const n=v+o*k;s=w.hasZ?l(w,n,U,q):f(w,n,U)}else 0!==U&&(s=c(s,r===e-1?[w.paths[t][r-1],w.paths[t][r]]:[w.paths[t][r],w.paths[t][r+1]],U));s&&n({templatePart:u,shape:s,edits:j,relationships:b,mode:M},`V${z.toString()}`);break}z++}}}}function R(t){const e=[];for(const r of t.paths)for(const t of r)e.push([...t]);return new m({spatialReference:t.spatialReference,points:e})}function b(t){return null!=t.templatePart&&null!=t.shape&&u(t.shape)}const M=!0;export{d as execute,M as isAsync};
5
+ import{readOffsetDistance as t,readIsProportional as e,readVertexBeforeOffset as r,readDistance as s,getHeightUnitCorrectionFactor as o,makeFeatureFromGroupPart as n}from"./support/builderUtils.js";import{offset as a}from"./support/offsetUtils.js";import{getSegmentLength3d as i,getSegmentLength as p,pointAlongLineWithZAndOffset as l,pointAlongLineAndOffset as f,offsetPointFromSegment as c}from"./support/shapeUtils.js";import{maxDigitizingDisplayEdits as h,isPolyline as u}from"../support/executorUtils.js";import m from"../../../../geometry/Multipoint.js";import{e as g}from"../../../../chunks/intersectsOperator.js";import{fromSpatialReference as y}from"../../../../geometry/operators/support/apiConverter.js";function d(t){if(b(t)&&"digitizing"!==t.mode)return j(t)}async function j({templatePart:u,parentTemplate:m,shape:d,edits:j,relationships:b,mode:M}){const{builderConfig:U}=u,Z=t(U),P=e(U),T=r(U),V=s(U,P),k=T||0===Z?d:a(d,Z);if(null===k)return;const w=m.layer.createQuery();w.geometry=k,w.spatialRelationship="intersects",w.returnM=!0,w.returnZ=!0,w.outSpatialReference=k.spatialReference,w.cacheHint=!1,w.returnGeometry=!0,w.historicMoment=m.layer.historicMoment,w.gdbVersion=m.layer.gdbVersion;const x=2*(y(k.spatialReference)?.getTolerance()??.001);w.distance=x;const{features:C}=await m.layer.queryFeatures(w);if(0===C.length)return;const S=[];for(const t of C)S.push(R(t.geometry));const q=o(k);let v=0,z=0;for(let t=0;t<k.paths.length&&!(j.length>h);t++){const e=k.paths[t].length;for(let r=0;r<e;r++){let s=k.getPoint(t,r);if(null!=s){for(const o of S)if(g(s,o)){if(r>0&&0!==V&&(v+=k.hasZ?i(k.paths[t][r-1],k.paths[t][r],q):p(k.paths[t][r-1],k.paths[t][r])),0!==V){let o=1;if(P){const s=V<0?r-1:r+1;if(s>=e||s<0)return;o=k.hasZ?i(k.paths[t][r],k.paths[t][s],q):p(k.paths[t][r],k.paths[t][s])}const n=v+o*V;s=k.hasZ?l(k,n,Z,q):f(k,n,Z)}else 0!==Z&&(s=c(s,r===e-1?[k.paths[t][r-1],k.paths[t][r]]:[k.paths[t][r],k.paths[t][r+1]],Z));s&&n({templatePart:u,shape:s,edits:j,relationships:b,mode:M},`V${z.toString()}`);break}z++}}}}function R(t){const e=[];for(const r of t.paths)for(const t of r)e.push([...t]);return new m({spatialReference:t.spatialReference,points:e})}function b(t){return null!=t.parentTemplate&&u(t.shape)}const M=!0;export{d as execute,M as isAsync};
@@ -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{readOffsetDistance as t,readIsProportional as e,readVertexBeforeOffset as o,readDistance as s}from"./support/builderUtils.js";import{lineVerticesOffset as r,VertexPlacement as i}from"./support/offsetUtils.js";import{isPolyline as n}from"../support/executorUtils.js";function p({templatePart:p,shape:l,edits:f,relationships:a,mode:m}){if(null===p||null===l||!n(l))return;const u=l,{builderConfig:c}=p,d=t(c),h=e(c),x=o(c),P=s(c,h);r({templatePart:p,edits:f,relationships:a,shape:u,distance:P,isProportional:h,offsetDistance:d,vertexBeforeOffset:x,vertexPlacement:i.NotBeginning,mode:m})}const l=!1;export{p as execute,l as isAsync};
5
+ import{readOffsetDistance as t,readIsProportional as e,readVertexBeforeOffset as o,readDistance as s}from"./support/builderUtils.js";import{lineVerticesOffset as r,VertexPlacement as i}from"./support/offsetUtils.js";import{isPolyline as p}from"../support/executorUtils.js";function n({templatePart:n,shape:f,edits:a,relationships:l,mode:m}){if(!p(f))return;const u=f,{builderConfig:c}=n,d=t(c),h=e(c),x=o(c),P=s(c,h);r({templatePart:n,edits:a,relationships:l,shape:u,distance:P,isProportional:h,offsetDistance:d,vertexBeforeOffset:x,vertexPlacement:i.NotBeginning,mode:m})}const f=!1;export{n as execute,f as isAsync};
@@ -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{readOffsetDistance as t,readIsProportional as e,readVertexBeforeOffset as o,readDistance as s}from"./support/builderUtils.js";import{lineVerticesOffset as r,VertexPlacement as i}from"./support/offsetUtils.js";import{isPolyline as p}from"../support/executorUtils.js";function l({templatePart:l,shape:n,edits:f,relationships:a,mode:m}){if(null===l||null===n||!p(n))return;const u=n,{builderConfig:d}=l,c=t(d),h=e(d),x=o(d),P=s(d,h);r({templatePart:l,edits:f,relationships:a,shape:u,distance:P,isProportional:h,offsetDistance:c,vertexBeforeOffset:x,vertexPlacement:i.NotEnd,mode:m})}const n=!1;export{l as execute,n as isAsync};
5
+ import{readOffsetDistance as t,readIsProportional as e,readVertexBeforeOffset as o,readDistance as s}from"./support/builderUtils.js";import{lineVerticesOffset as r,VertexPlacement as i}from"./support/offsetUtils.js";import{isPolyline as p}from"../support/executorUtils.js";function f({templatePart:f,shape:n,edits:a,relationships:l,mode:m}){if(!p(n))return;const d=n,{builderConfig:u}=f,c=t(u),h=e(u),x=o(u),P=s(u,h);r({templatePart:f,edits:a,relationships:l,shape:d,distance:P,isProportional:h,offsetDistance:c,vertexBeforeOffset:x,vertexPlacement:i.NotEnd,mode:m})}const n=!1;export{f as execute,n as isAsync};
@@ -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{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{isPolygon as e}from"../support/executorUtils.js";function o({templatePart:o,shape:r,edits:s,relationships:i,mode:p}){if(null===o||null===r||!e(r))return;const{centroid:l}=r;l&&t({templatePart:o,shape:l,edits:s,relationships:i,mode:p})}const r=!1;export{o as execute,r as isAsync};
5
+ import{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{isPolygon as e}from"../support/executorUtils.js";function o({templatePart:o,shape:r,edits:s,relationships:i,mode:p}){if(!e(r))return;const{centroid:a}=r;a&&t({templatePart:o,shape:a,edits:s,relationships:i,mode:p})}const r=!1;export{o as execute,r as isAsync};
@@ -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{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{sameStartEndPoint as e,pointFromPolygonVertex as o}from"./support/shapeUtils.js";import{isPolygon as s,maxDigitizingDisplayEdits as r}from"../support/executorUtils.js";function i({templatePart:i,shape:l,edits:n,relationships:p,mode:m}){if(null===i||null===l||!s(l))return;let a=0;const{rings:u}=l;for(let s=0;s<u.length;s++){const h=u[s],f=h.length,g=0===s?1:0,c=e(h)?f-1:f;for(let e=g;e<c&&!("digitizing"===m&&n.length>r);e++){const r=o(l,s,e);t({templatePart:i,shape:r,edits:n,relationships:p,mode:m},`V${(a+e).toString()}`)}a+=f}}const l=!1;export{i as execute,l as isAsync};
5
+ import{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{sameStartEndPoint as e,pointFromPolygonVertex as o}from"./support/shapeUtils.js";import{isPolygon as s,maxDigitizingDisplayEdits as r}from"../support/executorUtils.js";function i({templatePart:i,shape:p,edits:n,relationships:l,mode:m}){if(!s(p))return;let a=0;const{rings:h}=p;for(let s=0;s<h.length;s++){const f=h[s],g=f.length,u=0===s?1:0,c=e(f)?g-1:g;for(let e=u;e<c&&!("digitizing"===m&&n.length>r);e++){const r=o(p,s,e);t({templatePart:i,shape:r,edits:n,relationships:l,mode:m},`V${(a+e).toString()}`)}a+=g}}const p=!1;export{i as execute,p as isAsync};
@@ -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{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{pointFromPolygonVertex as e}from"./support/shapeUtils.js";import{isPolygon as r}from"../support/executorUtils.js";function s({templatePart:s,shape:o,edits:i,relationships:p,mode:l}){if(null===s||null===o||!r(o))return;const{rings:n}=o;for(let r=0;r<n.length;r++){if(n[r].length>0){const n=e(o,r,0);return void t({templatePart:s,shape:n,edits:i,relationships:p,mode:l},"V0")}}}const o=!1;export{s as execute,o as isAsync};
5
+ import{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{pointFromPolygonVertex as e}from"./support/shapeUtils.js";import{isPolygon as r}from"../support/executorUtils.js";function s({templatePart:s,shape:o,edits:i,relationships:p,mode:n}){if(!r(o))return;const{rings:l}=o;for(let r=0;r<l.length;r++){if(l[r].length>0){const l=e(o,r,0);return void t({templatePart:s,shape:l,edits:i,relationships:p,mode:n},"V0")}}}const o=!1;export{s as execute,o as isAsync};
@@ -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{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{isPoint as e}from"../support/executorUtils.js";function o({templatePart:o,shape:s,edits:p,relationships:r,mode:i}){null!==o&&null!==s&&e(s)&&t({templatePart:o,shape:s.clone(),edits:p,relationships:r,mode:i},"IDP1")}const s=!1;export{o as execute,s as isAsync};
5
+ import{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{isPoint as e}from"../support/executorUtils.js";function o({templatePart:o,shape:s,edits:p,relationships:r,mode:i}){e(s)&&t({templatePart:o,shape:s.clone(),edits:p,relationships:r,mode:i},"IDP1")}const s=!1;export{o as execute,s as isAsync};
@@ -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{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{isPoint as e}from"../support/executorUtils.js";function o({templatePart:o,shape:s,edits:p,relationships:r,mode:i}){null!==o&&null!==s&&e(s)&&t({templatePart:o,shape:s.clone(),edits:p,relationships:r,mode:i},"IDP1")}const s=!1;export{o as execute,s as isAsync};
5
+ import{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{isPoint as e}from"../support/executorUtils.js";function o({templatePart:o,shape:s,edits:p,relationships:r,mode:i}){e(s)&&t({templatePart:o,shape:s.clone(),edits:p,relationships:r,mode:i},"IDP1")}const s=!1;export{o as execute,s as isAsync};
@@ -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{makeFeatureFromGroupPart as s}from"./support/builderUtils.js";import{sameStartEndPoint as t}from"./support/shapeUtils.js";import{isPolygon as e,maxDigitizingDisplayEdits as o}from"../support/executorUtils.js";import i from"../../../../geometry/Polyline.js";function r({templatePart:r,shape:p,edits:n,relationships:l,mode:a}){if(null===r||null===p||!e(p))return;const f=p.clone(),h=[];for(const s of f.rings){const e=s.slice();t(s)||e.push(e[0].slice()),h.push(e)}if(h.length>0)for(const t of h){if("digitizing"===a&&n.length>o)break;const e=new i({paths:[t],spatialReference:f.spatialReference,hasZ:f.hasZ,hasM:f.hasM});s({templatePart:r,shape:e,edits:n,relationships:l,mode:a})}}const p=!1;export{r as execute,p as isAsync};
5
+ import{makeFeatureFromGroupPart as s}from"./support/builderUtils.js";import{sameStartEndPoint as t}from"./support/shapeUtils.js";import{isPolygon as e,maxDigitizingDisplayEdits as o}from"../support/executorUtils.js";import i from"../../../../geometry/Polyline.js";function r({templatePart:r,shape:p,edits:n,relationships:a,mode:l}){if(!e(p))return;const f=p.clone(),h=[];for(const s of f.rings){const e=s.slice();t(s)||e.push(e[0].slice()),h.push(e)}if(h.length>0)for(const t of h){if("digitizing"===l&&n.length>o)break;const e=new i({paths:[t],spatialReference:f.spatialReference,hasZ:f.hasZ,hasM:f.hasM});s({templatePart:r,shape:e,edits:n,relationships:a,mode:l})}}const p=!1;export{r as execute,p as isAsync};
@@ -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{makeFeatureFromGroupPart as s}from"./support/builderUtils.js";import{sameStartEndPoint as t,convertToTwoPoint as e}from"./support/shapeUtils.js";import{isPolygon as o,maxDigitizingDisplayEdits as i}from"../support/executorUtils.js";import r from"../../../../geometry/Polyline.js";function p({templatePart:p,shape:n,edits:l,relationships:a,mode:f}){if(null===p||null===n||!o(n))return;const h=[];for(const s of n.rings){const e=s.slice();t(s)||e.push(e[0].slice()),h.push(e)}if(h.length>0){const t=new r({paths:h,spatialReference:n.spatialReference,hasZ:n.hasZ,hasM:n.hasM}),o=e(t);for(const e of o){if("digitizing"===f&&l.length>i)break;s({templatePart:p,shape:e,edits:l,relationships:a,mode:f})}}}const n=!1;export{p as execute,n as isAsync};
5
+ import{makeFeatureFromGroupPart as s}from"./support/builderUtils.js";import{sameStartEndPoint as t,convertToTwoPoint as e}from"./support/shapeUtils.js";import{isPolygon as o,maxDigitizingDisplayEdits as i}from"../support/executorUtils.js";import r from"../../../../geometry/Polyline.js";function p({templatePart:p,shape:a,edits:n,relationships:l,mode:f}){if(!o(a))return;const h=[];for(const s of a.rings){const e=s.slice();t(s)||e.push(e[0].slice()),h.push(e)}if(h.length>0){const t=new r({paths:h,spatialReference:a.spatialReference,hasZ:a.hasZ,hasM:a.hasM}),o=e(t);for(const e of o){if("digitizing"===f&&n.length>i)break;s({templatePart:p,shape:e,edits:n,relationships:l,mode:f})}}}const a=!1;export{p as execute,a as isAsync};
@@ -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{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{isPolygon as e}from"../support/executorUtils.js";function o({templatePart:o,shape:s,edits:p,relationships:r,mode:i}){null!==o&&null!==s&&e(s)&&t({templatePart:o,shape:s.clone(),edits:p,relationships:r,mode:i})}const s=!1;export{o as execute,s as isAsync};
5
+ import{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{isPolygon as e}from"../support/executorUtils.js";function o({templatePart:o,shape:s,edits:p,relationships:r,mode:i}){e(s)&&t({templatePart:o,shape:s.clone(),edits:p,relationships:r,mode:i})}const s=!1;export{o as execute,s as isAsync};
@@ -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{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{isPolygon as e}from"../support/executorUtils.js";function o({templatePart:o,shape:s,edits:p,relationships:r,mode:i}){null!==o&&null!==s&&e(s)&&t({templatePart:o,shape:s.clone(),edits:p,relationships:r,mode:i})}const s=!1;export{o as execute,s as isAsync};
5
+ import{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{isPolygon as e}from"../support/executorUtils.js";function o({templatePart:o,shape:s,edits:p,relationships:r,mode:i}){e(s)&&t({templatePart:o,shape:s.clone(),edits:p,relationships:r,mode:i})}const s=!1;export{o as execute,s as isAsync};
@@ -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{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{sameStartEndPoint as i,pointFromPolygonVertex as e}from"./support/shapeUtils.js";import{isPolygon as s,maxDigitizingDisplayEdits as o}from"../support/executorUtils.js";function r({templatePart:r,shape:l,edits:n,relationships:p,mode:a}){if(null!==r&&null!==l&&s(l))for(let s=0;s<l.rings.length;s++){const g=l.rings[s],m=g.length,h=i(g)?m-1:m;if("digitizing"===a&&n.length>o)break;for(let i=0;i<h&&!("digitizing"===a&&n.length>o);i++){const o=e(l,s,i);t({templatePart:r,shape:o,edits:n,relationships:p,mode:a})}}}const l=!1;export{r as execute,l as isAsync};
5
+ import{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{sameStartEndPoint as i,pointFromPolygonVertex as e}from"./support/shapeUtils.js";import{isPolygon as s,maxDigitizingDisplayEdits as o}from"../support/executorUtils.js";function r({templatePart:r,shape:p,edits:n,relationships:l,mode:a}){if(s(p))for(let s=0;s<p.rings.length;s++){const g=p.rings[s],m=g.length,h=i(g)?m-1:m;if("digitizing"===a&&n.length>o)break;for(let i=0;i<h&&!("digitizing"===a&&n.length>o);i++){const o=e(p,s,i);t({templatePart:r,shape:o,edits:n,relationships:l,mode:a})}}}const p=!1;export{r as execute,p as isAsync};
@@ -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{getMetersPerVerticalUnitForSR as t,getMetersPerUnitForSR as o}from"../../../../../core/unitUtils.js";import{createPresetServiceEdit as r,createFeatureServiceEdit as n}from"../../support/createServiceEdit.js";import{isLoadedSharedTemplate as s,isPresetTemplate as i,isFeatureTemplate as a}from"../../../support/sharedTemplateUtils.js";import l from"../../../../../geometry/Polygon.js";import{isPoint as u,isPolygon as p}from"../../../../../geometry/support/jsonUtils.js";function f({edits:t,mode:o,relationships:l,shape:p,templatePart:f},c=""){if(null===f)return;const{template:m}=f;if(!s(m))throw new e("shared-template:template-not-loaded","A template part's template must be loaded before use");if(i(m)){if(!u(p))throw new e("shared-template:invalid-geometry","Preset templates must have a point geometry");r({geometry:p,template:m,edits:t,relationships:l,rotation:0,mode:o,tag:c})}else a(m)&&n({geometry:p,template:m,edits:t,relationships:l,tag:c})}function c(e,t){if(!e||!p(e))return null;if(!t.hasZ&&!t.hasM)return e;let o=null,r=null;const n=t.hasZ&&t.hasM?3:2;switch(t.type){case"point":o=t.hasZ?t.z:null,r=t.hasM?t.m:null;break;case"polygon":case"polyline":{const e="polygon"===t.type?t.rings:t.paths;for(const s of e)for(const e of s)t.hasZ&&(null===o||e[2]>o)&&(o=e[2]),t.hasM&&(null===r||e[n]>r)&&(r=e[n])}break;case"multipoint":for(const e of t.points)t.hasZ&&(null===o||e[2]>o)&&(o=e[2]),t.hasM&&(null===r||e[n]>r)&&(r=e[n]);break;default:return e}const s=Z(e.rings,t.hasZ,t.hasM,o,r);return new l({rings:s,spatialReference:e.spatialReference,hasZ:t.hasZ,hasM:t.hasM})}function m(e){let r=1;if(e.spatialReference.vcsWkid||e.spatialReference.latestVcsWkid){r=t(e.spatialReference)/o(e.spatialReference)}return r}function h(e){let t=!1;return void 0!==e.byNumber&&(t=!0===e.byNumber),t}function d(e){let t=0;return void 0!==e.count&&(t=e.count),t}function g(e,t){let o=0;return t?void 0!==e.proportional&&(o=e.proportional):void 0!==e.distanceValue&&(o=e.distanceValue),t&&(o/=100),o}function y(e){return!0===e.isProportional}function v(e){return!1!==e.createUnique}function b(e){let t=0;return void 0!==e.offsetDistance&&(t=e.offsetDistance),void 0!==e.side&&1===e.side&&(t*=-1),t}function M(e){return!0===e.vertexBeforeOffset}function Z(e,t,o,r,n){const s=[];for(const i of e)s.push(j(i,t,o,r,n));return s}function j(e,t,o,r,n){const s=[];for(const i of e){const e=[i[0],i[1]];t&&(e[2]=r),o&&(e[t?3:2]=n),s.push(e)}return s}export{c as correctZandMFollowingBuffer,m as getHeightUnitCorrectionFactor,f as makeFeatureFromGroupPart,h as readByNumber,d as readCount,g as readDistance,y as readIsProportional,v as readIsUnique,b as readOffsetDistance,M as readVertexBeforeOffset};
5
+ import e from"../../../../../core/Error.js";import{getMetersPerVerticalUnitForSR as t,getMetersPerUnitForSR as o}from"../../../../../core/unitUtils.js";import{isLoadedSharedTemplate as n,isSharedPresetTemplate as r,isSharedFeatureTemplate as s}from"../../../../templateUtils.js";import{createPresetServiceEdit as i,createFeatureServiceEdit as a}from"../../support/createServiceEdit.js";import l from"../../../../../geometry/Polygon.js";import{isPoint as u,isPolygon as f}from"../../../../../geometry/support/jsonUtils.js";function p({edits:t,mode:o,relationships:l,shape:f,templatePart:p},c=""){if(null===p)return;const{template:m}=p;if(!n(m))throw new e("shared-template:template-not-loaded","A template part's template must be loaded before use");if(r(m)){if(!u(f))throw new e("shared-template:invalid-geometry","Preset templates must have a point geometry");i({geometry:f,template:m,edits:t,relationships:l,rotation:0,mode:o,tag:c})}else s(m)&&a({geometry:f,template:m,edits:t,relationships:l,tag:c})}function c(e,t){if(!e||!f(e))return null;if(!t.hasZ&&!t.hasM)return e;let o=null,n=null;const r=t.hasZ&&t.hasM?3:2;switch(t.type){case"point":o=t.hasZ?t.z:null,n=t.hasM?t.m:null;break;case"polygon":case"polyline":{const e="polygon"===t.type?t.rings:t.paths;for(const s of e)for(const e of s)t.hasZ&&(null===o||e[2]>o)&&(o=e[2]),t.hasM&&(null===n||e[r]>n)&&(n=e[r])}break;case"multipoint":for(const e of t.points)t.hasZ&&(null===o||e[2]>o)&&(o=e[2]),t.hasM&&(null===n||e[r]>n)&&(n=e[r]);break;default:return e}const s=Z(e.rings,t.hasZ,t.hasM,o,n);return new l({rings:s,spatialReference:e.spatialReference,hasZ:t.hasZ,hasM:t.hasM})}function m(e){let n=1;if(e.spatialReference.vcsWkid||e.spatialReference.latestVcsWkid){n=t(e.spatialReference)/o(e.spatialReference)}return n}function h(e){let t=!1;return void 0!==e.byNumber&&(t=!0===e.byNumber),t}function d(e){let t=0;return void 0!==e.count&&(t=e.count),t}function g(e,t){let o=0;return t?void 0!==e.proportional&&(o=e.proportional):void 0!==e.distanceValue&&(o=e.distanceValue),t&&(o/=100),o}function y(e){return!0===e.isProportional}function v(e){return!1!==e.createUnique}function b(e){let t=0;return void 0!==e.offsetDistance&&(t=e.offsetDistance),void 0!==e.side&&1===e.side&&(t*=-1),t}function M(e){return!0===e.vertexBeforeOffset}function Z(e,t,o,n,r){const s=[];for(const i of e)s.push(j(i,t,o,n,r));return s}function j(e,t,o,n,r){const s=[];for(const i of e){const e=[i[0],i[1]];t&&(e[2]=n),o&&(e[t?3:2]=r),s.push(e)}return s}export{c as correctZandMFollowingBuffer,m as getHeightUnitCorrectionFactor,p as makeFeatureFromGroupPart,h as readByNumber,d as readCount,g as readDistance,y as readIsProportional,v as readIsUnique,b as readOffsetDistance,M as readVertexBeforeOffset};
@@ -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{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{convertToTwoPoint as o}from"./support/shapeUtils.js";import{isPolyline as s,maxDigitizingDisplayEdits as e}from"../support/executorUtils.js";function i({templatePart:i,shape:r,edits:p,relationships:l,mode:n}){if(null===i||null===r||!s(r))return;const a=o(r);for(const o of a){if("digitizing"===n&&p.length>e)break;t({templatePart:i,shape:o,edits:p,relationships:l,mode:n})}}const r=!1;export{i as execute,r as isAsync};
5
+ import{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{convertToTwoPoint as o}from"./support/shapeUtils.js";import{isPolyline as s,maxDigitizingDisplayEdits as e}from"../support/executorUtils.js";function i({templatePart:i,shape:r,edits:p,relationships:a,mode:m}){if(!s(r))return;const n=o(r);for(const o of n){if("digitizing"===m&&p.length>e)break;t({templatePart:i,shape:o,edits:p,relationships:a,mode:m})}}const r=!1;export{i as execute,r as isAsync};
@@ -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/Error.js";import{isPromiseLike as e}from"../../../core/promiseUtils.js";import{createFeatureServiceEdit as r,createPresetServiceEdit as o}from"./support/createServiceEdit.js";import{calculateExtent as n,groupEditsByLayer as i}from"./support/executorUtils.js";import{getBuilder as s}from"./support/getBuilder.js";import{isLoadedSharedTemplate as p,isFeatureTemplate as a,isGroupTemplate as l,isPresetTemplate as m}from"../support/sharedTemplateUtils.js";import{isPoint as u}from"../../../geometry/support/jsonUtils.js";async function c(e){if(!p(e))throw new t("template-executor:template-not-loaded","The template must be loaded before it can be executed.");if(a(e))return f(e);if(l(e))return d(e);if(m(e))return y(e);throw new t("template-executor:unsupported-template-type","The template type is not supported.")}function f(t){return e=>{const o=[],s=[];r({geometry:e,template:t,edits:o,relationships:s});const p=n(o);return{edits:i(o),relationships:s,primary:o[0]??null,featureExtent:p,rotationPoint:p?.center??null}}}async function d(t){const r=await Promise.all(t.definition.allParts.map(h));return(o,s)=>{const p=[],a=[],l=()=>{const t=n(p);return{edits:i(p),relationships:a,primary:p[0]??null,featureExtent:t,rotationPoint:t?.center??null}},m=r.map((e=>e({edits:p,mode:s,parentTemplate:t,relationships:a,shape:o}))).filter(e);return 0===m.length?l():Promise.all(m).then((()=>l()))}}async function h(t){const e=await s(t.builderType);return r=>e.execute({...r,templatePart:t})}function y(e){return(r,s,p=0)=>{if(!u(r))throw new t("template-executor:invalid-input-geometry","The input goemetry for a preset template must be a point.");const a=[],l=[],m=o({geometry:r,template:e,edits:a,relationships:l,rotation:p,mode:s});return{edits:i(a),relationships:l,primary:a[0]??null,featureExtent:n(a),rotationPoint:m}}}export{c as createTemplateExecutor};
5
+ import t from"../../../core/Error.js";import e from"../../../core/Logger.js";import{isPromiseLike as r}from"../../../core/promiseUtils.js";import{isLoadedSharedTemplate as o,isSharedFeatureTemplate as n,isSharedGroupTemplate as i,isSharedPresetTemplate as s}from"../../templateUtils.js";import{createFeatureServiceEdit as p,createPresetServiceEdit as a}from"./support/createServiceEdit.js";import{calculateExtent as l,groupEditsByLayer as m}from"./support/executorUtils.js";import{getBuilder as u}from"./support/getBuilder.js";import{isPoint as c}from"../../../geometry/support/jsonUtils.js";const f=()=>e.getLogger("esri.editing.sharedTemplates.executor.createTemplateExecutor");async function d(e){if(!o(e))throw new t("template-executor:template-not-loaded","The template must be loaded before it can be executed.");if(n(e))return h(e);if(i(e))return y(e);if(s(e))return x(e);throw new t("template-executor:unsupported-template-type","The template type is not supported.")}function h(t){return e=>{const r=[],o=[];p({geometry:e,template:t,edits:r,relationships:o});const n=l(r);return{edits:m(r),relationships:o,primary:r[0]??null,featureExtent:n,rotationPoint:n?.center??null}}}async function y(t){const e=await Promise.all(t.definition.allParts.map(g));return(o,n)=>{const i=[],s=[],p=()=>{const t=l(i);return{edits:m(i),relationships:s,primary:i[0]??null,featureExtent:t,rotationPoint:t?.center??null}};if(null==o)return f().warn("No geometry provided to group template executor. Result will be empty."),p();const a=e.map((e=>e({edits:i,mode:n,parentTemplate:t,relationships:s,shape:o}))).filter(r);return 0===a.length?p():Promise.all(a).then((()=>p()))}}async function g(t){const e=await u(t.builderType);return r=>e.execute({...r,templatePart:t})}function x(e){return(r,o,n=0)=>{if(!c(r))throw new t("template-executor:invalid-input-geometry","The input goemetry for a preset template must be a point.");const i=[],s=[],p=a({geometry:r,template:e,edits:i,relationships:s,rotation:n,mode:o});return{edits:m(i),relationships:s,primary:i[0]??null,featureExtent:l(i),rotationPoint:p}}}export{d as createTemplateExecutor};
@@ -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"../../../../Graphic.js";import t from"../../../../core/Error.js";import{generateUUID as s}from"../../../../core/uuid.js";import{isRadial as a,maxDigitizingDisplayEdits as i}from"./executorUtils.js";import{isLoadedSharedTemplate as n,isFeatureTemplate as o,isPresetTemplate as r}from"../../support/sharedTemplateUtils.js";import l from"../../../../geometry/Multipoint.js";import h from"../../../../geometry/Point.js";import p from"../../../../geometry/Polygon.js";import f from"../../../../geometry/Polyline.js";import{execute as u}from"../../../../geometry/operators/affineTransformOperator.js";import c from"../../../../geometry/operators/support/Transformation.js";function m({edits:s,geometry:i,relationships:n,tag:o="",template:r}){if(a(i)){const e=i.geometry.clone();for(const t of e.paths){m({geometry:new f({spatialReference:e.spatialReference,paths:[t],hasZ:e.hasZ,hasM:e.hasM}),template:r,edits:s,relationships:n,tag:o})}return}const{definition:l,layer:h}=r;i=d(i,h);const p=new e({geometry:i,attributes:l.defaultValues?{...l.defaultValues}:{}});if(h.globalIdField&&(p.attributes[h.globalIdField]=M()),s.push({id:h.layerId,graphic:p,tag:o,layer:h}),0!==l.relationships.length)for(const a of l.relationships||[]){if(null==a.relationshipMetadata||null==a.template?.definition)throw new t("shared-template:missing-relationship-metadata-or-definition","Relationship part must have metadata and a fully loaded template with definition");const{definition:i,layer:o}=a.template,r=new e({attributes:i.defaultValues?{...i.defaultValues}:{}});o.globalIdField&&(r.attributes[o.globalIdField]=M()),s.push({graphic:r,id:o.layerId,tag:"",layer:o}),n.push({...a.relationshipMetadata,sourceGraphic:p,destinationGraphic:r})}}function g({edits:e,geometry:s,mode:a,relationships:l,rotation:h,tag:p="",template:f}){const{definition:d}=f,y=s.x-d.origin.x,Z=s.y-d.origin.y,M=d.origin.hasZ&&s.hasZ?s.z-d.origin.z:0,R=b(d.origin.clone(),y,Z,M),w=(new c).rotate(h,R.x,R.y);for(const c of d.parts){if(e.length>i&&"digitizing"===a)break;const h=c.template;if(!n(h))throw new t("shared-template:template-not-loaded","A template part's template must be loaded before use");if(o(h)){let t=b(c.geometry,y,Z,M);w.isIdentity||(t=u(t,w)),m({edits:e,geometry:t,relationships:l,tag:p,template:h})}else if(r(h)){const t=[];if(g({edits:w.isIdentity?t:e,geometry:s,mode:a,relationships:l,rotation:0,tag:p,template:h}),!w.isIdentity)for(const s of t){const{geometry:t}=s.graphic;t&&"mesh"!==t.type&&(s.graphic.geometry=u(t,w),e.push(s))}}}return R}function d(e,t){if(!e)return null;if(e.hasZ===t.hasZ&&e.hasM===t.hasM)return e;switch(e.type){case"point":return new h({spatialReference:e.spatialReference,x:e.x,y:e.y,...t.hasZ?e.hasZ?{z:e.z}:{z:R(t)}:{},...t.hasM?e.hasM?{m:e.m}:{m:w(t)??void 0}:{}});case"polygon":return new p({spatialReference:e.spatialReference,rings:y(e.rings,t.hasZ,t.hasM,R(t),w(t),e.hasM?e.hasZ?3:2:-1,e.hasZ?2:-1),hasZ:t.hasZ,hasM:t.hasM});case"polyline":return new f({spatialReference:e.spatialReference,paths:y(e.paths,t.hasZ,t.hasM,R(t),w(t),e.hasM?e.hasZ?3:2:-1,e.hasZ?2:-1),hasZ:t.hasZ,hasM:t.hasM});case"multipoint":return new l({spatialReference:e.spatialReference,hasZ:t.hasZ,hasM:t.hasM,points:Z(e.points,t.hasZ,t.hasM,R(t),w(t),e.hasM?e.hasZ?3:2:-1,e.hasZ?2:-1)});default:return e}}function y(e,t,s,a,i,n,o){const r=[];for(const l of e)r.push(Z(l,t,s,a,i,n,o));return r}function Z(e,t,s,a,i,n,o){const r=[];for(const l of e){const e=[l[0],l[1]];t&&(e[2]=o>-1?l[2]:a),s&&(e[t?3:2]=n>-1?l[n]:i),r.push(e)}return r}function M(){return`{${s()}}`.toUpperCase()}function R(e){return e.capabilities.editing?.zDefault??0}function w(e){return e.capabilities.editing.supportsUpdateWithoutM?void 0:0}function b(e,t,s,a=0){if(!e)return null;if("point"===e.type)return new h({spatialReference:e.spatialReference,x:e.x+t,y:e.y+s,...e.hasZ?{z:e.z+a}:{},...e.hasM?{m:e.m}:{}});if("multipoint"===e.type){const i=[];if(e.hasZ&&e.hasM)for(let n=0;n<e.points.length;n++){const o=e.points[n];i.push([o[0]+t,o[1]+s,o[2]+a,o[3]])}else if(e.hasZ)for(let n=0;n<e.points.length;n++){const o=e.points[n];i.push([o[0]+t,o[1]+s,o[2]+a])}else if(e.hasM)for(let a=0;a<e.points.length;a++){const n=e.points[a];i.push([n[0]+t,n[1]+s,n[2]])}else for(let a=0;a<e.points.length;a++){const n=e.points[a];i.push([n[0]+t,n[1]+s])}return new l({spatialReference:e.spatialReference,hasZ:e.hasZ,hasM:e.hasM,points:i})}if("polygon"===e.type){const i=new p({spatialReference:e.spatialReference,hasZ:e.hasZ,hasM:e.hasM});for(let n=0;n<e.rings.length;n++){const o=e.rings[n],r=[];if(e.hasZ&&e.hasM)for(let e=0;e<o.length;e++)r.push([o[e][0]+t,o[e][1]+s,o[e][2]+a,o[e][3]]);else if(e.hasM)for(let e=0;e<o.length;e++)r.push([o[e][0]+t,o[e][1]+s,o[e][2]]);else if(e.hasZ)for(let e=0;e<o.length;e++)r.push([o[e][0]+t,o[e][1]+s,o[e][2]+a]);else for(let e=0;e<o.length;e++)r.push([o[e][0]+t,o[e][1]+s]);i.addRing(r)}return i}if("polyline"===e.type){const i=new f({spatialReference:e.spatialReference,hasZ:e.hasZ,hasM:e.hasM});for(let n=0;n<e.paths.length;n++){const o=e.paths[n],r=[];if(e.hasZ&&e.hasM)for(let e=0;e<o.length;e++)r.push([o[e][0]+t,o[e][1]+s,o[e][2]+a,o[e][3]]);else if(e.hasZ)for(let e=0;e<o.length;e++)r.push([o[e][0]+t,o[e][1]+s,o[e][2]+a]);else if(e.hasM)for(let e=0;e<o.length;e++)r.push([o[e][0]+t,o[e][1]+s,o[e][2]]);else for(let e=0;e<o.length;e++)r.push([o[e][0]+t,o[e][1]+s]);i.addPath(r)}return i}return e.clone()}export{m as createFeatureServiceEdit,g as createPresetServiceEdit,M as generateGlobalId,b as translate};
5
+ import e from"../../../../Graphic.js";import t from"../../../../core/Error.js";import{generateUUID as s}from"../../../../core/uuid.js";import{isLoadedSharedTemplate as a,isSharedFeatureTemplate as i,isSharedPresetTemplate as r}from"../../../templateUtils.js";import{isRadial as o,maxDigitizingDisplayEdits as n}from"./executorUtils.js";import l from"../../../../geometry/Multipoint.js";import h from"../../../../geometry/Point.js";import p from"../../../../geometry/Polygon.js";import f from"../../../../geometry/Polyline.js";import{execute as u}from"../../../../geometry/operators/affineTransformOperator.js";import c from"../../../../geometry/operators/support/Transformation.js";import{isSubtypeGroupLayer as m}from"../../../../layers/support/layerUtils.js";function g({edits:s,geometry:a,relationships:i,tag:r="",template:n}){if(o(a)){const e=a.geometry.clone();for(const t of e.paths){g({geometry:new f({spatialReference:e.spatialReference,paths:[t],hasZ:e.hasZ,hasM:e.hasM}),template:n,edits:s,relationships:i,tag:r})}return}const{definition:l,layer:h}=n;a=y(a,h);const p=new e({attributes:l.defaultValues?{...l.defaultValues}:{},geometry:a,sourceLayer:h});if(x(p,h),h.globalIdField&&(p.attributes[h.globalIdField]=R()),s.push({id:h.layerId,graphic:p,tag:r,layer:h}),0!==l.relationships.length)for(const o of l.relationships||[]){if(null==o.relationshipMetadata||null==o.template?.definition)throw new t("shared-template:missing-relationship-metadata-or-definition","Relationship part must have metadata and a fully loaded template with definition");const{definition:a,layer:r}=o.template,n=new e({attributes:a.defaultValues?{...a.defaultValues}:{},sourceLayer:r});x(n,r),r.globalIdField&&(n.attributes[r.globalIdField]=R()),s.push({graphic:n,id:r.layerId,tag:"",layer:r}),i.push({...o.relationshipMetadata,sourceGraphic:p,destinationGraphic:n})}}function d({edits:e,geometry:s,mode:o,relationships:l,rotation:h,tag:p="",template:f}){const{definition:m}=f,y=s.x-m.origin.x,Z=s.y-m.origin.y,M=m.origin.hasZ&&s.hasZ?s.z-m.origin.z:0,R=j(m.origin.clone(),y,Z,M),w=(new c).rotate(h,R.x,R.y);for(const c of m.parts){if(e.length>n&&"digitizing"===o)break;const h=c.template;if(!a(h))throw new t("shared-template:template-not-loaded","A template part's template must be loaded before use");if(i(h)){let t=j(c.geometry,y,Z,M);w.isIdentity||(t=u(t,w)),g({edits:e,geometry:t,relationships:l,tag:p,template:h})}else if(r(h)){const t=[];if(d({edits:w.isIdentity?t:e,geometry:s,mode:o,relationships:l,rotation:0,tag:p,template:h}),!w.isIdentity)for(const s of t){const{geometry:t}=s.graphic;t&&"mesh"!==t.type&&(s.graphic.geometry=u(t,w),e.push(s))}}}return R}function y(e,t){if(!e)return null;if(e.hasZ===t.hasZ&&e.hasM===t.hasM)return e;switch(e.type){case"point":return new h({spatialReference:e.spatialReference,x:e.x,y:e.y,...t.hasZ?e.hasZ?{z:e.z}:{z:w(t)}:{},...t.hasM?e.hasM?{m:e.m}:{m:b(t)??void 0}:{}});case"polygon":return new p({spatialReference:e.spatialReference,rings:Z(e.rings,t.hasZ,t.hasM,w(t),b(t),e.hasM?e.hasZ?3:2:-1,e.hasZ?2:-1),hasZ:t.hasZ,hasM:t.hasM});case"polyline":return new f({spatialReference:e.spatialReference,paths:Z(e.paths,t.hasZ,t.hasM,w(t),b(t),e.hasM?e.hasZ?3:2:-1,e.hasZ?2:-1),hasZ:t.hasZ,hasM:t.hasM});case"multipoint":return new l({spatialReference:e.spatialReference,hasZ:t.hasZ,hasM:t.hasM,points:M(e.points,t.hasZ,t.hasM,w(t),b(t),e.hasM?e.hasZ?3:2:-1,e.hasZ?2:-1)});default:return e}}function Z(e,t,s,a,i,r,o){const n=[];for(const l of e)n.push(M(l,t,s,a,i,r,o));return n}function M(e,t,s,a,i,r,o){const n=[];for(const l of e){const e=[l[0],l[1]];t&&(e[2]=o>-1?l[2]:a),s&&(e[t?3:2]=r>-1?l[r]:i),n.push(e)}return n}function R(){return`{${s()}}`.toUpperCase()}function w(e){return e.capabilities.editing?.zDefault??0}function b(e){return e.capabilities.editing.supportsUpdateWithoutM?void 0:0}function j(e,t,s,a=0){if(!e)return null;if("point"===e.type)return new h({spatialReference:e.spatialReference,x:e.x+t,y:e.y+s,...e.hasZ?{z:e.z+a}:{},...e.hasM?{m:e.m}:{}});if("multipoint"===e.type){const i=[];if(e.hasZ&&e.hasM)for(let r=0;r<e.points.length;r++){const o=e.points[r];i.push([o[0]+t,o[1]+s,o[2]+a,o[3]])}else if(e.hasZ)for(let r=0;r<e.points.length;r++){const o=e.points[r];i.push([o[0]+t,o[1]+s,o[2]+a])}else if(e.hasM)for(let a=0;a<e.points.length;a++){const r=e.points[a];i.push([r[0]+t,r[1]+s,r[2]])}else for(let a=0;a<e.points.length;a++){const r=e.points[a];i.push([r[0]+t,r[1]+s])}return new l({spatialReference:e.spatialReference,hasZ:e.hasZ,hasM:e.hasM,points:i})}if("polygon"===e.type){const i=new p({spatialReference:e.spatialReference,hasZ:e.hasZ,hasM:e.hasM});for(let r=0;r<e.rings.length;r++){const o=e.rings[r],n=[];if(e.hasZ&&e.hasM)for(let e=0;e<o.length;e++)n.push([o[e][0]+t,o[e][1]+s,o[e][2]+a,o[e][3]]);else if(e.hasM)for(let e=0;e<o.length;e++)n.push([o[e][0]+t,o[e][1]+s,o[e][2]]);else if(e.hasZ)for(let e=0;e<o.length;e++)n.push([o[e][0]+t,o[e][1]+s,o[e][2]+a]);else for(let e=0;e<o.length;e++)n.push([o[e][0]+t,o[e][1]+s]);i.addRing(n)}return i}if("polyline"===e.type){const i=new f({spatialReference:e.spatialReference,hasZ:e.hasZ,hasM:e.hasM});for(let r=0;r<e.paths.length;r++){const o=e.paths[r],n=[];if(e.hasZ&&e.hasM)for(let e=0;e<o.length;e++)n.push([o[e][0]+t,o[e][1]+s,o[e][2]+a,o[e][3]]);else if(e.hasZ)for(let e=0;e<o.length;e++)n.push([o[e][0]+t,o[e][1]+s,o[e][2]+a]);else if(e.hasM)for(let e=0;e<o.length;e++)n.push([o[e][0]+t,o[e][1]+s,o[e][2]]);else for(let e=0;e<o.length;e++)n.push([o[e][0]+t,o[e][1]+s]);i.addPath(n)}return i}return e.clone()}function x(e,t){m(t)&&(e.sourceLayer=t.findSublayerForFeature(e))}export{g as createFeatureServiceEdit,d as createPresetServiceEdit,R as generateGlobalId,j as translate};
@@ -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{getOrCreateMapValue as e}from"../../../../core/MapUtils.js";import n from"../../../../geometry/Extent.js";const t=100;function r(e){return"point"===e.type}function o(e){return"polygon"===e.type}function i(e){return"polyline"===e.type}function u(e){return!!e&&"radial"===e.type}function a(e){let t=null;for(const o of e)if(o.graphic.geometry){const e=o.graphic.geometry,i=r(e)?new n({spatialReference:e.spatialReference,xmin:e.x,xmax:e.x,ymax:e.y,ymin:e.y}):e.extent;t=null==t?i?.clone():t.union(i.extent)}return t}function c(n){const t=new Map;for(const r of n)e(t,r.id,(()=>({id:r.id,addFeatures:[]}))).addFeatures?.push(r.graphic);return[...t.values()]}export{a as calculateExtent,c as groupEditsByLayer,r as isPoint,o as isPolygon,i as isPolyline,u as isRadial,t as maxDigitizingDisplayEdits};
5
+ import{getOrCreateMapValue as e}from"../../../../core/MapUtils.js";import t from"../../../../geometry/Extent.js";const n=100;function o(e){return"point"===e.type}function r(e){return"polygon"===e.type}function i(e){return"polyline"===e.type}function l(e){return!!e&&"radial"===e.type}function a(e){let n=null;for(const r of e)if(r.graphic.geometry){const e=r.graphic.geometry,i=o(e)?new t({spatialReference:e.spatialReference,xmin:e.x,xmax:e.x,ymax:e.y,ymin:e.y}):e.extent;n=null==n?i?.clone():n.union(i.extent)}return n}function c(t){const n=new Map;for(const o of t)e(n,o.id,(()=>({addFeatures:[],id:o.id,identifierFields:{globalIdField:o.layer.globalIdField,objectIdField:o.layer.objectIdField}}))).addFeatures?.push(o.graphic);return[...n.values()]}export{a as calculateExtent,c as groupEditsByLayer,o as isPoint,r as isPolygon,i as isPolyline,l as isRadial,n as maxDigitizingDisplayEdits};
@@ -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{_ as t}from"../../../chunks/tslib.es6.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{TemplateDefinitionBase as e}from"./TemplateDefinitionBase.js";import{GroupTemplatePart as s}from"./parts/GroupTemplatePart.js";let p=class extends e{constructor(t){super(t),this.type="group",this.createUtilityNetworkAssociations=!1,this.parts=[]}get allParts(){return[this.basePart,...this.parts]}};t([r({readOnly:!0})],p.prototype,"type",void 0),t([r()],p.prototype,"allParts",null),t([r({readOnly:!0,type:s})],p.prototype,"basePart",void 0),t([r({readOnly:!0})],p.prototype,"createUtilityNetworkAssociations",void 0),t([r({readOnly:!0,type:[s]})],p.prototype,"parts",void 0),p=t([o("esri.editing.sharedTemplates.templateDefinitions.GroupTemplateDefinition")],p);export{p as GroupTemplateDefinition};
5
+ import{_ as t}from"../../../chunks/tslib.es6.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as e}from"../../../core/accessorSupport/decorators/subclass.js";import{TemplateDefinitionBase as o}from"./TemplateDefinitionBase.js";import{GroupTemplatePart as s}from"./parts/GroupTemplatePart.js";import{builderInputGeometryTypes as p}from"./parts/builders/builderUtils.js";let i=class extends o{constructor(t){super(t),this.type="group",this.createUtilityNetworkAssociations=!1,this.parts=[]}get allParts(){return[this.basePart,...this.parts]}get inputGeometryType(){return p[this.basePart.builderType]}};t([r({readOnly:!0})],i.prototype,"type",void 0),t([r()],i.prototype,"allParts",null),t([r({readOnly:!0,type:s})],i.prototype,"basePart",void 0),t([r({readOnly:!0})],i.prototype,"createUtilityNetworkAssociations",void 0),t([r()],i.prototype,"inputGeometryType",null),t([r({readOnly:!0,type:[s]})],i.prototype,"parts",void 0),i=t([e("esri.editing.sharedTemplates.templateDefinitions.GroupTemplateDefinition")],i);export{i as GroupTemplateDefinition};
@@ -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{_ as e}from"../../../chunks/tslib.es6.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import{TemplateDefinitionBase as o}from"./TemplateDefinitionBase.js";import{PresetTemplatePart as s}from"./parts/PresetTemplatePart.js";import p from"../../../geometry/Point.js";import a from"../../../geometry/SpatialReference.js";let i=class extends o{constructor(e){super(e),this.type="preset",this.parts=[]}get allParts(){return this.parts}};e([t({readOnly:!0})],i.prototype,"type",void 0),e([t()],i.prototype,"allParts",null),e([t({readOnly:!0,type:p})],i.prototype,"origin",void 0),e([t({readOnly:!0,type:[s],json:{name:"features"}})],i.prototype,"parts",void 0),e([t({readOnly:!0,type:a})],i.prototype,"spatialReference",void 0),i=e([r("esri.editing.sharedTemplates.templateDefinitions.PresetTemplateDefinition")],i);export{i as PresetTemplateDefinition};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import{TemplateDefinitionBase as o}from"./TemplateDefinitionBase.js";import{PresetTemplatePart as s}from"./parts/PresetTemplatePart.js";import p from"../../../geometry/Point.js";import i from"../../../geometry/SpatialReference.js";let a=class extends o{constructor(e){super(e),this.type="preset",this.parts=[]}get allParts(){return this.parts}};e([t({readOnly:!0})],a.prototype,"type",void 0),e([t()],a.prototype,"allParts",null),e([t({readOnly:!0,type:p})],a.prototype,"origin",void 0),e([t({readOnly:!0,type:[s],json:{name:"features"}})],a.prototype,"parts",void 0),e([t({type:i})],a.prototype,"spatialReference",void 0),a=e([r("esri.editing.sharedTemplates.templateDefinitions.PresetTemplateDefinition")],a);export{a as PresetTemplateDefinition};
@@ -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{JSONMap as i}from"../../../../../core/jsonMap.js";const n=new i({esri_editing_transformation_bufferLineToPolygon:"buffer-line-to-polygon",esri_editing_transformation_bufferPointToPolygon:"buffer-point-to-polygon",esri_editing_transformation_bufferPolygonToPolygon:"buffer-polygon-to-polygon",esri_editing_transformation_connectionPoint:"connection-point",esri_editing_transformation_equallySpaced:"equally-spaced",esri_editing_transformation_offsetLine:"offset-line",esri_editing_transformation_offsetPrimaryLine:"offset-primary-line",esri_editing_transformation_pointAtAllVerticesOfLine:"point-at-all-vertices-of-line",esri_editing_transformation_pointAtBeginningOfLine:"point-at-beginning-of-line",esri_editing_transformation_pointAtBeginningOfRadial:"point-at-beginning-of-radial",esri_editing_transformation_pointAtEndOfLine:"point-at-end-of-line",esri_editing_transformation_pointAtInteriorVertices:"point-at-interior-vertices",esri_editing_transformation_pointAtIntersectionVerticesOfLine:"point-at-intersection-vertices-of-line",esri_editing_transformation_pointAtNotBeginningOfLine:"point-at-not-beginning-of-line",esri_editing_transformation_pointAtNotEndOfLine:"point-at-not-end-of-line",esri_editing_transformation_pointAtPolygonCentroid:"point-at-polygon-centroid",esri_editing_transformation_pointAtPolygonNotStart:"point-at-polygon-not-start",esri_editing_transformation_pointAtPolygonStart:"point-at-polygon-start",esri_editing_transformation_pointIdentity:"point-identity",esri_editing_transformation_pointPrimaryIdentity:"point-primary-identity",esri_editing_transformation_polygonBoundary:"polygon-boundary",esri_editing_transformation_polygonBoundaryTwoPoint:"polygon-boundary-two-point",esri_editing_transformation_polygonIdentity:"polygon-identity",esri_editing_transformation_polygonPrimaryIdentity:"polygon-primary-identity",esri_editing_transformation_polygonVertices:"polygon-vertices",esri_editing_transformation_radialLines:"radial-lines",esri_editing_transformation_twoPointLines:"two-point-lines"});export{n as builderTypesKebabDict};
5
+ import{JSONMap as n}from"../../../../../core/jsonMap.js";const i=new n({esri_editing_transformation_bufferLineToPolygon:"buffer-line-to-polygon",esri_editing_transformation_bufferPointToPolygon:"buffer-point-to-polygon",esri_editing_transformation_bufferPolygonToPolygon:"buffer-polygon-to-polygon",esri_editing_transformation_connectionPoint:"connection-point",esri_editing_transformation_equallySpaced:"equally-spaced",esri_editing_transformation_offsetLine:"offset-line",esri_editing_transformation_offsetPrimaryLine:"offset-primary-line",esri_editing_transformation_pointAtAllVerticesOfLine:"point-at-all-vertices-of-line",esri_editing_transformation_pointAtBeginningOfLine:"point-at-beginning-of-line",esri_editing_transformation_pointAtBeginningOfRadial:"point-at-beginning-of-radial",esri_editing_transformation_pointAtEndOfLine:"point-at-end-of-line",esri_editing_transformation_pointAtInteriorVertices:"point-at-interior-vertices",esri_editing_transformation_pointAtIntersectionVerticesOfLine:"point-at-intersection-vertices-of-line",esri_editing_transformation_pointAtNotBeginningOfLine:"point-at-not-beginning-of-line",esri_editing_transformation_pointAtNotEndOfLine:"point-at-not-end-of-line",esri_editing_transformation_pointAtPolygonCentroid:"point-at-polygon-centroid",esri_editing_transformation_pointAtPolygonNotStart:"point-at-polygon-not-start",esri_editing_transformation_pointAtPolygonStart:"point-at-polygon-start",esri_editing_transformation_pointIdentity:"point-identity",esri_editing_transformation_pointPrimaryIdentity:"point-primary-identity",esri_editing_transformation_polygonBoundary:"polygon-boundary",esri_editing_transformation_polygonBoundaryTwoPoint:"polygon-boundary-two-point",esri_editing_transformation_polygonIdentity:"polygon-identity",esri_editing_transformation_polygonPrimaryIdentity:"polygon-primary-identity",esri_editing_transformation_polygonVertices:"polygon-vertices",esri_editing_transformation_radialLines:"radial-lines",esri_editing_transformation_twoPointLines:"two-point-lines"}),o={"buffer-line-to-polygon":"polyline","buffer-point-to-polygon":"point","buffer-polygon-to-polygon":"polygon","connection-point":"polyline","equally-spaced":"polyline","offset-line":"polyline","offset-primary-line":"polyline","point-at-all-vertices-of-line":"polyline","point-at-beginning-of-line":"polyline","point-at-beginning-of-radial":"polyline","point-at-end-of-line":"polyline","point-at-interior-vertices":"polyline","point-at-intersection-vertices-of-line":"polyline","point-at-not-beginning-of-line":"polyline","point-at-not-end-of-line":"polyline","point-at-polygon-centroid":"polygon","point-at-polygon-not-start":"polygon","point-at-polygon-start":"polygon","point-identity":"point","point-primary-identity":"point","polygon-boundary":"polygon","polygon-boundary-two-point":"polygon","polygon-identity":"polygon","polygon-primary-identity":"polygon","polygon-vertices":"polygon","radial-lines":"polyline","two-point-lines":"polyline"};export{o as builderInputGeometryTypes,i as builderTypesKebabDict};
@@ -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{Z as e}from"../chunks/languageUtils.js";import{getOrCreateMapValue as t}from"../core/MapUtils.js";import{throwIfAborted as r}from"../core/promiseUtils.js";import{addMaybe as n}from"../core/SetUtils.js";import{isSubtypeGroupLayer as a,isFeatureLayer as s}from"../layers/support/layerUtils.js";import{getServices as o}from"../undoredo/support/Services.js";function i(e){return"prototype"in e}function p(e){return u(e)&&!("definition"in e)}function l(e){return u(e)&&"definition"in e}function u(e){return"templateId"in e}const f=e=>{if(null==e||"object"!=typeof e)return[];return[..."templates"in e&&Array.isArray(e.templates)?e.templates:[],..."types"in e&&Array.isArray(e.types)?e.types.flatMap((e=>e.templates)):[]]};async function c(e,t,r){if(null==t)return e.map((e=>({layer:e,templates:f(e)})));const n=await d(e,t),a=new Map,s=Array.from(n).map((e=>y({serviceInfo:e,out:a,signal:r,view:t})));return await Promise.all(s),e.map((e=>({layer:e,templates:a.get(e)??f(e)})))}async function y({serviceInfo:e,out:t,signal:n}){const{featureService:s,layersAndTables:o}=e,i=await m({featureService:s,layers:o.toArray(),signal:n});r(n);for(const[r,p]of i.entries())if(0!==p.length)if(a(r)){const e=w(p),n=[],a=e.get(1/0)??n;for(const s of r.sublayers){const r=e.get(s.subtypeCode)??n;t.set(s,[...r,...a])}}else t.set(r,p)}async function m({featureService:e,layers:r,signal:n}){if(!e.capabilities?.editing.supportsSharedTemplates)return new Map;const a=new Map(r.map((e=>[e.layerId,e]))),s=await e.querySharedTemplates({query:{layers:Array.from(a.keys())},requestOptions:{signal:n}}),o=new Map;for(const i of s)for(const e of i.layerIds)a.has(e)&&t(o,a.get(e),(()=>[])).push(i);return o}async function d(e,t){const r=await o(t).load(),a=new Set;for(const s of e)n(a,g(r,s));return await Promise.all(Array.from(a).map((e=>e.featureService.load()))),a}function g(t,r){return e(r)&&r.parent?t.tablesAndLayersLookup.get(r.parent):s(r)?t.tablesAndLayersLookup.get(r):null}function w(e){const r=new Map;for(const n of e)t(r,n.subtypeCode??1/0,(()=>[])).push(n);return r}export{f as getAllStandardFeatureTemplatesForLayer,g as getServiceInfoForLayer,c as getTemplatesForLayers,l as isSharedTemplate,p as isSharedTemplateMetadata,u as isSharedTemplateOrMetadata,i as isStandardFeatureTemplate};
5
+ import{Z as e}from"../chunks/languageUtils.js";import t from"../core/Logger.js";import{getOrCreateMapValue as r}from"../core/MapUtils.js";import{throwIfAborted as n}from"../core/promiseUtils.js";import{addMaybe as i}from"../core/SetUtils.js";import{isFeatureTemplateDefinition as o,isGroupTemplateDefinition as s,isPresetTemplateDefinition as a}from"./sharedTemplates/templateDefinitions/templateDefinitionUtils.js";import{isSubtypeGroupLayer as l,isFeatureLayer as f}from"../layers/support/layerUtils.js";import{getServices as u}from"../undoredo/support/Services.js";const p=()=>t.getLogger("esri.editing.templateUtils");function c(e){return null!=e&&"prototype"in e}function m(e){return d(e)&&!("definition"in e)}function y(e){return d(e)&&"definition"in e}function d(e){return null!=e&&"templateId"in e}function g(e){return y(e)&&"feature"===e?.type&&(null==e.definition||o(e.definition))}function w(e){return y(e)&&"group"===e?.type&&(null==e.definition||s(e.definition))}function A(e){return y(e)&&"preset"===e?.type&&(null==e.definition||a(e.definition))}function h(e){return y(e)&&null!=e?.definition}const j=e=>{if(null==e||"object"!=typeof e)return[];return[..."templates"in e&&Array.isArray(e.templates)?e.templates:[],..."types"in e&&Array.isArray(e.types)?e.types.flatMap((e=>e.templates)):[]]};async function v(e,t,r){if(null==t)return e.map((e=>({layer:e,templates:j(e)})));const i=await M(e,t);n(r);const o=new Map,s=Array.from(i).map((e=>S({serviceInfo:e,out:o,signal:r,view:t}))),a=await Promise.allSettled(s);for(const n of a.filter((e=>"rejected"===e.status)))p().warn("Failed to fetch shared templates for service. Will use standard templates if available.",n.reason);return e.map((e=>({layer:e,templates:o.get(e)??j(e)})))}async function S({serviceInfo:e,out:t,signal:r}){const{featureService:i,layersAndTables:o}=e,s=await b({featureService:i,layers:o.toArray(),signal:r});n(r);for(const[n,a]of s.entries())if(0!==a.length)if(l(n)){const e=L(a),r=[],i=e.get(1/0)??r;for(const o of n.sublayers){const n=e.get(o.subtypeCode)??r;t.set(o,[...n,...i])}}else t.set(n,a)}async function b({featureService:e,layers:t,signal:n}){if(!e.capabilities?.editing.supportsSharedTemplates)return new Map;const i=new Map(t.map((e=>[e.layerId,e]))),o=await e.querySharedTemplates({query:{layers:Array.from(i.keys())},requestOptions:{signal:n}}),s=new Map;for(const a of o)for(const e of a.layerIds)i.has(e)&&r(s,i.get(e),(()=>[])).push(a);return s}async function M(e,t){const r=await u(t).load(),n=new Set;for(const o of e)i(n,U(r,o));return await Promise.all(Array.from(n).map((e=>e.featureService.load()))),n}function U(t,r){return e(r)&&r.parent?t.tablesAndLayersLookup.get(r.parent):f(r)?t.tablesAndLayersLookup.get(r):null}function L(e){const t=new Map;for(const n of e)r(t,n.subtypeCode??1/0,(()=>[])).push(n);return t}export{j as getAllStandardFeatureTemplatesForLayer,U as getServiceInfoForLayer,v as getTemplatesForLayers,h as isLoadedSharedTemplate,g as isSharedFeatureTemplate,w as isSharedGroupTemplate,A as isSharedPresetTemplate,y as isSharedTemplate,m as isSharedTemplateMetadata,d as isSharedTemplateOrMetadata,c as isStandardFeatureTemplate};
@@ -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 as e,l as t,G as n,b as r}from"../../chunks/Geometry.js";import{Envelope2D as o}from"../../chunks/Envelope2D.js";import{a as s,P as a,A as i,B as g}from"../../chunks/Envelope.js";import{S as u,j as m}from"../../chunks/QuadraticBezier.js";import{getSpatialReference as c,fromPolyline as l,fromSpatialReference as p,toPolyline as d}from"./support/apiConverter.js";function h(t,n,r,a,i){if(t.isEmpty()||n.isEmpty())return null;if(8&a&&16&a)return null;2&a&&4&a&&e("");const g=new o,u=new o;t.queryEnvelope(g),n.queryEnvelope(u),g.mergeEnvelope2D(u);return f(t,n,s(r,g,!0).total(),a)}function f(e,o,s,i){t(e),t(o);let g,c=!1;const l=e.querySegmentIterator(),p=o.querySegmentIterator();let d=0;const h=new u,f=new a({vd:e.getDescription()}),P=new a({vd:e.getDescription()}),S=[],x=[];for(y(e,S,x);l.nextPath();){let t=!0,o=0;for(;2!==o;){if(0===o){l.nextSegment().getGeometryType()!==n.enumLine&&r(""),o++}else{l.resetToLastSegment();if(l.previousSegment().getGeometryType()!==n.enumLine&&r(""),c&&t){const n=l.getPathIndex();g.addSegmentsFromPath(e,n,0,e.getSegmentCountPath(n),!0),t=!1}o++}let a=!1;if(d<x.length){const e=x[S[d]],t=l.getPathIndex();if(e.m_path===t){const t=1===o?l.getStartPointIndex():l.getEndPointIndex();e.m_pointIndex===t&&(a=!0,d++)}}if(1===o){if(8&i)continue}else if(16&i)continue;if(!a){1===o?l.previousSegment():l.nextSegment();const a=1===o?l.nextSegment():l.previousSegment(),u=a,d=u.calculateLength2D();p.resetToFirstPath();let y=!1,S=Number.NaN;for(;p.nextPath();){for(;p.hasNextSegment();){const e=p.nextSegment();e.getGeometryType()!==n.enumLine&&r("");const t=e,{bIntersect:a,t1:i,t2:g}=m(u,t);if(a){const e=t.calculateLength2D();if(g*e>=-s&&(1-g)*e>=-s)if(1===o){if(i*d<=-s)(Number.isNaN(S)||i>S)&&(S=i);else if(i*d<=s){S=Number.NaN,y=!0;break}}else if((1-i)*d<=-s)(Number.isNaN(S)||i<S)&&(S=i);else if((1-i)*d<=s){S=Number.NaN,y=!0;break}}}if(y)break}if(!Number.isNaN(S)){if(!c){g=e.createInstance();for(let t=0;t<l.getPathIndex();t++)g.addPath(e,t,!0)}if(1===o){a.queryCoord(S,f);const n=l.getPathIndex();if(2&i?e.getPointByVal(e.getPathStart(n),P):4&i&&P.setEmpty(),1&i||(h.create(a.getGeometryType()),a.copyTo(h.get()),h.get().setEnd(f),h.get().reverse(),g.addSegment(h.get(),!0),t=!1),g.addSegmentsFromPath(e,n,0,e.getSegmentCountPath(n),t),1&i){const e=g.getPathStart(n);g.setPointByVal(e,f)}if(2&i||4&i){const e=g.getPathStart(n),t=f.getXY();P.setXY(t),g.setPointByVal(e,P)}c=!0,t=!1}else{const n=l.getPathIndex();if(t&&(g.addSegmentsFromPath(e,n,0,e.getSegmentCountPath(n),!0),t=!1),2&i?e.getPointByVal(e.getPathEnd(n)-1,P):4&i&&P.setEmpty(),a.queryCoord(S,f),1&i){const e=g.getPathEnd(n);g.setPointByVal(e-1,f)}else h.create(a.getGeometryType()),a.copyTo(h.get()),h.get().setEnd(f),g.addSegment(h.get(),!1);if(2&i||4&i){const e=g.getPathEnd(n),t=f.getXY();P.setXY(t),g.setPointByVal(e-1,P)}c=!0}}}}}return c?g:null}function P(e,t){return{m_path:e,m_pointIndex:t}}function y(e,t,n){const r=[],o=[],s=e.querySegmentIterator();for(;s.nextPath();){s.resetToFirstSegment();const e=s.nextSegment().getStartXY(),t=s.getPathIndex(),n=s.getStartPointIndex();r.push(e),o.push(P(t,n)),s.resetToLastSegment();const a=s.previousSegment().getEndXY(),i=s.getPathIndex(),g=s.getEndPointIndex();r.push(a),o.push(P(i,g))}const a=new i(0);for(let i=0;i<r.length;i++)a.add(i);const u={userSort(e,t,n){n.sort(e,t,((e,t)=>r[e].compare(r[t])))},getValue:e=>r[e].y};(new g).sort(a,0,a.size(),u);for(let i=0;i<a.size()-1;i++){const e=r[a.read(i)];if(e.equals(r[a.read(i+1)])){do{const e=o[a.read(i)];n.push(e),i++}while(i<a.size()&&e.equals(r[a.read(i)]));i--}}t.length=n.length;for(let i=0;i<n.length;i++)t[i]=i;t.sort(((e,t)=>{const r=n[e],o=n[t];return r.m_path<o.m_path?-1:r.m_path>o.m_path?1:r.m_pointIndex<o.m_pointIndex?-1:1}))}class S{getOperatorType(){return 10007}supportsCurves(){return!1}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}execute(e,t,n,r,o){return h(e,t,n,r)}}const x=new S;function E(e,t,n){let r=0;n&&(n.relocateEnds&&(r|=1),n.keepEndAttributes&&(r|=2),n.noEndAttributes&&(r|=4),n.noExtendAtFrom&&(r|=8),n.noExtendAtTo&&(r|=16));const o=c(e),s=x.execute(l(e),l(t),p(o),r,null);return s?d(s,o):null}const I=x.supportsCurves();export{E as execute,I as supportsCurves};
5
+ import{t as e,l as t,G as n,b as r}from"../../chunks/Geometry.js";import{Envelope2D as o}from"../../chunks/Envelope2D.js";import{c as s,P as a,A as i,B as g}from"../../chunks/Envelope.js";import{S as m,j as u}from"../../chunks/QuadraticBezier.js";import{w as c}from"../../chunks/Point2D.js";import{getSpatialReference as l,fromPolyline as p,fromSpatialReference as d,toPolyline as h}from"./support/apiConverter.js";function f(t,n,r,a,i){if(t.isEmpty()||n.isEmpty())return null;if(8&a&&16&a)return null;2&a&&4&a&&e("");const g=new o,m=new o;t.queryEnvelope(g),n.queryEnvelope(m),g.mergeEnvelope2D(m);return P(t,n,s(r,g,!0).total(),a)}function P(e,o,s,i){t(e),t(o);let g,c=!1;const l=e.querySegmentIterator(),p=o.querySegmentIterator();let d=0;const h=new m,f=new a({vd:e.getDescription()}),P=new a({vd:e.getDescription()}),y=[],x=[];for(S(e,y,x);l.nextPath();){let t=!0,o=0;for(;2!==o;){if(0===o){l.nextSegment().getGeometryType()!==n.enumLine&&r(""),o++}else{l.resetToLastSegment();if(l.previousSegment().getGeometryType()!==n.enumLine&&r(""),c&&t){const n=l.getPathIndex();g.addSegmentsFromPath(e,n,0,e.getSegmentCountPath(n),!0),t=!1}o++}let a=!1;if(d<x.length){const e=x[y[d]],t=l.getPathIndex();if(e.m_path===t){const t=1===o?l.getStartPointIndex():l.getEndPointIndex();e.m_pointIndex===t&&(a=!0,d++)}}if(1===o){if(8&i)continue}else if(16&i)continue;if(!a){1===o?l.previousSegment():l.nextSegment();const a=1===o?l.nextSegment():l.previousSegment(),m=a,d=m.calculateLength2D();p.resetToFirstPath();let y=!1,S=Number.NaN;for(;p.nextPath();){for(;p.hasNextSegment();){const e=p.nextSegment();e.getGeometryType()!==n.enumLine&&r("");const t=e,{bIntersect:a,t1:i,t2:g}=u(m,t);if(a){const e=t.calculateLength2D();if(g*e>=-s&&(1-g)*e>=-s)if(1===o){if(i*d<=-s)(Number.isNaN(S)||i>S)&&(S=i);else if(i*d<=s){S=Number.NaN,y=!0;break}}else if((1-i)*d<=-s)(Number.isNaN(S)||i<S)&&(S=i);else if((1-i)*d<=s){S=Number.NaN,y=!0;break}}}if(y)break}if(!Number.isNaN(S)){if(!c){g=e.createInstance();for(let t=0;t<l.getPathIndex();t++)g.addPath(e,t,!0)}if(1===o){a.queryCoord(S,f);const n=l.getPathIndex();if(2&i?e.getPointByVal(e.getPathStart(n),P):4&i&&P.setEmpty(),1&i||(h.create(a.getGeometryType()),a.copyTo(h.get()),h.get().setEnd(f),h.get().reverse(),g.addSegment(h.get(),!0),t=!1),g.addSegmentsFromPath(e,n,0,e.getSegmentCountPath(n),t),1&i){const e=g.getPathStart(n);g.setPointByVal(e,f)}if(2&i||4&i){const e=g.getPathStart(n),t=f.getXY();P.setXY(t),g.setPointByVal(e,P)}c=!0,t=!1}else{const n=l.getPathIndex();if(t&&(g.addSegmentsFromPath(e,n,0,e.getSegmentCountPath(n),!0),t=!1),2&i?e.getPointByVal(e.getPathEnd(n)-1,P):4&i&&P.setEmpty(),a.queryCoord(S,f),1&i){const e=g.getPathEnd(n);g.setPointByVal(e-1,f)}else h.create(a.getGeometryType()),a.copyTo(h.get()),h.get().setEnd(f),g.addSegment(h.get(),!1);if(2&i||4&i){const e=g.getPathEnd(n),t=f.getXY();P.setXY(t),g.setPointByVal(e-1,P)}c=!0}}}}}return c?g:null}function y(e,t){return{m_path:e,m_pointIndex:t}}function S(e,t,n){const r=[],o=[],s=e.querySegmentIterator();for(;s.nextPath();){s.resetToFirstSegment();const e=s.nextSegment().getStartXY(),t=s.getPathIndex(),n=s.getStartPointIndex();r.push(e),o.push(y(t,n)),s.resetToLastSegment();const a=s.previousSegment().getEndXY(),i=s.getPathIndex(),g=s.getEndPointIndex();r.push(a),o.push(y(i,g))}const a=new i(0);for(let i=0;i<r.length;i++)a.add(i);const m={userSort(e,t,n){n.sort(e,t,((e,t)=>r[e].compare(r[t])))},getValue:e=>r[e].y};(new g).sort(a,0,a.size(),m);for(let i=0;i<a.size()-1;i++){const e=r[a.read(i)];if(e.equals(r[a.read(i+1)])){do{const e=o[a.read(i)];n.push(e),i++}while(i<a.size()&&e.equals(r[a.read(i)]));i--}}c(t,n.length,0);for(let i=0;i<n.length;i++)t[i]=i;t.sort(((e,t)=>{const r=n[e],o=n[t];return r.m_path<o.m_path?-1:r.m_path>o.m_path?1:r.m_pointIndex<o.m_pointIndex?-1:1}))}class x{getOperatorType(){return 10007}supportsCurves(){return!1}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}execute(e,t,n,r,o){return f(e,t,n,r)}}const E=new x;function I(e,t,n){let r=0;n&&(n.relocateEnds&&(r|=1),n.keepEndAttributes&&(r|=2),n.noEndAttributes&&(r|=4),n.noExtendAtFrom&&(r|=8),n.noExtendAtTo&&(r|=16));const o=l(e),s=E.execute(p(e),p(t),d(o),r,null);return s?h(s,o):null}const N=E.supportsCurves();export{I as execute,N as supportsCurves};
@@ -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{G as t,S as e}from"../../../chunks/SimpleGeometryCursor.js";import{l as i,d as n,i as s,G as o,t as r,g as h}from"../../../chunks/Geometry.js";import{m as d,P as g,i as a,u as c,n as l,b as u,j as f,v as m}from"../../../chunks/Point2D.js";import{a as p,M as E,r as x,h as P}from"../../../chunks/QuadraticBezier.js";function _(t,e,i,n,s,o){const r=n-e;if(r<=o)return P(t,e,i,n,s),i;const h=w(t,e,n,s,Math.min(Math.max(r>>1,3),100)),d=t[h];t[e]=u(t[h],t[h]=t[e]);let g=e+1,a=!1;for(let c=e+1;c!==n;++c)s(t[c],d)&&(t[g]=u(t[c],t[c]=t[g]),++g,a=!0);if(!a)for(let c=e+1;c<i;++c)s(d,t[c])||(c!==g&&(t[g]=u(t[c],t[c]=t[g])),++g);return--g,t[g]=u(t[e],t[e]=t[g]),g}function F(t,e,i){const n=Math.trunc(e/2);let s=BigInt(n);const o=BigInt(e);for(let h=0;h<i;++h)t.push(Number(s%o)),s=6364136223846793005n*s+1442695040888963407n&0x7fffffffffffffffn,s=BigInt.asUintN(64,s);m(t);const r=c(t,((t,e)=>t===e));t.length=r}function w(t,e,i,n,s){const o=[];F(o,i-e,s);const r=[];for(let d=0,g=o.length;d<g;d++){const i=o[d];r.push(l(t[e+i],i))}const h=Math.trunc(r.length/2);return r.sort(((t,e)=>n(t.first,e.first)?-1:1)),e+r[h].second}function k(){return{p:new g,userData:Number.NaN,edge:null}}class T{constructor(){this.info=0,this.mask=!1,this.p=null,this.a=[null,null],this.twin=null}nextFreeEdge(){return this.twin}setIndex(t){this.info=t,this.mask=!1}getIndex(){return this.info}setMask(){this.mask=!0}getMask(){return this.mask}}function y(t,e){return{first:t,second:e}}function b(t,e){t.first=e.first,t.second=e.second}function C(){return this.i1-this.i0}function D(){return{i0:Number.NaN,i1:Number.NaN,nextFreeEdgeIndex:[-1],box:[y(null,null),y(null,null)],size:C}}function I(){return{k:0,pTask:null,pTask0:null,pTask1:null}}function X(){return{p:[new g,new g],points:[null,null]}}function Y(){return{p:[null,null,null]}}class N{constructor(){this.m_nextFreePairEdge=y(null,null),this.m_points=[],this.m_pointZero=null,this.m_edges=[],this.m_voronoiToEdge=[],this.m_nextFreeEdge=0}clear(){this.m_nextFreePairEdge=y(null,null),this.m_points.length=0,this.m_pointZero=null,this.m_edges.length=0,this.m_voronoiToEdge.length=0,this.m_nextFreeEdge=0}reservePoints(t){h(t>1)}prepare(t){{const e=k();e.p.x=Number.POSITIVE_INFINITY,e.p.y=Number.POSITIVE_INFINITY,e.userData=t,this.m_points.push(e)}}addVertex(t,e){const i=k();i.p.assign(t),i.userData=e,i.edge=null,this.m_points.push(i)}removeDuplicates(){const t=this.m_points.shift();this.m_points.sort(((t,e)=>t.p.compareX(e.p)));const e=c(this.m_points,((t,e)=>t.p.equals(e.p))),i=e!==this.m_points.length;return this.m_points.length=e,this.m_points.unshift(t),i}boundVoronoiCells(t,e){const i=this.m_points.length;if(i<2)return!1;const n=[this.m_points[1].p.clone(),this.m_points[1].p.clone()];for(let d=2;d<i;d++){const t=this.m_points[d].p;t.x<n[0].x&&(n[0].x=t.x),n[1].x<t.x&&(n[1].x=t.x),t.y<n[0].y&&(n[0].y=t.y),n[1].y<t.y&&(n[1].y=t.y)}const s=new g;s.x=.5*(n[0].x+n[1].x),s.y=.5*(n[0].y+n[1].y);let o=0;for(let d=1;d<i;d++){const t=this.m_points[d].p,e=g.sqrDistanceCoords(t.x,t.y,s.x,s.y);o<e&&(o=e)}const r=Math.sqrt(o),h=Math.max(r+2*t,1.5*r);{const t=.8660254037844386,i=.5;let n=1,o=0;for(let r=0;r<12;r++){const r=new g;r.x=s.x+h*n,r.y=s.y+h*o,this.addVertex(r,e);const d=n*i+o*t;n=n*t-o*i,o=d}}return!0}construct(){const t=D();return!!this.constructTask(t)&&(this.solveTask(t),!0)}constructTask(t){if(this.m_pointZero=this.createZeroHandle(),h(void 0!==this.m_pointZero),this.m_points.length<3)return!1;const e=6*(this.m_points.length-2);this.m_edges=d(T,e);for(let i=0;i<e;i++)this.m_edges[i].setIndex(i);return t.i0=1,t.i1=this.m_points.length,t.nextFreeEdgeIndex[0]=0,!0}splitTask(t,e,i,n){const s=t,o=e,r=i,h=n;s.k=this.findMaxSide(h.i0,h.i1);let d=h.i0+h.i1>>1;const g=1250;if(0===s.k){d=_(this.m_points,h.i0,d,h.i1,((t,e)=>t.p[0]!==e.p[0]?t.p[0]<e.p[0]:t.p[1]<e.p[1]),g)}else{d=_(this.m_points,h.i0,d,h.i1,((t,e)=>t.p[1]!==e.p[1]?t.p[1]<e.p[1]:t.p[0]<e.p[0]),g)}o.i0=h.i0,o.i1=d,o.nextFreeEdgeIndex[0]=h.nextFreeEdgeIndex[0],h.nextFreeEdgeIndex[0]+=6*(o.i1-o.i0-1)+2,r.i0=d,r.i1=h.i1,r.nextFreeEdgeIndex[0]=h.nextFreeEdgeIndex[0],h.nextFreeEdgeIndex[0]+=6*(r.i1-r.i0-1)+2,s.pTask=h,s.pTask0=o,s.pTask1=r}solveMergeTask(t){const e=this.newPairEdgeEx(t.pTask.nextFreeEdgeIndex,!1);if(t.pTask.box[t.k]=y(t.pTask0.box[t.k].first,t.pTask1.box[t.k].second),t.pTask.box[1-t.k]=y(A(this.getPointXYFromEdge(t.pTask0.box[1-t.k].first),this.getPointXYFromEdge(t.pTask1.box[1-t.k].first),1-t.k)?t.pTask0.box[1-t.k].first:t.pTask1.box[1-t.k].first,A(this.getPointXYFromEdge(t.pTask0.box[1-t.k].second),this.getPointXYFromEdge(t.pTask1.box[1-t.k].second),1-t.k)?t.pTask1.box[1-t.k].second:t.pTask0.box[1-t.k].second),t.pTask.i0+2===t.pTask.i1){const i=t.pTask0.box[t.k].second,n=i.twin,s=t.pTask1.box[t.k].first,o=s.twin;return this.joinEdges2(n,o),this.joinEdges2(o,n),void this.join(i,s,0,1,e)}const i=[new Array(2),new Array(2)];i[0][0]=i[1][0]=y(t.pTask0.box[t.k].second,t.pTask0.box[t.k].second.twin),i[0][1]=i[1][1]=y(t.pTask1.box[t.k].first,t.pTask1.box[t.k].first.twin);const n=[!1,!1];if(t.pTask0.i0+1===t.pTask0.i1?(this.findEdgeSide(i[0],n,1,0),this.findEdgeSide(i[1],n,1,1)):(this.findEdge(i[0],n,0),this.findEdge(i[1],n,1)),n[0]||n[1]){if(n[0]){const e=this.newPairEdgeEx(t.pTask0.nextFreeEdgeIndex,!1);this.insertEdge(i[0][0].first,e.first,0),this.insertEdge(i[0][0].second,e.second,1)}if(n[1]){const e=this.newPairEdgeEx(t.pTask1.nextFreeEdgeIndex,!1);this.insertEdge(i[0][1].first,e.first,1),this.insertEdge(i[0][1].second,e.second,0)}}else this.getNextDEdge(i[0][0].first,0)!==i[0][0].first&&(i[1][0]=this.newPairEdgeEx(t.pTask0.nextFreeEdgeIndex,!1),this.insertEdge(i[0][0].first,i[1][0].first,0),this.insertEdge(i[0][0].second,i[1][0].second,1)),this.getNextDEdge(i[0][1].first,0)!==i[0][1].first&&(i[1][1]=this.newPairEdgeEx(t.pTask1.nextFreeEdgeIndex,!1),this.insertEdge(i[0][1].first,i[1][1].first,1),this.insertEdge(i[0][1].second,i[1][1].second,0));this.merge(i[1][0],i[0][0],i[0][1],i[1][1],e)}solveTask(t){const e=t;switch(e.i1-e.i0){case 1:{this.insertPoint(e.i0,e.nextFreeEdgeIndex);const t=this.m_points[e.i0].edge;e.box[0]=e.box[1]=l(t,t)}break;case 2:{const t=e.i0,i=t+1;this.insertPoint(t,e.nextFreeEdgeIndex),this.insertPoint(i,e.nextFreeEdgeIndex);const n=this.m_points[t],s=this.m_points[i],o=n.edge,r=s.edge,h=o.twin,d=r.twin;this.joinEdges2(h,d),this.joinEdges2(d,h);const g=this.newPairEdgeEx(e.nextFreeEdgeIndex,!1);this.join(o,r,0,1,g);for(let a=0;a<2;a++)e.box[a]=A(this.getPointXY(n),this.getPointXY(s),a)?y(o,r):y(r,o)}break;case 3:{const t=[e.i0,e.i0+1,e.i0+2];this.insertPoint(t[0],e.nextFreeEdgeIndex),this.insertPoint(t[1],e.nextFreeEdgeIndex),this.insertPoint(t[2],e.nextFreeEdgeIndex);const i=[this.m_points[t[0]],this.m_points[t[1]],this.m_points[t[2]]],n=this.caseFromCompare(i[0].p,i[1].p,i[2].p),s=[i[0].edge,i[1].edge,i[2].edge],o=N.c_aTableDelaunayTriangulationSolution[n],r=v(19*v(1+(7&o))),h=v(19*v(1+(o>>5)));let d=v(o<<3)>>6;const g=3&r,a=r>>6,c=3&h,l=h>>6;e.box[0]=y(s[g],s[a]),e.box[1]=y(s[c],s[l]);const f=[s[0].twin,s[1].twin,s[2].twin],m=[this.newPairEdgeEx(e.nextFreeEdgeIndex,!1),this.newPairEdgeEx(e.nextFreeEdgeIndex,!1),this.newPairEdgeEx(e.nextFreeEdgeIndex,!1)];switch(3===d&&(d=this.orientation(i[0].p,i[1].p,i[2].p)+1),d){case 0:this.joinEdges2(f[0],f[2]),this.joinEdges2(f[2],f[1]),this.joinEdges2(f[1],f[0]),this.join(s[0],s[2],0,1,m[0]),this.join(s[2],s[1],0,1,m[1]),this.join(s[1],s[0],0,1,m[2]);break;case 1:{const t=[0,1,2];t[3-(g+a)]=u(t[1],t[1]=t[3-(g+a)]),this.joinEdges2(f[t[0]],f[t[1]]),this.joinEdges2(f[t[1]],f[t[2]]),this.joinEdges2(f[t[2]],f[t[0]]),this.join(s[t[0]],s[t[1]],0,1,m[0]),this.join(s[t[1]],s[t[2]],0,1,m[1]),this.join(m[1].first,f[t[2]],0,1,m[2])}break;case 2:this.joinEdges2(f[0],f[1]),this.joinEdges2(f[1],f[2]),this.joinEdges2(f[2],f[0]),this.join(s[0],s[1],0,1,m[0]),this.join(s[1],s[2],0,1,m[1]),this.join(s[2],s[0],0,1,m[2])}}break;default:{const e=I(),i=D(),n=D();this.splitTask(e,i,n,t),this.solveTask(i),this.solveTask(n),this.solveMergeTask(e)}}}getOutsideHull(){const t=[],e=this.m_points[0].edge;let i=e;do{t.push(this.getPointFromEdge(this.getTwinEdge(i))),i=this.getNextDEdge(i,0)}while(i!==e);return t}getConvexHull(){const t=[],e=this.m_points[0].edge;let i=e;do{const e=this.getPointFromEdge(this.getTwinEdge(i));t.length<2||!this.insideLine(this.getPointXY(t.at(-2)),this.getPointXY(t.at(-1)),this.getPointXY(e))?t.push(e):t[t.length-1]=e,i=this.getNextDEdge(i,0)}while(i!==e);return 2<t.length&&this.insideLine(this.getPointXY(t[0]),this.getPointXY(t.at(-1)),this.getPointXY(t.at(-2)))&&t.pop(),2<t.length&&this.insideLine(this.getPointXY(t[1]),this.getPointXY(t[0]),this.getPointXY(t.at(-1)))&&(t[0]=t.at(-1),t.pop()),t}getVoronoiPolygon(t,e){t.length=0;const i=this.getEdgeFromPoint(e);let n=i;for(;;){const e=this.calculateCircleCenter(n);t.push(e);const s=this.getNextDEdge(n,1);if(s===i)break;n=s}}getNearestPoint(t){this.isInfinitePointFromPoint(t)&&r("Not supported for the infinite point");const e=this.getPointXY(t);let i=this.m_pointZero,n=Number.MAX_VALUE;const s=this.getEdgeFromPoint(t);let o=s;do{const t=this.getPointFromEdge(this.getTwinEdge(o));if(!this.isInfinitePointFromPoint(t)){const s=g.sqrDistance(e,this.getPointXY(t));s<n&&(i=t,n=s)}o=this.getCounterClockwiseEdge(o)}while(o!==s);return i}addConstraint(t,e){const i=[null],n=[null];if(!this.constraintFindFirstEdge(i,n,t,e))return y(n[0],i[0]);i[0]=this.getTwinEdge(i[0]);const s=this.getPointXY(t),o=this.getPointXY(e),h=[new Array(0),new Array(0)],d=i[0];for(;;){const t=this.getClockwiseEdge(n[0]);t.getMask()&&r("add_constraint");const d=y(t,this.getTwinEdge(t));this.deleteTwinEdges(d,!0);const g=this.getCounterClockwiseEdge(this.getTwinEdge(i[0])),a=this.getTwinEdge(this.getClockwiseEdge(n[0])),c=this.getPointFromEdge(a);if(c===e){h[0].push(i[0]),i[0]=g,h[1].push(n[0]),n[0]=a;break}const l=this.orientation(s,o,this.getPointXY(c));0===l&&r("add_constraint - point on constraint"),0<l?(h[0].push(i[0]),i[0]=g):(h[1].push(n[0]),n[0]=a)}h[0].push(i[0]),h[1].push(n[0]);const g=this.newPairEdge();g.first.setMask(),g.second.setMask(),this.join(n[0],d,1,1,g),this.triangulateConstraint(h[0],1,h[0].length-1,g),h[1].reverse();const a=y(g.second,g.first);return this.triangulateConstraint(h[1],1,h[1].length-1,a),a}verify(){for(let t=0,e=this.m_edges.length;t<e;t++){const e=this.m_edges[t];if(!e.getMask()&&!this.testEdge(e))return!1}return!0}getDelaunayTriangleCount(){return this.m_points.length-2<<1}getVoronoiSegments(t=Number.MAX_VALUE){const e=[];for(let i=0,n=this.m_edges.length;i<n;i+=2){const n=y(null,null);if(n.first=this.m_edges[i],n.second=n.first.twin,this.isInfinitePointFromEdge(n.first)&&(n.second=u(n.first,n.first=n.second)),this.isInfinitePointFromEdge(n.second)){const i=d(g,3);i[0]=this.calculateCircleCenter(this.getNextDEdge(n.first,0).twin,1),i[2]=this.calculateCircleCenter(this.getNextDEdge(n.first,1),1);const s=d(g,2);s[0].assign(i[0]),s[1].assign(i[2]),s[0].rightPerpendicularThis(),s[1].leftPerpendicularThis(),i[1]=i[0].add(s[0]).add(i[2].add(s[1])),i[1].normalize();for(const e of i)e.mulThis(t);const o=X();o.points[0]=n.first.p,o.points[1]=n.second.p;for(let t=0;t<i.length-1;t++){for(let e=0;e<2;e++)o.p[e]=i[t+e];o.p[0].equals(o.p[1])||e.push(o)}}else if(this.isInfinitePointFromEdge(this.getNextDEdge(n.first,0).twin)&&this.isInfinitePointFromEdge(this.getNextDEdge(n.first,1).twin)){const t=d(g,3);t[0]=this.calculateCircleCenter(n.first),t[1]=this.getPointXY(this.getPointFromEdge(n.first)).add(this.getPointXY(this.getPointFromEdge(n.second))).mul(.5),t[2]=this.calculateCircleCenter(n.second);const i=X();i.points[0]=n.first.p,i.points[1]=n.second.p;for(let n=0;n<t.length-1;n++){for(let e=0;e<2;e++)i.p[e]=t[n+e];i.p[0].equals(i.p[1])||e.push(i)}}else{const t=X();t.p[0]=this.calculateCircleCenter(n.first),t.p[1]=this.calculateCircleCenter(n.second),t.points[0]=n.first.p,t.points[1]=n.second.p,t.p[0].equals(t.p[1])||e.push(t)}}return e}startDelaunayTriangles(){return-1}nextDelaunayTriangle(t,e){for(;;){if(++e[0],e[0]===this.m_edges.length)return!1;const i=this.m_edges[e[0]];if(t.p[0]=this.getPointFromEdge(i),this.isInfinitePointFromPoint(t.p[0]))continue;const n=this.getTwinEdge(i);if(t.p[1]=this.getPointFromEdge(n),this.isInfinitePointFromPoint(t.p[1]))continue;if(this.getPointXY(t.p[1]).lt(this.getPointXY(t.p[0])))continue;const s=this.getTwinEdge(this.getNextDEdge(i,1));if(t.p[2]=this.getPointFromEdge(s),!this.isInfinitePointFromPoint(t.p[2])&&!this.getPointXY(t.p[2]).lt(this.getPointXY(t.p[0])))return!0}}getPointCount(){return this.m_points.length-1}getPoint(t){return this.m_points[t+1]}getInfinitePoint(){return this.m_pointZero}isInfinitePointFromPoint(t){return t===this.m_pointZero}getPointXY(t){return t.p}getPointIndex(t){return t.userData}setPointIndex(t,e){t.userData=e}getEdgeFromPoint(t){return t.edge}isInfinitePointFromEdge(t){return t.p===this.m_pointZero}getEdgeCount(){return this.m_edges.length}getEdge(t){return this.m_edges[t]}getEdgeIndex(t){return t.getIndex()}getPointFromEdge(t){return t.p}getPointXYFromEdge(t){return t.p.p}getCounterClockwiseEdge(t){return t.a[0]}getClockwiseEdge(t){return t.a[1]}getTwinEdge(t){return t.twin}getPreviousEdge(t){return this.getTwinEdge(this.getCounterClockwiseEdge(t))}getNextEdge(t){return this.getClockwiseEdge(this.getTwinEdge(t))}getNextDEdge(t,e=1){return t.a[e]}newPairEdge(){const t=y(this.m_nextFreePairEdge.first,this.m_nextFreePairEdge.second);return this.m_nextFreePairEdge.first=this.m_nextFreePairEdge.first.nextFreeEdge(),this.m_nextFreePairEdge.second=this.m_nextFreePairEdge.second.nextFreeEdge(),t.first.twin=t.second,t.second.twin=t.first,t}newPairEdgeEx(t,e){let i;if(e&&null!==this.m_nextFreePairEdge.first)i=y(this.m_nextFreePairEdge.first,this.m_nextFreePairEdge.second),this.m_nextFreePairEdge.first=this.m_nextFreePairEdge.first.nextFreeEdge(),this.m_nextFreePairEdge.second=this.m_nextFreePairEdge.second.nextFreeEdge();else{const e=t[0]++,n=t[0]++;i=y(this.m_edges[e],this.m_edges[n])}return i.first.twin=i.second,i.second.twin=i.first,i}insertEdge(t,e,i){e.p=t.p;const n=t.a[i],s=e.a;s[i]=n,s[1-i]=t,t.a[i]=e,n.a[1-i]=e}insertPoint(t,e){const i=this.m_points[t],n=this.newPairEdgeEx(e,!1),s=n.first,o=n.second;i.edge=n.first,s.p=this.m_points[t],s.a[0]=n.first,s.a[1]=n.first,o.p=this.m_pointZero,o.a[0]=n.second,o.a[1]=n.second,null===this.m_points[0].edge&&(this.m_points[0].edge=n.second)}deleteTwinEdges(t,e){this.deleteEdge(t.first),this.deleteEdge(t.second),e&&(t.first.twin=this.m_nextFreePairEdge.first,t.second.twin=this.m_nextFreePairEdge.second,this.m_nextFreePairEdge=t)}join(t,e,i,n,s){this.insertEdge(t,s.first,i),this.insertEdge(e,s.second,n)}joinEdges2(t,e){t.a[1]=e,e.a[0]=t}checkEdge(t,e,i,n,s){for(;;){const o=y(null,null);if(o.first=this.getNextDEdge(t.first,n),o.second=o.first.twin,this.isInfinitePointFromEdge(o.second))return t;const r=this.getPointXYFromEdge(t.second),h=this.getPointXYFromEdge(o.second);if(this.inCircle(e,i,r,h)<=0)return t;if(this.deleteTwinEdges(t,s),!s){const e=this.getNextDEdge(t.second,n).twin;this.join(o.second,e,n,n,t)}t=o}}calculateCircleCenter(t,e=Number.MAX_VALUE){const i=this.getPointXYFromEdge(t),n=this.getPointXYFromEdge(t.twin),s=this.getNextDEdge(t,0);if(this.isInfinitePointFromEdge(s.twin)){const t=new g;if(Number.isNaN(e))t.setNAN();else{const s=n.sub(i);s.leftPerpendicularThis(),t.assign(s),t.divThis(Math.max(Math.abs(t.x),Math.abs(t.y))),t.normalize(),t.mulThis(e)}return t}const o=this.getPointXYFromEdge(s.twin);return this.calculateCircleCenterFromThreePoints(i,n,o)}createZeroHandle(){return this.m_points[0]}deleteEdge(t){const e=t,i=e.p;i.edge===t&&(i.edge=e.a[0]),e.a[0].a[1]=e.a[1],e.a[1].a[0]=e.a[0]}testEdge(t){if(this.isInfinitePointFromEdge(t))return!0;const e=t.twin;if(this.isInfinitePointFromEdge(e))return!0;const i=this.getNextDEdge(t,0).twin,n=this.getNextDEdge(e,0).twin;if(this.isInfinitePointFromEdge(i)||this.isInfinitePointFromEdge(n))return!0;const s=this.getPointXYFromEdge(t),o=this.getPointXYFromEdge(e),r=this.getPointXYFromEdge(i),h=this.getPointXYFromEdge(n);return!(this.orientation(s,o,r)<=0)&&(!(0<=this.orientation(s,o,h))&&this.inCircle(s,o,r,h)<=0)}findMaxSide(t,e){const i=[this.m_points[t].p.clone(),this.m_points[t].p.clone()];for(t++;t!==e;t++){const e=this.m_points[t].p;e.x<i[0].x&&(i[0].x=e.x),i[1].x<e.x&&(i[1].x=e.x),e.y<i[0].y&&(i[0].y=e.y),i[1].y<e.y&&(i[1].y=e.y)}return i[1].x-i[0].x<i[1].y-i[0].y?1:0}findEdge(t,e,i){let n=!1,s=0;for(;;){const o=y(null,null);if(o.second=this.getNextDEdge(t[s].second,i^s),o.first=o.second.twin,0===i&&this.orientation(this.getPointXYFromEdge(t[0].first),this.getPointXYFromEdge(t[1].first),this.getPointXYFromEdge(o.first))<0||1===i&&0<this.orientation(this.getPointXYFromEdge(t[0].first),this.getPointXYFromEdge(t[1].first),this.getPointXYFromEdge(o.first)))t[s]=o,e[s]=!0,n=!1;else{if(n)return;s^=1,n=!0}}}findEdgeSide(t,e,i,n){for(;;){const s=y(null,null);if(s.second=this.getNextDEdge(t[i].second,n^i),s.first=s.second.twin,!(0===n&&this.orientation(this.getPointXYFromEdge(t[0].first),this.getPointXYFromEdge(t[1].first),this.getPointXYFromEdge(s.first))<0||1===n&&0<this.orientation(this.getPointXYFromEdge(t[0].first),this.getPointXYFromEdge(t[1].first),this.getPointXYFromEdge(s.first))))return;t[i]=s,e[i]=!0}}merge(t,e,i,n,s){const o={...t},r={...n},h={...s};let d={...e},g={...i};const a=d.second,c=g.second;for(;;){if(this.join(d.first,g.first,0,1,h),d.first=this.getNextDEdge(h.first,0),g.first=this.getNextDEdge(h.second,1),d.first===o.first&&g.first===r.first){this.joinEdges2(a,c),this.joinEdges2(r.second,o.second);break}d.second=d.first.twin,g.second=g.first.twin;const t=this.getPointXYFromEdge(h.first),e=this.getPointXYFromEdge(h.second);if(d.first===o.first){let i=y(null,null);i.first=this.getNextDEdge(g.first,1),i.second=i.first.twin,i=this.checkEdge(i,t,e,1,!1),b(d,h),b(h,g),g=y(i.second,i.first)}else if(g.first===r.first){let i=y(null,null);i.first=this.getNextDEdge(d.first,0),i.second=i.first.twin,i=this.checkEdge(i,t,e,0,!1),g=y(h.second,h.first),b(h,d),d=y(i.second,i.first)}else{let i=y(null,null);i.first=this.getNextDEdge(d.first,0),i.second=i.first.twin,i=this.checkEdge(i,t,e,0,!1);let n=y(null,null);n.first=this.getNextDEdge(g.first,1),n.second=n.first.twin,n=this.checkEdge(n,t,e,1,!1);const s=this.getPointXYFromEdge(i.second),o=this.getPointXYFromEdge(n.second);let r=this.inCircle(t,e,s,o);0===r&&(r=this.orientation(t,e,o)),0<r?(b(d,h),b(h,g),g=y(n.second,n.first)):(g=y(h.second,h.first),b(h,d),d=y(i.second,i.first))}this.deleteTwinEdges(h,!1)}}findEdgeClockwise(t,e,i,n,s,o){for(t[0]=n;;){e[0]=t[0],++e[0]===i.length&&(e[0]=0);const n=this.orientation(s,o,this.getPointXYFromEdge(i[e[0]]));if(n<=0)return n<0;t[0]=e[0]}}findEdgeCounterClockwise(t,e,i,n,s,o){for(e[0]=n;;){t[0]=0!==e[0]?e[0]:i.length,t[0]--;const n=this.orientation(s,o,this.getPointXYFromEdge(i[t[0]]));if(0<=n)return 0<n;e[0]=t[0]}}constraintFindFirstEdge(t,e,i,n){const s=[];{const o=this.getEdgeFromPoint(i);let r=o;do{const i=this.getTwinEdge(r);if(this.getPointFromEdge(i)===n)return t[0]=i,e[0]=r,t[0].setMask(),e[0].setMask(),!1;s.push(i),r=this.getClockwiseEdge(r)}while(r!==o)}s.length<3&&r("add_constraint");let o=-1;for(let c=0,l=s.length;c<l;c++)this.isInfinitePointFromEdge(s[c])&&(-1!==o&&r("add_constraint"),o=c);const h=this.getPointXY(i),d=this.getPointXY(n);let g,a;if(-1!==o){x(s,0,o+1,s.length),s.pop();0===this.orientation(h,d,this.getPointXYFromEdge(s[0]))&&r("add_constraint - point on constraint");for(0===this.orientation(h,d,this.getPointXYFromEdge(s.at(-1)))&&r("add_constraint - point on constraint"),g=0,a=s.length-1;g+1!==a;){const t=g+a>>1,e=this.orientation(h,d,this.getPointXYFromEdge(s[t]));0===e&&r("add_constraint - point on constraint"),0<e?g=t:a=t}}else{let t=0,e=this.orientation(h,d,this.getPointXYFromEdge(s[t]));if(0!==e)if(0<e){const e=[0],i=[0];this.findEdgeClockwise(e,i,s,t,h,d)||r("add_constraint"),g=e[0],a=i[0]}else{const e=[0],i=[0];this.findEdgeCounterClockwise(e,i,s,t,h,d)||r("add_constraint"),g=e[0],a=i[0]}else{t++,e=this.orientation(h,d,this.getPointXYFromEdge(s[t])),e<=0&&r("add_constraint");const i=[0],n=[0];this.findEdgeClockwise(i,n,s,t,h,d)||r("add_constraint"),g=i[0],a=n[0]}}return t[0]=s[g],e[0]=s[a],!0}triangulateConstraint(t,e,i,n){if(e===i)return;let s=i;for(let o=e;o!==i;++o)this.inCircle(this.getPointXYFromEdge(n.first),this.getPointXYFromEdge(n.second),this.getPointXYFromEdge(t[s]),this.getPointXYFromEdge(t[o]))<0&&(s=o);if(s!==i){const e=this.newPairEdge();this.join(n.first,t[s],1,1,e),t[s]=e.second,this.triangulateConstraint(t,s+1,i,e)}if(s!==e){const i=this.newPairEdge();this.join(t[s],n.second,1,0,i),this.triangulateConstraint(t,e,s-1,i)}}insideLine(t,e,i){return 0===this.orientation(t,e,i)&&(e.x<t.x!=e.x<i.x||e.y<t.y!=e.y<i.y)}orientation(t,e,i){return g.orientationRobust(t,e,i)}inCircle(t,e,i,n){return g.inCircleRobust(t,e,i,n)}calculateCircleCenterFromThreePoints(t,e,i){return e.lt(t)&&(e=u(t,t=e)),i.lt(e)&&(i=u(e,e=i)),e.lt(t)&&(e=u(t,t=e)),g.calculateCircleCenterFromThreePoints(t,e,i)}compare(t,e){return 3*((j(t[0]<e[0])<<1)+j(t[0]>e[0]))+(j(t[1]<e[1])<<1)+j(t[1]>e[1])-1}caseFromCompare(t,e,i){return(this.compare(t,e)<<6)+(this.compare(t,i)<<3)+this.compare(e,i)}}function j(t){return t?1:0}function A(t,e,i){return t[i]!==e[i]?t[i]<e[i]:t[1-i]<e[1-i]}function v(t){return 255&t}N.c_aTableDelaunayTriangulationSolution=Uint8Array.from([41,74,0,0,0,0,0,0,0,206,0,0,0,0,0,0,0,0,0,0,65,0,0,0,0,0,33,33,65,0,0,0,0,0,0,0,193,0,0,0,0,0,0,0,0,0,0,214,0,0,0,0,0,86,54,86,0,0,0,0,0,0,0,214,173,0,0,0,0,0,0,0,107,239,0,0,0,0,0,0,0,0,0,181,0,0,0,0,0,0,0,181,0,0,0,0,0,0,117,117,245,0,0,0,0,0,0,0,0,0,103,0,0,0,0,0,0,0,167,0,0,0,0,0,0,231,103,231,0,0,0,0,0,0,50,0,0,0,0,0,0,0,0,198,0,0,41,0,0,74,0,0,49,0,0,49,0,0,50,0,0,194,0,0,193,0,0,194,0,0,0,0,0,206,0,0,0,0,0,0,0,0,54,0,0,0,0,0,0,0,0,198,0,0,0,0,0,82,50,82,0,0,0,0,0,0,0,198,0,66,0,0,65,0,0,66,49,66,33,57,65,82,50,90,0,194,0,0,193,0,0,194,0,0,0,0,0,0,0,214,0,0,0,0,0,86,54,86,0,0,0,0,0,0,0,222,0,0,0,0,0,0,178,0,0,0,0,0,0,230,102,230,177,0,0,177,0,0,178,0,177,0,0,177,0,0,178,0,113,226,113,113,249,226,122,226,0,0,0,0,0,0,102,0,0,0,0,0,0,0,190,0,0,0,0,0,0,230,102,230,0,0,0,165,0,0,0,0,0,0,0,0,243,0,0,0,0,0,173,0,0,0,0,0,0,0,0,165,0,0,0,0,0,0,0,0,245,0,0,0,0,0,107,0,0,239,0,0,163,0,0,163,0,0,167,0,0,247,0,0,243,0,0,247,0,0,37,37,69,0,0,0,0,0,0,0,211,0,0,0,0,0,0,0,69,0,0,0,0,0,37,37,69,0,0,0,0,0,0,0,221,0,0,0,0,215,0,0,211,0,0,215,35,87,35,35,91,87,63,87,0,215,0,0,211,0,0,215,0,0,0,165,0,0,0,0,0,0,115,115,243,0,0,0,0,0,0,181,0,0,0,0,0,0,0,189,0,0,0,0,0,0,117,117,245,0,0,0,99,0,0,99,0,0,103,0,163,0,0,163,0,0,167,0,99,247,115,123,243,231,103,255]);class M{constructor(t){this.m_numberOfSets=t,this.m_elements=Array.from({length:t},((t,e)=>e)),this.m_sizes=f(t,1)}getNumberOfSets(){return this.m_numberOfSets}connected(t,e){return this.findRoot(t)===this.findRoot(e)}connect(t,e){const i=this.findRoot(t),n=this.findRoot(e);return i!==n&&(this.m_sizes[i]<this.m_sizes[n]?(this.m_sizes[n]+=this.m_sizes[i],this.m_elements[i]=n):(this.m_sizes[i]+=this.m_sizes[n],this.m_elements[n]=i),--this.m_numberOfSets,!0)}connectRange(t,e,i){if(e!==i)for(let n=e;n<i;++n)this.connect(t[e],t[n])}size(){return this.m_elements.length}size1(t){return h(0),0}findRoot(t){let e=t;if(this.m_elements[e]!==e)do{this.m_elements[e]=this.m_elements[this.m_elements[e]],e=this.m_elements[e]}while(this.m_elements[e]!==e);return e}}function S(){return l(Number.NaN,l([0,0,0],[0,0,0]))}function G(t,e){if(t.first!==e.first)return t.first-e.first;let i=t.second.first,n=e.second.first;for(let s=0;s<3;++s)if(i[s]!==n[s])return i[s]-n[s];i=t.second.second,n=e.second.second;for(let s=0;s<3;++s)if(i[s]!==n[s])return i[s]-n[s];return 0}class q{getOperatorType(){return 10112}accelerateGeometry(t,e,i){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!1}executeMany(t,e,i,n){return new z(t,e,i,n)}execute(t,e,i,n=null){const s=new z(null,e,!1,i);s.addGeometry(t);return s.buildAlphaShape(n)}}class z extends t{alphaShapeConstruct(t,e){const i=t.getEdgeCount(),n=new p({vd:this.m_vertexDescription});if(!n)throw new Error("alphaShapeConstruct");for(let s=0;s<i;++s){if(2!==e[s])continue;const i=y(null,null);i.first=t.getEdge(s),i.second=t.getTwinEdge(i.first);if(1!==e[t.getEdgeIndex(i.second)])continue;t.getPointXYFromEdge(i.first),n.startPath(t.getPointXYFromEdge(i.first));let o=s,r=i.second;for(;;){for(e[o]=3,r=t.getCounterClockwiseEdge(r);1===e[t.getEdgeIndex(r)];)r=t.getCounterClockwiseEdge(r);if(r===i.first)break;n.lineTo(t.getPointXYFromEdge(r)),o=t.getEdgeIndex(r),r=t.getTwinEdge(r)}}return n}alphaShape(t,e){const i=t.getEdgeCount(),n=new Uint8Array(i);for(let s=0;s<i;++s){if(0!==n[s])continue;const i=Y(),o=t.getEdge(s);i.p[0]=t.getPointFromEdge(o);const r=t.getClockwiseEdge(t.getTwinEdge(o));i.p[1]=t.getPointFromEdge(r);const h=t.getEdgeIndex(r),a=t.getClockwiseEdge(t.getTwinEdge(r));i.p[2]=t.getPointFromEdge(a);const c=t.getEdgeIndex(a);let l=1;for(let e=0;e<3;++e)if(t.isInfinitePointFromPoint(i.p[e])){l=2;break}if(1===l){const n=d(g,3);for(let e=0;e<3;++e)n[e]=t.getPointXY(i.p[e]);const s=g.sqrDistance(n[0],n[1]),o=g.sqrDistance(n[1],n[2]),r=g.sqrDistance(n[2],n[0]),h=2*n[1].sub(n[0]).crossProduct(n[2].sub(n[0]));e<s*o*r/(h*h)&&(l=2)}n[s]=n[h]=n[c]=l}return this.alphaShapeConstruct(t,n)}alphaShapeAlphaOut(t,e){const i=t.getEdgeCount(),n=new Uint8Array(i),s=[],o=new M(t.getPointCount());for(let h=0;h<i;++h){if(0!==n[h])continue;const e=Y(),i=t.getEdge(h);e.p[0]=t.getPointFromEdge(i);const o=t.getClockwiseEdge(t.getTwinEdge(i));e.p[1]=t.getPointFromEdge(o);const r=t.getEdgeIndex(o),d=t.getClockwiseEdge(t.getTwinEdge(o));e.p[2]=t.getPointFromEdge(d);const a=t.getEdgeIndex(d);let c=1;for(let n=0;n<3;++n)if(t.isInfinitePointFromPoint(e.p[n])){c=2;break}if(1===c){const i=new Array(3);for(let s=0;s<3;++s)i[s]=t.getPointXY(e.p[s]);const n=g.sqrDistance(i[0],i[1]),o=g.sqrDistance(i[1],i[2]),d=g.sqrDistance(i[2],i[0]),l=i[1].sub(i[0]).crossProduct(i[2].sub(i[0])),u=S();u.first=n*o*d/(l*l),u.second.first[0]=h,u.second.first[1]=r,u.second.first[2]=a,u.second.second[0]=t.getPointIndex(e.p[0]),u.second.second[1]=t.getPointIndex(e.p[1]),u.second.second[2]=t.getPointIndex(e.p[2]),s.push(u),c=2}n[h]=n[r]=n[a]=c}s.sort(((t,e)=>G(t,e)));let r=0;for(const h of s){if(1===o.getNumberOfSets()&&h.first!==r)break;n[h.second.first[0]]=n[h.second.first[1]]=n[h.second.first[2]]=1;const t=[h.second.second[0],h.second.second[1],h.second.second[2]];o.connectRange(t,0,3),r=h.first}return e&&(e[0]=.25*r),this.alphaShapeConstruct(t,n)}constructor(t,e,i,n){super(),this.m_multiPointForAttributes=null,this.m_inputGeometryCursor=null,this.m_index=-1,this.m_nDelaunayPoints=0,this.m_cDelaunay=new N,this.m_vertexDescription=null,this.m_progressTracker=n,this.m_alpha=Number.isNaN(e)||!Number.isFinite(e)||e<0?-1:e<Number.MIN_VALUE?0:e,this.m_bMerge=i,this.m_bDone=!1,this.m_inputGeometryCursor=t,this.prepareDelaunay()}prepareDelaunay(){this.m_nDelaunayPoints=0,this.m_cDelaunay.clear(),0!==this.m_alpha&&this.m_cDelaunay.prepare(a())}next(){if(this.m_bMerge){if(!this.m_bDone){const t=this.calculateAlphaShapeMerging(this.m_inputGeometryCursor,this.m_progressTracker);return this.m_bDone=!0,t}return null}if(!this.m_bDone){const t=this.m_inputGeometryCursor.next();if(null!==t)return i(t),n(t),this.m_index=this.m_inputGeometryCursor.getGeometryID(),this.calculateAlphaShape(t,this.m_progressTracker);this.m_bDone=!0}return null}tock(){return!0}getRank(){return 1}getGeometryID(){return this.m_index}calculateAlphaShapeMerging(t,e){let s;for(;s=t.next();)i(s),n(s),this.addGeometry(s);return this.buildAlphaShape()}calculateAlphaShape(t,e){return t.isEmpty()?new p({vd:t.getDescription()}):(this.prepareDelaunay(),this.addGeometry(t),this.buildAlphaShape())}buildAlphaShape(t=null){if(t&&(t[0]=this.m_alpha),0===this.m_alpha)return this.m_vertexDescription?new p({vd:this.m_vertexDescription}):new p;if(this.m_cDelaunay.removeDuplicates())for(let e=0,i=this.m_cDelaunay.getPointCount();e<i;++e)this.m_cDelaunay.setPointIndex(this.m_cDelaunay.getPoint(e),e);if(!this.m_cDelaunay.construct())return this.m_vertexDescription?new p({vd:this.m_vertexDescription}):new p;return this.m_alpha<0?this.alphaShapeAlphaOut(this.m_cDelaunay,t):this.alphaShape(this.m_cDelaunay,this.m_alpha)}addGeometry(t){if(i(t),n(t),0===this.m_alpha)return;if(this.m_vertexDescription&&this.m_bMerge||(this.m_vertexDescription=t.getDescription(),this.m_vertexDescription.getAttributeCount()>1?this.m_multiPointForAttributes=new E({vd:this.m_vertexDescription}):this.m_multiPointForAttributes=null),t.isEmpty())return;const e=t.getGeometryType();if(s(e)){const e=t,i=new g;for(let t=0,n=e.getPointCount();t<n;t++)e.queryXY(t,i),this.m_cDelaunay.addVertex(i,this.m_nDelaunayPoints++);this.m_multiPointForAttributes&&this.m_multiPointForAttributes.addPoints(e,0,-1)}else if(e===o.enumPoint){const e=t,i=e.getXY();this.m_cDelaunay.addVertex(i,this.m_nDelaunayPoints++),this.m_multiPointForAttributes&&this.m_multiPointForAttributes.add(e)}else r("bad geometry type")}}const V=new q;function O(t,e,i){return V.execute(t,e,null,i)}function Z(t,i,n){const s=V.executeMany(new e(t),i,n,null);return Array.from(s)}function R(){return V.supportsCurves()}export{O as execute,Z as executeMany,R as supportsCurves};
5
+ import{G as t,S as e}from"../../../chunks/SimpleGeometryCursor.js";import{l as i,d as n,i as s,G as o,t as r,g as h}from"../../../chunks/Geometry.js";import{m as d,P as g,i as a,u as c,n as l,b as u,d as f,v as m}from"../../../chunks/Point2D.js";import{a as p,M as E,r as x,h as P}from"../../../chunks/QuadraticBezier.js";function _(t,e,i,n,s,o){const r=n-e;if(r<=o)return P(t,e,i,n,s),i;const h=w(t,e,n,s,Math.min(Math.max(r>>1,3),100)),d=t[h];t[e]=u(t[h],t[h]=t[e]);let g=e+1,a=!1;for(let c=e+1;c!==n;++c)s(t[c],d)&&(t[g]=u(t[c],t[c]=t[g]),++g,a=!0);if(!a)for(let c=e+1;c<i;++c)s(d,t[c])||(c!==g&&(t[g]=u(t[c],t[c]=t[g])),++g);return--g,t[g]=u(t[e],t[e]=t[g]),g}function F(t,e,i){const n=Math.trunc(e/2);let s=BigInt(n);const o=BigInt(e);for(let h=0;h<i;++h)t.push(Number(s%o)),s=6364136223846793005n*s+1442695040888963407n&0x7fffffffffffffffn,s=BigInt.asUintN(64,s);m(t);const r=c(t,((t,e)=>t===e));t.length=r}function w(t,e,i,n,s){const o=[];F(o,i-e,s);const r=[];for(let d=0,g=o.length;d<g;d++){const i=o[d];r.push(l(t[e+i],i))}const h=Math.trunc(r.length/2);return r.sort(((t,e)=>n(t.first,e.first)?-1:1)),e+r[h].second}function k(){return{p:new g,userData:Number.NaN,edge:null}}class T{constructor(){this.info=0,this.mask=!1,this.p=null,this.a=[null,null],this.twin=null}nextFreeEdge(){return this.twin}setIndex(t){this.info=t,this.mask=!1}getIndex(){return this.info}setMask(){this.mask=!0}getMask(){return this.mask}}function y(t,e){return{first:t,second:e}}function b(t,e){t.first=e.first,t.second=e.second}function C(){return this.i1-this.i0}function D(){return{i0:Number.NaN,i1:Number.NaN,nextFreeEdgeIndex:[-1],box:[y(null,null),y(null,null)],size:C}}function I(){return{k:0,pTask:null,pTask0:null,pTask1:null}}function X(){return{p:[new g,new g],points:[null,null]}}function Y(){return{p:[null,null,null]}}class N{constructor(){this.m_nextFreePairEdge=y(null,null),this.m_points=[],this.m_pointZero=null,this.m_edges=[],this.m_voronoiToEdge=[],this.m_nextFreeEdge=0}clear(){this.m_nextFreePairEdge=y(null,null),this.m_points.length=0,this.m_pointZero=null,this.m_edges.length=0,this.m_voronoiToEdge.length=0,this.m_nextFreeEdge=0}reservePoints(t){h(t>1)}prepare(t){{const e=k();e.p.x=Number.POSITIVE_INFINITY,e.p.y=Number.POSITIVE_INFINITY,e.userData=t,this.m_points.push(e)}}addVertex(t,e){const i=k();i.p.assign(t),i.userData=e,i.edge=null,this.m_points.push(i)}removeDuplicates(){const t=this.m_points.shift();this.m_points.sort(((t,e)=>t.p.compareX(e.p)));const e=c(this.m_points,((t,e)=>t.p.equals(e.p))),i=e!==this.m_points.length;return this.m_points.length=e,this.m_points.unshift(t),i}boundVoronoiCells(t,e){const i=this.m_points.length;if(i<2)return!1;const n=[this.m_points[1].p.clone(),this.m_points[1].p.clone()];for(let d=2;d<i;d++){const t=this.m_points[d].p;t.x<n[0].x&&(n[0].x=t.x),n[1].x<t.x&&(n[1].x=t.x),t.y<n[0].y&&(n[0].y=t.y),n[1].y<t.y&&(n[1].y=t.y)}const s=new g;s.x=.5*(n[0].x+n[1].x),s.y=.5*(n[0].y+n[1].y);let o=0;for(let d=1;d<i;d++){const t=this.m_points[d].p,e=g.sqrDistanceCoords(t.x,t.y,s.x,s.y);o<e&&(o=e)}const r=Math.sqrt(o),h=Math.max(r+2*t,1.5*r);{const t=.8660254037844386,i=.5;let n=1,o=0;for(let r=0;r<12;r++){const r=new g;r.x=s.x+h*n,r.y=s.y+h*o,this.addVertex(r,e);const d=n*i+o*t;n=n*t-o*i,o=d}}return!0}construct(){const t=D();return!!this.constructTask(t)&&(this.solveTask(t),!0)}constructTask(t){if(this.m_pointZero=this.createZeroHandle(),h(void 0!==this.m_pointZero),this.m_points.length<3)return!1;const e=6*(this.m_points.length-2);this.m_edges=d(T,e);for(let i=0;i<e;i++)this.m_edges[i].setIndex(i);return t.i0=1,t.i1=this.m_points.length,t.nextFreeEdgeIndex[0]=0,!0}splitTask(t,e,i,n){const s=t,o=e,r=i,h=n;s.k=this.findMaxSide(h.i0,h.i1);let d=h.i0+h.i1>>1;const g=1250;if(0===s.k){d=_(this.m_points,h.i0,d,h.i1,((t,e)=>t.p[0]!==e.p[0]?t.p[0]<e.p[0]:t.p[1]<e.p[1]),g)}else{d=_(this.m_points,h.i0,d,h.i1,((t,e)=>t.p[1]!==e.p[1]?t.p[1]<e.p[1]:t.p[0]<e.p[0]),g)}o.i0=h.i0,o.i1=d,o.nextFreeEdgeIndex[0]=h.nextFreeEdgeIndex[0],h.nextFreeEdgeIndex[0]+=6*(o.i1-o.i0-1)+2,r.i0=d,r.i1=h.i1,r.nextFreeEdgeIndex[0]=h.nextFreeEdgeIndex[0],h.nextFreeEdgeIndex[0]+=6*(r.i1-r.i0-1)+2,s.pTask=h,s.pTask0=o,s.pTask1=r}solveMergeTask(t){const e=this.newPairEdgeEx(t.pTask.nextFreeEdgeIndex,!1);if(t.pTask.box[t.k]=y(t.pTask0.box[t.k].first,t.pTask1.box[t.k].second),t.pTask.box[1-t.k]=y(A(this.getPointXYFromEdge(t.pTask0.box[1-t.k].first),this.getPointXYFromEdge(t.pTask1.box[1-t.k].first),1-t.k)?t.pTask0.box[1-t.k].first:t.pTask1.box[1-t.k].first,A(this.getPointXYFromEdge(t.pTask0.box[1-t.k].second),this.getPointXYFromEdge(t.pTask1.box[1-t.k].second),1-t.k)?t.pTask1.box[1-t.k].second:t.pTask0.box[1-t.k].second),t.pTask.i0+2===t.pTask.i1){const i=t.pTask0.box[t.k].second,n=i.twin,s=t.pTask1.box[t.k].first,o=s.twin;return this.joinEdges2(n,o),this.joinEdges2(o,n),void this.join(i,s,0,1,e)}const i=[new Array(2),new Array(2)];i[0][0]=i[1][0]=y(t.pTask0.box[t.k].second,t.pTask0.box[t.k].second.twin),i[0][1]=i[1][1]=y(t.pTask1.box[t.k].first,t.pTask1.box[t.k].first.twin);const n=[!1,!1];if(t.pTask0.i0+1===t.pTask0.i1?(this.findEdgeSide(i[0],n,1,0),this.findEdgeSide(i[1],n,1,1)):(this.findEdge(i[0],n,0),this.findEdge(i[1],n,1)),n[0]||n[1]){if(n[0]){const e=this.newPairEdgeEx(t.pTask0.nextFreeEdgeIndex,!1);this.insertEdge(i[0][0].first,e.first,0),this.insertEdge(i[0][0].second,e.second,1)}if(n[1]){const e=this.newPairEdgeEx(t.pTask1.nextFreeEdgeIndex,!1);this.insertEdge(i[0][1].first,e.first,1),this.insertEdge(i[0][1].second,e.second,0)}}else this.getNextDEdge(i[0][0].first,0)!==i[0][0].first&&(i[1][0]=this.newPairEdgeEx(t.pTask0.nextFreeEdgeIndex,!1),this.insertEdge(i[0][0].first,i[1][0].first,0),this.insertEdge(i[0][0].second,i[1][0].second,1)),this.getNextDEdge(i[0][1].first,0)!==i[0][1].first&&(i[1][1]=this.newPairEdgeEx(t.pTask1.nextFreeEdgeIndex,!1),this.insertEdge(i[0][1].first,i[1][1].first,1),this.insertEdge(i[0][1].second,i[1][1].second,0));this.merge(i[1][0],i[0][0],i[0][1],i[1][1],e)}solveTask(t){const e=t;switch(e.i1-e.i0){case 1:{this.insertPoint(e.i0,e.nextFreeEdgeIndex);const t=this.m_points[e.i0].edge;e.box[0]=e.box[1]=l(t,t)}break;case 2:{const t=e.i0,i=t+1;this.insertPoint(t,e.nextFreeEdgeIndex),this.insertPoint(i,e.nextFreeEdgeIndex);const n=this.m_points[t],s=this.m_points[i],o=n.edge,r=s.edge,h=o.twin,d=r.twin;this.joinEdges2(h,d),this.joinEdges2(d,h);const g=this.newPairEdgeEx(e.nextFreeEdgeIndex,!1);this.join(o,r,0,1,g);for(let a=0;a<2;a++)e.box[a]=A(this.getPointXY(n),this.getPointXY(s),a)?y(o,r):y(r,o)}break;case 3:{const t=[e.i0,e.i0+1,e.i0+2];this.insertPoint(t[0],e.nextFreeEdgeIndex),this.insertPoint(t[1],e.nextFreeEdgeIndex),this.insertPoint(t[2],e.nextFreeEdgeIndex);const i=[this.m_points[t[0]],this.m_points[t[1]],this.m_points[t[2]]],n=this.caseFromCompare(i[0].p,i[1].p,i[2].p),s=[i[0].edge,i[1].edge,i[2].edge],o=N.c_aTableDelaunayTriangulationSolution[n],r=v(19*v(1+(7&o))),h=v(19*v(1+(o>>5)));let d=v(o<<3)>>6;const g=3&r,a=r>>6,c=3&h,l=h>>6;e.box[0]=y(s[g],s[a]),e.box[1]=y(s[c],s[l]);const f=[s[0].twin,s[1].twin,s[2].twin],m=[this.newPairEdgeEx(e.nextFreeEdgeIndex,!1),this.newPairEdgeEx(e.nextFreeEdgeIndex,!1),this.newPairEdgeEx(e.nextFreeEdgeIndex,!1)];switch(3===d&&(d=this.orientation(i[0].p,i[1].p,i[2].p)+1),d){case 0:this.joinEdges2(f[0],f[2]),this.joinEdges2(f[2],f[1]),this.joinEdges2(f[1],f[0]),this.join(s[0],s[2],0,1,m[0]),this.join(s[2],s[1],0,1,m[1]),this.join(s[1],s[0],0,1,m[2]);break;case 1:{const t=[0,1,2];t[3-(g+a)]=u(t[1],t[1]=t[3-(g+a)]),this.joinEdges2(f[t[0]],f[t[1]]),this.joinEdges2(f[t[1]],f[t[2]]),this.joinEdges2(f[t[2]],f[t[0]]),this.join(s[t[0]],s[t[1]],0,1,m[0]),this.join(s[t[1]],s[t[2]],0,1,m[1]),this.join(m[1].first,f[t[2]],0,1,m[2])}break;case 2:this.joinEdges2(f[0],f[1]),this.joinEdges2(f[1],f[2]),this.joinEdges2(f[2],f[0]),this.join(s[0],s[1],0,1,m[0]),this.join(s[1],s[2],0,1,m[1]),this.join(s[2],s[0],0,1,m[2])}}break;default:{const e=I(),i=D(),n=D();this.splitTask(e,i,n,t),this.solveTask(i),this.solveTask(n),this.solveMergeTask(e)}}}getOutsideHull(){const t=[],e=this.m_points[0].edge;let i=e;do{t.push(this.getPointFromEdge(this.getTwinEdge(i))),i=this.getNextDEdge(i,0)}while(i!==e);return t}getConvexHull(){const t=[],e=this.m_points[0].edge;let i=e;do{const e=this.getPointFromEdge(this.getTwinEdge(i));t.length<2||!this.insideLine(this.getPointXY(t.at(-2)),this.getPointXY(t.at(-1)),this.getPointXY(e))?t.push(e):t[t.length-1]=e,i=this.getNextDEdge(i,0)}while(i!==e);return 2<t.length&&this.insideLine(this.getPointXY(t[0]),this.getPointXY(t.at(-1)),this.getPointXY(t.at(-2)))&&t.pop(),2<t.length&&this.insideLine(this.getPointXY(t[1]),this.getPointXY(t[0]),this.getPointXY(t.at(-1)))&&(t[0]=t.at(-1),t.pop()),t}getVoronoiPolygon(t,e){t.length=0;const i=this.getEdgeFromPoint(e);let n=i;for(;;){const e=this.calculateCircleCenter(n);t.push(e);const s=this.getNextDEdge(n,1);if(s===i)break;n=s}}getNearestPoint(t){this.isInfinitePointFromPoint(t)&&r("Not supported for the infinite point");const e=this.getPointXY(t);let i=this.m_pointZero,n=Number.MAX_VALUE;const s=this.getEdgeFromPoint(t);let o=s;do{const t=this.getPointFromEdge(this.getTwinEdge(o));if(!this.isInfinitePointFromPoint(t)){const s=g.sqrDistance(e,this.getPointXY(t));s<n&&(i=t,n=s)}o=this.getCounterClockwiseEdge(o)}while(o!==s);return i}addConstraint(t,e){const i=[null],n=[null];if(!this.constraintFindFirstEdge(i,n,t,e))return y(n[0],i[0]);i[0]=this.getTwinEdge(i[0]);const s=this.getPointXY(t),o=this.getPointXY(e),h=[new Array(0),new Array(0)],d=i[0];for(;;){const t=this.getClockwiseEdge(n[0]);t.getMask()&&r("add_constraint");const d=y(t,this.getTwinEdge(t));this.deleteTwinEdges(d,!0);const g=this.getCounterClockwiseEdge(this.getTwinEdge(i[0])),a=this.getTwinEdge(this.getClockwiseEdge(n[0])),c=this.getPointFromEdge(a);if(c===e){h[0].push(i[0]),i[0]=g,h[1].push(n[0]),n[0]=a;break}const l=this.orientation(s,o,this.getPointXY(c));0===l&&r("add_constraint - point on constraint"),0<l?(h[0].push(i[0]),i[0]=g):(h[1].push(n[0]),n[0]=a)}h[0].push(i[0]),h[1].push(n[0]);const g=this.newPairEdge();g.first.setMask(),g.second.setMask(),this.join(n[0],d,1,1,g),this.triangulateConstraint(h[0],1,h[0].length-1,g),h[1].reverse();const a=y(g.second,g.first);return this.triangulateConstraint(h[1],1,h[1].length-1,a),a}verify(){for(let t=0,e=this.m_edges.length;t<e;t++){const e=this.m_edges[t];if(!e.getMask()&&!this.testEdge(e))return!1}return!0}getDelaunayTriangleCount(){return this.m_points.length-2<<1}getVoronoiSegments(t=Number.MAX_VALUE){const e=[];for(let i=0,n=this.m_edges.length;i<n;i+=2){const n=y(null,null);if(n.first=this.m_edges[i],n.second=n.first.twin,this.isInfinitePointFromEdge(n.first)&&(n.second=u(n.first,n.first=n.second)),this.isInfinitePointFromEdge(n.second)){const i=d(g,3);i[0]=this.calculateCircleCenter(this.getNextDEdge(n.first,0).twin,1),i[2]=this.calculateCircleCenter(this.getNextDEdge(n.first,1),1);const s=d(g,2);s[0].assign(i[0]),s[1].assign(i[2]),s[0].rightPerpendicularThis(),s[1].leftPerpendicularThis(),i[1]=i[0].add(s[0]).add(i[2].add(s[1])),i[1].normalize();for(const e of i)e.mulThis(t);const o=X();o.points[0]=n.first.p,o.points[1]=n.second.p;for(let t=0;t<i.length-1;t++){for(let e=0;e<2;e++)o.p[e]=i[t+e];o.p[0].equals(o.p[1])||e.push(o)}}else if(this.isInfinitePointFromEdge(this.getNextDEdge(n.first,0).twin)&&this.isInfinitePointFromEdge(this.getNextDEdge(n.first,1).twin)){const t=d(g,3);t[0]=this.calculateCircleCenter(n.first),t[1]=this.getPointXY(this.getPointFromEdge(n.first)).add(this.getPointXY(this.getPointFromEdge(n.second))).mul(.5),t[2]=this.calculateCircleCenter(n.second);const i=X();i.points[0]=n.first.p,i.points[1]=n.second.p;for(let n=0;n<t.length-1;n++){for(let e=0;e<2;e++)i.p[e]=t[n+e];i.p[0].equals(i.p[1])||e.push(i)}}else{const t=X();t.p[0]=this.calculateCircleCenter(n.first),t.p[1]=this.calculateCircleCenter(n.second),t.points[0]=n.first.p,t.points[1]=n.second.p,t.p[0].equals(t.p[1])||e.push(t)}}return e}startDelaunayTriangles(){return-1}nextDelaunayTriangle(t,e){for(;;){if(++e[0],e[0]===this.m_edges.length)return!1;const i=this.m_edges[e[0]];if(t.p[0]=this.getPointFromEdge(i),this.isInfinitePointFromPoint(t.p[0]))continue;const n=this.getTwinEdge(i);if(t.p[1]=this.getPointFromEdge(n),this.isInfinitePointFromPoint(t.p[1]))continue;if(this.getPointXY(t.p[1]).lt(this.getPointXY(t.p[0])))continue;const s=this.getTwinEdge(this.getNextDEdge(i,1));if(t.p[2]=this.getPointFromEdge(s),!this.isInfinitePointFromPoint(t.p[2])&&!this.getPointXY(t.p[2]).lt(this.getPointXY(t.p[0])))return!0}}getPointCount(){return this.m_points.length-1}getPoint(t){return this.m_points[t+1]}getInfinitePoint(){return this.m_pointZero}isInfinitePointFromPoint(t){return t===this.m_pointZero}getPointXY(t){return t.p}getPointIndex(t){return t.userData}setPointIndex(t,e){t.userData=e}getEdgeFromPoint(t){return t.edge}isInfinitePointFromEdge(t){return t.p===this.m_pointZero}getEdgeCount(){return this.m_edges.length}getEdge(t){return this.m_edges[t]}getEdgeIndex(t){return t.getIndex()}getPointFromEdge(t){return t.p}getPointXYFromEdge(t){return t.p.p}getCounterClockwiseEdge(t){return t.a[0]}getClockwiseEdge(t){return t.a[1]}getTwinEdge(t){return t.twin}getPreviousEdge(t){return this.getTwinEdge(this.getCounterClockwiseEdge(t))}getNextEdge(t){return this.getClockwiseEdge(this.getTwinEdge(t))}getNextDEdge(t,e=1){return t.a[e]}newPairEdge(){const t=y(this.m_nextFreePairEdge.first,this.m_nextFreePairEdge.second);return this.m_nextFreePairEdge.first=this.m_nextFreePairEdge.first.nextFreeEdge(),this.m_nextFreePairEdge.second=this.m_nextFreePairEdge.second.nextFreeEdge(),t.first.twin=t.second,t.second.twin=t.first,t}newPairEdgeEx(t,e){let i;if(e&&null!==this.m_nextFreePairEdge.first)i=y(this.m_nextFreePairEdge.first,this.m_nextFreePairEdge.second),this.m_nextFreePairEdge.first=this.m_nextFreePairEdge.first.nextFreeEdge(),this.m_nextFreePairEdge.second=this.m_nextFreePairEdge.second.nextFreeEdge();else{const e=t[0]++,n=t[0]++;i=y(this.m_edges[e],this.m_edges[n])}return i.first.twin=i.second,i.second.twin=i.first,i}insertEdge(t,e,i){e.p=t.p;const n=t.a[i],s=e.a;s[i]=n,s[1-i]=t,t.a[i]=e,n.a[1-i]=e}insertPoint(t,e){const i=this.m_points[t],n=this.newPairEdgeEx(e,!1),s=n.first,o=n.second;i.edge=n.first,s.p=this.m_points[t],s.a[0]=n.first,s.a[1]=n.first,o.p=this.m_pointZero,o.a[0]=n.second,o.a[1]=n.second,null===this.m_points[0].edge&&(this.m_points[0].edge=n.second)}deleteTwinEdges(t,e){this.deleteEdge(t.first),this.deleteEdge(t.second),e&&(t.first.twin=this.m_nextFreePairEdge.first,t.second.twin=this.m_nextFreePairEdge.second,this.m_nextFreePairEdge=t)}join(t,e,i,n,s){this.insertEdge(t,s.first,i),this.insertEdge(e,s.second,n)}joinEdges2(t,e){t.a[1]=e,e.a[0]=t}checkEdge(t,e,i,n,s){for(;;){const o=y(null,null);if(o.first=this.getNextDEdge(t.first,n),o.second=o.first.twin,this.isInfinitePointFromEdge(o.second))return t;const r=this.getPointXYFromEdge(t.second),h=this.getPointXYFromEdge(o.second);if(this.inCircle(e,i,r,h)<=0)return t;if(this.deleteTwinEdges(t,s),!s){const e=this.getNextDEdge(t.second,n).twin;this.join(o.second,e,n,n,t)}t=o}}calculateCircleCenter(t,e=Number.MAX_VALUE){const i=this.getPointXYFromEdge(t),n=this.getPointXYFromEdge(t.twin),s=this.getNextDEdge(t,0);if(this.isInfinitePointFromEdge(s.twin)){const t=new g;if(Number.isNaN(e))t.setNAN();else{const s=n.sub(i);s.leftPerpendicularThis(),t.assign(s),t.divThis(Math.max(Math.abs(t.x),Math.abs(t.y))),t.normalize(),t.mulThis(e)}return t}const o=this.getPointXYFromEdge(s.twin);return this.calculateCircleCenterFromThreePoints(i,n,o)}createZeroHandle(){return this.m_points[0]}deleteEdge(t){const e=t,i=e.p;i.edge===t&&(i.edge=e.a[0]),e.a[0].a[1]=e.a[1],e.a[1].a[0]=e.a[0]}testEdge(t){if(this.isInfinitePointFromEdge(t))return!0;const e=t.twin;if(this.isInfinitePointFromEdge(e))return!0;const i=this.getNextDEdge(t,0).twin,n=this.getNextDEdge(e,0).twin;if(this.isInfinitePointFromEdge(i)||this.isInfinitePointFromEdge(n))return!0;const s=this.getPointXYFromEdge(t),o=this.getPointXYFromEdge(e),r=this.getPointXYFromEdge(i),h=this.getPointXYFromEdge(n);return!(this.orientation(s,o,r)<=0)&&(!(0<=this.orientation(s,o,h))&&this.inCircle(s,o,r,h)<=0)}findMaxSide(t,e){const i=[this.m_points[t].p.clone(),this.m_points[t].p.clone()];for(t++;t!==e;t++){const e=this.m_points[t].p;e.x<i[0].x&&(i[0].x=e.x),i[1].x<e.x&&(i[1].x=e.x),e.y<i[0].y&&(i[0].y=e.y),i[1].y<e.y&&(i[1].y=e.y)}return i[1].x-i[0].x<i[1].y-i[0].y?1:0}findEdge(t,e,i){let n=!1,s=0;for(;;){const o=y(null,null);if(o.second=this.getNextDEdge(t[s].second,i^s),o.first=o.second.twin,0===i&&this.orientation(this.getPointXYFromEdge(t[0].first),this.getPointXYFromEdge(t[1].first),this.getPointXYFromEdge(o.first))<0||1===i&&0<this.orientation(this.getPointXYFromEdge(t[0].first),this.getPointXYFromEdge(t[1].first),this.getPointXYFromEdge(o.first)))t[s]=o,e[s]=!0,n=!1;else{if(n)return;s^=1,n=!0}}}findEdgeSide(t,e,i,n){for(;;){const s=y(null,null);if(s.second=this.getNextDEdge(t[i].second,n^i),s.first=s.second.twin,!(0===n&&this.orientation(this.getPointXYFromEdge(t[0].first),this.getPointXYFromEdge(t[1].first),this.getPointXYFromEdge(s.first))<0||1===n&&0<this.orientation(this.getPointXYFromEdge(t[0].first),this.getPointXYFromEdge(t[1].first),this.getPointXYFromEdge(s.first))))return;t[i]=s,e[i]=!0}}merge(t,e,i,n,s){const o={...t},r={...n},h={...s};let d={...e},g={...i};const a=d.second,c=g.second;for(;;){if(this.join(d.first,g.first,0,1,h),d.first=this.getNextDEdge(h.first,0),g.first=this.getNextDEdge(h.second,1),d.first===o.first&&g.first===r.first){this.joinEdges2(a,c),this.joinEdges2(r.second,o.second);break}d.second=d.first.twin,g.second=g.first.twin;const t=this.getPointXYFromEdge(h.first),e=this.getPointXYFromEdge(h.second);if(d.first===o.first){let i=y(null,null);i.first=this.getNextDEdge(g.first,1),i.second=i.first.twin,i=this.checkEdge(i,t,e,1,!1),b(d,h),b(h,g),g=y(i.second,i.first)}else if(g.first===r.first){let i=y(null,null);i.first=this.getNextDEdge(d.first,0),i.second=i.first.twin,i=this.checkEdge(i,t,e,0,!1),g=y(h.second,h.first),b(h,d),d=y(i.second,i.first)}else{let i=y(null,null);i.first=this.getNextDEdge(d.first,0),i.second=i.first.twin,i=this.checkEdge(i,t,e,0,!1);let n=y(null,null);n.first=this.getNextDEdge(g.first,1),n.second=n.first.twin,n=this.checkEdge(n,t,e,1,!1);const s=this.getPointXYFromEdge(i.second),o=this.getPointXYFromEdge(n.second);let r=this.inCircle(t,e,s,o);0===r&&(r=this.orientation(t,e,o)),0<r?(b(d,h),b(h,g),g=y(n.second,n.first)):(g=y(h.second,h.first),b(h,d),d=y(i.second,i.first))}this.deleteTwinEdges(h,!1)}}findEdgeClockwise(t,e,i,n,s,o){for(t[0]=n;;){e[0]=t[0],++e[0]===i.length&&(e[0]=0);const n=this.orientation(s,o,this.getPointXYFromEdge(i[e[0]]));if(n<=0)return n<0;t[0]=e[0]}}findEdgeCounterClockwise(t,e,i,n,s,o){for(e[0]=n;;){t[0]=0!==e[0]?e[0]:i.length,t[0]--;const n=this.orientation(s,o,this.getPointXYFromEdge(i[t[0]]));if(0<=n)return 0<n;e[0]=t[0]}}constraintFindFirstEdge(t,e,i,n){const s=[];{const o=this.getEdgeFromPoint(i);let r=o;do{const i=this.getTwinEdge(r);if(this.getPointFromEdge(i)===n)return t[0]=i,e[0]=r,t[0].setMask(),e[0].setMask(),!1;s.push(i),r=this.getClockwiseEdge(r)}while(r!==o)}s.length<3&&r("add_constraint");let o=-1;for(let c=0,l=s.length;c<l;c++)this.isInfinitePointFromEdge(s[c])&&(-1!==o&&r("add_constraint"),o=c);const h=this.getPointXY(i),d=this.getPointXY(n);let g,a;if(-1!==o){x(s,0,o+1,s.length),s.pop();0===this.orientation(h,d,this.getPointXYFromEdge(s[0]))&&r("add_constraint - point on constraint");for(0===this.orientation(h,d,this.getPointXYFromEdge(s.at(-1)))&&r("add_constraint - point on constraint"),g=0,a=s.length-1;g+1!==a;){const t=g+a>>1,e=this.orientation(h,d,this.getPointXYFromEdge(s[t]));0===e&&r("add_constraint - point on constraint"),0<e?g=t:a=t}}else{let t=0,e=this.orientation(h,d,this.getPointXYFromEdge(s[t]));if(0!==e)if(0<e){const e=[0],i=[0];this.findEdgeClockwise(e,i,s,t,h,d)||r("add_constraint"),g=e[0],a=i[0]}else{const e=[0],i=[0];this.findEdgeCounterClockwise(e,i,s,t,h,d)||r("add_constraint"),g=e[0],a=i[0]}else{t++,e=this.orientation(h,d,this.getPointXYFromEdge(s[t])),e<=0&&r("add_constraint");const i=[0],n=[0];this.findEdgeClockwise(i,n,s,t,h,d)||r("add_constraint"),g=i[0],a=n[0]}}return t[0]=s[g],e[0]=s[a],!0}triangulateConstraint(t,e,i,n){if(e===i)return;let s=i;for(let o=e;o!==i;++o)this.inCircle(this.getPointXYFromEdge(n.first),this.getPointXYFromEdge(n.second),this.getPointXYFromEdge(t[s]),this.getPointXYFromEdge(t[o]))<0&&(s=o);if(s!==i){const e=this.newPairEdge();this.join(n.first,t[s],1,1,e),t[s]=e.second,this.triangulateConstraint(t,s+1,i,e)}if(s!==e){const i=this.newPairEdge();this.join(t[s],n.second,1,0,i),this.triangulateConstraint(t,e,s-1,i)}}insideLine(t,e,i){return 0===this.orientation(t,e,i)&&(e.x<t.x!=e.x<i.x||e.y<t.y!=e.y<i.y)}orientation(t,e,i){return g.orientationRobust(t,e,i)}inCircle(t,e,i,n){return g.inCircleRobust(t,e,i,n)}calculateCircleCenterFromThreePoints(t,e,i){return e.lt(t)&&(e=u(t,t=e)),i.lt(e)&&(i=u(e,e=i)),e.lt(t)&&(e=u(t,t=e)),g.calculateCircleCenterFromThreePoints(t,e,i)}compare(t,e){return 3*((j(t[0]<e[0])<<1)+j(t[0]>e[0]))+(j(t[1]<e[1])<<1)+j(t[1]>e[1])-1}caseFromCompare(t,e,i){return(this.compare(t,e)<<6)+(this.compare(t,i)<<3)+this.compare(e,i)}}function j(t){return t?1:0}function A(t,e,i){return t[i]!==e[i]?t[i]<e[i]:t[1-i]<e[1-i]}function v(t){return 255&t}N.c_aTableDelaunayTriangulationSolution=Uint8Array.from([41,74,0,0,0,0,0,0,0,206,0,0,0,0,0,0,0,0,0,0,65,0,0,0,0,0,33,33,65,0,0,0,0,0,0,0,193,0,0,0,0,0,0,0,0,0,0,214,0,0,0,0,0,86,54,86,0,0,0,0,0,0,0,214,173,0,0,0,0,0,0,0,107,239,0,0,0,0,0,0,0,0,0,181,0,0,0,0,0,0,0,181,0,0,0,0,0,0,117,117,245,0,0,0,0,0,0,0,0,0,103,0,0,0,0,0,0,0,167,0,0,0,0,0,0,231,103,231,0,0,0,0,0,0,50,0,0,0,0,0,0,0,0,198,0,0,41,0,0,74,0,0,49,0,0,49,0,0,50,0,0,194,0,0,193,0,0,194,0,0,0,0,0,206,0,0,0,0,0,0,0,0,54,0,0,0,0,0,0,0,0,198,0,0,0,0,0,82,50,82,0,0,0,0,0,0,0,198,0,66,0,0,65,0,0,66,49,66,33,57,65,82,50,90,0,194,0,0,193,0,0,194,0,0,0,0,0,0,0,214,0,0,0,0,0,86,54,86,0,0,0,0,0,0,0,222,0,0,0,0,0,0,178,0,0,0,0,0,0,230,102,230,177,0,0,177,0,0,178,0,177,0,0,177,0,0,178,0,113,226,113,113,249,226,122,226,0,0,0,0,0,0,102,0,0,0,0,0,0,0,190,0,0,0,0,0,0,230,102,230,0,0,0,165,0,0,0,0,0,0,0,0,243,0,0,0,0,0,173,0,0,0,0,0,0,0,0,165,0,0,0,0,0,0,0,0,245,0,0,0,0,0,107,0,0,239,0,0,163,0,0,163,0,0,167,0,0,247,0,0,243,0,0,247,0,0,37,37,69,0,0,0,0,0,0,0,211,0,0,0,0,0,0,0,69,0,0,0,0,0,37,37,69,0,0,0,0,0,0,0,221,0,0,0,0,215,0,0,211,0,0,215,35,87,35,35,91,87,63,87,0,215,0,0,211,0,0,215,0,0,0,165,0,0,0,0,0,0,115,115,243,0,0,0,0,0,0,181,0,0,0,0,0,0,0,189,0,0,0,0,0,0,117,117,245,0,0,0,99,0,0,99,0,0,103,0,163,0,0,163,0,0,167,0,99,247,115,123,243,231,103,255]);class M{constructor(t){this.m_numberOfSets=t,this.m_elements=Array.from({length:t},((t,e)=>e)),this.m_sizes=f(t,1)}getNumberOfSets(){return this.m_numberOfSets}connected(t,e){return this.findRoot(t)===this.findRoot(e)}connect(t,e){const i=this.findRoot(t),n=this.findRoot(e);return i!==n&&(this.m_sizes[i]<this.m_sizes[n]?(this.m_sizes[n]+=this.m_sizes[i],this.m_elements[i]=n):(this.m_sizes[i]+=this.m_sizes[n],this.m_elements[n]=i),--this.m_numberOfSets,!0)}connectRange(t,e,i){if(e!==i)for(let n=e;n<i;++n)this.connect(t[e],t[n])}size(){return this.m_elements.length}size1(t){return h(0),0}findRoot(t){let e=t;if(this.m_elements[e]!==e)do{this.m_elements[e]=this.m_elements[this.m_elements[e]],e=this.m_elements[e]}while(this.m_elements[e]!==e);return e}}function S(){return l(Number.NaN,l([0,0,0],[0,0,0]))}function G(t,e){if(t.first!==e.first)return t.first-e.first;let i=t.second.first,n=e.second.first;for(let s=0;s<3;++s)if(i[s]!==n[s])return i[s]-n[s];i=t.second.second,n=e.second.second;for(let s=0;s<3;++s)if(i[s]!==n[s])return i[s]-n[s];return 0}class q{getOperatorType(){return 10112}accelerateGeometry(t,e,i){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!1}executeMany(t,e,i,n){return new z(t,e,i,n)}execute(t,e,i,n=null){const s=new z(null,e,!1,i);s.addGeometry(t);return s.buildAlphaShape(n)}}class z extends t{alphaShapeConstruct(t,e){const i=t.getEdgeCount(),n=new p({vd:this.m_vertexDescription});if(!n)throw new Error("alphaShapeConstruct");for(let s=0;s<i;++s){if(2!==e[s])continue;const i=y(null,null);i.first=t.getEdge(s),i.second=t.getTwinEdge(i.first);if(1!==e[t.getEdgeIndex(i.second)])continue;t.getPointXYFromEdge(i.first),n.startPath(t.getPointXYFromEdge(i.first));let o=s,r=i.second;for(;;){for(e[o]=3,r=t.getCounterClockwiseEdge(r);1===e[t.getEdgeIndex(r)];)r=t.getCounterClockwiseEdge(r);if(r===i.first)break;n.lineTo(t.getPointXYFromEdge(r)),o=t.getEdgeIndex(r),r=t.getTwinEdge(r)}}return n}alphaShape(t,e){const i=t.getEdgeCount(),n=new Uint8Array(i);for(let s=0;s<i;++s){if(0!==n[s])continue;const i=Y(),o=t.getEdge(s);i.p[0]=t.getPointFromEdge(o);const r=t.getClockwiseEdge(t.getTwinEdge(o));i.p[1]=t.getPointFromEdge(r);const h=t.getEdgeIndex(r),a=t.getClockwiseEdge(t.getTwinEdge(r));i.p[2]=t.getPointFromEdge(a);const c=t.getEdgeIndex(a);let l=1;for(let e=0;e<3;++e)if(t.isInfinitePointFromPoint(i.p[e])){l=2;break}if(1===l){const n=d(g,3);for(let e=0;e<3;++e)n[e]=t.getPointXY(i.p[e]);const s=g.sqrDistance(n[0],n[1]),o=g.sqrDistance(n[1],n[2]),r=g.sqrDistance(n[2],n[0]),h=2*n[1].sub(n[0]).crossProduct(n[2].sub(n[0]));e<s*o*r/(h*h)&&(l=2)}n[s]=n[h]=n[c]=l}return this.alphaShapeConstruct(t,n)}alphaShapeAlphaOut(t,e){const i=t.getEdgeCount(),n=new Uint8Array(i),s=[],o=new M(t.getPointCount());for(let h=0;h<i;++h){if(0!==n[h])continue;const e=Y(),i=t.getEdge(h);e.p[0]=t.getPointFromEdge(i);const o=t.getClockwiseEdge(t.getTwinEdge(i));e.p[1]=t.getPointFromEdge(o);const r=t.getEdgeIndex(o),d=t.getClockwiseEdge(t.getTwinEdge(o));e.p[2]=t.getPointFromEdge(d);const a=t.getEdgeIndex(d);let c=1;for(let n=0;n<3;++n)if(t.isInfinitePointFromPoint(e.p[n])){c=2;break}if(1===c){const i=new Array(3);for(let s=0;s<3;++s)i[s]=t.getPointXY(e.p[s]);const n=g.sqrDistance(i[0],i[1]),o=g.sqrDistance(i[1],i[2]),d=g.sqrDistance(i[2],i[0]),l=i[1].sub(i[0]).crossProduct(i[2].sub(i[0])),u=S();u.first=n*o*d/(l*l),u.second.first[0]=h,u.second.first[1]=r,u.second.first[2]=a,u.second.second[0]=t.getPointIndex(e.p[0]),u.second.second[1]=t.getPointIndex(e.p[1]),u.second.second[2]=t.getPointIndex(e.p[2]),s.push(u),c=2}n[h]=n[r]=n[a]=c}s.sort(((t,e)=>G(t,e)));let r=0;for(const h of s){if(1===o.getNumberOfSets()&&h.first!==r)break;n[h.second.first[0]]=n[h.second.first[1]]=n[h.second.first[2]]=1;const t=[h.second.second[0],h.second.second[1],h.second.second[2]];o.connectRange(t,0,3),r=h.first}return e&&(e[0]=.25*r),this.alphaShapeConstruct(t,n)}constructor(t,e,i,n){super(),this.m_multiPointForAttributes=null,this.m_inputGeometryCursor=null,this.m_index=-1,this.m_nDelaunayPoints=0,this.m_cDelaunay=new N,this.m_vertexDescription=null,this.m_progressTracker=n,this.m_alpha=Number.isNaN(e)||!Number.isFinite(e)||e<0?-1:e<Number.MIN_VALUE?0:e,this.m_bMerge=i,this.m_bDone=!1,this.m_inputGeometryCursor=t,this.prepareDelaunay()}prepareDelaunay(){this.m_nDelaunayPoints=0,this.m_cDelaunay.clear(),0!==this.m_alpha&&this.m_cDelaunay.prepare(a())}next(){if(this.m_bMerge){if(!this.m_bDone){const t=this.calculateAlphaShapeMerging(this.m_inputGeometryCursor,this.m_progressTracker);return this.m_bDone=!0,t}return null}if(!this.m_bDone){const t=this.m_inputGeometryCursor.next();if(null!==t)return i(t),n(t),this.m_index=this.m_inputGeometryCursor.getGeometryID(),this.calculateAlphaShape(t,this.m_progressTracker);this.m_bDone=!0}return null}tock(){return!0}getRank(){return 1}getGeometryID(){return this.m_index}calculateAlphaShapeMerging(t,e){let s;for(;s=t.next();)i(s),n(s),this.addGeometry(s);return this.buildAlphaShape()}calculateAlphaShape(t,e){return t.isEmpty()?new p({vd:t.getDescription()}):(this.prepareDelaunay(),this.addGeometry(t),this.buildAlphaShape())}buildAlphaShape(t=null){if(t&&(t[0]=this.m_alpha),0===this.m_alpha)return this.m_vertexDescription?new p({vd:this.m_vertexDescription}):new p;if(this.m_cDelaunay.removeDuplicates())for(let e=0,i=this.m_cDelaunay.getPointCount();e<i;++e)this.m_cDelaunay.setPointIndex(this.m_cDelaunay.getPoint(e),e);if(!this.m_cDelaunay.construct())return this.m_vertexDescription?new p({vd:this.m_vertexDescription}):new p;return this.m_alpha<0?this.alphaShapeAlphaOut(this.m_cDelaunay,t):this.alphaShape(this.m_cDelaunay,this.m_alpha)}addGeometry(t){if(i(t),n(t),0===this.m_alpha)return;if(this.m_vertexDescription&&this.m_bMerge||(this.m_vertexDescription=t.getDescription(),this.m_vertexDescription.getAttributeCount()>1?this.m_multiPointForAttributes=new E({vd:this.m_vertexDescription}):this.m_multiPointForAttributes=null),t.isEmpty())return;const e=t.getGeometryType();if(s(e)){const e=t,i=new g;for(let t=0,n=e.getPointCount();t<n;t++)e.queryXY(t,i),this.m_cDelaunay.addVertex(i,this.m_nDelaunayPoints++);this.m_multiPointForAttributes&&this.m_multiPointForAttributes.addPoints(e,0,-1)}else if(e===o.enumPoint){const e=t,i=e.getXY();this.m_cDelaunay.addVertex(i,this.m_nDelaunayPoints++),this.m_multiPointForAttributes&&this.m_multiPointForAttributes.add(e)}else r("bad geometry type")}}const V=new q;function O(t,e,i){return V.execute(t,e,null,i)}function Z(t,i,n){const s=V.executeMany(new e(t),i,n,null);return Array.from(s)}function R(){return V.supportsCurves()}export{O as execute,Z as executeMany,R as supportsCurves};
@@ -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{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{E as r,n as s}from"../../../chunks/QuadraticBezier.js";import{G as o,p as n}from"../../../chunks/Geometry.js";import{Envelope2D as m}from"../../../chunks/Envelope2D.js";import{a as i}from"../../../chunks/Envelope.js";import{h as u,al as l}from"../../../chunks/ProjectionTransformation.js";class p{getOperatorType(){return 10008}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,r,s){const o=(new u).executeMany(e,r,s);return new c(o,t,r,s)}}class c extends e{constructor(e,t,r,s){super(),this.m_resultPolygons=null,this.m_polygons=e,this.m_polylines=t,this.m_sr=r,this.m_progressTracker=s,this.m_bFirst=!0}tock(){return!0}getRank(){return 1}next(){return this.m_bFirst&&(this.performOperation(),this.m_bFirst=!1),this.m_resultPolygons?this.m_resultPolygons.next():null}getGeometryID(){return null!=this.m_resultPolygons?this.m_resultPolygons.getGeometryID():-1}performOperation(){const e=new m,t=new r;let u,p=s;for(;u=this.m_polylines.next();){if(u.getGeometryType()!==o.enumPolyline||u.isEmpty())continue;p===s?p=t.addGeometry(u):t.appendGeometry(p,u);const r=new m;u.queryEnvelope(r),e.mergeEnvelope2D(r)}if(0===t.getTotalPointCount())return;for(;u=this.m_polygons.next();){if(!n(u.getGeometryType())||u.isEmpty())continue;const r=new m;u.queryEnvelope(r),e.mergeEnvelope2D(r),t.addGeometry(u)}const c=i(this.m_sr,e,!0);this.m_resultPolygons=l(t,p,c,this.m_progressTracker)}}const a=new p;function y(e,r,s){const o=a.execute(new t(e),new t(r),s,null);return Array.from(o)}function h(){return a.supportsCurves()}export{y as execute,h as supportsCurves};
5
+ import{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{E as r,n as s}from"../../../chunks/QuadraticBezier.js";import{G as o,p as n}from"../../../chunks/Geometry.js";import{Envelope2D as m}from"../../../chunks/Envelope2D.js";import{c as i}from"../../../chunks/Envelope.js";import{j as u,al as l}from"../../../chunks/ProjectionTransformation.js";class p{getOperatorType(){return 10008}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,r,s){const o=(new u).executeMany(e,r,s);return new c(o,t,r,s)}}class c extends e{constructor(e,t,r,s){super(),this.m_resultPolygons=null,this.m_polygons=e,this.m_polylines=t,this.m_sr=r,this.m_progressTracker=s,this.m_bFirst=!0}tock(){return!0}getRank(){return 1}next(){return this.m_bFirst&&(this.performOperation(),this.m_bFirst=!1),this.m_resultPolygons?this.m_resultPolygons.next():null}getGeometryID(){return null!=this.m_resultPolygons?this.m_resultPolygons.getGeometryID():-1}performOperation(){const e=new m,t=new r;let u,p=s;for(;u=this.m_polylines.next();){if(u.getGeometryType()!==o.enumPolyline||u.isEmpty())continue;p===s?p=t.addGeometry(u):t.appendGeometry(p,u);const r=new m;u.queryEnvelope(r),e.mergeEnvelope2D(r)}if(0===t.getTotalPointCount())return;for(;u=this.m_polygons.next();){if(!n(u.getGeometryType())||u.isEmpty())continue;const r=new m;u.queryEnvelope(r),e.mergeEnvelope2D(r),t.addGeometry(u)}const c=i(this.m_sr,e,!0);this.m_resultPolygons=l(t,p,c,this.m_progressTracker)}}const a=new p;function y(e,r,s){const o=a.execute(new t(e),new t(r),s,null);return Array.from(o)}function h(){return a.supportsCurves()}export{y as execute,h as supportsCurves};
@@ -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{S as e,G as t}from"../../../chunks/SimpleGeometryCursor.js";import{t as r,c as n,d as s}from"../../../chunks/Geometry.js";import{h as i}from"../../../chunks/ProjectionTransformation.js";import{Envelope2D as u}from"../../../chunks/Envelope2D.js";import{B as o}from"../../../chunks/Bufferer-DjC-SKTJ.js";class m{getOperatorType(){return 10004}supportsCurves(){return!0}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,r,n,s){return this.executeManyEx(e,t,r,Number.NaN,96,n,s)}execute(t,s,i,u){Number.isFinite(i)||r("Invalid distance for buffer operation");const o=new e([t]),m=[i],c=this.executeMany(o,s,m,!1,u).next();return c||n("null buffer output"),c}executeManyEx(e,t,n,s,u,o,m){if(void 0!==n.find((e=>!Number.isFinite(e)))&&r("Invalid distance for buffer operation"),o){const r=new c(e,t,n,s,u,!1,m);return(new i).executeMany(r,t,m,2)}return new c(e,t,n,s,u,!1,m)}}class c extends t{constructor(e,t,r,n,s,i,m){super(),this.m_currentUnionEnvelope2D=new u,this.m_index=-1,this.m_dindex=-1,this.m_progressTracker=m,this.m_bufferer=new o(m),this.m_inputGeoms=e,this.m_spatialReference=t,this.m_distances=r,this.m_maxDeviation=n,this.m_maxVerticesInFullCircle=s}tock(){return!0}getRank(){return 1}next(){{let e;for(;e=this.m_inputGeoms.next();)return s(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.m_dindex+1<this.m_distances.length&&this.m_dindex++,this.buffer(e,this.m_distances[this.m_dindex]);return null}}getGeometryID(){return this.m_index}buffer(e,t){return this.m_bufferer.buffer(e,t,this.m_spatialReference,0,0,4,this.m_maxDeviation,this.m_maxVerticesInFullCircle)}}const a=new m;function f(e,t,r){return a.execute(e,t,r,null)}function h(t,r,n,s){const i=a.executeMany(new e(t),r,n,s,null);return Array.from(i)}function l(t,r,n,s,i,u){const o=a.executeManyEx(new e(t),r,n,s,i,u,null);return Array.from(o)}function x(){return a.supportsCurves()}export{f as execute,h as executeMany,l as executeManyEx,x as supportsCurves};
5
+ import{S as e,G as t}from"../../../chunks/SimpleGeometryCursor.js";import{t as r,c as n,d as s}from"../../../chunks/Geometry.js";import{j as i}from"../../../chunks/ProjectionTransformation.js";import{Envelope2D as u}from"../../../chunks/Envelope2D.js";import{B as o}from"../../../chunks/Bufferer-B-V7yYm-.js";class m{getOperatorType(){return 10004}supportsCurves(){return!0}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,r,n,s){return this.executeManyEx(e,t,r,Number.NaN,96,n,s)}execute(t,s,i,u){Number.isFinite(i)||r("Invalid distance for buffer operation");const o=new e([t]),m=[i],c=this.executeMany(o,s,m,!1,u).next();return c||n("null buffer output"),c}executeManyEx(e,t,n,s,u,o,m){if(void 0!==n.find((e=>!Number.isFinite(e)))&&r("Invalid distance for buffer operation"),o){const r=new c(e,t,n,s,u,!1,m);return(new i).executeMany(r,t,m,2)}return new c(e,t,n,s,u,!1,m)}}class c extends t{constructor(e,t,r,n,s,i,m){super(),this.m_currentUnionEnvelope2D=new u,this.m_index=-1,this.m_dindex=-1,this.m_progressTracker=m,this.m_bufferer=new o(m),this.m_inputGeoms=e,this.m_spatialReference=t,this.m_distances=r,this.m_maxDeviation=n,this.m_maxVerticesInFullCircle=s}tock(){return!0}getRank(){return 1}next(){{let e;for(;e=this.m_inputGeoms.next();)return s(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.m_dindex+1<this.m_distances.length&&this.m_dindex++,this.buffer(e,this.m_distances[this.m_dindex]);return null}}getGeometryID(){return this.m_index}buffer(e,t){return this.m_bufferer.buffer(e,t,this.m_spatialReference,0,0,4,this.m_maxDeviation,this.m_maxVerticesInFullCircle)}}const a=new m;function f(e,t,r){return a.execute(e,t,r,null)}function h(t,r,n,s){const i=a.executeMany(new e(t),r,n,s,null);return Array.from(i)}function l(t,r,n,s,i,u){const o=a.executeManyEx(new e(t),r,n,s,i,u,null);return Array.from(o)}function x(){return a.supportsCurves()}export{f as execute,h as executeMany,l as executeManyEx,x as supportsCurves};
@@ -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{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{d as r}from"../../../chunks/Geometry.js";import{h as s}from"../../../chunks/ProjectionTransformation.js";import{Envelope2D as n}from"../../../chunks/Envelope2D.js";import{B as i}from"../../../chunks/Bufferer-DjC-SKTJ.js";class m{getOperatorType(){return 10111}supportsCurves(){return!0}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,r,n,i,m,u,c,h,a,_){if(h){const h=new o(e,t,r,n,i,m,u,c,_);return(new s).executeMany(h,t,_,2)}return new o(e,t,r,n,i,m,u,c,_)}}class o extends e{constructor(e,t,r,s,m,o,u,c,h){super(),this.m_currentUnionEnvelope2D=new n,this.m_index=-1,this.m_dindex=-1,this.m_progressTracker=h,this.m_bufferer=new i(h),this.m_inputGeoms=e,this.m_spatialReference=t,this.m_distances=r,this.m_maxDeviation=u,this.m_maxVerticesInFullCircle=c,this.m_joins=s,this.m_caps=m,this.m_miterLimit=o}tock(){return!0}getRank(){return 1}next(){{let e;for(;e=this.m_inputGeoms.next();)return r(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.m_dindex+1<this.m_distances.length&&this.m_dindex++,this.buffer(e,this.m_distances[this.m_dindex]);return null}}getGeometryID(){return this.m_index}buffer(e,t){return this.m_bufferer.buffer(e,t,this.m_spatialReference,this.m_joins,this.m_caps,this.m_miterLimit,this.m_maxDeviation,this.m_maxVerticesInFullCircle)}}const u=new m;function c(e,r,s,n,i,m,o,c,h){const a=u.executeMany(new t(e),r,s,n,i,m,o,c,h,0,null);return Array.from(a)}function h(){return u.supportsCurves()}export{c as executeMany,h as supportsCurves};
5
+ import{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{d as r}from"../../../chunks/Geometry.js";import{j as s}from"../../../chunks/ProjectionTransformation.js";import{Envelope2D as n}from"../../../chunks/Envelope2D.js";import{B as i}from"../../../chunks/Bufferer-B-V7yYm-.js";class m{getOperatorType(){return 10111}supportsCurves(){return!0}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,r,n,i,m,u,c,h,a,_){if(h){const h=new o(e,t,r,n,i,m,u,c,_);return(new s).executeMany(h,t,_,2)}return new o(e,t,r,n,i,m,u,c,_)}}class o extends e{constructor(e,t,r,s,m,o,u,c,h){super(),this.m_currentUnionEnvelope2D=new n,this.m_index=-1,this.m_dindex=-1,this.m_progressTracker=h,this.m_bufferer=new i(h),this.m_inputGeoms=e,this.m_spatialReference=t,this.m_distances=r,this.m_maxDeviation=u,this.m_maxVerticesInFullCircle=c,this.m_joins=s,this.m_caps=m,this.m_miterLimit=o}tock(){return!0}getRank(){return 1}next(){{let e;for(;e=this.m_inputGeoms.next();)return r(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.m_dindex+1<this.m_distances.length&&this.m_dindex++,this.buffer(e,this.m_distances[this.m_dindex]);return null}}getGeometryID(){return this.m_index}buffer(e,t){return this.m_bufferer.buffer(e,t,this.m_spatialReference,this.m_joins,this.m_caps,this.m_miterLimit,this.m_maxDeviation,this.m_maxVerticesInFullCircle)}}const u=new m;function c(e,r,s,n,i,m,o,c,h){const a=u.executeMany(new t(e),r,s,n,i,m,o,c,h,0,null);return Array.from(a)}function h(){return u.supportsCurves()}export{c as executeMany,h as supportsCurves};
@@ -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{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{m as s,G as r,d as i}from"../../../chunks/Geometry.js";import{E as m,n as o}from"../../../chunks/QuadraticBezier.js";import{Envelope2D as n}from"../../../chunks/Envelope2D.js";import{a as h,P as a}from"../../../chunks/Envelope.js";import{am as _,an as p,ao as u,k as l,s as c,l as y,ap as G,aq as g,C as d,ar as f}from"../../../chunks/ProjectionTransformation.js";class x{getOperatorType(){return 10009}supportsCurves(){return!0}accelerateGeometry(e,t,s){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,s,r=0){return new T(e,t,s,r)}}class T extends e{constructor(e,t,r,i){super(),this.m_shape=new m,this.m_currentGeom=o,this.m_progressCounter=0,this.m_geomIndex=-1,this.m_geomTypeIndex=-1,this.m_index=-1,this.m_bBuilt=!1,this.m_bOutputOnlyModified=!1,this.m_bSimplifyPolygons=!1,this.m_bSnapToSr=!1,this.m_progressTracker=r,this.m_inputGeometries=e,this.m_sr=t,this.m_options=i,1===i||2===i?(this.m_bOutputOnlyModified=!0,this.m_options=0,this.m_bSimplifyPolygons=!0,this.m_bSnapToSr=null!=t&&2===i,this.m_bSnapToSr&&!_()&&s("PE is required for snapping to spatial reference operation")):0===i&&(this.m_bSimplifyPolygons=!0)}progress_(e=!1){}tock(){return!0}getRank(){return 1}moveToNextGeom(){for(;;){if(this.m_bBuilt?this.m_currentGeom=this.m_shape.getNextGeometry(this.m_currentGeom):(this.m_currentGeom=this.m_shape.getFirstGeometry(),this.m_bBuilt=!0),this.m_currentGeom!==o){let e=!1;if(this.m_bSimplifyPolygons&&this.m_shape.getGeometryType(this.m_currentGeom)===r.enumPolygon&&(e=p(this.m_shape,this.m_currentGeom,-1,!1,o,this.m_progressTracker)),this.m_bOutputOnlyModified&&!e&&!this.m_shape.getGeometryModified(this.m_currentGeom))continue}break}}next(){if(this.m_bBuilt)this.moveToNextGeom();else{this.m_geomIndex=this.m_shape.createGeometryUserIndex();const e=new n;for(let o=this.m_inputGeometries.next();null!=o;o=this.m_inputGeometries.next()){this.progress_(),i(o);let t=!1;this.m_bSnapToSr&&(o=o.clone(),t=u(this.m_sr,o));const s=this.m_shape.addGeometry(o);this.m_shape.setGeometryUserIndex(s,this.m_geomIndex,this.m_inputGeometries.getGeometryID());const m=o.getGeometryType();m===r.enumPoint&&(-1===this.m_geomTypeIndex&&(this.m_geomTypeIndex=this.m_shape.createGeometryUserIndex()),this.m_shape.setGeometryUserIndex(s,this.m_geomTypeIndex,m));const h=new n;o.queryLooseEnvelope(h),e.mergeEnvelope2D(h),t&&this.m_shape.setGeometryModified(s,!0)}const t=h(this.m_sr,e,!0),s=h(this.m_sr,e,!1);e.inflate(10*t.total()),this.m_shape.forceSetEnvelope2D(e);let m=null,a=0,_=0;if(this.m_shape.hasCurves()){m=new d;const s=l(t.total(),e);a=c(t.total()),_=f(s,a),y(this.m_shape,s,t.total(),12e3,m,null,this.m_progressTracker)}if(G(this.m_shape,s,this.m_progressTracker)){if(g(this.m_shape,t.add(_),this.m_progressTracker,0===this.m_options,this.m_bOutputOnlyModified),null!==m){if(this.m_bSimplifyPolygons){for(let e=this.m_shape.getFirstGeometry();e!==o;e=this.m_shape.getNextGeometry(e))if(this.m_shape.getGeometryType(e)===r.enumPolygon){p(this.m_shape,e,-1,!1,o,this.m_progressTracker)&&this.m_shape.setGeometryModified(e,!0)}this.m_bSimplifyPolygons=!1}m.stitchCurves(this.m_shape,o,a,!0),m.clearStitcher(this.m_shape)}}else this.m_bSimplifyPolygons=!1,null!==m&&(m.stitchCurves(this.m_shape,o,a,!0),m.clearStitcher(this.m_shape));this.moveToNextGeom()}if(this.m_currentGeom!==o){if(this.m_index=this.m_shape.getGeometryUserIndex(this.m_currentGeom,this.m_geomIndex),-1!==this.m_geomTypeIndex&&this.m_shape.getGeometryUserIndex(this.m_currentGeom,this.m_geomTypeIndex)===r.enumPoint){const e=new a({vd:this.m_shape.getVertexDescription()});return this.m_shape.queryPointGeometryOnly(this.m_currentGeom,e),this.m_bSnapToSr&&u(this.m_sr,e),e}{const e=this.m_shape.getGeometry(this.m_currentGeom);return this.m_bSnapToSr&&u(this.m_sr,e),e}}return null}getGeometryID(){return this.m_index}}const S=new x;function b(e,s,r){const i=S.executeMany(new t(e),s,null,r);return Array.from(i)}function I(){return S.supportsCurves()}export{b as executeMany,I as supportsCurves};
5
+ import{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{r as s,G as r,d as i}from"../../../chunks/Geometry.js";import{E as m,n as o}from"../../../chunks/QuadraticBezier.js";import{Envelope2D as n}from"../../../chunks/Envelope2D.js";import{c as h,P as a}from"../../../chunks/Envelope.js";import{am as _,an as p,ao as u,k as l,s as c,l as y,ap as G,aq as g,C as d,ar as f}from"../../../chunks/ProjectionTransformation.js";class x{getOperatorType(){return 10009}supportsCurves(){return!0}accelerateGeometry(e,t,s){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,s,r=0){return new T(e,t,s,r)}}class T extends e{constructor(e,t,r,i){super(),this.m_shape=new m,this.m_currentGeom=o,this.m_progressCounter=0,this.m_geomIndex=-1,this.m_geomTypeIndex=-1,this.m_index=-1,this.m_bBuilt=!1,this.m_bOutputOnlyModified=!1,this.m_bSimplifyPolygons=!1,this.m_bSnapToSr=!1,this.m_progressTracker=r,this.m_inputGeometries=e,this.m_sr=t,this.m_options=i,1===i||2===i?(this.m_bOutputOnlyModified=!0,this.m_options=0,this.m_bSimplifyPolygons=!0,this.m_bSnapToSr=null!=t&&2===i,this.m_bSnapToSr&&!_()&&s("PE is required for snapping to spatial reference operation")):0===i&&(this.m_bSimplifyPolygons=!0)}progress_(e=!1){}tock(){return!0}getRank(){return 1}moveToNextGeom(){for(;;){if(this.m_bBuilt?this.m_currentGeom=this.m_shape.getNextGeometry(this.m_currentGeom):(this.m_currentGeom=this.m_shape.getFirstGeometry(),this.m_bBuilt=!0),this.m_currentGeom!==o){let e=!1;if(this.m_bSimplifyPolygons&&this.m_shape.getGeometryType(this.m_currentGeom)===r.enumPolygon&&(e=p(this.m_shape,this.m_currentGeom,-1,!1,o,this.m_progressTracker)),this.m_bOutputOnlyModified&&!e&&!this.m_shape.getGeometryModified(this.m_currentGeom))continue}break}}next(){if(this.m_bBuilt)this.moveToNextGeom();else{this.m_geomIndex=this.m_shape.createGeometryUserIndex();const e=new n;for(let o=this.m_inputGeometries.next();null!=o;o=this.m_inputGeometries.next()){this.progress_(),i(o);let t=!1;this.m_bSnapToSr&&(o=o.clone(),t=u(this.m_sr,o));const s=this.m_shape.addGeometry(o);this.m_shape.setGeometryUserIndex(s,this.m_geomIndex,this.m_inputGeometries.getGeometryID());const m=o.getGeometryType();m===r.enumPoint&&(-1===this.m_geomTypeIndex&&(this.m_geomTypeIndex=this.m_shape.createGeometryUserIndex()),this.m_shape.setGeometryUserIndex(s,this.m_geomTypeIndex,m));const h=new n;o.queryLooseEnvelope(h),e.mergeEnvelope2D(h),t&&this.m_shape.setGeometryModified(s,!0)}const t=h(this.m_sr,e,!0),s=h(this.m_sr,e,!1);e.inflate(10*t.total()),this.m_shape.forceSetEnvelope2D(e);let m=null,a=0,_=0;if(this.m_shape.hasCurves()){m=new d;const s=l(t.total(),e);a=c(t.total()),_=f(s,a),y(this.m_shape,s,t.total(),12e3,m,null,this.m_progressTracker)}if(G(this.m_shape,s,this.m_progressTracker)){if(g(this.m_shape,t.add(_),this.m_progressTracker,0===this.m_options,this.m_bOutputOnlyModified),null!==m){if(this.m_bSimplifyPolygons){for(let e=this.m_shape.getFirstGeometry();e!==o;e=this.m_shape.getNextGeometry(e))if(this.m_shape.getGeometryType(e)===r.enumPolygon){p(this.m_shape,e,-1,!1,o,this.m_progressTracker)&&this.m_shape.setGeometryModified(e,!0)}this.m_bSimplifyPolygons=!1}m.stitchCurves(this.m_shape,o,a,!0),m.clearStitcher(this.m_shape)}}else this.m_bSimplifyPolygons=!1,null!==m&&(m.stitchCurves(this.m_shape,o,a,!0),m.clearStitcher(this.m_shape));this.moveToNextGeom()}if(this.m_currentGeom!==o){if(this.m_index=this.m_shape.getGeometryUserIndex(this.m_currentGeom,this.m_geomIndex),-1!==this.m_geomTypeIndex&&this.m_shape.getGeometryUserIndex(this.m_currentGeom,this.m_geomTypeIndex)===r.enumPoint){const e=new a({vd:this.m_shape.getVertexDescription()});return this.m_shape.queryPointGeometryOnly(this.m_currentGeom,e),this.m_bSnapToSr&&u(this.m_sr,e),e}{const e=this.m_shape.getGeometry(this.m_currentGeom);return this.m_bSnapToSr&&u(this.m_sr,e),e}}return null}getGeometryID(){return this.m_index}}const S=new x;function b(e,s,r){const i=S.executeMany(new t(e),s,null,r);return Array.from(i)}function I(){return S.supportsCurves()}export{b as executeMany,I as supportsCurves};