earthsdk3 3.4.0-beta.14 → 3.4.0-beta.16

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 (874) hide show
  1. package/dist/earthsdk3.iife.js +6 -6
  2. package/dist/earthsdk3.js +14 -10
  3. package/dist/earthsdk3.umd.cjs +6 -6
  4. package/dist/types/ESJTypes/index.d.ts.map +1 -0
  5. package/dist/types/ESJTypes/pickedInfos/index.d.ts.map +1 -0
  6. package/dist/types/ESJTypes/properties/ClockType.d.ts.map +1 -0
  7. package/dist/types/ESJTypes/properties/DataType.d.ts.map +1 -0
  8. package/dist/types/ESJTypes/properties/ESJArcType.d.ts.map +1 -0
  9. package/dist/types/ESJTypes/properties/ESJEditingMode.d.ts.map +1 -0
  10. package/dist/types/ESJTypes/properties/ESJEnvironmentMapManager.d.ts.map +1 -0
  11. package/dist/types/ESJTypes/properties/ESJGeoRegion.d.ts.map +1 -0
  12. package/dist/types/ESJTypes/properties/ESJInstances.d.ts.map +1 -0
  13. package/dist/types/ESJTypes/properties/ESJMaterialType.d.ts.map +1 -0
  14. package/dist/types/ESJTypes/properties/ESJResource.d.ts.map +1 -0
  15. package/dist/types/ESJTypes/properties/FillStyleType.d.ts.map +1 -0
  16. package/dist/types/ESJTypes/properties/FlyParamType.d.ts.map +1 -0
  17. package/dist/types/ESJTypes/properties/ParticleEmitterJsonType.d.ts.map +1 -0
  18. package/dist/types/ESJTypes/properties/PointStyleType.d.ts.map +1 -0
  19. package/dist/types/ESJTypes/properties/StrokeStyleType.d.ts.map +1 -0
  20. package/dist/types/ESJTypes/properties/Viewer.d.ts.map +1 -0
  21. package/dist/types/ESJTypes/properties/index.d.ts.map +1 -0
  22. package/dist/types/ESJTypes/props/ColorProperty.d.ts.map +1 -0
  23. package/dist/types/ESJTypes/props/ColorRgbProperty.d.ts.map +1 -0
  24. package/dist/types/ESJTypes/props/DashPatternProperty.d.ts.map +1 -0
  25. package/dist/types/ESJTypes/props/DateProperty.d.ts.map +1 -0
  26. package/dist/types/ESJTypes/props/DatesProperty.d.ts.map +1 -0
  27. package/dist/types/ESJTypes/props/EnumProperty.d.ts.map +1 -0
  28. package/dist/types/ESJTypes/props/EnumStringsProperty.d.ts.map +1 -0
  29. package/dist/types/ESJTypes/props/EvalStringProperty.d.ts.map +1 -0
  30. package/dist/types/ESJTypes/props/FunctionProperty.d.ts.map +1 -0
  31. package/dist/types/ESJTypes/props/GroupProperty.d.ts.map +1 -0
  32. package/dist/types/ESJTypes/props/JsonProperty.d.ts.map +1 -0
  33. package/dist/types/ESJTypes/props/LongStringProperty.d.ts.map +1 -0
  34. package/dist/types/ESJTypes/props/MinmaxProperty.d.ts.map +1 -0
  35. package/dist/types/ESJTypes/props/NativeProperty.d.ts.map +1 -0
  36. package/dist/types/ESJTypes/props/NearFarScalerProperty.d.ts.map +1 -0
  37. package/dist/types/ESJTypes/props/NonreactiveJsonStringProperty.d.ts.map +1 -0
  38. package/dist/types/ESJTypes/props/NumberRangeProperty.d.ts.map +1 -0
  39. package/dist/types/ESJTypes/props/NumberSliderProperty.d.ts.map +1 -0
  40. package/dist/types/ESJTypes/props/ParamsProperty.d.ts.map +1 -0
  41. package/dist/types/ESJTypes/props/PlayerProperty.d.ts.map +1 -0
  42. package/dist/types/ESJTypes/props/PositionProperty.d.ts.map +1 -0
  43. package/dist/types/ESJTypes/props/PositionsProperty.d.ts.map +1 -0
  44. package/dist/types/ESJTypes/props/PositionsSetPropety.d.ts.map +1 -0
  45. package/dist/types/ESJTypes/props/Property.d.ts.map +1 -0
  46. package/dist/types/ESJTypes/props/ReactVarProperty.d.ts.map +1 -0
  47. package/dist/types/ESJTypes/props/RotationProperty.d.ts.map +1 -0
  48. package/dist/types/ESJTypes/props/UriProperty.d.ts.map +1 -0
  49. package/dist/types/ESJTypes/props/ViewPlayerProperty.d.ts.map +1 -0
  50. package/dist/types/ESJTypes/props/WithUndefinedProperty.d.ts.map +1 -0
  51. package/dist/types/ESJTypes/props/index.d.ts.map +1 -0
  52. package/dist/types/ESObjectManager/ESPlyarAndPathTime.d.ts.map +1 -0
  53. package/dist/types/ESObjectManager/PathAnimationManager.d.ts.map +1 -0
  54. package/dist/types/ESObjectManager/SceneObjectEditingManager.d.ts.map +1 -0
  55. package/dist/types/ESObjectManager/SceneObjectsListening.d.ts.map +1 -0
  56. package/dist/types/ESObjectManager/SceneObjectsManager.d.ts.map +1 -0
  57. package/dist/types/ESObjectManager/ViewersManager.d.ts.map +1 -0
  58. package/dist/types/ESObjectManager/index.d.ts.map +1 -0
  59. package/dist/types/ESObjectManager/propTreeCallback.d.ts.map +1 -0
  60. package/dist/types/ESObjectManager/utils.d.ts.map +1 -0
  61. package/dist/types/ESObjects/base/ESGeoVector.d.ts.map +1 -0
  62. package/dist/types/ESObjects/base/ESLabel.d.ts.map +1 -0
  63. package/dist/types/ESObjects/base/ESLocalVector.d.ts.map +1 -0
  64. package/dist/types/ESObjects/base/ESLocalVector2D.d.ts.map +1 -0
  65. package/dist/types/ESObjects/base/ESObjectWithLocation.d.ts.map +1 -0
  66. package/dist/types/ESObjects/base/ESSceneObject/ESObjectsContext.d.ts.map +1 -0
  67. package/dist/types/ESObjects/base/ESSceneObject/RefsManager.d.ts.map +1 -0
  68. package/dist/types/ESObjects/base/ESSceneObject/funcs/createEnvEvalStrReact.d.ts.map +1 -0
  69. package/dist/types/ESObjects/base/ESSceneObject/funcs/replaceStrWithEnv.d.ts.map +1 -0
  70. package/dist/types/ESObjects/base/ESSceneObject/index.d.ts.map +1 -0
  71. package/dist/types/ESObjects/base/ESTestObject.d.ts.map +1 -0
  72. package/dist/types/ESObjects/base/ESVisualObject.d.ts.map +1 -0
  73. package/dist/types/ESObjects/base/index.d.ts.map +1 -0
  74. package/dist/types/ESObjects/general/ES3DTileset/index.d.ts.map +1 -0
  75. package/dist/types/ESObjects/general/ES3DTileset/type.d.ts.map +1 -0
  76. package/dist/types/ESObjects/general/ESAlarm.d.ts.map +1 -0
  77. package/dist/types/ESObjects/general/ESApertureEffect.d.ts.map +1 -0
  78. package/dist/types/ESObjects/general/ESAreaMeasurement.d.ts.map +1 -0
  79. package/dist/types/ESObjects/general/ESBlastParticleSystem.d.ts.map +1 -0
  80. package/dist/types/ESObjects/general/ESBoxClipping.d.ts.map +1 -0
  81. package/dist/types/ESObjects/general/ESCameraView.d.ts.map +1 -0
  82. package/dist/types/ESObjects/general/ESCameraViewCollection/ViewWrapper.d.ts.map +1 -0
  83. package/dist/types/ESObjects/general/ESCameraViewCollection/index.d.ts.map +1 -0
  84. package/dist/types/ESObjects/general/ESCameraVisibleRange.d.ts.map +1 -0
  85. package/dist/types/ESObjects/general/ESCar.d.ts.map +1 -0
  86. package/dist/types/ESObjects/general/ESCityBasePoint.d.ts.map +1 -0
  87. package/dist/types/ESObjects/general/ESClassification.d.ts.map +1 -0
  88. package/dist/types/ESObjects/general/ESClippingPlane.d.ts.map +1 -0
  89. package/dist/types/ESObjects/general/ESCustomDiv/index.d.ts.map +1 -0
  90. package/dist/types/ESObjects/general/ESCustomDiv/instance.d.ts.map +1 -0
  91. package/dist/types/ESObjects/general/ESCzml.d.ts.map +1 -0
  92. package/dist/types/ESObjects/general/ESDataMesh.d.ts.map +1 -0
  93. package/dist/types/ESObjects/general/ESDatasmithRuntimeModel.d.ts.map +1 -0
  94. package/dist/types/ESObjects/general/ESDirectionMeasurement.d.ts.map +1 -0
  95. package/dist/types/ESObjects/general/ESDistanceMeasurement.d.ts.map +1 -0
  96. package/dist/types/ESObjects/general/ESDynamicWater.d.ts.map +1 -0
  97. package/dist/types/ESObjects/general/ESEntityCluster.d.ts.map +1 -0
  98. package/dist/types/ESObjects/general/ESExcavate.d.ts.map +1 -0
  99. package/dist/types/ESObjects/general/ESFeatureLayer/FeatureLayer.d.ts.map +1 -0
  100. package/dist/types/ESObjects/general/ESFeatureLayer/PointLayer/index.d.ts.map +1 -0
  101. package/dist/types/ESObjects/general/ESFeatureLayer/PointLayer/utils.d.ts.map +1 -0
  102. package/dist/types/ESObjects/general/ESFeatureLayer/PolyLineLayer/index.d.ts.map +1 -0
  103. package/dist/types/ESObjects/general/ESFeatureLayer/PolygonLayer/index.d.ts.map +1 -0
  104. package/dist/types/ESObjects/general/ESFeatureLayer/PolygonLayer/utils.d.ts.map +1 -0
  105. package/dist/types/ESObjects/general/ESFeatureLayer/index.d.ts.map +1 -0
  106. package/dist/types/ESObjects/general/ESFeatureLayer/types.d.ts.map +1 -0
  107. package/dist/types/ESObjects/general/ESFeatureLayer/utils.d.ts.map +1 -0
  108. package/dist/types/ESObjects/general/ESFireParticleSystem.d.ts.map +1 -0
  109. package/dist/types/ESObjects/general/ESForestTileset.d.ts.map +1 -0
  110. package/dist/types/ESObjects/general/ESGaussianSplatting.d.ts.map +1 -0
  111. package/dist/types/ESObjects/general/ESGeoDiv/index.d.ts.map +1 -0
  112. package/dist/types/ESObjects/general/ESGeoDiv/mds.d.ts.map +1 -0
  113. package/dist/types/ESObjects/general/ESGeoDivTextPoi.d.ts.map +1 -0
  114. package/dist/types/ESObjects/general/ESGeoExtrudedPolygon.d.ts.map +1 -0
  115. package/dist/types/ESObjects/general/ESGeoJson/index.d.ts.map +1 -0
  116. package/dist/types/ESObjects/general/ESGeoJson/type.d.ts.map +1 -0
  117. package/dist/types/ESObjects/general/ESGeoLineString.d.ts.map +1 -0
  118. package/dist/types/ESObjects/general/ESGeoPoints/index.d.ts.map +1 -0
  119. package/dist/types/ESObjects/general/ESGeoPolygon.d.ts.map +1 -0
  120. package/dist/types/ESObjects/general/ESGeoRectangle.d.ts.map +1 -0
  121. package/dist/types/ESObjects/general/ESGeoWater.d.ts.map +1 -0
  122. package/dist/types/ESObjects/general/ESGltfModel.d.ts.map +1 -0
  123. package/dist/types/ESObjects/general/ESHeatMap/index.d.ts.map +1 -0
  124. package/dist/types/ESObjects/general/ESHeightLimitAnalysis.d.ts.map +1 -0
  125. package/dist/types/ESObjects/general/ESHeightMeasurement.d.ts.map +1 -0
  126. package/dist/types/ESObjects/general/ESHole.d.ts.map +1 -0
  127. package/dist/types/ESObjects/general/ESHuman.d.ts.map +1 -0
  128. package/dist/types/ESObjects/general/ESHumanPoi.d.ts.map +1 -0
  129. package/dist/types/ESObjects/general/ESImageLabel.d.ts.map +1 -0
  130. package/dist/types/ESObjects/general/ESImageryLayer/index.d.ts.map +1 -0
  131. package/dist/types/ESObjects/general/ESImageryLayer/types.d.ts.map +1 -0
  132. package/dist/types/ESObjects/general/ESLevelRuntimeModel.d.ts.map +1 -0
  133. package/dist/types/ESObjects/general/ESLocalCircle.d.ts.map +1 -0
  134. package/dist/types/ESObjects/general/ESLocalPolygon.d.ts.map +1 -0
  135. package/dist/types/ESObjects/general/ESLocalPolygonZ.d.ts.map +1 -0
  136. package/dist/types/ESObjects/general/ESLocalRectangle.d.ts.map +1 -0
  137. package/dist/types/ESObjects/general/ESLocalRegularPolygon.d.ts.map +1 -0
  138. package/dist/types/ESObjects/general/ESLocalSkyBox.d.ts.map +1 -0
  139. package/dist/types/ESObjects/general/ESLocationMeasurement.d.ts.map +1 -0
  140. package/dist/types/ESObjects/general/ESMsTileset/index.d.ts.map +1 -0
  141. package/dist/types/ESObjects/general/ESMsTileset/types.d.ts.map +1 -0
  142. package/dist/types/ESObjects/general/ESNavigator.d.ts.map +1 -0
  143. package/dist/types/ESObjects/general/ESParticleSystemPrimitive.d.ts.map +1 -0
  144. package/dist/types/ESObjects/general/ESPath/ESPathImpl/CurrentInfoType.d.ts.map +1 -0
  145. package/dist/types/ESObjects/general/ESPath/ESPathImpl/GetCurrentFuncType.d.ts.map +1 -0
  146. package/dist/types/ESObjects/general/ESPath/ESPathImpl/PolylineResetting.d.ts.map +1 -0
  147. package/dist/types/ESObjects/general/ESPath/ESPathImpl/RotLerpModeType.d.ts.map +1 -0
  148. package/dist/types/ESObjects/general/ESPath/ESPathImpl/computeRotIfUndefined.d.ts.map +1 -0
  149. package/dist/types/ESObjects/general/ESPath/ESPathImpl/dataTextMd.d.ts.map +1 -0
  150. package/dist/types/ESObjects/general/ESPath/ESPathImpl/getCurrent.d.ts.map +1 -0
  151. package/dist/types/ESObjects/general/ESPath/ESPathImpl/index.d.ts.map +1 -0
  152. package/dist/types/ESObjects/general/ESPath/ESPathImpl/parseData.d.ts.map +1 -0
  153. package/dist/types/ESObjects/general/ESPath/ESPathImpl/subPath.d.ts.map +1 -0
  154. package/dist/types/ESObjects/general/ESPath/ESPathImpl/subdivide.d.ts.map +1 -0
  155. package/dist/types/ESObjects/general/ESPath/ESPathImpl/timePosRotsMd.d.ts.map +1 -0
  156. package/dist/types/ESObjects/general/ESPath/index.d.ts.map +1 -0
  157. package/dist/types/ESObjects/general/ESPipeFence.d.ts.map +1 -0
  158. package/dist/types/ESObjects/general/ESPipeline.d.ts.map +1 -0
  159. package/dist/types/ESObjects/general/ESPipeserTileset.d.ts.map +1 -0
  160. package/dist/types/ESObjects/general/ESPit.d.ts.map +1 -0
  161. package/dist/types/ESObjects/general/ESPlayer/AbsolutePlayer.d.ts.map +1 -0
  162. package/dist/types/ESObjects/general/ESPlayer/index.d.ts.map +1 -0
  163. package/dist/types/ESObjects/general/ESPoi2D.d.ts.map +1 -0
  164. package/dist/types/ESObjects/general/ESPoi3D.d.ts.map +1 -0
  165. package/dist/types/ESObjects/general/ESPoiTileset.d.ts.map +1 -0
  166. package/dist/types/ESObjects/general/ESPolygonFence.d.ts.map +1 -0
  167. package/dist/types/ESObjects/general/ESPolygonFlattenedPlane.d.ts.map +1 -0
  168. package/dist/types/ESObjects/general/ESPolygonWithHole.d.ts.map +1 -0
  169. package/dist/types/ESObjects/general/ESRectangle.d.ts.map +1 -0
  170. package/dist/types/ESObjects/general/ESRefVoxels.d.ts.map +1 -0
  171. package/dist/types/ESObjects/general/ESRtsFeatureEditing/index.d.ts.map +1 -0
  172. package/dist/types/ESObjects/general/ESRtsFeatureEditing/types.d.ts.map +1 -0
  173. package/dist/types/ESObjects/general/ESRtsTileset/index.d.ts.map +1 -0
  174. package/dist/types/ESObjects/general/ESRtsTileset/types.d.ts.map +1 -0
  175. package/dist/types/ESObjects/general/ESScale.d.ts.map +1 -0
  176. package/dist/types/ESObjects/general/ESSeparateFoliage/CallFunc.d.ts.map +1 -0
  177. package/dist/types/ESObjects/general/ESSeparateFoliage/index.d.ts.map +1 -0
  178. package/dist/types/ESObjects/general/ESSkylineAnalysis/index.d.ts.map +1 -0
  179. package/dist/types/ESObjects/general/ESStaticMesh.d.ts.map +1 -0
  180. package/dist/types/ESObjects/general/ESSubmergingAnalysis/bufferUtils.d.ts.map +1 -0
  181. package/dist/types/ESObjects/general/ESSubmergingAnalysis/index.d.ts.map +1 -0
  182. package/dist/types/ESObjects/general/ESSubmergingAnalysis/parseGlb.d.ts.map +1 -0
  183. package/dist/types/ESObjects/general/ESSunshineAnalysis/index.d.ts.map +1 -0
  184. package/dist/types/ESObjects/general/ESSurfaceAreaMeasurement.d.ts.map +1 -0
  185. package/dist/types/ESObjects/general/ESTerrainLayer.d.ts.map +1 -0
  186. package/dist/types/ESObjects/general/ESTextLabel.d.ts.map +1 -0
  187. package/dist/types/ESObjects/general/ESUEWidget.d.ts.map +1 -0
  188. package/dist/types/ESObjects/general/ESUnrealActor.d.ts.map +1 -0
  189. package/dist/types/ESObjects/general/ESVideoFusion.d.ts.map +1 -0
  190. package/dist/types/ESObjects/general/ESViewShed.d.ts.map +1 -0
  191. package/dist/types/ESObjects/general/ESViewerStatusBar.d.ts.map +1 -0
  192. package/dist/types/ESObjects/general/ESViewerStatusBarScale.d.ts.map +1 -0
  193. package/dist/types/ESObjects/general/ESVisibilityAnalysis.d.ts.map +1 -0
  194. package/dist/types/ESObjects/general/ESVolumeMeasurement.d.ts.map +1 -0
  195. package/dist/types/ESObjects/general/ESWidget.d.ts.map +1 -0
  196. package/dist/types/ESObjects/general/index.d.ts.map +1 -0
  197. package/dist/types/ESObjects/index.d.ts.map +1 -0
  198. package/dist/types/ESViewer/ContainerStyleController.d.ts.map +1 -0
  199. package/dist/types/ESViewer/ESViewer.d.ts.map +1 -0
  200. package/dist/types/ESViewer/GeneralAnalysis/RollerShutterAnalysis.d.ts.map +1 -0
  201. package/dist/types/ESViewer/GeneralAnalysis/index.d.ts.map +1 -0
  202. package/dist/types/ESViewer/Resetting/index.d.ts.map +1 -0
  203. package/dist/types/ESViewer/StatusContainer.d.ts.map +1 -0
  204. package/dist/types/ESViewer/ViewerContainer.d.ts.map +1 -0
  205. package/dist/types/ESViewer/ViewerContext.d.ts.map +1 -0
  206. package/dist/types/ESViewer/ViewerCustomInteraction.d.ts.map +1 -0
  207. package/dist/types/ESViewer/getContainer.d.ts.map +1 -0
  208. package/dist/types/ESViewer/index.d.ts.map +1 -0
  209. package/dist/types/EngineObject/EditingObjectContext.d.ts.map +1 -0
  210. package/dist/types/EngineObject/EngineObjectsContext.d.ts.map +1 -0
  211. package/dist/types/EngineObject/index.d.ts.map +1 -0
  212. package/dist/types/copyright.d.ts.map +1 -0
  213. package/dist/types/index.d.ts.map +1 -0
  214. package/dist/types/utils/PropTrees/PropTree.d.ts.map +1 -0
  215. package/dist/types/utils/PropTrees/PropTreeItem.d.ts.map +1 -0
  216. package/dist/types/utils/PropTrees/PropUiTreeManager.d.ts.map +1 -0
  217. package/dist/types/utils/PropTrees/index.d.ts.map +1 -0
  218. package/dist/types/utils/SceneTrees/SceneTree.d.ts.map +1 -0
  219. package/dist/types/utils/SceneTrees/SceneTreeContextMenu.d.ts.map +1 -0
  220. package/dist/types/utils/SceneTrees/SceneTreeItem.d.ts.map +1 -0
  221. package/dist/types/utils/SceneTrees/SceneTreeItemDragDrop.d.ts.map +1 -0
  222. package/dist/types/utils/SceneTrees/SceneTreeJsonLoading.d.ts.map +1 -0
  223. package/dist/types/utils/SceneTrees/defaultCreateSceneObject.d.ts.map +1 -0
  224. package/dist/types/utils/SceneTrees/defaultCreateTreeItemDragDrop.d.ts.map +1 -0
  225. package/dist/types/utils/SceneTrees/defaultLight122FromEnvironmentMapManager.d.ts.map +1 -0
  226. package/dist/types/utils/SceneTrees/defaultShowSceneObject.d.ts.map +1 -0
  227. package/dist/types/utils/SceneTrees/index.d.ts.map +1 -0
  228. package/dist/types/utils/SceneTrees/preload.d.ts.map +1 -0
  229. package/dist/types/utils/SmoothMoveController.d.ts.map +1 -0
  230. package/dist/types/utils/base/DragStartDataManager.d.ts.map +1 -0
  231. package/dist/types/utils/base/TreeItemDragDrop.d.ts.map +1 -0
  232. package/dist/types/utils/base/bindCustomEditing.d.ts.map +1 -0
  233. package/dist/types/utils/base/defaultInitSceneObjectOnCreatingFunc.d.ts.map +1 -0
  234. package/dist/types/utils/base/defaultUpdateSceneObjectOnPickingFunc.d.ts.map +1 -0
  235. package/dist/types/utils/base/getDefaultValue.d.ts.map +1 -0
  236. package/dist/types/utils/base/hasSameTags.d.ts.map +1 -0
  237. package/dist/types/utils/base/inOrderRunning.d.ts.map +1 -0
  238. package/dist/types/utils/base/index.d.ts.map +1 -0
  239. package/dist/types/utils/base/lerpAngle.d.ts.map +1 -0
  240. package/dist/types/utils/base/rpToap.d.ts.map +1 -0
  241. package/dist/types/utils/base/sceneObjectTreeItem.d.ts.map +1 -0
  242. package/dist/types/utils/base/utils.d.ts.map +1 -0
  243. package/dist/types/utils/components/ESSceneObjectWithId.d.ts.map +1 -0
  244. package/dist/types/utils/components/Player.d.ts.map +1 -0
  245. package/dist/types/utils/components/Watcher.d.ts.map +1 -0
  246. package/dist/types/utils/components/WatcherTools/index.d.ts.map +1 -0
  247. package/dist/types/utils/components/WatcherTools/toolsForWatcher.d.ts.map +1 -0
  248. package/dist/types/utils/components/index.d.ts.map +1 -0
  249. package/dist/types/utils/index.d.ts.map +1 -0
  250. package/dist/types/utils/proj4/getDistancesFromPositions.d.ts.map +1 -0
  251. package/dist/types/utils/proj4/getXyzFromPostion.d.ts.map +1 -0
  252. package/dist/types/utils/proj4/index.d.ts.map +1 -0
  253. package/dist/types/utils/proj4/lbhToXyz.d.ts.map +1 -0
  254. package/dist/types/utils/react.d.ts.map +1 -0
  255. package/dist/types/utils/registerCreatedEventUpdate.d.ts.map +1 -0
  256. package/dist/types/utils/registerEventUpdate.d.ts.map +1 -0
  257. package/dist/types/utils/turf/booleanPointInPolygon.d.ts.map +1 -0
  258. package/dist/types/utils/turf/geoAlong.d.ts.map +1 -0
  259. package/dist/types/utils/turf/geoArea.d.ts.map +1 -0
  260. package/dist/types/utils/turf/geoCenterOfMass.d.ts.map +1 -0
  261. package/dist/types/utils/turf/geoDestination.d.ts.map +1 -0
  262. package/dist/types/utils/turf/geoDistance.d.ts.map +1 -0
  263. package/dist/types/utils/turf/geoHeading.d.ts.map +1 -0
  264. package/dist/types/utils/turf/geoLineIntersect.d.ts.map +1 -0
  265. package/dist/types/utils/turf/geoMidpoint.d.ts.map +1 -0
  266. package/dist/types/utils/turf/geoNearestPointOnLine.d.ts.map +1 -0
  267. package/dist/types/utils/turf/geoPointToLineDistance.d.ts.map +1 -0
  268. package/dist/types/utils/turf/geoRhumbDestination.d.ts.map +1 -0
  269. package/dist/types/utils/turf/geoRhumbDistance.d.ts.map +1 -0
  270. package/dist/types/utils/turf/geoRhumbHeading.d.ts.map +1 -0
  271. package/dist/types/utils/turf/geoTools.d.ts.map +1 -0
  272. package/dist/types/utils/turf/getGeoBoundingSphereFromPositions.d.ts.map +1 -0
  273. package/dist/types/utils/turf/getMinMaxCorner.d.ts.map +1 -0
  274. package/dist/types/utils/turf/index.d.ts.map +1 -0
  275. package/dist/types/xbsj-base/index.d.ts.map +1 -0
  276. package/dist/types/xbsj-base/xr-base-utils/Destroyable/destroyObject.d.ts.map +1 -0
  277. package/dist/types/xbsj-base/xr-base-utils/Destroyable/index.d.ts.map +1 -0
  278. package/dist/types/xbsj-base/xr-base-utils/ObjPool.d.ts.map +1 -0
  279. package/dist/types/xbsj-base/xr-base-utils/events.d.ts.map +1 -0
  280. package/dist/types/xbsj-base/xr-base-utils/index.d.ts.map +1 -0
  281. package/dist/types/xbsj-base/xr-base-utils/oneTimeWarning.d.ts.map +1 -0
  282. package/dist/types/xbsj-base/xr-base-utils/pipe/DoublyLinkedList.d.ts.map +1 -0
  283. package/dist/types/xbsj-base/xr-base-utils/pipe/Event.d.ts.map +1 -0
  284. package/dist/types/xbsj-base/xr-base-utils/pipe/ListenerPipe.d.ts.map +1 -0
  285. package/dist/types/xbsj-base/xr-base-utils/pipe/SmartListenerHandler.d.ts.map +1 -0
  286. package/dist/types/xbsj-base/xr-base-utils/pipe/SmartListenerPipe.d.ts.map +1 -0
  287. package/dist/types/xbsj-base/xr-base-utils/pipe/index.d.ts.map +1 -0
  288. package/dist/types/xbsj-base/xr-base-utils/save/downloadLink.d.ts.map +1 -0
  289. package/dist/types/xbsj-base/xr-base-utils/save/index.d.ts.map +1 -0
  290. package/dist/types/xbsj-base/xr-base-utils/save/saveOnBrowser.d.ts.map +1 -0
  291. package/dist/types/xbsj-base/xr-base-utils/timeFuncs.d.ts.map +1 -0
  292. package/dist/types/xbsj-base/xr-utils/ObservableSet.d.ts.map +1 -0
  293. package/dist/types/xbsj-base/xr-utils/index.d.ts.map +1 -0
  294. package/package.json +4 -5
  295. package/dist/ESJTypes/index.d.ts.map +0 -1
  296. package/dist/ESJTypes/pickedInfos/index.d.ts.map +0 -1
  297. package/dist/ESJTypes/properties/ClockType.d.ts.map +0 -1
  298. package/dist/ESJTypes/properties/DataType.d.ts.map +0 -1
  299. package/dist/ESJTypes/properties/ESJArcType.d.ts.map +0 -1
  300. package/dist/ESJTypes/properties/ESJEditingMode.d.ts.map +0 -1
  301. package/dist/ESJTypes/properties/ESJEnvironmentMapManager.d.ts.map +0 -1
  302. package/dist/ESJTypes/properties/ESJGeoRegion.d.ts.map +0 -1
  303. package/dist/ESJTypes/properties/ESJInstances.d.ts.map +0 -1
  304. package/dist/ESJTypes/properties/ESJMaterialType.d.ts.map +0 -1
  305. package/dist/ESJTypes/properties/ESJResource.d.ts.map +0 -1
  306. package/dist/ESJTypes/properties/FillStyleType.d.ts.map +0 -1
  307. package/dist/ESJTypes/properties/FlyParamType.d.ts.map +0 -1
  308. package/dist/ESJTypes/properties/ParticleEmitterJsonType.d.ts.map +0 -1
  309. package/dist/ESJTypes/properties/PointStyleType.d.ts.map +0 -1
  310. package/dist/ESJTypes/properties/StrokeStyleType.d.ts.map +0 -1
  311. package/dist/ESJTypes/properties/Viewer.d.ts.map +0 -1
  312. package/dist/ESJTypes/properties/index.d.ts.map +0 -1
  313. package/dist/ESJTypes/props/ColorProperty.d.ts.map +0 -1
  314. package/dist/ESJTypes/props/ColorRgbProperty.d.ts.map +0 -1
  315. package/dist/ESJTypes/props/DashPatternProperty.d.ts.map +0 -1
  316. package/dist/ESJTypes/props/DateProperty.d.ts.map +0 -1
  317. package/dist/ESJTypes/props/DatesProperty.d.ts.map +0 -1
  318. package/dist/ESJTypes/props/EnumProperty.d.ts.map +0 -1
  319. package/dist/ESJTypes/props/EnumStringsProperty.d.ts.map +0 -1
  320. package/dist/ESJTypes/props/EvalStringProperty.d.ts.map +0 -1
  321. package/dist/ESJTypes/props/FunctionProperty.d.ts.map +0 -1
  322. package/dist/ESJTypes/props/GroupProperty.d.ts.map +0 -1
  323. package/dist/ESJTypes/props/JsonProperty.d.ts.map +0 -1
  324. package/dist/ESJTypes/props/LongStringProperty.d.ts.map +0 -1
  325. package/dist/ESJTypes/props/MinmaxProperty.d.ts.map +0 -1
  326. package/dist/ESJTypes/props/NativeProperty.d.ts.map +0 -1
  327. package/dist/ESJTypes/props/NearFarScalerProperty.d.ts.map +0 -1
  328. package/dist/ESJTypes/props/NonreactiveJsonStringProperty.d.ts.map +0 -1
  329. package/dist/ESJTypes/props/NumberRangeProperty.d.ts.map +0 -1
  330. package/dist/ESJTypes/props/NumberSliderProperty.d.ts.map +0 -1
  331. package/dist/ESJTypes/props/ParamsProperty.d.ts.map +0 -1
  332. package/dist/ESJTypes/props/PlayerProperty.d.ts.map +0 -1
  333. package/dist/ESJTypes/props/PositionProperty.d.ts.map +0 -1
  334. package/dist/ESJTypes/props/PositionsProperty.d.ts.map +0 -1
  335. package/dist/ESJTypes/props/PositionsSetPropety.d.ts.map +0 -1
  336. package/dist/ESJTypes/props/Property.d.ts.map +0 -1
  337. package/dist/ESJTypes/props/ReactVarProperty.d.ts.map +0 -1
  338. package/dist/ESJTypes/props/RotationProperty.d.ts.map +0 -1
  339. package/dist/ESJTypes/props/UriProperty.d.ts.map +0 -1
  340. package/dist/ESJTypes/props/ViewPlayerProperty.d.ts.map +0 -1
  341. package/dist/ESJTypes/props/WithUndefinedProperty.d.ts.map +0 -1
  342. package/dist/ESJTypes/props/index.d.ts.map +0 -1
  343. package/dist/ESObjectManager/ESPlyarAndPathTime.d.ts.map +0 -1
  344. package/dist/ESObjectManager/PathAnimationManager.d.ts.map +0 -1
  345. package/dist/ESObjectManager/SceneObjectEditingManager.d.ts.map +0 -1
  346. package/dist/ESObjectManager/SceneObjectsListening.d.ts.map +0 -1
  347. package/dist/ESObjectManager/SceneObjectsManager.d.ts.map +0 -1
  348. package/dist/ESObjectManager/ViewersManager.d.ts.map +0 -1
  349. package/dist/ESObjectManager/index.d.ts.map +0 -1
  350. package/dist/ESObjectManager/propTreeCallback.d.ts.map +0 -1
  351. package/dist/ESObjectManager/utils.d.ts.map +0 -1
  352. package/dist/ESObjects/base/ESGeoVector.d.ts.map +0 -1
  353. package/dist/ESObjects/base/ESLabel.d.ts.map +0 -1
  354. package/dist/ESObjects/base/ESLocalVector.d.ts.map +0 -1
  355. package/dist/ESObjects/base/ESLocalVector2D.d.ts.map +0 -1
  356. package/dist/ESObjects/base/ESObjectWithLocation.d.ts.map +0 -1
  357. package/dist/ESObjects/base/ESSceneObject/ESObjectsContext.d.ts.map +0 -1
  358. package/dist/ESObjects/base/ESSceneObject/RefsManager.d.ts.map +0 -1
  359. package/dist/ESObjects/base/ESSceneObject/funcs/createEnvEvalStrReact.d.ts.map +0 -1
  360. package/dist/ESObjects/base/ESSceneObject/funcs/replaceStrWithEnv.d.ts.map +0 -1
  361. package/dist/ESObjects/base/ESSceneObject/index.d.ts.map +0 -1
  362. package/dist/ESObjects/base/ESTestObject.d.ts.map +0 -1
  363. package/dist/ESObjects/base/ESVisualObject.d.ts.map +0 -1
  364. package/dist/ESObjects/base/index.d.ts.map +0 -1
  365. package/dist/ESObjects/general/ES3DTileset/index.d.ts.map +0 -1
  366. package/dist/ESObjects/general/ES3DTileset/type.d.ts.map +0 -1
  367. package/dist/ESObjects/general/ESAlarm.d.ts.map +0 -1
  368. package/dist/ESObjects/general/ESApertureEffect.d.ts.map +0 -1
  369. package/dist/ESObjects/general/ESAreaMeasurement.d.ts.map +0 -1
  370. package/dist/ESObjects/general/ESBlastParticleSystem.d.ts.map +0 -1
  371. package/dist/ESObjects/general/ESBoxClipping.d.ts.map +0 -1
  372. package/dist/ESObjects/general/ESCameraView.d.ts.map +0 -1
  373. package/dist/ESObjects/general/ESCameraViewCollection/ViewWrapper.d.ts.map +0 -1
  374. package/dist/ESObjects/general/ESCameraViewCollection/index.d.ts.map +0 -1
  375. package/dist/ESObjects/general/ESCameraVisibleRange.d.ts.map +0 -1
  376. package/dist/ESObjects/general/ESCar.d.ts.map +0 -1
  377. package/dist/ESObjects/general/ESCityBasePoint.d.ts.map +0 -1
  378. package/dist/ESObjects/general/ESClassification.d.ts.map +0 -1
  379. package/dist/ESObjects/general/ESClippingPlane.d.ts.map +0 -1
  380. package/dist/ESObjects/general/ESCustomDiv/index.d.ts.map +0 -1
  381. package/dist/ESObjects/general/ESCustomDiv/instance.d.ts.map +0 -1
  382. package/dist/ESObjects/general/ESCzml.d.ts.map +0 -1
  383. package/dist/ESObjects/general/ESDataMesh.d.ts.map +0 -1
  384. package/dist/ESObjects/general/ESDatasmithRuntimeModel.d.ts.map +0 -1
  385. package/dist/ESObjects/general/ESDirectionMeasurement.d.ts.map +0 -1
  386. package/dist/ESObjects/general/ESDistanceMeasurement.d.ts.map +0 -1
  387. package/dist/ESObjects/general/ESDynamicWater.d.ts.map +0 -1
  388. package/dist/ESObjects/general/ESEntityCluster.d.ts.map +0 -1
  389. package/dist/ESObjects/general/ESExcavate.d.ts.map +0 -1
  390. package/dist/ESObjects/general/ESFeatureLayer/FeatureLayer.d.ts.map +0 -1
  391. package/dist/ESObjects/general/ESFeatureLayer/PointLayer/index.d.ts.map +0 -1
  392. package/dist/ESObjects/general/ESFeatureLayer/PointLayer/utils.d.ts.map +0 -1
  393. package/dist/ESObjects/general/ESFeatureLayer/PolyLineLayer/index.d.ts.map +0 -1
  394. package/dist/ESObjects/general/ESFeatureLayer/PolygonLayer/index.d.ts.map +0 -1
  395. package/dist/ESObjects/general/ESFeatureLayer/PolygonLayer/utils.d.ts.map +0 -1
  396. package/dist/ESObjects/general/ESFeatureLayer/index.d.ts.map +0 -1
  397. package/dist/ESObjects/general/ESFeatureLayer/types.d.ts.map +0 -1
  398. package/dist/ESObjects/general/ESFeatureLayer/utils.d.ts.map +0 -1
  399. package/dist/ESObjects/general/ESFireParticleSystem.d.ts.map +0 -1
  400. package/dist/ESObjects/general/ESForestTileset.d.ts.map +0 -1
  401. package/dist/ESObjects/general/ESGaussianSplatting.d.ts.map +0 -1
  402. package/dist/ESObjects/general/ESGeoDiv/index.d.ts.map +0 -1
  403. package/dist/ESObjects/general/ESGeoDiv/mds.d.ts.map +0 -1
  404. package/dist/ESObjects/general/ESGeoDivTextPoi.d.ts.map +0 -1
  405. package/dist/ESObjects/general/ESGeoExtrudedPolygon.d.ts.map +0 -1
  406. package/dist/ESObjects/general/ESGeoJson/index.d.ts.map +0 -1
  407. package/dist/ESObjects/general/ESGeoJson/type.d.ts.map +0 -1
  408. package/dist/ESObjects/general/ESGeoLineString.d.ts.map +0 -1
  409. package/dist/ESObjects/general/ESGeoPoints/index.d.ts.map +0 -1
  410. package/dist/ESObjects/general/ESGeoPolygon.d.ts.map +0 -1
  411. package/dist/ESObjects/general/ESGeoRectangle.d.ts.map +0 -1
  412. package/dist/ESObjects/general/ESGeoWater.d.ts.map +0 -1
  413. package/dist/ESObjects/general/ESGltfModel.d.ts.map +0 -1
  414. package/dist/ESObjects/general/ESHeatMap/index.d.ts.map +0 -1
  415. package/dist/ESObjects/general/ESHeightLimitAnalysis.d.ts.map +0 -1
  416. package/dist/ESObjects/general/ESHeightMeasurement.d.ts.map +0 -1
  417. package/dist/ESObjects/general/ESHole.d.ts.map +0 -1
  418. package/dist/ESObjects/general/ESHuman.d.ts.map +0 -1
  419. package/dist/ESObjects/general/ESHumanPoi.d.ts.map +0 -1
  420. package/dist/ESObjects/general/ESImageLabel.d.ts.map +0 -1
  421. package/dist/ESObjects/general/ESImageryLayer/index.d.ts.map +0 -1
  422. package/dist/ESObjects/general/ESImageryLayer/types.d.ts.map +0 -1
  423. package/dist/ESObjects/general/ESLevelRuntimeModel.d.ts.map +0 -1
  424. package/dist/ESObjects/general/ESLocalCircle.d.ts.map +0 -1
  425. package/dist/ESObjects/general/ESLocalPolygon.d.ts.map +0 -1
  426. package/dist/ESObjects/general/ESLocalPolygonZ.d.ts.map +0 -1
  427. package/dist/ESObjects/general/ESLocalRectangle.d.ts.map +0 -1
  428. package/dist/ESObjects/general/ESLocalRegularPolygon.d.ts.map +0 -1
  429. package/dist/ESObjects/general/ESLocalSkyBox.d.ts.map +0 -1
  430. package/dist/ESObjects/general/ESLocationMeasurement.d.ts.map +0 -1
  431. package/dist/ESObjects/general/ESMsTileset/index.d.ts.map +0 -1
  432. package/dist/ESObjects/general/ESMsTileset/types.d.ts.map +0 -1
  433. package/dist/ESObjects/general/ESNavigator.d.ts.map +0 -1
  434. package/dist/ESObjects/general/ESParticleSystemPrimitive.d.ts.map +0 -1
  435. package/dist/ESObjects/general/ESPath/ESPathImpl/CurrentInfoType.d.ts.map +0 -1
  436. package/dist/ESObjects/general/ESPath/ESPathImpl/GetCurrentFuncType.d.ts.map +0 -1
  437. package/dist/ESObjects/general/ESPath/ESPathImpl/PolylineResetting.d.ts.map +0 -1
  438. package/dist/ESObjects/general/ESPath/ESPathImpl/RotLerpModeType.d.ts.map +0 -1
  439. package/dist/ESObjects/general/ESPath/ESPathImpl/computeRotIfUndefined.d.ts.map +0 -1
  440. package/dist/ESObjects/general/ESPath/ESPathImpl/dataTextMd.d.ts.map +0 -1
  441. package/dist/ESObjects/general/ESPath/ESPathImpl/getCurrent.d.ts.map +0 -1
  442. package/dist/ESObjects/general/ESPath/ESPathImpl/index.d.ts.map +0 -1
  443. package/dist/ESObjects/general/ESPath/ESPathImpl/parseData.d.ts.map +0 -1
  444. package/dist/ESObjects/general/ESPath/ESPathImpl/subPath.d.ts.map +0 -1
  445. package/dist/ESObjects/general/ESPath/ESPathImpl/subdivide.d.ts.map +0 -1
  446. package/dist/ESObjects/general/ESPath/ESPathImpl/timePosRotsMd.d.ts.map +0 -1
  447. package/dist/ESObjects/general/ESPath/index.d.ts.map +0 -1
  448. package/dist/ESObjects/general/ESPipeFence.d.ts.map +0 -1
  449. package/dist/ESObjects/general/ESPipeline.d.ts.map +0 -1
  450. package/dist/ESObjects/general/ESPipeserTileset.d.ts.map +0 -1
  451. package/dist/ESObjects/general/ESPit.d.ts.map +0 -1
  452. package/dist/ESObjects/general/ESPlayer/AbsolutePlayer.d.ts.map +0 -1
  453. package/dist/ESObjects/general/ESPlayer/index.d.ts.map +0 -1
  454. package/dist/ESObjects/general/ESPoi2D.d.ts.map +0 -1
  455. package/dist/ESObjects/general/ESPoi3D.d.ts.map +0 -1
  456. package/dist/ESObjects/general/ESPoiTileset.d.ts.map +0 -1
  457. package/dist/ESObjects/general/ESPolygonFence.d.ts.map +0 -1
  458. package/dist/ESObjects/general/ESPolygonFlattenedPlane.d.ts.map +0 -1
  459. package/dist/ESObjects/general/ESPolygonWithHole.d.ts.map +0 -1
  460. package/dist/ESObjects/general/ESRectangle.d.ts.map +0 -1
  461. package/dist/ESObjects/general/ESRefVoxels.d.ts.map +0 -1
  462. package/dist/ESObjects/general/ESRtsFeatureEditing/index.d.ts.map +0 -1
  463. package/dist/ESObjects/general/ESRtsFeatureEditing/types.d.ts.map +0 -1
  464. package/dist/ESObjects/general/ESRtsTileset/index.d.ts.map +0 -1
  465. package/dist/ESObjects/general/ESRtsTileset/types.d.ts.map +0 -1
  466. package/dist/ESObjects/general/ESScale.d.ts.map +0 -1
  467. package/dist/ESObjects/general/ESSeparateFoliage/CallFunc.d.ts.map +0 -1
  468. package/dist/ESObjects/general/ESSeparateFoliage/index.d.ts.map +0 -1
  469. package/dist/ESObjects/general/ESSkylineAnalysis/index.d.ts.map +0 -1
  470. package/dist/ESObjects/general/ESStaticMesh.d.ts.map +0 -1
  471. package/dist/ESObjects/general/ESSubmergingAnalysis/bufferUtils.d.ts.map +0 -1
  472. package/dist/ESObjects/general/ESSubmergingAnalysis/index.d.ts.map +0 -1
  473. package/dist/ESObjects/general/ESSubmergingAnalysis/parseGlb.d.ts.map +0 -1
  474. package/dist/ESObjects/general/ESSunshineAnalysis/index.d.ts.map +0 -1
  475. package/dist/ESObjects/general/ESSurfaceAreaMeasurement.d.ts.map +0 -1
  476. package/dist/ESObjects/general/ESTerrainLayer.d.ts.map +0 -1
  477. package/dist/ESObjects/general/ESTextLabel.d.ts.map +0 -1
  478. package/dist/ESObjects/general/ESUEWidget.d.ts.map +0 -1
  479. package/dist/ESObjects/general/ESUnrealActor.d.ts.map +0 -1
  480. package/dist/ESObjects/general/ESVideoFusion.d.ts.map +0 -1
  481. package/dist/ESObjects/general/ESViewShed.d.ts.map +0 -1
  482. package/dist/ESObjects/general/ESViewerStatusBar.d.ts.map +0 -1
  483. package/dist/ESObjects/general/ESViewerStatusBarScale.d.ts.map +0 -1
  484. package/dist/ESObjects/general/ESVisibilityAnalysis.d.ts.map +0 -1
  485. package/dist/ESObjects/general/ESVolumeMeasurement.d.ts.map +0 -1
  486. package/dist/ESObjects/general/ESWidget.d.ts.map +0 -1
  487. package/dist/ESObjects/general/index.d.ts.map +0 -1
  488. package/dist/ESObjects/index.d.ts.map +0 -1
  489. package/dist/ESViewer/ContainerStyleController.d.ts.map +0 -1
  490. package/dist/ESViewer/ESViewer.d.ts.map +0 -1
  491. package/dist/ESViewer/GeneralAnalysis/RollerShutterAnalysis.d.ts.map +0 -1
  492. package/dist/ESViewer/GeneralAnalysis/index.d.ts.map +0 -1
  493. package/dist/ESViewer/Resetting/index.d.ts.map +0 -1
  494. package/dist/ESViewer/StatusContainer.d.ts.map +0 -1
  495. package/dist/ESViewer/ViewerContainer.d.ts.map +0 -1
  496. package/dist/ESViewer/ViewerContext.d.ts.map +0 -1
  497. package/dist/ESViewer/ViewerCustomInteraction.d.ts.map +0 -1
  498. package/dist/ESViewer/getContainer.d.ts.map +0 -1
  499. package/dist/ESViewer/index.d.ts.map +0 -1
  500. package/dist/EngineObject/EditingObjectContext.d.ts.map +0 -1
  501. package/dist/EngineObject/EngineObjectsContext.d.ts.map +0 -1
  502. package/dist/EngineObject/index.d.ts.map +0 -1
  503. package/dist/copyright.d.ts.map +0 -1
  504. package/dist/index.d.ts.map +0 -1
  505. package/dist/utils/PropTrees/PropTree.d.ts.map +0 -1
  506. package/dist/utils/PropTrees/PropTreeItem.d.ts.map +0 -1
  507. package/dist/utils/PropTrees/PropUiTreeManager.d.ts.map +0 -1
  508. package/dist/utils/PropTrees/index.d.ts.map +0 -1
  509. package/dist/utils/SceneTrees/SceneTree.d.ts.map +0 -1
  510. package/dist/utils/SceneTrees/SceneTreeContextMenu.d.ts.map +0 -1
  511. package/dist/utils/SceneTrees/SceneTreeItem.d.ts.map +0 -1
  512. package/dist/utils/SceneTrees/SceneTreeItemDragDrop.d.ts.map +0 -1
  513. package/dist/utils/SceneTrees/SceneTreeJsonLoading.d.ts.map +0 -1
  514. package/dist/utils/SceneTrees/defaultCreateSceneObject.d.ts.map +0 -1
  515. package/dist/utils/SceneTrees/defaultCreateTreeItemDragDrop.d.ts.map +0 -1
  516. package/dist/utils/SceneTrees/defaultLight122FromEnvironmentMapManager.d.ts.map +0 -1
  517. package/dist/utils/SceneTrees/defaultShowSceneObject.d.ts.map +0 -1
  518. package/dist/utils/SceneTrees/index.d.ts.map +0 -1
  519. package/dist/utils/SceneTrees/preload.d.ts.map +0 -1
  520. package/dist/utils/SmoothMoveController.d.ts.map +0 -1
  521. package/dist/utils/base/DragStartDataManager.d.ts.map +0 -1
  522. package/dist/utils/base/TreeItemDragDrop.d.ts.map +0 -1
  523. package/dist/utils/base/bindCustomEditing.d.ts.map +0 -1
  524. package/dist/utils/base/defaultInitSceneObjectOnCreatingFunc.d.ts.map +0 -1
  525. package/dist/utils/base/defaultUpdateSceneObjectOnPickingFunc.d.ts.map +0 -1
  526. package/dist/utils/base/getDefaultValue.d.ts.map +0 -1
  527. package/dist/utils/base/hasSameTags.d.ts.map +0 -1
  528. package/dist/utils/base/inOrderRunning.d.ts.map +0 -1
  529. package/dist/utils/base/index.d.ts.map +0 -1
  530. package/dist/utils/base/lerpAngle.d.ts.map +0 -1
  531. package/dist/utils/base/rpToap.d.ts.map +0 -1
  532. package/dist/utils/base/sceneObjectTreeItem.d.ts.map +0 -1
  533. package/dist/utils/base/utils.d.ts.map +0 -1
  534. package/dist/utils/components/ESSceneObjectWithId.d.ts.map +0 -1
  535. package/dist/utils/components/Player.d.ts.map +0 -1
  536. package/dist/utils/components/Watcher.d.ts.map +0 -1
  537. package/dist/utils/components/WatcherTools/index.d.ts.map +0 -1
  538. package/dist/utils/components/WatcherTools/toolsForWatcher.d.ts.map +0 -1
  539. package/dist/utils/components/index.d.ts.map +0 -1
  540. package/dist/utils/index.d.ts.map +0 -1
  541. package/dist/utils/proj4/getDistancesFromPositions.d.ts.map +0 -1
  542. package/dist/utils/proj4/getXyzFromPostion.d.ts.map +0 -1
  543. package/dist/utils/proj4/index.d.ts.map +0 -1
  544. package/dist/utils/proj4/lbhToXyz.d.ts.map +0 -1
  545. package/dist/utils/react.d.ts.map +0 -1
  546. package/dist/utils/registerCreatedEventUpdate.d.ts.map +0 -1
  547. package/dist/utils/registerEventUpdate.d.ts.map +0 -1
  548. package/dist/utils/turf/booleanPointInPolygon.d.ts.map +0 -1
  549. package/dist/utils/turf/geoAlong.d.ts.map +0 -1
  550. package/dist/utils/turf/geoArea.d.ts.map +0 -1
  551. package/dist/utils/turf/geoCenterOfMass.d.ts.map +0 -1
  552. package/dist/utils/turf/geoDestination.d.ts.map +0 -1
  553. package/dist/utils/turf/geoDistance.d.ts.map +0 -1
  554. package/dist/utils/turf/geoHeading.d.ts.map +0 -1
  555. package/dist/utils/turf/geoLineIntersect.d.ts.map +0 -1
  556. package/dist/utils/turf/geoMidpoint.d.ts.map +0 -1
  557. package/dist/utils/turf/geoNearestPointOnLine.d.ts.map +0 -1
  558. package/dist/utils/turf/geoPointToLineDistance.d.ts.map +0 -1
  559. package/dist/utils/turf/geoRhumbDestination.d.ts.map +0 -1
  560. package/dist/utils/turf/geoRhumbDistance.d.ts.map +0 -1
  561. package/dist/utils/turf/geoRhumbHeading.d.ts.map +0 -1
  562. package/dist/utils/turf/geoTools.d.ts.map +0 -1
  563. package/dist/utils/turf/getGeoBoundingSphereFromPositions.d.ts.map +0 -1
  564. package/dist/utils/turf/getMinMaxCorner.d.ts.map +0 -1
  565. package/dist/utils/turf/index.d.ts.map +0 -1
  566. package/dist/xbsj-base/index.d.ts.map +0 -1
  567. package/dist/xbsj-base/xr-base-utils/Destroyable/destroyObject.d.ts.map +0 -1
  568. package/dist/xbsj-base/xr-base-utils/Destroyable/index.d.ts.map +0 -1
  569. package/dist/xbsj-base/xr-base-utils/ObjPool.d.ts.map +0 -1
  570. package/dist/xbsj-base/xr-base-utils/events.d.ts.map +0 -1
  571. package/dist/xbsj-base/xr-base-utils/index.d.ts.map +0 -1
  572. package/dist/xbsj-base/xr-base-utils/oneTimeWarning.d.ts.map +0 -1
  573. package/dist/xbsj-base/xr-base-utils/pipe/DoublyLinkedList.d.ts.map +0 -1
  574. package/dist/xbsj-base/xr-base-utils/pipe/Event.d.ts.map +0 -1
  575. package/dist/xbsj-base/xr-base-utils/pipe/ListenerPipe.d.ts.map +0 -1
  576. package/dist/xbsj-base/xr-base-utils/pipe/SmartListenerHandler.d.ts.map +0 -1
  577. package/dist/xbsj-base/xr-base-utils/pipe/SmartListenerPipe.d.ts.map +0 -1
  578. package/dist/xbsj-base/xr-base-utils/pipe/index.d.ts.map +0 -1
  579. package/dist/xbsj-base/xr-base-utils/save/downloadLink.d.ts.map +0 -1
  580. package/dist/xbsj-base/xr-base-utils/save/index.d.ts.map +0 -1
  581. package/dist/xbsj-base/xr-base-utils/save/saveOnBrowser.d.ts.map +0 -1
  582. package/dist/xbsj-base/xr-base-utils/timeFuncs.d.ts.map +0 -1
  583. package/dist/xbsj-base/xr-utils/ObservableSet.d.ts.map +0 -1
  584. package/dist/xbsj-base/xr-utils/index.d.ts.map +0 -1
  585. /package/dist/{ESJTypes → types/ESJTypes}/index.d.ts +0 -0
  586. /package/dist/{ESJTypes → types/ESJTypes}/pickedInfos/index.d.ts +0 -0
  587. /package/dist/{ESJTypes → types/ESJTypes}/properties/ClockType.d.ts +0 -0
  588. /package/dist/{ESJTypes → types/ESJTypes}/properties/DataType.d.ts +0 -0
  589. /package/dist/{ESJTypes → types/ESJTypes}/properties/ESJArcType.d.ts +0 -0
  590. /package/dist/{ESJTypes → types/ESJTypes}/properties/ESJEditingMode.d.ts +0 -0
  591. /package/dist/{ESJTypes → types/ESJTypes}/properties/ESJEnvironmentMapManager.d.ts +0 -0
  592. /package/dist/{ESJTypes → types/ESJTypes}/properties/ESJGeoRegion.d.ts +0 -0
  593. /package/dist/{ESJTypes → types/ESJTypes}/properties/ESJInstances.d.ts +0 -0
  594. /package/dist/{ESJTypes → types/ESJTypes}/properties/ESJMaterialType.d.ts +0 -0
  595. /package/dist/{ESJTypes → types/ESJTypes}/properties/ESJResource.d.ts +0 -0
  596. /package/dist/{ESJTypes → types/ESJTypes}/properties/FillStyleType.d.ts +0 -0
  597. /package/dist/{ESJTypes → types/ESJTypes}/properties/FlyParamType.d.ts +0 -0
  598. /package/dist/{ESJTypes → types/ESJTypes}/properties/ParticleEmitterJsonType.d.ts +0 -0
  599. /package/dist/{ESJTypes → types/ESJTypes}/properties/PointStyleType.d.ts +0 -0
  600. /package/dist/{ESJTypes → types/ESJTypes}/properties/StrokeStyleType.d.ts +0 -0
  601. /package/dist/{ESJTypes → types/ESJTypes}/properties/Viewer.d.ts +0 -0
  602. /package/dist/{ESJTypes → types/ESJTypes}/properties/index.d.ts +0 -0
  603. /package/dist/{ESJTypes → types/ESJTypes}/props/ColorProperty.d.ts +0 -0
  604. /package/dist/{ESJTypes → types/ESJTypes}/props/ColorRgbProperty.d.ts +0 -0
  605. /package/dist/{ESJTypes → types/ESJTypes}/props/DashPatternProperty.d.ts +0 -0
  606. /package/dist/{ESJTypes → types/ESJTypes}/props/DateProperty.d.ts +0 -0
  607. /package/dist/{ESJTypes → types/ESJTypes}/props/DatesProperty.d.ts +0 -0
  608. /package/dist/{ESJTypes → types/ESJTypes}/props/EnumProperty.d.ts +0 -0
  609. /package/dist/{ESJTypes → types/ESJTypes}/props/EnumStringsProperty.d.ts +0 -0
  610. /package/dist/{ESJTypes → types/ESJTypes}/props/EvalStringProperty.d.ts +0 -0
  611. /package/dist/{ESJTypes → types/ESJTypes}/props/FunctionProperty.d.ts +0 -0
  612. /package/dist/{ESJTypes → types/ESJTypes}/props/GroupProperty.d.ts +0 -0
  613. /package/dist/{ESJTypes → types/ESJTypes}/props/JsonProperty.d.ts +0 -0
  614. /package/dist/{ESJTypes → types/ESJTypes}/props/LongStringProperty.d.ts +0 -0
  615. /package/dist/{ESJTypes → types/ESJTypes}/props/MinmaxProperty.d.ts +0 -0
  616. /package/dist/{ESJTypes → types/ESJTypes}/props/NativeProperty.d.ts +0 -0
  617. /package/dist/{ESJTypes → types/ESJTypes}/props/NearFarScalerProperty.d.ts +0 -0
  618. /package/dist/{ESJTypes → types/ESJTypes}/props/NonreactiveJsonStringProperty.d.ts +0 -0
  619. /package/dist/{ESJTypes → types/ESJTypes}/props/NumberRangeProperty.d.ts +0 -0
  620. /package/dist/{ESJTypes → types/ESJTypes}/props/NumberSliderProperty.d.ts +0 -0
  621. /package/dist/{ESJTypes → types/ESJTypes}/props/ParamsProperty.d.ts +0 -0
  622. /package/dist/{ESJTypes → types/ESJTypes}/props/PlayerProperty.d.ts +0 -0
  623. /package/dist/{ESJTypes → types/ESJTypes}/props/PositionProperty.d.ts +0 -0
  624. /package/dist/{ESJTypes → types/ESJTypes}/props/PositionsProperty.d.ts +0 -0
  625. /package/dist/{ESJTypes → types/ESJTypes}/props/PositionsSetPropety.d.ts +0 -0
  626. /package/dist/{ESJTypes → types/ESJTypes}/props/Property.d.ts +0 -0
  627. /package/dist/{ESJTypes → types/ESJTypes}/props/ReactVarProperty.d.ts +0 -0
  628. /package/dist/{ESJTypes → types/ESJTypes}/props/RotationProperty.d.ts +0 -0
  629. /package/dist/{ESJTypes → types/ESJTypes}/props/UriProperty.d.ts +0 -0
  630. /package/dist/{ESJTypes → types/ESJTypes}/props/ViewPlayerProperty.d.ts +0 -0
  631. /package/dist/{ESJTypes → types/ESJTypes}/props/WithUndefinedProperty.d.ts +0 -0
  632. /package/dist/{ESJTypes → types/ESJTypes}/props/index.d.ts +0 -0
  633. /package/dist/{ESObjectManager → types/ESObjectManager}/ESPlyarAndPathTime.d.ts +0 -0
  634. /package/dist/{ESObjectManager → types/ESObjectManager}/PathAnimationManager.d.ts +0 -0
  635. /package/dist/{ESObjectManager → types/ESObjectManager}/SceneObjectEditingManager.d.ts +0 -0
  636. /package/dist/{ESObjectManager → types/ESObjectManager}/SceneObjectsListening.d.ts +0 -0
  637. /package/dist/{ESObjectManager → types/ESObjectManager}/SceneObjectsManager.d.ts +0 -0
  638. /package/dist/{ESObjectManager → types/ESObjectManager}/ViewersManager.d.ts +0 -0
  639. /package/dist/{ESObjectManager → types/ESObjectManager}/index.d.ts +0 -0
  640. /package/dist/{ESObjectManager → types/ESObjectManager}/propTreeCallback.d.ts +0 -0
  641. /package/dist/{ESObjectManager → types/ESObjectManager}/utils.d.ts +0 -0
  642. /package/dist/{ESObjects → types/ESObjects}/base/ESGeoVector.d.ts +0 -0
  643. /package/dist/{ESObjects → types/ESObjects}/base/ESLabel.d.ts +0 -0
  644. /package/dist/{ESObjects → types/ESObjects}/base/ESLocalVector.d.ts +0 -0
  645. /package/dist/{ESObjects → types/ESObjects}/base/ESLocalVector2D.d.ts +0 -0
  646. /package/dist/{ESObjects → types/ESObjects}/base/ESObjectWithLocation.d.ts +0 -0
  647. /package/dist/{ESObjects → types/ESObjects}/base/ESSceneObject/ESObjectsContext.d.ts +0 -0
  648. /package/dist/{ESObjects → types/ESObjects}/base/ESSceneObject/RefsManager.d.ts +0 -0
  649. /package/dist/{ESObjects → types/ESObjects}/base/ESSceneObject/funcs/createEnvEvalStrReact.d.ts +0 -0
  650. /package/dist/{ESObjects → types/ESObjects}/base/ESSceneObject/funcs/replaceStrWithEnv.d.ts +0 -0
  651. /package/dist/{ESObjects → types/ESObjects}/base/ESSceneObject/index.d.ts +0 -0
  652. /package/dist/{ESObjects → types/ESObjects}/base/ESTestObject.d.ts +0 -0
  653. /package/dist/{ESObjects → types/ESObjects}/base/ESVisualObject.d.ts +0 -0
  654. /package/dist/{ESObjects → types/ESObjects}/base/index.d.ts +0 -0
  655. /package/dist/{ESObjects → types/ESObjects}/general/ES3DTileset/index.d.ts +0 -0
  656. /package/dist/{ESObjects → types/ESObjects}/general/ES3DTileset/type.d.ts +0 -0
  657. /package/dist/{ESObjects → types/ESObjects}/general/ESAlarm.d.ts +0 -0
  658. /package/dist/{ESObjects → types/ESObjects}/general/ESApertureEffect.d.ts +0 -0
  659. /package/dist/{ESObjects → types/ESObjects}/general/ESAreaMeasurement.d.ts +0 -0
  660. /package/dist/{ESObjects → types/ESObjects}/general/ESBlastParticleSystem.d.ts +0 -0
  661. /package/dist/{ESObjects → types/ESObjects}/general/ESBoxClipping.d.ts +0 -0
  662. /package/dist/{ESObjects → types/ESObjects}/general/ESCameraView.d.ts +0 -0
  663. /package/dist/{ESObjects → types/ESObjects}/general/ESCameraViewCollection/ViewWrapper.d.ts +0 -0
  664. /package/dist/{ESObjects → types/ESObjects}/general/ESCameraViewCollection/index.d.ts +0 -0
  665. /package/dist/{ESObjects → types/ESObjects}/general/ESCameraVisibleRange.d.ts +0 -0
  666. /package/dist/{ESObjects → types/ESObjects}/general/ESCar.d.ts +0 -0
  667. /package/dist/{ESObjects → types/ESObjects}/general/ESCityBasePoint.d.ts +0 -0
  668. /package/dist/{ESObjects → types/ESObjects}/general/ESClassification.d.ts +0 -0
  669. /package/dist/{ESObjects → types/ESObjects}/general/ESClippingPlane.d.ts +0 -0
  670. /package/dist/{ESObjects → types/ESObjects}/general/ESCustomDiv/index.d.ts +0 -0
  671. /package/dist/{ESObjects → types/ESObjects}/general/ESCustomDiv/instance.d.ts +0 -0
  672. /package/dist/{ESObjects → types/ESObjects}/general/ESCzml.d.ts +0 -0
  673. /package/dist/{ESObjects → types/ESObjects}/general/ESDataMesh.d.ts +0 -0
  674. /package/dist/{ESObjects → types/ESObjects}/general/ESDatasmithRuntimeModel.d.ts +0 -0
  675. /package/dist/{ESObjects → types/ESObjects}/general/ESDirectionMeasurement.d.ts +0 -0
  676. /package/dist/{ESObjects → types/ESObjects}/general/ESDistanceMeasurement.d.ts +0 -0
  677. /package/dist/{ESObjects → types/ESObjects}/general/ESDynamicWater.d.ts +0 -0
  678. /package/dist/{ESObjects → types/ESObjects}/general/ESEntityCluster.d.ts +0 -0
  679. /package/dist/{ESObjects → types/ESObjects}/general/ESExcavate.d.ts +0 -0
  680. /package/dist/{ESObjects → types/ESObjects}/general/ESFeatureLayer/FeatureLayer.d.ts +0 -0
  681. /package/dist/{ESObjects → types/ESObjects}/general/ESFeatureLayer/PointLayer/index.d.ts +0 -0
  682. /package/dist/{ESObjects → types/ESObjects}/general/ESFeatureLayer/PointLayer/utils.d.ts +0 -0
  683. /package/dist/{ESObjects → types/ESObjects}/general/ESFeatureLayer/PolyLineLayer/index.d.ts +0 -0
  684. /package/dist/{ESObjects → types/ESObjects}/general/ESFeatureLayer/PolygonLayer/index.d.ts +0 -0
  685. /package/dist/{ESObjects → types/ESObjects}/general/ESFeatureLayer/PolygonLayer/utils.d.ts +0 -0
  686. /package/dist/{ESObjects → types/ESObjects}/general/ESFeatureLayer/index.d.ts +0 -0
  687. /package/dist/{ESObjects → types/ESObjects}/general/ESFeatureLayer/types.d.ts +0 -0
  688. /package/dist/{ESObjects → types/ESObjects}/general/ESFeatureLayer/utils.d.ts +0 -0
  689. /package/dist/{ESObjects → types/ESObjects}/general/ESFireParticleSystem.d.ts +0 -0
  690. /package/dist/{ESObjects → types/ESObjects}/general/ESForestTileset.d.ts +0 -0
  691. /package/dist/{ESObjects → types/ESObjects}/general/ESGaussianSplatting.d.ts +0 -0
  692. /package/dist/{ESObjects → types/ESObjects}/general/ESGeoDiv/index.d.ts +0 -0
  693. /package/dist/{ESObjects → types/ESObjects}/general/ESGeoDiv/mds.d.ts +0 -0
  694. /package/dist/{ESObjects → types/ESObjects}/general/ESGeoDivTextPoi.d.ts +0 -0
  695. /package/dist/{ESObjects → types/ESObjects}/general/ESGeoExtrudedPolygon.d.ts +0 -0
  696. /package/dist/{ESObjects → types/ESObjects}/general/ESGeoJson/index.d.ts +0 -0
  697. /package/dist/{ESObjects → types/ESObjects}/general/ESGeoJson/type.d.ts +0 -0
  698. /package/dist/{ESObjects → types/ESObjects}/general/ESGeoLineString.d.ts +0 -0
  699. /package/dist/{ESObjects → types/ESObjects}/general/ESGeoPoints/index.d.ts +0 -0
  700. /package/dist/{ESObjects → types/ESObjects}/general/ESGeoPolygon.d.ts +0 -0
  701. /package/dist/{ESObjects → types/ESObjects}/general/ESGeoRectangle.d.ts +0 -0
  702. /package/dist/{ESObjects → types/ESObjects}/general/ESGeoWater.d.ts +0 -0
  703. /package/dist/{ESObjects → types/ESObjects}/general/ESGltfModel.d.ts +0 -0
  704. /package/dist/{ESObjects → types/ESObjects}/general/ESHeatMap/index.d.ts +0 -0
  705. /package/dist/{ESObjects → types/ESObjects}/general/ESHeightLimitAnalysis.d.ts +0 -0
  706. /package/dist/{ESObjects → types/ESObjects}/general/ESHeightMeasurement.d.ts +0 -0
  707. /package/dist/{ESObjects → types/ESObjects}/general/ESHole.d.ts +0 -0
  708. /package/dist/{ESObjects → types/ESObjects}/general/ESHuman.d.ts +0 -0
  709. /package/dist/{ESObjects → types/ESObjects}/general/ESHumanPoi.d.ts +0 -0
  710. /package/dist/{ESObjects → types/ESObjects}/general/ESImageLabel.d.ts +0 -0
  711. /package/dist/{ESObjects → types/ESObjects}/general/ESImageryLayer/index.d.ts +0 -0
  712. /package/dist/{ESObjects → types/ESObjects}/general/ESImageryLayer/types.d.ts +0 -0
  713. /package/dist/{ESObjects → types/ESObjects}/general/ESLevelRuntimeModel.d.ts +0 -0
  714. /package/dist/{ESObjects → types/ESObjects}/general/ESLocalCircle.d.ts +0 -0
  715. /package/dist/{ESObjects → types/ESObjects}/general/ESLocalPolygon.d.ts +0 -0
  716. /package/dist/{ESObjects → types/ESObjects}/general/ESLocalPolygonZ.d.ts +0 -0
  717. /package/dist/{ESObjects → types/ESObjects}/general/ESLocalRectangle.d.ts +0 -0
  718. /package/dist/{ESObjects → types/ESObjects}/general/ESLocalRegularPolygon.d.ts +0 -0
  719. /package/dist/{ESObjects → types/ESObjects}/general/ESLocalSkyBox.d.ts +0 -0
  720. /package/dist/{ESObjects → types/ESObjects}/general/ESLocationMeasurement.d.ts +0 -0
  721. /package/dist/{ESObjects → types/ESObjects}/general/ESMsTileset/index.d.ts +0 -0
  722. /package/dist/{ESObjects → types/ESObjects}/general/ESMsTileset/types.d.ts +0 -0
  723. /package/dist/{ESObjects → types/ESObjects}/general/ESNavigator.d.ts +0 -0
  724. /package/dist/{ESObjects → types/ESObjects}/general/ESParticleSystemPrimitive.d.ts +0 -0
  725. /package/dist/{ESObjects → types/ESObjects}/general/ESPath/ESPathImpl/CurrentInfoType.d.ts +0 -0
  726. /package/dist/{ESObjects → types/ESObjects}/general/ESPath/ESPathImpl/GetCurrentFuncType.d.ts +0 -0
  727. /package/dist/{ESObjects → types/ESObjects}/general/ESPath/ESPathImpl/PolylineResetting.d.ts +0 -0
  728. /package/dist/{ESObjects → types/ESObjects}/general/ESPath/ESPathImpl/RotLerpModeType.d.ts +0 -0
  729. /package/dist/{ESObjects → types/ESObjects}/general/ESPath/ESPathImpl/computeRotIfUndefined.d.ts +0 -0
  730. /package/dist/{ESObjects → types/ESObjects}/general/ESPath/ESPathImpl/dataTextMd.d.ts +0 -0
  731. /package/dist/{ESObjects → types/ESObjects}/general/ESPath/ESPathImpl/getCurrent.d.ts +0 -0
  732. /package/dist/{ESObjects → types/ESObjects}/general/ESPath/ESPathImpl/index.d.ts +0 -0
  733. /package/dist/{ESObjects → types/ESObjects}/general/ESPath/ESPathImpl/parseData.d.ts +0 -0
  734. /package/dist/{ESObjects → types/ESObjects}/general/ESPath/ESPathImpl/subPath.d.ts +0 -0
  735. /package/dist/{ESObjects → types/ESObjects}/general/ESPath/ESPathImpl/subdivide.d.ts +0 -0
  736. /package/dist/{ESObjects → types/ESObjects}/general/ESPath/ESPathImpl/timePosRotsMd.d.ts +0 -0
  737. /package/dist/{ESObjects → types/ESObjects}/general/ESPath/index.d.ts +0 -0
  738. /package/dist/{ESObjects → types/ESObjects}/general/ESPipeFence.d.ts +0 -0
  739. /package/dist/{ESObjects → types/ESObjects}/general/ESPipeline.d.ts +0 -0
  740. /package/dist/{ESObjects → types/ESObjects}/general/ESPipeserTileset.d.ts +0 -0
  741. /package/dist/{ESObjects → types/ESObjects}/general/ESPit.d.ts +0 -0
  742. /package/dist/{ESObjects → types/ESObjects}/general/ESPlayer/AbsolutePlayer.d.ts +0 -0
  743. /package/dist/{ESObjects → types/ESObjects}/general/ESPlayer/index.d.ts +0 -0
  744. /package/dist/{ESObjects → types/ESObjects}/general/ESPoi2D.d.ts +0 -0
  745. /package/dist/{ESObjects → types/ESObjects}/general/ESPoi3D.d.ts +0 -0
  746. /package/dist/{ESObjects → types/ESObjects}/general/ESPoiTileset.d.ts +0 -0
  747. /package/dist/{ESObjects → types/ESObjects}/general/ESPolygonFence.d.ts +0 -0
  748. /package/dist/{ESObjects → types/ESObjects}/general/ESPolygonFlattenedPlane.d.ts +0 -0
  749. /package/dist/{ESObjects → types/ESObjects}/general/ESPolygonWithHole.d.ts +0 -0
  750. /package/dist/{ESObjects → types/ESObjects}/general/ESRectangle.d.ts +0 -0
  751. /package/dist/{ESObjects → types/ESObjects}/general/ESRefVoxels.d.ts +0 -0
  752. /package/dist/{ESObjects → types/ESObjects}/general/ESRtsFeatureEditing/index.d.ts +0 -0
  753. /package/dist/{ESObjects → types/ESObjects}/general/ESRtsFeatureEditing/types.d.ts +0 -0
  754. /package/dist/{ESObjects → types/ESObjects}/general/ESRtsTileset/index.d.ts +0 -0
  755. /package/dist/{ESObjects → types/ESObjects}/general/ESRtsTileset/types.d.ts +0 -0
  756. /package/dist/{ESObjects → types/ESObjects}/general/ESScale.d.ts +0 -0
  757. /package/dist/{ESObjects → types/ESObjects}/general/ESSeparateFoliage/CallFunc.d.ts +0 -0
  758. /package/dist/{ESObjects → types/ESObjects}/general/ESSeparateFoliage/index.d.ts +0 -0
  759. /package/dist/{ESObjects → types/ESObjects}/general/ESSkylineAnalysis/index.d.ts +0 -0
  760. /package/dist/{ESObjects → types/ESObjects}/general/ESStaticMesh.d.ts +0 -0
  761. /package/dist/{ESObjects → types/ESObjects}/general/ESSubmergingAnalysis/bufferUtils.d.ts +0 -0
  762. /package/dist/{ESObjects → types/ESObjects}/general/ESSubmergingAnalysis/index.d.ts +0 -0
  763. /package/dist/{ESObjects → types/ESObjects}/general/ESSubmergingAnalysis/parseGlb.d.ts +0 -0
  764. /package/dist/{ESObjects → types/ESObjects}/general/ESSunshineAnalysis/index.d.ts +0 -0
  765. /package/dist/{ESObjects → types/ESObjects}/general/ESSurfaceAreaMeasurement.d.ts +0 -0
  766. /package/dist/{ESObjects → types/ESObjects}/general/ESTerrainLayer.d.ts +0 -0
  767. /package/dist/{ESObjects → types/ESObjects}/general/ESTextLabel.d.ts +0 -0
  768. /package/dist/{ESObjects → types/ESObjects}/general/ESUEWidget.d.ts +0 -0
  769. /package/dist/{ESObjects → types/ESObjects}/general/ESUnrealActor.d.ts +0 -0
  770. /package/dist/{ESObjects → types/ESObjects}/general/ESVideoFusion.d.ts +0 -0
  771. /package/dist/{ESObjects → types/ESObjects}/general/ESViewShed.d.ts +0 -0
  772. /package/dist/{ESObjects → types/ESObjects}/general/ESViewerStatusBar.d.ts +0 -0
  773. /package/dist/{ESObjects → types/ESObjects}/general/ESViewerStatusBarScale.d.ts +0 -0
  774. /package/dist/{ESObjects → types/ESObjects}/general/ESVisibilityAnalysis.d.ts +0 -0
  775. /package/dist/{ESObjects → types/ESObjects}/general/ESVolumeMeasurement.d.ts +0 -0
  776. /package/dist/{ESObjects → types/ESObjects}/general/ESWidget.d.ts +0 -0
  777. /package/dist/{ESObjects → types/ESObjects}/general/index.d.ts +0 -0
  778. /package/dist/{ESObjects → types/ESObjects}/index.d.ts +0 -0
  779. /package/dist/{ESViewer → types/ESViewer}/ContainerStyleController.d.ts +0 -0
  780. /package/dist/{ESViewer → types/ESViewer}/ESViewer.d.ts +0 -0
  781. /package/dist/{ESViewer → types/ESViewer}/GeneralAnalysis/RollerShutterAnalysis.d.ts +0 -0
  782. /package/dist/{ESViewer → types/ESViewer}/GeneralAnalysis/index.d.ts +0 -0
  783. /package/dist/{ESViewer → types/ESViewer}/Resetting/index.d.ts +0 -0
  784. /package/dist/{ESViewer → types/ESViewer}/StatusContainer.d.ts +0 -0
  785. /package/dist/{ESViewer → types/ESViewer}/ViewerContainer.d.ts +0 -0
  786. /package/dist/{ESViewer → types/ESViewer}/ViewerContext.d.ts +0 -0
  787. /package/dist/{ESViewer → types/ESViewer}/ViewerCustomInteraction.d.ts +0 -0
  788. /package/dist/{ESViewer → types/ESViewer}/getContainer.d.ts +0 -0
  789. /package/dist/{ESViewer → types/ESViewer}/index.d.ts +0 -0
  790. /package/dist/{EngineObject → types/EngineObject}/EditingObjectContext.d.ts +0 -0
  791. /package/dist/{EngineObject → types/EngineObject}/EngineObjectsContext.d.ts +0 -0
  792. /package/dist/{EngineObject → types/EngineObject}/index.d.ts +0 -0
  793. /package/dist/{copyright.d.ts → types/copyright.d.ts} +0 -0
  794. /package/dist/{index.d.ts → types/index.d.ts} +0 -0
  795. /package/dist/{utils → types/utils}/PropTrees/PropTree.d.ts +0 -0
  796. /package/dist/{utils → types/utils}/PropTrees/PropTreeItem.d.ts +0 -0
  797. /package/dist/{utils → types/utils}/PropTrees/PropUiTreeManager.d.ts +0 -0
  798. /package/dist/{utils → types/utils}/PropTrees/index.d.ts +0 -0
  799. /package/dist/{utils → types/utils}/SceneTrees/SceneTree.d.ts +0 -0
  800. /package/dist/{utils → types/utils}/SceneTrees/SceneTreeContextMenu.d.ts +0 -0
  801. /package/dist/{utils → types/utils}/SceneTrees/SceneTreeItem.d.ts +0 -0
  802. /package/dist/{utils → types/utils}/SceneTrees/SceneTreeItemDragDrop.d.ts +0 -0
  803. /package/dist/{utils → types/utils}/SceneTrees/SceneTreeJsonLoading.d.ts +0 -0
  804. /package/dist/{utils → types/utils}/SceneTrees/defaultCreateSceneObject.d.ts +0 -0
  805. /package/dist/{utils → types/utils}/SceneTrees/defaultCreateTreeItemDragDrop.d.ts +0 -0
  806. /package/dist/{utils → types/utils}/SceneTrees/defaultLight122FromEnvironmentMapManager.d.ts +0 -0
  807. /package/dist/{utils → types/utils}/SceneTrees/defaultShowSceneObject.d.ts +0 -0
  808. /package/dist/{utils → types/utils}/SceneTrees/index.d.ts +0 -0
  809. /package/dist/{utils → types/utils}/SceneTrees/preload.d.ts +0 -0
  810. /package/dist/{utils → types/utils}/SmoothMoveController.d.ts +0 -0
  811. /package/dist/{utils → types/utils}/base/DragStartDataManager.d.ts +0 -0
  812. /package/dist/{utils → types/utils}/base/TreeItemDragDrop.d.ts +0 -0
  813. /package/dist/{utils → types/utils}/base/bindCustomEditing.d.ts +0 -0
  814. /package/dist/{utils → types/utils}/base/defaultInitSceneObjectOnCreatingFunc.d.ts +0 -0
  815. /package/dist/{utils → types/utils}/base/defaultUpdateSceneObjectOnPickingFunc.d.ts +0 -0
  816. /package/dist/{utils → types/utils}/base/getDefaultValue.d.ts +0 -0
  817. /package/dist/{utils → types/utils}/base/hasSameTags.d.ts +0 -0
  818. /package/dist/{utils → types/utils}/base/inOrderRunning.d.ts +0 -0
  819. /package/dist/{utils → types/utils}/base/index.d.ts +0 -0
  820. /package/dist/{utils → types/utils}/base/lerpAngle.d.ts +0 -0
  821. /package/dist/{utils → types/utils}/base/rpToap.d.ts +0 -0
  822. /package/dist/{utils → types/utils}/base/sceneObjectTreeItem.d.ts +0 -0
  823. /package/dist/{utils → types/utils}/base/utils.d.ts +0 -0
  824. /package/dist/{utils → types/utils}/components/ESSceneObjectWithId.d.ts +0 -0
  825. /package/dist/{utils → types/utils}/components/Player.d.ts +0 -0
  826. /package/dist/{utils → types/utils}/components/Watcher.d.ts +0 -0
  827. /package/dist/{utils → types/utils}/components/WatcherTools/index.d.ts +0 -0
  828. /package/dist/{utils → types/utils}/components/WatcherTools/toolsForWatcher.d.ts +0 -0
  829. /package/dist/{utils → types/utils}/components/index.d.ts +0 -0
  830. /package/dist/{utils → types/utils}/index.d.ts +0 -0
  831. /package/dist/{utils → types/utils}/proj4/getDistancesFromPositions.d.ts +0 -0
  832. /package/dist/{utils → types/utils}/proj4/getXyzFromPostion.d.ts +0 -0
  833. /package/dist/{utils → types/utils}/proj4/index.d.ts +0 -0
  834. /package/dist/{utils → types/utils}/proj4/lbhToXyz.d.ts +0 -0
  835. /package/dist/{utils → types/utils}/react.d.ts +0 -0
  836. /package/dist/{utils → types/utils}/registerCreatedEventUpdate.d.ts +0 -0
  837. /package/dist/{utils → types/utils}/registerEventUpdate.d.ts +0 -0
  838. /package/dist/{utils → types/utils}/turf/booleanPointInPolygon.d.ts +0 -0
  839. /package/dist/{utils → types/utils}/turf/geoAlong.d.ts +0 -0
  840. /package/dist/{utils → types/utils}/turf/geoArea.d.ts +0 -0
  841. /package/dist/{utils → types/utils}/turf/geoCenterOfMass.d.ts +0 -0
  842. /package/dist/{utils → types/utils}/turf/geoDestination.d.ts +0 -0
  843. /package/dist/{utils → types/utils}/turf/geoDistance.d.ts +0 -0
  844. /package/dist/{utils → types/utils}/turf/geoHeading.d.ts +0 -0
  845. /package/dist/{utils → types/utils}/turf/geoLineIntersect.d.ts +0 -0
  846. /package/dist/{utils → types/utils}/turf/geoMidpoint.d.ts +0 -0
  847. /package/dist/{utils → types/utils}/turf/geoNearestPointOnLine.d.ts +0 -0
  848. /package/dist/{utils → types/utils}/turf/geoPointToLineDistance.d.ts +0 -0
  849. /package/dist/{utils → types/utils}/turf/geoRhumbDestination.d.ts +0 -0
  850. /package/dist/{utils → types/utils}/turf/geoRhumbDistance.d.ts +0 -0
  851. /package/dist/{utils → types/utils}/turf/geoRhumbHeading.d.ts +0 -0
  852. /package/dist/{utils → types/utils}/turf/geoTools.d.ts +0 -0
  853. /package/dist/{utils → types/utils}/turf/getGeoBoundingSphereFromPositions.d.ts +0 -0
  854. /package/dist/{utils → types/utils}/turf/getMinMaxCorner.d.ts +0 -0
  855. /package/dist/{utils → types/utils}/turf/index.d.ts +0 -0
  856. /package/dist/{xbsj-base → types/xbsj-base}/index.d.ts +0 -0
  857. /package/dist/{xbsj-base → types/xbsj-base}/xr-base-utils/Destroyable/destroyObject.d.ts +0 -0
  858. /package/dist/{xbsj-base → types/xbsj-base}/xr-base-utils/Destroyable/index.d.ts +0 -0
  859. /package/dist/{xbsj-base → types/xbsj-base}/xr-base-utils/ObjPool.d.ts +0 -0
  860. /package/dist/{xbsj-base → types/xbsj-base}/xr-base-utils/events.d.ts +0 -0
  861. /package/dist/{xbsj-base → types/xbsj-base}/xr-base-utils/index.d.ts +0 -0
  862. /package/dist/{xbsj-base → types/xbsj-base}/xr-base-utils/oneTimeWarning.d.ts +0 -0
  863. /package/dist/{xbsj-base → types/xbsj-base}/xr-base-utils/pipe/DoublyLinkedList.d.ts +0 -0
  864. /package/dist/{xbsj-base → types/xbsj-base}/xr-base-utils/pipe/Event.d.ts +0 -0
  865. /package/dist/{xbsj-base → types/xbsj-base}/xr-base-utils/pipe/ListenerPipe.d.ts +0 -0
  866. /package/dist/{xbsj-base → types/xbsj-base}/xr-base-utils/pipe/SmartListenerHandler.d.ts +0 -0
  867. /package/dist/{xbsj-base → types/xbsj-base}/xr-base-utils/pipe/SmartListenerPipe.d.ts +0 -0
  868. /package/dist/{xbsj-base → types/xbsj-base}/xr-base-utils/pipe/index.d.ts +0 -0
  869. /package/dist/{xbsj-base → types/xbsj-base}/xr-base-utils/save/downloadLink.d.ts +0 -0
  870. /package/dist/{xbsj-base → types/xbsj-base}/xr-base-utils/save/index.d.ts +0 -0
  871. /package/dist/{xbsj-base → types/xbsj-base}/xr-base-utils/save/saveOnBrowser.d.ts +0 -0
  872. /package/dist/{xbsj-base → types/xbsj-base}/xr-base-utils/timeFuncs.d.ts +0 -0
  873. /package/dist/{xbsj-base → types/xbsj-base}/xr-utils/ObservableSet.d.ts +0 -0
  874. /package/dist/{xbsj-base → types/xbsj-base}/xr-utils/index.d.ts +0 -0
@@ -1,7 +1,7 @@
1
- var EarthSDK3=function(M,p){"use strict";var GM=Object.defineProperty;var kM=(M,p,ta)=>p in M?GM(M,p,{enumerable:!0,configurable:!0,writable:!0,value:ta}):M[p]=ta;var g=(M,p,ta)=>kM(M,typeof p!="symbol"?p+"":p,ta);function ta(){const n=navigator.userAgent;let t="Unknown";/Windows/.test(n)?t="Windows":/Macintosh/.test(n)?t="MacOS":/Linux/.test(n)?t="Linux":/Android/.test(n)?t="Android":/iOS|iPhone|iPad|iPod/.test(n)&&(t="iOS");let e="Unknown";return/x64|x86_64|Win64|WOW64/.test(n)?e="x64":/x86|i686|Win32/.test(n)?e="x86":/arm64|aarch64/.test(n)?e="arm64":/arm/.test(n)&&(e="arm"),{os:t.toLocaleLowerCase(),arch:e.toLocaleLowerCase()}}const py=Date.now();function Fg(n){const{os:t,arch:e}=ta(),r={version:n.version,commitdate:n.date,commitId:n.commitId,runningTime:(Date.now()-py)/1e3/60|0,date:new Date().toLocaleString(),href:window.location.href,os:t,arch:e},s={method:"GET",headers:new Headers,redirect:"follow"},o=window.encodeURIComponent(JSON.stringify(r));fetch(`https://account.bjxbsj.cn/api/product/record?product=EarthSDKJS&content=${o}`,s).then(a=>a.text()).then(a=>console.log(a)).catch(a=>console.log("error",a))}M.copyright=void 0;try{const n="earthsdk3",t="3.4.0-beta.14",e="2025-09-04T09:50:16.000Z",r="北京西部世界科技有限公司",i="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="2f66fa5c727be8472175214486ff7c46128a4eb7",a=((Date.now()-1756979416e3)/36e5).toFixed(1),u=`%c🌏 ${n}%c ${t}.${s.slice(0,8)}.${e} (距今${a}个小时)
1
+ var EarthSDK3=function(M,p){"use strict";var GM=Object.defineProperty;var kM=(M,p,ta)=>p in M?GM(M,p,{enumerable:!0,configurable:!0,writable:!0,value:ta}):M[p]=ta;var g=(M,p,ta)=>kM(M,typeof p!="symbol"?p+"":p,ta);function ta(){const n=navigator.userAgent;let t="Unknown";/Windows/.test(n)?t="Windows":/Macintosh/.test(n)?t="MacOS":/Linux/.test(n)?t="Linux":/Android/.test(n)?t="Android":/iOS|iPhone|iPad|iPod/.test(n)&&(t="iOS");let e="Unknown";return/x64|x86_64|Win64|WOW64/.test(n)?e="x64":/x86|i686|Win32/.test(n)?e="x86":/arm64|aarch64/.test(n)?e="arm64":/arm/.test(n)&&(e="arm"),{os:t.toLocaleLowerCase(),arch:e.toLocaleLowerCase()}}const py=Date.now();function Fg(n){const{os:t,arch:e}=ta(),r={version:n.version,commitdate:n.date,commitId:n.commitId,runningTime:(Date.now()-py)/1e3/60|0,date:new Date().toLocaleString(),href:window.location.href,os:t,arch:e},s={method:"GET",headers:new Headers,redirect:"follow"},o=window.encodeURIComponent(JSON.stringify(r));fetch(`https://account.bjxbsj.cn/api/product/record?product=EarthSDKJS&content=${o}`,s).then(a=>a.text()).then(a=>console.log(a)).catch(a=>console.log("error",a))}M.copyright=void 0;try{const n="earthsdk3",t="3.4.0-beta.16",e="2025-09-08T01:54:22.000Z",r="北京西部世界科技有限公司",i="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="abf046d22268a6a83ae6b4470ade54e01a830733",a=((Date.now()-1757296462e3)/36e5).toFixed(1),u=`%c🌏 ${n}%c ${t}.${s.slice(0,8)}.${e} (距今${a}个小时)
2
2
  %c${i?i+`
3
3
  `:""}当前网站正在使用${n},此软件版权归${r}所有
4
- `;M.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","2f66fa5c727be8472175214486ff7c46128a4eb7")},get info(){return u},get date(){return"2025-09-04T09:50:16.000Z"},get author(){return"suplyang"},get version(){return"3.4.0-beta.14"},get name(){return"earthsdk3"},get commitId(){return"2f66fa5c727be8472175214486ff7c46128a4eb7"},print(){console.info(this.info,`
4
+ `;M.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","abf046d22268a6a83ae6b4470ade54e01a830733")},get info(){return u},get date(){return"2025-09-08T01:54:22.000Z"},get author(){return"suplyang"},get version(){return"3.4.0-beta.16"},get name(){return"earthsdk3"},get commitId(){return"abf046d22268a6a83ae6b4470ade54e01a830733"},print(){console.info(this.info,`
5
5
  font-size: 18px;
6
6
  font-weight: 1000;
7
7
  line-height: 1;
@@ -65,7 +65,7 @@ northing meters`+n;var f=h/2,d=0,v=0,_,E,P,y,w;return f>0&&(_=1e5/Math.pow(10,f)
65
65
  `);var s=t+(e?" ":"│ ");n.left&&_f(n.left,s,!1,r,i),n.right&&_f(n.right,s,!0,r,i)}}var wf=function(){function n(t){t===void 0&&(t=VP),this._root=null,this._size=0,this._comparator=t}return n.prototype.insert=function(t,e){return this._size++,this._root=yf(t,e,this._root,this._comparator)},n.prototype.add=function(t,e){var r=new xs(t,e);this._root===null&&(r.left=r.right=null,this._size++,this._root=r);var i=this._comparator,s=Ts(t,this._root,i),o=i(t,s.key);return o===0?this._root=s:(o<0?(r.left=s.left,r.right=s,s.left=null):o>0&&(r.right=s.right,r.left=s,s.right=null),this._size++,this._root=r),this._root},n.prototype.remove=function(t){this._root=this._remove(t,this._root,this._comparator)},n.prototype._remove=function(t,e,r){var i;if(e===null)return null;e=Ts(t,e,r);var s=r(t,e.key);return s===0?(e.left===null?i=e.right:(i=Ts(t,e.left,r),i.right=e.right),this._size--,i):e},n.prototype.pop=function(){var t=this._root;if(t){for(;t.left;)t=t.left;return this._root=Ts(t.key,this._root,this._comparator),this._root=this._remove(t.key,this._root,this._comparator),{key:t.key,data:t.data}}return null},n.prototype.findStatic=function(t){for(var e=this._root,r=this._comparator;e;){var i=r(t,e.key);if(i===0)return e;i<0?e=e.left:e=e.right}return null},n.prototype.find=function(t){return this._root&&(this._root=Ts(t,this._root,this._comparator),this._comparator(t,this._root.key)!==0)?null:this._root},n.prototype.contains=function(t){for(var e=this._root,r=this._comparator;e;){var i=r(t,e.key);if(i===0)return!0;i<0?e=e.left:e=e.right}return!1},n.prototype.forEach=function(t,e){for(var r=this._root,i=[],s=!1;!s;)r!==null?(i.push(r),r=r.left):i.length!==0?(r=i.pop(),t.call(e,r),r=r.right):s=!0;return this},n.prototype.range=function(t,e,r,i){for(var s=[],o=this._comparator,a=this._root,u;s.length!==0||a;)if(a)s.push(a),a=a.left;else{if(a=s.pop(),u=o(a.key,e),u>0)break;if(o(a.key,t)>=0&&r.call(i,a))return this;a=a.right}return this},n.prototype.keys=function(){var t=[];return this.forEach(function(e){var r=e.key;return t.push(r)}),t},n.prototype.values=function(){var t=[];return this.forEach(function(e){var r=e.data;return t.push(r)}),t},n.prototype.min=function(){return this._root?this.minNode(this._root).key:null},n.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},n.prototype.minNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.left;)t=t.left;return t},n.prototype.maxNode=function(t){if(t===void 0&&(t=this._root),t)for(;t.right;)t=t.right;return t},n.prototype.at=function(t){for(var e=this._root,r=!1,i=0,s=[];!r;)if(e)s.push(e),e=e.left;else if(s.length>0){if(e=s.pop(),i===t)return e;i++,e=e.right}else r=!0;return null},n.prototype.next=function(t){var e=this._root,r=null;if(t.right){for(r=t.right;r.left;)r=r.left;return r}for(var i=this._comparator;e;){var s=i(t.key,e.key);if(s===0)break;s<0?(r=e,e=e.left):e=e.right}return r},n.prototype.prev=function(t){var e=this._root,r=null;if(t.left!==null){for(r=t.left;r.right;)r=r.right;return r}for(var i=this._comparator;e;){var s=i(t.key,e.key);if(s===0)break;s<0?e=e.left:(r=e,e=e.right)}return r},n.prototype.clear=function(){return this._root=null,this._size=0,this},n.prototype.toList=function(){return qP(this._root)},n.prototype.load=function(t,e,r){e===void 0&&(e=[]),r===void 0&&(r=!1);var i=t.length,s=this._comparator;if(r&&Cf(t,e,0,i-1,s),this._root===null)this._root=Ef(t,e,0,i),this._size=i;else{var o=WP(this.toList(),zP(t,e),s);i=this._size+i,this._root=Sf({head:o},0,i)}return this},n.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(n.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),n.prototype.toString=function(t){t===void 0&&(t=function(r){return String(r.key)});var e=[];return _f(this._root,"",!0,function(r){return e.push(r)},t),e.join("")},n.prototype.update=function(t,e,r){var i=this._comparator,s=H0(t,this._root,i),o=s.left,a=s.right;i(t,e)<0?a=yf(e,r,a,i):o=yf(e,r,o,i),this._root=UP(o,a,i)},n.prototype.split=function(t){return H0(t,this._root,this._comparator)},n.prototype[Symbol.iterator]=function(){var t,e,r;return kP(this,function(i){switch(i.label){case 0:t=this._root,e=[],r=!1,i.label=1;case 1:return r?[3,6]:t===null?[3,2]:(e.push(t),t=t.left,[3,5]);case 2:return e.length===0?[3,4]:(t=e.pop(),[4,t]);case 3:return i.sent(),t=t.right,[3,5];case 4:r=!0,i.label=5;case 5:return[3,1];case 6:return[2]}})},n}();function Ef(n,t,e,r){var i=r-e;if(i>0){var s=e+Math.floor(i/2),o=n[s],a=t[s],u=new xs(o,a);return u.left=Ef(n,t,e,s),u.right=Ef(n,t,s+1,r),u}return null}function zP(n,t){for(var e=new xs(null,null),r=e,i=0;i<n.length;i++)r=r.next=new xs(n[i],t[i]);return r.next=null,e.next}function qP(n){for(var t=n,e=[],r=!1,i=new xs(null,null),s=i;!r;)t?(e.push(t),t=t.left):e.length>0?(t=s=s.next=e.pop(),t=t.right):r=!0;return s.next=null,i.next}function Sf(n,t,e){var r=e-t;if(r>0){var i=t+Math.floor(r/2),s=Sf(n,t,i),o=n.head;return o.left=s,n.head=n.head.next,o.right=Sf(n,i+1,e),o}return null}function WP(n,t,e){for(var r=new xs(null,null),i=r,s=n,o=t;s!==null&&o!==null;)e(s.key,o.key)<0?(i.next=s,s=s.next):(i.next=o,o=o.next),i=i.next;return s!==null?i.next=s:o!==null&&(i.next=o),r.next}function Cf(n,t,e,r,i){if(!(e>=r)){for(var s=n[e+r>>1],o=e-1,a=r+1;;){do o++;while(i(n[o],s)<0);do a--;while(i(n[a],s)>0);if(o>=a)break;var u=n[o];n[o]=n[a],n[a]=u,u=t[o],t[o]=t[a],t[a]=u}Cf(n,t,e,a,i),Cf(n,t,a+1,r,i)}}const es=11102230246251565e-32,yr=134217729,HP=(3+8*es)*es;function Pf(n,t,e,r,i){let s,o,a,u,l=t[0],c=r[0],h=0,f=0;c>l==c>-l?(s=l,l=t[++h]):(s=c,c=r[++f]);let d=0;if(h<n&&f<e)for(c>l==c>-l?(o=l+s,a=s-(o-l),l=t[++h]):(o=c+s,a=s-(o-c),c=r[++f]),s=o,a!==0&&(i[d++]=a);h<n&&f<e;)c>l==c>-l?(o=s+l,u=o-s,a=s-(o-u)+(l-u),l=t[++h]):(o=s+c,u=o-s,a=s-(o-u)+(c-u),c=r[++f]),s=o,a!==0&&(i[d++]=a);for(;h<n;)o=s+l,u=o-s,a=s-(o-u)+(l-u),l=t[++h],s=o,a!==0&&(i[d++]=a);for(;f<e;)o=s+c,u=o-s,a=s-(o-u)+(c-u),c=r[++f],s=o,a!==0&&(i[d++]=a);return(s!==0||d===0)&&(i[d++]=s),d}function XP(n,t){let e=t[0];for(let r=1;r<n;r++)e+=t[r];return e}function rl(n){return new Float64Array(n)}const BP=(3+16*es)*es,YP=(2+12*es)*es,JP=(9+64*es)*es*es,ma=rl(4),X0=rl(8),B0=rl(12),Y0=rl(16),Dr=rl(4);function jP(n,t,e,r,i,s,o){let a,u,l,c,h,f,d,v,_,E,P,y,w,m,S,C,I,b;const x=n-i,A=e-i,N=t-s,T=r-s;m=x*T,f=yr*x,d=f-(f-x),v=x-d,f=yr*T,_=f-(f-T),E=T-_,S=v*E-(m-d*_-v*_-d*E),C=N*A,f=yr*N,d=f-(f-N),v=N-d,f=yr*A,_=f-(f-A),E=A-_,I=v*E-(C-d*_-v*_-d*E),P=S-I,h=S-P,ma[0]=S-(P+h)+(h-I),y=m+P,h=y-m,w=m-(y-h)+(P-h),P=w-C,h=w-P,ma[1]=w-(P+h)+(h-C),b=y+P,h=b-y,ma[2]=y-(b-h)+(P-h),ma[3]=b;let L=XP(4,ma),U=YP*o;if(L>=U||-L>=U||(h=n-x,a=n-(x+h)+(h-i),h=e-A,l=e-(A+h)+(h-i),h=t-N,u=t-(N+h)+(h-s),h=r-T,c=r-(T+h)+(h-s),a===0&&u===0&&l===0&&c===0)||(U=JP*o+HP*Math.abs(L),L+=x*c+T*a-(N*l+A*u),L>=U||-L>=U))return L;m=a*T,f=yr*a,d=f-(f-a),v=a-d,f=yr*T,_=f-(f-T),E=T-_,S=v*E-(m-d*_-v*_-d*E),C=u*A,f=yr*u,d=f-(f-u),v=u-d,f=yr*A,_=f-(f-A),E=A-_,I=v*E-(C-d*_-v*_-d*E),P=S-I,h=S-P,Dr[0]=S-(P+h)+(h-I),y=m+P,h=y-m,w=m-(y-h)+(P-h),P=w-C,h=w-P,Dr[1]=w-(P+h)+(h-C),b=y+P,h=b-y,Dr[2]=y-(b-h)+(P-h),Dr[3]=b;const $=Pf(4,ma,4,Dr,X0);m=x*c,f=yr*x,d=f-(f-x),v=x-d,f=yr*c,_=f-(f-c),E=c-_,S=v*E-(m-d*_-v*_-d*E),C=N*l,f=yr*N,d=f-(f-N),v=N-d,f=yr*l,_=f-(f-l),E=l-_,I=v*E-(C-d*_-v*_-d*E),P=S-I,h=S-P,Dr[0]=S-(P+h)+(h-I),y=m+P,h=y-m,w=m-(y-h)+(P-h),P=w-C,h=w-P,Dr[1]=w-(P+h)+(h-C),b=y+P,h=b-y,Dr[2]=y-(b-h)+(P-h),Dr[3]=b;const Y=Pf($,X0,4,Dr,B0);m=a*c,f=yr*a,d=f-(f-a),v=a-d,f=yr*c,_=f-(f-c),E=c-_,S=v*E-(m-d*_-v*_-d*E),C=u*l,f=yr*u,d=f-(f-u),v=u-d,f=yr*l,_=f-(f-l),E=l-_,I=v*E-(C-d*_-v*_-d*E),P=S-I,h=S-P,Dr[0]=S-(P+h)+(h-I),y=m+P,h=y-m,w=m-(y-h)+(P-h),P=w-C,h=w-P,Dr[1]=w-(P+h)+(h-C),b=y+P,h=b-y,Dr[2]=y-(b-h)+(P-h),Dr[3]=b;const Z=Pf(Y,B0,4,Dr,Y0);return Y0[Z-1]}function QP(n,t,e,r,i,s){const o=(t-s)*(e-i),a=(n-i)*(r-s),u=o-a,l=Math.abs(o+a);return Math.abs(u)>=BP*l?u:-jP(n,t,e,r,i,s,l)}const nl=(n,t)=>n.ll.x<=t.x&&t.x<=n.ur.x&&n.ll.y<=t.y&&t.y<=n.ur.y,If=(n,t)=>{if(t.ur.x<n.ll.x||n.ur.x<t.ll.x||t.ur.y<n.ll.y||n.ur.y<t.ll.y)return null;const e=n.ll.x<t.ll.x?t.ll.x:n.ll.x,r=n.ur.x<t.ur.x?n.ur.x:t.ur.x,i=n.ll.y<t.ll.y?t.ll.y:n.ll.y,s=n.ur.y<t.ur.y?n.ur.y:t.ur.y;return{ll:{x:e,y:i},ur:{x:r,y:s}}};let As=Number.EPSILON;As===void 0&&(As=Math.pow(2,-52));const $P=As*As,J0=(n,t)=>{if(-As<n&&n<As&&-As<t&&t<As)return 0;const e=n-t;return e*e<$P*n*t?0:n<t?-1:1};class KP{constructor(){this.reset()}reset(){this.xRounder=new j0,this.yRounder=new j0}round(t,e){return{x:this.xRounder.round(t),y:this.yRounder.round(e)}}}class j0{constructor(){this.tree=new wf,this.round(0)}round(t){const e=this.tree.add(t),r=this.tree.prev(e);if(r!==null&&J0(e.key,r.key)===0)return this.tree.remove(t),r.key;const i=this.tree.next(e);return i!==null&&J0(e.key,i.key)===0?(this.tree.remove(t),i.key):t}}const il=new KP,yh=(n,t)=>n.x*t.y-n.y*t.x,Q0=(n,t)=>n.x*t.x+n.y*t.y,$0=(n,t,e)=>{const r=QP(n.x,n.y,t.x,t.y,e.x,e.y);return r>0?-1:r<0?1:0},_h=n=>Math.sqrt(Q0(n,n)),ZP=(n,t,e)=>{const r={x:t.x-n.x,y:t.y-n.y},i={x:e.x-n.x,y:e.y-n.y};return yh(i,r)/_h(i)/_h(r)},tI=(n,t,e)=>{const r={x:t.x-n.x,y:t.y-n.y},i={x:e.x-n.x,y:e.y-n.y};return Q0(i,r)/_h(i)/_h(r)},K0=(n,t,e)=>t.y===0?null:{x:n.x+t.x/t.y*(e-n.y),y:e},Z0=(n,t,e)=>t.x===0?null:{x:e,y:n.y+t.y/t.x*(e-n.x)},eI=(n,t,e,r)=>{if(t.x===0)return Z0(e,r,n.x);if(r.x===0)return Z0(n,t,e.x);if(t.y===0)return K0(e,r,n.y);if(r.y===0)return K0(n,t,e.y);const i=yh(t,r);if(i==0)return null;const s={x:e.x-n.x,y:e.y-n.y},o=yh(s,t)/i,a=yh(s,r)/i,u=n.x+a*t.x,l=e.x+o*r.x,c=n.y+a*t.y,h=e.y+o*r.y,f=(u+l)/2,d=(c+h)/2;return{x:f,y:d}};class Pn{static compare(t,e){const r=Pn.comparePoints(t.point,e.point);return r!==0?r:(t.point!==e.point&&t.link(e),t.isLeft!==e.isLeft?t.isLeft?1:-1:Os.compare(t.segment,e.segment))}static comparePoints(t,e){return t.x<e.x?-1:t.x>e.x?1:t.y<e.y?-1:t.y>e.y?1:0}constructor(t,e){t.events===void 0?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}link(t){if(t.point===this.point)throw new Error("Tried to link already linked events");const e=t.point.events;for(let r=0,i=e.length;r<i;r++){const s=e[r];this.point.events.push(s),s.point=this.point}this.checkForConsuming()}checkForConsuming(){const t=this.point.events.length;for(let e=0;e<t;e++){const r=this.point.events[e];if(r.segment.consumedBy===void 0)for(let i=e+1;i<t;i++){const s=this.point.events[i];s.consumedBy===void 0&&r.otherSE.point.events===s.otherSE.point.events&&r.segment.consume(s.segment)}}}getAvailableLinkedEvents(){const t=[];for(let e=0,r=this.point.events.length;e<r;e++){const i=this.point.events[e];i!==this&&!i.segment.ringOut&&i.segment.isInResult()&&t.push(i)}return t}getLeftmostComparator(t){const e=new Map,r=i=>{const s=i.otherSE;e.set(i,{sine:ZP(this.point,t.point,s.point),cosine:tI(this.point,t.point,s.point)})};return(i,s)=>{e.has(i)||r(i),e.has(s)||r(s);const{sine:o,cosine:a}=e.get(i),{sine:u,cosine:l}=e.get(s);return o>=0&&u>=0?a<l?1:a>l?-1:0:o<0&&u<0?a<l?-1:a>l?1:0:u<o?-1:u>o?1:0}}}let rI=0;class Os{static compare(t,e){const r=t.leftSE.point.x,i=e.leftSE.point.x,s=t.rightSE.point.x,o=e.rightSE.point.x;if(o<r)return 1;if(s<i)return-1;const a=t.leftSE.point.y,u=e.leftSE.point.y,l=t.rightSE.point.y,c=e.rightSE.point.y;if(r<i){if(u<a&&u<l)return 1;if(u>a&&u>l)return-1;const h=t.comparePoint(e.leftSE.point);if(h<0)return 1;if(h>0)return-1;const f=e.comparePoint(t.rightSE.point);return f!==0?f:-1}if(r>i){if(a<u&&a<c)return-1;if(a>u&&a>c)return 1;const h=e.comparePoint(t.leftSE.point);if(h!==0)return h;const f=t.comparePoint(e.rightSE.point);return f<0?1:f>0?-1:1}if(a<u)return-1;if(a>u)return 1;if(s<o){const h=e.comparePoint(t.rightSE.point);if(h!==0)return h}if(s>o){const h=t.comparePoint(e.rightSE.point);if(h<0)return 1;if(h>0)return-1}if(s!==o){const h=l-a,f=s-r,d=c-u,v=o-i;if(h>f&&d<v)return 1;if(h<f&&d>v)return-1}return s>o?1:s<o||l<c?-1:l>c?1:t.id<e.id?-1:t.id>e.id?1:0}constructor(t,e,r,i){this.id=++rI,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=r,this.windings=i}static fromRing(t,e,r){let i,s,o;const a=Pn.comparePoints(t,e);if(a<0)i=t,s=e,o=1;else if(a>0)i=e,s=t,o=-1;else throw new Error(`Tried to create degenerate segment at [${t.x}, ${t.y}]`);const u=new Pn(i,!0),l=new Pn(s,!1);return new Os(u,l,[r],[o])}replaceRightSE(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){const t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t<e?t:e},ur:{x:this.rightSE.point.x,y:t>e?t:e}}}vector(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}isAnEndpoint(t){return t.x===this.leftSE.point.x&&t.y===this.leftSE.point.y||t.x===this.rightSE.point.x&&t.y===this.rightSE.point.y}comparePoint(t){if(this.isAnEndpoint(t))return 0;const e=this.leftSE.point,r=this.rightSE.point,i=this.vector();if(e.x===r.x)return t.x===e.x?0:t.x<e.x?1:-1;const s=(t.y-e.y)/i.y,o=e.x+s*i.x;if(t.x===o)return 0;const a=(t.x-e.x)/i.x,u=e.y+a*i.y;return t.y===u?0:t.y<u?-1:1}getIntersection(t){const e=this.bbox(),r=t.bbox(),i=If(e,r);if(i===null)return null;const s=this.leftSE.point,o=this.rightSE.point,a=t.leftSE.point,u=t.rightSE.point,l=nl(e,a)&&this.comparePoint(a)===0,c=nl(r,s)&&t.comparePoint(s)===0,h=nl(e,u)&&this.comparePoint(u)===0,f=nl(r,o)&&t.comparePoint(o)===0;if(c&&l)return f&&!h?o:!f&&h?u:null;if(c)return h&&s.x===u.x&&s.y===u.y?null:s;if(l)return f&&o.x===a.x&&o.y===a.y?null:a;if(f&&h)return null;if(f)return o;if(h)return u;const d=eI(s,this.vector(),a,t.vector());return d===null||!nl(i,d)?null:il.round(d.x,d.y)}split(t){const e=[],r=t.events!==void 0,i=new Pn(t,!0),s=new Pn(t,!1),o=this.rightSE;this.replaceRightSE(s),e.push(s),e.push(i);const a=new Os(i,o,this.rings.slice(),this.windings.slice());return Pn.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),Pn.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),r&&(i.checkForConsuming(),s.checkForConsuming()),e}swapEvents(){const t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let e=0,r=this.windings.length;e<r;e++)this.windings[e]*=-1}consume(t){let e=this,r=t;for(;e.consumedBy;)e=e.consumedBy;for(;r.consumedBy;)r=r.consumedBy;const i=Os.compare(e,r);if(i!==0){if(i>0){const s=e;e=r,r=s}if(e.prev===r){const s=e;e=r,r=s}for(let s=0,o=r.rings.length;s<o;s++){const a=r.rings[s],u=r.windings[s],l=e.rings.indexOf(a);l===-1?(e.rings.push(a),e.windings.push(u)):e.windings[l]+=u}r.rings=null,r.windings=null,r.consumedBy=e,r.leftSE.consumedBy=e.leftSE,r.rightSE.consumedBy=e.rightSE}}prevInResult(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}beforeState(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{const t=this.prev.consumedBy||this.prev;this._beforeState=t.afterState()}return this._beforeState}afterState(){if(this._afterState!==void 0)return this._afterState;const t=this.beforeState();this._afterState={rings:t.rings.slice(0),windings:t.windings.slice(0),multiPolys:[]};const e=this._afterState.rings,r=this._afterState.windings,i=this._afterState.multiPolys;for(let a=0,u=this.rings.length;a<u;a++){const l=this.rings[a],c=this.windings[a],h=e.indexOf(l);h===-1?(e.push(l),r.push(c)):r[h]+=c}const s=[],o=[];for(let a=0,u=e.length;a<u;a++){if(r[a]===0)continue;const l=e[a],c=l.poly;if(o.indexOf(c)===-1)if(l.isExterior)s.push(c);else{o.indexOf(c)===-1&&o.push(c);const h=s.indexOf(l.poly);h!==-1&&s.splice(h,1)}}for(let a=0,u=s.length;a<u;a++){const l=s[a].multiPoly;i.indexOf(l)===-1&&i.push(l)}return this._afterState}isInResult(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;const t=this.beforeState().multiPolys,e=this.afterState().multiPolys;switch(ri.type){case"union":{const r=t.length===0,i=e.length===0;this._isInResult=r!==i;break}case"intersection":{let r,i;t.length<e.length?(r=t.length,i=e.length):(r=e.length,i=t.length),this._isInResult=i===ri.numMultiPolys&&r<i;break}case"xor":{const r=Math.abs(t.length-e.length);this._isInResult=r%2===1;break}case"difference":{const r=i=>i.length===1&&i[0].isSubject;this._isInResult=r(t)!==r(e);break}default:throw new Error(`Unrecognized operation type found ${ri.type}`)}return this._isInResult}}class tv{constructor(t,e,r){if(!Array.isArray(t)||t.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=e,this.isExterior=r,this.segments=[],typeof t[0][0]!="number"||typeof t[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");const i=il.round(t[0][0],t[0][1]);this.bbox={ll:{x:i.x,y:i.y},ur:{x:i.x,y:i.y}};let s=i;for(let o=1,a=t.length;o<a;o++){if(typeof t[o][0]!="number"||typeof t[o][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");let u=il.round(t[o][0],t[o][1]);u.x===s.x&&u.y===s.y||(this.segments.push(Os.fromRing(s,u,this)),u.x<this.bbox.ll.x&&(this.bbox.ll.x=u.x),u.y<this.bbox.ll.y&&(this.bbox.ll.y=u.y),u.x>this.bbox.ur.x&&(this.bbox.ur.x=u.x),u.y>this.bbox.ur.y&&(this.bbox.ur.y=u.y),s=u)}(i.x!==s.x||i.y!==s.y)&&this.segments.push(Os.fromRing(s,i,this))}getSweepEvents(){const t=[];for(let e=0,r=this.segments.length;e<r;e++){const i=this.segments[e];t.push(i.leftSE),t.push(i.rightSE)}return t}}class nI{constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new tv(t[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(let r=1,i=t.length;r<i;r++){const s=new tv(t[r],this,!1);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.interiorRings.push(s)}this.multiPoly=e}getSweepEvents(){const t=this.exteriorRing.getSweepEvents();for(let e=0,r=this.interiorRings.length;e<r;e++){const i=this.interiorRings[e].getSweepEvents();for(let s=0,o=i.length;s<o;s++)t.push(i[s])}return t}}class ev{constructor(t,e){if(!Array.isArray(t))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof t[0][0][0]=="number"&&(t=[t])}catch{}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(let r=0,i=t.length;r<i;r++){const s=new nI(t[r],this);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.polys.push(s)}this.isSubject=e}getSweepEvents(){const t=[];for(let e=0,r=this.polys.length;e<r;e++){const i=this.polys[e].getSweepEvents();for(let s=0,o=i.length;s<o;s++)t.push(i[s])}return t}}class wh{static factory(t){const e=[];for(let r=0,i=t.length;r<i;r++){const s=t[r];if(!s.isInResult()||s.ringOut)continue;let o=null,a=s.leftSE,u=s.rightSE;const l=[a],c=a.point,h=[];for(;o=a,a=u,l.push(a),a.point!==c;)for(;;){const f=a.getAvailableLinkedEvents();if(f.length===0){const _=l[0].point,E=l[l.length-1].point;throw new Error(`Unable to complete output ring starting at [${_.x}, ${_.y}]. Last matching segment found ends at [${E.x}, ${E.y}].`)}if(f.length===1){u=f[0].otherSE;break}let d=null;for(let _=0,E=h.length;_<E;_++)if(h[_].point===a.point){d=_;break}if(d!==null){const _=h.splice(d)[0],E=l.splice(_.index);E.unshift(E[0].otherSE),e.push(new wh(E.reverse()));continue}h.push({index:l.length,point:a.point});const v=a.getLeftmostComparator(o);u=f.sort(v)[0].otherSE;break}e.push(new wh(l))}return e}constructor(t){this.events=t;for(let e=0,r=t.length;e<r;e++)t[e].segment.ringOut=this;this.poly=null}getGeom(){let t=this.events[0].point;const e=[t];for(let l=1,c=this.events.length-1;l<c;l++){const h=this.events[l].point,f=this.events[l+1].point;$0(h,t,f)!==0&&(e.push(h),t=h)}if(e.length===1)return null;const r=e[0],i=e[1];$0(r,t,i)===0&&e.shift(),e.push(e[0]);const s=this.isExteriorRing()?1:-1,o=this.isExteriorRing()?0:e.length-1,a=this.isExteriorRing()?e.length:-1,u=[];for(let l=o;l!=a;l+=s)u.push([e[l].x,e[l].y]);return u}isExteriorRing(){if(this._isExteriorRing===void 0){const t=this.enclosingRing();this._isExteriorRing=t?!t.isExteriorRing():!0}return this._isExteriorRing}enclosingRing(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}_calcEnclosingRing(){let t=this.events[0];for(let i=1,s=this.events.length;i<s;i++){const o=this.events[i];Pn.compare(t,o)>0&&(t=o)}let e=t.segment.prevInResult(),r=e?e.prevInResult():null;for(;;){if(!e)return null;if(!r)return e.ringOut;if(r.ringOut!==e.ringOut)return r.ringOut.enclosingRing()!==e.ringOut?e.ringOut:e.ringOut.enclosingRing();e=r.prevInResult(),r=e?e.prevInResult():null}}}class rv{constructor(t){this.exteriorRing=t,t.poly=this,this.interiorRings=[]}addInterior(t){this.interiorRings.push(t),t.poly=this}getGeom(){const t=[this.exteriorRing.getGeom()];if(t[0]===null)return null;for(let e=0,r=this.interiorRings.length;e<r;e++){const i=this.interiorRings[e].getGeom();i!==null&&t.push(i)}return t}}class iI{constructor(t){this.rings=t,this.polys=this._composePolys(t)}getGeom(){const t=[];for(let e=0,r=this.polys.length;e<r;e++){const i=this.polys[e].getGeom();i!==null&&t.push(i)}return t}_composePolys(t){const e=[];for(let r=0,i=t.length;r<i;r++){const s=t[r];if(!s.poly)if(s.isExteriorRing())e.push(new rv(s));else{const o=s.enclosingRing();o.poly||e.push(new rv(o)),o.poly.addInterior(s)}}return e}}class sI{constructor(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Os.compare;this.queue=t,this.tree=new wf(e),this.segments=[]}process(t){const e=t.segment,r=[];if(t.consumedBy)return t.isLeft?this.queue.remove(t.otherSE):this.tree.remove(e),r;const i=t.isLeft?this.tree.add(e):this.tree.find(e);if(!i)throw new Error(`Unable to find segment #${e.id} [${e.leftSE.point.x}, ${e.leftSE.point.y}] -> [${e.rightSE.point.x}, ${e.rightSE.point.y}] in SweepLine tree.`);let s=i,o=i,a,u;for(;a===void 0;)s=this.tree.prev(s),s===null?a=null:s.key.consumedBy===void 0&&(a=s.key);for(;u===void 0;)o=this.tree.next(o),o===null?u=null:o.key.consumedBy===void 0&&(u=o.key);if(t.isLeft){let l=null;if(a){const h=a.getIntersection(e);if(h!==null&&(e.isAnEndpoint(h)||(l=h),!a.isAnEndpoint(h))){const f=this._splitSafely(a,h);for(let d=0,v=f.length;d<v;d++)r.push(f[d])}}let c=null;if(u){const h=u.getIntersection(e);if(h!==null&&(e.isAnEndpoint(h)||(c=h),!u.isAnEndpoint(h))){const f=this._splitSafely(u,h);for(let d=0,v=f.length;d<v;d++)r.push(f[d])}}if(l!==null||c!==null){let h=null;l===null?h=c:c===null?h=l:h=Pn.comparePoints(l,c)<=0?l:c,this.queue.remove(e.rightSE),r.push(e.rightSE);const f=e.split(h);for(let d=0,v=f.length;d<v;d++)r.push(f[d])}r.length>0?(this.tree.remove(e),r.push(t)):(this.segments.push(e),e.prev=a)}else{if(a&&u){const l=a.getIntersection(u);if(l!==null){if(!a.isAnEndpoint(l)){const c=this._splitSafely(a,l);for(let h=0,f=c.length;h<f;h++)r.push(c[h])}if(!u.isAnEndpoint(l)){const c=this._splitSafely(u,l);for(let h=0,f=c.length;h<f;h++)r.push(c[h])}}}this.tree.remove(e)}return r}_splitSafely(t,e){this.tree.remove(t);const r=t.rightSE;this.queue.remove(r);const i=t.split(e);return i.push(r),t.consumedBy===void 0&&this.tree.add(t),i}}const nv=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,oI=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6;class aI{run(t,e,r){ri.type=t,il.reset();const i=[new ev(e,!0)];for(let h=0,f=r.length;h<f;h++)i.push(new ev(r[h],!1));if(ri.numMultiPolys=i.length,ri.type==="difference"){const h=i[0];let f=1;for(;f<i.length;)If(i[f].bbox,h.bbox)!==null?f++:i.splice(f,1)}if(ri.type==="intersection")for(let h=0,f=i.length;h<f;h++){const d=i[h];for(let v=h+1,_=i.length;v<_;v++)if(If(d.bbox,i[v].bbox)===null)return[]}const s=new wf(Pn.compare);for(let h=0,f=i.length;h<f;h++){const d=i[h].getSweepEvents();for(let v=0,_=d.length;v<_;v++)if(s.insert(d[v]),s.size>nv)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).")}const o=new sI(s);let a=s.size,u=s.pop();for(;u;){const h=u.key;if(s.size===a){const d=h.segment;throw new Error(`Unable to pop() ${h.isLeft?"left":"right"} SweepEvent [${h.point.x}, ${h.point.y}] from segment #${d.id} [${d.leftSE.point.x}, ${d.leftSE.point.y}] -> [${d.rightSE.point.x}, ${d.rightSE.point.y}] from queue.`)}if(s.size>nv)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");if(o.segments.length>oI)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");const f=o.process(h);for(let d=0,v=f.length;d<v;d++){const _=f[d];_.consumedBy===void 0&&s.insert(_)}a=s.size,u=s.pop()}il.reset();const l=wh.factory(o.segments);return new iI(l).getGeom()}}const ri=new aI;var Mf={union:function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return ri.run("union",n,e)},intersection:function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return ri.run("intersection",n,e)},xor:function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return ri.run("xor",n,e)},difference:function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];return ri.run("difference",n,e)}};function uI(n,t){var e=mr(n),r=mr(t),i=n.properties||{},s=Mf.difference(e.coordinates,r.coordinates);return s.length===0?null:s.length===1?ie(s[0],i):nf(s,i)}"fill"in Array.prototype||Object.defineProperty(Array.prototype,"fill",{configurable:!0,value:function(t){if(this===void 0||this===null)throw new TypeError(this+" is not an object");var e=Object(this),r=Math.max(Math.min(e.length,9007199254740991),0)||0,i=1 in arguments&&parseInt(Number(arguments[1]),10)||0;i=i<0?Math.max(r+i,0):Math.min(i,r);var s=2 in arguments&&arguments[2]!==void 0?parseInt(Number(arguments[2]),10)||0:r;for(s=s<0?Math.max(r+arguments[2],0):Math.min(s,r);i<s;)e[i]=t,++i;return e},writable:!0}),Number.isFinite=Number.isFinite||function(n){return typeof n=="number"&&isFinite(n)},Number.isInteger=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n},Number.parseFloat=Number.parseFloat||parseFloat,Number.isNaN=Number.isNaN||function(n){return n!==n},Math.trunc=Math.trunc||function(n){return n<0?Math.ceil(n):Math.floor(n)};var po=function(){};po.prototype.interfaces_=function(){return[]},po.prototype.getClass=function(){return po},po.prototype.equalsWithTolerance=function(t,e,r){return Math.abs(t-e)<=r};var ae=function(n){function t(e){n.call(this,e),this.name="IllegalArgumentException",this.message=e,this.stack=new n().stack}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(Error),yt=function(){},iv={MAX_VALUE:{configurable:!0}};yt.isNaN=function(t){return Number.isNaN(t)},yt.doubleToLongBits=function(t){return t},yt.longBitsToDouble=function(t){return t},yt.isInfinite=function(t){return!Number.isFinite(t)},iv.MAX_VALUE.get=function(){return Number.MAX_VALUE},Object.defineProperties(yt,iv);var Yr=function(){},Eh=function(){},ya=function(){};function Jr(){}var D=function n(){if(this.x=null,this.y=null,this.z=null,arguments.length===0)this.x=0,this.y=0,this.z=n.NULL_ORDINATE;else if(arguments.length===1){var t=arguments[0];this.x=t.x,this.y=t.y,this.z=t.z}else arguments.length===2?(this.x=arguments[0],this.y=arguments[1],this.z=n.NULL_ORDINATE):arguments.length===3&&(this.x=arguments[0],this.y=arguments[1],this.z=arguments[2])},vo={DimensionalComparator:{configurable:!0},serialVersionUID:{configurable:!0},NULL_ORDINATE:{configurable:!0},X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0}};D.prototype.setOrdinate=function(t,e){switch(t){case D.X:this.x=e;break;case D.Y:this.y=e;break;case D.Z:this.z=e;break;default:throw new ae("Invalid ordinate index: "+t)}},D.prototype.equals2D=function(){if(arguments.length===1){var t=arguments[0];return!(this.x!==t.x||this.y!==t.y)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return!(!po.equalsWithTolerance(this.x,e.x,r)||!po.equalsWithTolerance(this.y,e.y,r))}},D.prototype.getOrdinate=function(t){switch(t){case D.X:return this.x;case D.Y:return this.y;case D.Z:return this.z}throw new ae("Invalid ordinate index: "+t)},D.prototype.equals3D=function(t){return this.x===t.x&&this.y===t.y&&(this.z===t.z||yt.isNaN(this.z))&&yt.isNaN(t.z)},D.prototype.equals=function(t){return t instanceof D?this.equals2D(t):!1},D.prototype.equalInZ=function(t,e){return po.equalsWithTolerance(this.z,t.z,e)},D.prototype.compareTo=function(t){var e=t;return this.x<e.x?-1:this.x>e.x?1:this.y<e.y?-1:this.y>e.y?1:0},D.prototype.clone=function(){},D.prototype.copy=function(){return new D(this)},D.prototype.toString=function(){return"("+this.x+", "+this.y+", "+this.z+")"},D.prototype.distance3D=function(t){var e=this.x-t.x,r=this.y-t.y,i=this.z-t.z;return Math.sqrt(e*e+r*r+i*i)},D.prototype.distance=function(t){var e=this.x-t.x,r=this.y-t.y;return Math.sqrt(e*e+r*r)},D.prototype.hashCode=function(){var t=17;return t=37*t+D.hashCode(this.x),t=37*t+D.hashCode(this.y),t},D.prototype.setCoordinate=function(t){this.x=t.x,this.y=t.y,this.z=t.z},D.prototype.interfaces_=function(){return[Yr,Eh,Jr]},D.prototype.getClass=function(){return D},D.hashCode=function(){if(arguments.length===1){var t=arguments[0],e=yt.doubleToLongBits(t);return Math.trunc((e^e)>>>32)}},vo.DimensionalComparator.get=function(){return rs},vo.serialVersionUID.get=function(){return 6683108902428367e3},vo.NULL_ORDINATE.get=function(){return yt.NaN},vo.X.get=function(){return 0},vo.Y.get=function(){return 1},vo.Z.get=function(){return 2},Object.defineProperties(D,vo);var rs=function(t){if(this._dimensionsToTest=2,arguments.length!==0){if(arguments.length===1){var e=arguments[0];if(e!==2&&e!==3)throw new ae("only 2 or 3 dimensions may be specified");this._dimensionsToTest=e}}};rs.prototype.compare=function(t,e){var r=t,i=e,s=rs.compare(r.x,i.x);if(s!==0)return s;var o=rs.compare(r.y,i.y);if(o!==0)return o;if(this._dimensionsToTest<=2)return 0;var a=rs.compare(r.z,i.z);return a},rs.prototype.interfaces_=function(){return[ya]},rs.prototype.getClass=function(){return rs},rs.compare=function(t,e){return t<e?-1:t>e?1:yt.isNaN(t)?yt.isNaN(e)?0:-1:yt.isNaN(e)?1:0};var _a=function(){};_a.prototype.create=function(){},_a.prototype.interfaces_=function(){return[]},_a.prototype.getClass=function(){return _a};var F=function(){},sl={INTERIOR:{configurable:!0},BOUNDARY:{configurable:!0},EXTERIOR:{configurable:!0},NONE:{configurable:!0}};F.prototype.interfaces_=function(){return[]},F.prototype.getClass=function(){return F},F.toLocationSymbol=function(t){switch(t){case F.EXTERIOR:return"e";case F.BOUNDARY:return"b";case F.INTERIOR:return"i";case F.NONE:return"-"}throw new ae("Unknown location value: "+t)},sl.INTERIOR.get=function(){return 0},sl.BOUNDARY.get=function(){return 1},sl.EXTERIOR.get=function(){return 2},sl.NONE.get=function(){return-1},Object.defineProperties(F,sl);var pt=function(n,t){return n.interfaces_&&n.interfaces_().indexOf(t)>-1},Lr=function(){},sv={LOG_10:{configurable:!0}};Lr.prototype.interfaces_=function(){return[]},Lr.prototype.getClass=function(){return Lr},Lr.log10=function(t){var e=Math.log(t);return yt.isInfinite(e)||yt.isNaN(e)?e:e/Lr.LOG_10},Lr.min=function(t,e,r,i){var s=t;return e<s&&(s=e),r<s&&(s=r),i<s&&(s=i),s},Lr.clamp=function(){if(typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1],r=arguments[2];return t<e?e:t>r?r:t}else if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var i=arguments[0],s=arguments[1],o=arguments[2];return i<s?s:i>o?o:i}},Lr.wrap=function(t,e){return t<0?e- -t%e:t%e},Lr.max=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],r=arguments[2],i=t;return e>i&&(i=e),r>i&&(i=r),i}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3],l=s;return o>l&&(l=o),a>l&&(l=a),u>l&&(l=u),l}},Lr.average=function(t,e){return(t+e)/2},sv.LOG_10.get=function(){return Math.log(10)},Object.defineProperties(Lr,sv);var In=function(t){this.str=t};In.prototype.append=function(t){this.str+=t},In.prototype.setCharAt=function(t,e){this.str=this.str.substr(0,t)+e+this.str.substr(t+1)},In.prototype.toString=function(t){return this.str};var Mn=function(t){this.value=t};Mn.prototype.intValue=function(){return this.value},Mn.prototype.compareTo=function(t){return this.value<t?-1:this.value>t?1:0},Mn.isNaN=function(t){return Number.isNaN(t)};var ol=function(){};ol.isWhitespace=function(t){return t<=32&&t>=0||t===127},ol.toUpperCase=function(t){return t.toUpperCase()};var z=function n(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this.init(t)}else if(arguments[0]instanceof n){var e=arguments[0];this.init(e)}else if(typeof arguments[0]=="string"){var r=arguments[0];n.call(this,n.parse(r))}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];this.init(i,s)}},an={PI:{configurable:!0},TWO_PI:{configurable:!0},PI_2:{configurable:!0},E:{configurable:!0},NaN:{configurable:!0},EPS:{configurable:!0},SPLIT:{configurable:!0},MAX_PRINT_DIGITS:{configurable:!0},TEN:{configurable:!0},ONE:{configurable:!0},SCI_NOT_EXPONENT_CHAR:{configurable:!0},SCI_NOT_ZERO:{configurable:!0}};z.prototype.le=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<=t._lo},z.prototype.extractSignificantDigits=function(t,e){var r=this.abs(),i=z.magnitude(r._hi),s=z.TEN.pow(i);r=r.divide(s),r.gt(z.TEN)?(r=r.divide(z.TEN),i+=1):r.lt(z.ONE)&&(r=r.multiply(z.TEN),i-=1);for(var o=i+1,a=new In,u=z.MAX_PRINT_DIGITS-1,l=0;l<=u;l++){t&&l===o&&a.append(".");var c=Math.trunc(r._hi);if(c<0)break;var h=!1,f=0;c>9?(h=!0,f="9"):f="0"+c,a.append(f),r=r.subtract(z.valueOf(c)).multiply(z.TEN),h&&r.selfAdd(z.TEN);var d=!0,v=z.magnitude(r._hi);if(v<0&&Math.abs(v)>=u-l&&(d=!1),!d)break}return e[0]=i,a.toString()},z.prototype.sqr=function(){return this.multiply(this)},z.prototype.doubleValue=function(){return this._hi+this._lo},z.prototype.subtract=function(){if(arguments[0]instanceof z){var t=arguments[0];return this.add(t.negate())}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.add(-e)}},z.prototype.equals=function(){if(arguments.length===1){var t=arguments[0];return this._hi===t._hi&&this._lo===t._lo}},z.prototype.isZero=function(){return this._hi===0&&this._lo===0},z.prototype.selfSubtract=function(){if(arguments[0]instanceof z){var t=arguments[0];return this.isNaN()?this:this.selfAdd(-t._hi,-t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.isNaN()?this:this.selfAdd(-e,0)}},z.prototype.getSpecialNumberString=function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null},z.prototype.min=function(t){return this.le(t)?this:t},z.prototype.selfDivide=function(){if(arguments.length===1){if(arguments[0]instanceof z){var t=arguments[0];return this.selfDivide(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfDivide(e,0)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=null,o=null,a=null,u=null,l=null,c=null,h=null,f=null;return l=this._hi/r,c=z.SPLIT*l,s=c-l,f=z.SPLIT*r,s=c-s,o=l-s,a=f-r,h=l*r,a=f-a,u=r-a,f=s*a-h+s*u+o*a+o*u,c=(this._hi-h-f+this._lo-l*i)/r,f=l+c,this._hi=f,this._lo=l-f+c,this}},z.prototype.dump=function(){return"DD<"+this._hi+", "+this._lo+">"},z.prototype.divide=function(){if(arguments[0]instanceof z){var t=arguments[0],e=null,r=null,i=null,s=null,o=null,a=null,u=null,l=null;o=this._hi/t._hi,a=z.SPLIT*o,e=a-o,l=z.SPLIT*t._hi,e=a-e,r=o-e,i=l-t._hi,u=o*t._hi,i=l-i,s=t._hi-i,l=e*i-u+e*s+r*i+r*s,a=(this._hi-u-l+this._lo-o*t._lo)/t._hi,l=o+a;var c=l,h=o-l+a;return new z(c,h)}else if(typeof arguments[0]=="number"){var f=arguments[0];return yt.isNaN(f)?z.createNaN():z.copy(this).selfDivide(f,0)}},z.prototype.ge=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>=t._lo},z.prototype.pow=function(t){if(t===0)return z.valueOf(1);var e=new z(this),r=z.valueOf(1),i=Math.abs(t);if(i>1)for(;i>0;)i%2===1&&r.selfMultiply(e),i/=2,i>0&&(e=e.sqr());else r=e;return t<0?r.reciprocal():r},z.prototype.ceil=function(){if(this.isNaN())return z.NaN;var t=Math.ceil(this._hi),e=0;return t===this._hi&&(e=Math.ceil(this._lo)),new z(t,e)},z.prototype.compareTo=function(t){var e=t;return this._hi<e._hi?-1:this._hi>e._hi?1:this._lo<e._lo?-1:this._lo>e._lo?1:0},z.prototype.rint=function(){if(this.isNaN())return this;var t=this.add(.5);return t.floor()},z.prototype.setValue=function(){if(arguments[0]instanceof z){var t=arguments[0];return this.init(t),this}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.init(e),this}},z.prototype.max=function(t){return this.ge(t)?this:t},z.prototype.sqrt=function(){if(this.isZero())return z.valueOf(0);if(this.isNegative())return z.NaN;var t=1/Math.sqrt(this._hi),e=this._hi*t,r=z.valueOf(e),i=this.subtract(r.sqr()),s=i._hi*(t*.5);return r.add(s)},z.prototype.selfAdd=function(){if(arguments.length===1){if(arguments[0]instanceof z){var t=arguments[0];return this.selfAdd(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0],r=null,i=null,s=null,o=null,a=null,u=null;return s=this._hi+e,a=s-this._hi,o=s-a,o=e-a+(this._hi-o),u=o+this._lo,r=s+u,i=u+(s-r),this._hi=r+i,this._lo=i+(r-this._hi),this}}else if(arguments.length===2){var l=arguments[0],c=arguments[1],h=null,f=null,d=null,v=null,_=null,E=null,P=null,y=null;_=this._hi+l,d=this._lo+c,P=_-this._hi,y=d-this._lo,E=_-P,v=d-y,E=l-P+(this._hi-E),v=c-y+(this._lo-v),P=E+d,h=_+P,f=P+(_-h),P=v+f;var w=h+P,m=P+(h-w);return this._hi=w,this._lo=m,this}},z.prototype.selfMultiply=function(){if(arguments.length===1){if(arguments[0]instanceof z){var t=arguments[0];return this.selfMultiply(t._hi,t._lo)}else if(typeof arguments[0]=="number"){var e=arguments[0];return this.selfMultiply(e,0)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=null,o=null,a=null,u=null,l=null,c=null;l=z.SPLIT*this._hi,s=l-this._hi,c=z.SPLIT*r,s=l-s,o=this._hi-s,a=c-r,l=this._hi*r,a=c-a,u=r-a,c=s*a-l+s*u+o*a+o*u+(this._hi*i+this._lo*r);var h=l+c;s=l-h;var f=c+s;return this._hi=h,this._lo=f,this}},z.prototype.selfSqr=function(){return this.selfMultiply(this)},z.prototype.floor=function(){if(this.isNaN())return z.NaN;var t=Math.floor(this._hi),e=0;return t===this._hi&&(e=Math.floor(this._lo)),new z(t,e)},z.prototype.negate=function(){return this.isNaN()?this:new z(-this._hi,-this._lo)},z.prototype.clone=function(){},z.prototype.multiply=function(){if(arguments[0]instanceof z){var t=arguments[0];return t.isNaN()?z.createNaN():z.copy(this).selfMultiply(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return yt.isNaN(e)?z.createNaN():z.copy(this).selfMultiply(e,0)}},z.prototype.isNaN=function(){return yt.isNaN(this._hi)},z.prototype.intValue=function(){return Math.trunc(this._hi)},z.prototype.toString=function(){var t=z.magnitude(this._hi);return t>=-3&&t<=20?this.toStandardNotation():this.toSciNotation()},z.prototype.toStandardNotation=function(){var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),r=this.extractSignificantDigits(!0,e),i=e[0]+1,s=r;if(r.charAt(0)===".")s="0"+r;else if(i<0)s="0."+z.stringOfChar("0",-i)+r;else if(r.indexOf(".")===-1){var o=i-r.length,a=z.stringOfChar("0",o);s=r+a+".0"}return this.isNegative()?"-"+s:s},z.prototype.reciprocal=function(){var t=null,e=null,r=null,i=null,s=null,o=null,a=null,u=null;s=1/this._hi,o=z.SPLIT*s,t=o-s,u=z.SPLIT*this._hi,t=o-t,e=s-t,r=u-this._hi,a=s*this._hi,r=u-r,i=this._hi-r,u=t*r-a+t*i+e*r+e*i,o=(1-a-u-s*this._lo)/this._hi;var l=s+o,c=s-l+o;return new z(l,c)},z.prototype.toSciNotation=function(){if(this.isZero())return z.SCI_NOT_ZERO;var t=this.getSpecialNumberString();if(t!==null)return t;var e=new Array(1).fill(null),r=this.extractSignificantDigits(!1,e),i=z.SCI_NOT_EXPONENT_CHAR+e[0];if(r.charAt(0)==="0")throw new Error("Found leading zero: "+r);var s="";r.length>1&&(s=r.substring(1));var o=r.charAt(0)+"."+s;return this.isNegative()?"-"+o+i:o+i},z.prototype.abs=function(){return this.isNaN()?z.NaN:this.isNegative()?this.negate():new z(this)},z.prototype.isPositive=function(){return(this._hi>0||this._hi===0)&&this._lo>0},z.prototype.lt=function(t){return(this._hi<t._hi||this._hi===t._hi)&&this._lo<t._lo},z.prototype.add=function(){if(arguments[0]instanceof z){var t=arguments[0];return z.copy(this).selfAdd(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return z.copy(this).selfAdd(e)}},z.prototype.init=function(){if(arguments.length===1){if(typeof arguments[0]=="number"){var t=arguments[0];this._hi=t,this._lo=0}else if(arguments[0]instanceof z){var e=arguments[0];this._hi=e._hi,this._lo=e._lo}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this._hi=r,this._lo=i}},z.prototype.gt=function(t){return(this._hi>t._hi||this._hi===t._hi)&&this._lo>t._lo},z.prototype.isNegative=function(){return(this._hi<0||this._hi===0)&&this._lo<0},z.prototype.trunc=function(){return this.isNaN()?z.NaN:this.isPositive()?this.floor():this.ceil()},z.prototype.signum=function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0},z.prototype.interfaces_=function(){return[Jr,Yr,Eh]},z.prototype.getClass=function(){return z},z.sqr=function(t){return z.valueOf(t).selfMultiply(t)},z.valueOf=function(){if(typeof arguments[0]=="string"){var t=arguments[0];return z.parse(t)}else if(typeof arguments[0]=="number"){var e=arguments[0];return new z(e)}},z.sqrt=function(t){return z.valueOf(t).sqrt()},z.parse=function(t){for(var e=0,r=t.length;ol.isWhitespace(t.charAt(e));)e++;var i=!1;if(e<r){var s=t.charAt(e);(s==="-"||s==="+")&&(e++,s==="-"&&(i=!0))}for(var o=new z,a=0,u=0,l=0;!(e>=r);){var c=t.charAt(e);if(e++,ol.isDigit(c)){var h=c-"0";o.selfMultiply(z.TEN),o.selfAdd(h),a++;continue}if(c==="."){u=a;continue}if(c==="e"||c==="E"){var f=t.substring(e);try{l=Mn.parseInt(f)}catch(P){throw P instanceof Error?new Error("Invalid exponent "+f+" in string "+t):P}finally{}break}throw new Error("Unexpected character '"+c+"' at position "+e+" in string "+t)}var d=o,v=a-u-l;if(v===0)d=o;else if(v>0){var _=z.TEN.pow(v);d=o.divide(_)}else if(v<0){var E=z.TEN.pow(-v);d=o.multiply(E)}return i?d.negate():d},z.createNaN=function(){return new z(yt.NaN,yt.NaN)},z.copy=function(t){return new z(t)},z.magnitude=function(t){var e=Math.abs(t),r=Math.log(e)/Math.log(10),i=Math.trunc(Math.floor(r)),s=Math.pow(10,i);return s*10<=e&&(i+=1),i},z.stringOfChar=function(t,e){for(var r=new In,i=0;i<e;i++)r.append(t);return r.toString()},an.PI.get=function(){return new z(3.141592653589793,12246467991473532e-32)},an.TWO_PI.get=function(){return new z(6.283185307179586,24492935982947064e-32)},an.PI_2.get=function(){return new z(1.5707963267948966,6123233995736766e-32)},an.E.get=function(){return new z(2.718281828459045,14456468917292502e-32)},an.NaN.get=function(){return new z(yt.NaN,yt.NaN)},an.EPS.get=function(){return 123259516440783e-46},an.SPLIT.get=function(){return 134217729},an.MAX_PRINT_DIGITS.get=function(){return 32},an.TEN.get=function(){return z.valueOf(10)},an.ONE.get=function(){return z.valueOf(1)},an.SCI_NOT_EXPONENT_CHAR.get=function(){return"E"},an.SCI_NOT_ZERO.get=function(){return"0.0E0"},Object.defineProperties(z,an);var ar=function(){},ov={DP_SAFE_EPSILON:{configurable:!0}};ar.prototype.interfaces_=function(){return[]},ar.prototype.getClass=function(){return ar},ar.orientationIndex=function(t,e,r){var i=ar.orientationIndexFilter(t,e,r);if(i<=1)return i;var s=z.valueOf(e.x).selfAdd(-t.x),o=z.valueOf(e.y).selfAdd(-t.y),a=z.valueOf(r.x).selfAdd(-e.x),u=z.valueOf(r.y).selfAdd(-e.y);return s.selfMultiply(u).selfSubtract(o.selfMultiply(a)).signum()},ar.signOfDet2x2=function(t,e,r,i){var s=t.multiply(i).selfSubtract(e.multiply(r));return s.signum()},ar.intersection=function(t,e,r,i){var s=z.valueOf(i.y).selfSubtract(r.y).selfMultiply(z.valueOf(e.x).selfSubtract(t.x)),o=z.valueOf(i.x).selfSubtract(r.x).selfMultiply(z.valueOf(e.y).selfSubtract(t.y)),a=s.subtract(o),u=z.valueOf(i.x).selfSubtract(r.x).selfMultiply(z.valueOf(t.y).selfSubtract(r.y)),l=z.valueOf(i.y).selfSubtract(r.y).selfMultiply(z.valueOf(t.x).selfSubtract(r.x)),c=u.subtract(l),h=c.selfDivide(a).doubleValue(),f=z.valueOf(t.x).selfAdd(z.valueOf(e.x).selfSubtract(t.x).selfMultiply(h)).doubleValue(),d=z.valueOf(e.x).selfSubtract(t.x).selfMultiply(z.valueOf(t.y).selfSubtract(r.y)),v=z.valueOf(e.y).selfSubtract(t.y).selfMultiply(z.valueOf(t.x).selfSubtract(r.x)),_=d.subtract(v),E=_.selfDivide(a).doubleValue(),P=z.valueOf(r.y).selfAdd(z.valueOf(i.y).selfSubtract(r.y).selfMultiply(E)).doubleValue();return new D(f,P)},ar.orientationIndexFilter=function(t,e,r){var i=null,s=(t.x-r.x)*(e.y-r.y),o=(t.y-r.y)*(e.x-r.x),a=s-o;if(s>0){if(o<=0)return ar.signum(a);i=s+o}else if(s<0){if(o>=0)return ar.signum(a);i=-s-o}else return ar.signum(a);var u=ar.DP_SAFE_EPSILON*i;return a>=u||-a>=u?ar.signum(a):2},ar.signum=function(t){return t>0?1:t<0?-1:0},ov.DP_SAFE_EPSILON.get=function(){return 1e-15},Object.defineProperties(ar,ov);var Dt=function(){},al={X:{configurable:!0},Y:{configurable:!0},Z:{configurable:!0},M:{configurable:!0}};al.X.get=function(){return 0},al.Y.get=function(){return 1},al.Z.get=function(){return 2},al.M.get=function(){return 3},Dt.prototype.setOrdinate=function(t,e,r){},Dt.prototype.size=function(){},Dt.prototype.getOrdinate=function(t,e){},Dt.prototype.getCoordinate=function(){},Dt.prototype.getCoordinateCopy=function(t){},Dt.prototype.getDimension=function(){},Dt.prototype.getX=function(t){},Dt.prototype.clone=function(){},Dt.prototype.expandEnvelope=function(t){},Dt.prototype.copy=function(){},Dt.prototype.getY=function(t){},Dt.prototype.toCoordinateArray=function(){},Dt.prototype.interfaces_=function(){return[Eh]},Dt.prototype.getClass=function(){return Dt},Object.defineProperties(Dt,al);var av=function(){},wa=function(n){function t(){n.call(this,"Projective point not representable on the Cartesian plane.")}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(av),Le=function(){};Le.arraycopy=function(t,e,r,i,s){for(var o=0,a=e;a<e+s;a++)r[i+o]=t[a],o++},Le.getProperty=function(t){return{"line.separator":`
66
66
  `}[t]};var un=function n(){if(this.x=null,this.y=null,this.w=null,arguments.length===0)this.x=0,this.y=0,this.w=1;else if(arguments.length===1){var t=arguments[0];this.x=t.x,this.y=t.y,this.w=1}else if(arguments.length===2){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var e=arguments[0],r=arguments[1];this.x=e,this.y=r,this.w=1}else if(arguments[0]instanceof n&&arguments[1]instanceof n){var i=arguments[0],s=arguments[1];this.x=i.y*s.w-s.y*i.w,this.y=s.x*i.w-i.x*s.w,this.w=i.x*s.y-s.x*i.y}else if(arguments[0]instanceof D&&arguments[1]instanceof D){var o=arguments[0],a=arguments[1];this.x=o.y-a.y,this.y=a.x-o.x,this.w=o.x*a.y-a.x*o.y}}else if(arguments.length===3){var u=arguments[0],l=arguments[1],c=arguments[2];this.x=u,this.y=l,this.w=c}else if(arguments.length===4){var h=arguments[0],f=arguments[1],d=arguments[2],v=arguments[3],_=h.y-f.y,E=f.x-h.x,P=h.x*f.y-f.x*h.y,y=d.y-v.y,w=v.x-d.x,m=d.x*v.y-v.x*d.y;this.x=E*m-w*P,this.y=y*P-_*m,this.w=_*w-y*E}};un.prototype.getY=function(){var t=this.y/this.w;if(yt.isNaN(t)||yt.isInfinite(t))throw new wa;return t},un.prototype.getX=function(){var t=this.x/this.w;if(yt.isNaN(t)||yt.isInfinite(t))throw new wa;return t},un.prototype.getCoordinate=function(){var t=new D;return t.x=this.getX(),t.y=this.getY(),t},un.prototype.interfaces_=function(){return[]},un.prototype.getClass=function(){return un},un.intersection=function(t,e,r,i){var s=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,u=r.y-i.y,l=i.x-r.x,c=r.x*i.y-i.x*r.y,h=o*c-l*a,f=u*a-s*c,d=s*l-u*o,v=h/d,_=f/d;if(yt.isNaN(v)||yt.isInfinite(v)||yt.isNaN(_)||yt.isInfinite(_))throw new wa;return new D(v,_)};var at=function n(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,arguments.length===0)this.init();else if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof n){var e=arguments[0];this.init(e)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.init(r.x,i.x,r.y,i.y)}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3];this.init(s,o,a,u)}},uv={serialVersionUID:{configurable:!0}};at.prototype.getArea=function(){return this.getWidth()*this.getHeight()},at.prototype.equals=function(t){if(!(t instanceof at))return!1;var e=t;return this.isNull()?e.isNull():this._maxx===e.getMaxX()&&this._maxy===e.getMaxY()&&this._minx===e.getMinX()&&this._miny===e.getMinY()},at.prototype.intersection=function(t){if(this.isNull()||t.isNull()||!this.intersects(t))return new at;var e=this._minx>t._minx?this._minx:t._minx,r=this._miny>t._miny?this._miny:t._miny,i=this._maxx<t._maxx?this._maxx:t._maxx,s=this._maxy<t._maxy?this._maxy:t._maxy;return new at(e,i,r,s)},at.prototype.isNull=function(){return this._maxx<this._minx},at.prototype.getMaxX=function(){return this._maxx},at.prototype.covers=function(){if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];return this.covers(t.x,t.y)}else if(arguments[0]instanceof at){var e=arguments[0];return this.isNull()||e.isNull()?!1:e.getMinX()>=this._minx&&e.getMaxX()<=this._maxx&&e.getMinY()>=this._miny&&e.getMaxY()<=this._maxy}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.isNull()?!1:r>=this._minx&&r<=this._maxx&&i>=this._miny&&i<=this._maxy}},at.prototype.intersects=function(){if(arguments.length===1){if(arguments[0]instanceof at){var t=arguments[0];return this.isNull()||t.isNull()?!1:!(t._minx>this._maxx||t._maxx<this._minx||t._miny>this._maxy||t._maxy<this._miny)}else if(arguments[0]instanceof D){var e=arguments[0];return this.intersects(e.x,e.y)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.isNull()?!1:!(r>this._maxx||r<this._minx||i>this._maxy||i<this._miny)}},at.prototype.getMinY=function(){return this._miny},at.prototype.getMinX=function(){return this._minx},at.prototype.expandToInclude=function(){if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];this.expandToInclude(t.x,t.y)}else if(arguments[0]instanceof at){var e=arguments[0];if(e.isNull())return null;this.isNull()?(this._minx=e.getMinX(),this._maxx=e.getMaxX(),this._miny=e.getMinY(),this._maxy=e.getMaxY()):(e._minx<this._minx&&(this._minx=e._minx),e._maxx>this._maxx&&(this._maxx=e._maxx),e._miny<this._miny&&(this._miny=e._miny),e._maxy>this._maxy&&(this._maxy=e._maxy))}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.isNull()?(this._minx=r,this._maxx=r,this._miny=i,this._maxy=i):(r<this._minx&&(this._minx=r),r>this._maxx&&(this._maxx=r),i<this._miny&&(this._miny=i),i>this._maxy&&(this._maxy=i))}},at.prototype.minExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t<e?t:e},at.prototype.getWidth=function(){return this.isNull()?0:this._maxx-this._minx},at.prototype.compareTo=function(t){var e=t;return this.isNull()?e.isNull()?0:-1:e.isNull()?1:this._minx<e._minx?-1:this._minx>e._minx?1:this._miny<e._miny?-1:this._miny>e._miny?1:this._maxx<e._maxx?-1:this._maxx>e._maxx?1:this._maxy<e._maxy?-1:this._maxy>e._maxy?1:0},at.prototype.translate=function(t,e){if(this.isNull())return null;this.init(this.getMinX()+t,this.getMaxX()+t,this.getMinY()+e,this.getMaxY()+e)},at.prototype.toString=function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"},at.prototype.setToNull=function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1},at.prototype.getHeight=function(){return this.isNull()?0:this._maxy-this._miny},at.prototype.maxExtent=function(){if(this.isNull())return 0;var t=this.getWidth(),e=this.getHeight();return t>e?t:e},at.prototype.expandBy=function(){if(arguments.length===1){var t=arguments[0];this.expandBy(t,t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this.isNull())return null;this._minx-=e,this._maxx+=e,this._miny-=r,this._maxy+=r,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}},at.prototype.contains=function(){if(arguments.length===1){if(arguments[0]instanceof at){var t=arguments[0];return this.covers(t)}else if(arguments[0]instanceof D){var e=arguments[0];return this.covers(e)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.covers(r,i)}},at.prototype.centre=function(){return this.isNull()?null:new D((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)},at.prototype.init=function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];this.init(t.x,t.x,t.y,t.y)}else if(arguments[0]instanceof at){var e=arguments[0];this._minx=e._minx,this._maxx=e._maxx,this._miny=e._miny,this._maxy=e._maxy}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.init(r.x,i.x,r.y,i.y)}else if(arguments.length===4){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3];s<o?(this._minx=s,this._maxx=o):(this._minx=o,this._maxx=s),a<u?(this._miny=a,this._maxy=u):(this._miny=u,this._maxy=a)}},at.prototype.getMaxY=function(){return this._maxy},at.prototype.distance=function(t){if(this.intersects(t))return 0;var e=0;this._maxx<t._minx?e=t._minx-this._maxx:this._minx>t._maxx&&(e=this._minx-t._maxx);var r=0;return this._maxy<t._miny?r=t._miny-this._maxy:this._miny>t._maxy&&(r=this._miny-t._maxy),e===0?r:r===0?e:Math.sqrt(e*e+r*r)},at.prototype.hashCode=function(){var t=17;return t=37*t+D.hashCode(this._minx),t=37*t+D.hashCode(this._maxx),t=37*t+D.hashCode(this._miny),t=37*t+D.hashCode(this._maxy),t},at.prototype.interfaces_=function(){return[Yr,Jr]},at.prototype.getClass=function(){return at},at.intersects=function(){if(arguments.length===3){var t=arguments[0],e=arguments[1],r=arguments[2];return r.x>=(t.x<e.x?t.x:e.x)&&r.x<=(t.x>e.x?t.x:e.x)&&r.y>=(t.y<e.y?t.y:e.y)&&r.y<=(t.y>e.y?t.y:e.y)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3],u=Math.min(o.x,a.x),l=Math.max(o.x,a.x),c=Math.min(i.x,s.x),h=Math.max(i.x,s.x);return!(c>l||h<u||(u=Math.min(o.y,a.y),l=Math.max(o.y,a.y),c=Math.min(i.y,s.y),h=Math.max(i.y,s.y),c>l)||h<u)}},uv.serialVersionUID.get=function(){return 5873921885273102e3},Object.defineProperties(at,uv);var bn={typeStr:/^\s*(\w+)\s*\(\s*(.*)\s*\)\s*$/,emptyTypeStr:/^\s*(\w+)\s*EMPTY\s*$/,spaces:/\s+/,parenComma:/\)\s*,\s*\(/,doubleParenComma:/\)\s*\)\s*,\s*\(\s*\(/,trimParens:/^\s*\(?(.*?)\)?\s*$/},Sh=function(t){this.geometryFactory=t||new xt};Sh.prototype.read=function(t){var e,r,i;t=t.replace(/[\n\r]/g," ");var s=bn.typeStr.exec(t);if(t.search("EMPTY")!==-1&&(s=bn.emptyTypeStr.exec(t),s[2]=void 0),s&&(r=s[1].toLowerCase(),i=s[2],Ea[r]&&(e=Ea[r].apply(this,[i]))),e===void 0)throw new Error("Could not parse WKT "+t);return e},Sh.prototype.write=function(t){return this.extractGeometry(t)},Sh.prototype.extractGeometry=function(t){var e=t.getGeometryType().toLowerCase();if(!Ni[e])return null;var r=e.toUpperCase(),i;return t.isEmpty()?i=r+" EMPTY":i=r+"("+Ni[e].apply(this,[t])+")",i};var Ni={coordinate:function(t){return t.x+" "+t.y},point:function(t){return Ni.coordinate.call(this,t._coordinates._coordinates[0])},multipoint:function(t){for(var e=this,r=[],i=0,s=t._geometries.length;i<s;++i)r.push("("+Ni.point.apply(e,[t._geometries[i]])+")");return r.join(",")},linestring:function(t){for(var e=this,r=[],i=0,s=t._points._coordinates.length;i<s;++i)r.push(Ni.coordinate.apply(e,[t._points._coordinates[i]]));return r.join(",")},linearring:function(t){for(var e=this,r=[],i=0,s=t._points._coordinates.length;i<s;++i)r.push(Ni.coordinate.apply(e,[t._points._coordinates[i]]));return r.join(",")},multilinestring:function(t){for(var e=this,r=[],i=0,s=t._geometries.length;i<s;++i)r.push("("+Ni.linestring.apply(e,[t._geometries[i]])+")");return r.join(",")},polygon:function(t){var e=this,r=[];r.push("("+Ni.linestring.apply(this,[t._shell])+")");for(var i=0,s=t._holes.length;i<s;++i)r.push("("+Ni.linestring.apply(e,[t._holes[i]])+")");return r.join(",")},multipolygon:function(t){for(var e=this,r=[],i=0,s=t._geometries.length;i<s;++i)r.push("("+Ni.polygon.apply(e,[t._geometries[i]])+")");return r.join(",")},geometrycollection:function(t){for(var e=this,r=[],i=0,s=t._geometries.length;i<s;++i)r.push(e.extractGeometry(t._geometries[i]));return r.join(",")}},Ea={point:function(t){if(t===void 0)return this.geometryFactory.createPoint();var e=t.trim().split(bn.spaces);return this.geometryFactory.createPoint(new D(Number.parseFloat(e[0]),Number.parseFloat(e[1])))},multipoint:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiPoint();for(var r,i=t.trim().split(","),s=[],o=0,a=i.length;o<a;++o)r=i[o].replace(bn.trimParens,"$1"),s.push(Ea.point.apply(e,[r]));return this.geometryFactory.createMultiPoint(s)},linestring:function(t){if(t===void 0)return this.geometryFactory.createLineString();for(var e=t.trim().split(","),r=[],i,s=0,o=e.length;s<o;++s)i=e[s].trim().split(bn.spaces),r.push(new D(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLineString(r)},linearring:function(t){if(t===void 0)return this.geometryFactory.createLinearRing();for(var e=t.trim().split(","),r=[],i,s=0,o=e.length;s<o;++s)i=e[s].trim().split(bn.spaces),r.push(new D(Number.parseFloat(i[0]),Number.parseFloat(i[1])));return this.geometryFactory.createLinearRing(r)},multilinestring:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiLineString();for(var r,i=t.trim().split(bn.parenComma),s=[],o=0,a=i.length;o<a;++o)r=i[o].replace(bn.trimParens,"$1"),s.push(Ea.linestring.apply(e,[r]));return this.geometryFactory.createMultiLineString(s)},polygon:function(t){var e=this;if(t===void 0)return this.geometryFactory.createPolygon();for(var r,i,s,o=t.trim().split(bn.parenComma),a,u=[],l=0,c=o.length;l<c;++l)r=o[l].replace(bn.trimParens,"$1"),i=Ea.linestring.apply(e,[r]),s=e.geometryFactory.createLinearRing(i._points),l===0?a=s:u.push(s);return this.geometryFactory.createPolygon(a,u)},multipolygon:function(t){var e=this;if(t===void 0)return this.geometryFactory.createMultiPolygon();for(var r,i=t.trim().split(bn.doubleParenComma),s=[],o=0,a=i.length;o<a;++o)r=i[o].replace(bn.trimParens,"$1"),s.push(Ea.polygon.apply(e,[r]));return this.geometryFactory.createMultiPolygon(s)},geometrycollection:function(t){var e=this;if(t===void 0)return this.geometryFactory.createGeometryCollection();t=t.replace(/,\s*([A-Za-z])/g,"|$1");for(var r=t.trim().split("|"),i=[],s=0,o=r.length;s<o;++s)i.push(e.read(r[s]));return this.geometryFactory.createGeometryCollection(i)}},ln=function(t){this.parser=new Sh(t)};ln.prototype.write=function(t){return this.parser.write(t)},ln.toLineString=function(t,e){if(arguments.length!==2)throw new Error("Not implemented");return"LINESTRING ( "+t.x+" "+t.y+", "+e.x+" "+e.y+" )"};var xi=function(n){function t(e){n.call(this,e),this.name="RuntimeException",this.message=e,this.stack=new n().stack}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(Error),Ch=function(n){function t(){if(n.call(this),arguments.length===0)n.call(this);else if(arguments.length===1){var e=arguments[0];n.call(this,e)}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(xi),Pt=function(){};Pt.prototype.interfaces_=function(){return[]},Pt.prototype.getClass=function(){return Pt},Pt.shouldNeverReachHere=function(){if(arguments.length===0)Pt.shouldNeverReachHere(null);else if(arguments.length===1){var t=arguments[0];throw new Ch("Should never reach here"+(t!==null?": "+t:""))}},Pt.isTrue=function(){var t,e;if(arguments.length===1)t=arguments[0],Pt.isTrue(t,null);else if(arguments.length===2&&(t=arguments[0],e=arguments[1],!t))throw e===null?new Ch:new Ch(e)},Pt.equals=function(){var t,e,r;if(arguments.length===2)t=arguments[0],e=arguments[1],Pt.equals(t,e,null);else if(arguments.length===3&&(t=arguments[0],e=arguments[1],r=arguments[2],!e.equals(t)))throw new Ch("Expected "+t+" but encountered "+e+(r!==null?": "+r:""))};var le=function(){this._result=null,this._inputLines=Array(2).fill().map(function(){return Array(2)}),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new D,this._intPt[1]=new D,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0},mo={DONT_INTERSECT:{configurable:!0},DO_INTERSECT:{configurable:!0},COLLINEAR:{configurable:!0},NO_INTERSECTION:{configurable:!0},POINT_INTERSECTION:{configurable:!0},COLLINEAR_INTERSECTION:{configurable:!0}};le.prototype.getIndexAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intLineIndex[t][e]},le.prototype.getTopologySummary=function(){var t=new In;return this.isEndPoint()&&t.append(" endpoint"),this._isProper&&t.append(" proper"),this.isCollinear()&&t.append(" collinear"),t.toString()},le.prototype.computeIntersection=function(t,e,r,i){this._inputLines[0][0]=t,this._inputLines[0][1]=e,this._inputLines[1][0]=r,this._inputLines[1][1]=i,this._result=this.computeIntersect(t,e,r,i)},le.prototype.getIntersectionNum=function(){return this._result},le.prototype.computeIntLineIndex=function(){if(arguments.length===0)this._intLineIndex===null&&(this._intLineIndex=Array(2).fill().map(function(){return Array(2)}),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(arguments.length===1){var t=arguments[0],e=this.getEdgeDistance(t,0),r=this.getEdgeDistance(t,1);e>r?(this._intLineIndex[t][0]=0,this._intLineIndex[t][1]=1):(this._intLineIndex[t][0]=1,this._intLineIndex[t][1]=0)}},le.prototype.isProper=function(){return this.hasIntersection()&&this._isProper},le.prototype.setPrecisionModel=function(t){this._precisionModel=t},le.prototype.isInteriorIntersection=function(){var t=this;if(arguments.length===0)return!!(this.isInteriorIntersection(0)||this.isInteriorIntersection(1));if(arguments.length===1){for(var e=arguments[0],r=0;r<this._result;r++)if(!(t._intPt[r].equals2D(t._inputLines[e][0])||t._intPt[r].equals2D(t._inputLines[e][1])))return!0;return!1}},le.prototype.getIntersection=function(t){return this._intPt[t]},le.prototype.isEndPoint=function(){return this.hasIntersection()&&!this._isProper},le.prototype.hasIntersection=function(){return this._result!==le.NO_INTERSECTION},le.prototype.getEdgeDistance=function(t,e){var r=le.computeEdgeDistance(this._intPt[e],this._inputLines[t][0],this._inputLines[t][1]);return r},le.prototype.isCollinear=function(){return this._result===le.COLLINEAR_INTERSECTION},le.prototype.toString=function(){return ln.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+ln.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()},le.prototype.getEndpoint=function(t,e){return this._inputLines[t][e]},le.prototype.isIntersection=function(t){for(var e=this,r=0;r<this._result;r++)if(e._intPt[r].equals2D(t))return!0;return!1},le.prototype.getIntersectionAlongSegment=function(t,e){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[t][e]]},le.prototype.interfaces_=function(){return[]},le.prototype.getClass=function(){return le},le.computeEdgeDistance=function(t,e,r){var i=Math.abs(r.x-e.x),s=Math.abs(r.y-e.y),o=-1;if(t.equals(e))o=0;else if(t.equals(r))i>s?o=i:o=s;else{var a=Math.abs(t.x-e.x),u=Math.abs(t.y-e.y);i>s?o=a:o=u,o===0&&!t.equals(e)&&(o=Math.max(a,u))}return Pt.isTrue(!(o===0&&!t.equals(e)),"Bad distance calculation"),o},le.nonRobustComputeEdgeDistance=function(t,e,r){var i=t.x-e.x,s=t.y-e.y,o=Math.sqrt(i*i+s*s);return Pt.isTrue(!(o===0&&!t.equals(e)),"Invalid distance calculation"),o},mo.DONT_INTERSECT.get=function(){return 0},mo.DO_INTERSECT.get=function(){return 1},mo.COLLINEAR.get=function(){return 2},mo.NO_INTERSECTION.get=function(){return 0},mo.POINT_INTERSECTION.get=function(){return 1},mo.COLLINEAR_INTERSECTION.get=function(){return 2},Object.defineProperties(le,mo);var Ds=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.isInSegmentEnvelopes=function(r){var i=new at(this._inputLines[0][0],this._inputLines[0][1]),s=new at(this._inputLines[1][0],this._inputLines[1][1]);return i.contains(r)&&s.contains(r)},t.prototype.computeIntersection=function(){if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];if(this._isProper=!1,at.intersects(i,s,r)&&K.orientationIndex(i,s,r)===0&&K.orientationIndex(s,i,r)===0)return this._isProper=!0,(r.equals(i)||r.equals(s))&&(this._isProper=!1),this._result=n.POINT_INTERSECTION,null;this._result=n.NO_INTERSECTION}else return n.prototype.computeIntersection.apply(this,arguments)},t.prototype.normalizeToMinimum=function(r,i,s,o,a){a.x=this.smallestInAbsValue(r.x,i.x,s.x,o.x),a.y=this.smallestInAbsValue(r.y,i.y,s.y,o.y),r.x-=a.x,r.y-=a.y,i.x-=a.x,i.y-=a.y,s.x-=a.x,s.y-=a.y,o.x-=a.x,o.y-=a.y},t.prototype.safeHCoordinateIntersection=function(r,i,s,o){var a=null;try{a=un.intersection(r,i,s,o)}catch(u){if(u instanceof wa)a=t.nearestEndpoint(r,i,s,o);else throw u}finally{}return a},t.prototype.intersection=function(r,i,s,o){var a=this.intersectionWithNormalization(r,i,s,o);return this.isInSegmentEnvelopes(a)||(a=new D(t.nearestEndpoint(r,i,s,o))),this._precisionModel!==null&&this._precisionModel.makePrecise(a),a},t.prototype.smallestInAbsValue=function(r,i,s,o){var a=r,u=Math.abs(a);return Math.abs(i)<u&&(a=i,u=Math.abs(i)),Math.abs(s)<u&&(a=s,u=Math.abs(s)),Math.abs(o)<u&&(a=o),a},t.prototype.checkDD=function(r,i,s,o,a){var u=ar.intersection(r,i,s,o),l=this.isInSegmentEnvelopes(u);Le.out.println("DD in env = "+l+" --------------------- "+u),a.distance(u)>1e-4&&Le.out.println("Distance = "+a.distance(u))},t.prototype.intersectionWithNormalization=function(r,i,s,o){var a=new D(r),u=new D(i),l=new D(s),c=new D(o),h=new D;this.normalizeToEnvCentre(a,u,l,c,h);var f=this.safeHCoordinateIntersection(a,u,l,c);return f.x+=h.x,f.y+=h.y,f},t.prototype.computeCollinearIntersection=function(r,i,s,o){var a=at.intersects(r,i,s),u=at.intersects(r,i,o),l=at.intersects(s,o,r),c=at.intersects(s,o,i);return a&&u?(this._intPt[0]=s,this._intPt[1]=o,n.COLLINEAR_INTERSECTION):l&&c?(this._intPt[0]=r,this._intPt[1]=i,n.COLLINEAR_INTERSECTION):a&&l?(this._intPt[0]=s,this._intPt[1]=r,s.equals(r)&&!u&&!c?n.POINT_INTERSECTION:n.COLLINEAR_INTERSECTION):a&&c?(this._intPt[0]=s,this._intPt[1]=i,s.equals(i)&&!u&&!l?n.POINT_INTERSECTION:n.COLLINEAR_INTERSECTION):u&&l?(this._intPt[0]=o,this._intPt[1]=r,o.equals(r)&&!a&&!c?n.POINT_INTERSECTION:n.COLLINEAR_INTERSECTION):u&&c?(this._intPt[0]=o,this._intPt[1]=i,o.equals(i)&&!a&&!l?n.POINT_INTERSECTION:n.COLLINEAR_INTERSECTION):n.NO_INTERSECTION},t.prototype.normalizeToEnvCentre=function(r,i,s,o,a){var u=r.x<i.x?r.x:i.x,l=r.y<i.y?r.y:i.y,c=r.x>i.x?r.x:i.x,h=r.y>i.y?r.y:i.y,f=s.x<o.x?s.x:o.x,d=s.y<o.y?s.y:o.y,v=s.x>o.x?s.x:o.x,_=s.y>o.y?s.y:o.y,E=u>f?u:f,P=c<v?c:v,y=l>d?l:d,w=h<_?h:_,m=(E+P)/2,S=(y+w)/2;a.x=m,a.y=S,r.x-=a.x,r.y-=a.y,i.x-=a.x,i.y-=a.y,s.x-=a.x,s.y-=a.y,o.x-=a.x,o.y-=a.y},t.prototype.computeIntersect=function(r,i,s,o){if(this._isProper=!1,!at.intersects(r,i,s,o))return n.NO_INTERSECTION;var a=K.orientationIndex(r,i,s),u=K.orientationIndex(r,i,o);if(a>0&&u>0||a<0&&u<0)return n.NO_INTERSECTION;var l=K.orientationIndex(s,o,r),c=K.orientationIndex(s,o,i);if(l>0&&c>0||l<0&&c<0)return n.NO_INTERSECTION;var h=a===0&&u===0&&l===0&&c===0;return h?this.computeCollinearIntersection(r,i,s,o):(a===0||u===0||l===0||c===0?(this._isProper=!1,r.equals2D(s)||r.equals2D(o)?this._intPt[0]=r:i.equals2D(s)||i.equals2D(o)?this._intPt[0]=i:a===0?this._intPt[0]=new D(s):u===0?this._intPt[0]=new D(o):l===0?this._intPt[0]=new D(r):c===0&&(this._intPt[0]=new D(i))):(this._isProper=!0,this._intPt[0]=this.intersection(r,i,s,o)),n.POINT_INTERSECTION)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.nearestEndpoint=function(r,i,s,o){var a=r,u=K.distancePointLine(r,s,o),l=K.distancePointLine(i,s,o);return l<u&&(u=l,a=i),l=K.distancePointLine(s,r,i),l<u&&(u=l,a=s),l=K.distancePointLine(o,r,i),l<u&&(u=l,a=o),a},t}(le),yo=function(){};yo.prototype.interfaces_=function(){return[]},yo.prototype.getClass=function(){return yo},yo.orientationIndex=function(t,e,r){var i=e.x-t.x,s=e.y-t.y,o=r.x-e.x,a=r.y-e.y;return yo.signOfDet2x2(i,s,o,a)},yo.signOfDet2x2=function(t,e,r,i){var s=null,o=null,a=null;if(s=1,t===0||i===0)return e===0||r===0?0:e>0?r>0?-s:s:r>0?s:-s;if(e===0||r===0)return i>0?t>0?s:-s:t>0?-s:s;if(e>0?i>0?e<=i||(s=-s,o=t,t=r,r=o,o=e,e=i,i=o):e<=-i?(s=-s,r=-r,i=-i):(o=t,t=-r,r=o,o=e,e=-i,i=o):i>0?-e<=i?(s=-s,t=-t,e=-e):(o=-t,t=r,r=o,o=-e,e=i,i=o):e>=i?(t=-t,e=-e,r=-r,i=-i):(s=-s,o=-t,t=-r,r=o,o=-e,e=-i,i=o),t>0)if(r>0){if(!(t<=r))return s}else return s;else{if(r>0)return-s;if(t>=r)s=-s,t=-t,r=-r;else return-s}for(;;){if(a=Math.floor(r/t),r=r-a*t,i=i-a*e,i<0)return-s;if(i>e)return s;if(t>r+r){if(e<i+i)return s}else{if(e>i+i)return-s;r=t-r,i=e-i,s=-s}if(i===0)return r===0?0:-s;if(r===0||(a=Math.floor(t/r),t=t-a*r,e=e-a*i,e<0))return s;if(e>i)return-s;if(r>t+t){if(i<e+e)return-s}else{if(i>e+e)return s;t=r-t,e=i-e,s=-s}if(e===0)return t===0?0:s;if(t===0)return-s}};var Nn=function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var t=arguments[0];this._p=t};Nn.prototype.countSegment=function(t,e){if(t.x<this._p.x&&e.x<this._p.x)return null;if(this._p.x===e.x&&this._p.y===e.y)return this._isPointOnSegment=!0,null;if(t.y===this._p.y&&e.y===this._p.y){var r=t.x,i=e.x;return r>i&&(r=e.x,i=t.x),this._p.x>=r&&this._p.x<=i&&(this._isPointOnSegment=!0),null}if(t.y>this._p.y&&e.y<=this._p.y||e.y>this._p.y&&t.y<=this._p.y){var s=t.x-this._p.x,o=t.y-this._p.y,a=e.x-this._p.x,u=e.y-this._p.y,l=yo.signOfDet2x2(s,o,a,u);if(l===0)return this._isPointOnSegment=!0,null;u<o&&(l=-l),l>0&&this._crossingCount++}},Nn.prototype.isPointInPolygon=function(){return this.getLocation()!==F.EXTERIOR},Nn.prototype.getLocation=function(){return this._isPointOnSegment?F.BOUNDARY:this._crossingCount%2===1?F.INTERIOR:F.EXTERIOR},Nn.prototype.isOnSegment=function(){return this._isPointOnSegment},Nn.prototype.interfaces_=function(){return[]},Nn.prototype.getClass=function(){return Nn},Nn.locatePointInRing=function(){if(arguments[0]instanceof D&&pt(arguments[1],Dt)){for(var t=arguments[0],e=arguments[1],r=new Nn(t),i=new D,s=new D,o=1;o<e.size();o++)if(e.getCoordinate(o,i),e.getCoordinate(o-1,s),r.countSegment(i,s),r.isOnSegment())return r.getLocation();return r.getLocation()}else if(arguments[0]instanceof D&&arguments[1]instanceof Array){for(var a=arguments[0],u=arguments[1],l=new Nn(a),c=1;c<u.length;c++){var h=u[c],f=u[c-1];if(l.countSegment(h,f),l.isOnSegment())return l.getLocation()}return l.getLocation()}};var K=function(){},_o={CLOCKWISE:{configurable:!0},RIGHT:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},LEFT:{configurable:!0},COLLINEAR:{configurable:!0},STRAIGHT:{configurable:!0}};K.prototype.interfaces_=function(){return[]},K.prototype.getClass=function(){return K},K.orientationIndex=function(t,e,r){return ar.orientationIndex(t,e,r)},K.signedArea=function(){if(arguments[0]instanceof Array){var t=arguments[0];if(t.length<3)return 0;for(var e=0,r=t[0].x,i=1;i<t.length-1;i++){var s=t[i].x-r,o=t[i+1].y,a=t[i-1].y;e+=s*(a-o)}return e/2}else if(pt(arguments[0],Dt)){var u=arguments[0],l=u.size();if(l<3)return 0;var c=new D,h=new D,f=new D;u.getCoordinate(0,h),u.getCoordinate(1,f);var d=h.x;f.x-=d;for(var v=0,_=1;_<l-1;_++)c.y=h.y,h.x=f.x,h.y=f.y,u.getCoordinate(_+1,f),f.x-=d,v+=h.x*(c.y-f.y);return v/2}},K.distanceLineLine=function(t,e,r,i){if(t.equals(e))return K.distancePointLine(t,r,i);if(r.equals(i))return K.distancePointLine(i,t,e);var s=!1;if(!at.intersects(t,e,r,i))s=!0;else{var o=(e.x-t.x)*(i.y-r.y)-(e.y-t.y)*(i.x-r.x);if(o===0)s=!0;else{var a=(t.y-r.y)*(i.x-r.x)-(t.x-r.x)*(i.y-r.y),u=(t.y-r.y)*(e.x-t.x)-(t.x-r.x)*(e.y-t.y),l=u/o,c=a/o;(c<0||c>1||l<0||l>1)&&(s=!0)}}return s?Lr.min(K.distancePointLine(t,r,i),K.distancePointLine(e,r,i),K.distancePointLine(r,t,e),K.distancePointLine(i,t,e)):0},K.isPointInRing=function(t,e){return K.locatePointInRing(t,e)!==F.EXTERIOR},K.computeLength=function(t){var e=t.size();if(e<=1)return 0;var r=0,i=new D;t.getCoordinate(0,i);for(var s=i.x,o=i.y,a=1;a<e;a++){t.getCoordinate(a,i);var u=i.x,l=i.y,c=u-s,h=l-o;r+=Math.sqrt(c*c+h*h),s=u,o=l}return r},K.isCCW=function(t){var e=t.length-1;if(e<3)throw new ae("Ring has fewer than 4 points, so orientation cannot be determined");for(var r=t[0],i=0,s=1;s<=e;s++){var o=t[s];o.y>r.y&&(r=o,i=s)}var a=i;do a=a-1,a<0&&(a=e);while(t[a].equals2D(r)&&a!==i);var u=i;do u=(u+1)%e;while(t[u].equals2D(r)&&u!==i);var l=t[a],c=t[u];if(l.equals2D(r)||c.equals2D(r)||l.equals2D(c))return!1;var h=K.computeOrientation(l,r,c),f=!1;return h===0?f=l.x>c.x:f=h>0,f},K.locatePointInRing=function(t,e){return Nn.locatePointInRing(t,e)},K.distancePointLinePerpendicular=function(t,e,r){var i=(r.x-e.x)*(r.x-e.x)+(r.y-e.y)*(r.y-e.y),s=((e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y))/i;return Math.abs(s)*Math.sqrt(i)},K.computeOrientation=function(t,e,r){return K.orientationIndex(t,e,r)},K.distancePointLine=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(e.length===0)throw new ae("Line array must contain at least one vertex");for(var r=t.distance(e[0]),i=0;i<e.length-1;i++){var s=K.distancePointLine(t,e[i],e[i+1]);s<r&&(r=s)}return r}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2];if(a.x===u.x&&a.y===u.y)return o.distance(a);var l=(u.x-a.x)*(u.x-a.x)+(u.y-a.y)*(u.y-a.y),c=((o.x-a.x)*(u.x-a.x)+(o.y-a.y)*(u.y-a.y))/l;if(c<=0)return o.distance(a);if(c>=1)return o.distance(u);var h=((a.y-o.y)*(u.x-a.x)-(a.x-o.x)*(u.y-a.y))/l;return Math.abs(h)*Math.sqrt(l)}},K.isOnLine=function(t,e){for(var r=new Ds,i=1;i<e.length;i++){var s=e[i-1],o=e[i];if(r.computeIntersection(t,s,o),r.hasIntersection())return!0}return!1},_o.CLOCKWISE.get=function(){return-1},_o.RIGHT.get=function(){return K.CLOCKWISE},_o.COUNTERCLOCKWISE.get=function(){return 1},_o.LEFT.get=function(){return K.COUNTERCLOCKWISE},_o.COLLINEAR.get=function(){return 0},_o.STRAIGHT.get=function(){return K.COLLINEAR},Object.defineProperties(K,_o);var Ti=function(){};Ti.prototype.filter=function(t){},Ti.prototype.interfaces_=function(){return[]},Ti.prototype.getClass=function(){return Ti};var gt=function(){var t=arguments[0];this._envelope=null,this._factory=null,this._SRID=null,this._userData=null,this._factory=t,this._SRID=t.getSRID()},ni={serialVersionUID:{configurable:!0},SORTINDEX_POINT:{configurable:!0},SORTINDEX_MULTIPOINT:{configurable:!0},SORTINDEX_LINESTRING:{configurable:!0},SORTINDEX_LINEARRING:{configurable:!0},SORTINDEX_MULTILINESTRING:{configurable:!0},SORTINDEX_POLYGON:{configurable:!0},SORTINDEX_MULTIPOLYGON:{configurable:!0},SORTINDEX_GEOMETRYCOLLECTION:{configurable:!0},geometryChangedFilter:{configurable:!0}};gt.prototype.isGeometryCollection=function(){return this.getSortIndex()===gt.SORTINDEX_GEOMETRYCOLLECTION},gt.prototype.getFactory=function(){return this._factory},gt.prototype.getGeometryN=function(t){return this},gt.prototype.getArea=function(){return 0},gt.prototype.isRectangle=function(){return!1},gt.prototype.equals=function(){if(arguments[0]instanceof gt){var t=arguments[0];return t===null?!1:this.equalsTopo(t)}else if(arguments[0]instanceof Object){var e=arguments[0];if(!(e instanceof gt))return!1;var r=e;return this.equalsExact(r)}},gt.prototype.equalsExact=function(t){return this===t||this.equalsExact(t,0)},gt.prototype.geometryChanged=function(){this.apply(gt.geometryChangedFilter)},gt.prototype.geometryChangedAction=function(){this._envelope=null},gt.prototype.equalsNorm=function(t){return t===null?!1:this.norm().equalsExact(t.norm())},gt.prototype.getLength=function(){return 0},gt.prototype.getNumGeometries=function(){return 1},gt.prototype.compareTo=function(){if(arguments.length===1){var t=arguments[0],e=t;return this.getSortIndex()!==e.getSortIndex()?this.getSortIndex()-e.getSortIndex():this.isEmpty()&&e.isEmpty()?0:this.isEmpty()?-1:e.isEmpty()?1:this.compareToSameClass(t)}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.getSortIndex()!==r.getSortIndex()?this.getSortIndex()-r.getSortIndex():this.isEmpty()&&r.isEmpty()?0:this.isEmpty()?-1:r.isEmpty()?1:this.compareToSameClass(r,i)}},gt.prototype.getUserData=function(){return this._userData},gt.prototype.getSRID=function(){return this._SRID},gt.prototype.getEnvelope=function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())},gt.prototype.checkNotGeometryCollection=function(t){if(t.getSortIndex()===gt.SORTINDEX_GEOMETRYCOLLECTION)throw new ae("This method does not support GeometryCollection arguments")},gt.prototype.equal=function(t,e,r){return r===0?t.equals(e):t.distance(e)<=r},gt.prototype.norm=function(){var t=this.copy();return t.normalize(),t},gt.prototype.getPrecisionModel=function(){return this._factory.getPrecisionModel()},gt.prototype.getEnvelopeInternal=function(){return this._envelope===null&&(this._envelope=this.computeEnvelopeInternal()),new at(this._envelope)},gt.prototype.setSRID=function(t){this._SRID=t},gt.prototype.setUserData=function(t){this._userData=t},gt.prototype.compare=function(t,e){for(var r=t.iterator(),i=e.iterator();r.hasNext()&&i.hasNext();){var s=r.next(),o=i.next(),a=s.compareTo(o);if(a!==0)return a}return r.hasNext()?1:i.hasNext()?-1:0},gt.prototype.hashCode=function(){return this.getEnvelopeInternal().hashCode()},gt.prototype.isGeometryCollectionOrDerived=function(){return this.getSortIndex()===gt.SORTINDEX_GEOMETRYCOLLECTION||this.getSortIndex()===gt.SORTINDEX_MULTIPOINT||this.getSortIndex()===gt.SORTINDEX_MULTILINESTRING||this.getSortIndex()===gt.SORTINDEX_MULTIPOLYGON},gt.prototype.interfaces_=function(){return[Eh,Yr,Jr]},gt.prototype.getClass=function(){return gt},gt.hasNonEmptyElements=function(t){for(var e=0;e<t.length;e++)if(!t[e].isEmpty())return!0;return!1},gt.hasNullElements=function(t){for(var e=0;e<t.length;e++)if(t[e]===null)return!0;return!1},ni.serialVersionUID.get=function(){return 8763622679187377e3},ni.SORTINDEX_POINT.get=function(){return 0},ni.SORTINDEX_MULTIPOINT.get=function(){return 1},ni.SORTINDEX_LINESTRING.get=function(){return 2},ni.SORTINDEX_LINEARRING.get=function(){return 3},ni.SORTINDEX_MULTILINESTRING.get=function(){return 4},ni.SORTINDEX_POLYGON.get=function(){return 5},ni.SORTINDEX_MULTIPOLYGON.get=function(){return 6},ni.SORTINDEX_GEOMETRYCOLLECTION.get=function(){return 7},ni.geometryChangedFilter.get=function(){return bf},Object.defineProperties(gt,ni);var bf=function(){};bf.interfaces_=function(){return[Ti]},bf.filter=function(t){t.geometryChangedAction()};var ii=function(){};ii.prototype.filter=function(t){},ii.prototype.interfaces_=function(){return[]},ii.prototype.getClass=function(){return ii};var jr=function(){},Ai={Mod2BoundaryNodeRule:{configurable:!0},EndPointBoundaryNodeRule:{configurable:!0},MultiValentEndPointBoundaryNodeRule:{configurable:!0},MonoValentEndPointBoundaryNodeRule:{configurable:!0},MOD2_BOUNDARY_RULE:{configurable:!0},ENDPOINT_BOUNDARY_RULE:{configurable:!0},MULTIVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},MONOVALENT_ENDPOINT_BOUNDARY_RULE:{configurable:!0},OGC_SFS_BOUNDARY_RULE:{configurable:!0}};jr.prototype.isInBoundary=function(t){},jr.prototype.interfaces_=function(){return[]},jr.prototype.getClass=function(){return jr},Ai.Mod2BoundaryNodeRule.get=function(){return Sa},Ai.EndPointBoundaryNodeRule.get=function(){return Ca},Ai.MultiValentEndPointBoundaryNodeRule.get=function(){return Pa},Ai.MonoValentEndPointBoundaryNodeRule.get=function(){return Ia},Ai.MOD2_BOUNDARY_RULE.get=function(){return new Sa},Ai.ENDPOINT_BOUNDARY_RULE.get=function(){return new Ca},Ai.MULTIVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new Pa},Ai.MONOVALENT_ENDPOINT_BOUNDARY_RULE.get=function(){return new Ia},Ai.OGC_SFS_BOUNDARY_RULE.get=function(){return jr.MOD2_BOUNDARY_RULE},Object.defineProperties(jr,Ai);var Sa=function(){};Sa.prototype.isInBoundary=function(t){return t%2===1},Sa.prototype.interfaces_=function(){return[jr]},Sa.prototype.getClass=function(){return Sa};var Ca=function(){};Ca.prototype.isInBoundary=function(t){return t>0},Ca.prototype.interfaces_=function(){return[jr]},Ca.prototype.getClass=function(){return Ca};var Pa=function(){};Pa.prototype.isInBoundary=function(t){return t>1},Pa.prototype.interfaces_=function(){return[jr]},Pa.prototype.getClass=function(){return Pa};var Ia=function(){};Ia.prototype.isInBoundary=function(t){return t===1},Ia.prototype.interfaces_=function(){return[jr]},Ia.prototype.getClass=function(){return Ia};var Pe=function(){};Pe.prototype.add=function(){},Pe.prototype.addAll=function(){},Pe.prototype.isEmpty=function(){},Pe.prototype.iterator=function(){},Pe.prototype.size=function(){},Pe.prototype.toArray=function(){},Pe.prototype.remove=function(){};function Nf(n){this.message=n||""}Nf.prototype=new Error,Nf.prototype.name="IndexOutOfBoundsException";var Ma=function(){};Ma.prototype.hasNext=function(){},Ma.prototype.next=function(){},Ma.prototype.remove=function(){};var hn=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.get=function(){},t.prototype.set=function(){},t.prototype.isEmpty=function(){},t}(Pe);function ba(n){this.message=n||""}ba.prototype=new Error,ba.prototype.name="NoSuchElementException";var j=function(n){function t(){n.call(this),this.array_=[],arguments[0]instanceof Pe&&this.addAll(arguments[0])}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.ensureCapacity=function(){},t.prototype.interfaces_=function(){return[n,Pe]},t.prototype.add=function(r){return arguments.length===1?this.array_.push(r):this.array_.splice(arguments[0],arguments[1]),!0},t.prototype.clear=function(){this.array_=[]},t.prototype.addAll=function(r){for(var i=this,s=r.iterator();s.hasNext();)i.add(s.next());return!0},t.prototype.set=function(r,i){var s=this.array_[r];return this.array_[r]=i,s},t.prototype.iterator=function(){return new lI(this)},t.prototype.get=function(r){if(r<0||r>=this.size())throw new Nf;return this.array_[r]},t.prototype.isEmpty=function(){return this.array_.length===0},t.prototype.size=function(){return this.array_.length},t.prototype.toArray=function(){for(var r=this,i=[],s=0,o=this.array_.length;s<o;s++)i.push(r.array_[s]);return i},t.prototype.remove=function(r){for(var i=this,s=!1,o=0,a=this.array_.length;o<a;o++)if(i.array_[o]===r){i.array_.splice(o,1),s=!0;break}return s},t}(hn),lI=function(n){function t(e){n.call(this),this.arrayList_=e,this.position_=0}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.arrayList_.size())throw new ba;return this.arrayList_.get(this.position_++)},t.prototype.hasNext=function(){return this.position_<this.arrayList_.size()},t.prototype.set=function(r){return this.arrayList_.set(this.position_-1,r)},t.prototype.remove=function(){this.arrayList_.remove(this.arrayList_.get(this.position_))},t}(Ma),ul=function(n){function t(){if(n.call(this),arguments.length!==0){if(arguments.length===1){var r=arguments[0];this.ensureCapacity(r.length),this.add(r,!0)}else if(arguments.length===2){var i=arguments[0],s=arguments[1];this.ensureCapacity(i.length),this.add(i,s)}}}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={coordArrayType:{configurable:!0}};return e.coordArrayType.get=function(){return new Array(0).fill(null)},t.prototype.getCoordinate=function(i){return this.get(i)},t.prototype.addAll=function(){var i=this;if(arguments.length===2){for(var s=arguments[0],o=arguments[1],a=!1,u=s.iterator();u.hasNext();)i.add(u.next(),o),a=!0;return a}else return n.prototype.addAll.apply(this,arguments)},t.prototype.clone=function(){for(var i=this,s=n.prototype.clone.call(this),o=0;o<this.size();o++)s.add(o,i.get(o).copy());return s},t.prototype.toCoordinateArray=function(){return this.toArray(t.coordArrayType)},t.prototype.add=function(){var i=this;if(arguments.length===1){var s=arguments[0];n.prototype.add.call(this,s)}else if(arguments.length===2){if(arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var o=arguments[0],a=arguments[1];return this.add(o,a,!0),!0}else if(arguments[0]instanceof D&&typeof arguments[1]=="boolean"){var u=arguments[0],l=arguments[1];if(!l&&this.size()>=1){var c=this.get(this.size()-1);if(c.equals2D(u))return null}n.prototype.add.call(this,u)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var h=arguments[0],f=arguments[1];return this.add(h,f),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var d=arguments[0],v=arguments[1],_=arguments[2];if(_)for(var E=0;E<d.length;E++)i.add(d[E],v);else for(var P=d.length-1;P>=0;P--)i.add(d[P],v);return!0}else if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof D){var y=arguments[0],w=arguments[1],m=arguments[2];if(!m){var S=this.size();if(S>0){if(y>0){var C=this.get(y-1);if(C.equals2D(w))return null}if(y<S){var I=this.get(y);if(I.equals2D(w))return null}}}n.prototype.add.call(this,y,w)}}else if(arguments.length===4){var b=arguments[0],x=arguments[1],A=arguments[2],N=arguments[3],T=1;A>N&&(T=-1);for(var L=A;L!==N;L+=T)i.add(b[L],x);return!0}},t.prototype.closeRing=function(){this.size()>0&&this.add(new D(this.get(0)),!1)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},Object.defineProperties(t,e),t}(j),Nt=function(){},Ph={ForwardComparator:{configurable:!0},BidirectionalComparator:{configurable:!0},coordArrayType:{configurable:!0}};Ph.ForwardComparator.get=function(){return ll},Ph.BidirectionalComparator.get=function(){return Na},Ph.coordArrayType.get=function(){return new Array(0).fill(null)},Nt.prototype.interfaces_=function(){return[]},Nt.prototype.getClass=function(){return Nt},Nt.isRing=function(t){return!(t.length<4||!t[0].equals2D(t[t.length-1]))},Nt.ptNotInList=function(t,e){for(var r=0;r<t.length;r++){var i=t[r];if(Nt.indexOf(i,e)<0)return i}return null},Nt.scroll=function(t,e){var r=Nt.indexOf(e,t);if(r<0)return null;var i=new Array(t.length).fill(null);Le.arraycopy(t,r,i,0,t.length-r),Le.arraycopy(t,0,i,t.length-r,r),Le.arraycopy(i,0,t,0,t.length)},Nt.equals=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];if(t===e)return!0;if(t===null||e===null||t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(!t[r].equals(e[r]))return!1;return!0}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];if(i===s)return!0;if(i===null||s===null||i.length!==s.length)return!1;for(var a=0;a<i.length;a++)if(o.compare(i[a],s[a])!==0)return!1;return!0}},Nt.intersection=function(t,e){for(var r=new ul,i=0;i<t.length;i++)e.intersects(t[i])&&r.add(t[i],!0);return r.toCoordinateArray()},Nt.hasRepeatedPoints=function(t){for(var e=1;e<t.length;e++)if(t[e-1].equals(t[e]))return!0;return!1},Nt.removeRepeatedPoints=function(t){if(!Nt.hasRepeatedPoints(t))return t;var e=new ul(t,!1);return e.toCoordinateArray()},Nt.reverse=function(t){for(var e=t.length-1,r=Math.trunc(e/2),i=0;i<=r;i++){var s=t[i];t[i]=t[e-i],t[e-i]=s}},Nt.removeNull=function(t){for(var e=0,r=0;r<t.length;r++)t[r]!==null&&e++;var i=new Array(e).fill(null);if(e===0)return i;for(var s=0,o=0;o<t.length;o++)t[o]!==null&&(i[s++]=t[o]);return i},Nt.copyDeep=function(){if(arguments.length===1){for(var t=arguments[0],e=new Array(t.length).fill(null),r=0;r<t.length;r++)e[r]=new D(t[r]);return e}else if(arguments.length===5)for(var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3],u=arguments[4],l=0;l<u;l++)o[a+l]=new D(i[s+l])},Nt.isEqualReversed=function(t,e){for(var r=0;r<t.length;r++){var i=t[r],s=e[t.length-r-1];if(i.compareTo(s)!==0)return!1}return!0},Nt.envelope=function(t){for(var e=new at,r=0;r<t.length;r++)e.expandToInclude(t[r]);return e},Nt.toCoordinateArray=function(t){return t.toArray(Nt.coordArrayType)},Nt.atLeastNCoordinatesOrNothing=function(t,e){return e.length>=t?e:[]},Nt.indexOf=function(t,e){for(var r=0;r<e.length;r++)if(t.equals(e[r]))return r;return-1},Nt.increasingDirection=function(t){for(var e=0;e<Math.trunc(t.length/2);e++){var r=t.length-1-e,i=t[e].compareTo(t[r]);if(i!==0)return i}return 1},Nt.compare=function(t,e){for(var r=0;r<t.length&&r<e.length;){var i=t[r].compareTo(e[r]);if(i!==0)return i;r++}return r<e.length?-1:r<t.length?1:0},Nt.minCoordinate=function(t){for(var e=null,r=0;r<t.length;r++)(e===null||e.compareTo(t[r])>0)&&(e=t[r]);return e},Nt.extract=function(t,e,r){e=Lr.clamp(e,0,t.length),r=Lr.clamp(r,-1,t.length);var i=r-e+1;r<0&&(i=0),e>=t.length&&(i=0),r<e&&(i=0);var s=new Array(i).fill(null);if(i===0)return s;for(var o=0,a=e;a<=r;a++)s[o++]=t[a];return s},Object.defineProperties(Nt,Ph);var ll=function(){};ll.prototype.compare=function(t,e){var r=t,i=e;return Nt.compare(r,i)},ll.prototype.interfaces_=function(){return[ya]},ll.prototype.getClass=function(){return ll};var Na=function(){};Na.prototype.compare=function(t,e){var r=t,i=e;if(r.length<i.length)return-1;if(r.length>i.length)return 1;if(r.length===0)return 0;var s=Nt.compare(r,i),o=Nt.isEqualReversed(r,i);return o?0:s},Na.prototype.OLDcompare=function(t,e){var r=t,i=e;if(r.length<i.length)return-1;if(r.length>i.length)return 1;if(r.length===0)return 0;for(var s=Nt.increasingDirection(r),o=Nt.increasingDirection(i),a=s>0?0:r.length-1,u=o>0?0:r.length-1,l=0;l<r.length;l++){var c=r[a].compareTo(i[u]);if(c!==0)return c;a+=s,u+=o}return 0},Na.prototype.interfaces_=function(){return[ya]},Na.prototype.getClass=function(){return Na};var wo=function(){};wo.prototype.get=function(){},wo.prototype.put=function(){},wo.prototype.size=function(){},wo.prototype.values=function(){},wo.prototype.entrySet=function(){};var hI=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t}(wo);function hl(n){this.message=n||""}hl.prototype=new Error,hl.prototype.name="OperationNotSupported";function Ih(){}Ih.prototype=new Pe,Ih.prototype.contains=function(){};var xf=function(n){function t(){n.call(this),this.array_=[],arguments[0]instanceof Pe&&this.addAll(arguments[0])}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.contains=function(r){for(var i=this,s=0,o=this.array_.length;s<o;s++){var a=i.array_[s];if(a===r)return!0}return!1},t.prototype.add=function(r){return this.contains(r)?!1:(this.array_.push(r),!0)},t.prototype.addAll=function(r){for(var i=this,s=r.iterator();s.hasNext();)i.add(s.next());return!0},t.prototype.remove=function(r){throw new Error},t.prototype.size=function(){return this.array_.length},t.prototype.isEmpty=function(){return this.array_.length===0},t.prototype.toArray=function(){for(var r=this,i=[],s=0,o=this.array_.length;s<o;s++)i.push(r.array_[s]);return i},t.prototype.iterator=function(){return new cI(this)},t}(Ih),cI=function(n){function t(e){n.call(this),this.hashSet_=e,this.position_=0}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.next=function(){if(this.position_===this.hashSet_.size())throw new ba;return this.hashSet_.array_[this.position_++]},t.prototype.hasNext=function(){return this.position_<this.hashSet_.size()},t.prototype.remove=function(){throw new hl},t}(Ma),Oi=0,Ls=1;function lv(n){return n===null?Oi:n.color}function Zt(n){return n===null?null:n.parent}function Di(n,t){n!==null&&(n.color=t)}function Tf(n){return n===null?null:n.left}function hv(n){return n===null?null:n.right}function He(){this.root_=null,this.size_=0}He.prototype=new hI,He.prototype.get=function(n){for(var t=this.root_;t!==null;){var e=n.compareTo(t.key);if(e<0)t=t.left;else if(e>0)t=t.right;else return t.value}return null},He.prototype.put=function(n,t){if(this.root_===null)return this.root_={key:n,value:t,left:null,right:null,parent:null,color:Oi,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var e=this.root_,r,i;do if(r=e,i=n.compareTo(e.key),i<0)e=e.left;else if(i>0)e=e.right;else{var s=e.value;return e.value=t,s}while(e!==null);var o={key:n,left:null,right:null,value:t,parent:r,color:Oi,getValue:function(){return this.value},getKey:function(){return this.key}};return i<0?r.left=o:r.right=o,this.fixAfterInsertion(o),this.size_++,null},He.prototype.fixAfterInsertion=function(n){var t=this;for(n.color=Ls;n!=null&&n!==this.root_&&n.parent.color===Ls;)if(Zt(n)===Tf(Zt(Zt(n)))){var e=hv(Zt(Zt(n)));lv(e)===Ls?(Di(Zt(n),Oi),Di(e,Oi),Di(Zt(Zt(n)),Ls),n=Zt(Zt(n))):(n===hv(Zt(n))&&(n=Zt(n),t.rotateLeft(n)),Di(Zt(n),Oi),Di(Zt(Zt(n)),Ls),t.rotateRight(Zt(Zt(n))))}else{var r=Tf(Zt(Zt(n)));lv(r)===Ls?(Di(Zt(n),Oi),Di(r,Oi),Di(Zt(Zt(n)),Ls),n=Zt(Zt(n))):(n===Tf(Zt(n))&&(n=Zt(n),t.rotateRight(n)),Di(Zt(n),Oi),Di(Zt(Zt(n)),Ls),t.rotateLeft(Zt(Zt(n))))}this.root_.color=Oi},He.prototype.values=function(){var n=new j,t=this.getFirstEntry();if(t!==null)for(n.add(t.value);(t=He.successor(t))!==null;)n.add(t.value);return n},He.prototype.entrySet=function(){var n=new xf,t=this.getFirstEntry();if(t!==null)for(n.add(t);(t=He.successor(t))!==null;)n.add(t);return n},He.prototype.rotateLeft=function(n){if(n!=null){var t=n.right;n.right=t.left,t.left!=null&&(t.left.parent=n),t.parent=n.parent,n.parent===null?this.root_=t:n.parent.left===n?n.parent.left=t:n.parent.right=t,t.left=n,n.parent=t}},He.prototype.rotateRight=function(n){if(n!=null){var t=n.left;n.left=t.right,t.right!=null&&(t.right.parent=n),t.parent=n.parent,n.parent===null?this.root_=t:n.parent.right===n?n.parent.right=t:n.parent.left=t,t.right=n,n.parent=t}},He.prototype.getFirstEntry=function(){var n=this.root_;if(n!=null)for(;n.left!=null;)n=n.left;return n},He.successor=function(n){if(n===null)return null;if(n.right!==null){for(var t=n.right;t.left!==null;)t=t.left;return t}else{for(var e=n.parent,r=n;e!==null&&r===e.right;)r=e,e=e.parent;return e}},He.prototype.size=function(){return this.size_};var cl=function(){};cl.prototype.interfaces_=function(){return[]},cl.prototype.getClass=function(){return cl};function cv(){}cv.prototype=new Ih;function xn(){this.array_=[],arguments[0]instanceof Pe&&this.addAll(arguments[0])}xn.prototype=new cv,xn.prototype.contains=function(n){for(var t=this,e=0,r=this.array_.length;e<r;e++){var i=t.array_[e];if(i.compareTo(n)===0)return!0}return!1},xn.prototype.add=function(n){var t=this;if(this.contains(n))return!1;for(var e=0,r=this.array_.length;e<r;e++){var i=t.array_[e];if(i.compareTo(n)===1)return t.array_.splice(e,0,n),!0}return this.array_.push(n),!0},xn.prototype.addAll=function(n){for(var t=this,e=n.iterator();e.hasNext();)t.add(e.next());return!0},xn.prototype.remove=function(n){throw new hl},xn.prototype.size=function(){return this.array_.length},xn.prototype.isEmpty=function(){return this.array_.length===0},xn.prototype.toArray=function(){for(var n=this,t=[],e=0,r=this.array_.length;e<r;e++)t.push(n.array_[e]);return t},xn.prototype.iterator=function(){return new Mh(this)};var Mh=function(n){this.treeSet_=n,this.position_=0};Mh.prototype.next=function(){if(this.position_===this.treeSet_.size())throw new ba;return this.treeSet_.array_[this.position_++]},Mh.prototype.hasNext=function(){return this.position_<this.treeSet_.size()},Mh.prototype.remove=function(){throw new hl};var Rs=function(){};Rs.sort=function(){var t=arguments[0],e,r,i,s;if(arguments.length===1)s=function(a,u){return a.compareTo(u)},t.sort(s);else if(arguments.length===2)i=arguments[1],s=function(a,u){return i.compare(a,u)},t.sort(s);else if(arguments.length===3){r=t.slice(arguments[1],arguments[2]),r.sort();var o=t.slice(0,arguments[1]).concat(r,t.slice(arguments[2],t.length));for(t.splice(0,t.length),e=0;e<o.length;e++)t.push(o[e])}else if(arguments.length===4)for(r=t.slice(arguments[1],arguments[2]),i=arguments[3],s=function(a,u){return i.compare(a,u)},r.sort(s),o=t.slice(0,arguments[1]).concat(r,t.slice(arguments[2],t.length)),t.splice(0,t.length),e=0;e<o.length;e++)t.push(o[e])},Rs.asList=function(t){for(var e=new j,r=0,i=t.length;r<i;r++)e.add(t[r]);return e};var Vt=function(){},cn={P:{configurable:!0},L:{configurable:!0},A:{configurable:!0},FALSE:{configurable:!0},TRUE:{configurable:!0},DONTCARE:{configurable:!0},SYM_FALSE:{configurable:!0},SYM_TRUE:{configurable:!0},SYM_DONTCARE:{configurable:!0},SYM_P:{configurable:!0},SYM_L:{configurable:!0},SYM_A:{configurable:!0}};cn.P.get=function(){return 0},cn.L.get=function(){return 1},cn.A.get=function(){return 2},cn.FALSE.get=function(){return-1},cn.TRUE.get=function(){return-2},cn.DONTCARE.get=function(){return-3},cn.SYM_FALSE.get=function(){return"F"},cn.SYM_TRUE.get=function(){return"T"},cn.SYM_DONTCARE.get=function(){return"*"},cn.SYM_P.get=function(){return"0"},cn.SYM_L.get=function(){return"1"},cn.SYM_A.get=function(){return"2"},Vt.prototype.interfaces_=function(){return[]},Vt.prototype.getClass=function(){return Vt},Vt.toDimensionSymbol=function(t){switch(t){case Vt.FALSE:return Vt.SYM_FALSE;case Vt.TRUE:return Vt.SYM_TRUE;case Vt.DONTCARE:return Vt.SYM_DONTCARE;case Vt.P:return Vt.SYM_P;case Vt.L:return Vt.SYM_L;case Vt.A:return Vt.SYM_A}throw new ae("Unknown dimension value: "+t)},Vt.toDimensionValue=function(t){switch(ol.toUpperCase(t)){case Vt.SYM_FALSE:return Vt.FALSE;case Vt.SYM_TRUE:return Vt.TRUE;case Vt.SYM_DONTCARE:return Vt.DONTCARE;case Vt.SYM_P:return Vt.P;case Vt.SYM_L:return Vt.L;case Vt.SYM_A:return Vt.A}throw new ae("Unknown dimension symbol: "+t)},Object.defineProperties(Vt,cn);var Tn=function(){};Tn.prototype.filter=function(t){},Tn.prototype.interfaces_=function(){return[]},Tn.prototype.getClass=function(){return Tn};var fn=function(){};fn.prototype.filter=function(t,e){},fn.prototype.isDone=function(){},fn.prototype.isGeometryChanged=function(){},fn.prototype.interfaces_=function(){return[]},fn.prototype.getClass=function(){return fn};var Qe=function(n){function t(r,i){if(n.call(this,i),this._geometries=r||[],n.hasNullElements(this._geometries))throw new ae("geometries must not contain null elements")}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){for(var i=this,s=new at,o=0;o<this._geometries.length;o++)s.expandToInclude(i._geometries[o].getEnvelopeInternal());return s},t.prototype.getGeometryN=function(i){return this._geometries[i]},t.prototype.getSortIndex=function(){return n.SORTINDEX_GEOMETRYCOLLECTION},t.prototype.getCoordinates=function(){for(var i=this,s=new Array(this.getNumPoints()).fill(null),o=-1,a=0;a<this._geometries.length;a++)for(var u=i._geometries[a].getCoordinates(),l=0;l<u.length;l++)o++,s[o]=u[l];return s},t.prototype.getArea=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getArea();return s},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],o=arguments[1];if(!this.isEquivalentClass(s))return!1;var a=s;if(this._geometries.length!==a._geometries.length)return!1;for(var u=0;u<this._geometries.length;u++)if(!i._geometries[u].equalsExact(a._geometries[u],o))return!1;return!0}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){for(var i=this,s=0;s<this._geometries.length;s++)i._geometries[s].normalize();Rs.sort(this._geometries)},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()},t.prototype.getBoundaryDimension=function(){for(var i=this,s=Vt.FALSE,o=0;o<this._geometries.length;o++)s=Math.max(s,i._geometries[o].getBoundaryDimension());return s},t.prototype.getDimension=function(){for(var i=this,s=Vt.FALSE,o=0;o<this._geometries.length;o++)s=Math.max(s,i._geometries[o].getDimension());return s},t.prototype.getLength=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getLength();return s},t.prototype.getNumPoints=function(){for(var i=this,s=0,o=0;o<this._geometries.length;o++)s+=i._geometries[o].getNumPoints();return s},t.prototype.getNumGeometries=function(){return this._geometries.length},t.prototype.reverse=function(){for(var i=this,s=this._geometries.length,o=new Array(s).fill(null),a=0;a<this._geometries.length;a++)o[a]=i._geometries[a].reverse();return this.getFactory().createGeometryCollection(o)},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var s=arguments[0],o=new xn(Rs.asList(this._geometries)),a=new xn(Rs.asList(s._geometries));return this.compare(o,a)}else if(arguments.length===2){for(var u=arguments[0],l=arguments[1],c=u,h=this.getNumGeometries(),f=c.getNumGeometries(),d=0;d<h&&d<f;){var v=i.getGeometryN(d),_=c.getGeometryN(d),E=v.compareToSameClass(_,l);if(E!==0)return E;d++}return d<h?1:d<f?-1:0}},t.prototype.apply=function(){var i=this;if(pt(arguments[0],ii))for(var s=arguments[0],o=0;o<this._geometries.length;o++)i._geometries[o].apply(s);else if(pt(arguments[0],fn)){var a=arguments[0];if(this._geometries.length===0)return null;for(var u=0;u<this._geometries.length&&(i._geometries[u].apply(a),!a.isDone());u++);a.isGeometryChanged()&&this.geometryChanged()}else if(pt(arguments[0],Tn)){var l=arguments[0];l.filter(this);for(var c=0;c<this._geometries.length;c++)i._geometries[c].apply(l)}else if(pt(arguments[0],Ti)){var h=arguments[0];h.filter(this);for(var f=0;f<this._geometries.length;f++)i._geometries[f].apply(h)}},t.prototype.getBoundary=function(){return this.checkNotGeometryCollection(this),Pt.shouldNeverReachHere(),null},t.prototype.clone=function(){var i=this,s=n.prototype.clone.call(this);s._geometries=new Array(this._geometries.length).fill(null);for(var o=0;o<this._geometries.length;o++)s._geometries[o]=i._geometries[o].clone();return s},t.prototype.getGeometryType=function(){return"GeometryCollection"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new t(s,this._factory)},t.prototype.isEmpty=function(){for(var i=this,s=0;s<this._geometries.length;s++)if(!i._geometries[s].isEmpty())return!1;return!0},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-5694727726395021e3},Object.defineProperties(t,e),t}(gt),Fs=function(n){function t(){n.apply(this,arguments)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return gt.SORTINDEX_MULTILINESTRING},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?n.prototype.equalsExact.call(this,i,s):!1}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?Vt.FALSE:0},t.prototype.isClosed=function(){var i=this;if(this.isEmpty())return!1;for(var s=0;s<this._geometries.length;s++)if(!i._geometries[s].isClosed())return!1;return!0},t.prototype.getDimension=function(){return 1},t.prototype.reverse=function(){for(var i=this,s=this._geometries.length,o=new Array(s).fill(null),a=0;a<this._geometries.length;a++)o[s-1-a]=i._geometries[a].reverse();return this.getFactory().createMultiLineString(o)},t.prototype.getBoundary=function(){return new Qr(this).getBoundary()},t.prototype.getGeometryType=function(){return"MultiLineString"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new t(s,this._factory)},t.prototype.interfaces_=function(){return[cl]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 8166665132445434e3},Object.defineProperties(t,e),t}(Qe),Qr=function(){if(this._geom=null,this._geomFact=null,this._bnRule=null,this._endpointMap=null,arguments.length===1){var t=arguments[0],e=jr.MOD2_BOUNDARY_RULE;this._geom=t,this._geomFact=t.getFactory(),this._bnRule=e}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this._geom=r,this._geomFact=r.getFactory(),this._bnRule=i}};Qr.prototype.boundaryMultiLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();var e=this.computeBoundaryCoordinates(t);return e.length===1?this._geomFact.createPoint(e[0]):this._geomFact.createMultiPointFromCoords(e)},Qr.prototype.getBoundary=function(){return this._geom instanceof ce?this.boundaryLineString(this._geom):this._geom instanceof Fs?this.boundaryMultiLineString(this._geom):this._geom.getBoundary()},Qr.prototype.boundaryLineString=function(t){if(this._geom.isEmpty())return this.getEmptyMultiPoint();if(t.isClosed()){var e=this._bnRule.isInBoundary(2);return e?t.getStartPoint():this._geomFact.createMultiPoint()}return this._geomFact.createMultiPoint([t.getStartPoint(),t.getEndPoint()])},Qr.prototype.getEmptyMultiPoint=function(){return this._geomFact.createMultiPoint()},Qr.prototype.computeBoundaryCoordinates=function(t){var e=this,r=new j;this._endpointMap=new He;for(var i=0;i<t.getNumGeometries();i++){var s=t.getGeometryN(i);s.getNumPoints()!==0&&(e.addEndpoint(s.getCoordinateN(0)),e.addEndpoint(s.getCoordinateN(s.getNumPoints()-1)))}for(var o=this._endpointMap.entrySet().iterator();o.hasNext();){var a=o.next(),u=a.getValue(),l=u.count;e._bnRule.isInBoundary(l)&&r.add(a.getKey())}return Nt.toCoordinateArray(r)},Qr.prototype.addEndpoint=function(t){var e=this._endpointMap.get(t);e===null&&(e=new bh,this._endpointMap.put(t,e)),e.count++},Qr.prototype.interfaces_=function(){return[]},Qr.prototype.getClass=function(){return Qr},Qr.getBoundary=function(){if(arguments.length===1){var t=arguments[0],e=new Qr(t);return e.getBoundary()}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=new Qr(r,i);return s.getBoundary()}};var bh=function(){this.count=null};bh.prototype.interfaces_=function(){return[]},bh.prototype.getClass=function(){return bh};function fI(){}function dI(){}var gI=function(){};function pI(){}function vI(){}function mI(){}var $r=function(){},Af={NEWLINE:{configurable:!0},SIMPLE_ORDINATE_FORMAT:{configurable:!0}};$r.prototype.interfaces_=function(){return[]},$r.prototype.getClass=function(){return $r},$r.chars=function(t,e){for(var r=new Array(e).fill(null),i=0;i<e;i++)r[i]=t;return String(r)},$r.getStackTrace=function(){if(arguments.length===1){var t=arguments[0],e=new pI,r=new fI;return t.printStackTrace(r),e.toString()}else if(arguments.length===2){var i=arguments[0],s=arguments[1],o="";new dI($r.getStackTrace(i));for(var a=new mI,u=0;u<s;u++)try{o+=a.readLine()+$r.NEWLINE}catch(l){if(l instanceof vI)Pt.shouldNeverReachHere();else throw l}finally{}return o}},$r.split=function(t,e){for(var r=e.length,i=new j,s=""+t,o=s.indexOf(e);o>=0;){var a=s.substring(0,o);i.add(a),s=s.substring(o+r),o=s.indexOf(e)}s.length>0&&i.add(s);for(var u=new Array(i.size()).fill(null),l=0;l<u.length;l++)u[l]=i.get(l);return u},$r.toString=function(){if(arguments.length===1){var t=arguments[0];return $r.SIMPLE_ORDINATE_FORMAT.format(t)}},$r.spaces=function(t){return $r.chars(" ",t)},Af.NEWLINE.get=function(){return Le.getProperty("line.separator")},Af.SIMPLE_ORDINATE_FORMAT.get=function(){return new gI},Object.defineProperties($r,Af);var ge=function(){};ge.prototype.interfaces_=function(){return[]},ge.prototype.getClass=function(){return ge},ge.copyCoord=function(t,e,r,i){for(var s=Math.min(t.getDimension(),r.getDimension()),o=0;o<s;o++)r.setOrdinate(i,o,t.getOrdinate(e,o))},ge.isRing=function(t){var e=t.size();return e===0?!0:e<=3?!1:t.getOrdinate(0,Dt.X)===t.getOrdinate(e-1,Dt.X)&&t.getOrdinate(0,Dt.Y)===t.getOrdinate(e-1,Dt.Y)},ge.isEqual=function(t,e){var r=t.size(),i=e.size();if(r!==i)return!1;for(var s=Math.min(t.getDimension(),e.getDimension()),o=0;o<r;o++)for(var a=0;a<s;a++){var u=t.getOrdinate(o,a),l=e.getOrdinate(o,a);if(t.getOrdinate(o,a)!==e.getOrdinate(o,a)&&!(yt.isNaN(u)&&yt.isNaN(l)))return!1}return!0},ge.extend=function(t,e,r){var i=t.create(r,e.getDimension()),s=e.size();if(ge.copy(e,0,i,0,s),s>0)for(var o=s;o<r;o++)ge.copy(e,s-1,i,o,1);return i},ge.reverse=function(t){for(var e=t.size()-1,r=Math.trunc(e/2),i=0;i<=r;i++)ge.swap(t,i,e-i)},ge.swap=function(t,e,r){if(e===r)return null;for(var i=0;i<t.getDimension();i++){var s=t.getOrdinate(e,i);t.setOrdinate(e,i,t.getOrdinate(r,i)),t.setOrdinate(r,i,s)}},ge.copy=function(t,e,r,i,s){for(var o=0;o<s;o++)ge.copyCoord(t,e+o,r,i+o)},ge.toString=function(){if(arguments.length===1){var t=arguments[0],e=t.size();if(e===0)return"()";var r=t.getDimension(),i=new In;i.append("(");for(var s=0;s<e;s++){s>0&&i.append(" ");for(var o=0;o<r;o++)o>0&&i.append(","),i.append($r.toString(t.getOrdinate(s,o)))}return i.append(")"),i.toString()}},ge.ensureValidRing=function(t,e){var r=e.size();if(r===0)return e;if(r<=3)return ge.createClosedRing(t,e,4);var i=e.getOrdinate(0,Dt.X)===e.getOrdinate(r-1,Dt.X)&&e.getOrdinate(0,Dt.Y)===e.getOrdinate(r-1,Dt.Y);return i?e:ge.createClosedRing(t,e,r+1)},ge.createClosedRing=function(t,e,r){var i=t.create(r,e.getDimension()),s=e.size();ge.copy(e,0,i,0,s);for(var o=s;o<r;o++)ge.copy(e,0,i,o,1);return i};var ce=function(n){function t(r,i){n.call(this,i),this._points=null,this.init(r)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this.isEmpty()?new at:this._points.expandEnvelope(new at)},t.prototype.isRing=function(){return this.isClosed()&&this.isSimple()},t.prototype.getSortIndex=function(){return n.SORTINDEX_LINESTRING},t.prototype.getCoordinates=function(){return this._points.toCoordinateArray()},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],o=arguments[1];if(!this.isEquivalentClass(s))return!1;var a=s;if(this._points.size()!==a._points.size())return!1;for(var u=0;u<this._points.size();u++)if(!i.equal(i._points.getCoordinate(u),a._points.getCoordinate(u),o))return!1;return!0}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){for(var i=this,s=0;s<Math.trunc(this._points.size()/2);s++){var o=i._points.size()-1-s;if(!i._points.getCoordinate(s).equals(i._points.getCoordinate(o)))return i._points.getCoordinate(s).compareTo(i._points.getCoordinate(o))>0&&ge.reverse(i._points),null}},t.prototype.getCoordinate=function(){return this.isEmpty()?null:this._points.getCoordinate(0)},t.prototype.getBoundaryDimension=function(){return this.isClosed()?Vt.FALSE:0},t.prototype.isClosed=function(){return this.isEmpty()?!1:this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))},t.prototype.getEndPoint=function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)},t.prototype.getDimension=function(){return 1},t.prototype.getLength=function(){return K.computeLength(this._points)},t.prototype.getNumPoints=function(){return this._points.size()},t.prototype.reverse=function(){var i=this._points.copy();ge.reverse(i);var s=this.getFactory().createLineString(i);return s},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){for(var s=arguments[0],o=s,a=0,u=0;a<this._points.size()&&u<o._points.size();){var l=i._points.getCoordinate(a).compareTo(o._points.getCoordinate(u));if(l!==0)return l;a++,u++}return a<this._points.size()?1:u<o._points.size()?-1:0}else if(arguments.length===2){var c=arguments[0],h=arguments[1],f=c;return h.compare(this._points,f._points)}},t.prototype.apply=function(){var i=this;if(pt(arguments[0],ii))for(var s=arguments[0],o=0;o<this._points.size();o++)s.filter(i._points.getCoordinate(o));else if(pt(arguments[0],fn)){var a=arguments[0];if(this._points.size()===0)return null;for(var u=0;u<this._points.size()&&(a.filter(i._points,u),!a.isDone());u++);a.isGeometryChanged()&&this.geometryChanged()}else if(pt(arguments[0],Tn)){var l=arguments[0];l.filter(this)}else if(pt(arguments[0],Ti)){var c=arguments[0];c.filter(this)}},t.prototype.getBoundary=function(){return new Qr(this).getBoundary()},t.prototype.isEquivalentClass=function(i){return i instanceof t},t.prototype.clone=function(){var i=n.prototype.clone.call(this);return i._points=this._points.clone(),i},t.prototype.getCoordinateN=function(i){return this._points.getCoordinate(i)},t.prototype.getGeometryType=function(){return"LineString"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._points},t.prototype.isEmpty=function(){return this._points.size()===0},t.prototype.init=function(i){if(i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),i.size()===1)throw new ae("Invalid number of points in LineString (found "+i.size()+" - must be 0 or >= 2)");this._points=i},t.prototype.isCoordinate=function(i){for(var s=this,o=0;o<this._points.size();o++)if(s._points.getCoordinate(o).equals(i))return!0;return!1},t.prototype.getStartPoint=function(){return this.isEmpty()?null:this.getPointN(0)},t.prototype.getPointN=function(i){return this.getFactory().createPoint(this._points.getCoordinate(i))},t.prototype.interfaces_=function(){return[cl]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 0x2b2b51ba435c8e00},Object.defineProperties(t,e),t}(gt),fl=function(){};fl.prototype.interfaces_=function(){return[]},fl.prototype.getClass=function(){return fl};var _r=function(n){function t(r,i){n.call(this,i),this._coordinates=r||null,this.init(this._coordinates)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){if(this.isEmpty())return new at;var i=new at;return i.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),i},t.prototype.getSortIndex=function(){return n.SORTINDEX_POINT},t.prototype.getCoordinates=function(){return this.isEmpty()?[]:[this.getCoordinate()]},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?this.isEmpty()&&i.isEmpty()?!0:this.isEmpty()!==i.isEmpty()?!1:this.equal(i.getCoordinate(),this.getCoordinate(),s):!1}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){},t.prototype.getCoordinate=function(){return this._coordinates.size()!==0?this._coordinates.getCoordinate(0):null},t.prototype.getBoundaryDimension=function(){return Vt.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getNumPoints=function(){return this.isEmpty()?0:1},t.prototype.reverse=function(){return this.copy()},t.prototype.getX=function(){if(this.getCoordinate()===null)throw new Error("getX called on empty Point");return this.getCoordinate().x},t.prototype.compareToSameClass=function(){if(arguments.length===1){var i=arguments[0],s=i;return this.getCoordinate().compareTo(s.getCoordinate())}else if(arguments.length===2){var o=arguments[0],a=arguments[1],u=o;return a.compare(this._coordinates,u._coordinates)}},t.prototype.apply=function(){if(pt(arguments[0],ii)){var i=arguments[0];if(this.isEmpty())return null;i.filter(this.getCoordinate())}else if(pt(arguments[0],fn)){var s=arguments[0];if(this.isEmpty())return null;s.filter(this._coordinates,0),s.isGeometryChanged()&&this.geometryChanged()}else if(pt(arguments[0],Tn)){var o=arguments[0];o.filter(this)}else if(pt(arguments[0],Ti)){var a=arguments[0];a.filter(this)}},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.clone=function(){var i=n.prototype.clone.call(this);return i._coordinates=this._coordinates.clone(),i},t.prototype.getGeometryType=function(){return"Point"},t.prototype.copy=function(){return new t(this._coordinates.copy(),this._factory)},t.prototype.getCoordinateSequence=function(){return this._coordinates},t.prototype.getY=function(){if(this.getCoordinate()===null)throw new Error("getY called on empty Point");return this.getCoordinate().y},t.prototype.isEmpty=function(){return this._coordinates.size()===0},t.prototype.init=function(i){i===null&&(i=this.getFactory().getCoordinateSequenceFactory().create([])),Pt.isTrue(i.size()<=1),this._coordinates=i},t.prototype.isSimple=function(){return!0},t.prototype.interfaces_=function(){return[fl]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return 4902022702746615e3},Object.defineProperties(t,e),t}(gt),ns=function(){};ns.prototype.interfaces_=function(){return[]},ns.prototype.getClass=function(){return ns};var Ie=function(n){function t(r,i,s){if(n.call(this,s),this._shell=null,this._holes=null,r===null&&(r=this.getFactory().createLinearRing()),i===null&&(i=[]),n.hasNullElements(i))throw new ae("holes must not contain null elements");if(r.isEmpty()&&n.hasNonEmptyElements(i))throw new ae("shell is empty but holes are not");this._shell=r,this._holes=i}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.computeEnvelopeInternal=function(){return this._shell.getEnvelopeInternal()},t.prototype.getSortIndex=function(){return n.SORTINDEX_POLYGON},t.prototype.getCoordinates=function(){var i=this;if(this.isEmpty())return[];for(var s=new Array(this.getNumPoints()).fill(null),o=-1,a=this._shell.getCoordinates(),u=0;u<a.length;u++)o++,s[o]=a[u];for(var l=0;l<this._holes.length;l++)for(var c=i._holes[l].getCoordinates(),h=0;h<c.length;h++)o++,s[o]=c[h];return s},t.prototype.getArea=function(){var i=this,s=0;s+=Math.abs(K.signedArea(this._shell.getCoordinateSequence()));for(var o=0;o<this._holes.length;o++)s-=Math.abs(K.signedArea(i._holes[o].getCoordinateSequence()));return s},t.prototype.isRectangle=function(){if(this.getNumInteriorRing()!==0||this._shell===null||this._shell.getNumPoints()!==5)return!1;for(var i=this._shell.getCoordinateSequence(),s=this.getEnvelopeInternal(),o=0;o<5;o++){var a=i.getX(o);if(!(a===s.getMinX()||a===s.getMaxX()))return!1;var u=i.getY(o);if(!(u===s.getMinY()||u===s.getMaxY()))return!1}for(var l=i.getX(0),c=i.getY(0),h=1;h<=4;h++){var f=i.getX(h),d=i.getY(h),v=f!==l,_=d!==c;if(v===_)return!1;l=f,c=d}return!0},t.prototype.equalsExact=function(){var i=this;if(arguments.length===2){var s=arguments[0],o=arguments[1];if(!this.isEquivalentClass(s))return!1;var a=s,u=this._shell,l=a._shell;if(!u.equalsExact(l,o)||this._holes.length!==a._holes.length)return!1;for(var c=0;c<this._holes.length;c++)if(!i._holes[c].equalsExact(a._holes[c],o))return!1;return!0}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.normalize=function(){var i=this;if(arguments.length===0){this.normalize(this._shell,!0);for(var s=0;s<this._holes.length;s++)i.normalize(i._holes[s],!1);Rs.sort(this._holes)}else if(arguments.length===2){var o=arguments[0],a=arguments[1];if(o.isEmpty())return null;var u=new Array(o.getCoordinates().length-1).fill(null);Le.arraycopy(o.getCoordinates(),0,u,0,u.length);var l=Nt.minCoordinate(o.getCoordinates());Nt.scroll(u,l),Le.arraycopy(u,0,o.getCoordinates(),0,u.length),o.getCoordinates()[u.length]=u[0],K.isCCW(o.getCoordinates())===a&&Nt.reverse(o.getCoordinates())}},t.prototype.getCoordinate=function(){return this._shell.getCoordinate()},t.prototype.getNumInteriorRing=function(){return this._holes.length},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.prototype.getLength=function(){var i=this,s=0;s+=this._shell.getLength();for(var o=0;o<this._holes.length;o++)s+=i._holes[o].getLength();return s},t.prototype.getNumPoints=function(){for(var i=this,s=this._shell.getNumPoints(),o=0;o<this._holes.length;o++)s+=i._holes[o].getNumPoints();return s},t.prototype.reverse=function(){var i=this,s=this.copy();s._shell=this._shell.copy().reverse(),s._holes=new Array(this._holes.length).fill(null);for(var o=0;o<this._holes.length;o++)s._holes[o]=i._holes[o].copy().reverse();return s},t.prototype.convexHull=function(){return this.getExteriorRing().convexHull()},t.prototype.compareToSameClass=function(){var i=this;if(arguments.length===1){var s=arguments[0],o=this._shell,a=s._shell;return o.compareToSameClass(a)}else if(arguments.length===2){var u=arguments[0],l=arguments[1],c=u,h=this._shell,f=c._shell,d=h.compareToSameClass(f,l);if(d!==0)return d;for(var v=this.getNumInteriorRing(),_=c.getNumInteriorRing(),E=0;E<v&&E<_;){var P=i.getInteriorRingN(E),y=c.getInteriorRingN(E),w=P.compareToSameClass(y,l);if(w!==0)return w;E++}return E<v?1:E<_?-1:0}},t.prototype.apply=function(i){var s=this;if(pt(i,ii)){this._shell.apply(i);for(var o=0;o<this._holes.length;o++)s._holes[o].apply(i)}else if(pt(i,fn)){if(this._shell.apply(i),!i.isDone())for(var a=0;a<this._holes.length&&(s._holes[a].apply(i),!i.isDone());a++);i.isGeometryChanged()&&this.geometryChanged()}else if(pt(i,Tn))i.filter(this);else if(pt(i,Ti)){i.filter(this),this._shell.apply(i);for(var u=0;u<this._holes.length;u++)s._holes[u].apply(i)}},t.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();var s=new Array(this._holes.length+1).fill(null);s[0]=this._shell;for(var o=0;o<this._holes.length;o++)s[o+1]=i._holes[o];return s.length<=1?this.getFactory().createLinearRing(s[0].getCoordinateSequence()):this.getFactory().createMultiLineString(s)},t.prototype.clone=function(){var i=this,s=n.prototype.clone.call(this);s._shell=this._shell.clone(),s._holes=new Array(this._holes.length).fill(null);for(var o=0;o<this._holes.length;o++)s._holes[o]=i._holes[o].clone();return s},t.prototype.getGeometryType=function(){return"Polygon"},t.prototype.copy=function(){for(var i=this,s=this._shell.copy(),o=new Array(this._holes.length).fill(null),a=0;a<o.length;a++)o[a]=i._holes[a].copy();return new t(s,o,this._factory)},t.prototype.getExteriorRing=function(){return this._shell},t.prototype.isEmpty=function(){return this._shell.isEmpty()},t.prototype.getInteriorRingN=function(i){return this._holes[i]},t.prototype.interfaces_=function(){return[ns]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-0x307ffefd8dc97200},Object.defineProperties(t,e),t}(gt),xa=function(n){function t(){n.apply(this,arguments)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return gt.SORTINDEX_MULTIPOINT},t.prototype.isValid=function(){return!0},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?n.prototype.equalsExact.call(this,i,s):!1}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.getCoordinate=function(){if(arguments.length===1){var i=arguments[0];return this._geometries[i].getCoordinate()}else return n.prototype.getCoordinate.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return Vt.FALSE},t.prototype.getDimension=function(){return 0},t.prototype.getBoundary=function(){return this.getFactory().createGeometryCollection(null)},t.prototype.getGeometryType=function(){return"MultiPoint"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new t(s,this._factory)},t.prototype.interfaces_=function(){return[fl]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-8048474874175356e3},Object.defineProperties(t,e),t}(Qe),si=function(n){function t(r,i){r instanceof D&&i instanceof xt&&(r=i.getCoordinateSequenceFactory().create(r)),n.call(this,r,i),this.validateConstruction()}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={MINIMUM_VALID_SIZE:{configurable:!0},serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return gt.SORTINDEX_LINEARRING},t.prototype.getBoundaryDimension=function(){return Vt.FALSE},t.prototype.isClosed=function(){return this.isEmpty()?!0:n.prototype.isClosed.call(this)},t.prototype.reverse=function(){var i=this._points.copy();ge.reverse(i);var s=this.getFactory().createLinearRing(i);return s},t.prototype.validateConstruction=function(){if(!this.isEmpty()&&!n.prototype.isClosed.call(this))throw new ae("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<t.MINIMUM_VALID_SIZE)throw new ae("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")},t.prototype.getGeometryType=function(){return"LinearRing"},t.prototype.copy=function(){return new t(this._points.copy(),this._factory)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.MINIMUM_VALID_SIZE.get=function(){return 4},e.serialVersionUID.get=function(){return-0x3b229e262367a600},Object.defineProperties(t,e),t}(ce),oi=function(n){function t(){n.apply(this,arguments)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={serialVersionUID:{configurable:!0}};return t.prototype.getSortIndex=function(){return gt.SORTINDEX_MULTIPOLYGON},t.prototype.equalsExact=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return this.isEquivalentClass(i)?n.prototype.equalsExact.call(this,i,s):!1}else return n.prototype.equalsExact.apply(this,arguments)},t.prototype.getBoundaryDimension=function(){return 1},t.prototype.getDimension=function(){return 2},t.prototype.reverse=function(){for(var i=this,s=this._geometries.length,o=new Array(s).fill(null),a=0;a<this._geometries.length;a++)o[a]=i._geometries[a].reverse();return this.getFactory().createMultiPolygon(o)},t.prototype.getBoundary=function(){var i=this;if(this.isEmpty())return this.getFactory().createMultiLineString();for(var s=new j,o=0;o<this._geometries.length;o++)for(var a=i._geometries[o],u=a.getBoundary(),l=0;l<u.getNumGeometries();l++)s.add(u.getGeometryN(l));var c=new Array(s.size()).fill(null);return this.getFactory().createMultiLineString(s.toArray(c))},t.prototype.getGeometryType=function(){return"MultiPolygon"},t.prototype.copy=function(){for(var i=this,s=new Array(this._geometries.length).fill(null),o=0;o<s.length;o++)s[o]=i._geometries[o].copy();return new t(s,this._factory)},t.prototype.interfaces_=function(){return[ns]},t.prototype.getClass=function(){return t},e.serialVersionUID.get=function(){return-0x7a5aa1369171980},Object.defineProperties(t,e),t}(Qe),Kr=function(t){this._factory=t||null,this._isUserDataCopied=!1},Nh={NoOpGeometryOperation:{configurable:!0},CoordinateOperation:{configurable:!0},CoordinateSequenceOperation:{configurable:!0}};Kr.prototype.setCopyUserData=function(t){this._isUserDataCopied=t},Kr.prototype.edit=function(t,e){if(t===null)return null;var r=this.editInternal(t,e);return this._isUserDataCopied&&r.setUserData(t.getUserData()),r},Kr.prototype.editInternal=function(t,e){return this._factory===null&&(this._factory=t.getFactory()),t instanceof Qe?this.editGeometryCollection(t,e):t instanceof Ie?this.editPolygon(t,e):t instanceof _r?e.edit(t,this._factory):t instanceof ce?e.edit(t,this._factory):(Pt.shouldNeverReachHere("Unsupported Geometry class: "+t.getClass().getName()),null)},Kr.prototype.editGeometryCollection=function(t,e){for(var r=this,i=e.edit(t,this._factory),s=new j,o=0;o<i.getNumGeometries();o++){var a=r.edit(i.getGeometryN(o),e);a===null||a.isEmpty()||s.add(a)}return i.getClass()===xa?this._factory.createMultiPoint(s.toArray([])):i.getClass()===Fs?this._factory.createMultiLineString(s.toArray([])):i.getClass()===oi?this._factory.createMultiPolygon(s.toArray([])):this._factory.createGeometryCollection(s.toArray([]))},Kr.prototype.editPolygon=function(t,e){var r=this,i=e.edit(t,this._factory);if(i===null&&(i=this._factory.createPolygon(null)),i.isEmpty())return i;var s=this.edit(i.getExteriorRing(),e);if(s===null||s.isEmpty())return this._factory.createPolygon();for(var o=new j,a=0;a<i.getNumInteriorRing();a++){var u=r.edit(i.getInteriorRingN(a),e);u===null||u.isEmpty()||o.add(u)}return this._factory.createPolygon(s,o.toArray([]))},Kr.prototype.interfaces_=function(){return[]},Kr.prototype.getClass=function(){return Kr},Kr.GeometryEditorOperation=function(){},Nh.NoOpGeometryOperation.get=function(){return dl},Nh.CoordinateOperation.get=function(){return gl},Nh.CoordinateSequenceOperation.get=function(){return pl},Object.defineProperties(Kr,Nh);var dl=function(){};dl.prototype.edit=function(t,e){return t},dl.prototype.interfaces_=function(){return[Kr.GeometryEditorOperation]},dl.prototype.getClass=function(){return dl};var gl=function(){};gl.prototype.edit=function(t,e){var r=this.editCoordinates(t.getCoordinates(),t);return r===null?t:t instanceof si?e.createLinearRing(r):t instanceof ce?e.createLineString(r):t instanceof _r?r.length>0?e.createPoint(r[0]):e.createPoint():t},gl.prototype.interfaces_=function(){return[Kr.GeometryEditorOperation]},gl.prototype.getClass=function(){return gl};var pl=function(){};pl.prototype.edit=function(t,e){return t instanceof si?e.createLinearRing(this.edit(t.getCoordinateSequence(),t)):t instanceof ce?e.createLineString(this.edit(t.getCoordinateSequence(),t)):t instanceof _r?e.createPoint(this.edit(t.getCoordinateSequence(),t)):t},pl.prototype.interfaces_=function(){return[Kr.GeometryEditorOperation]},pl.prototype.getClass=function(){return pl};var pe=function(){var t=this;if(this._dimension=3,this._coordinates=null,arguments.length===1){if(arguments[0]instanceof Array)this._coordinates=arguments[0],this._dimension=3;else if(Number.isInteger(arguments[0])){var e=arguments[0];this._coordinates=new Array(e).fill(null);for(var r=0;r<e;r++)t._coordinates[r]=new D}else if(pt(arguments[0],Dt)){var i=arguments[0];if(i===null)return this._coordinates=new Array(0).fill(null),null;this._dimension=i.getDimension(),this._coordinates=new Array(i.size()).fill(null);for(var s=0;s<this._coordinates.length;s++)t._coordinates[s]=i.getCoordinateCopy(s)}}else if(arguments.length===2){if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var o=arguments[0],a=arguments[1];this._coordinates=o,this._dimension=a,o===null&&(this._coordinates=new Array(0).fill(null))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var u=arguments[0],l=arguments[1];this._coordinates=new Array(u).fill(null),this._dimension=l;for(var c=0;c<u;c++)t._coordinates[c]=new D}}},fv={serialVersionUID:{configurable:!0}};pe.prototype.setOrdinate=function(t,e,r){switch(e){case Dt.X:this._coordinates[t].x=r;break;case Dt.Y:this._coordinates[t].y=r;break;case Dt.Z:this._coordinates[t].z=r;break;default:throw new ae("invalid ordinateIndex")}},pe.prototype.size=function(){return this._coordinates.length},pe.prototype.getOrdinate=function(t,e){switch(e){case Dt.X:return this._coordinates[t].x;case Dt.Y:return this._coordinates[t].y;case Dt.Z:return this._coordinates[t].z}return yt.NaN},pe.prototype.getCoordinate=function(){if(arguments.length===1){var t=arguments[0];return this._coordinates[t]}else if(arguments.length===2){var e=arguments[0],r=arguments[1];r.x=this._coordinates[e].x,r.y=this._coordinates[e].y,r.z=this._coordinates[e].z}},pe.prototype.getCoordinateCopy=function(t){return new D(this._coordinates[t])},pe.prototype.getDimension=function(){return this._dimension},pe.prototype.getX=function(t){return this._coordinates[t].x},pe.prototype.clone=function(){for(var t=this,e=new Array(this.size()).fill(null),r=0;r<this._coordinates.length;r++)e[r]=t._coordinates[r].clone();return new pe(e,this._dimension)},pe.prototype.expandEnvelope=function(t){for(var e=this,r=0;r<this._coordinates.length;r++)t.expandToInclude(e._coordinates[r]);return t},pe.prototype.copy=function(){for(var t=this,e=new Array(this.size()).fill(null),r=0;r<this._coordinates.length;r++)e[r]=t._coordinates[r].copy();return new pe(e,this._dimension)},pe.prototype.toString=function(){var t=this;if(this._coordinates.length>0){var e=new In(17*this._coordinates.length);e.append("("),e.append(this._coordinates[0]);for(var r=1;r<this._coordinates.length;r++)e.append(", "),e.append(t._coordinates[r]);return e.append(")"),e.toString()}else return"()"},pe.prototype.getY=function(t){return this._coordinates[t].y},pe.prototype.toCoordinateArray=function(){return this._coordinates},pe.prototype.interfaces_=function(){return[Dt,Jr]},pe.prototype.getClass=function(){return pe},fv.serialVersionUID.get=function(){return-0xcb44a778db18e00},Object.defineProperties(pe,fv);var ai=function(){},Of={serialVersionUID:{configurable:!0},instanceObject:{configurable:!0}};ai.prototype.readResolve=function(){return ai.instance()},ai.prototype.create=function(){if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return new pe(t)}else if(pt(arguments[0],Dt)){var e=arguments[0];return new pe(e)}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];return i>3&&(i=3),i<2?new pe(r):new pe(r,i)}},ai.prototype.interfaces_=function(){return[_a,Jr]},ai.prototype.getClass=function(){return ai},ai.instance=function(){return ai.instanceObject},Of.serialVersionUID.get=function(){return-0x38e49fa6cf6f2e00},Of.instanceObject.get=function(){return new ai},Object.defineProperties(ai,Of);var dv=function(n){function t(){n.call(this),this.map_=new Map}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.get=function(r){return this.map_.get(r)||null},t.prototype.put=function(r,i){return this.map_.set(r,i),i},t.prototype.values=function(){for(var r=new j,i=this.map_.values(),s=i.next();!s.done;)r.add(s.value),s=i.next();return r},t.prototype.entrySet=function(){var r=new xf;return this.map_.entries().forEach(function(i){return r.add(i)}),r},t.prototype.size=function(){return this.map_.size()},t}(wo),Ut=function n(){if(this._modelType=null,this._scale=null,arguments.length===0)this._modelType=n.FLOATING;else if(arguments.length===1){if(arguments[0]instanceof An){var t=arguments[0];this._modelType=t,t===n.FIXED&&this.setScale(1)}else if(typeof arguments[0]=="number"){var e=arguments[0];this._modelType=n.FIXED,this.setScale(e)}else if(arguments[0]instanceof n){var r=arguments[0];this._modelType=r._modelType,this._scale=r._scale}}},Df={serialVersionUID:{configurable:!0},maximumPreciseValue:{configurable:!0}};Ut.prototype.equals=function(t){if(!(t instanceof Ut))return!1;var e=t;return this._modelType===e._modelType&&this._scale===e._scale},Ut.prototype.compareTo=function(t){var e=t,r=this.getMaximumSignificantDigits(),i=e.getMaximumSignificantDigits();return new Mn(r).compareTo(new Mn(i))},Ut.prototype.getScale=function(){return this._scale},Ut.prototype.isFloating=function(){return this._modelType===Ut.FLOATING||this._modelType===Ut.FLOATING_SINGLE},Ut.prototype.getType=function(){return this._modelType},Ut.prototype.toString=function(){var t="UNKNOWN";return this._modelType===Ut.FLOATING?t="Floating":this._modelType===Ut.FLOATING_SINGLE?t="Floating-Single":this._modelType===Ut.FIXED&&(t="Fixed (Scale="+this.getScale()+")"),t},Ut.prototype.makePrecise=function(){if(typeof arguments[0]=="number"){var t=arguments[0];if(yt.isNaN(t))return t;if(this._modelType===Ut.FLOATING_SINGLE){var e=t;return e}return this._modelType===Ut.FIXED?Math.round(t*this._scale)/this._scale:t}else if(arguments[0]instanceof D){var r=arguments[0];if(this._modelType===Ut.FLOATING)return null;r.x=this.makePrecise(r.x),r.y=this.makePrecise(r.y)}},Ut.prototype.getMaximumSignificantDigits=function(){var t=16;return this._modelType===Ut.FLOATING?t=16:this._modelType===Ut.FLOATING_SINGLE?t=6:this._modelType===Ut.FIXED&&(t=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),t},Ut.prototype.setScale=function(t){this._scale=Math.abs(t)},Ut.prototype.interfaces_=function(){return[Jr,Yr]},Ut.prototype.getClass=function(){return Ut},Ut.mostPrecise=function(t,e){return t.compareTo(e)>=0?t:e},Df.serialVersionUID.get=function(){return 7777263578777804e3},Df.maximumPreciseValue.get=function(){return 9007199254740992},Object.defineProperties(Ut,Df);var An=function n(t){this._name=t||null,n.nameToTypeMap.put(t,this)},Lf={serialVersionUID:{configurable:!0},nameToTypeMap:{configurable:!0}};An.prototype.readResolve=function(){return An.nameToTypeMap.get(this._name)},An.prototype.toString=function(){return this._name},An.prototype.interfaces_=function(){return[Jr]},An.prototype.getClass=function(){return An},Lf.serialVersionUID.get=function(){return-552860263173159e4},Lf.nameToTypeMap.get=function(){return new dv},Object.defineProperties(An,Lf),Ut.Type=An,Ut.FIXED=new An("FIXED"),Ut.FLOATING=new An("FLOATING"),Ut.FLOATING_SINGLE=new An("FLOATING SINGLE");var xt=function n(){this._precisionModel=new Ut,this._SRID=0,this._coordinateSequenceFactory=n.getDefaultCoordinateSequenceFactory(),arguments.length===0||(arguments.length===1?pt(arguments[0],_a)?this._coordinateSequenceFactory=arguments[0]:arguments[0]instanceof Ut&&(this._precisionModel=arguments[0]):arguments.length===2?(this._precisionModel=arguments[0],this._SRID=arguments[1]):arguments.length===3&&(this._precisionModel=arguments[0],this._SRID=arguments[1],this._coordinateSequenceFactory=arguments[2]))},gv={serialVersionUID:{configurable:!0}};xt.prototype.toGeometry=function(t){return t.isNull()?this.createPoint(null):t.getMinX()===t.getMaxX()&&t.getMinY()===t.getMaxY()?this.createPoint(new D(t.getMinX(),t.getMinY())):t.getMinX()===t.getMaxX()||t.getMinY()===t.getMaxY()?this.createLineString([new D(t.getMinX(),t.getMinY()),new D(t.getMaxX(),t.getMaxY())]):this.createPolygon(this.createLinearRing([new D(t.getMinX(),t.getMinY()),new D(t.getMinX(),t.getMaxY()),new D(t.getMaxX(),t.getMaxY()),new D(t.getMaxX(),t.getMinY()),new D(t.getMinX(),t.getMinY())]),null)},xt.prototype.createLineString=function(t){if(t){if(t instanceof Array)return new ce(this.getCoordinateSequenceFactory().create(t),this);if(pt(t,Dt))return new ce(t,this)}else return new ce(this.getCoordinateSequenceFactory().create([]),this)},xt.prototype.createMultiLineString=function(){if(arguments.length===0)return new Fs(null,this);if(arguments.length===1){var t=arguments[0];return new Fs(t,this)}},xt.prototype.buildGeometry=function(t){for(var e=null,r=!1,i=!1,s=t.iterator();s.hasNext();){var o=s.next(),a=o.getClass();e===null&&(e=a),a!==e&&(r=!0),o.isGeometryCollectionOrDerived()&&(i=!0)}if(e===null)return this.createGeometryCollection();if(r||i)return this.createGeometryCollection(xt.toGeometryArray(t));var u=t.iterator().next(),l=t.size()>1;if(l){if(u instanceof Ie)return this.createMultiPolygon(xt.toPolygonArray(t));if(u instanceof ce)return this.createMultiLineString(xt.toLineStringArray(t));if(u instanceof _r)return this.createMultiPoint(xt.toPointArray(t));Pt.shouldNeverReachHere("Unhandled class: "+u.getClass().getName())}return u},xt.prototype.createMultiPointFromCoords=function(t){return this.createMultiPoint(t!==null?this.getCoordinateSequenceFactory().create(t):null)},xt.prototype.createPoint=function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof D){var t=arguments[0];return this.createPoint(t!==null?this.getCoordinateSequenceFactory().create([t]):null)}else if(pt(arguments[0],Dt)){var e=arguments[0];return new _r(e,this)}}},xt.prototype.getCoordinateSequenceFactory=function(){return this._coordinateSequenceFactory},xt.prototype.createPolygon=function(){if(arguments.length===0)return new Ie(null,null,this);if(arguments.length===1){if(pt(arguments[0],Dt)){var t=arguments[0];return this.createPolygon(this.createLinearRing(t))}else if(arguments[0]instanceof Array){var e=arguments[0];return this.createPolygon(this.createLinearRing(e))}else if(arguments[0]instanceof si){var r=arguments[0];return this.createPolygon(r,null)}}else if(arguments.length===2){var i=arguments[0],s=arguments[1];return new Ie(i,s,this)}},xt.prototype.getSRID=function(){return this._SRID},xt.prototype.createGeometryCollection=function(){if(arguments.length===0)return new Qe(null,this);if(arguments.length===1){var t=arguments[0];return new Qe(t,this)}},xt.prototype.createGeometry=function(t){var e=new Kr(this);return e.edit(t,{edit:function(){if(arguments.length===2){var r=arguments[0];return this._coordinateSequenceFactory.create(r)}}})},xt.prototype.getPrecisionModel=function(){return this._precisionModel},xt.prototype.createLinearRing=function(){if(arguments.length===0)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var t=arguments[0];return this.createLinearRing(t!==null?this.getCoordinateSequenceFactory().create(t):null)}else if(pt(arguments[0],Dt)){var e=arguments[0];return new si(e,this)}}},xt.prototype.createMultiPolygon=function(){if(arguments.length===0)return new oi(null,this);if(arguments.length===1){var t=arguments[0];return new oi(t,this)}},xt.prototype.createMultiPoint=function(){var t=this;if(arguments.length===0)return new xa(null,this);if(arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];return new xa(e,this)}else if(arguments[0]instanceof Array){var r=arguments[0];return this.createMultiPoint(r!==null?this.getCoordinateSequenceFactory().create(r):null)}else if(pt(arguments[0],Dt)){var i=arguments[0];if(i===null)return this.createMultiPoint(new Array(0).fill(null));for(var s=new Array(i.size()).fill(null),o=0;o<i.size();o++){var a=t.getCoordinateSequenceFactory().create(1,i.getDimension());ge.copy(i,o,a,0,1),s[o]=t.createPoint(a)}return this.createMultiPoint(s)}}},xt.prototype.interfaces_=function(){return[Jr]},xt.prototype.getClass=function(){return xt},xt.toMultiPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},xt.toGeometryArray=function(t){if(t===null)return null;var e=new Array(t.size()).fill(null);return t.toArray(e)},xt.getDefaultCoordinateSequenceFactory=function(){return ai.instance()},xt.toMultiLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},xt.toLineStringArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},xt.toMultiPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},xt.toLinearRingArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},xt.toPointArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},xt.toPolygonArray=function(t){var e=new Array(t.size()).fill(null);return t.toArray(e)},xt.createPointFromInternalCoord=function(t,e){return e.getPrecisionModel().makePrecise(t),e.getFactory().createPoint(t)},gv.serialVersionUID.get=function(){return-6820524753094096e3},Object.defineProperties(xt,gv);var yI=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],xh=function(t){this.geometryFactory=t||new xt};xh.prototype.read=function(t){var e;typeof t=="string"?e=JSON.parse(t):e=t;var r=e.type;if(!On[r])throw new Error("Unknown GeoJSON type: "+e.type);return yI.indexOf(r)!==-1?On[r].apply(this,[e.coordinates]):r==="GeometryCollection"?On[r].apply(this,[e.geometries]):On[r].apply(this,[e])},xh.prototype.write=function(t){var e=t.getGeometryType();if(!Li[e])throw new Error("Geometry is not supported");return Li[e].apply(this,[t])};var On={Feature:function(n){var t={};for(var e in n)t[e]=n[e];if(n.geometry){var r=n.geometry.type;if(!On[r])throw new Error("Unknown GeoJSON type: "+n.type);t.geometry=this.read(n.geometry)}return n.bbox&&(t.bbox=On.bbox.apply(this,[n.bbox])),t},FeatureCollection:function(n){var t=this,e={};if(n.features){e.features=[];for(var r=0;r<n.features.length;++r)e.features.push(t.read(n.features[r]))}return n.bbox&&(e.bbox=this.parse.bbox.apply(this,[n.bbox])),e},coordinates:function(n){for(var t=[],e=0;e<n.length;++e){var r=n[e];t.push(new D(r[0],r[1]))}return t},bbox:function(n){return this.geometryFactory.createLinearRing([new D(n[0],n[1]),new D(n[2],n[1]),new D(n[2],n[3]),new D(n[0],n[3]),new D(n[0],n[1])])},Point:function(n){var t=new D(n[0],n[1]);return this.geometryFactory.createPoint(t)},MultiPoint:function(n){for(var t=this,e=[],r=0;r<n.length;++r)e.push(On.Point.apply(t,[n[r]]));return this.geometryFactory.createMultiPoint(e)},LineString:function(n){var t=On.coordinates.apply(this,[n]);return this.geometryFactory.createLineString(t)},MultiLineString:function(n){for(var t=this,e=[],r=0;r<n.length;++r)e.push(On.LineString.apply(t,[n[r]]));return this.geometryFactory.createMultiLineString(e)},Polygon:function(n){for(var t=this,e=On.coordinates.apply(this,[n[0]]),r=this.geometryFactory.createLinearRing(e),i=[],s=1;s<n.length;++s){var o=n[s],a=On.coordinates.apply(t,[o]),u=t.geometryFactory.createLinearRing(a);i.push(u)}return this.geometryFactory.createPolygon(r,i)},MultiPolygon:function(n){for(var t=this,e=[],r=0;r<n.length;++r){var i=n[r];e.push(On.Polygon.apply(t,[i]))}return this.geometryFactory.createMultiPolygon(e)},GeometryCollection:function(n){for(var t=this,e=[],r=0;r<n.length;++r){var i=n[r];e.push(t.read(i))}return this.geometryFactory.createGeometryCollection(e)}},Li={coordinate:function(n){return[n.x,n.y]},Point:function(n){var t=Li.coordinate.apply(this,[n.getCoordinate()]);return{type:"Point",coordinates:t}},MultiPoint:function(n){for(var t=this,e=[],r=0;r<n._geometries.length;++r){var i=n._geometries[r],s=Li.Point.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiPoint",coordinates:e}},LineString:function(n){for(var t=this,e=[],r=n.getCoordinates(),i=0;i<r.length;++i){var s=r[i];e.push(Li.coordinate.apply(t,[s]))}return{type:"LineString",coordinates:e}},MultiLineString:function(n){for(var t=this,e=[],r=0;r<n._geometries.length;++r){var i=n._geometries[r],s=Li.LineString.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiLineString",coordinates:e}},Polygon:function(n){var t=this,e=[],r=Li.LineString.apply(this,[n._shell]);e.push(r.coordinates);for(var i=0;i<n._holes.length;++i){var s=n._holes[i],o=Li.LineString.apply(t,[s]);e.push(o.coordinates)}return{type:"Polygon",coordinates:e}},MultiPolygon:function(n){for(var t=this,e=[],r=0;r<n._geometries.length;++r){var i=n._geometries[r],s=Li.Polygon.apply(t,[i]);e.push(s.coordinates)}return{type:"MultiPolygon",coordinates:e}},GeometryCollection:function(n){for(var t=this,e=[],r=0;r<n._geometries.length;++r){var i=n._geometries[r],s=i.getGeometryType();e.push(Li[s].apply(t,[i]))}return{type:"GeometryCollection",geometries:e}}},Rf=function(t){this.geometryFactory=t||new xt,this.precisionModel=this.geometryFactory.getPrecisionModel(),this.parser=new xh(this.geometryFactory)};Rf.prototype.read=function(t){var e=this.parser.read(t);return this.precisionModel.getType()===Ut.FIXED&&this.reducePrecision(e),e},Rf.prototype.reducePrecision=function(t){var e=this,r,i;if(t.coordinate)this.precisionModel.makePrecise(t.coordinate);else if(t.points)for(r=0,i=t.points.length;r<i;r++)e.precisionModel.makePrecise(t.points[r]);else if(t.geometries)for(r=0,i=t.geometries.length;r<i;r++)e.reducePrecision(t.geometries[r])};var pv=function(){this.parser=new xh(this.geometryFactory)};pv.prototype.write=function(t){return this.parser.write(t)};var B=function(){},Th={ON:{configurable:!0},LEFT:{configurable:!0},RIGHT:{configurable:!0}};B.prototype.interfaces_=function(){return[]},B.prototype.getClass=function(){return B},B.opposite=function(t){return t===B.LEFT?B.RIGHT:t===B.RIGHT?B.LEFT:t},Th.ON.get=function(){return 0},Th.LEFT.get=function(){return 1},Th.RIGHT.get=function(){return 2},Object.defineProperties(B,Th);function Ah(n){this.message=n||""}Ah.prototype=new Error,Ah.prototype.name="EmptyStackException";function Dn(){this.array_=[]}Dn.prototype=new hn,Dn.prototype.add=function(n){return this.array_.push(n),!0},Dn.prototype.get=function(n){if(n<0||n>=this.size())throw new Error;return this.array_[n]},Dn.prototype.push=function(n){return this.array_.push(n),n},Dn.prototype.pop=function(n){if(this.array_.length===0)throw new Ah;return this.array_.pop()},Dn.prototype.peek=function(){if(this.array_.length===0)throw new Ah;return this.array_[this.array_.length-1]},Dn.prototype.empty=function(){return this.array_.length===0},Dn.prototype.isEmpty=function(){return this.empty()},Dn.prototype.search=function(n){return this.array_.indexOf(n)},Dn.prototype.size=function(){return this.array_.length},Dn.prototype.toArray=function(){for(var n=this,t=[],e=0,r=this.array_.length;e<r;e++)t.push(n.array_[e]);return t};var Ln=function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null};Ln.prototype.getCoordinate=function(){return this._minCoord},Ln.prototype.getRightmostSide=function(t,e){var r=this.getRightmostSideOfSegment(t,e);return r<0&&(r=this.getRightmostSideOfSegment(t,e-1)),r<0&&(this._minCoord=null,this.checkForRightmostCoordinate(t)),r},Ln.prototype.findRightmostEdgeAtVertex=function(){var t=this._minDe.getEdge().getCoordinates();Pt.isTrue(this._minIndex>0&&this._minIndex<t.length,"rightmost point expected to be interior vertex of edge");var e=t[this._minIndex-1],r=t[this._minIndex+1],i=K.computeOrientation(this._minCoord,r,e),s=!1;(e.y<this._minCoord.y&&r.y<this._minCoord.y&&i===K.COUNTERCLOCKWISE||e.y>this._minCoord.y&&r.y>this._minCoord.y&&i===K.CLOCKWISE)&&(s=!0),s&&(this._minIndex=this._minIndex-1)},Ln.prototype.getRightmostSideOfSegment=function(t,e){var r=t.getEdge(),i=r.getCoordinates();if(e<0||e+1>=i.length||i[e].y===i[e+1].y)return-1;var s=B.LEFT;return i[e].y<i[e+1].y&&(s=B.RIGHT),s},Ln.prototype.getEdge=function(){return this._orientedDe},Ln.prototype.checkForRightmostCoordinate=function(t){for(var e=this,r=t.getEdge().getCoordinates(),i=0;i<r.length-1;i++)(e._minCoord===null||r[i].x>e._minCoord.x)&&(e._minDe=t,e._minIndex=i,e._minCoord=r[i])},Ln.prototype.findRightmostEdgeAtNode=function(){var t=this._minDe.getNode(),e=t.getEdges();this._minDe=e.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)},Ln.prototype.findEdge=function(t){for(var e=this,r=t.iterator();r.hasNext();){var i=r.next();i.isForward()&&e.checkForRightmostCoordinate(i)}Pt.isTrue(this._minIndex!==0||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),this._minIndex===0?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe;var s=this.getRightmostSide(this._minDe,this._minIndex);s===B.LEFT&&(this._orientedDe=this._minDe.getSym())},Ln.prototype.interfaces_=function(){return[]},Ln.prototype.getClass=function(){return Ln};var Ri=function(n){function t(e,r){n.call(this,t.msgWithCoord(e,r)),this.pt=r?new D(r):null,this.name="TopologyException"}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getCoordinate=function(){return this.pt},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.msgWithCoord=function(r,i){return i?r:r+" [ "+i+" ]"},t}(xi),Oh=function(){this.array_=[]};Oh.prototype.addLast=function(t){this.array_.push(t)},Oh.prototype.removeFirst=function(){return this.array_.shift()},Oh.prototype.isEmpty=function(){return this.array_.length===0};var $e=function(){this._finder=null,this._dirEdgeList=new j,this._nodes=new j,this._rightMostCoord=null,this._env=null,this._finder=new Ln};$e.prototype.clearVisitedEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.setVisited(!1)}},$e.prototype.getRightmostCoordinate=function(){return this._rightMostCoord},$e.prototype.computeNodeDepth=function(t){for(var e=this,r=null,i=t.getEdges().iterator();i.hasNext();){var s=i.next();if(s.isVisited()||s.getSym().isVisited()){r=s;break}}if(r===null)throw new Ri("unable to find edge to compute depths at "+t.getCoordinate());t.getEdges().computeDepths(r);for(var o=t.getEdges().iterator();o.hasNext();){var a=o.next();a.setVisited(!0),e.copySymDepths(a)}},$e.prototype.computeDepth=function(t){this.clearVisitedEdges();var e=this._finder.getEdge();e.setEdgeDepths(B.RIGHT,t),this.copySymDepths(e),this.computeDepths(e)},$e.prototype.create=function(t){this.addReachable(t),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()},$e.prototype.findResultEdges=function(){for(var t=this._dirEdgeList.iterator();t.hasNext();){var e=t.next();e.getDepth(B.RIGHT)>=1&&e.getDepth(B.LEFT)<=0&&!e.isInteriorAreaEdge()&&e.setInResult(!0)}},$e.prototype.computeDepths=function(t){var e=this,r=new xf,i=new Oh,s=t.getNode();for(i.addLast(s),r.add(s),t.setVisited(!0);!i.isEmpty();){var o=i.removeFirst();r.add(o),e.computeNodeDepth(o);for(var a=o.getEdges().iterator();a.hasNext();){var u=a.next(),l=u.getSym();if(!l.isVisited()){var c=l.getNode();r.contains(c)||(i.addLast(c),r.add(c))}}}},$e.prototype.compareTo=function(t){var e=t;return this._rightMostCoord.x<e._rightMostCoord.x?-1:this._rightMostCoord.x>e._rightMostCoord.x?1:0},$e.prototype.getEnvelope=function(){if(this._env===null){for(var t=new at,e=this._dirEdgeList.iterator();e.hasNext();)for(var r=e.next(),i=r.getEdge().getCoordinates(),s=0;s<i.length-1;s++)t.expandToInclude(i[s]);this._env=t}return this._env},$e.prototype.addReachable=function(t){var e=this,r=new Dn;for(r.add(t);!r.empty();){var i=r.pop();e.add(i,r)}},$e.prototype.copySymDepths=function(t){var e=t.getSym();e.setDepth(B.LEFT,t.getDepth(B.RIGHT)),e.setDepth(B.RIGHT,t.getDepth(B.LEFT))},$e.prototype.add=function(t,e){var r=this;t.setVisited(!0),this._nodes.add(t);for(var i=t.getEdges().iterator();i.hasNext();){var s=i.next();r._dirEdgeList.add(s);var o=s.getSym(),a=o.getNode();a.isVisited()||e.push(a)}},$e.prototype.getNodes=function(){return this._nodes},$e.prototype.getDirectedEdges=function(){return this._dirEdgeList},$e.prototype.interfaces_=function(){return[Yr]},$e.prototype.getClass=function(){return $e};var te=function n(){var t=this;if(this.location=null,arguments.length===1){if(arguments[0]instanceof Array){var e=arguments[0];this.init(e.length)}else if(Number.isInteger(arguments[0])){var r=arguments[0];this.init(1),this.location[B.ON]=r}else if(arguments[0]instanceof n){var i=arguments[0];if(this.init(i.location.length),i!==null)for(var s=0;s<this.location.length;s++)t.location[s]=i.location[s]}}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2];this.init(3),this.location[B.ON]=o,this.location[B.LEFT]=a,this.location[B.RIGHT]=u}};te.prototype.setAllLocations=function(t){for(var e=this,r=0;r<this.location.length;r++)e.location[r]=t},te.prototype.isNull=function(){for(var t=this,e=0;e<this.location.length;e++)if(t.location[e]!==F.NONE)return!1;return!0},te.prototype.setAllLocationsIfNull=function(t){for(var e=this,r=0;r<this.location.length;r++)e.location[r]===F.NONE&&(e.location[r]=t)},te.prototype.isLine=function(){return this.location.length===1},te.prototype.merge=function(t){var e=this;if(t.location.length>this.location.length){var r=new Array(3).fill(null);r[B.ON]=this.location[B.ON],r[B.LEFT]=F.NONE,r[B.RIGHT]=F.NONE,this.location=r}for(var i=0;i<this.location.length;i++)e.location[i]===F.NONE&&i<t.location.length&&(e.location[i]=t.location[i])},te.prototype.getLocations=function(){return this.location},te.prototype.flip=function(){if(this.location.length<=1)return null;var t=this.location[B.LEFT];this.location[B.LEFT]=this.location[B.RIGHT],this.location[B.RIGHT]=t},te.prototype.toString=function(){var t=new In;return this.location.length>1&&t.append(F.toLocationSymbol(this.location[B.LEFT])),t.append(F.toLocationSymbol(this.location[B.ON])),this.location.length>1&&t.append(F.toLocationSymbol(this.location[B.RIGHT])),t.toString()},te.prototype.setLocations=function(t,e,r){this.location[B.ON]=t,this.location[B.LEFT]=e,this.location[B.RIGHT]=r},te.prototype.get=function(t){return t<this.location.length?this.location[t]:F.NONE},te.prototype.isArea=function(){return this.location.length>1},te.prototype.isAnyNull=function(){for(var t=this,e=0;e<this.location.length;e++)if(t.location[e]===F.NONE)return!0;return!1},te.prototype.setLocation=function(){if(arguments.length===1){var t=arguments[0];this.setLocation(B.ON,t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this.location[e]=r}},te.prototype.init=function(t){this.location=new Array(t).fill(null),this.setAllLocations(F.NONE)},te.prototype.isEqualOnSide=function(t,e){return this.location[e]===t.location[e]},te.prototype.allPositionsEqual=function(t){for(var e=this,r=0;r<this.location.length;r++)if(e.location[r]!==t)return!1;return!0},te.prototype.interfaces_=function(){return[]},te.prototype.getClass=function(){return te};var Yt=function n(){if(this.elt=new Array(2).fill(null),arguments.length===1){if(Number.isInteger(arguments[0])){var t=arguments[0];this.elt[0]=new te(t),this.elt[1]=new te(t)}else if(arguments[0]instanceof n){var e=arguments[0];this.elt[0]=new te(e.elt[0]),this.elt[1]=new te(e.elt[1])}}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.elt[0]=new te(F.NONE),this.elt[1]=new te(F.NONE),this.elt[r].setLocation(i)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];this.elt[0]=new te(s,o,a),this.elt[1]=new te(s,o,a)}else if(arguments.length===4){var u=arguments[0],l=arguments[1],c=arguments[2],h=arguments[3];this.elt[0]=new te(F.NONE,F.NONE,F.NONE),this.elt[1]=new te(F.NONE,F.NONE,F.NONE),this.elt[u].setLocations(l,c,h)}};Yt.prototype.getGeometryCount=function(){var t=0;return this.elt[0].isNull()||t++,this.elt[1].isNull()||t++,t},Yt.prototype.setAllLocations=function(t,e){this.elt[t].setAllLocations(e)},Yt.prototype.isNull=function(t){return this.elt[t].isNull()},Yt.prototype.setAllLocationsIfNull=function(){if(arguments.length===1){var t=arguments[0];this.setAllLocationsIfNull(0,t),this.setAllLocationsIfNull(1,t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this.elt[e].setAllLocationsIfNull(r)}},Yt.prototype.isLine=function(t){return this.elt[t].isLine()},Yt.prototype.merge=function(t){for(var e=this,r=0;r<2;r++)e.elt[r]===null&&t.elt[r]!==null?e.elt[r]=new te(t.elt[r]):e.elt[r].merge(t.elt[r])},Yt.prototype.flip=function(){this.elt[0].flip(),this.elt[1].flip()},Yt.prototype.getLocation=function(){if(arguments.length===1){var t=arguments[0];return this.elt[t].get(B.ON)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return this.elt[e].get(r)}},Yt.prototype.toString=function(){var t=new In;return this.elt[0]!==null&&(t.append("A:"),t.append(this.elt[0].toString())),this.elt[1]!==null&&(t.append(" B:"),t.append(this.elt[1].toString())),t.toString()},Yt.prototype.isArea=function(){if(arguments.length===0)return this.elt[0].isArea()||this.elt[1].isArea();if(arguments.length===1){var t=arguments[0];return this.elt[t].isArea()}},Yt.prototype.isAnyNull=function(t){return this.elt[t].isAnyNull()},Yt.prototype.setLocation=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.elt[t].setLocation(B.ON,e)}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this.elt[r].setLocation(i,s)}},Yt.prototype.isEqualOnSide=function(t,e){return this.elt[0].isEqualOnSide(t.elt[0],e)&&this.elt[1].isEqualOnSide(t.elt[1],e)},Yt.prototype.allPositionsEqual=function(t,e){return this.elt[t].allPositionsEqual(e)},Yt.prototype.toLine=function(t){this.elt[t].isArea()&&(this.elt[t]=new te(this.elt[t].location[0]))},Yt.prototype.interfaces_=function(){return[]},Yt.prototype.getClass=function(){return Yt},Yt.toLineLabel=function(t){for(var e=new Yt(F.NONE),r=0;r<2;r++)e.setLocation(r,t.getLocation(r));return e};var _e=function(){this._startDe=null,this._maxNodeDegree=-1,this._edges=new j,this._pts=new j,this._label=new Yt(F.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new j,this._geometryFactory=null;var t=arguments[0],e=arguments[1];this._geometryFactory=e,this.computePoints(t),this.computeRing()};_e.prototype.computeRing=function(){var t=this;if(this._ring!==null)return null;for(var e=new Array(this._pts.size()).fill(null),r=0;r<this._pts.size();r++)e[r]=t._pts.get(r);this._ring=this._geometryFactory.createLinearRing(e),this._isHole=K.isCCW(this._ring.getCoordinates())},_e.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},_e.prototype.computePoints=function(t){var e=this;this._startDe=t;var r=t,i=!0;do{if(r===null)throw new Ri("Found null DirectedEdge");if(r.getEdgeRing()===e)throw new Ri("Directed Edge visited twice during ring-building at "+r.getCoordinate());e._edges.add(r);var s=r.getLabel();Pt.isTrue(s.isArea()),e.mergeLabel(s),e.addPoints(r.getEdge(),r.isForward(),i),i=!1,e.setEdgeRing(r,e),r=e.getNext(r)}while(r!==this._startDe)},_e.prototype.getLinearRing=function(){return this._ring},_e.prototype.getCoordinate=function(t){return this._pts.get(t)},_e.prototype.computeMaxNodeDegree=function(){var t=this;this._maxNodeDegree=0;var e=this._startDe;do{var r=e.getNode(),i=r.getEdges().getOutgoingDegree(t);i>t._maxNodeDegree&&(t._maxNodeDegree=i),e=t.getNext(e)}while(e!==this._startDe);this._maxNodeDegree*=2},_e.prototype.addPoints=function(t,e,r){var i=this,s=t.getCoordinates();if(e){var o=1;r&&(o=0);for(var a=o;a<s.length;a++)i._pts.add(s[a])}else{var u=s.length-2;r&&(u=s.length-1);for(var l=u;l>=0;l--)i._pts.add(s[l])}},_e.prototype.isHole=function(){return this._isHole},_e.prototype.setInResult=function(){var t=this._startDe;do t.getEdge().setInResult(!0),t=t.getNext();while(t!==this._startDe)},_e.prototype.containsPoint=function(t){var e=this.getLinearRing(),r=e.getEnvelopeInternal();if(!r.contains(t)||!K.isPointInRing(t,e.getCoordinates()))return!1;for(var i=this._holes.iterator();i.hasNext();){var s=i.next();if(s.containsPoint(t))return!1}return!0},_e.prototype.addHole=function(t){this._holes.add(t)},_e.prototype.isShell=function(){return this._shell===null},_e.prototype.getLabel=function(){return this._label},_e.prototype.getEdges=function(){return this._edges},_e.prototype.getMaxNodeDegree=function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree},_e.prototype.getShell=function(){return this._shell},_e.prototype.mergeLabel=function(){if(arguments.length===1){var t=arguments[0];this.mergeLabel(t,0),this.mergeLabel(t,1)}else if(arguments.length===2){var e=arguments[0],r=arguments[1],i=e.getLocation(r,B.RIGHT);if(i===F.NONE)return null;if(this._label.getLocation(r)===F.NONE)return this._label.setLocation(r,i),null}},_e.prototype.setShell=function(t){this._shell=t,t!==null&&t.addHole(this)},_e.prototype.toPolygon=function(t){for(var e=this,r=new Array(this._holes.size()).fill(null),i=0;i<this._holes.size();i++)r[i]=e._holes.get(i).getLinearRing();var s=t.createPolygon(this.getLinearRing(),r);return s},_e.prototype.interfaces_=function(){return[]},_e.prototype.getClass=function(){return _e};var _I=function(n){function t(){var e=arguments[0],r=arguments[1];n.call(this,e,r)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.setEdgeRing=function(r,i){r.setMinEdgeRing(i)},t.prototype.getNext=function(r){return r.getNextMin()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(_e),wI=function(n){function t(){var e=arguments[0],r=arguments[1];n.call(this,e,r)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.buildMinimalRings=function(){var r=this,i=new j,s=this._startDe;do{if(s.getMinEdgeRing()===null){var o=new _I(s,r._geometryFactory);i.add(o)}s=s.getNext()}while(s!==this._startDe);return i},t.prototype.setEdgeRing=function(r,i){r.setEdgeRing(i)},t.prototype.linkDirectedEdgesForMinimalEdgeRings=function(){var r=this,i=this._startDe;do{var s=i.getNode();s.getEdges().linkMinimalDirectedEdges(r),i=i.getNext()}while(i!==this._startDe)},t.prototype.getNext=function(r){return r.getNext()},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(_e),Rr=function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this._label=t}}};Rr.prototype.setVisited=function(t){this._isVisited=t},Rr.prototype.setInResult=function(t){this._isInResult=t},Rr.prototype.isCovered=function(){return this._isCovered},Rr.prototype.isCoveredSet=function(){return this._isCoveredSet},Rr.prototype.setLabel=function(t){this._label=t},Rr.prototype.getLabel=function(){return this._label},Rr.prototype.setCovered=function(t){this._isCovered=t,this._isCoveredSet=!0},Rr.prototype.updateIM=function(t){Pt.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(t)},Rr.prototype.isInResult=function(){return this._isInResult},Rr.prototype.isVisited=function(){return this._isVisited},Rr.prototype.interfaces_=function(){return[]},Rr.prototype.getClass=function(){return Rr};var Dh=function(n){function t(){n.call(this),this._coord=null,this._edges=null;var e=arguments[0],r=arguments[1];this._coord=e,this._edges=r,this._label=new Yt(0,F.NONE)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.isIncidentEdgeInResult=function(){for(var r=this.getEdges().getEdges().iterator();r.hasNext();){var i=r.next();if(i.getEdge().isInResult())return!0}return!1},t.prototype.isIsolated=function(){return this._label.getGeometryCount()===1},t.prototype.getCoordinate=function(){return this._coord},t.prototype.print=function(r){r.println("node "+this._coord+" lbl: "+this._label)},t.prototype.computeIM=function(r){},t.prototype.computeMergedLocation=function(r,i){var s=F.NONE;if(s=this._label.getLocation(i),!r.isNull(i)){var o=r.getLocation(i);s!==F.BOUNDARY&&(s=o)}return s},t.prototype.setLabel=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];this._label===null?this._label=new Yt(r,i):this._label.setLocation(r,i)}else return n.prototype.setLabel.apply(this,arguments)},t.prototype.getEdges=function(){return this._edges},t.prototype.mergeLabel=function(){var r=this;if(arguments[0]instanceof t){var i=arguments[0];this.mergeLabel(i._label)}else if(arguments[0]instanceof Yt)for(var s=arguments[0],o=0;o<2;o++){var a=r.computeMergedLocation(s,o),u=r._label.getLocation(o);u===F.NONE&&r._label.setLocation(o,a)}},t.prototype.add=function(r){this._edges.insert(r),r.setNode(this)},t.prototype.setLabelBoundary=function(r){if(this._label===null)return null;var i=F.NONE;this._label!==null&&(i=this._label.getLocation(r));var s=null;switch(i){case F.BOUNDARY:s=F.INTERIOR;break;case F.INTERIOR:s=F.BOUNDARY;break;default:s=F.BOUNDARY;break}this._label.setLocation(r,s)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Rr),Rn=function(){this.nodeMap=new He,this.nodeFact=null;var t=arguments[0];this.nodeFact=t};Rn.prototype.find=function(t){return this.nodeMap.get(t)},Rn.prototype.addNode=function(){if(arguments[0]instanceof D){var t=arguments[0],e=this.nodeMap.get(t);return e===null&&(e=this.nodeFact.createNode(t),this.nodeMap.put(t,e)),e}else if(arguments[0]instanceof Dh){var r=arguments[0],i=this.nodeMap.get(r.getCoordinate());return i===null?(this.nodeMap.put(r.getCoordinate(),r),r):(i.mergeLabel(r),i)}},Rn.prototype.print=function(t){for(var e=this.iterator();e.hasNext();){var r=e.next();r.print(t)}},Rn.prototype.iterator=function(){return this.nodeMap.values().iterator()},Rn.prototype.values=function(){return this.nodeMap.values()},Rn.prototype.getBoundaryNodes=function(t){for(var e=new j,r=this.iterator();r.hasNext();){var i=r.next();i.getLabel().getLocation(t)===F.BOUNDARY&&e.add(i)}return e},Rn.prototype.add=function(t){var e=t.getCoordinate(),r=this.addNode(e);r.add(t)},Rn.prototype.interfaces_=function(){return[]},Rn.prototype.getClass=function(){return Rn};var Jt=function(){},vl={NE:{configurable:!0},NW:{configurable:!0},SW:{configurable:!0},SE:{configurable:!0}};Jt.prototype.interfaces_=function(){return[]},Jt.prototype.getClass=function(){return Jt},Jt.isNorthern=function(t){return t===Jt.NE||t===Jt.NW},Jt.isOpposite=function(t,e){if(t===e)return!1;var r=(t-e+4)%4;return r===2},Jt.commonHalfPlane=function(t,e){if(t===e)return t;var r=(t-e+4)%4;if(r===2)return-1;var i=t<e?t:e,s=t>e?t:e;return i===0&&s===3?3:i},Jt.isInHalfPlane=function(t,e){return e===Jt.SE?t===Jt.SE||t===Jt.SW:t===e||t===e+1},Jt.quadrant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new ae("Cannot compute the quadrant for point ( "+t+", "+e+" )");return t>=0?e>=0?Jt.NE:Jt.SE:e>=0?Jt.NW:Jt.SW}else if(arguments[0]instanceof D&&arguments[1]instanceof D){var r=arguments[0],i=arguments[1];if(i.x===r.x&&i.y===r.y)throw new ae("Cannot compute the quadrant for two identical points "+r);return i.x>=r.x?i.y>=r.y?Jt.NE:Jt.SE:i.y>=r.y?Jt.NW:Jt.SW}},vl.NE.get=function(){return 0},vl.NW.get=function(){return 1},vl.SW.get=function(){return 2},vl.SE.get=function(){return 3},Object.defineProperties(Jt,vl);var Xe=function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,arguments.length===1){var t=arguments[0];this._edge=t}else if(arguments.length===3){var e=arguments[0],r=arguments[1],i=arguments[2],s=null;this._edge=e,this.init(r,i),this._label=s}else if(arguments.length===4){var o=arguments[0],a=arguments[1],u=arguments[2],l=arguments[3];this._edge=o,this.init(a,u),this._label=l}};Xe.prototype.compareDirection=function(t){return this._dx===t._dx&&this._dy===t._dy?0:this._quadrant>t._quadrant?1:this._quadrant<t._quadrant?-1:K.computeOrientation(t._p0,t._p1,this._p1)},Xe.prototype.getDy=function(){return this._dy},Xe.prototype.getCoordinate=function(){return this._p0},Xe.prototype.setNode=function(t){this._node=t},Xe.prototype.print=function(t){var e=Math.atan2(this._dy,this._dx),r=this.getClass().getName(),i=r.lastIndexOf("."),s=r.substring(i+1);t.print(" "+s+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+e+" "+this._label)},Xe.prototype.compareTo=function(t){var e=t;return this.compareDirection(e)},Xe.prototype.getDirectedCoordinate=function(){return this._p1},Xe.prototype.getDx=function(){return this._dx},Xe.prototype.getLabel=function(){return this._label},Xe.prototype.getEdge=function(){return this._edge},Xe.prototype.getQuadrant=function(){return this._quadrant},Xe.prototype.getNode=function(){return this._node},Xe.prototype.toString=function(){var t=Math.atan2(this._dy,this._dx),e=this.getClass().getName(),r=e.lastIndexOf("."),i=e.substring(r+1);return" "+i+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+t+" "+this._label},Xe.prototype.computeLabel=function(t){},Xe.prototype.init=function(t,e){this._p0=t,this._p1=e,this._dx=e.x-t.x,this._dy=e.y-t.y,this._quadrant=Jt.quadrant(this._dx,this._dy),Pt.isTrue(!(this._dx===0&&this._dy===0),"EdgeEnd with identical endpoints found")},Xe.prototype.interfaces_=function(){return[Yr]},Xe.prototype.getClass=function(){return Xe};var Ff=function(n){function t(){var e=arguments[0],r=arguments[1];if(n.call(this,e),this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999],this._isForward=r,r)this.init(e.getCoordinate(0),e.getCoordinate(1));else{var i=e.getNumPoints()-1;this.init(e.getCoordinate(i),e.getCoordinate(i-1))}this.computeDirectedLabel()}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getNextMin=function(){return this._nextMin},t.prototype.getDepth=function(r){return this._depth[r]},t.prototype.setVisited=function(r){this._isVisited=r},t.prototype.computeDirectedLabel=function(){this._label=new Yt(this._edge.getLabel()),this._isForward||this._label.flip()},t.prototype.getNext=function(){return this._next},t.prototype.setDepth=function(r,i){if(this._depth[r]!==-999&&this._depth[r]!==i)throw new Ri("assigned depths do not match",this.getCoordinate());this._depth[r]=i},t.prototype.isInteriorAreaEdge=function(){for(var r=this,i=!0,s=0;s<2;s++)r._label.isArea(s)&&r._label.getLocation(s,B.LEFT)===F.INTERIOR&&r._label.getLocation(s,B.RIGHT)===F.INTERIOR||(i=!1);return i},t.prototype.setNextMin=function(r){this._nextMin=r},t.prototype.print=function(r){n.prototype.print.call(this,r),r.print(" "+this._depth[B.LEFT]+"/"+this._depth[B.RIGHT]),r.print(" ("+this.getDepthDelta()+")"),this._isInResult&&r.print(" inResult")},t.prototype.setMinEdgeRing=function(r){this._minEdgeRing=r},t.prototype.isLineEdge=function(){var r=this._label.isLine(0)||this._label.isLine(1),i=!this._label.isArea(0)||this._label.allPositionsEqual(0,F.EXTERIOR),s=!this._label.isArea(1)||this._label.allPositionsEqual(1,F.EXTERIOR);return r&&i&&s},t.prototype.setEdgeRing=function(r){this._edgeRing=r},t.prototype.getMinEdgeRing=function(){return this._minEdgeRing},t.prototype.getDepthDelta=function(){var r=this._edge.getDepthDelta();return this._isForward||(r=-r),r},t.prototype.setInResult=function(r){this._isInResult=r},t.prototype.getSym=function(){return this._sym},t.prototype.isForward=function(){return this._isForward},t.prototype.getEdge=function(){return this._edge},t.prototype.printEdge=function(r){this.print(r),r.print(" "),this._isForward?this._edge.print(r):this._edge.printReverse(r)},t.prototype.setSym=function(r){this._sym=r},t.prototype.setVisitedEdge=function(r){this.setVisited(r),this._sym.setVisited(r)},t.prototype.setEdgeDepths=function(r,i){var s=this.getEdge().getDepthDelta();this._isForward||(s=-s);var o=1;r===B.LEFT&&(o=-1);var a=B.opposite(r),u=s*o,l=i+u;this.setDepth(r,i),this.setDepth(a,l)},t.prototype.getEdgeRing=function(){return this._edgeRing},t.prototype.isInResult=function(){return this._isInResult},t.prototype.setNext=function(r){this._next=r},t.prototype.isVisited=function(){return this._isVisited},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.depthFactor=function(r,i){return r===F.EXTERIOR&&i===F.INTERIOR?1:r===F.INTERIOR&&i===F.EXTERIOR?-1:0},t}(Xe),Ta=function(){};Ta.prototype.createNode=function(t){return new Dh(t,null)},Ta.prototype.interfaces_=function(){return[]},Ta.prototype.getClass=function(){return Ta};var he=function(){if(this._edges=new j,this._nodes=null,this._edgeEndList=new j,arguments.length===0)this._nodes=new Rn(new Ta);else if(arguments.length===1){var t=arguments[0];this._nodes=new Rn(t)}};he.prototype.printEdges=function(t){var e=this;t.println("Edges:");for(var r=0;r<this._edges.size();r++){t.println("edge "+r+":");var i=e._edges.get(r);i.print(t),i.eiList.print(t)}},he.prototype.find=function(t){return this._nodes.find(t)},he.prototype.addNode=function(){if(arguments[0]instanceof Dh){var t=arguments[0];return this._nodes.addNode(t)}else if(arguments[0]instanceof D){var e=arguments[0];return this._nodes.addNode(e)}},he.prototype.getNodeIterator=function(){return this._nodes.iterator()},he.prototype.linkResultDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){var e=t.next();e.getEdges().linkResultDirectedEdges()}},he.prototype.debugPrintln=function(t){Le.out.println(t)},he.prototype.isBoundaryNode=function(t,e){var r=this._nodes.find(e);if(r===null)return!1;var i=r.getLabel();return i!==null&&i.getLocation(t)===F.BOUNDARY},he.prototype.linkAllDirectedEdges=function(){for(var t=this._nodes.iterator();t.hasNext();){var e=t.next();e.getEdges().linkAllDirectedEdges()}},he.prototype.matchInSameDirection=function(t,e,r,i){return t.equals(r)?K.computeOrientation(t,e,i)===K.COLLINEAR&&Jt.quadrant(t,e)===Jt.quadrant(r,i):!1},he.prototype.getEdgeEnds=function(){return this._edgeEndList},he.prototype.debugPrint=function(t){Le.out.print(t)},he.prototype.getEdgeIterator=function(){return this._edges.iterator()},he.prototype.findEdgeInSameDirection=function(t,e){for(var r=this,i=0;i<this._edges.size();i++){var s=r._edges.get(i),o=s.getCoordinates();if(r.matchInSameDirection(t,e,o[0],o[1])||r.matchInSameDirection(t,e,o[o.length-1],o[o.length-2]))return s}return null},he.prototype.insertEdge=function(t){this._edges.add(t)},he.prototype.findEdgeEnd=function(t){for(var e=this.getEdgeEnds().iterator();e.hasNext();){var r=e.next();if(r.getEdge()===t)return r}return null},he.prototype.addEdges=function(t){for(var e=this,r=t.iterator();r.hasNext();){var i=r.next();e._edges.add(i);var s=new Ff(i,!0),o=new Ff(i,!1);s.setSym(o),o.setSym(s),e.add(s),e.add(o)}},he.prototype.add=function(t){this._nodes.add(t),this._edgeEndList.add(t)},he.prototype.getNodes=function(){return this._nodes.values()},he.prototype.findEdge=function(t,e){for(var r=this,i=0;i<this._edges.size();i++){var s=r._edges.get(i),o=s.getCoordinates();if(t.equals(o[0])&&e.equals(o[1]))return s}return null},he.prototype.interfaces_=function(){return[]},he.prototype.getClass=function(){return he},he.linkResultDirectedEdges=function(t){for(var e=t.iterator();e.hasNext();){var r=e.next();r.getEdges().linkResultDirectedEdges()}};var wr=function(){this._geometryFactory=null,this._shellList=new j;var t=arguments[0];this._geometryFactory=t};wr.prototype.sortShellsAndHoles=function(t,e,r){for(var i=t.iterator();i.hasNext();){var s=i.next();s.isHole()?r.add(s):e.add(s)}},wr.prototype.computePolygons=function(t){for(var e=this,r=new j,i=t.iterator();i.hasNext();){var s=i.next(),o=s.toPolygon(e._geometryFactory);r.add(o)}return r},wr.prototype.placeFreeHoles=function(t,e){for(var r=this,i=e.iterator();i.hasNext();){var s=i.next();if(s.getShell()===null){var o=r.findEdgeRingContaining(s,t);if(o===null)throw new Ri("unable to assign hole to a shell",s.getCoordinate(0));s.setShell(o)}}},wr.prototype.buildMinimalEdgeRings=function(t,e,r){for(var i=this,s=new j,o=t.iterator();o.hasNext();){var a=o.next();if(a.getMaxNodeDegree()>2){a.linkDirectedEdgesForMinimalEdgeRings();var u=a.buildMinimalRings(),l=i.findShell(u);l!==null?(i.placePolygonHoles(l,u),e.add(l)):r.addAll(u)}else s.add(a)}return s},wr.prototype.containsPoint=function(t){for(var e=this._shellList.iterator();e.hasNext();){var r=e.next();if(r.containsPoint(t))return!0}return!1},wr.prototype.buildMaximalEdgeRings=function(t){for(var e=this,r=new j,i=t.iterator();i.hasNext();){var s=i.next();if(s.isInResult()&&s.getLabel().isArea()&&s.getEdgeRing()===null){var o=new wI(s,e._geometryFactory);r.add(o),o.setInResult()}}return r},wr.prototype.placePolygonHoles=function(t,e){for(var r=e.iterator();r.hasNext();){var i=r.next();i.isHole()&&i.setShell(t)}},wr.prototype.getPolygons=function(){var t=this.computePolygons(this._shellList);return t},wr.prototype.findEdgeRingContaining=function(t,e){for(var r=t.getLinearRing(),i=r.getEnvelopeInternal(),s=r.getCoordinateN(0),o=null,a=null,u=e.iterator();u.hasNext();){var l=u.next(),c=l.getLinearRing(),h=c.getEnvelopeInternal();o!==null&&(a=o.getLinearRing().getEnvelopeInternal());var f=!1;h.contains(i)&&K.isPointInRing(s,c.getCoordinates())&&(f=!0),f&&(o===null||a.contains(h))&&(o=l)}return o},wr.prototype.findShell=function(t){for(var e=0,r=null,i=t.iterator();i.hasNext();){var s=i.next();s.isHole()||(r=s,e++)}return Pt.isTrue(e<=1,"found two shells in MinimalEdgeRing list"),r},wr.prototype.add=function(){if(arguments.length===1){var t=arguments[0];this.add(t.getEdgeEnds(),t.getNodes())}else if(arguments.length===2){var e=arguments[0],r=arguments[1];he.linkResultDirectedEdges(r);var i=this.buildMaximalEdgeRings(e),s=new j,o=this.buildMinimalEdgeRings(i,this._shellList,s);this.sortShellsAndHoles(o,this._shellList,s),this.placeFreeHoles(this._shellList,s)}},wr.prototype.interfaces_=function(){return[]},wr.prototype.getClass=function(){return wr};var Aa=function(){};Aa.prototype.getBounds=function(){},Aa.prototype.interfaces_=function(){return[]},Aa.prototype.getClass=function(){return Aa};var dn=function(){this._bounds=null,this._item=null;var t=arguments[0],e=arguments[1];this._bounds=t,this._item=e};dn.prototype.getItem=function(){return this._item},dn.prototype.getBounds=function(){return this._bounds},dn.prototype.interfaces_=function(){return[Aa,Jr]},dn.prototype.getClass=function(){return dn};var Fi=function(){this._size=null,this._items=null,this._size=0,this._items=new j,this._items.add(null)};Fi.prototype.poll=function(){if(this.isEmpty())return null;var t=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),t},Fi.prototype.size=function(){return this._size},Fi.prototype.reorder=function(t){for(var e=this,r=null,i=this._items.get(t);t*2<=this._size&&(r=t*2,r!==e._size&&e._items.get(r+1).compareTo(e._items.get(r))<0&&r++,e._items.get(r).compareTo(i)<0);t=r)e._items.set(t,e._items.get(r));this._items.set(t,i)},Fi.prototype.clear=function(){this._size=0,this._items.clear()},Fi.prototype.isEmpty=function(){return this._size===0},Fi.prototype.add=function(t){var e=this;this._items.add(null),this._size+=1;var r=this._size;for(this._items.set(0,t);t.compareTo(this._items.get(Math.trunc(r/2)))<0;r/=2)e._items.set(r,e._items.get(Math.trunc(r/2)));this._items.set(r,t)},Fi.prototype.interfaces_=function(){return[]},Fi.prototype.getClass=function(){return Fi};var is=function(){};is.prototype.visitItem=function(t){},is.prototype.interfaces_=function(){return[]},is.prototype.getClass=function(){return is};var Eo=function(){};Eo.prototype.insert=function(t,e){},Eo.prototype.remove=function(t,e){},Eo.prototype.query=function(){},Eo.prototype.interfaces_=function(){return[]},Eo.prototype.getClass=function(){return Eo};var Me=function(){if(this._childBoundables=new j,this._bounds=null,this._level=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this._level=t}}},vv={serialVersionUID:{configurable:!0}};Me.prototype.getLevel=function(){return this._level},Me.prototype.size=function(){return this._childBoundables.size()},Me.prototype.getChildBoundables=function(){return this._childBoundables},Me.prototype.addChildBoundable=function(t){Pt.isTrue(this._bounds===null),this._childBoundables.add(t)},Me.prototype.isEmpty=function(){return this._childBoundables.isEmpty()},Me.prototype.getBounds=function(){return this._bounds===null&&(this._bounds=this.computeBounds()),this._bounds},Me.prototype.interfaces_=function(){return[Aa,Jr]},Me.prototype.getClass=function(){return Me},vv.serialVersionUID.get=function(){return 6493722185909574e3},Object.defineProperties(Me,vv);var gn=function(){};gn.reverseOrder=function(){return{compare:function(e,r){return r.compareTo(e)}}},gn.min=function(t){return gn.sort(t),t.get(0)},gn.sort=function(t,e){var r=t.toArray();e?Rs.sort(r,e):Rs.sort(r);for(var i=t.iterator(),s=0,o=r.length;s<o;s++)i.next(),i.set(r[s])},gn.singletonList=function(t){var e=new j;return e.add(t),e};var we=function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var t=arguments[0],e=arguments[1],r=arguments[2];this._boundable1=t,this._boundable2=e,this._itemDistance=r,this._distance=this.distance()};we.prototype.expandToQueue=function(t,e){var r=we.isComposite(this._boundable1),i=we.isComposite(this._boundable2);if(r&&i)return we.area(this._boundable1)>we.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,t,e),null):(this.expand(this._boundable2,this._boundable1,t,e),null);if(r)return this.expand(this._boundable1,this._boundable2,t,e),null;if(i)return this.expand(this._boundable2,this._boundable1,t,e),null;throw new ae("neither boundable is composite")},we.prototype.isLeaves=function(){return!(we.isComposite(this._boundable1)||we.isComposite(this._boundable2))},we.prototype.compareTo=function(t){var e=t;return this._distance<e._distance?-1:this._distance>e._distance?1:0},we.prototype.expand=function(t,e,r,i){for(var s=this,o=t.getChildBoundables(),a=o.iterator();a.hasNext();){var u=a.next(),l=new we(u,e,s._itemDistance);l.getDistance()<i&&r.add(l)}},we.prototype.getBoundable=function(t){return t===0?this._boundable1:this._boundable2},we.prototype.getDistance=function(){return this._distance},we.prototype.distance=function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())},we.prototype.interfaces_=function(){return[Yr]},we.prototype.getClass=function(){return we},we.area=function(t){return t.getBounds().getArea()},we.isComposite=function(t){return t instanceof Me};var xe=function n(){if(this._root=null,this._built=!1,this._itemBoundables=new j,this._nodeCapacity=null,arguments.length===0){var t=n.DEFAULT_NODE_CAPACITY;this._nodeCapacity=t}else if(arguments.length===1){var e=arguments[0];Pt.isTrue(e>1,"Node capacity must be greater than 1"),this._nodeCapacity=e}},Lh={IntersectsOp:{configurable:!0},serialVersionUID:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};xe.prototype.getNodeCapacity=function(){return this._nodeCapacity},xe.prototype.lastNode=function(t){return t.get(t.size()-1)},xe.prototype.size=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.size(this._root));if(arguments.length===1){for(var e=arguments[0],r=0,i=e.getChildBoundables().iterator();i.hasNext();){var s=i.next();s instanceof Me?r+=t.size(s):s instanceof dn&&(r+=1)}return r}},xe.prototype.removeItem=function(t,e){for(var r=null,i=t.getChildBoundables().iterator();i.hasNext();){var s=i.next();s instanceof dn&&s.getItem()===e&&(r=s)}return r!==null?(t.getChildBoundables().remove(r),!0):!1},xe.prototype.itemsTree=function(){var t=this;if(arguments.length===0){this.build();var e=this.itemsTree(this._root);return e===null?new j:e}else if(arguments.length===1){for(var r=arguments[0],i=new j,s=r.getChildBoundables().iterator();s.hasNext();){var o=s.next();if(o instanceof Me){var a=t.itemsTree(o);a!==null&&i.add(a)}else o instanceof dn?i.add(o.getItem()):Pt.shouldNeverReachHere()}return i.size()<=0?null:i}},xe.prototype.insert=function(t,e){Pt.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new dn(t,e))},xe.prototype.boundablesAtLevel=function(){var t=this;if(arguments.length===1){var e=arguments[0],r=new j;return this.boundablesAtLevel(e,this._root,r),r}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];if(Pt.isTrue(i>-2),s.getLevel()===i)return o.add(s),null;for(var a=s.getChildBoundables().iterator();a.hasNext();){var u=a.next();u instanceof Me?t.boundablesAtLevel(i,u,o):(Pt.isTrue(u instanceof dn),i===-1&&o.add(u))}return null}},xe.prototype.query=function(){var t=this;if(arguments.length===1){var e=arguments[0];this.build();var r=new j;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),e)&&this.query(e,this._root,r),r}else if(arguments.length===2){var i=arguments[0],s=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),i)&&this.query(i,this._root,s)}else if(arguments.length===3){if(pt(arguments[2],is)&&arguments[0]instanceof Object&&arguments[1]instanceof Me)for(var o=arguments[0],a=arguments[1],u=arguments[2],l=a.getChildBoundables(),c=0;c<l.size();c++){var h=l.get(c);t.getIntersectsOp().intersects(h.getBounds(),o)&&(h instanceof Me?t.query(o,h,u):h instanceof dn?u.visitItem(h.getItem()):Pt.shouldNeverReachHere())}else if(pt(arguments[2],hn)&&arguments[0]instanceof Object&&arguments[1]instanceof Me)for(var f=arguments[0],d=arguments[1],v=arguments[2],_=d.getChildBoundables(),E=0;E<_.size();E++){var P=_.get(E);t.getIntersectsOp().intersects(P.getBounds(),f)&&(P instanceof Me?t.query(f,P,v):P instanceof dn?v.add(P.getItem()):Pt.shouldNeverReachHere())}}},xe.prototype.build=function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0},xe.prototype.getRoot=function(){return this.build(),this._root},xe.prototype.remove=function(){var t=this;if(arguments.length===2){var e=arguments[0],r=arguments[1];return this.build(),this.getIntersectsOp().intersects(this._root.getBounds(),e)?this.remove(e,this._root,r):!1}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=this.removeItem(s,o);if(a)return!0;for(var u=null,l=s.getChildBoundables().iterator();l.hasNext();){var c=l.next();if(t.getIntersectsOp().intersects(c.getBounds(),i)&&c instanceof Me&&(a=t.remove(i,c,o),a)){u=c;break}}return u!==null&&u.getChildBoundables().isEmpty()&&s.getChildBoundables().remove(u),a}},xe.prototype.createHigherLevels=function(t,e){Pt.isTrue(!t.isEmpty());var r=this.createParentBoundables(t,e+1);return r.size()===1?r.get(0):this.createHigherLevels(r,e+1)},xe.prototype.depth=function(){var t=this;if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(arguments.length===1){for(var e=arguments[0],r=0,i=e.getChildBoundables().iterator();i.hasNext();){var s=i.next();if(s instanceof Me){var o=t.depth(s);o>r&&(r=o)}}return r+1}},xe.prototype.createParentBoundables=function(t,e){var r=this;Pt.isTrue(!t.isEmpty());var i=new j;i.add(this.createNode(e));var s=new j(t);gn.sort(s,this.getComparator());for(var o=s.iterator();o.hasNext();){var a=o.next();r.lastNode(i).getChildBoundables().size()===r.getNodeCapacity()&&i.add(r.createNode(e)),r.lastNode(i).addChildBoundable(a)}return i},xe.prototype.isEmpty=function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()},xe.prototype.interfaces_=function(){return[Jr]},xe.prototype.getClass=function(){return xe},xe.compareDoubles=function(t,e){return t>e?1:t<e?-1:0},Lh.IntersectsOp.get=function(){return EI},Lh.serialVersionUID.get=function(){return-3886435814360241e3},Lh.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(xe,Lh);var EI=function(){},Oa=function(){};Oa.prototype.distance=function(t,e){},Oa.prototype.interfaces_=function(){return[]},Oa.prototype.getClass=function(){return Oa};var mv=function(n){function t(r){r=r||t.DEFAULT_NODE_CAPACITY,n.call(this,r)}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={STRtreeNode:{configurable:!0},serialVersionUID:{configurable:!0},xComparator:{configurable:!0},yComparator:{configurable:!0},intersectsOp:{configurable:!0},DEFAULT_NODE_CAPACITY:{configurable:!0}};return t.prototype.createParentBoundablesFromVerticalSlices=function(i,s){var o=this;Pt.isTrue(i.length>0);for(var a=new j,u=0;u<i.length;u++)a.addAll(o.createParentBoundablesFromVerticalSlice(i[u],s));return a},t.prototype.createNode=function(i){return new yv(i)},t.prototype.size=function(){return arguments.length===0?n.prototype.size.call(this):n.prototype.size.apply(this,arguments)},t.prototype.insert=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];if(i.isNull())return null;n.prototype.insert.call(this,i,s)}else return n.prototype.insert.apply(this,arguments)},t.prototype.getIntersectsOp=function(){return t.intersectsOp},t.prototype.verticalSlices=function(i,s){for(var o=Math.trunc(Math.ceil(i.size()/s)),a=new Array(s).fill(null),u=i.iterator(),l=0;l<s;l++){a[l]=new j;for(var c=0;u.hasNext()&&c<o;){var h=u.next();a[l].add(h),c++}}return a},t.prototype.query=function(){if(arguments.length===1){var i=arguments[0];return n.prototype.query.call(this,i)}else if(arguments.length===2){var s=arguments[0],o=arguments[1];n.prototype.query.call(this,s,o)}else if(arguments.length===3){if(pt(arguments[2],is)&&arguments[0]instanceof Object&&arguments[1]instanceof Me){var a=arguments[0],u=arguments[1],l=arguments[2];n.prototype.query.call(this,a,u,l)}else if(pt(arguments[2],hn)&&arguments[0]instanceof Object&&arguments[1]instanceof Me){var c=arguments[0],h=arguments[1],f=arguments[2];n.prototype.query.call(this,c,h,f)}}},t.prototype.getComparator=function(){return t.yComparator},t.prototype.createParentBoundablesFromVerticalSlice=function(i,s){return n.prototype.createParentBoundables.call(this,i,s)},t.prototype.remove=function(){if(arguments.length===2){var i=arguments[0],s=arguments[1];return n.prototype.remove.call(this,i,s)}else return n.prototype.remove.apply(this,arguments)},t.prototype.depth=function(){return arguments.length===0?n.prototype.depth.call(this):n.prototype.depth.apply(this,arguments)},t.prototype.createParentBoundables=function(i,s){Pt.isTrue(!i.isEmpty());var o=Math.trunc(Math.ceil(i.size()/this.getNodeCapacity())),a=new j(i);gn.sort(a,t.xComparator);var u=this.verticalSlices(a,Math.trunc(Math.ceil(Math.sqrt(o))));return this.createParentBoundablesFromVerticalSlices(u,s)},t.prototype.nearestNeighbour=function(){if(arguments.length===1){if(pt(arguments[0],Oa)){var i=arguments[0],s=new we(this.getRoot(),this.getRoot(),i);return this.nearestNeighbour(s)}else if(arguments[0]instanceof we){var o=arguments[0];return this.nearestNeighbour(o,yt.POSITIVE_INFINITY)}}else if(arguments.length===2){if(arguments[0]instanceof t&&pt(arguments[1],Oa)){var a=arguments[0],u=arguments[1],l=new we(this.getRoot(),a.getRoot(),u);return this.nearestNeighbour(l)}else if(arguments[0]instanceof we&&typeof arguments[1]=="number"){var c=arguments[0],h=arguments[1],f=h,d=null,v=new Fi;for(v.add(c);!v.isEmpty()&&f>0;){var _=v.poll(),E=_.getDistance();if(E>=f)break;_.isLeaves()?(f=E,d=_):_.expandToQueue(v,f)}return[d.getBoundable(0).getItem(),d.getBoundable(1).getItem()]}}else if(arguments.length===3){var P=arguments[0],y=arguments[1],w=arguments[2],m=new dn(P,y),S=new we(this.getRoot(),m,w);return this.nearestNeighbour(S)[0]}},t.prototype.interfaces_=function(){return[Eo,Jr]},t.prototype.getClass=function(){return t},t.centreX=function(i){return t.avg(i.getMinX(),i.getMaxX())},t.avg=function(i,s){return(i+s)/2},t.centreY=function(i){return t.avg(i.getMinY(),i.getMaxY())},e.STRtreeNode.get=function(){return yv},e.serialVersionUID.get=function(){return 0x39920f7d5f261e0},e.xComparator.get=function(){return{interfaces_:function(){return[ya]},compare:function(r,i){return n.compareDoubles(t.centreX(r.getBounds()),t.centreX(i.getBounds()))}}},e.yComparator.get=function(){return{interfaces_:function(){return[ya]},compare:function(r,i){return n.compareDoubles(t.centreY(r.getBounds()),t.centreY(i.getBounds()))}}},e.intersectsOp.get=function(){return{interfaces_:function(){return[n.IntersectsOp]},intersects:function(r,i){return r.intersects(i)}}},e.DEFAULT_NODE_CAPACITY.get=function(){return 10},Object.defineProperties(t,e),t}(xe),yv=function(n){function t(){var e=arguments[0];n.call(this,e)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.computeBounds=function(){for(var r=null,i=this.getChildBoundables().iterator();i.hasNext();){var s=i.next();r===null?r=new at(s.getBounds()):r.expandToInclude(s.getBounds())}return r},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Me),ur=function(){};ur.prototype.interfaces_=function(){return[]},ur.prototype.getClass=function(){return ur},ur.relativeSign=function(t,e){return t<e?-1:t>e?1:0},ur.compare=function(t,e,r){if(e.equals2D(r))return 0;var i=ur.relativeSign(e.x,r.x),s=ur.relativeSign(e.y,r.y);switch(t){case 0:return ur.compareValue(i,s);case 1:return ur.compareValue(s,i);case 2:return ur.compareValue(s,-i);case 3:return ur.compareValue(-i,s);case 4:return ur.compareValue(-i,-s);case 5:return ur.compareValue(-s,-i);case 6:return ur.compareValue(-s,i);case 7:return ur.compareValue(i,-s)}return Pt.shouldNeverReachHere("invalid octant value"),0},ur.compareValue=function(t,e){return t<0?-1:t>0?1:e<0?-1:e>0?1:0};var ss=function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var t=arguments[0],e=arguments[1],r=arguments[2],i=arguments[3];this._segString=t,this.coord=new D(e),this.segmentIndex=r,this._segmentOctant=i,this._isInterior=!e.equals2D(t.getCoordinate(r))};ss.prototype.getCoordinate=function(){return this.coord},ss.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex)},ss.prototype.compareTo=function(t){var e=t;return this.segmentIndex<e.segmentIndex?-1:this.segmentIndex>e.segmentIndex?1:this.coord.equals2D(e.coord)?0:ur.compare(this._segmentOctant,this.coord,e.coord)},ss.prototype.isEndPoint=function(t){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===t},ss.prototype.isInterior=function(){return this._isInterior},ss.prototype.interfaces_=function(){return[Yr]},ss.prototype.getClass=function(){return ss};var Ke=function(){this._nodeMap=new He,this._edge=null;var t=arguments[0];this._edge=t};Ke.prototype.getSplitCoordinates=function(){var t=this,e=new ul;this.addEndpoints();for(var r=this.iterator(),i=r.next();r.hasNext();){var s=r.next();t.addEdgeCoordinates(i,s,e),i=s}return e.toCoordinateArray()},Ke.prototype.addCollapsedNodes=function(){var t=this,e=new j;this.findCollapsesFromInsertedNodes(e),this.findCollapsesFromExistingVertices(e);for(var r=e.iterator();r.hasNext();){var i=r.next().intValue();t.add(t._edge.getCoordinate(i),i)}},Ke.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var r=e.next();r.print(t)}},Ke.prototype.findCollapsesFromExistingVertices=function(t){for(var e=this,r=0;r<this._edge.size()-2;r++){var i=e._edge.getCoordinate(r),s=e._edge.getCoordinate(r+2);i.equals2D(s)&&t.add(new Mn(r+1))}},Ke.prototype.addEdgeCoordinates=function(t,e,r){var i=this,s=this._edge.getCoordinate(e.segmentIndex),o=e.isInterior()||!e.coord.equals2D(s);r.add(new D(t.coord),!1);for(var a=t.segmentIndex+1;a<=e.segmentIndex;a++)r.add(i._edge.getCoordinate(a));o&&r.add(new D(e.coord))},Ke.prototype.iterator=function(){return this._nodeMap.values().iterator()},Ke.prototype.addSplitEdges=function(t){var e=this;this.addEndpoints(),this.addCollapsedNodes();for(var r=this.iterator(),i=r.next();r.hasNext();){var s=r.next(),o=e.createSplitEdge(i,s);t.add(o),i=s}},Ke.prototype.findCollapseIndex=function(t,e,r){if(!t.coord.equals2D(e.coord))return!1;var i=e.segmentIndex-t.segmentIndex;return e.isInterior()||i--,i===1?(r[0]=t.segmentIndex+1,!0):!1},Ke.prototype.findCollapsesFromInsertedNodes=function(t){for(var e=this,r=new Array(1).fill(null),i=this.iterator(),s=i.next();i.hasNext();){var o=i.next(),a=e.findCollapseIndex(s,o,r);a&&t.add(new Mn(r[0])),s=o}},Ke.prototype.getEdge=function(){return this._edge},Ke.prototype.addEndpoints=function(){var t=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(t),t)},Ke.prototype.createSplitEdge=function(t,e){var r=this,i=e.segmentIndex-t.segmentIndex+2,s=this._edge.getCoordinate(e.segmentIndex),o=e.isInterior()||!e.coord.equals2D(s);o||i--;var a=new Array(i).fill(null),u=0;a[u++]=new D(t.coord);for(var l=t.segmentIndex+1;l<=e.segmentIndex;l++)a[u++]=r._edge.getCoordinate(l);return o&&(a[u]=new D(e.coord)),new ve(a,this._edge.getData())},Ke.prototype.add=function(t,e){var r=new ss(this._edge,t,e,this._edge.getSegmentOctant(e)),i=this._nodeMap.get(r);return i!==null?(Pt.isTrue(i.coord.equals2D(t),"Found equal nodes with different coordinates"),i):(this._nodeMap.put(r,r),r)},Ke.prototype.checkSplitEdgesCorrectness=function(t){var e=this._edge.getCoordinates(),r=t.get(0),i=r.getCoordinate(0);if(!i.equals2D(e[0]))throw new xi("bad split edge start point at "+i);var s=t.get(t.size()-1),o=s.getCoordinates(),a=o[o.length-1];if(!a.equals2D(e[e.length-1]))throw new xi("bad split edge end point at "+a)},Ke.prototype.interfaces_=function(){return[]},Ke.prototype.getClass=function(){return Ke};var So=function(){};So.prototype.interfaces_=function(){return[]},So.prototype.getClass=function(){return So},So.octant=function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];if(t===0&&e===0)throw new ae("Cannot compute the octant for point ( "+t+", "+e+" )");var r=Math.abs(t),i=Math.abs(e);return t>=0?e>=0?r>=i?0:1:r>=i?7:6:e>=0?r>=i?3:2:r>=i?4:5}else if(arguments[0]instanceof D&&arguments[1]instanceof D){var s=arguments[0],o=arguments[1],a=o.x-s.x,u=o.y-s.y;if(a===0&&u===0)throw new ae("Cannot compute the octant for two identical points "+s);return So.octant(a,u)}};var ui=function(){};ui.prototype.getCoordinates=function(){},ui.prototype.size=function(){},ui.prototype.getCoordinate=function(t){},ui.prototype.isClosed=function(){},ui.prototype.setData=function(t){},ui.prototype.getData=function(){},ui.prototype.interfaces_=function(){return[]},ui.prototype.getClass=function(){return ui};var ml=function(){};ml.prototype.addIntersection=function(t,e){},ml.prototype.interfaces_=function(){return[ui]},ml.prototype.getClass=function(){return ml};var ve=function(){this._nodeList=new Ke(this),this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};ve.prototype.getCoordinates=function(){return this._pts},ve.prototype.size=function(){return this._pts.length},ve.prototype.getCoordinate=function(t){return this._pts[t]},ve.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},ve.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(t),this.getCoordinate(t+1))},ve.prototype.setData=function(t){this._data=t},ve.prototype.safeOctant=function(t,e){return t.equals2D(e)?0:So.octant(t,e)},ve.prototype.getData=function(){return this._data},ve.prototype.addIntersection=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1];this.addIntersectionNode(t,e)}else if(arguments.length===4){var r=arguments[0],i=arguments[1],s=arguments[3],o=new D(r.getIntersection(s));this.addIntersection(o,i)}},ve.prototype.toString=function(){return ln.toLineString(new pe(this._pts))},ve.prototype.getNodeList=function(){return this._nodeList},ve.prototype.addIntersectionNode=function(t,e){var r=e,i=r+1;if(i<this._pts.length){var s=this._pts[i];t.equals2D(s)&&(r=i)}var o=this._nodeList.add(t,r);return o},ve.prototype.addIntersections=function(t,e,r){for(var i=this,s=0;s<t.getIntersectionNum();s++)i.addIntersection(t,e,r,s)},ve.prototype.interfaces_=function(){return[ml]},ve.prototype.getClass=function(){return ve},ve.getNodedSubstrings=function(){if(arguments.length===1){var t=arguments[0],e=new j;return ve.getNodedSubstrings(t,e),e}else if(arguments.length===2)for(var r=arguments[0],i=arguments[1],s=r.iterator();s.hasNext();){var o=s.next();o.getNodeList().addSplitEdges(i)}};var ut=function(){if(this.p0=null,this.p1=null,arguments.length===0)this.p0=new D,this.p1=new D;else if(arguments.length===1){var t=arguments[0];this.p0=new D(t.p0),this.p1=new D(t.p1)}else if(arguments.length===2)this.p0=arguments[0],this.p1=arguments[1];else if(arguments.length===4){var e=arguments[0],r=arguments[1],i=arguments[2],s=arguments[3];this.p0=new D(e,r),this.p1=new D(i,s)}},_v={serialVersionUID:{configurable:!0}};ut.prototype.minX=function(){return Math.min(this.p0.x,this.p1.x)},ut.prototype.orientationIndex=function(){if(arguments[0]instanceof ut){var t=arguments[0],e=K.orientationIndex(this.p0,this.p1,t.p0),r=K.orientationIndex(this.p0,this.p1,t.p1);return e>=0&&r>=0||e<=0&&r<=0?Math.max(e,r):0}else if(arguments[0]instanceof D){var i=arguments[0];return K.orientationIndex(this.p0,this.p1,i)}},ut.prototype.toGeometry=function(t){return t.createLineString([this.p0,this.p1])},ut.prototype.isVertical=function(){return this.p0.x===this.p1.x},ut.prototype.equals=function(t){if(!(t instanceof ut))return!1;var e=t;return this.p0.equals(e.p0)&&this.p1.equals(e.p1)},ut.prototype.intersection=function(t){var e=new Ds;return e.computeIntersection(this.p0,this.p1,t.p0,t.p1),e.hasIntersection()?e.getIntersection(0):null},ut.prototype.project=function(){if(arguments[0]instanceof D){var t=arguments[0];if(t.equals(this.p0)||t.equals(this.p1))return new D(t);var e=this.projectionFactor(t),r=new D;return r.x=this.p0.x+e*(this.p1.x-this.p0.x),r.y=this.p0.y+e*(this.p1.y-this.p0.y),r}else if(arguments[0]instanceof ut){var i=arguments[0],s=this.projectionFactor(i.p0),o=this.projectionFactor(i.p1);if(s>=1&&o>=1||s<=0&&o<=0)return null;var a=this.project(i.p0);s<0&&(a=this.p0),s>1&&(a=this.p1);var u=this.project(i.p1);return o<0&&(u=this.p0),o>1&&(u=this.p1),new ut(a,u)}},ut.prototype.normalize=function(){this.p1.compareTo(this.p0)<0&&this.reverse()},ut.prototype.angle=function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)},ut.prototype.getCoordinate=function(t){return t===0?this.p0:this.p1},ut.prototype.distancePerpendicular=function(t){return K.distancePointLinePerpendicular(t,this.p0,this.p1)},ut.prototype.minY=function(){return Math.min(this.p0.y,this.p1.y)},ut.prototype.midPoint=function(){return ut.midPoint(this.p0,this.p1)},ut.prototype.projectionFactor=function(t){if(t.equals(this.p0))return 0;if(t.equals(this.p1))return 1;var e=this.p1.x-this.p0.x,r=this.p1.y-this.p0.y,i=e*e+r*r;if(i<=0)return yt.NaN;var s=((t.x-this.p0.x)*e+(t.y-this.p0.y)*r)/i;return s},ut.prototype.closestPoints=function(t){var e=this.intersection(t);if(e!==null)return[e,e];var r=new Array(2).fill(null),i=yt.MAX_VALUE,s=null,o=this.closestPoint(t.p0);i=o.distance(t.p0),r[0]=o,r[1]=t.p0;var a=this.closestPoint(t.p1);s=a.distance(t.p1),s<i&&(i=s,r[0]=a,r[1]=t.p1);var u=t.closestPoint(this.p0);s=u.distance(this.p0),s<i&&(i=s,r[0]=this.p0,r[1]=u);var l=t.closestPoint(this.p1);return s=l.distance(this.p1),s<i&&(i=s,r[0]=this.p1,r[1]=l),r},ut.prototype.closestPoint=function(t){var e=this.projectionFactor(t);if(e>0&&e<1)return this.project(t);var r=this.p0.distance(t),i=this.p1.distance(t);return r<i?this.p0:this.p1},ut.prototype.maxX=function(){return Math.max(this.p0.x,this.p1.x)},ut.prototype.getLength=function(){return this.p0.distance(this.p1)},ut.prototype.compareTo=function(t){var e=t,r=this.p0.compareTo(e.p0);return r!==0?r:this.p1.compareTo(e.p1)},ut.prototype.reverse=function(){var t=this.p0;this.p0=this.p1,this.p1=t},ut.prototype.equalsTopo=function(t){return this.p0.equals(t.p0)&&(this.p1.equals(t.p1)||this.p0.equals(t.p1))&&this.p1.equals(t.p0)},ut.prototype.lineIntersection=function(t){try{var e=un.intersection(this.p0,this.p1,t.p0,t.p1);return e}catch(r){if(!(r instanceof wa))throw r}finally{}return null},ut.prototype.maxY=function(){return Math.max(this.p0.y,this.p1.y)},ut.prototype.pointAlongOffset=function(t,e){var r=this.p0.x+t*(this.p1.x-this.p0.x),i=this.p0.y+t*(this.p1.y-this.p0.y),s=this.p1.x-this.p0.x,o=this.p1.y-this.p0.y,a=Math.sqrt(s*s+o*o),u=0,l=0;if(e!==0){if(a<=0)throw new Error("Cannot compute offset from zero-length line segment");u=e*s/a,l=e*o/a}var c=r-l,h=i+u,f=new D(c,h);return f},ut.prototype.setCoordinates=function(){if(arguments.length===1){var t=arguments[0];this.setCoordinates(t.p0,t.p1)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this.p0.x=e.x,this.p0.y=e.y,this.p1.x=r.x,this.p1.y=r.y}},ut.prototype.segmentFraction=function(t){var e=this.projectionFactor(t);return e<0?e=0:(e>1||yt.isNaN(e))&&(e=1),e},ut.prototype.toString=function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"},ut.prototype.isHorizontal=function(){return this.p0.y===this.p1.y},ut.prototype.distance=function(){if(arguments[0]instanceof ut){var t=arguments[0];return K.distanceLineLine(this.p0,this.p1,t.p0,t.p1)}else if(arguments[0]instanceof D){var e=arguments[0];return K.distancePointLine(e,this.p0,this.p1)}},ut.prototype.pointAlong=function(t){var e=new D;return e.x=this.p0.x+t*(this.p1.x-this.p0.x),e.y=this.p0.y+t*(this.p1.y-this.p0.y),e},ut.prototype.hashCode=function(){var t=yt.doubleToLongBits(this.p0.x);t^=yt.doubleToLongBits(this.p0.y)*31;var e=Math.trunc(t)^Math.trunc(t>>32),r=yt.doubleToLongBits(this.p1.x);r^=yt.doubleToLongBits(this.p1.y)*31;var i=Math.trunc(r)^Math.trunc(r>>32);return e^i},ut.prototype.interfaces_=function(){return[Yr,Jr]},ut.prototype.getClass=function(){return ut},ut.midPoint=function(t,e){return new D((t.x+e.x)/2,(t.y+e.y)/2)},_v.serialVersionUID.get=function(){return 0x2d2172135f411c00},Object.defineProperties(ut,_v);var yl=function(){this.tempEnv1=new at,this.tempEnv2=new at,this._overlapSeg1=new ut,this._overlapSeg2=new ut};yl.prototype.overlap=function(){if(arguments.length!==2){if(arguments.length===4){var t=arguments[0],e=arguments[1],r=arguments[2],i=arguments[3];t.getLineSegment(e,this._overlapSeg1),r.getLineSegment(i,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}}},yl.prototype.interfaces_=function(){return[]},yl.prototype.getClass=function(){return yl};var Er=function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var t=arguments[0],e=arguments[1],r=arguments[2],i=arguments[3];this._pts=t,this._start=e,this._end=r,this._context=i};Er.prototype.getLineSegment=function(t,e){e.p0=this._pts[t],e.p1=this._pts[t+1]},Er.prototype.computeSelect=function(t,e,r,i){var s=this._pts[e],o=this._pts[r];if(i.tempEnv1.init(s,o),r-e===1)return i.select(this,e),null;if(!t.intersects(i.tempEnv1))return null;var a=Math.trunc((e+r)/2);e<a&&this.computeSelect(t,e,a,i),a<r&&this.computeSelect(t,a,r,i)},Er.prototype.getCoordinates=function(){for(var t=this,e=new Array(this._end-this._start+1).fill(null),r=0,i=this._start;i<=this._end;i++)e[r++]=t._pts[i];return e},Er.prototype.computeOverlaps=function(t,e){this.computeOverlapsInternal(this._start,this._end,t,t._start,t._end,e)},Er.prototype.setId=function(t){this._id=t},Er.prototype.select=function(t,e){this.computeSelect(t,this._start,this._end,e)},Er.prototype.getEnvelope=function(){if(this._env===null){var t=this._pts[this._start],e=this._pts[this._end];this._env=new at(t,e)}return this._env},Er.prototype.getEndIndex=function(){return this._end},Er.prototype.getStartIndex=function(){return this._start},Er.prototype.getContext=function(){return this._context},Er.prototype.getId=function(){return this._id},Er.prototype.computeOverlapsInternal=function(t,e,r,i,s,o){var a=this._pts[t],u=this._pts[e],l=r._pts[i],c=r._pts[s];if(e-t===1&&s-i===1)return o.overlap(this,t,r,i),null;if(o.tempEnv1.init(a,u),o.tempEnv2.init(l,c),!o.tempEnv1.intersects(o.tempEnv2))return null;var h=Math.trunc((t+e)/2),f=Math.trunc((i+s)/2);t<h&&(i<f&&this.computeOverlapsInternal(t,h,r,i,f,o),f<s&&this.computeOverlapsInternal(t,h,r,f,s,o)),h<e&&(i<f&&this.computeOverlapsInternal(h,e,r,i,f,o),f<s&&this.computeOverlapsInternal(h,e,r,f,s,o))},Er.prototype.interfaces_=function(){return[]},Er.prototype.getClass=function(){return Er};var Fn=function(){};Fn.prototype.interfaces_=function(){return[]},Fn.prototype.getClass=function(){return Fn},Fn.getChainStartIndices=function(t){var e=0,r=new j;r.add(new Mn(e));do{var i=Fn.findChainEnd(t,e);r.add(new Mn(i)),e=i}while(e<t.length-1);var s=Fn.toIntArray(r);return s},Fn.findChainEnd=function(t,e){for(var r=e;r<t.length-1&&t[r].equals2D(t[r+1]);)r++;if(r>=t.length-1)return t.length-1;for(var i=Jt.quadrant(t[r],t[r+1]),s=e+1;s<t.length;){if(!t[s-1].equals2D(t[s])){var o=Jt.quadrant(t[s-1],t[s]);if(o!==i)break}s++}return s-1},Fn.getChains=function(){if(arguments.length===1){var t=arguments[0];return Fn.getChains(t,null)}else if(arguments.length===2){for(var e=arguments[0],r=arguments[1],i=new j,s=Fn.getChainStartIndices(e),o=0;o<s.length-1;o++){var a=new Er(e,s[o],s[o+1],r);i.add(a)}return i}},Fn.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),r=0;r<e.length;r++)e[r]=t.get(r).intValue();return e};var Gs=function(){};Gs.prototype.computeNodes=function(t){},Gs.prototype.getNodedSubstrings=function(){},Gs.prototype.interfaces_=function(){return[]},Gs.prototype.getClass=function(){return Gs};var _l=function(){if(this._segInt=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setSegmentIntersector(t)}}};_l.prototype.setSegmentIntersector=function(t){this._segInt=t},_l.prototype.interfaces_=function(){return[Gs]},_l.prototype.getClass=function(){return _l};var Gf=function(n){function t(r){r?n.call(this,r):n.call(this),this._monoChains=new j,this._index=new mv,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0}n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t;var e={SegmentOverlapAction:{configurable:!0}};return t.prototype.getMonotoneChains=function(){return this._monoChains},t.prototype.getNodedSubstrings=function(){return ve.getNodedSubstrings(this._nodedSegStrings)},t.prototype.getIndex=function(){return this._index},t.prototype.add=function(i){for(var s=this,o=Fn.getChains(i.getCoordinates(),i),a=o.iterator();a.hasNext();){var u=a.next();u.setId(s._idCounter++),s._index.insert(u.getEnvelope(),u),s._monoChains.add(u)}},t.prototype.computeNodes=function(i){var s=this;this._nodedSegStrings=i;for(var o=i.iterator();o.hasNext();)s.add(o.next());this.intersectChains()},t.prototype.intersectChains=function(){for(var i=this,s=new wv(this._segInt),o=this._monoChains.iterator();o.hasNext();)for(var a=o.next(),u=i._index.query(a.getEnvelope()),l=u.iterator();l.hasNext();){var c=l.next();if(c.getId()>a.getId()&&(a.computeOverlaps(c,s),i._nOverlaps++),i._segInt.isDone())return null}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},e.SegmentOverlapAction.get=function(){return wv},Object.defineProperties(t,e),t}(_l),wv=function(n){function t(){n.call(this),this._si=null;var e=arguments[0];this._si=e}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.overlap=function(){if(arguments.length===4){var r=arguments[0],i=arguments[1],s=arguments[2],o=arguments[3],a=r.getContext(),u=s.getContext();this._si.processIntersections(a,i,u,o)}else return n.prototype.overlap.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(yl),zt=function n(){if(this._quadrantSegments=n.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=n.CAP_ROUND,this._joinStyle=n.JOIN_ROUND,this._mitreLimit=n.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=n.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var t=arguments[0];this.setQuadrantSegments(t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this.setQuadrantSegments(e),this.setEndCapStyle(r)}else if(arguments.length===4){var i=arguments[0],s=arguments[1],o=arguments[2],a=arguments[3];this.setQuadrantSegments(i),this.setEndCapStyle(s),this.setJoinStyle(o),this.setMitreLimit(a)}}},Gi={CAP_ROUND:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},JOIN_ROUND:{configurable:!0},JOIN_MITRE:{configurable:!0},JOIN_BEVEL:{configurable:!0},DEFAULT_QUADRANT_SEGMENTS:{configurable:!0},DEFAULT_MITRE_LIMIT:{configurable:!0},DEFAULT_SIMPLIFY_FACTOR:{configurable:!0}};zt.prototype.getEndCapStyle=function(){return this._endCapStyle},zt.prototype.isSingleSided=function(){return this._isSingleSided},zt.prototype.setQuadrantSegments=function(t){this._quadrantSegments=t,this._quadrantSegments===0&&(this._joinStyle=zt.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=zt.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),t<=0&&(this._quadrantSegments=1),this._joinStyle!==zt.JOIN_ROUND&&(this._quadrantSegments=zt.DEFAULT_QUADRANT_SEGMENTS)},zt.prototype.getJoinStyle=function(){return this._joinStyle},zt.prototype.setJoinStyle=function(t){this._joinStyle=t},zt.prototype.setSimplifyFactor=function(t){this._simplifyFactor=t<0?0:t},zt.prototype.getSimplifyFactor=function(){return this._simplifyFactor},zt.prototype.getQuadrantSegments=function(){return this._quadrantSegments},zt.prototype.setEndCapStyle=function(t){this._endCapStyle=t},zt.prototype.getMitreLimit=function(){return this._mitreLimit},zt.prototype.setMitreLimit=function(t){this._mitreLimit=t},zt.prototype.setSingleSided=function(t){this._isSingleSided=t},zt.prototype.interfaces_=function(){return[]},zt.prototype.getClass=function(){return zt},zt.bufferDistanceError=function(t){var e=Math.PI/2/t;return 1-Math.cos(e/2)},Gi.CAP_ROUND.get=function(){return 1},Gi.CAP_FLAT.get=function(){return 2},Gi.CAP_SQUARE.get=function(){return 3},Gi.JOIN_ROUND.get=function(){return 1},Gi.JOIN_MITRE.get=function(){return 2},Gi.JOIN_BEVEL.get=function(){return 3},Gi.DEFAULT_QUADRANT_SEGMENTS.get=function(){return 8},Gi.DEFAULT_MITRE_LIMIT.get=function(){return 5},Gi.DEFAULT_SIMPLIFY_FACTOR.get=function(){return .01},Object.defineProperties(zt,Gi);var fe=function(t){this._distanceTol=null,this._isDeleted=null,this._angleOrientation=K.COUNTERCLOCKWISE,this._inputLine=t||null},wl={INIT:{configurable:!0},DELETE:{configurable:!0},KEEP:{configurable:!0},NUM_PTS_TO_CHECK:{configurable:!0}};fe.prototype.isDeletable=function(t,e,r,i){var s=this._inputLine[t],o=this._inputLine[e],a=this._inputLine[r];return!this.isConcave(s,o,a)||!this.isShallow(s,o,a,i)?!1:this.isShallowSampled(s,o,t,r,i)},fe.prototype.deleteShallowConcavities=function(){for(var t=this,e=1,r=this.findNextNonDeletedIndex(e),i=this.findNextNonDeletedIndex(r),s=!1;i<this._inputLine.length;){var o=!1;t.isDeletable(e,r,i,t._distanceTol)&&(t._isDeleted[r]=fe.DELETE,o=!0,s=!0),o?e=i:e=r,r=t.findNextNonDeletedIndex(e),i=t.findNextNonDeletedIndex(r)}return s},fe.prototype.isShallowConcavity=function(t,e,r,i){var s=K.computeOrientation(t,e,r),o=s===this._angleOrientation;if(!o)return!1;var a=K.distancePointLine(e,t,r);return a<i},fe.prototype.isShallowSampled=function(t,e,r,i,s){var o=this,a=Math.trunc((i-r)/fe.NUM_PTS_TO_CHECK);a<=0&&(a=1);for(var u=r;u<i;u+=a)if(!o.isShallow(t,e,o._inputLine[u],s))return!1;return!0},fe.prototype.isConcave=function(t,e,r){var i=K.computeOrientation(t,e,r),s=i===this._angleOrientation;return s},fe.prototype.simplify=function(t){var e=this;this._distanceTol=Math.abs(t),t<0&&(this._angleOrientation=K.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var r=!1;do r=e.deleteShallowConcavities();while(r);return this.collapseLine()},fe.prototype.findNextNonDeletedIndex=function(t){for(var e=t+1;e<this._inputLine.length&&this._isDeleted[e]===fe.DELETE;)e++;return e},fe.prototype.isShallow=function(t,e,r,i){var s=K.distancePointLine(e,t,r);return s<i},fe.prototype.collapseLine=function(){for(var t=this,e=new ul,r=0;r<this._inputLine.length;r++)t._isDeleted[r]!==fe.DELETE&&e.add(t._inputLine[r]);return e.toCoordinateArray()},fe.prototype.interfaces_=function(){return[]},fe.prototype.getClass=function(){return fe},fe.simplify=function(t,e){var r=new fe(t);return r.simplify(e)},wl.INIT.get=function(){return 0},wl.DELETE.get=function(){return 1},wl.KEEP.get=function(){return 1},wl.NUM_PTS_TO_CHECK.get=function(){return 10},Object.defineProperties(fe,wl);var Fr=function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new j},Ev={COORDINATE_ARRAY_TYPE:{configurable:!0}};Fr.prototype.getCoordinates=function(){var t=this._ptList.toArray(Fr.COORDINATE_ARRAY_TYPE);return t},Fr.prototype.setPrecisionModel=function(t){this._precisionModel=t},Fr.prototype.addPt=function(t){var e=new D(t);if(this._precisionModel.makePrecise(e),this.isRedundant(e))return null;this._ptList.add(e)},Fr.prototype.revere=function(){},Fr.prototype.addPts=function(t,e){var r=this;if(e)for(var i=0;i<t.length;i++)r.addPt(t[i]);else for(var s=t.length-1;s>=0;s--)r.addPt(t[s])},Fr.prototype.isRedundant=function(t){if(this._ptList.size()<1)return!1;var e=this._ptList.get(this._ptList.size()-1),r=t.distance(e);return r<this._minimimVertexDistance},Fr.prototype.toString=function(){var t=new xt,e=t.createLineString(this.getCoordinates());return e.toString()},Fr.prototype.closeRing=function(){if(this._ptList.size()<1)return null;var t=new D(this._ptList.get(0)),e=this._ptList.get(this._ptList.size()-1);if(t.equals(e))return null;this._ptList.add(t)},Fr.prototype.setMinimumVertexDistance=function(t){this._minimimVertexDistance=t},Fr.prototype.interfaces_=function(){return[]},Fr.prototype.getClass=function(){return Fr},Ev.COORDINATE_ARRAY_TYPE.get=function(){return new Array(0).fill(null)},Object.defineProperties(Fr,Ev);var At=function(){},Co={PI_TIMES_2:{configurable:!0},PI_OVER_2:{configurable:!0},PI_OVER_4:{configurable:!0},COUNTERCLOCKWISE:{configurable:!0},CLOCKWISE:{configurable:!0},NONE:{configurable:!0}};At.prototype.interfaces_=function(){return[]},At.prototype.getClass=function(){return At},At.toDegrees=function(t){return t*180/Math.PI},At.normalize=function(t){for(;t>Math.PI;)t-=At.PI_TIMES_2;for(;t<=-Math.PI;)t+=At.PI_TIMES_2;return t},At.angle=function(){if(arguments.length===1){var t=arguments[0];return Math.atan2(t.y,t.x)}else if(arguments.length===2){var e=arguments[0],r=arguments[1],i=r.x-e.x,s=r.y-e.y;return Math.atan2(s,i)}},At.isAcute=function(t,e,r){var i=t.x-e.x,s=t.y-e.y,o=r.x-e.x,a=r.y-e.y,u=i*o+s*a;return u>0},At.isObtuse=function(t,e,r){var i=t.x-e.x,s=t.y-e.y,o=r.x-e.x,a=r.y-e.y,u=i*o+s*a;return u<0},At.interiorAngle=function(t,e,r){var i=At.angle(e,t),s=At.angle(e,r);return Math.abs(s-i)},At.normalizePositive=function(t){if(t<0){for(;t<0;)t+=At.PI_TIMES_2;t>=At.PI_TIMES_2&&(t=0)}else{for(;t>=At.PI_TIMES_2;)t-=At.PI_TIMES_2;t<0&&(t=0)}return t},At.angleBetween=function(t,e,r){var i=At.angle(e,t),s=At.angle(e,r);return At.diff(i,s)},At.diff=function(t,e){var r=null;return t<e?r=e-t:r=t-e,r>Math.PI&&(r=2*Math.PI-r),r},At.toRadians=function(t){return t*Math.PI/180},At.getTurn=function(t,e){var r=Math.sin(e-t);return r>0?At.COUNTERCLOCKWISE:r<0?At.CLOCKWISE:At.NONE},At.angleBetweenOriented=function(t,e,r){var i=At.angle(e,t),s=At.angle(e,r),o=s-i;return o<=-Math.PI?o+At.PI_TIMES_2:o>Math.PI?o-At.PI_TIMES_2:o},Co.PI_TIMES_2.get=function(){return 2*Math.PI},Co.PI_OVER_2.get=function(){return Math.PI/2},Co.PI_OVER_4.get=function(){return Math.PI/4},Co.COUNTERCLOCKWISE.get=function(){return K.COUNTERCLOCKWISE},Co.CLOCKWISE.get=function(){return K.CLOCKWISE},Co.NONE.get=function(){return K.COLLINEAR},Object.defineProperties(At,Co);var se=function n(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new ut,this._seg1=new ut,this._offset0=new ut,this._offset1=new ut,this._side=0,this._hasNarrowConcaveAngle=!1;var t=arguments[0],e=arguments[1],r=arguments[2];this._precisionModel=t,this._bufParams=e,this._li=new Ds,this._filletAngleQuantum=Math.PI/2/e.getQuadrantSegments(),e.getQuadrantSegments()>=8&&e.getJoinStyle()===zt.JOIN_ROUND&&(this._closingSegLengthFactor=n.MAX_CLOSING_SEG_LEN_FACTOR),this.init(r)},El={OFFSET_SEGMENT_SEPARATION_FACTOR:{configurable:!0},INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},CURVE_VERTEX_SNAP_DISTANCE_FACTOR:{configurable:!0},MAX_CLOSING_SEG_LEN_FACTOR:{configurable:!0}};se.prototype.addNextSegment=function(t,e){if(this._s0=this._s1,this._s1=this._s2,this._s2=t,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var r=K.computeOrientation(this._s0,this._s1,this._s2),i=r===K.CLOCKWISE&&this._side===B.LEFT||r===K.COUNTERCLOCKWISE&&this._side===B.RIGHT;r===0?this.addCollinear(e):i?this.addOutsideTurn(r,e):this.addInsideTurn(r,e)},se.prototype.addLineEndCap=function(t,e){var r=new ut(t,e),i=new ut;this.computeOffsetSegment(r,B.LEFT,this._distance,i);var s=new ut;this.computeOffsetSegment(r,B.RIGHT,this._distance,s);var o=e.x-t.x,a=e.y-t.y,u=Math.atan2(a,o);switch(this._bufParams.getEndCapStyle()){case zt.CAP_ROUND:this._segList.addPt(i.p1),this.addFilletArc(e,u+Math.PI/2,u-Math.PI/2,K.CLOCKWISE,this._distance),this._segList.addPt(s.p1);break;case zt.CAP_FLAT:this._segList.addPt(i.p1),this._segList.addPt(s.p1);break;case zt.CAP_SQUARE:var l=new D;l.x=Math.abs(this._distance)*Math.cos(u),l.y=Math.abs(this._distance)*Math.sin(u);var c=new D(i.p1.x+l.x,i.p1.y+l.y),h=new D(s.p1.x+l.x,s.p1.y+l.y);this._segList.addPt(c),this._segList.addPt(h);break}},se.prototype.getCoordinates=function(){var t=this._segList.getCoordinates();return t},se.prototype.addMitreJoin=function(t,e,r,i){var s=!0,o=null;try{o=un.intersection(e.p0,e.p1,r.p0,r.p1);var a=i<=0?1:o.distance(t)/Math.abs(i);a>this._bufParams.getMitreLimit()&&(s=!1)}catch(u){if(u instanceof wa)o=new D(0,0),s=!1;else throw u}finally{}s?this._segList.addPt(o):this.addLimitedMitreJoin(e,r,i,this._bufParams.getMitreLimit())},se.prototype.addFilletCorner=function(t,e,r,i,s){var o=e.x-t.x,a=e.y-t.y,u=Math.atan2(a,o),l=r.x-t.x,c=r.y-t.y,h=Math.atan2(c,l);i===K.CLOCKWISE?u<=h&&(u+=2*Math.PI):u>=h&&(u-=2*Math.PI),this._segList.addPt(e),this.addFilletArc(t,u,h,i,s),this._segList.addPt(r)},se.prototype.addOutsideTurn=function(t,e){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*se.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===zt.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===zt.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(e&&this._segList.addPt(this._offset0.p1),this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,t,this._distance),this._segList.addPt(this._offset1.p0))},se.prototype.createSquare=function(t){this._segList.addPt(new D(t.x+this._distance,t.y+this._distance)),this._segList.addPt(new D(t.x+this._distance,t.y-this._distance)),this._segList.addPt(new D(t.x-this._distance,t.y-this._distance)),this._segList.addPt(new D(t.x-this._distance,t.y+this._distance)),this._segList.closeRing()},se.prototype.addSegments=function(t,e){this._segList.addPts(t,e)},se.prototype.addFirstSegment=function(){this._segList.addPt(this._offset1.p0)},se.prototype.addLastSegment=function(){this._segList.addPt(this._offset1.p1)},se.prototype.initSideSegments=function(t,e,r){this._s1=t,this._s2=e,this._side=r,this._seg1.setCoordinates(t,e),this.computeOffsetSegment(this._seg1,r,this._distance,this._offset1)},se.prototype.addLimitedMitreJoin=function(t,e,r,i){var s=this._seg0.p1,o=At.angle(s,this._seg0.p0),a=At.angleBetweenOriented(this._seg0.p0,s,this._seg1.p1),u=a/2,l=At.normalize(o+u),c=At.normalize(l+Math.PI),h=i*r,f=h*Math.abs(Math.sin(u)),d=r-f,v=s.x+h*Math.cos(c),_=s.y+h*Math.sin(c),E=new D(v,_),P=new ut(s,E),y=P.pointAlongOffset(1,d),w=P.pointAlongOffset(1,-d);this._side===B.LEFT?(this._segList.addPt(y),this._segList.addPt(w)):(this._segList.addPt(w),this._segList.addPt(y))},se.prototype.computeOffsetSegment=function(t,e,r,i){var s=e===B.LEFT?1:-1,o=t.p1.x-t.p0.x,a=t.p1.y-t.p0.y,u=Math.sqrt(o*o+a*a),l=s*r*o/u,c=s*r*a/u;i.p0.x=t.p0.x-c,i.p0.y=t.p0.y+l,i.p1.x=t.p1.x-c,i.p1.y=t.p1.y+l},se.prototype.addFilletArc=function(t,e,r,i,s){var o=this,a=i===K.CLOCKWISE?-1:1,u=Math.abs(e-r),l=Math.trunc(u/this._filletAngleQuantum+.5);if(l<1)return null;for(var c=0,h=u/l,f=c,d=new D;f<u;){var v=e+a*f;d.x=t.x+s*Math.cos(v),d.y=t.y+s*Math.sin(v),o._segList.addPt(d),f+=h}},se.prototype.addInsideTurn=function(t,e){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*se.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var r=new D((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(r);var i=new D((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(i)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}},se.prototype.createCircle=function(t){var e=new D(t.x+this._distance,t.y);this._segList.addPt(e),this.addFilletArc(t,0,2*Math.PI,-1,this._distance),this._segList.closeRing()},se.prototype.addBevelJoin=function(t,e){this._segList.addPt(t.p1),this._segList.addPt(e.p0)},se.prototype.init=function(t){this._distance=t,this._maxCurveSegmentError=t*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new Fr,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(t*se.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)},se.prototype.addCollinear=function(t){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2);var e=this._li.getIntersectionNum();e>=2&&(this._bufParams.getJoinStyle()===zt.JOIN_BEVEL||this._bufParams.getJoinStyle()===zt.JOIN_MITRE?(t&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addFilletCorner(this._s1,this._offset0.p1,this._offset1.p0,K.CLOCKWISE,this._distance))},se.prototype.closeRing=function(){this._segList.closeRing()},se.prototype.hasNarrowConcaveAngle=function(){return this._hasNarrowConcaveAngle},se.prototype.interfaces_=function(){return[]},se.prototype.getClass=function(){return se},El.OFFSET_SEGMENT_SEPARATION_FACTOR.get=function(){return .001},El.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return .001},El.CURVE_VERTEX_SNAP_DISTANCE_FACTOR.get=function(){return 1e-6},El.MAX_CLOSING_SEG_LEN_FACTOR.get=function(){return 80},Object.defineProperties(se,El);var lr=function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var t=arguments[0],e=arguments[1];this._precisionModel=t,this._bufParams=e};lr.prototype.getOffsetCurve=function(t,e){if(this._distance=e,e===0)return null;var r=e<0,i=Math.abs(e),s=this.getSegGen(i);t.length<=1?this.computePointCurve(t[0],s):this.computeOffsetCurve(t,r,s);var o=s.getCoordinates();return r&&Nt.reverse(o),o},lr.prototype.computeSingleSidedBufferCurve=function(t,e,r){var i=this.simplifyTolerance(this._distance);if(e){r.addSegments(t,!0);var s=fe.simplify(t,-i),o=s.length-1;r.initSideSegments(s[o],s[o-1],B.LEFT),r.addFirstSegment();for(var a=o-2;a>=0;a--)r.addNextSegment(s[a],!0)}else{r.addSegments(t,!1);var u=fe.simplify(t,i),l=u.length-1;r.initSideSegments(u[0],u[1],B.LEFT),r.addFirstSegment();for(var c=2;c<=l;c++)r.addNextSegment(u[c],!0)}r.addLastSegment(),r.closeRing()},lr.prototype.computeRingBufferCurve=function(t,e,r){var i=this.simplifyTolerance(this._distance);e===B.RIGHT&&(i=-i);var s=fe.simplify(t,i),o=s.length-1;r.initSideSegments(s[o-1],s[0],e);for(var a=1;a<=o;a++){var u=a!==1;r.addNextSegment(s[a],u)}r.closeRing()},lr.prototype.computeLineBufferCurve=function(t,e){var r=this.simplifyTolerance(this._distance),i=fe.simplify(t,r),s=i.length-1;e.initSideSegments(i[0],i[1],B.LEFT);for(var o=2;o<=s;o++)e.addNextSegment(i[o],!0);e.addLastSegment(),e.addLineEndCap(i[s-1],i[s]);var a=fe.simplify(t,-r),u=a.length-1;e.initSideSegments(a[u],a[u-1],B.LEFT);for(var l=u-2;l>=0;l--)e.addNextSegment(a[l],!0);e.addLastSegment(),e.addLineEndCap(a[1],a[0]),e.closeRing()},lr.prototype.computePointCurve=function(t,e){switch(this._bufParams.getEndCapStyle()){case zt.CAP_ROUND:e.createCircle(t);break;case zt.CAP_SQUARE:e.createSquare(t);break}},lr.prototype.getLineCurve=function(t,e){if(this._distance=e,e<0&&!this._bufParams.isSingleSided()||e===0)return null;var r=Math.abs(e),i=this.getSegGen(r);if(t.length<=1)this.computePointCurve(t[0],i);else if(this._bufParams.isSingleSided()){var s=e<0;this.computeSingleSidedBufferCurve(t,s,i)}else this.computeLineBufferCurve(t,i);var o=i.getCoordinates();return o},lr.prototype.getBufferParameters=function(){return this._bufParams},lr.prototype.simplifyTolerance=function(t){return t*this._bufParams.getSimplifyFactor()},lr.prototype.getRingCurve=function(t,e,r){if(this._distance=r,t.length<=2)return this.getLineCurve(t,r);if(r===0)return lr.copyCoordinates(t);var i=this.getSegGen(r);return this.computeRingBufferCurve(t,e,i),i.getCoordinates()},lr.prototype.computeOffsetCurve=function(t,e,r){var i=this.simplifyTolerance(this._distance);if(e){var s=fe.simplify(t,-i),o=s.length-1;r.initSideSegments(s[o],s[o-1],B.LEFT),r.addFirstSegment();for(var a=o-2;a>=0;a--)r.addNextSegment(s[a],!0)}else{var u=fe.simplify(t,i),l=u.length-1;r.initSideSegments(u[0],u[1],B.LEFT),r.addFirstSegment();for(var c=2;c<=l;c++)r.addNextSegment(u[c],!0)}r.addLastSegment()},lr.prototype.getSegGen=function(t){return new se(this._precisionModel,this._bufParams,t)},lr.prototype.interfaces_=function(){return[]},lr.prototype.getClass=function(){return lr},lr.copyCoordinates=function(t){for(var e=new Array(t.length).fill(null),r=0;r<e.length;r++)e[r]=new D(t[r]);return e};var Po=function(){this._subgraphs=null,this._seg=new ut,this._cga=new K;var t=arguments[0];this._subgraphs=t},Sv={DepthSegment:{configurable:!0}};Po.prototype.findStabbedSegments=function(){var t=this;if(arguments.length===1){for(var e=arguments[0],r=new j,i=this._subgraphs.iterator();i.hasNext();){var s=i.next(),o=s.getEnvelope();e.y<o.getMinY()||e.y>o.getMaxY()||t.findStabbedSegments(e,s.getDirectedEdges(),r)}return r}else if(arguments.length===3){if(pt(arguments[2],hn)&&arguments[0]instanceof D&&arguments[1]instanceof Ff)for(var a=arguments[0],u=arguments[1],l=arguments[2],c=u.getEdge().getCoordinates(),h=0;h<c.length-1;h++){t._seg.p0=c[h],t._seg.p1=c[h+1],t._seg.p0.y>t._seg.p1.y&&t._seg.reverse();var f=Math.max(t._seg.p0.x,t._seg.p1.x);if(!(f<a.x)&&!t._seg.isHorizontal()&&!(a.y<t._seg.p0.y||a.y>t._seg.p1.y)&&K.computeOrientation(t._seg.p0,t._seg.p1,a)!==K.RIGHT){var d=u.getDepth(B.LEFT);t._seg.p0.equals(c[h])||(d=u.getDepth(B.RIGHT));var v=new ks(t._seg,d);l.add(v)}}else if(pt(arguments[2],hn)&&arguments[0]instanceof D&&pt(arguments[1],hn))for(var _=arguments[0],E=arguments[1],P=arguments[2],y=E.iterator();y.hasNext();){var w=y.next();w.isForward()&&t.findStabbedSegments(_,w,P)}}},Po.prototype.getDepth=function(t){var e=this.findStabbedSegments(t);if(e.size()===0)return 0;var r=gn.min(e);return r._leftDepth},Po.prototype.interfaces_=function(){return[]},Po.prototype.getClass=function(){return Po},Sv.DepthSegment.get=function(){return ks},Object.defineProperties(Po,Sv);var ks=function(){this._upwardSeg=null,this._leftDepth=null;var t=arguments[0],e=arguments[1];this._upwardSeg=new ut(t),this._leftDepth=e};ks.prototype.compareTo=function(t){var e=t;if(this._upwardSeg.minX()>=e._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=e._upwardSeg.minX())return-1;var r=this._upwardSeg.orientationIndex(e._upwardSeg);return r!==0||(r=-1*e._upwardSeg.orientationIndex(this._upwardSeg),r!==0)?r:this._upwardSeg.compareTo(e._upwardSeg)},ks.prototype.compareX=function(t,e){var r=t.p0.compareTo(e.p0);return r!==0?r:t.p1.compareTo(e.p1)},ks.prototype.toString=function(){return this._upwardSeg.toString()},ks.prototype.interfaces_=function(){return[Yr]},ks.prototype.getClass=function(){return ks};var qt=function(t,e,r){this.p0=t||null,this.p1=e||null,this.p2=r||null};qt.prototype.area=function(){return qt.area(this.p0,this.p1,this.p2)},qt.prototype.signedArea=function(){return qt.signedArea(this.p0,this.p1,this.p2)},qt.prototype.interpolateZ=function(t){if(t===null)throw new ae("Supplied point is null.");return qt.interpolateZ(t,this.p0,this.p1,this.p2)},qt.prototype.longestSideLength=function(){return qt.longestSideLength(this.p0,this.p1,this.p2)},qt.prototype.isAcute=function(){return qt.isAcute(this.p0,this.p1,this.p2)},qt.prototype.circumcentre=function(){return qt.circumcentre(this.p0,this.p1,this.p2)},qt.prototype.area3D=function(){return qt.area3D(this.p0,this.p1,this.p2)},qt.prototype.centroid=function(){return qt.centroid(this.p0,this.p1,this.p2)},qt.prototype.inCentre=function(){return qt.inCentre(this.p0,this.p1,this.p2)},qt.prototype.interfaces_=function(){return[]},qt.prototype.getClass=function(){return qt},qt.area=function(t,e,r){return Math.abs(((r.x-t.x)*(e.y-t.y)-(e.x-t.x)*(r.y-t.y))/2)},qt.signedArea=function(t,e,r){return((r.x-t.x)*(e.y-t.y)-(e.x-t.x)*(r.y-t.y))/2},qt.det=function(t,e,r,i){return t*i-e*r},qt.interpolateZ=function(t,e,r,i){var s=e.x,o=e.y,a=r.x-s,u=i.x-s,l=r.y-o,c=i.y-o,h=a*c-u*l,f=t.x-s,d=t.y-o,v=(c*f-u*d)/h,_=(-l*f+a*d)/h,E=e.z+v*(r.z-e.z)+_*(i.z-e.z);return E},qt.longestSideLength=function(t,e,r){var i=t.distance(e),s=e.distance(r),o=r.distance(t),a=i;return s>a&&(a=s),o>a&&(a=o),a},qt.isAcute=function(t,e,r){return!(!At.isAcute(t,e,r)||!At.isAcute(e,r,t)||!At.isAcute(r,t,e))},qt.circumcentre=function(t,e,r){var i=r.x,s=r.y,o=t.x-i,a=t.y-s,u=e.x-i,l=e.y-s,c=2*qt.det(o,a,u,l),h=qt.det(a,o*o+a*a,l,u*u+l*l),f=qt.det(o,o*o+a*a,u,u*u+l*l),d=i-h/c,v=s+f/c;return new D(d,v)},qt.perpendicularBisector=function(t,e){var r=e.x-t.x,i=e.y-t.y,s=new un(t.x+r/2,t.y+i/2,1),o=new un(t.x-i+r/2,t.y+r+i/2,1);return new un(s,o)},qt.angleBisector=function(t,e,r){var i=e.distance(t),s=e.distance(r),o=i/(i+s),a=r.x-t.x,u=r.y-t.y,l=new D(t.x+o*a,t.y+o*u);return l},qt.area3D=function(t,e,r){var i=e.x-t.x,s=e.y-t.y,o=e.z-t.z,a=r.x-t.x,u=r.y-t.y,l=r.z-t.z,c=s*l-o*u,h=o*a-i*l,f=i*u-s*a,d=c*c+h*h+f*f,v=Math.sqrt(d)/2;return v},qt.centroid=function(t,e,r){var i=(t.x+e.x+r.x)/3,s=(t.y+e.y+r.y)/3;return new D(i,s)},qt.inCentre=function(t,e,r){var i=e.distance(r),s=t.distance(r),o=t.distance(e),a=i+s+o,u=(i*t.x+s*e.x+o*r.x)/a,l=(i*t.y+s*e.y+o*r.y)/a;return new D(u,l)};var Zr=function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new j;var t=arguments[0],e=arguments[1],r=arguments[2];this._inputGeom=t,this._distance=e,this._curveBuilder=r};Zr.prototype.addPoint=function(t){if(this._distance<=0)return null;var e=t.getCoordinates(),r=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(r,F.EXTERIOR,F.INTERIOR)},Zr.prototype.addPolygon=function(t){var e=this,r=this._distance,i=B.LEFT;this._distance<0&&(r=-this._distance,i=B.RIGHT);var s=t.getExteriorRing(),o=Nt.removeRepeatedPoints(s.getCoordinates());if(this._distance<0&&this.isErodedCompletely(s,this._distance)||this._distance<=0&&o.length<3)return null;this.addPolygonRing(o,r,i,F.EXTERIOR,F.INTERIOR);for(var a=0;a<t.getNumInteriorRing();a++){var u=t.getInteriorRingN(a),l=Nt.removeRepeatedPoints(u.getCoordinates());e._distance>0&&e.isErodedCompletely(u,-e._distance)||e.addPolygonRing(l,r,B.opposite(i),F.INTERIOR,F.EXTERIOR)}},Zr.prototype.isTriangleErodedCompletely=function(t,e){var r=new qt(t[0],t[1],t[2]),i=r.inCentre(),s=K.distancePointLine(i,r.p0,r.p1);return s<Math.abs(e)},Zr.prototype.addLineString=function(t){if(this._distance<=0&&!this._curveBuilder.getBufferParameters().isSingleSided())return null;var e=Nt.removeRepeatedPoints(t.getCoordinates()),r=this._curveBuilder.getLineCurve(e,this._distance);this.addCurve(r,F.EXTERIOR,F.INTERIOR)},Zr.prototype.addCurve=function(t,e,r){if(t===null||t.length<2)return null;var i=new ve(t,new Yt(0,F.BOUNDARY,e,r));this._curveList.add(i)},Zr.prototype.getCurves=function(){return this.add(this._inputGeom),this._curveList},Zr.prototype.addPolygonRing=function(t,e,r,i,s){if(e===0&&t.length<si.MINIMUM_VALID_SIZE)return null;var o=i,a=s;t.length>=si.MINIMUM_VALID_SIZE&&K.isCCW(t)&&(o=s,a=i,r=B.opposite(r));var u=this._curveBuilder.getRingCurve(t,r,e);this.addCurve(u,o,a)},Zr.prototype.add=function(t){if(t.isEmpty())return null;t instanceof Ie?this.addPolygon(t):t instanceof ce?this.addLineString(t):t instanceof _r?this.addPoint(t):t instanceof xa?this.addCollection(t):t instanceof Fs?this.addCollection(t):t instanceof oi?this.addCollection(t):t instanceof Qe&&this.addCollection(t)},Zr.prototype.isErodedCompletely=function(t,e){var r=t.getCoordinates();if(r.length<4)return e<0;if(r.length===4)return this.isTriangleErodedCompletely(r,e);var i=t.getEnvelopeInternal(),s=Math.min(i.getHeight(),i.getWidth());return e<0&&2*Math.abs(e)>s},Zr.prototype.addCollection=function(t){for(var e=this,r=0;r<t.getNumGeometries();r++){var i=t.getGeometryN(r);e.add(i)}},Zr.prototype.interfaces_=function(){return[]},Zr.prototype.getClass=function(){return Zr};var Da=function(){};Da.prototype.locate=function(t){},Da.prototype.interfaces_=function(){return[]},Da.prototype.getClass=function(){return Da};var li=function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var t=arguments[0];this._parent=t,this._atStart=!0,this._index=0,this._max=t.getNumGeometries()};li.prototype.next=function(){if(this._atStart)return this._atStart=!1,li.isAtomic(this._parent)&&this._index++,this._parent;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new ba;var t=this._parent.getGeometryN(this._index++);return t instanceof Qe?(this._subcollectionIterator=new li(t),this._subcollectionIterator.next()):t},li.prototype.remove=function(){throw new Error(this.getClass().getName())},li.prototype.hasNext=function(){if(this._atStart)return!0;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)},li.prototype.interfaces_=function(){return[Ma]},li.prototype.getClass=function(){return li},li.isAtomic=function(t){return!(t instanceof Qe)};var Gr=function(){this._geom=null;var t=arguments[0];this._geom=t};Gr.prototype.locate=function(t){return Gr.locate(t,this._geom)},Gr.prototype.interfaces_=function(){return[Da]},Gr.prototype.getClass=function(){return Gr},Gr.isPointInRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?K.isPointInRing(t,e.getCoordinates()):!1},Gr.containsPointInPolygon=function(t,e){if(e.isEmpty())return!1;var r=e.getExteriorRing();if(!Gr.isPointInRing(t,r))return!1;for(var i=0;i<e.getNumInteriorRing();i++){var s=e.getInteriorRingN(i);if(Gr.isPointInRing(t,s))return!1}return!0},Gr.containsPoint=function(t,e){if(e instanceof Ie)return Gr.containsPointInPolygon(t,e);if(e instanceof Qe)for(var r=new li(e);r.hasNext();){var i=r.next();if(i!==e&&Gr.containsPoint(t,i))return!0}return!1},Gr.locate=function(t,e){return e.isEmpty()?F.EXTERIOR:Gr.containsPoint(t,e)?F.INTERIOR:F.EXTERIOR};var Be=function(){this._edgeMap=new He,this._edgeList=null,this._ptInAreaLocation=[F.NONE,F.NONE]};Be.prototype.getNextCW=function(t){this.getEdges();var e=this._edgeList.indexOf(t),r=e-1;return e===0&&(r=this._edgeList.size()-1),this._edgeList.get(r)},Be.prototype.propagateSideLabels=function(t){for(var e=F.NONE,r=this.iterator();r.hasNext();){var i=r.next(),s=i.getLabel();s.isArea(t)&&s.getLocation(t,B.LEFT)!==F.NONE&&(e=s.getLocation(t,B.LEFT))}if(e===F.NONE)return null;for(var o=e,a=this.iterator();a.hasNext();){var u=a.next(),l=u.getLabel();if(l.getLocation(t,B.ON)===F.NONE&&l.setLocation(t,B.ON,o),l.isArea(t)){var c=l.getLocation(t,B.LEFT),h=l.getLocation(t,B.RIGHT);if(h!==F.NONE){if(h!==o)throw new Ri("side location conflict",u.getCoordinate());c===F.NONE&&Pt.shouldNeverReachHere("found single null side (at "+u.getCoordinate()+")"),o=c}else Pt.isTrue(l.getLocation(t,B.LEFT)===F.NONE,"found single null side"),l.setLocation(t,B.RIGHT,o),l.setLocation(t,B.LEFT,o)}}},Be.prototype.getCoordinate=function(){var t=this.iterator();if(!t.hasNext())return null;var e=t.next();return e.getCoordinate()},Be.prototype.print=function(t){Le.out.println("EdgeEndStar: "+this.getCoordinate());for(var e=this.iterator();e.hasNext();){var r=e.next();r.print(t)}},Be.prototype.isAreaLabelsConsistent=function(t){return this.computeEdgeEndLabels(t.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)},Be.prototype.checkAreaLabelsConsistent=function(t){var e=this.getEdges();if(e.size()<=0)return!0;var r=e.size()-1,i=e.get(r).getLabel(),s=i.getLocation(t,B.LEFT);Pt.isTrue(s!==F.NONE,"Found unlabelled area edge");for(var o=s,a=this.iterator();a.hasNext();){var u=a.next(),l=u.getLabel();Pt.isTrue(l.isArea(t),"Found non-area edge");var c=l.getLocation(t,B.LEFT),h=l.getLocation(t,B.RIGHT);if(c===h||h!==o)return!1;o=c}return!0},Be.prototype.findIndex=function(t){var e=this;this.iterator();for(var r=0;r<this._edgeList.size();r++){var i=e._edgeList.get(r);if(i===t)return r}return-1},Be.prototype.iterator=function(){return this.getEdges().iterator()},Be.prototype.getEdges=function(){return this._edgeList===null&&(this._edgeList=new j(this._edgeMap.values())),this._edgeList},Be.prototype.getLocation=function(t,e,r){return this._ptInAreaLocation[t]===F.NONE&&(this._ptInAreaLocation[t]=Gr.locate(e,r[t].getGeometry())),this._ptInAreaLocation[t]},Be.prototype.toString=function(){var t=new In;t.append("EdgeEndStar: "+this.getCoordinate()),t.append(`
67
67
  `);for(var e=this.iterator();e.hasNext();){var r=e.next();t.append(r),t.append(`
68
- `)}return t.toString()},Be.prototype.computeEdgeEndLabels=function(t){for(var e=this.iterator();e.hasNext();){var r=e.next();r.computeLabel(t)}},Be.prototype.computeLabelling=function(t){var e=this;this.computeEdgeEndLabels(t[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var r=[!1,!1],i=this.iterator();i.hasNext();)for(var s=i.next(),o=s.getLabel(),a=0;a<2;a++)o.isLine(a)&&o.getLocation(a)===F.BOUNDARY&&(r[a]=!0);for(var u=this.iterator();u.hasNext();)for(var l=u.next(),c=l.getLabel(),h=0;h<2;h++)if(c.isAnyNull(h)){var f=F.NONE;if(r[h])f=F.EXTERIOR;else{var d=l.getCoordinate();f=e.getLocation(h,d,t)}c.setAllLocationsIfNull(h,f)}},Be.prototype.getDegree=function(){return this._edgeMap.size()},Be.prototype.insertEdgeEnd=function(t,e){this._edgeMap.put(t,e),this._edgeList=null},Be.prototype.interfaces_=function(){return[]},Be.prototype.getClass=function(){return Be};var SI=function(n){function t(){n.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.linkResultDirectedEdges=function(){var r=this;this.getResultAreaEdges();for(var i=null,s=null,o=this._SCANNING_FOR_INCOMING,a=0;a<this._resultAreaEdgeList.size();a++){var u=r._resultAreaEdgeList.get(a),l=u.getSym();if(u.getLabel().isArea())switch(i===null&&u.isInResult()&&(i=u),o){case r._SCANNING_FOR_INCOMING:if(!l.isInResult())continue;s=l,o=r._LINKING_TO_OUTGOING;break;case r._LINKING_TO_OUTGOING:if(!u.isInResult())continue;s.setNext(u),o=r._SCANNING_FOR_INCOMING;break}}if(o===this._LINKING_TO_OUTGOING){if(i===null)throw new Ri("no outgoing dirEdge found",this.getCoordinate());Pt.isTrue(i.isInResult(),"unable to link last incoming dirEdge"),s.setNext(i)}},t.prototype.insert=function(r){var i=r;this.insertEdgeEnd(i,i)},t.prototype.getRightmostEdge=function(){var r=this.getEdges(),i=r.size();if(i<1)return null;var s=r.get(0);if(i===1)return s;var o=r.get(i-1),a=s.getQuadrant(),u=o.getQuadrant();return Jt.isNorthern(a)&&Jt.isNorthern(u)?s:!Jt.isNorthern(a)&&!Jt.isNorthern(u)?o:s.getDy()!==0?s:o.getDy()!==0?o:(Pt.shouldNeverReachHere("found two horizontal edges incident on node"),null)},t.prototype.print=function(r){Le.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var i=this.iterator();i.hasNext();){var s=i.next();r.print("out "),s.print(r),r.println(),r.print("in "),s.getSym().print(r),r.println()}},t.prototype.getResultAreaEdges=function(){var r=this;if(this._resultAreaEdgeList!==null)return this._resultAreaEdgeList;this._resultAreaEdgeList=new j;for(var i=this.iterator();i.hasNext();){var s=i.next();(s.isInResult()||s.getSym().isInResult())&&r._resultAreaEdgeList.add(s)}return this._resultAreaEdgeList},t.prototype.updateLabelling=function(r){for(var i=this.iterator();i.hasNext();){var s=i.next(),o=s.getLabel();o.setAllLocationsIfNull(0,r.getLocation(0)),o.setAllLocationsIfNull(1,r.getLocation(1))}},t.prototype.linkAllDirectedEdges=function(){var r=this;this.getEdges();for(var i=null,s=null,o=this._edgeList.size()-1;o>=0;o--){var a=r._edgeList.get(o),u=a.getSym();s===null&&(s=u),i!==null&&u.setNext(i),i=a}s.setNext(i)},t.prototype.computeDepths=function(){var r=this;if(arguments.length===1){var i=arguments[0],s=this.findIndex(i),o=i.getDepth(B.LEFT),a=i.getDepth(B.RIGHT),u=this.computeDepths(s+1,this._edgeList.size(),o),l=this.computeDepths(0,s,u);if(l!==a)throw new Ri("depth mismatch at "+i.getCoordinate())}else if(arguments.length===3){for(var c=arguments[0],h=arguments[1],f=arguments[2],d=f,v=c;v<h;v++){var _=r._edgeList.get(v);_.setEdgeDepths(B.RIGHT,d),d=_.getDepth(B.LEFT)}return d}},t.prototype.mergeSymLabels=function(){for(var r=this.iterator();r.hasNext();){var i=r.next(),s=i.getLabel();s.merge(i.getSym().getLabel())}},t.prototype.linkMinimalDirectedEdges=function(r){for(var i=this,s=null,o=null,a=this._SCANNING_FOR_INCOMING,u=this._resultAreaEdgeList.size()-1;u>=0;u--){var l=i._resultAreaEdgeList.get(u),c=l.getSym();switch(s===null&&l.getEdgeRing()===r&&(s=l),a){case i._SCANNING_FOR_INCOMING:if(c.getEdgeRing()!==r)continue;o=c,a=i._LINKING_TO_OUTGOING;break;case i._LINKING_TO_OUTGOING:if(l.getEdgeRing()!==r)continue;o.setNextMin(l),a=i._SCANNING_FOR_INCOMING;break}}a===this._LINKING_TO_OUTGOING&&(Pt.isTrue(s!==null,"found null for first outgoing dirEdge"),Pt.isTrue(s.getEdgeRing()===r,"unable to link last incoming dirEdge"),o.setNextMin(s))},t.prototype.getOutgoingDegree=function(){if(arguments.length===0){for(var r=0,i=this.iterator();i.hasNext();){var s=i.next();s.isInResult()&&r++}return r}else if(arguments.length===1){for(var o=arguments[0],a=0,u=this.iterator();u.hasNext();){var l=u.next();l.getEdgeRing()===o&&a++}return a}},t.prototype.getLabel=function(){return this._label},t.prototype.findCoveredLineEdges=function(){for(var r=F.NONE,i=this.iterator();i.hasNext();){var s=i.next(),o=s.getSym();if(!s.isLineEdge()){if(s.isInResult()){r=F.INTERIOR;break}if(o.isInResult()){r=F.EXTERIOR;break}}}if(r===F.NONE)return null;for(var a=r,u=this.iterator();u.hasNext();){var l=u.next(),c=l.getSym();l.isLineEdge()?l.getEdge().setCovered(a===F.INTERIOR):(l.isInResult()&&(a=F.EXTERIOR),c.isInResult()&&(a=F.INTERIOR))}},t.prototype.computeLabelling=function(r){var i=this;n.prototype.computeLabelling.call(this,r),this._label=new Yt(F.NONE);for(var s=this.iterator();s.hasNext();)for(var o=s.next(),a=o.getEdge(),u=a.getLabel(),l=0;l<2;l++){var c=u.getLocation(l);(c===F.INTERIOR||c===F.BOUNDARY)&&i._label.setLocation(l,F.INTERIOR)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Be),Cv=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.createNode=function(r){return new Dh(r,new SI)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Ta),os=function n(){this._pts=null,this._orientation=null;var t=arguments[0];this._pts=t,this._orientation=n.orientation(t)};os.prototype.compareTo=function(t){var e=t,r=os.compareOriented(this._pts,this._orientation,e._pts,e._orientation);return r},os.prototype.interfaces_=function(){return[Yr]},os.prototype.getClass=function(){return os},os.orientation=function(t){return Nt.increasingDirection(t)===1},os.compareOriented=function(t,e,r,i){for(var s=e?1:-1,o=i?1:-1,a=e?t.length:-1,u=i?r.length:-1,l=e?0:t.length-1,c=i?0:r.length-1;;){var h=t[l].compareTo(r[c]);if(h!==0)return h;l+=s,c+=o;var f=l===a,d=c===u;if(f&&!d)return-1;if(!f&&d)return 1;if(f&&d)return 0}};var pn=function(){this._edges=new j,this._ocaMap=new He};pn.prototype.print=function(t){var e=this;t.print("MULTILINESTRING ( ");for(var r=0;r<this._edges.size();r++){var i=e._edges.get(r);r>0&&t.print(","),t.print("(");for(var s=i.getCoordinates(),o=0;o<s.length;o++)o>0&&t.print(","),t.print(s[o].x+" "+s[o].y);t.println(")")}t.print(") ")},pn.prototype.addAll=function(t){for(var e=this,r=t.iterator();r.hasNext();)e.add(r.next())},pn.prototype.findEdgeIndex=function(t){for(var e=this,r=0;r<this._edges.size();r++)if(e._edges.get(r).equals(t))return r;return-1},pn.prototype.iterator=function(){return this._edges.iterator()},pn.prototype.getEdges=function(){return this._edges},pn.prototype.get=function(t){return this._edges.get(t)},pn.prototype.findEqualEdge=function(t){var e=new os(t.getCoordinates()),r=this._ocaMap.get(e);return r},pn.prototype.add=function(t){this._edges.add(t);var e=new os(t.getCoordinates());this._ocaMap.put(e,t)},pn.prototype.interfaces_=function(){return[]},pn.prototype.getClass=function(){return pn};var Vs=function(){};Vs.prototype.processIntersections=function(t,e,r,i){},Vs.prototype.isDone=function(){},Vs.prototype.interfaces_=function(){return[]},Vs.prototype.getClass=function(){return Vs};var kr=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var t=arguments[0];this._li=t};kr.prototype.isTrivialIntersection=function(t,e,r,i){if(t===r&&this._li.getIntersectionNum()===1){if(kr.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var s=t.size()-1;if(e===0&&i===s||i===0&&e===s)return!0}}return!1},kr.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},kr.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},kr.prototype.getLineIntersector=function(){return this._li},kr.prototype.hasProperIntersection=function(){return this._hasProper},kr.prototype.processIntersections=function(t,e,r,i){if(t===r&&e===i)return null;this.numTests++;var s=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=r.getCoordinates()[i],u=r.getCoordinates()[i+1];this._li.computeIntersection(s,o,a,u),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(t,e,r,i)||(this._hasIntersection=!0,t.addIntersections(this._li,e,0),r.addIntersections(this._li,i,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},kr.prototype.hasIntersection=function(){return this._hasIntersection},kr.prototype.isDone=function(){return!1},kr.prototype.hasInteriorIntersection=function(){return this._hasInterior},kr.prototype.interfaces_=function(){return[Vs]},kr.prototype.getClass=function(){return kr},kr.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var Gn=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var t=arguments[0],e=arguments[1],r=arguments[2];this.coord=new D(t),this.segmentIndex=e,this.dist=r};Gn.prototype.getSegmentIndex=function(){return this.segmentIndex},Gn.prototype.getCoordinate=function(){return this.coord},Gn.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex),t.println(" dist = "+this.dist)},Gn.prototype.compareTo=function(t){var e=t;return this.compare(e.segmentIndex,e.dist)},Gn.prototype.isEndPoint=function(t){return this.segmentIndex===0&&this.dist===0||this.segmentIndex===t},Gn.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},Gn.prototype.getDistance=function(){return this.dist},Gn.prototype.compare=function(t,e){return this.segmentIndex<t?-1:this.segmentIndex>t?1:this.dist<e?-1:this.dist>e?1:0},Gn.prototype.interfaces_=function(){return[Yr]},Gn.prototype.getClass=function(){return Gn};var hi=function(){this._nodeMap=new He,this.edge=null;var t=arguments[0];this.edge=t};hi.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var r=e.next();r.print(t)}},hi.prototype.iterator=function(){return this._nodeMap.values().iterator()},hi.prototype.addSplitEdges=function(t){var e=this;this.addEndpoints();for(var r=this.iterator(),i=r.next();r.hasNext();){var s=r.next(),o=e.createSplitEdge(i,s);t.add(o),i=s}},hi.prototype.addEndpoints=function(){var t=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[t],t,0)},hi.prototype.createSplitEdge=function(t,e){var r=this,i=e.segmentIndex-t.segmentIndex+2,s=this.edge.pts[e.segmentIndex],o=e.dist>0||!e.coord.equals2D(s);o||i--;var a=new Array(i).fill(null),u=0;a[u++]=new D(t.coord);for(var l=t.segmentIndex+1;l<=e.segmentIndex;l++)a[u++]=r.edge.pts[l];return o&&(a[u]=e.coord),new Rh(a,new Yt(this.edge._label))},hi.prototype.add=function(t,e,r){var i=new Gn(t,e,r),s=this._nodeMap.get(i);return s!==null?s:(this._nodeMap.put(i,i),i)},hi.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();){var r=e.next();if(r.coord.equals(t))return!0}return!1},hi.prototype.interfaces_=function(){return[]},hi.prototype.getClass=function(){return hi};var Us=function(){};Us.prototype.getChainStartIndices=function(t){var e=this,r=0,i=new j;i.add(new Mn(r));do{var s=e.findChainEnd(t,r);i.add(new Mn(s)),r=s}while(r<t.length-1);var o=Us.toIntArray(i);return o},Us.prototype.findChainEnd=function(t,e){for(var r=Jt.quadrant(t[e],t[e+1]),i=e+1;i<t.length;){var s=Jt.quadrant(t[i-1],t[i]);if(s!==r)break;i++}return i-1},Us.prototype.interfaces_=function(){return[]},Us.prototype.getClass=function(){return Us},Us.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),r=0;r<e.length;r++)e[r]=t.get(r).intValue();return e};var ki=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new at,this.env2=new at;var t=arguments[0];this.e=t,this.pts=t.getCoordinates();var e=new Us;this.startIndex=e.getChainStartIndices(this.pts)};ki.prototype.getCoordinates=function(){return this.pts},ki.prototype.getMaxX=function(t){var e=this.pts[this.startIndex[t]].x,r=this.pts[this.startIndex[t+1]].x;return e>r?e:r},ki.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,r=this.pts[this.startIndex[t+1]].x;return e<r?e:r},ki.prototype.computeIntersectsForChain=function(){if(arguments.length===4){var t=arguments[0],e=arguments[1],r=arguments[2],i=arguments[3];this.computeIntersectsForChain(this.startIndex[t],this.startIndex[t+1],e,e.startIndex[r],e.startIndex[r+1],i)}else if(arguments.length===6){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3],l=arguments[4],c=arguments[5],h=this.pts[s],f=this.pts[o],d=a.pts[u],v=a.pts[l];if(o-s===1&&l-u===1)return c.addIntersections(this.e,s,a.e,u),null;if(this.env1.init(h,f),this.env2.init(d,v),!this.env1.intersects(this.env2))return null;var _=Math.trunc((s+o)/2),E=Math.trunc((u+l)/2);s<_&&(u<E&&this.computeIntersectsForChain(s,_,a,u,E,c),E<l&&this.computeIntersectsForChain(s,_,a,E,l,c)),_<o&&(u<E&&this.computeIntersectsForChain(_,o,a,u,E,c),E<l&&this.computeIntersectsForChain(_,o,a,E,l,c))}},ki.prototype.getStartIndexes=function(){return this.startIndex},ki.prototype.computeIntersects=function(t,e){for(var r=this,i=0;i<this.startIndex.length-1;i++)for(var s=0;s<t.startIndex.length-1;s++)r.computeIntersectsForChain(i,t,s,e)},ki.prototype.interfaces_=function(){return[]},ki.prototype.getClass=function(){return ki};var Re=function n(){var t=this;this._depth=Array(2).fill().map(function(){return Array(3)});for(var e=0;e<2;e++)for(var r=0;r<3;r++)t._depth[e][r]=n.NULL_VALUE},Pv={NULL_VALUE:{configurable:!0}};Re.prototype.getDepth=function(t,e){return this._depth[t][e]},Re.prototype.setDepth=function(t,e,r){this._depth[t][e]=r},Re.prototype.isNull=function(){var t=this;if(arguments.length===0){for(var e=0;e<2;e++)for(var r=0;r<3;r++)if(t._depth[e][r]!==Re.NULL_VALUE)return!1;return!0}else if(arguments.length===1){var i=arguments[0];return this._depth[i][1]===Re.NULL_VALUE}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return this._depth[s][o]===Re.NULL_VALUE}},Re.prototype.normalize=function(){for(var t=this,e=0;e<2;e++)if(!t.isNull(e)){var r=t._depth[e][1];t._depth[e][2]<r&&(r=t._depth[e][2]),r<0&&(r=0);for(var i=1;i<3;i++){var s=0;t._depth[e][i]>r&&(s=1),t._depth[e][i]=s}}},Re.prototype.getDelta=function(t){return this._depth[t][B.RIGHT]-this._depth[t][B.LEFT]},Re.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?F.EXTERIOR:F.INTERIOR},Re.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},Re.prototype.add=function(){var t=this;if(arguments.length===1)for(var e=arguments[0],r=0;r<2;r++)for(var i=1;i<3;i++){var s=e.getLocation(r,i);(s===F.EXTERIOR||s===F.INTERIOR)&&(t.isNull(r,i)?t._depth[r][i]=Re.depthAtLocation(s):t._depth[r][i]+=Re.depthAtLocation(s))}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2];u===F.INTERIOR&&this._depth[o][a]++}},Re.prototype.interfaces_=function(){return[]},Re.prototype.getClass=function(){return Re},Re.depthAtLocation=function(t){return t===F.EXTERIOR?0:t===F.INTERIOR?1:Re.NULL_VALUE},Pv.NULL_VALUE.get=function(){return-1},Object.defineProperties(Re,Pv);var Rh=function(n){function t(){if(n.call(this),this.pts=null,this._env=null,this.eiList=new hi(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new Re,this._depthDelta=0,arguments.length===1){var e=arguments[0];t.call(this,e,null)}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.pts=r,this._label=i}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDepth=function(){return this._depth},t.prototype.getCollapsedEdge=function(){var r=new Array(2).fill(null);r[0]=this.pts[0],r[1]=this.pts[1];var i=new t(r,Yt.toLineLabel(this._label));return i},t.prototype.isIsolated=function(){return this._isIsolated},t.prototype.getCoordinates=function(){return this.pts},t.prototype.setIsolated=function(r){this._isIsolated=r},t.prototype.setName=function(r){this._name=r},t.prototype.equals=function(r){var i=this;if(!(r instanceof t))return!1;var s=r;if(this.pts.length!==s.pts.length)return!1;for(var o=!0,a=!0,u=this.pts.length,l=0;l<this.pts.length;l++)if(i.pts[l].equals2D(s.pts[l])||(o=!1),i.pts[l].equals2D(s.pts[--u])||(a=!1),!o&&!a)return!1;return!0},t.prototype.getCoordinate=function(){if(arguments.length===0)return this.pts.length>0?this.pts[0]:null;if(arguments.length===1){var r=arguments[0];return this.pts[r]}},t.prototype.print=function(r){var i=this;r.print("edge "+this._name+": "),r.print("LINESTRING (");for(var s=0;s<this.pts.length;s++)s>0&&r.print(","),r.print(i.pts[s].x+" "+i.pts[s].y);r.print(") "+this._label+" "+this._depthDelta)},t.prototype.computeIM=function(r){t.updateIM(this._label,r)},t.prototype.isCollapsed=function(){return!this._label.isArea()||this.pts.length!==3?!1:!!this.pts[0].equals(this.pts[2])},t.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},t.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},t.prototype.getDepthDelta=function(){return this._depthDelta},t.prototype.getNumPoints=function(){return this.pts.length},t.prototype.printReverse=function(r){var i=this;r.print("edge "+this._name+": ");for(var s=this.pts.length-1;s>=0;s--)r.print(i.pts[s]+" ");r.println("")},t.prototype.getMonotoneChainEdge=function(){return this._mce===null&&(this._mce=new ki(this)),this._mce},t.prototype.getEnvelope=function(){var r=this;if(this._env===null){this._env=new at;for(var i=0;i<this.pts.length;i++)r._env.expandToInclude(r.pts[i])}return this._env},t.prototype.addIntersection=function(r,i,s,o){var a=new D(r.getIntersection(o)),u=i,l=r.getEdgeDistance(s,o),c=u+1;if(c<this.pts.length){var h=this.pts[c];a.equals2D(h)&&(u=c,l=0)}this.eiList.add(a,u,l)},t.prototype.toString=function(){var r=this,i=new In;i.append("edge "+this._name+": "),i.append("LINESTRING (");for(var s=0;s<this.pts.length;s++)s>0&&i.append(","),i.append(r.pts[s].x+" "+r.pts[s].y);return i.append(") "+this._label+" "+this._depthDelta),i.toString()},t.prototype.isPointwiseEqual=function(r){var i=this;if(this.pts.length!==r.pts.length)return!1;for(var s=0;s<this.pts.length;s++)if(!i.pts[s].equals2D(r.pts[s]))return!1;return!0},t.prototype.setDepthDelta=function(r){this._depthDelta=r},t.prototype.getEdgeIntersectionList=function(){return this.eiList},t.prototype.addIntersections=function(r,i,s){for(var o=this,a=0;a<r.getIntersectionNum();a++)o.addIntersection(r,i,s,a)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.updateIM=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];i.setAtLeastIfValid(r.getLocation(0,B.ON),r.getLocation(1,B.ON),1),r.isArea()&&(i.setAtLeastIfValid(r.getLocation(0,B.LEFT),r.getLocation(1,B.LEFT),2),i.setAtLeastIfValid(r.getLocation(0,B.RIGHT),r.getLocation(1,B.RIGHT),2))}else return n.prototype.updateIM.apply(this,arguments)},t}(Rr),Ze=function(t){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new pn,this._bufParams=t||null};Ze.prototype.setWorkingPrecisionModel=function(t){this._workingPrecisionModel=t},Ze.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(e!==null){var r=e.getLabel(),i=t.getLabel();e.isPointwiseEqual(t)||(i=new Yt(t.getLabel()),i.flip()),r.merge(i);var s=Ze.depthDelta(i),o=e.getDepthDelta(),a=o+s;e.setDepthDelta(a)}else this._edgeList.add(t),t.setDepthDelta(Ze.depthDelta(t.getLabel()))},Ze.prototype.buildSubgraphs=function(t,e){for(var r=new j,i=t.iterator();i.hasNext();){var s=i.next(),o=s.getRightmostCoordinate(),a=new Po(r),u=a.getDepth(o);s.computeDepth(u),s.findResultEdges(),r.add(s),e.add(s.getDirectedEdges(),s.getNodes())}},Ze.prototype.createSubgraphs=function(t){for(var e=new j,r=t.getNodes().iterator();r.hasNext();){var i=r.next();if(!i.isVisited()){var s=new $e;s.create(i),e.add(s)}}return gn.sort(e,gn.reverseOrder()),e},Ze.prototype.createEmptyResultGeometry=function(){var t=this._geomFact.createPolygon();return t},Ze.prototype.getNoder=function(t){if(this._workingNoder!==null)return this._workingNoder;var e=new Gf,r=new Ds;return r.setPrecisionModel(t),e.setSegmentIntersector(new kr(r)),e},Ze.prototype.buffer=function(t,e){var r=this._workingPrecisionModel;r===null&&(r=t.getPrecisionModel()),this._geomFact=t.getFactory();var i=new lr(r,this._bufParams),s=new Zr(t,e,i),o=s.getCurves();if(o.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(o,r),this._graph=new he(new Cv),this._graph.addEdges(this._edgeList.getEdges());var a=this.createSubgraphs(this._graph),u=new wr(this._geomFact);this.buildSubgraphs(a,u);var l=u.getPolygons();if(l.size()<=0)return this.createEmptyResultGeometry();var c=this._geomFact.buildGeometry(l);return c},Ze.prototype.computeNodedEdges=function(t,e){var r=this,i=this.getNoder(e);i.computeNodes(t);for(var s=i.getNodedSubstrings(),o=s.iterator();o.hasNext();){var a=o.next(),u=a.getCoordinates();if(!(u.length===2&&u[0].equals2D(u[1]))){var l=a.getData(),c=new Rh(a.getCoordinates(),new Yt(l));r.insertUniqueEdge(c)}}},Ze.prototype.setNoder=function(t){this._workingNoder=t},Ze.prototype.interfaces_=function(){return[]},Ze.prototype.getClass=function(){return Ze},Ze.depthDelta=function(t){var e=t.getLocation(0,B.LEFT),r=t.getLocation(0,B.RIGHT);return e===F.INTERIOR&&r===F.EXTERIOR?1:e===F.EXTERIOR&&r===F.INTERIOR?-1:0},Ze.convertSegStrings=function(t){for(var e=new xt,r=new j;t.hasNext();){var i=t.next(),s=e.createLineString(i.getCoordinates());r.add(s)}return e.buildGeometry(r)};var as=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,arguments.length===2){var t=arguments[0],e=arguments[1];this._noder=t,this._scaleFactor=e,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(arguments.length===4){var r=arguments[0],i=arguments[1],s=arguments[2],o=arguments[3];this._noder=r,this._scaleFactor=i,this._offsetX=s,this._offsetY=o,this._isScaled=!this.isIntegerPrecision()}};as.prototype.rescale=function(){var t=this;if(pt(arguments[0],Pe))for(var e=arguments[0],r=e.iterator();r.hasNext();){var i=r.next();t.rescale(i.getCoordinates())}else if(arguments[0]instanceof Array){for(var s=arguments[0],o=0;o<s.length;o++)s[o].x=s[o].x/t._scaleFactor+t._offsetX,s[o].y=s[o].y/t._scaleFactor+t._offsetY;s.length===2&&s[0].equals2D(s[1])&&Le.out.println(s)}},as.prototype.scale=function(){var t=this;if(pt(arguments[0],Pe)){for(var e=arguments[0],r=new j,i=e.iterator();i.hasNext();){var s=i.next();r.add(new ve(t.scale(s.getCoordinates()),s.getData()))}return r}else if(arguments[0]instanceof Array){for(var o=arguments[0],a=new Array(o.length).fill(null),u=0;u<o.length;u++)a[u]=new D(Math.round((o[u].x-t._offsetX)*t._scaleFactor),Math.round((o[u].y-t._offsetY)*t._scaleFactor),o[u].z);var l=Nt.removeRepeatedPoints(a);return l}},as.prototype.isIntegerPrecision=function(){return this._scaleFactor===1},as.prototype.getNodedSubstrings=function(){var t=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(t),t},as.prototype.computeNodes=function(t){var e=t;this._isScaled&&(e=this.scale(t)),this._noder.computeNodes(e)},as.prototype.interfaces_=function(){return[Gs]},as.prototype.getClass=function(){return as};var kn=function(){this._li=new Ds,this._segStrings=null;var t=arguments[0];this._segStrings=t},Iv={fact:{configurable:!0}};kn.prototype.checkEndPtVertexIntersections=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();){var r=e.next(),i=r.getCoordinates();t.checkEndPtVertexIntersections(i[0],t._segStrings),t.checkEndPtVertexIntersections(i[i.length-1],t._segStrings)}else if(arguments.length===2){for(var s=arguments[0],o=arguments[1],a=o.iterator();a.hasNext();)for(var u=a.next(),l=u.getCoordinates(),c=1;c<l.length-1;c++)if(l[c].equals(s))throw new xi("found endpt/interior pt intersection at index "+c+" :pt "+s)}},kn.prototype.checkInteriorIntersections=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();)for(var r=e.next(),i=this._segStrings.iterator();i.hasNext();){var s=i.next();t.checkInteriorIntersections(r,s)}else if(arguments.length===2)for(var o=arguments[0],a=arguments[1],u=o.getCoordinates(),l=a.getCoordinates(),c=0;c<u.length-1;c++)for(var h=0;h<l.length-1;h++)t.checkInteriorIntersections(o,c,a,h);else if(arguments.length===4){var f=arguments[0],d=arguments[1],v=arguments[2],_=arguments[3];if(f===v&&d===_)return null;var E=f.getCoordinates()[d],P=f.getCoordinates()[d+1],y=v.getCoordinates()[_],w=v.getCoordinates()[_+1];if(this._li.computeIntersection(E,P,y,w),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,E,P)||this.hasInteriorIntersection(this._li,y,w)))throw new xi("found non-noded intersection at "+E+"-"+P+" and "+y+"-"+w)}},kn.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},kn.prototype.checkCollapses=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();){var r=e.next();t.checkCollapses(r)}else if(arguments.length===1)for(var i=arguments[0],s=i.getCoordinates(),o=0;o<s.length-2;o++)t.checkCollapse(s[o],s[o+1],s[o+2])},kn.prototype.hasInteriorIntersection=function(t,e,r){for(var i=0;i<t.getIntersectionNum();i++){var s=t.getIntersection(i);if(!(s.equals(e)||s.equals(r)))return!0}return!1},kn.prototype.checkCollapse=function(t,e,r){if(t.equals(r))throw new xi("found non-noded collapse at "+kn.fact.createLineString([t,e,r]))},kn.prototype.interfaces_=function(){return[]},kn.prototype.getClass=function(){return kn},Iv.fact.get=function(){return new xt},Object.defineProperties(kn,Iv);var hr=function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var t=arguments[0],e=arguments[1],r=arguments[2];if(this._originalPt=t,this._pt=t,this._scaleFactor=e,this._li=r,e<=0)throw new ae("Scale factor must be non-zero");e!==1&&(this._pt=new D(this.scale(t.x),this.scale(t.y)),this._p0Scaled=new D,this._p1Scaled=new D),this.initCorners(this._pt)},Mv={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};hr.prototype.intersectsScaled=function(t,e){var r=Math.min(t.x,e.x),i=Math.max(t.x,e.x),s=Math.min(t.y,e.y),o=Math.max(t.y,e.y),a=this._maxx<r||this._minx>i||this._maxy<s||this._miny>o;if(a)return!1;var u=this.intersectsToleranceSquare(t,e);return Pt.isTrue(!(a&&u),"Found bad envelope test"),u},hr.prototype.initCorners=function(t){var e=.5;this._minx=t.x-e,this._maxx=t.x+e,this._miny=t.y-e,this._maxy=t.y+e,this._corner[0]=new D(this._maxx,this._maxy),this._corner[1]=new D(this._minx,this._maxy),this._corner[2]=new D(this._minx,this._miny),this._corner[3]=new D(this._maxx,this._miny)},hr.prototype.intersects=function(t,e){return this._scaleFactor===1?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},hr.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},hr.prototype.getCoordinate=function(){return this._originalPt},hr.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},hr.prototype.getSafeEnvelope=function(){if(this._safeEnv===null){var t=hr.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new at(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},hr.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.hasIntersection()))},hr.prototype.intersectsToleranceSquare=function(t,e){var r=!1,i=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.isProper())||(this._li.hasIntersection()&&(r=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.isProper())||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.isProper())||r&&i||t.equals(this._pt)||e.equals(this._pt))},hr.prototype.addSnappedNode=function(t,e){var r=t.getCoordinate(e),i=t.getCoordinate(e+1);return this.intersects(r,i)?(t.addIntersection(this.getCoordinate(),e),!0):!1},hr.prototype.interfaces_=function(){return[]},hr.prototype.getClass=function(){return hr},Mv.SAFE_ENV_EXPANSION_FACTOR.get=function(){return .75},Object.defineProperties(hr,Mv);var Sl=function(){this.tempEnv1=new at,this.selectedSegment=new ut};Sl.prototype.select=function(){if(arguments.length!==1){if(arguments.length===2){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}}},Sl.prototype.interfaces_=function(){return[]},Sl.prototype.getClass=function(){return Sl};var La=function(){this._index=null;var t=arguments[0];this._index=t},bv={HotPixelSnapAction:{configurable:!0}};La.prototype.snap=function(){if(arguments.length===1){var t=arguments[0];return this.snap(t,null,-1)}else if(arguments.length===3){var e=arguments[0],r=arguments[1],i=arguments[2],s=e.getSafeEnvelope(),o=new Nv(e,r,i);return this._index.query(s,{interfaces_:function(){return[is]},visitItem:function(a){var u=a;u.select(s,o)}}),o.isNodeAdded()}},La.prototype.interfaces_=function(){return[]},La.prototype.getClass=function(){return La},bv.HotPixelSnapAction.get=function(){return Nv},Object.defineProperties(La,bv);var Nv=function(n){function t(){n.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var e=arguments[0],r=arguments[1],i=arguments[2];this._hotPixel=e,this._parentEdge=r,this._hotPixelVertexIndex=i}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.isNodeAdded=function(){return this._isNodeAdded},t.prototype.select=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1],s=r.getContext();if(this._parentEdge!==null&&s===this._parentEdge&&i===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(s,i)}else return n.prototype.select.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Sl),Io=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new j};Io.prototype.processIntersections=function(t,e,r,i){var s=this;if(t===r&&e===i)return null;var o=t.getCoordinates()[e],a=t.getCoordinates()[e+1],u=r.getCoordinates()[i],l=r.getCoordinates()[i+1];if(this._li.computeIntersection(o,a,u,l),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var c=0;c<this._li.getIntersectionNum();c++)s._interiorIntersections.add(s._li.getIntersection(c));t.addIntersections(this._li,e,0),r.addIntersections(this._li,i,1)}},Io.prototype.isDone=function(){return!1},Io.prototype.getInteriorIntersections=function(){return this._interiorIntersections},Io.prototype.interfaces_=function(){return[Vs]},Io.prototype.getClass=function(){return Io};var ci=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var t=arguments[0];this._pm=t,this._li=new Ds,this._li.setPrecisionModel(t),this._scaleFactor=t.getScale()};ci.prototype.checkCorrectness=function(t){var e=ve.getNodedSubstrings(t),r=new kn(e);try{r.checkValid()}catch(i){if(i instanceof av)i.printStackTrace();else throw i}finally{}},ci.prototype.getNodedSubstrings=function(){return ve.getNodedSubstrings(this._nodedSegStrings)},ci.prototype.snapRound=function(t,e){var r=this.findInteriorIntersections(t,e);this.computeIntersectionSnaps(r),this.computeVertexSnaps(t)},ci.prototype.findInteriorIntersections=function(t,e){var r=new Io(e);return this._noder.setSegmentIntersector(r),this._noder.computeNodes(t),r.getInteriorIntersections()},ci.prototype.computeVertexSnaps=function(){var t=this;if(pt(arguments[0],Pe))for(var e=arguments[0],r=e.iterator();r.hasNext();){var i=r.next();t.computeVertexSnaps(i)}else if(arguments[0]instanceof ve)for(var s=arguments[0],o=s.getCoordinates(),a=0;a<o.length;a++){var u=new hr(o[a],t._scaleFactor,t._li),l=t._pointSnapper.snap(u,s,a);l&&s.addIntersection(o[a],a)}},ci.prototype.computeNodes=function(t){this._nodedSegStrings=t,this._noder=new Gf,this._pointSnapper=new La(this._noder.getIndex()),this.snapRound(t,this._li)},ci.prototype.computeIntersectionSnaps=function(t){for(var e=this,r=t.iterator();r.hasNext();){var i=r.next(),s=new hr(i,e._scaleFactor,e._li);e._pointSnapper.snap(s)}},ci.prototype.interfaces_=function(){return[Gs]},ci.prototype.getClass=function(){return ci};var Fe=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new zt,this._resultGeometry=null,this._saveException=null,arguments.length===1){var t=arguments[0];this._argGeom=t}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this._argGeom=e,this._bufParams=r}},Ra={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};Fe.prototype.bufferFixedPrecision=function(t){var e=new as(new ci(new Ut(1)),t.getScale()),r=new Ze(this._bufParams);r.setWorkingPrecisionModel(t),r.setNoder(e),this._resultGeometry=r.buffer(this._argGeom,this._distance)},Fe.prototype.bufferReducedPrecision=function(){var t=this;if(arguments.length===0){for(var e=Fe.MAX_PRECISION_DIGITS;e>=0;e--){try{t.bufferReducedPrecision(e)}catch(o){if(o instanceof Ri)t._saveException=o;else throw o}finally{}if(t._resultGeometry!==null)return null}throw this._saveException}else if(arguments.length===1){var r=arguments[0],i=Fe.precisionScaleFactor(this._argGeom,this._distance,r),s=new Ut(i);this.bufferFixedPrecision(s)}},Fe.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===Ut.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},Fe.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},Fe.prototype.bufferOriginalPrecision=function(){try{var t=new Ze(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(e){if(e instanceof xi)this._saveException=e;else throw e}finally{}},Fe.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},Fe.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},Fe.prototype.interfaces_=function(){return[]},Fe.prototype.getClass=function(){return Fe},Fe.bufferOp=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],r=new Fe(t),i=r.getResultGeometry(e);return i}else if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof gt&&typeof arguments[1]=="number"){var s=arguments[0],o=arguments[1],a=arguments[2],u=new Fe(s);u.setQuadrantSegments(a);var l=u.getResultGeometry(o);return l}else if(arguments[2]instanceof zt&&arguments[0]instanceof gt&&typeof arguments[1]=="number"){var c=arguments[0],h=arguments[1],f=arguments[2],d=new Fe(c,f),v=d.getResultGeometry(h);return v}}else if(arguments.length===4){var _=arguments[0],E=arguments[1],P=arguments[2],y=arguments[3],w=new Fe(_);w.setQuadrantSegments(P),w.setEndCapStyle(y);var m=w.getResultGeometry(E);return m}},Fe.precisionScaleFactor=function(t,e,r){var i=t.getEnvelopeInternal(),s=Lr.max(Math.abs(i.getMaxX()),Math.abs(i.getMaxY()),Math.abs(i.getMinX()),Math.abs(i.getMinY())),o=e>0?e:0,a=s+2*o,u=Math.trunc(Math.log(a)/Math.log(10)+1),l=r-u,c=Math.pow(10,l);return c},Ra.CAP_ROUND.get=function(){return zt.CAP_ROUND},Ra.CAP_BUTT.get=function(){return zt.CAP_FLAT},Ra.CAP_FLAT.get=function(){return zt.CAP_FLAT},Ra.CAP_SQUARE.get=function(){return zt.CAP_SQUARE},Ra.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(Fe,Ra);var tr=function(){this._pt=[new D,new D],this._distance=yt.NaN,this._isNull=!0};tr.prototype.getCoordinates=function(){return this._pt},tr.prototype.getCoordinate=function(t){return this._pt[t]},tr.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(e,r),null;var i=e.distance(r);i<this._distance&&this.initialize(e,r,i)}},tr.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._pt[0].setCoordinate(r),this._pt[1].setCoordinate(i),this._distance=s,this._isNull=!1}},tr.prototype.getDistance=function(){return this._distance},tr.prototype.setMaximum=function(){if(arguments.length===1){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(e,r),null;var i=e.distance(r);i>this._distance&&this.initialize(e,r,i)}},tr.prototype.interfaces_=function(){return[]},tr.prototype.getClass=function(){return tr};var fi=function(){};fi.prototype.interfaces_=function(){return[]},fi.prototype.getClass=function(){return fi},fi.computeDistance=function(){if(arguments[2]instanceof tr&&arguments[0]instanceof ce&&arguments[1]instanceof D)for(var t=arguments[0],e=arguments[1],r=arguments[2],i=t.getCoordinates(),s=new ut,o=0;o<i.length-1;o++){s.setCoordinates(i[o],i[o+1]);var a=s.closestPoint(e);r.setMinimum(a,e)}else if(arguments[2]instanceof tr&&arguments[0]instanceof Ie&&arguments[1]instanceof D){var u=arguments[0],l=arguments[1],c=arguments[2];fi.computeDistance(u.getExteriorRing(),l,c);for(var h=0;h<u.getNumInteriorRing();h++)fi.computeDistance(u.getInteriorRingN(h),l,c)}else if(arguments[2]instanceof tr&&arguments[0]instanceof gt&&arguments[1]instanceof D){var f=arguments[0],d=arguments[1],v=arguments[2];if(f instanceof ce)fi.computeDistance(f,d,v);else if(f instanceof Ie)fi.computeDistance(f,d,v);else if(f instanceof Qe)for(var _=f,E=0;E<_.getNumGeometries();E++){var P=_.getGeometryN(E);fi.computeDistance(P,d,v)}else v.setMinimum(f.getCoordinate(),d)}else if(arguments[2]instanceof tr&&arguments[0]instanceof ut&&arguments[1]instanceof D){var y=arguments[0],w=arguments[1],m=arguments[2],S=y.closestPoint(w);m.setMinimum(S,w)}};var zs=function(t){this._maxPtDist=new tr,this._inputGeom=t||null},kf={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};zs.prototype.computeMaxMidpointDistance=function(t){var e=new us(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},zs.prototype.computeMaxVertexDistance=function(t){var e=new Mo(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},zs.prototype.findDistance=function(t){return this.computeMaxVertexDistance(t),this.computeMaxMidpointDistance(t),this._maxPtDist.getDistance()},zs.prototype.getDistancePoints=function(){return this._maxPtDist},zs.prototype.interfaces_=function(){return[]},zs.prototype.getClass=function(){return zs},kf.MaxPointDistanceFilter.get=function(){return Mo},kf.MaxMidpointDistanceFilter.get=function(){return us},Object.defineProperties(zs,kf);var Mo=function(t){this._maxPtDist=new tr,this._minPtDist=new tr,this._geom=t||null};Mo.prototype.filter=function(t){this._minPtDist.initialize(),fi.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Mo.prototype.getMaxPointDistance=function(){return this._maxPtDist},Mo.prototype.interfaces_=function(){return[ii]},Mo.prototype.getClass=function(){return Mo};var us=function(t){this._maxPtDist=new tr,this._minPtDist=new tr,this._geom=t||null};us.prototype.filter=function(t,e){if(e===0)return null;var r=t.getCoordinate(e-1),i=t.getCoordinate(e),s=new D((r.x+i.x)/2,(r.y+i.y)/2);this._minPtDist.initialize(),fi.computeDistance(this._geom,s,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},us.prototype.isDone=function(){return!1},us.prototype.isGeometryChanged=function(){return!1},us.prototype.getMaxPointDistance=function(){return this._maxPtDist},us.prototype.interfaces_=function(){return[fn]},us.prototype.getClass=function(){return us};var Vi=function(t){this._comps=t||null};Vi.prototype.filter=function(t){t instanceof Ie&&this._comps.add(t)},Vi.prototype.interfaces_=function(){return[Tn]},Vi.prototype.getClass=function(){return Vi},Vi.getPolygons=function(){if(arguments.length===1){var t=arguments[0];return Vi.getPolygons(t,new j)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return e instanceof Ie?r.add(e):e instanceof Qe&&e.apply(new Vi(r)),r}};var Ge=function(){if(this._lines=null,this._isForcedToLineString=!1,arguments.length===1){var t=arguments[0];this._lines=t}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this._lines=e,this._isForcedToLineString=r}};Ge.prototype.filter=function(t){if(this._isForcedToLineString&&t instanceof si){var e=t.getFactory().createLineString(t.getCoordinateSequence());return this._lines.add(e),null}t instanceof ce&&this._lines.add(t)},Ge.prototype.setForceToLineString=function(t){this._isForcedToLineString=t},Ge.prototype.interfaces_=function(){return[Ti]},Ge.prototype.getClass=function(){return Ge},Ge.getGeometry=function(){if(arguments.length===1){var t=arguments[0];return t.getFactory().buildGeometry(Ge.getLines(t))}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return e.getFactory().buildGeometry(Ge.getLines(e,r))}},Ge.getLines=function(){if(arguments.length===1){var t=arguments[0];return Ge.getLines(t,!1)}else if(arguments.length===2){if(pt(arguments[0],Pe)&&pt(arguments[1],Pe)){for(var e=arguments[0],r=arguments[1],i=e.iterator();i.hasNext();){var s=i.next();Ge.getLines(s,r)}return r}else if(arguments[0]instanceof gt&&typeof arguments[1]=="boolean"){var o=arguments[0],a=arguments[1],u=new j;return o.apply(new Ge(u,a)),u}else if(arguments[0]instanceof gt&&pt(arguments[1],Pe)){var l=arguments[0],c=arguments[1];return l instanceof ce?c.add(l):l.apply(new Ge(c)),c}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&pt(arguments[0],Pe)&&pt(arguments[1],Pe)){for(var h=arguments[0],f=arguments[1],d=arguments[2],v=h.iterator();v.hasNext();){var _=v.next();Ge.getLines(_,f,d)}return f}else if(typeof arguments[2]=="boolean"&&arguments[0]instanceof gt&&pt(arguments[1],Pe)){var E=arguments[0],P=arguments[1],y=arguments[2];return E.apply(new Ge(P,y)),P}}};var vn=function(){if(this._boundaryRule=jr.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];if(t===null)throw new ae("Rule must be non-null");this._boundaryRule=t}}};vn.prototype.locateInternal=function(){var t=this;if(arguments[0]instanceof D&&arguments[1]instanceof Ie){var e=arguments[0],r=arguments[1];if(r.isEmpty())return F.EXTERIOR;var i=r.getExteriorRing(),s=this.locateInPolygonRing(e,i);if(s===F.EXTERIOR)return F.EXTERIOR;if(s===F.BOUNDARY)return F.BOUNDARY;for(var o=0;o<r.getNumInteriorRing();o++){var a=r.getInteriorRingN(o),u=t.locateInPolygonRing(e,a);if(u===F.INTERIOR)return F.EXTERIOR;if(u===F.BOUNDARY)return F.BOUNDARY}return F.INTERIOR}else if(arguments[0]instanceof D&&arguments[1]instanceof ce){var l=arguments[0],c=arguments[1];if(!c.getEnvelopeInternal().intersects(l))return F.EXTERIOR;var h=c.getCoordinates();return!c.isClosed()&&(l.equals(h[0])||l.equals(h[h.length-1]))?F.BOUNDARY:K.isOnLine(l,h)?F.INTERIOR:F.EXTERIOR}else if(arguments[0]instanceof D&&arguments[1]instanceof _r){var f=arguments[0],d=arguments[1],v=d.getCoordinate();return v.equals2D(f)?F.INTERIOR:F.EXTERIOR}},vn.prototype.locateInPolygonRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?K.locatePointInRing(t,e.getCoordinates()):F.EXTERIOR},vn.prototype.intersects=function(t,e){return this.locate(t,e)!==F.EXTERIOR},vn.prototype.updateLocationInfo=function(t){t===F.INTERIOR&&(this._isIn=!0),t===F.BOUNDARY&&this._numBoundaries++},vn.prototype.computeLocation=function(t,e){var r=this;if(e instanceof _r&&this.updateLocationInfo(this.locateInternal(t,e)),e instanceof ce)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Ie)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Fs)for(var i=e,s=0;s<i.getNumGeometries();s++){var o=i.getGeometryN(s);r.updateLocationInfo(r.locateInternal(t,o))}else if(e instanceof oi)for(var a=e,u=0;u<a.getNumGeometries();u++){var l=a.getGeometryN(u);r.updateLocationInfo(r.locateInternal(t,l))}else if(e instanceof Qe)for(var c=new li(e);c.hasNext();){var h=c.next();h!==e&&r.computeLocation(t,h)}},vn.prototype.locate=function(t,e){return e.isEmpty()?F.EXTERIOR:e instanceof ce?this.locateInternal(t,e):e instanceof Ie?this.locateInternal(t,e):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(t,e),this._boundaryRule.isInBoundary(this._numBoundaries)?F.BOUNDARY:this._numBoundaries>0||this._isIn?F.INTERIOR:F.EXTERIOR)},vn.prototype.interfaces_=function(){return[]},vn.prototype.getClass=function(){return vn};var er=function n(){if(this._component=null,this._segIndex=null,this._pt=null,arguments.length===2){var t=arguments[0],e=arguments[1];n.call(this,t,n.INSIDE_AREA,e)}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._component=r,this._segIndex=i,this._pt=s}},xv={INSIDE_AREA:{configurable:!0}};er.prototype.isInsideArea=function(){return this._segIndex===er.INSIDE_AREA},er.prototype.getCoordinate=function(){return this._pt},er.prototype.getGeometryComponent=function(){return this._component},er.prototype.getSegmentIndex=function(){return this._segIndex},er.prototype.interfaces_=function(){return[]},er.prototype.getClass=function(){return er},xv.INSIDE_AREA.get=function(){return-1},Object.defineProperties(er,xv);var ls=function(t){this._pts=t||null};ls.prototype.filter=function(t){t instanceof _r&&this._pts.add(t)},ls.prototype.interfaces_=function(){return[Tn]},ls.prototype.getClass=function(){return ls},ls.getPoints=function(){if(arguments.length===1){var t=arguments[0];return t instanceof _r?gn.singletonList(t):ls.getPoints(t,new j)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return e instanceof _r?r.add(e):e instanceof Qe&&e.apply(new ls(r)),r}};var bo=function(){this._locations=null;var t=arguments[0];this._locations=t};bo.prototype.filter=function(t){(t instanceof _r||t instanceof ce||t instanceof Ie)&&this._locations.add(new er(t,0,t.getCoordinate()))},bo.prototype.interfaces_=function(){return[Tn]},bo.prototype.getClass=function(){return bo},bo.getLocations=function(t){var e=new j;return t.apply(new bo(e)),e};var ke=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new vn,this._minDistanceLocation=null,this._minDistance=yt.MAX_VALUE,arguments.length===2){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=r,this._geom[1]=i,this._terminateDistance=s}};ke.prototype.computeContainmentDistance=function(){var t=this;if(arguments.length===0){var e=new Array(2).fill(null);if(this.computeContainmentDistance(0,e),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,e)}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=1-r,o=Vi.getPolygons(this._geom[r]);if(o.size()>0){var a=bo.getLocations(this._geom[s]);if(this.computeContainmentDistance(a,o,i),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[s]=i[0],this._minDistanceLocation[r]=i[1],null}}else if(arguments.length===3){if(arguments[2]instanceof Array&&pt(arguments[0],hn)&&pt(arguments[1],hn)){for(var u=arguments[0],l=arguments[1],c=arguments[2],h=0;h<u.size();h++)for(var f=u.get(h),d=0;d<l.size();d++)if(t.computeContainmentDistance(f,l.get(d),c),t._minDistance<=t._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof er&&arguments[1]instanceof Ie){var v=arguments[0],_=arguments[1],E=arguments[2],P=v.getCoordinate();if(F.EXTERIOR!==this._ptLocator.locate(P,_))return this._minDistance=0,E[0]=v,E[1]=new er(_,P),null}}},ke.prototype.computeMinDistanceLinesPoints=function(t,e,r){for(var i=this,s=0;s<t.size();s++)for(var o=t.get(s),a=0;a<e.size();a++){var u=e.get(a);if(i.computeMinDistance(o,u,r),i._minDistance<=i._terminateDistance)return null}},ke.prototype.computeFacetDistance=function(){var t=new Array(2).fill(null),e=Ge.getLines(this._geom[0]),r=Ge.getLines(this._geom[1]),i=ls.getPoints(this._geom[0]),s=ls.getPoints(this._geom[1]);if(this.computeMinDistanceLines(e,r,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(e,s,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance)||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(r,i,t),this.updateMinDistance(t,!0),this._minDistance<=this._terminateDistance))return null;t[0]=null,t[1]=null,this.computeMinDistancePoints(i,s,t),this.updateMinDistance(t,!1)},ke.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},ke.prototype.updateMinDistance=function(t,e){if(t[0]===null)return null;e?(this._minDistanceLocation[0]=t[1],this._minDistanceLocation[1]=t[0]):(this._minDistanceLocation[0]=t[0],this._minDistanceLocation[1]=t[1])},ke.prototype.nearestPoints=function(){this.computeMinDistance();var t=[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()];return t},ke.prototype.computeMinDistance=function(){var t=this;if(arguments.length===0){if(this._minDistanceLocation!==null||(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance))return null;this.computeFacetDistance()}else if(arguments.length===3){if(arguments[2]instanceof Array&&arguments[0]instanceof ce&&arguments[1]instanceof _r){var e=arguments[0],r=arguments[1],i=arguments[2];if(e.getEnvelopeInternal().distance(r.getEnvelopeInternal())>this._minDistance)return null;for(var s=e.getCoordinates(),o=r.getCoordinate(),a=0;a<s.length-1;a++){var u=K.distancePointLine(o,s[a],s[a+1]);if(u<t._minDistance){t._minDistance=u;var l=new ut(s[a],s[a+1]),c=l.closestPoint(o);i[0]=new er(e,a,c),i[1]=new er(r,0,o)}if(t._minDistance<=t._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof ce&&arguments[1]instanceof ce){var h=arguments[0],f=arguments[1],d=arguments[2];if(h.getEnvelopeInternal().distance(f.getEnvelopeInternal())>this._minDistance)return null;for(var v=h.getCoordinates(),_=f.getCoordinates(),E=0;E<v.length-1;E++)for(var P=0;P<_.length-1;P++){var y=K.distanceLineLine(v[E],v[E+1],_[P],_[P+1]);if(y<t._minDistance){t._minDistance=y;var w=new ut(v[E],v[E+1]),m=new ut(_[P],_[P+1]),S=w.closestPoints(m);d[0]=new er(h,E,S[0]),d[1]=new er(f,P,S[1])}if(t._minDistance<=t._terminateDistance)return null}}}},ke.prototype.computeMinDistancePoints=function(t,e,r){for(var i=this,s=0;s<t.size();s++)for(var o=t.get(s),a=0;a<e.size();a++){var u=e.get(a),l=o.getCoordinate().distance(u.getCoordinate());if(l<i._minDistance&&(i._minDistance=l,r[0]=new er(o,0,o.getCoordinate()),r[1]=new er(u,0,u.getCoordinate())),i._minDistance<=i._terminateDistance)return null}},ke.prototype.distance=function(){if(this._geom[0]===null||this._geom[1]===null)throw new ae("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},ke.prototype.computeMinDistanceLines=function(t,e,r){for(var i=this,s=0;s<t.size();s++)for(var o=t.get(s),a=0;a<e.size();a++){var u=e.get(a);if(i.computeMinDistance(o,u,r),i._minDistance<=i._terminateDistance)return null}},ke.prototype.interfaces_=function(){return[]},ke.prototype.getClass=function(){return ke},ke.distance=function(t,e){var r=new ke(t,e);return r.distance()},ke.isWithinDistance=function(t,e,r){var i=new ke(t,e,r);return i.distance()<=r},ke.nearestPoints=function(t,e){var r=new ke(t,e);return r.nearestPoints()};var Ye=function(){this._pt=[new D,new D],this._distance=yt.NaN,this._isNull=!0};Ye.prototype.getCoordinates=function(){return this._pt},Ye.prototype.getCoordinate=function(t){return this._pt[t]},Ye.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(e,r),null;var i=e.distance(r);i<this._distance&&this.initialize(e,r,i)}},Ye.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._pt[0].setCoordinate(r),this._pt[1].setCoordinate(i),this._distance=s,this._isNull=!1}},Ye.prototype.toString=function(){return ln.toLineString(this._pt[0],this._pt[1])},Ye.prototype.getDistance=function(){return this._distance},Ye.prototype.setMaximum=function(){if(arguments.length===1){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(e,r),null;var i=e.distance(r);i>this._distance&&this.initialize(e,r,i)}},Ye.prototype.interfaces_=function(){return[]},Ye.prototype.getClass=function(){return Ye};var Vn=function(){};Vn.prototype.interfaces_=function(){return[]},Vn.prototype.getClass=function(){return Vn},Vn.computeDistance=function(){if(arguments[2]instanceof Ye&&arguments[0]instanceof ce&&arguments[1]instanceof D)for(var t=arguments[0],e=arguments[1],r=arguments[2],i=new ut,s=t.getCoordinates(),o=0;o<s.length-1;o++){i.setCoordinates(s[o],s[o+1]);var a=i.closestPoint(e);r.setMinimum(a,e)}else if(arguments[2]instanceof Ye&&arguments[0]instanceof Ie&&arguments[1]instanceof D){var u=arguments[0],l=arguments[1],c=arguments[2];Vn.computeDistance(u.getExteriorRing(),l,c);for(var h=0;h<u.getNumInteriorRing();h++)Vn.computeDistance(u.getInteriorRingN(h),l,c)}else if(arguments[2]instanceof Ye&&arguments[0]instanceof gt&&arguments[1]instanceof D){var f=arguments[0],d=arguments[1],v=arguments[2];if(f instanceof ce)Vn.computeDistance(f,d,v);else if(f instanceof Ie)Vn.computeDistance(f,d,v);else if(f instanceof Qe)for(var _=f,E=0;E<_.getNumGeometries();E++){var P=_.getGeometryN(E);Vn.computeDistance(P,d,v)}else v.setMinimum(f.getCoordinate(),d)}else if(arguments[2]instanceof Ye&&arguments[0]instanceof ut&&arguments[1]instanceof D){var y=arguments[0],w=arguments[1],m=arguments[2],S=y.closestPoint(w);m.setMinimum(S,w)}};var tn=function(){this._g0=null,this._g1=null,this._ptDist=new Ye,this._densifyFrac=0;var t=arguments[0],e=arguments[1];this._g0=t,this._g1=e},Vf={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};tn.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},tn.prototype.setDensifyFraction=function(t){if(t>1||t<=0)throw new ae("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t},tn.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},tn.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},tn.prototype.computeOrientedDistance=function(t,e,r){var i=new No(e);if(t.apply(i),r.setMaximum(i.getMaxPointDistance()),this._densifyFrac>0){var s=new hs(e,this._densifyFrac);t.apply(s),r.setMaximum(s.getMaxPointDistance())}},tn.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},tn.prototype.interfaces_=function(){return[]},tn.prototype.getClass=function(){return tn},tn.distance=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],r=new tn(t,e);return r.distance()}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=new tn(i,s);return a.setDensifyFraction(o),a.distance()}},Vf.MaxPointDistanceFilter.get=function(){return No},Vf.MaxDensifiedByFractionDistanceFilter.get=function(){return hs},Object.defineProperties(tn,Vf);var No=function(){this._maxPtDist=new Ye,this._minPtDist=new Ye,this._euclideanDist=new Vn,this._geom=null;var t=arguments[0];this._geom=t};No.prototype.filter=function(t){this._minPtDist.initialize(),Vn.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},No.prototype.getMaxPointDistance=function(){return this._maxPtDist},No.prototype.interfaces_=function(){return[ii]},No.prototype.getClass=function(){return No};var hs=function(){this._maxPtDist=new Ye,this._minPtDist=new Ye,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};hs.prototype.filter=function(t,e){var r=this;if(e===0)return null;for(var i=t.getCoordinate(e-1),s=t.getCoordinate(e),o=(s.x-i.x)/this._numSubSegs,a=(s.y-i.y)/this._numSubSegs,u=0;u<this._numSubSegs;u++){var l=i.x+u*o,c=i.y+u*a,h=new D(l,c);r._minPtDist.initialize(),Vn.computeDistance(r._geom,h,r._minPtDist),r._maxPtDist.setMaximum(r._minPtDist)}},hs.prototype.isDone=function(){return!1},hs.prototype.isGeometryChanged=function(){return!1},hs.prototype.getMaxPointDistance=function(){return this._maxPtDist},hs.prototype.interfaces_=function(){return[fn]},hs.prototype.getClass=function(){return hs};var Sr=function(t,e,r){this._minValidDistance=null,this._maxValidDistance=null,this._minDistanceFound=null,this._maxDistanceFound=null,this._isValid=!0,this._errMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._bufDistance=e||null,this._result=r||null},Uf={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};Sr.prototype.checkMaximumDistance=function(t,e,r){var i=new tn(e,t);if(i.setDensifyFraction(.25),this._maxDistanceFound=i.orientedDistance(),this._maxDistanceFound>r){this._isValid=!1;var s=i.getCoordinates();this._errorLocation=s[1],this._errorIndicator=t.getFactory().createLineString(s),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+ln.toLineString(s[0],s[1])+")"}},Sr.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=Sr.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,this._input.isEmpty()||this._result.isEmpty()?!0:(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Sr.VERBOSE&&Le.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},Sr.prototype.checkNegativeValid=function(){if(!(this._input instanceof Ie||this._input instanceof oi||this._input instanceof Qe))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)},Sr.prototype.getErrorIndicator=function(){return this._errorIndicator},Sr.prototype.checkMinimumDistance=function(t,e,r){var i=new ke(t,e,r);if(this._minDistanceFound=i.distance(),this._minDistanceFound<r){this._isValid=!1;var s=i.nearestPoints();this._errorLocation=i.nearestPoints()[1],this._errorIndicator=t.getFactory().createLineString(s),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+ln.toLineString(s[0],s[1])+" )"}},Sr.prototype.checkPositiveValid=function(){var t=this._result.getBoundary();if(this.checkMinimumDistance(this._input,t,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,t,this._maxValidDistance)},Sr.prototype.getErrorLocation=function(){return this._errorLocation},Sr.prototype.getPolygonLines=function(t){for(var e=new j,r=new Ge(e),i=Vi.getPolygons(t),s=i.iterator();s.hasNext();){var o=s.next();o.apply(r)}return t.getFactory().buildGeometry(e)},Sr.prototype.getErrorMessage=function(){return this._errMsg},Sr.prototype.interfaces_=function(){return[]},Sr.prototype.getClass=function(){return Sr},Uf.VERBOSE.get=function(){return!1},Uf.MAX_DISTANCE_DIFF_FRAC.get=function(){return .012},Object.defineProperties(Sr,Uf);var Ve=function(t,e,r){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._distance=e||null,this._result=r||null},zf={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};Ve.prototype.isValid=function(){return this.checkPolygonal(),this._isValid?(this.checkExpectedEmpty(),this._isValid?(this.checkEnvelope(),this._isValid?(this.checkArea(),this._isValid?(this.checkDistance(),this._isValid):this._isValid):this._isValid):this._isValid):this._isValid},Ve.prototype.checkEnvelope=function(){if(this._distance<0)return null;var t=this._distance*Ve.MAX_ENV_DIFF_FRAC;t===0&&(t=.001);var e=new at(this._input.getEnvelopeInternal());e.expandBy(this._distance);var r=new at(this._result.getEnvelopeInternal());r.expandBy(t),r.contains(e)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(r)),this.report("Envelope")},Ve.prototype.checkDistance=function(){var t=new Sr(this._input,this._distance,this._result);t.isValid()||(this._isValid=!1,this._errorMsg=t.getErrorMessage(),this._errorLocation=t.getErrorLocation(),this._errorIndicator=t.getErrorIndicator()),this.report("Distance")},Ve.prototype.checkArea=function(){var t=this._input.getArea(),e=this._result.getArea();this._distance>0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t<e&&(this._isValid=!1,this._errorMsg="Area of negative buffer is larger than input",this._errorIndicator=this._result),this.report("Area")},Ve.prototype.checkPolygonal=function(){this._result instanceof Ie||this._result instanceof oi||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")},Ve.prototype.getErrorIndicator=function(){return this._errorIndicator},Ve.prototype.getErrorLocation=function(){return this._errorLocation},Ve.prototype.checkExpectedEmpty=function(){if(this._input.getDimension()>=2||this._distance>0)return null;this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),this.report("ExpectedEmpty")},Ve.prototype.report=function(t){if(!Ve.VERBOSE)return null;Le.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))},Ve.prototype.getErrorMessage=function(){return this._errorMsg},Ve.prototype.interfaces_=function(){return[]},Ve.prototype.getClass=function(){return Ve},Ve.isValidMsg=function(t,e,r){var i=new Ve(t,e,r);return i.isValid()?null:i.getErrorMessage()},Ve.isValid=function(t,e,r){var i=new Ve(t,e,r);return!!i.isValid()},zf.VERBOSE.get=function(){return!1},zf.MAX_ENV_DIFF_FRAC.get=function(){return .012},Object.defineProperties(Ve,zf);var Un=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Un.prototype.getCoordinates=function(){return this._pts},Un.prototype.size=function(){return this._pts.length},Un.prototype.getCoordinate=function(t){return this._pts[t]},Un.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Un.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:So.octant(this.getCoordinate(t),this.getCoordinate(t+1))},Un.prototype.setData=function(t){this._data=t},Un.prototype.getData=function(){return this._data},Un.prototype.toString=function(){return ln.toLineString(new pe(this._pts))},Un.prototype.interfaces_=function(){return[ui]},Un.prototype.getClass=function(){return Un};var Te=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new j,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};Te.prototype.getInteriorIntersection=function(){return this._interiorIntersection},Te.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},Te.prototype.getIntersectionSegments=function(){return this._intSegments},Te.prototype.count=function(){return this._intersectionCount},Te.prototype.getIntersections=function(){return this._intersections},Te.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Te.prototype.setKeepIntersections=function(t){this._keepIntersections=t},Te.prototype.processIntersections=function(t,e,r,i){if(!this._findAllIntersections&&this.hasIntersection()||t===r&&e===i)return null;if(this._isCheckEndSegmentsOnly){var s=this.isEndSegment(t,e)||this.isEndSegment(r,i);if(!s)return null}var o=t.getCoordinates()[e],a=t.getCoordinates()[e+1],u=r.getCoordinates()[i],l=r.getCoordinates()[i+1];this._li.computeIntersection(o,a,u,l),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=o,this._intSegments[1]=a,this._intSegments[2]=u,this._intSegments[3]=l,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},Te.prototype.isEndSegment=function(t,e){return e===0||e>=t.size()-2},Te.prototype.hasIntersection=function(){return this._interiorIntersection!==null},Te.prototype.isDone=function(){return this._findAllIntersections?!1:this._interiorIntersection!==null},Te.prototype.interfaces_=function(){return[Vs]},Te.prototype.getClass=function(){return Te},Te.createAllIntersectionsFinder=function(t){var e=new Te(t);return e.setFindAllIntersections(!0),e},Te.createAnyIntersectionFinder=function(t){return new Te(t)},Te.createIntersectionCounter=function(t){var e=new Te(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var mn=function(){this._li=new Ds,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};mn.prototype.execute=function(){if(this._segInt!==null)return null;this.checkInteriorIntersections()},mn.prototype.getIntersections=function(){return this._segInt.getIntersections()},mn.prototype.isValid=function(){return this.execute(),this._isValid},mn.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},mn.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new Te(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new Gf;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},mn.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Ri(this.getErrorMessage(),this._segInt.getInteriorIntersection())},mn.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+ln.toLineString(t[0],t[1])+" and "+ln.toLineString(t[2],t[3])},mn.prototype.interfaces_=function(){return[]},mn.prototype.getClass=function(){return mn},mn.computeIntersections=function(t){var e=new mn(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var qs=function n(){this._nv=null;var t=arguments[0];this._nv=new mn(n.toSegmentStrings(t))};qs.prototype.checkValid=function(){this._nv.checkValid()},qs.prototype.interfaces_=function(){return[]},qs.prototype.getClass=function(){return qs},qs.toSegmentStrings=function(t){for(var e=new j,r=t.iterator();r.hasNext();){var i=r.next();e.add(new Un(i.getCoordinates(),i))}return e},qs.checkValid=function(t){var e=new qs(t);e.checkValid()};var xo=function(t){this._mapOp=t};xo.prototype.map=function(t){for(var e=this,r=new j,i=0;i<t.getNumGeometries();i++){var s=e._mapOp.map(t.getGeometryN(i));s.isEmpty()||r.add(s)}return t.getFactory().createGeometryCollection(xt.toGeometryArray(r))},xo.prototype.interfaces_=function(){return[]},xo.prototype.getClass=function(){return xo},xo.map=function(t,e){var r=new xo(e);return r.map(t)};var zn=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new j,this._resultLineList=new j;var t=arguments[0],e=arguments[1],r=arguments[2];this._op=t,this._geometryFactory=e,this._ptLocator=r};zn.prototype.collectLines=function(t){for(var e=this,r=this._op.getGraph().getEdgeEnds().iterator();r.hasNext();){var i=r.next();e.collectLineEdge(i,t,e._lineEdgesList),e.collectBoundaryTouchEdge(i,t,e._lineEdgesList)}},zn.prototype.labelIsolatedLine=function(t,e){var r=this._ptLocator.locate(t.getCoordinate(),this._op.getArgGeometry(e));t.getLabel().setLocation(e,r)},zn.prototype.build=function(t){return this.findCoveredLineEdges(),this.collectLines(t),this.buildLines(t),this._resultLineList},zn.prototype.collectLineEdge=function(t,e,r){var i=t.getLabel(),s=t.getEdge();t.isLineEdge()&&!t.isVisited()&&St.isResultOfOp(i,e)&&!s.isCovered()&&(r.add(s),t.setVisitedEdge(!0))},zn.prototype.findCoveredLineEdges=function(){for(var t=this,e=this._op.getGraph().getNodes().iterator();e.hasNext();){var r=e.next();r.getEdges().findCoveredLineEdges()}for(var i=this._op.getGraph().getEdgeEnds().iterator();i.hasNext();){var s=i.next(),o=s.getEdge();if(s.isLineEdge()&&!o.isCoveredSet()){var a=t._op.isCoveredByA(s.getCoordinate());o.setCovered(a)}}},zn.prototype.labelIsolatedLines=function(t){for(var e=this,r=t.iterator();r.hasNext();){var i=r.next(),s=i.getLabel();i.isIsolated()&&(s.isNull(0)?e.labelIsolatedLine(i,0):e.labelIsolatedLine(i,1))}},zn.prototype.buildLines=function(t){for(var e=this,r=this._lineEdgesList.iterator();r.hasNext();){var i=r.next(),s=e._geometryFactory.createLineString(i.getCoordinates());e._resultLineList.add(s),i.setInResult(!0)}},zn.prototype.collectBoundaryTouchEdge=function(t,e,r){var i=t.getLabel();if(t.isLineEdge()||t.isVisited()||t.isInteriorAreaEdge()||t.getEdge().isInResult())return null;Pt.isTrue(!(t.isInResult()||t.getSym().isInResult())||!t.getEdge().isInResult()),St.isResultOfOp(i,e)&&e===St.INTERSECTION&&(r.add(t.getEdge()),t.setVisitedEdge(!0))},zn.prototype.interfaces_=function(){return[]},zn.prototype.getClass=function(){return zn};var To=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new j;var t=arguments[0],e=arguments[1];this._op=t,this._geometryFactory=e};To.prototype.filterCoveredNodeToPoint=function(t){var e=t.getCoordinate();if(!this._op.isCoveredByLA(e)){var r=this._geometryFactory.createPoint(e);this._resultPointList.add(r)}},To.prototype.extractNonCoveredResultNodes=function(t){for(var e=this,r=this._op.getGraph().getNodes().iterator();r.hasNext();){var i=r.next();if(!i.isInResult()&&!i.isIncidentEdgeInResult()&&(i.getEdges().getDegree()===0||t===St.INTERSECTION)){var s=i.getLabel();St.isResultOfOp(s,t)&&e.filterCoveredNodeToPoint(i)}}},To.prototype.build=function(t){return this.extractNonCoveredResultNodes(t),this._resultPointList},To.prototype.interfaces_=function(){return[]},To.prototype.getClass=function(){return To};var cr=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};cr.prototype.transformPoint=function(t,e){return this._factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))},cr.prototype.transformPolygon=function(t,e){var r=this,i=!0,s=this.transformLinearRing(t.getExteriorRing(),t);(s===null||!(s instanceof si)||s.isEmpty())&&(i=!1);for(var o=new j,a=0;a<t.getNumInteriorRing();a++){var u=r.transformLinearRing(t.getInteriorRingN(a),t);u===null||u.isEmpty()||(u instanceof si||(i=!1),o.add(u))}if(i)return this._factory.createPolygon(s,o.toArray([]));var l=new j;return s!==null&&l.add(s),l.addAll(o),this._factory.buildGeometry(l)},cr.prototype.createCoordinateSequence=function(t){return this._factory.getCoordinateSequenceFactory().create(t)},cr.prototype.getInputGeometry=function(){return this._inputGeom},cr.prototype.transformMultiLineString=function(t,e){for(var r=this,i=new j,s=0;s<t.getNumGeometries();s++){var o=r.transformLineString(t.getGeometryN(s),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},cr.prototype.transformCoordinates=function(t,e){return this.copy(t)},cr.prototype.transformLineString=function(t,e){return this._factory.createLineString(this.transformCoordinates(t.getCoordinateSequence(),t))},cr.prototype.transformMultiPoint=function(t,e){for(var r=this,i=new j,s=0;s<t.getNumGeometries();s++){var o=r.transformPoint(t.getGeometryN(s),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},cr.prototype.transformMultiPolygon=function(t,e){for(var r=this,i=new j,s=0;s<t.getNumGeometries();s++){var o=r.transformPolygon(t.getGeometryN(s),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},cr.prototype.copy=function(t){return t.copy()},cr.prototype.transformGeometryCollection=function(t,e){for(var r=this,i=new j,s=0;s<t.getNumGeometries();s++){var o=r.transform(t.getGeometryN(s));o!==null&&(r._pruneEmptyGeometry&&o.isEmpty()||i.add(o))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(xt.toGeometryArray(i)):this._factory.buildGeometry(i)},cr.prototype.transform=function(t){if(this._inputGeom=t,this._factory=t.getFactory(),t instanceof _r)return this.transformPoint(t,null);if(t instanceof xa)return this.transformMultiPoint(t,null);if(t instanceof si)return this.transformLinearRing(t,null);if(t instanceof ce)return this.transformLineString(t,null);if(t instanceof Fs)return this.transformMultiLineString(t,null);if(t instanceof Ie)return this.transformPolygon(t,null);if(t instanceof oi)return this.transformMultiPolygon(t,null);if(t instanceof Qe)return this.transformGeometryCollection(t,null);throw new ae("Unknown Geometry subtype: "+t.getClass().getName())},cr.prototype.transformLinearRing=function(t,e){var r=this.transformCoordinates(t.getCoordinateSequence(),t);if(r===null)return this._factory.createLinearRing(null);var i=r.size();return i>0&&i<4&&!this._preserveType?this._factory.createLineString(r):this._factory.createLinearRing(r)},cr.prototype.interfaces_=function(){return[]},cr.prototype.getClass=function(){return cr};var di=function n(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new ut,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof ce&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];n.call(this,t.getCoordinates(),e)}else if(arguments[0]instanceof Array&&typeof arguments[1]=="number"){var r=arguments[0],i=arguments[1];this._srcPts=r,this._isClosed=n.isClosed(r),this._snapTolerance=i}};di.prototype.snapVertices=function(t,e){for(var r=this,i=this._isClosed?t.size()-1:t.size(),s=0;s<i;s++){var o=t.get(s),a=r.findSnapForVertex(o,e);a!==null&&(t.set(s,new D(a)),s===0&&r._isClosed&&t.set(t.size()-1,new D(a)))}},di.prototype.findSnapForVertex=function(t,e){for(var r=this,i=0;i<e.length;i++){if(t.equals2D(e[i]))return null;if(t.distance(e[i])<r._snapTolerance)return e[i]}return null},di.prototype.snapTo=function(t){var e=new ul(this._srcPts);this.snapVertices(e,t),this.snapSegments(e,t);var r=e.toCoordinateArray();return r},di.prototype.snapSegments=function(t,e){var r=this;if(e.length===0)return null;var i=e.length;e[0].equals2D(e[e.length-1])&&(i=e.length-1);for(var s=0;s<i;s++){var o=e[s],a=r.findSegmentIndexToSnap(o,t);a>=0&&t.add(a+1,new D(o),!1)}},di.prototype.findSegmentIndexToSnap=function(t,e){for(var r=this,i=yt.MAX_VALUE,s=-1,o=0;o<e.size()-1;o++){if(r._seg.p0=e.get(o),r._seg.p1=e.get(o+1),r._seg.p0.equals2D(t)||r._seg.p1.equals2D(t)){if(r._allowSnappingToSourceVertices)continue;return-1}var a=r._seg.distance(t);a<r._snapTolerance&&a<i&&(i=a,s=o)}return s},di.prototype.setAllowSnappingToSourceVertices=function(t){this._allowSnappingToSourceVertices=t},di.prototype.interfaces_=function(){return[]},di.prototype.getClass=function(){return di},di.isClosed=function(t){return t.length<=1?!1:t[0].equals2D(t[t.length-1])};var me=function(t){this._srcGeom=t||null},Tv={SNAP_PRECISION_FACTOR:{configurable:!0}};me.prototype.snapTo=function(t,e){var r=this.extractTargetCoordinates(t),i=new Av(e,r);return i.transform(this._srcGeom)},me.prototype.snapToSelf=function(t,e){var r=this.extractTargetCoordinates(this._srcGeom),i=new Av(t,r,!0),s=i.transform(this._srcGeom),o=s;return e&&pt(o,ns)&&(o=s.buffer(0)),o},me.prototype.computeSnapTolerance=function(t){var e=this.computeMinimumSegmentLength(t),r=e/10;return r},me.prototype.extractTargetCoordinates=function(t){for(var e=new xn,r=t.getCoordinates(),i=0;i<r.length;i++)e.add(r[i]);return e.toArray(new Array(0).fill(null))},me.prototype.computeMinimumSegmentLength=function(t){for(var e=yt.MAX_VALUE,r=0;r<t.length-1;r++){var i=t[r].distance(t[r+1]);i<e&&(e=i)}return e},me.prototype.interfaces_=function(){return[]},me.prototype.getClass=function(){return me},me.snap=function(t,e,r){var i=new Array(2).fill(null),s=new me(t);i[0]=s.snapTo(e,r);var o=new me(e);return i[1]=o.snapTo(i[0],r),i},me.computeOverlaySnapTolerance=function(){if(arguments.length===1){var t=arguments[0],e=me.computeSizeBasedSnapTolerance(t),r=t.getPrecisionModel();if(r.getType()===Ut.FIXED){var i=1/r.getScale()*2/1.415;i>e&&(e=i)}return e}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return Math.min(me.computeOverlaySnapTolerance(s),me.computeOverlaySnapTolerance(o))}},me.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal(),r=Math.min(e.getHeight(),e.getWidth()),i=r*me.SNAP_PRECISION_FACTOR;return i},me.snapToSelf=function(t,e,r){var i=new me(t);return i.snapToSelf(e,r)},Tv.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(me,Tv);var Av=function(n){function t(e,r,i){n.call(this),this._snapTolerance=e||null,this._snapPts=r||null,this._isSelfSnap=i!==void 0?i:!1}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.snapLine=function(r,i){var s=new di(r,this._snapTolerance);return s.setAllowSnappingToSourceVertices(this._isSelfSnap),s.snapTo(i)},t.prototype.transformCoordinates=function(r,i){var s=r.toCoordinateArray(),o=this.snapLine(s,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(o)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(cr),rr=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};rr.prototype.getCommon=function(){return yt.longBitsToDouble(this._commonBits)},rr.prototype.add=function(t){var e=yt.doubleToLongBits(t);if(this._isFirst)return this._commonBits=e,this._commonSignExp=rr.signExpBits(this._commonBits),this._isFirst=!1,null;var r=rr.signExpBits(e);if(r!==this._commonSignExp)return this._commonBits=0,null;this._commonMantissaBitsCount=rr.numCommonMostSigMantissaBits(this._commonBits,e),this._commonBits=rr.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))},rr.prototype.toString=function(){if(arguments.length===1){var t=arguments[0],e=yt.longBitsToDouble(t),r=yt.toBinaryString(t),i="0000000000000000000000000000000000000000000000000000000000000000"+r,s=i.substring(i.length-64),o=s.substring(0,1)+" "+s.substring(1,12)+"(exp) "+s.substring(12)+" [ "+e+" ]";return o}},rr.prototype.interfaces_=function(){return[]},rr.prototype.getClass=function(){return rr},rr.getBit=function(t,e){var r=1<<e;return(t&r)!==0?1:0},rr.signExpBits=function(t){return t>>52},rr.zeroLowerBits=function(t,e){var r=(1<<e)-1,i=~r,s=t&i;return s},rr.numCommonMostSigMantissaBits=function(t,e){for(var r=0,i=52;i>=0;i--){if(rr.getBit(t,i)!==rr.getBit(e,i))return r;r++}return 52};var cs=function(){this._commonCoord=null,this._ccFilter=new Ao},qf={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};cs.prototype.addCommonBits=function(t){var e=new fs(this._commonCoord);t.apply(e),t.geometryChanged()},cs.prototype.removeCommonBits=function(t){if(this._commonCoord.x===0&&this._commonCoord.y===0)return t;var e=new D(this._commonCoord);e.x=-e.x,e.y=-e.y;var r=new fs(e);return t.apply(r),t.geometryChanged(),t},cs.prototype.getCommonCoordinate=function(){return this._commonCoord},cs.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},cs.prototype.interfaces_=function(){return[]},cs.prototype.getClass=function(){return cs},qf.CommonCoordinateFilter.get=function(){return Ao},qf.Translater.get=function(){return fs},Object.defineProperties(cs,qf);var Ao=function(){this._commonBitsX=new rr,this._commonBitsY=new rr};Ao.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},Ao.prototype.getCommonCoordinate=function(){return new D(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},Ao.prototype.interfaces_=function(){return[ii]},Ao.prototype.getClass=function(){return Ao};var fs=function(){this.trans=null;var t=arguments[0];this.trans=t};fs.prototype.filter=function(t,e){var r=t.getOrdinate(e,0)+this.trans.x,i=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,r),t.setOrdinate(e,1,i)},fs.prototype.isDone=function(){return!1},fs.prototype.isGeometryChanged=function(){return!0},fs.prototype.interfaces_=function(){return[fn]},fs.prototype.getClass=function(){return fs};var Ae=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};Ae.prototype.selfSnap=function(t){var e=new me(t),r=e.snapTo(t,this._snapTolerance);return r},Ae.prototype.removeCommonBits=function(t){this._cbr=new cs,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e},Ae.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},Ae.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),r=St.overlayOp(e[0],e[1],t);return this.prepareResult(r)},Ae.prototype.checkValid=function(t){t.isValid()||Le.out.println("Snapped geometry is invalid")},Ae.prototype.computeSnapTolerance=function(){this._snapTolerance=me.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},Ae.prototype.snap=function(t){var e=this.removeCommonBits(t),r=me.snap(e[0],e[1],this._snapTolerance);return r},Ae.prototype.interfaces_=function(){return[]},Ae.prototype.getClass=function(){return Ae},Ae.overlayOp=function(t,e,r){var i=new Ae(t,e);return i.getResultGeometry(r)},Ae.union=function(t,e){return Ae.overlayOp(t,e,St.UNION)},Ae.intersection=function(t,e){return Ae.overlayOp(t,e,St.INTERSECTION)},Ae.symDifference=function(t,e){return Ae.overlayOp(t,e,St.SYMDIFFERENCE)},Ae.difference=function(t,e){return Ae.overlayOp(t,e,St.DIFFERENCE)};var nr=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};nr.prototype.getResultGeometry=function(t){var e=null,r=!1,i=null;try{e=St.overlayOp(this._geom[0],this._geom[1],t);var s=!0;s&&(r=!0)}catch(o){if(o instanceof xi)i=o;else throw o}finally{}if(!r)try{e=Ae.overlayOp(this._geom[0],this._geom[1],t)}catch(o){throw o instanceof xi?i:o}finally{}return e},nr.prototype.interfaces_=function(){return[]},nr.prototype.getClass=function(){return nr},nr.overlayOp=function(t,e,r){var i=new nr(t,e);return i.getResultGeometry(r)},nr.union=function(t,e){return nr.overlayOp(t,e,St.UNION)},nr.intersection=function(t,e){return nr.overlayOp(t,e,St.INTERSECTION)},nr.symDifference=function(t,e){return nr.overlayOp(t,e,St.SYMDIFFERENCE)},nr.difference=function(t,e){return nr.overlayOp(t,e,St.DIFFERENCE)};var Cl=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};Cl.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},Cl.prototype.interfaces_=function(){return[]},Cl.prototype.getClass=function(){return Cl};var Cr=function n(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,arguments.length===2){var t=arguments[0],e=arguments[1];this._eventType=n.DELETE,this._xValue=t,this._insertEvent=e}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._eventType=n.INSERT,this._label=r,this._xValue=i,this._obj=s}},Wf={INSERT:{configurable:!0},DELETE:{configurable:!0}};Cr.prototype.isDelete=function(){return this._eventType===Cr.DELETE},Cr.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},Cr.prototype.getObject=function(){return this._obj},Cr.prototype.compareTo=function(t){var e=t;return this._xValue<e._xValue?-1:this._xValue>e._xValue?1:this._eventType<e._eventType?-1:this._eventType>e._eventType?1:0},Cr.prototype.getInsertEvent=function(){return this._insertEvent},Cr.prototype.isInsert=function(){return this._eventType===Cr.INSERT},Cr.prototype.isSameLabel=function(t){return this._label===null?!1:this._label===t._label},Cr.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},Cr.prototype.interfaces_=function(){return[Yr]},Cr.prototype.getClass=function(){return Cr},Wf.INSERT.get=function(){return 1},Wf.DELETE.get=function(){return 2},Object.defineProperties(Cr,Wf);var Fh=function(){};Fh.prototype.interfaces_=function(){return[]},Fh.prototype.getClass=function(){return Fh};var Ue=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],r=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=r};Ue.prototype.isTrivialIntersection=function(t,e,r,i){if(t===r&&this._li.getIntersectionNum()===1){if(Ue.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var s=t.getNumPoints()-1;if(e===0&&i===s||i===0&&e===s)return!0}}return!1},Ue.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Ue.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},Ue.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Ue.prototype.isBoundaryPointInternal=function(t,e){for(var r=e.iterator();r.hasNext();){var i=r.next(),s=i.getCoordinate();if(t.isIntersection(s))return!0}return!1},Ue.prototype.hasProperIntersection=function(){return this._hasProper},Ue.prototype.hasIntersection=function(){return this._hasIntersection},Ue.prototype.isDone=function(){return this._isDone},Ue.prototype.isBoundaryPoint=function(t,e){return e===null?!1:!!(this.isBoundaryPointInternal(t,e[0])||this.isBoundaryPointInternal(t,e[1]))},Ue.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},Ue.prototype.addIntersections=function(t,e,r,i){if(t===r&&e===i)return null;this.numTests++;var s=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=r.getCoordinates()[i],u=r.getCoordinates()[i+1];this._li.computeIntersection(s,o,a,u),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),r.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,r,i)||(this._hasIntersection=!0,(this._includeProper||!this._li.isProper())&&(t.addIntersections(this._li,e,0),r.addIntersections(this._li,i,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},Ue.prototype.interfaces_=function(){return[]},Ue.prototype.getClass=function(){return Ue},Ue.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var CI=function(n){function t(){n.call(this),this.events=new j,this.nOverlaps=null}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.prepareEvents=function(){var r=this;gn.sort(this.events);for(var i=0;i<this.events.size();i++){var s=r.events.get(i);s.isDelete()&&s.getInsertEvent().setDeleteEventIndex(i)}},t.prototype.computeIntersections=function(){var r=this;if(arguments.length===1){var i=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var s=0;s<this.events.size();s++){var o=r.events.get(s);if(o.isInsert()&&r.processOverlaps(s,o.getDeleteEventIndex(),o,i),i.isDone())break}}else if(arguments.length===3){if(arguments[2]instanceof Ue&&pt(arguments[0],hn)&&pt(arguments[1],hn)){var a=arguments[0],u=arguments[1],l=arguments[2];this.addEdges(a,a),this.addEdges(u,u),this.computeIntersections(l)}else if(typeof arguments[2]=="boolean"&&pt(arguments[0],hn)&&arguments[1]instanceof Ue){var c=arguments[0],h=arguments[1],f=arguments[2];f?this.addEdges(c,null):this.addEdges(c),this.computeIntersections(h)}}},t.prototype.addEdge=function(r,i){for(var s=this,o=r.getMonotoneChainEdge(),a=o.getStartIndexes(),u=0;u<a.length-1;u++){var l=new Cl(o,u),c=new Cr(i,o.getMinX(u),l);s.events.add(c),s.events.add(new Cr(o.getMaxX(u),c))}},t.prototype.processOverlaps=function(r,i,s,o){for(var a=this,u=s.getObject(),l=r;l<i;l++){var c=a.events.get(l);if(c.isInsert()){var h=c.getObject();s.isSameLabel(c)||(u.computeIntersections(h,o),a.nOverlaps++)}}},t.prototype.addEdges=function(){var r=this;if(arguments.length===1)for(var i=arguments[0],s=i.iterator();s.hasNext();){var o=s.next();r.addEdge(o,o)}else if(arguments.length===2)for(var a=arguments[0],u=arguments[1],l=a.iterator();l.hasNext();){var c=l.next();r.addEdge(c,u)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Fh),gi=function(){this._min=yt.POSITIVE_INFINITY,this._max=yt.NEGATIVE_INFINITY},Ov={NodeComparator:{configurable:!0}};gi.prototype.getMin=function(){return this._min},gi.prototype.intersects=function(t,e){return!(this._min>e||this._max<t)},gi.prototype.getMax=function(){return this._max},gi.prototype.toString=function(){return ln.toLineString(new D(this._min,0),new D(this._max,0))},gi.prototype.interfaces_=function(){return[]},gi.prototype.getClass=function(){return gi},Ov.NodeComparator.get=function(){return Pl},Object.defineProperties(gi,Ov);var Pl=function(){};Pl.prototype.compare=function(t,e){var r=t,i=e,s=(r._min+r._max)/2,o=(i._min+i._max)/2;return s<o?-1:s>o?1:0},Pl.prototype.interfaces_=function(){return[ya]},Pl.prototype.getClass=function(){return Pl};var PI=function(n){function t(){n.call(this),this._item=null;var e=arguments[0],r=arguments[1],i=arguments[2];this._min=e,this._max=r,this._item=i}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.query=function(r,i,s){if(!this.intersects(r,i))return null;s.visitItem(this._item)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(gi),II=function(n){function t(){n.call(this),this._node1=null,this._node2=null;var e=arguments[0],r=arguments[1];this._node1=e,this._node2=r,this.buildExtent(this._node1,this._node2)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.buildExtent=function(r,i){this._min=Math.min(r._min,i._min),this._max=Math.max(r._max,i._max)},t.prototype.query=function(r,i,s){if(!this.intersects(r,i))return null;this._node1!==null&&this._node1.query(r,i,s),this._node2!==null&&this._node2.query(r,i,s)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(gi),pi=function(){this._leaves=new j,this._root=null,this._level=0};pi.prototype.buildTree=function(){var t=this;gn.sort(this._leaves,new gi.NodeComparator);for(var e=this._leaves,r=null,i=new j;;){if(t.buildLevel(e,i),i.size()===1)return i.get(0);r=e,e=i,i=r}},pi.prototype.insert=function(t,e,r){if(this._root!==null)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new PI(t,e,r))},pi.prototype.query=function(t,e,r){this.init(),this._root.query(t,e,r)},pi.prototype.buildRoot=function(){if(this._root!==null)return null;this._root=this.buildTree()},pi.prototype.printNode=function(t){Le.out.println(ln.toLineString(new D(t._min,this._level),new D(t._max,this._level)))},pi.prototype.init=function(){if(this._root!==null)return null;this.buildRoot()},pi.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var r=0;r<t.size();r+=2){var i=t.get(r),s=r+1<t.size()?t.get(r):null;if(s===null)e.add(i);else{var o=new II(t.get(r),t.get(r+1));e.add(o)}}},pi.prototype.interfaces_=function(){return[]},pi.prototype.getClass=function(){return pi};var Fa=function(){this._items=new j};Fa.prototype.visitItem=function(t){this._items.add(t)},Fa.prototype.getItems=function(){return this._items},Fa.prototype.interfaces_=function(){return[is]},Fa.prototype.getClass=function(){return Fa};var Ga=function(){this._index=null;var t=arguments[0];if(!pt(t,ns))throw new ae("Argument must be Polygonal");this._index=new Ws(t)},Hf={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};Ga.prototype.locate=function(t){var e=new Nn(t),r=new ka(e);return this._index.query(t.y,t.y,r),e.getLocation()},Ga.prototype.interfaces_=function(){return[Da]},Ga.prototype.getClass=function(){return Ga},Hf.SegmentVisitor.get=function(){return ka},Hf.IntervalIndexedGeometry.get=function(){return Ws},Object.defineProperties(Ga,Hf);var ka=function(){this._counter=null;var t=arguments[0];this._counter=t};ka.prototype.visitItem=function(t){var e=t;this._counter.countSegment(e.getCoordinate(0),e.getCoordinate(1))},ka.prototype.interfaces_=function(){return[is]},ka.prototype.getClass=function(){return ka};var Ws=function(){this._index=new pi;var t=arguments[0];this.init(t)};Ws.prototype.init=function(t){for(var e=this,r=Ge.getLines(t),i=r.iterator();i.hasNext();){var s=i.next(),o=s.getCoordinates();e.addLine(o)}},Ws.prototype.addLine=function(t){for(var e=this,r=1;r<t.length;r++){var i=new ut(t[r-1],t[r]),s=Math.min(i.p0.y,i.p1.y),o=Math.max(i.p0.y,i.p1.y);e._index.insert(s,o,i)}},Ws.prototype.query=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],r=new Fa;return this._index.query(t,e,r),r.getItems()}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];this._index.query(i,s,o)}},Ws.prototype.interfaces_=function(){return[]},Ws.prototype.getClass=function(){return Ws};var Il=function(n){function t(){if(n.call(this),this._parentGeom=null,this._lineEdgeMap=new dv,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new vn,arguments.length===2){var e=arguments[0],r=arguments[1],i=jr.OGC_SFS_BOUNDARY_RULE;this._argIndex=e,this._parentGeom=r,this._boundaryNodeRule=i,r!==null&&this.add(r)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];this._argIndex=s,this._parentGeom=o,this._boundaryNodeRule=a,o!==null&&this.add(o)}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.insertBoundaryPoint=function(r,i){var s=this._nodes.addNode(i),o=s.getLabel(),a=1,u=F.NONE;u=o.getLocation(r,B.ON),u===F.BOUNDARY&&a++;var l=t.determineBoundary(this._boundaryNodeRule,a);o.setLocation(r,l)},t.prototype.computeSelfNodes=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.computeSelfNodes(r,i,!1)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2],u=new Ue(s,!0,!1);u.setIsDoneIfProperInt(a);var l=this.createEdgeSetIntersector(),c=this._parentGeom instanceof si||this._parentGeom instanceof Ie||this._parentGeom instanceof oi,h=o||!c;return l.computeIntersections(this._edges,u,h),this.addSelfIntersectionNodes(this._argIndex),u}},t.prototype.computeSplitEdges=function(r){for(var i=this._edges.iterator();i.hasNext();){var s=i.next();s.eiList.addSplitEdges(r)}},t.prototype.computeEdgeIntersections=function(r,i,s){var o=new Ue(i,s,!0);o.setBoundaryNodes(this.getBoundaryNodes(),r.getBoundaryNodes());var a=this.createEdgeSetIntersector();return a.computeIntersections(this._edges,r._edges,o),o},t.prototype.getGeometry=function(){return this._parentGeom},t.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},t.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},t.prototype.addPoint=function(){if(arguments[0]instanceof _r){var r=arguments[0],i=r.getCoordinate();this.insertPoint(this._argIndex,i,F.INTERIOR)}else if(arguments[0]instanceof D){var s=arguments[0];this.insertPoint(this._argIndex,s,F.INTERIOR)}},t.prototype.addPolygon=function(r){var i=this;this.addPolygonRing(r.getExteriorRing(),F.EXTERIOR,F.INTERIOR);for(var s=0;s<r.getNumInteriorRing();s++){var o=r.getInteriorRingN(s);i.addPolygonRing(o,F.INTERIOR,F.EXTERIOR)}},t.prototype.addEdge=function(r){this.insertEdge(r);var i=r.getCoordinates();this.insertPoint(this._argIndex,i[0],F.BOUNDARY),this.insertPoint(this._argIndex,i[i.length-1],F.BOUNDARY)},t.prototype.addLineString=function(r){var i=Nt.removeRepeatedPoints(r.getCoordinates());if(i.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;var s=new Rh(i,new Yt(this._argIndex,F.INTERIOR));this._lineEdgeMap.put(r,s),this.insertEdge(s),Pt.isTrue(i.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,i[0]),this.insertBoundaryPoint(this._argIndex,i[i.length-1])},t.prototype.getInvalidPoint=function(){return this._invalidPoint},t.prototype.getBoundaryPoints=function(){for(var r=this.getBoundaryNodes(),i=new Array(r.size()).fill(null),s=0,o=r.iterator();o.hasNext();){var a=o.next();i[s++]=a.getCoordinate().copy()}return i},t.prototype.getBoundaryNodes=function(){return this._boundaryNodes===null&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},t.prototype.addSelfIntersectionNode=function(r,i,s){if(this.isBoundaryNode(r,i))return null;s===F.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(r,i):this.insertPoint(r,i,s)},t.prototype.addPolygonRing=function(r,i,s){if(r.isEmpty())return null;var o=Nt.removeRepeatedPoints(r.getCoordinates());if(o.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=o[0],null;var a=i,u=s;K.isCCW(o)&&(a=s,u=i);var l=new Rh(o,new Yt(this._argIndex,F.BOUNDARY,a,u));this._lineEdgeMap.put(r,l),this.insertEdge(l),this.insertPoint(this._argIndex,o[0],F.BOUNDARY)},t.prototype.insertPoint=function(r,i,s){var o=this._nodes.addNode(i),a=o.getLabel();a===null?o._label=new Yt(r,s):a.setLocation(r,s)},t.prototype.createEdgeSetIntersector=function(){return new CI},t.prototype.addSelfIntersectionNodes=function(r){for(var i=this,s=this._edges.iterator();s.hasNext();)for(var o=s.next(),a=o.getLabel().getLocation(r),u=o.eiList.iterator();u.hasNext();){var l=u.next();i.addSelfIntersectionNode(r,l.coord,a)}},t.prototype.add=function(){if(arguments.length===1){var r=arguments[0];if(r.isEmpty())return null;if(r instanceof oi&&(this._useBoundaryDeterminationRule=!1),r instanceof Ie)this.addPolygon(r);else if(r instanceof ce)this.addLineString(r);else if(r instanceof _r)this.addPoint(r);else if(r instanceof xa)this.addCollection(r);else if(r instanceof Fs)this.addCollection(r);else if(r instanceof oi)this.addCollection(r);else if(r instanceof Qe)this.addCollection(r);else throw new Error(r.getClass().getName())}else return n.prototype.add.apply(this,arguments)},t.prototype.addCollection=function(r){for(var i=this,s=0;s<r.getNumGeometries();s++){var o=r.getGeometryN(s);i.add(o)}},t.prototype.locate=function(r){return pt(this._parentGeom,ns)&&this._parentGeom.getNumGeometries()>50?(this._areaPtLocator===null&&(this._areaPtLocator=new Ga(this._parentGeom)),this._areaPtLocator.locate(r)):this._ptLocator.locate(r,this._parentGeom)},t.prototype.findEdge=function(){if(arguments.length===1){var r=arguments[0];return this._lineEdgeMap.get(r)}else return n.prototype.findEdge.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.determineBoundary=function(r,i){return r.isInBoundary(i)?F.BOUNDARY:F.INTERIOR},t}(he),Va=function(){if(this._li=new Ds,this._resultPrecisionModel=null,this._arg=null,arguments.length===1){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new Il(0,t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1],i=jr.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(r.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(r.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Il(0,e,i),this._arg[1]=new Il(1,r,i)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];s.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(s.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Il(0,s,a),this._arg[1]=new Il(1,o,a)}};Va.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},Va.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},Va.prototype.interfaces_=function(){return[]},Va.prototype.getClass=function(){return Va};var Hs=function(){};Hs.prototype.interfaces_=function(){return[]},Hs.prototype.getClass=function(){return Hs},Hs.map=function(){if(arguments[0]instanceof gt&&pt(arguments[1],Hs.MapOp)){for(var t=arguments[0],e=arguments[1],r=new j,i=0;i<t.getNumGeometries();i++){var s=e.map(t.getGeometryN(i));s!==null&&r.add(s)}return t.getFactory().buildGeometry(r)}else if(pt(arguments[0],Pe)&&pt(arguments[1],Hs.MapOp)){for(var o=arguments[0],a=arguments[1],u=new j,l=o.iterator();l.hasNext();){var c=l.next(),h=a.map(c);h!==null&&u.add(h)}return u}},Hs.MapOp=function(){};var St=function(n){function t(){var e=arguments[0],r=arguments[1];n.call(this,e,r),this._ptLocator=new vn,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new pn,this._resultPolyList=new j,this._resultLineList=new j,this._resultPointList=new j,this._graph=new he(new Cv),this._geomFact=e.getFactory()}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.insertUniqueEdge=function(r){var i=this._edgeList.findEqualEdge(r);if(i!==null){var s=i.getLabel(),o=r.getLabel();i.isPointwiseEqual(r)||(o=new Yt(r.getLabel()),o.flip());var a=i.getDepth();a.isNull()&&a.add(s),a.add(o),s.merge(o)}else this._edgeList.add(r)},t.prototype.getGraph=function(){return this._graph},t.prototype.cancelDuplicateResultEdges=function(){for(var r=this._graph.getEdgeEnds().iterator();r.hasNext();){var i=r.next(),s=i.getSym();i.isInResult()&&s.isInResult()&&(i.setInResult(!1),s.setInResult(!1))}},t.prototype.isCoveredByLA=function(r){return!!(this.isCovered(r,this._resultLineList)||this.isCovered(r,this._resultPolyList))},t.prototype.computeGeometry=function(r,i,s,o){var a=new j;return a.addAll(r),a.addAll(i),a.addAll(s),a.isEmpty()?t.createEmptyResult(o,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(a)},t.prototype.mergeSymLabels=function(){for(var r=this._graph.getNodes().iterator();r.hasNext();){var i=r.next();i.getEdges().mergeSymLabels()}},t.prototype.isCovered=function(r,i){for(var s=this,o=i.iterator();o.hasNext();){var a=o.next(),u=s._ptLocator.locate(r,a);if(u!==F.EXTERIOR)return!0}return!1},t.prototype.replaceCollapsedEdges=function(){for(var r=new j,i=this._edgeList.iterator();i.hasNext();){var s=i.next();s.isCollapsed()&&(i.remove(),r.add(s.getCollapsedEdge()))}this._edgeList.addAll(r)},t.prototype.updateNodeLabelling=function(){for(var r=this._graph.getNodes().iterator();r.hasNext();){var i=r.next(),s=i.getEdges().getLabel();i.getLabel().merge(s)}},t.prototype.getResultGeometry=function(r){return this.computeOverlay(r),this._resultGeom},t.prototype.insertUniqueEdges=function(r){for(var i=this,s=r.iterator();s.hasNext();){var o=s.next();i.insertUniqueEdge(o)}},t.prototype.computeOverlay=function(r){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var i=new j;this._arg[0].computeSplitEdges(i),this._arg[1].computeSplitEdges(i),this.insertUniqueEdges(i),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),qs.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(r),this.cancelDuplicateResultEdges();var s=new wr(this._geomFact);s.add(this._graph),this._resultPolyList=s.getPolygons();var o=new zn(this,this._geomFact,this._ptLocator);this._resultLineList=o.build(r);var a=new To(this,this._geomFact,this._ptLocator);this._resultPointList=a.build(r),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,r)},t.prototype.labelIncompleteNode=function(r,i){var s=this._ptLocator.locate(r.getCoordinate(),this._arg[i].getGeometry());r.getLabel().setLocation(i,s)},t.prototype.copyPoints=function(r){for(var i=this,s=this._arg[r].getNodeIterator();s.hasNext();){var o=s.next(),a=i._graph.addNode(o.getCoordinate());a.setLabel(r,o.getLabel().getLocation(r))}},t.prototype.findResultAreaEdges=function(r){for(var i=this._graph.getEdgeEnds().iterator();i.hasNext();){var s=i.next(),o=s.getLabel();o.isArea()&&!s.isInteriorAreaEdge()&&t.isResultOfOp(o.getLocation(0,B.RIGHT),o.getLocation(1,B.RIGHT),r)&&s.setInResult(!0)}},t.prototype.computeLabelsFromDepths=function(){for(var r=this._edgeList.iterator();r.hasNext();){var i=r.next(),s=i.getLabel(),o=i.getDepth();if(!o.isNull()){o.normalize();for(var a=0;a<2;a++)!s.isNull(a)&&s.isArea()&&!o.isNull(a)&&(o.getDelta(a)===0?s.toLine(a):(Pt.isTrue(!o.isNull(a,B.LEFT),"depth of LEFT side has not been initialized"),s.setLocation(a,B.LEFT,o.getLocation(a,B.LEFT)),Pt.isTrue(!o.isNull(a,B.RIGHT),"depth of RIGHT side has not been initialized"),s.setLocation(a,B.RIGHT,o.getLocation(a,B.RIGHT))))}}},t.prototype.computeLabelling=function(){for(var r=this,i=this._graph.getNodes().iterator();i.hasNext();){var s=i.next();s.getEdges().computeLabelling(r._arg)}this.mergeSymLabels(),this.updateNodeLabelling()},t.prototype.labelIncompleteNodes=function(){for(var r=this,i=this._graph.getNodes().iterator();i.hasNext();){var s=i.next(),o=s.getLabel();s.isIsolated()&&(o.isNull(0)?r.labelIncompleteNode(s,0):r.labelIncompleteNode(s,1)),s.getEdges().updateLabelling(o)}},t.prototype.isCoveredByA=function(r){return!!this.isCovered(r,this._resultPolyList)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Va);St.overlayOp=function(n,t,e){var r=new St(n,t),i=r.getResultGeometry(e);return i},St.intersection=function(n,t){if(n.isEmpty()||t.isEmpty())return St.createEmptyResult(St.INTERSECTION,n,t,n.getFactory());if(n.isGeometryCollection()){var e=t;return xo.map(n,{interfaces_:function(){return[Hs.MapOp]},map:function(r){return r.intersection(e)}})}return n.checkNotGeometryCollection(n),n.checkNotGeometryCollection(t),nr.overlayOp(n,t,St.INTERSECTION)},St.symDifference=function(n,t){if(n.isEmpty()||t.isEmpty()){if(n.isEmpty()&&t.isEmpty())return St.createEmptyResult(St.SYMDIFFERENCE,n,t,n.getFactory());if(n.isEmpty())return t.copy();if(t.isEmpty())return n.copy()}return n.checkNotGeometryCollection(n),n.checkNotGeometryCollection(t),nr.overlayOp(n,t,St.SYMDIFFERENCE)},St.resultDimension=function(n,t,e){var r=t.getDimension(),i=e.getDimension(),s=-1;switch(n){case St.INTERSECTION:s=Math.min(r,i);break;case St.UNION:s=Math.max(r,i);break;case St.DIFFERENCE:s=r;break;case St.SYMDIFFERENCE:s=Math.max(r,i);break}return s},St.createEmptyResult=function(n,t,e,r){var i=null;switch(St.resultDimension(n,t,e)){case-1:i=r.createGeometryCollection(new Array(0).fill(null));break;case 0:i=r.createPoint();break;case 1:i=r.createLineString();break;case 2:i=r.createPolygon();break}return i},St.difference=function(n,t){return n.isEmpty()?St.createEmptyResult(St.DIFFERENCE,n,t,n.getFactory()):t.isEmpty()?n.copy():(n.checkNotGeometryCollection(n),n.checkNotGeometryCollection(t),nr.overlayOp(n,t,St.DIFFERENCE))},St.isResultOfOp=function(){if(arguments.length===2){var n=arguments[0],t=arguments[1],e=n.getLocation(0),r=n.getLocation(1);return St.isResultOfOp(e,r,t)}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];switch(i===F.BOUNDARY&&(i=F.INTERIOR),s===F.BOUNDARY&&(s=F.INTERIOR),o){case St.INTERSECTION:return i===F.INTERIOR&&s===F.INTERIOR;case St.UNION:return i===F.INTERIOR||s===F.INTERIOR;case St.DIFFERENCE:return i===F.INTERIOR&&s!==F.INTERIOR;case St.SYMDIFFERENCE:return i===F.INTERIOR&&s!==F.INTERIOR||i!==F.INTERIOR&&s===F.INTERIOR}return!1}},St.INTERSECTION=1,St.UNION=2,St.DIFFERENCE=3,St.SYMDIFFERENCE=4;var ds=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new vn,this._seg=new ut;var t=arguments[0],e=arguments[1];this._g=t,this._boundaryDistanceTolerance=e,this._linework=this.extractLinework(t)};ds.prototype.isWithinToleranceOfBoundary=function(t){for(var e=this,r=0;r<this._linework.getNumGeometries();r++)for(var i=e._linework.getGeometryN(r),s=i.getCoordinateSequence(),o=0;o<s.size()-1;o++){s.getCoordinate(o,e._seg.p0),s.getCoordinate(o+1,e._seg.p1);var a=e._seg.distance(t);if(a<=e._boundaryDistanceTolerance)return!0}return!1},ds.prototype.getLocation=function(t){return this.isWithinToleranceOfBoundary(t)?F.BOUNDARY:this._ptLocator.locate(t,this._g)},ds.prototype.extractLinework=function(t){var e=new Ua;t.apply(e);var r=e.getLinework(),i=xt.toLineStringArray(r);return t.getFactory().createMultiLineString(i)},ds.prototype.interfaces_=function(){return[]},ds.prototype.getClass=function(){return ds};var Ua=function(){this._linework=null,this._linework=new j};Ua.prototype.getLinework=function(){return this._linework},Ua.prototype.filter=function(t){var e=this;if(t instanceof Ie){var r=t;this._linework.add(r.getExteriorRing());for(var i=0;i<r.getNumInteriorRing();i++)e._linework.add(r.getInteriorRingN(i))}},Ua.prototype.interfaces_=function(){return[Tn]},Ua.prototype.getClass=function(){return Ua};var Xs=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var t=arguments[0];this._g=t};Xs.prototype.extractPoints=function(t,e,r){for(var i=this,s=t.getCoordinates(),o=0;o<s.length-1;o++)i.computeOffsetPoints(s[o],s[o+1],e,r)},Xs.prototype.setSidesToGenerate=function(t,e){this._doLeft=t,this._doRight=e},Xs.prototype.getPoints=function(t){for(var e=this,r=new j,i=Ge.getLines(this._g),s=i.iterator();s.hasNext();){var o=s.next();e.extractPoints(o,t,r)}return r},Xs.prototype.computeOffsetPoints=function(t,e,r,i){var s=e.x-t.x,o=e.y-t.y,a=Math.sqrt(s*s+o*o),u=r*s/a,l=r*o/a,c=(e.x+t.x)/2,h=(e.y+t.y)/2;if(this._doLeft){var f=new D(c-l,h+u);i.add(f)}if(this._doRight){var d=new D(c+l,h-u);i.add(d)}},Xs.prototype.interfaces_=function(){return[]},Xs.prototype.getClass=function(){return Xs};var Vr=function n(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=n.TOLERANCE,this._testCoords=new j;var t=arguments[0],e=arguments[1],r=arguments[2];this._boundaryDistanceTolerance=n.computeBoundaryDistanceTolerance(t,e),this._geom=[t,e,r],this._locFinder=[new ds(this._geom[0],this._boundaryDistanceTolerance),new ds(this._geom[1],this._boundaryDistanceTolerance),new ds(this._geom[2],this._boundaryDistanceTolerance)]},Dv={TOLERANCE:{configurable:!0}};Vr.prototype.reportResult=function(t,e,r){Le.out.println("Overlay result invalid - A:"+F.toLocationSymbol(e[0])+" B:"+F.toLocationSymbol(e[1])+" expected:"+(r?"i":"e")+" actual:"+F.toLocationSymbol(e[2]))},Vr.prototype.isValid=function(t){this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]);var e=this.checkValid(t);return e},Vr.prototype.checkValid=function(){var t=this;if(arguments.length===1){for(var e=arguments[0],r=0;r<this._testCoords.size();r++){var i=t._testCoords.get(r);if(!t.checkValid(e,i))return t._invalidLocation=i,!1}return!0}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return this._location[0]=this._locFinder[0].getLocation(o),this._location[1]=this._locFinder[1].getLocation(o),this._location[2]=this._locFinder[2].getLocation(o),Vr.hasLocation(this._location,F.BOUNDARY)?!0:this.isValidResult(s,this._location)}},Vr.prototype.addTestPts=function(t){var e=new Xs(t);this._testCoords.addAll(e.getPoints(5*this._boundaryDistanceTolerance))},Vr.prototype.isValidResult=function(t,e){var r=St.isResultOfOp(e[0],e[1],t),i=e[2]===F.INTERIOR,s=!(r^i);return s||this.reportResult(t,e,r),s},Vr.prototype.getInvalidLocation=function(){return this._invalidLocation},Vr.prototype.interfaces_=function(){return[]},Vr.prototype.getClass=function(){return Vr},Vr.hasLocation=function(t,e){for(var r=0;r<3;r++)if(t[r]===e)return!0;return!1},Vr.computeBoundaryDistanceTolerance=function(t,e){return Math.min(me.computeSizeBasedSnapTolerance(t),me.computeSizeBasedSnapTolerance(e))},Vr.isValid=function(t,e,r,i){var s=new Vr(t,e,i);return s.isValid(r)},Dv.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(Vr,Dv);var Ur=function n(t){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=n.extractFactory(t),this._inputGeoms=t};Ur.prototype.extractElements=function(t,e){var r=this;if(t===null)return null;for(var i=0;i<t.getNumGeometries();i++){var s=t.getGeometryN(i);r._skipEmpty&&s.isEmpty()||e.add(s)}},Ur.prototype.combine=function(){for(var t=this,e=new j,r=this._inputGeoms.iterator();r.hasNext();){var i=r.next();t.extractElements(i,e)}return e.size()===0?this._geomFactory!==null?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(e)},Ur.prototype.interfaces_=function(){return[]},Ur.prototype.getClass=function(){return Ur},Ur.combine=function(){if(arguments.length===1){var t=arguments[0],e=new Ur(t);return e.combine()}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=new Ur(Ur.createList(r,i));return s.combine()}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2],l=new Ur(Ur.createList(o,a,u));return l.combine()}},Ur.extractFactory=function(t){return t.isEmpty()?null:t.iterator().next().getFactory()},Ur.createList=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],r=new j;return r.add(t),r.add(e),r}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=new j;return a.add(i),a.add(s),a.add(o),a}};var Ee=function(){this._inputPolys=null,this._geomFactory=null;var t=arguments[0];this._inputPolys=t,this._inputPolys===null&&(this._inputPolys=new j)},Lv={STRTREE_NODE_CAPACITY:{configurable:!0}};Ee.prototype.reduceToGeometries=function(t){for(var e=this,r=new j,i=t.iterator();i.hasNext();){var s=i.next(),o=null;pt(s,hn)?o=e.unionTree(s):s instanceof gt&&(o=s),r.add(o)}return r},Ee.prototype.extractByEnvelope=function(t,e,r){for(var i=new j,s=0;s<e.getNumGeometries();s++){var o=e.getGeometryN(s);o.getEnvelopeInternal().intersects(t)?i.add(o):r.add(o)}return this._geomFactory.buildGeometry(i)},Ee.prototype.unionOptimized=function(t,e){var r=t.getEnvelopeInternal(),i=e.getEnvelopeInternal();if(!r.intersects(i)){var s=Ur.combine(t,e);return s}if(t.getNumGeometries()<=1&&e.getNumGeometries()<=1)return this.unionActual(t,e);var o=r.intersection(i);return this.unionUsingEnvelopeIntersection(t,e,o)},Ee.prototype.union=function(){if(this._inputPolys===null)throw new Error("union() method cannot be called twice");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var t=new mv(Ee.STRTREE_NODE_CAPACITY),e=this._inputPolys.iterator();e.hasNext();){var r=e.next();t.insert(r.getEnvelopeInternal(),r)}this._inputPolys=null;var i=t.itemsTree(),s=this.unionTree(i);return s},Ee.prototype.binaryUnion=function(){if(arguments.length===1){var t=arguments[0];return this.binaryUnion(t,0,t.size())}else if(arguments.length===3){var e=arguments[0],r=arguments[1],i=arguments[2];if(i-r<=1){var s=Ee.getGeometry(e,r);return this.unionSafe(s,null)}else{if(i-r===2)return this.unionSafe(Ee.getGeometry(e,r),Ee.getGeometry(e,r+1));var o=Math.trunc((i+r)/2),a=this.binaryUnion(e,r,o),u=this.binaryUnion(e,o,i);return this.unionSafe(a,u)}}},Ee.prototype.repeatedUnion=function(t){for(var e=null,r=t.iterator();r.hasNext();){var i=r.next();e===null?e=i.copy():e=e.union(i)}return e},Ee.prototype.unionSafe=function(t,e){return t===null&&e===null?null:t===null?e.copy():e===null?t.copy():this.unionOptimized(t,e)},Ee.prototype.unionActual=function(t,e){return Ee.restrictToPolygons(t.union(e))},Ee.prototype.unionTree=function(t){var e=this.reduceToGeometries(t),r=this.binaryUnion(e);return r},Ee.prototype.unionUsingEnvelopeIntersection=function(t,e,r){var i=new j,s=this.extractByEnvelope(r,t,i),o=this.extractByEnvelope(r,e,i),a=this.unionActual(s,o);i.add(a);var u=Ur.combine(i);return u},Ee.prototype.bufferUnion=function(){if(arguments.length===1){var t=arguments[0],e=t.get(0).getFactory(),r=e.buildGeometry(t),i=r.buffer(0);return i}else if(arguments.length===2){var s=arguments[0],o=arguments[1],a=s.getFactory(),u=a.createGeometryCollection([s,o]),l=u.buffer(0);return l}},Ee.prototype.interfaces_=function(){return[]},Ee.prototype.getClass=function(){return Ee},Ee.restrictToPolygons=function(t){if(pt(t,ns))return t;var e=Vi.getPolygons(t);return e.size()===1?e.get(0):t.getFactory().createMultiPolygon(xt.toPolygonArray(e))},Ee.getGeometry=function(t,e){return e>=t.size()?null:t.get(e)},Ee.union=function(t){var e=new Ee(t);return e.union()},Lv.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Ee,Lv);var Gh=function(){};Gh.prototype.interfaces_=function(){return[]},Gh.prototype.getClass=function(){return Gh},Gh.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return St.createEmptyResult(St.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),nr.overlayOp(t,e,St.UNION)};function Bs(){return new kh}function kh(){this.reset()}kh.prototype={constructor:kh,reset:function(){this.s=this.t=0},add:function(n){Rv(Vh,n,this.t),Rv(this,Vh.s,this.s),this.s?this.t+=Vh.t:this.s=Vh.t},valueOf:function(){return this.s}};var Vh=new kh;function Rv(n,t,e){var r=n.s=t+e,i=r-t,s=r-i;n.t=t-s+(e-i)}var Se=1e-6,jt=Math.PI,Ui=jt/2,Fv=jt/4,zi=jt*2,Ys=180/jt,qn=jt/180,ir=Math.abs,MI=Math.atan,za=Math.atan2,be=Math.cos,Ne=Math.sin,qa=Math.sqrt;function Gv(n){return n>1?0:n<-1?jt:Math.acos(n)}function Oo(n){return n>1?Ui:n<-1?-Ui:Math.asin(n)}function Ml(){}function Uh(n,t){n&&Vv.hasOwnProperty(n.type)&&Vv[n.type](n,t)}var kv={Feature:function(n,t){Uh(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++r<i;)Uh(e[r].geometry,t)}},Vv={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){Xf(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)Xf(e[r],t,0)},Polygon:function(n,t){Uv(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)Uv(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,i=e.length;++r<i;)Uh(e[r],t)}};function Xf(n,t,e){var r=-1,i=n.length-e,s;for(t.lineStart();++r<i;)s=n[r],t.point(s[0],s[1],s[2]);t.lineEnd()}function Uv(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)Xf(n[e],t,1);t.polygonEnd()}function bI(n,t){n&&kv.hasOwnProperty(n.type)?kv[n.type](n,t):Uh(n,t)}Bs(),Bs();function Bf(n){return[za(n[1],n[0]),Oo(n[2])]}function Wa(n){var t=n[0],e=n[1],r=be(e);return[r*be(t),r*Ne(t),Ne(e)]}function zh(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function qh(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Yf(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function Wh(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function Jf(n){var t=qa(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}Bs();function zv(n,t){function e(r,i){return r=n(r,i),t(r[0],r[1])}return n.invert&&t.invert&&(e.invert=function(r,i){return r=t.invert(r,i),r&&n.invert(r[0],r[1])}),e}function jf(n,t){return[n>jt?n-zi:n<-jt?n+zi:n,t]}jf.invert=jf;function NI(n,t,e){return(n%=zi)?t||e?zv(Wv(n),Hv(t,e)):Wv(n):t||e?Hv(t,e):jf}function qv(n){return function(t,e){return t+=n,[t>jt?t-zi:t<-jt?t+zi:t,e]}}function Wv(n){var t=qv(n);return t.invert=qv(-n),t}function Hv(n,t){var e=be(n),r=Ne(n),i=be(t),s=Ne(t);function o(a,u){var l=be(u),c=be(a)*l,h=Ne(a)*l,f=Ne(u),d=f*e+c*r;return[za(h*i-d*s,c*e-f*r),Oo(d*i+h*s)]}return o.invert=function(a,u){var l=be(u),c=be(a)*l,h=Ne(a)*l,f=Ne(u),d=f*i-h*s;return[za(h*i+f*s,c*e+d*r),Oo(d*e-c*r)]},o}function xI(n,t,e,r,i,s){if(e){var o=be(t),a=Ne(t),u=r*e;i==null?(i=t+r*zi,s=t-u/2):(i=Xv(o,i),s=Xv(o,s),(r>0?i<s:i>s)&&(i+=r*zi));for(var l,c=i;r>0?c>s:c<s;c-=u)l=Bf([o,-a*be(c),-a*Ne(c)]),n.point(l[0],l[1])}}function Xv(n,t){t=Wa(t),t[0]-=n,Jf(t);var e=Gv(-t[1]);return((-t[2]<0?-e:e)+zi-Se)%zi}function Bv(){var n=[],t;return{point:function(e,r){t.push([e,r])},lineStart:function(){n.push(t=[])},lineEnd:Ml,rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}}function TI(n,t,e,r,i,s){var o=n[0],a=n[1],u=t[0],l=t[1],c=0,h=1,f=u-o,d=l-a,v;if(v=e-o,!(!f&&v>0)){if(v/=f,f<0){if(v<c)return;v<h&&(h=v)}else if(f>0){if(v>h)return;v>c&&(c=v)}if(v=i-o,!(!f&&v<0)){if(v/=f,f<0){if(v>h)return;v>c&&(c=v)}else if(f>0){if(v<c)return;v<h&&(h=v)}if(v=r-a,!(!d&&v>0)){if(v/=d,d<0){if(v<c)return;v<h&&(h=v)}else if(d>0){if(v>h)return;v>c&&(c=v)}if(v=s-a,!(!d&&v<0)){if(v/=d,d<0){if(v>h)return;v>c&&(c=v)}else if(d>0){if(v<c)return;v<h&&(h=v)}return c>0&&(n[0]=o+c*f,n[1]=a+c*d),h<1&&(t[0]=o+h*f,t[1]=a+h*d),!0}}}}}function Hh(n,t){return ir(n[0]-t[0])<Se&&ir(n[1]-t[1])<Se}function Xh(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Yv(n,t,e,r,i){var s=[],o=[],a,u;if(n.forEach(function(v){if(!((_=v.length-1)<=0)){var _,E=v[0],P=v[_],y;if(Hh(E,P)){for(i.lineStart(),a=0;a<_;++a)i.point((E=v[a])[0],E[1]);i.lineEnd();return}s.push(y=new Xh(E,v,null,!0)),o.push(y.o=new Xh(E,null,y,!1)),s.push(y=new Xh(P,v,null,!1)),o.push(y.o=new Xh(P,null,y,!0))}}),!!s.length){for(o.sort(t),Jv(s),Jv(o),a=0,u=o.length;a<u;++a)o[a].e=e=!e;for(var l=s[0],c,h;;){for(var f=l,d=!0;f.v;)if((f=f.n)===l)return;c=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(a=0,u=c.length;a<u;++a)i.point((h=c[a])[0],h[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(d)for(c=f.p.z,a=c.length-1;a>=0;--a)i.point((h=c[a])[0],h[1]);else r(f.x,f.p.x,-1,i);f=f.p}f=f.o,c=f.z,d=!d}while(!f.v);i.lineEnd()}}}function Jv(n){if(t=n.length){for(var t,e=0,r=n[0],i;++e<t;)r.n=i=n[e],i.p=r,r=i;r.n=i=n[0],i.p=r}}function jv(n,t){return n<t?-1:n>t?1:n>=t?0:NaN}function AI(n){return n.length===1&&(n=OI(n)),{left:function(t,e,r,i){for(r==null&&(r=0),i==null&&(i=t.length);r<i;){var s=r+i>>>1;n(t[s],e)<0?r=s+1:i=s}return r},right:function(t,e,r,i){for(r==null&&(r=0),i==null&&(i=t.length);r<i;){var s=r+i>>>1;n(t[s],e)>0?i=s:r=s+1}return r}}}function OI(n){return function(t,e){return jv(n(t),e)}}AI(jv);function Qv(n){for(var t=n.length,e,r=-1,i=0,s,o;++r<t;)i+=n[r].length;for(s=new Array(i);--t>=0;)for(o=n[t],e=o.length;--e>=0;)s[--i]=o[e];return s}var Bh=1e9,Yh=-1e9;function DI(n,t,e,r){function i(l,c){return n<=l&&l<=e&&t<=c&&c<=r}function s(l,c,h,f){var d=0,v=0;if(l==null||(d=o(l,h))!==(v=o(c,h))||u(l,c)<0^h>0)do f.point(d===0||d===3?n:e,d>1?r:t);while((d=(d+h+4)%4)!==v);else f.point(c[0],c[1])}function o(l,c){return ir(l[0]-n)<Se?c>0?0:3:ir(l[0]-e)<Se?c>0?2:1:ir(l[1]-t)<Se?c>0?1:0:c>0?3:2}function a(l,c){return u(l.x,c.x)}function u(l,c){var h=o(l,1),f=o(c,1);return h!==f?h-f:h===0?c[1]-l[1]:h===1?l[0]-c[0]:h===2?l[1]-c[1]:c[0]-l[0]}return function(l){var c=l,h=Bv(),f,d,v,_,E,P,y,w,m,S,C,I={point:b,lineStart:T,lineEnd:L,polygonStart:A,polygonEnd:N};function b($,Y){i($,Y)&&c.point($,Y)}function x(){for(var $=0,Y=0,Z=d.length;Y<Z;++Y)for(var G=d[Y],W=1,k=G.length,V=G[0],O,q,X=V[0],rt=V[1];W<k;++W)O=X,q=rt,V=G[W],X=V[0],rt=V[1],q<=r?rt>r&&(X-O)*(r-q)>(rt-q)*(n-O)&&++$:rt<=r&&(X-O)*(r-q)<(rt-q)*(n-O)&&--$;return $}function A(){c=h,f=[],d=[],C=!0}function N(){var $=x(),Y=C&&$,Z=(f=Qv(f)).length;(Y||Z)&&(l.polygonStart(),Y&&(l.lineStart(),s(null,null,1,l),l.lineEnd()),Z&&Yv(f,a,$,s,l),l.polygonEnd()),c=l,f=d=v=null}function T(){I.point=U,d&&d.push(v=[]),S=!0,m=!1,y=w=NaN}function L(){f&&(U(_,E),P&&m&&h.rejoin(),f.push(h.result())),I.point=b,m&&c.lineEnd()}function U($,Y){var Z=i($,Y);if(d&&v.push([$,Y]),S)_=$,E=Y,P=Z,S=!1,Z&&(c.lineStart(),c.point($,Y));else if(Z&&m)c.point($,Y);else{var G=[y=Math.max(Yh,Math.min(Bh,y)),w=Math.max(Yh,Math.min(Bh,w))],W=[$=Math.max(Yh,Math.min(Bh,$)),Y=Math.max(Yh,Math.min(Bh,Y))];TI(G,W,n,t,e,r)?(m||(c.lineStart(),c.point(G[0],G[1])),c.point(W[0],W[1]),Z||c.lineEnd(),C=!1):Z&&(c.lineStart(),c.point($,Y),C=!1)}y=$,w=Y,m=Z}return I}}var Qf=Bs();function LI(n,t){var e=t[0],r=t[1],i=[Ne(e),-be(e),0],s=0,o=0;Qf.reset();for(var a=0,u=n.length;a<u;++a)if(c=(l=n[a]).length)for(var l,c,h=l[c-1],f=h[0],d=h[1]/2+Fv,v=Ne(d),_=be(d),E=0;E<c;++E,f=y,v=m,_=S,h=P){var P=l[E],y=P[0],w=P[1]/2+Fv,m=Ne(w),S=be(w),C=y-f,I=C>=0?1:-1,b=I*C,x=b>jt,A=v*m;if(Qf.add(za(A*I*Ne(b),_*S+A*be(b))),s+=x?C+I*zi:C,x^f>=e^y>=e){var N=qh(Wa(h),Wa(P));Jf(N);var T=qh(i,N);Jf(T);var L=(x^C>=0?-1:1)*Oo(T[2]);(r>L||r===L&&(N[0]||N[1]))&&(o+=x^C>=0?1:-1)}}return(s<-1e-6||s<Se&&Qf<-1e-6)^o&1}Bs();function $v(n){return n}Bs(),Bs();var Ha=1/0,Jh=Ha,bl=-Ha,jh=bl,Kv={point:RI,lineStart:Ml,lineEnd:Ml,polygonStart:Ml,polygonEnd:Ml,result:function(){var n=[[Ha,Jh],[bl,jh]];return bl=jh=-(Jh=Ha=1/0),n}};function RI(n,t){n<Ha&&(Ha=n),n>bl&&(bl=n),t<Jh&&(Jh=t),t>jh&&(jh=t)}Bs();function Zv(n,t,e,r){return function(i,s){var o=t(s),a=i.invert(r[0],r[1]),u=Bv(),l=t(u),c=!1,h,f,d,v={point:_,lineStart:P,lineEnd:y,polygonStart:function(){v.point=w,v.lineStart=m,v.lineEnd=S,f=[],h=[]},polygonEnd:function(){v.point=_,v.lineStart=P,v.lineEnd=y,f=Qv(f);var C=LI(h,a);f.length?(c||(s.polygonStart(),c=!0),Yv(f,GI,C,e,s)):C&&(c||(s.polygonStart(),c=!0),s.lineStart(),e(null,null,1,s),s.lineEnd()),c&&(s.polygonEnd(),c=!1),f=h=null},sphere:function(){s.polygonStart(),s.lineStart(),e(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function _(C,I){var b=i(C,I);n(C=b[0],I=b[1])&&s.point(C,I)}function E(C,I){var b=i(C,I);o.point(b[0],b[1])}function P(){v.point=E,o.lineStart()}function y(){v.point=_,o.lineEnd()}function w(C,I){d.push([C,I]);var b=i(C,I);l.point(b[0],b[1])}function m(){l.lineStart(),d=[]}function S(){w(d[0][0],d[0][1]),l.lineEnd();var C=l.clean(),I=u.result(),b,x=I.length,A,N,T;if(d.pop(),h.push(d),d=null,!!x){if(C&1){if(N=I[0],(A=N.length-1)>0){for(c||(s.polygonStart(),c=!0),s.lineStart(),b=0;b<A;++b)s.point((T=N[b])[0],T[1]);s.lineEnd()}return}x>1&&C&2&&I.push(I.pop().concat(I.shift())),f.push(I.filter(FI))}}return v}}function FI(n){return n.length>1}function GI(n,t){return((n=n.x)[0]<0?n[1]-Ui-Se:Ui-n[1])-((t=t.x)[0]<0?t[1]-Ui-Se:Ui-t[1])}const tm=Zv(function(){return!0},kI,UI,[-jt,-Ui]);function kI(n){var t=NaN,e=NaN,r=NaN,i;return{lineStart:function(){n.lineStart(),i=1},point:function(s,o){var a=s>0?jt:-jt,u=ir(s-t);ir(u-jt)<Se?(n.point(t,e=(e+o)/2>0?Ui:-Ui),n.point(r,e),n.lineEnd(),n.lineStart(),n.point(a,e),n.point(s,e),i=0):r!==a&&u>=jt&&(ir(t-r)<Se&&(t-=r*Se),ir(s-a)<Se&&(s-=a*Se),e=VI(t,e,s,o),n.point(r,e),n.lineEnd(),n.lineStart(),n.point(a,e),i=0),n.point(t=s,e=o),r=a},lineEnd:function(){n.lineEnd(),t=e=NaN},clean:function(){return 2-i}}}function VI(n,t,e,r){var i,s,o=Ne(n-e);return ir(o)>Se?MI((Ne(t)*(s=be(r))*Ne(e)-Ne(r)*(i=be(t))*Ne(n))/(i*s*o)):(t+r)/2}function UI(n,t,e,r){var i;if(n==null)i=e*Ui,r.point(-jt,i),r.point(0,i),r.point(jt,i),r.point(jt,0),r.point(jt,-i),r.point(0,-i),r.point(-jt,-i),r.point(-jt,0),r.point(-jt,i);else if(ir(n[0]-t[0])>Se){var s=n[0]<t[0]?jt:-jt;i=e*s/2,r.point(-s,i),r.point(0,i),r.point(s,i)}else r.point(t[0],t[1])}function zI(n,t){var e=be(n),r=e>0,i=ir(e)>Se;function s(c,h,f,d){xI(d,n,t,f,c,h)}function o(c,h){return be(c)*be(h)>e}function a(c){var h,f,d,v,_;return{lineStart:function(){v=d=!1,_=1},point:function(E,P){var y=[E,P],w,m=o(E,P),S=r?m?0:l(E,P):m?l(E+(E<0?jt:-jt),P):0;if(!h&&(v=d=m)&&c.lineStart(),m!==d&&(w=u(h,y),(!w||Hh(h,w)||Hh(y,w))&&(y[0]+=Se,y[1]+=Se,m=o(y[0],y[1]))),m!==d)_=0,m?(c.lineStart(),w=u(y,h),c.point(w[0],w[1])):(w=u(h,y),c.point(w[0],w[1]),c.lineEnd()),h=w;else if(i&&h&&r^m){var C;!(S&f)&&(C=u(y,h,!0))&&(_=0,r?(c.lineStart(),c.point(C[0][0],C[0][1]),c.point(C[1][0],C[1][1]),c.lineEnd()):(c.point(C[1][0],C[1][1]),c.lineEnd(),c.lineStart(),c.point(C[0][0],C[0][1])))}m&&(!h||!Hh(h,y))&&c.point(y[0],y[1]),h=y,d=m,f=S},lineEnd:function(){d&&c.lineEnd(),h=null},clean:function(){return _|(v&&d)<<1}}}function u(c,h,f){var d=Wa(c),v=Wa(h),_=[1,0,0],E=qh(d,v),P=zh(E,E),y=E[0],w=P-y*y;if(!w)return!f&&c;var m=e*P/w,S=-e*y/w,C=qh(_,E),I=Wh(_,m),b=Wh(E,S);Yf(I,b);var x=C,A=zh(I,x),N=zh(x,x),T=A*A-N*(zh(I,I)-1);if(!(T<0)){var L=qa(T),U=Wh(x,(-A-L)/N);if(Yf(U,I),U=Bf(U),!f)return U;var $=c[0],Y=h[0],Z=c[1],G=h[1],W;Y<$&&(W=$,$=Y,Y=W);var k=Y-$,V=ir(k-jt)<Se,O=V||k<Se;if(!V&&G<Z&&(W=Z,Z=G,G=W),O?V?Z+G>0^U[1]<(ir(U[0]-$)<Se?Z:G):Z<=U[1]&&U[1]<=G:k>jt^($<=U[0]&&U[0]<=Y)){var q=Wh(x,(-A+L)/N);return Yf(q,I),[U,Bf(q)]}}}function l(c,h){var f=r?n:jt-n,d=0;return c<-f?d|=1:c>f&&(d|=2),h<-f?d|=4:h>f&&(d|=8),d}return Zv(o,a,s,r?[0,-n]:[-jt,n-jt])}function em(n){return function(t){var e=new $f;for(var r in n)e[r]=n[r];return e.stream=t,e}}function $f(){}$f.prototype={constructor:$f,point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function rm(n,t,e){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],s=n.clipExtent&&n.clipExtent();n.scale(150).translate([0,0]),s!=null&&n.clipExtent(null),bI(e,n.stream(Kv));var o=Kv.result(),a=Math.min(r/(o[1][0]-o[0][0]),i/(o[1][1]-o[0][1])),u=+t[0][0]+(r-a*(o[1][0]+o[0][0]))/2,l=+t[0][1]+(i-a*(o[1][1]+o[0][1]))/2;return s!=null&&n.clipExtent(s),n.scale(a*150).translate([u,l])}function qI(n,t,e){return rm(n,[[0,0],t],e)}var nm=16,WI=be(30*qn);function im(n,t){return+t?XI(n,t):HI(n)}function HI(n){return em({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}})}function XI(n,t){function e(r,i,s,o,a,u,l,c,h,f,d,v,_,E){var P=l-r,y=c-i,w=P*P+y*y;if(w>4*t&&_--){var m=o+f,S=a+d,C=u+v,I=qa(m*m+S*S+C*C),b=Oo(C/=I),x=ir(ir(C)-1)<Se||ir(s-h)<Se?(s+h)/2:za(S,m),A=n(x,b),N=A[0],T=A[1],L=N-r,U=T-i,$=y*L-P*U;($*$/w>t||ir((P*L+y*U)/w-.5)>.3||o*f+a*d+u*v<WI)&&(e(r,i,s,o,a,u,N,T,x,m/=I,S/=I,C,_,E),E.point(N,T),e(N,T,x,m,S,C,l,c,h,f,d,v,_,E))}}return function(r){var i,s,o,a,u,l,c,h,f,d,v,_,E={point:P,lineStart:y,lineEnd:m,polygonStart:function(){r.polygonStart(),E.lineStart=S},polygonEnd:function(){r.polygonEnd(),E.lineStart=y}};function P(b,x){b=n(b,x),r.point(b[0],b[1])}function y(){h=NaN,E.point=w,r.lineStart()}function w(b,x){var A=Wa([b,x]),N=n(b,x);e(h,f,c,d,v,_,h=N[0],f=N[1],c=b,d=A[0],v=A[1],_=A[2],nm,r),r.point(h,f)}function m(){E.point=P,r.lineEnd()}function S(){y(),E.point=C,E.lineEnd=I}function C(b,x){w(i=b,x),s=h,o=f,a=d,u=v,l=_,E.point=w}function I(){e(h,f,c,d,v,_,s,o,i,a,u,l,nm,r),E.lineEnd=m,m()}return E}}var BI=em({point:function(n,t){this.stream.point(n*qn,t*qn)}});function YI(n){return JI(function(){return n})()}function JI(n){var t,e=150,r=480,i=250,s,o,a=0,u=0,l=0,c=0,h=0,f,d,v=null,_=tm,E=null,P,y,w,m=$v,S=.5,C=im(N,S),I,b;function x(U){return U=d(U[0]*qn,U[1]*qn),[U[0]*e+s,o-U[1]*e]}function A(U){return U=d.invert((U[0]-s)/e,(o-U[1])/e),U&&[U[0]*Ys,U[1]*Ys]}function N(U,$){return U=t(U,$),[U[0]*e+s,o-U[1]*e]}x.stream=function(U){return I&&b===U?I:I=BI(_(f,C(m(b=U))))},x.clipAngle=function(U){return arguments.length?(_=+U?zI(v=U*qn,6*qn):(v=null,tm),L()):v*Ys},x.clipExtent=function(U){return arguments.length?(m=U==null?(E=P=y=w=null,$v):DI(E=+U[0][0],P=+U[0][1],y=+U[1][0],w=+U[1][1]),L()):E==null?null:[[E,P],[y,w]]},x.scale=function(U){return arguments.length?(e=+U,T()):e},x.translate=function(U){return arguments.length?(r=+U[0],i=+U[1],T()):[r,i]},x.center=function(U){return arguments.length?(a=U[0]%360*qn,u=U[1]%360*qn,T()):[a*Ys,u*Ys]},x.rotate=function(U){return arguments.length?(l=U[0]%360*qn,c=U[1]%360*qn,h=U.length>2?U[2]%360*qn:0,T()):[l*Ys,c*Ys,h*Ys]},x.precision=function(U){return arguments.length?(C=im(N,S=U*U),L()):qa(S)},x.fitExtent=function(U,$){return rm(x,U,$)},x.fitSize=function(U,$){return qI(x,U,$)};function T(){d=zv(f=NI(l,c,h),t);var U=t(a,u);return s=r-U[0]*e,o=i+U[1]*e,L()}function L(){return I=b=null,x}return function(){return t=n.apply(this,arguments),x.invert=t.invert&&A,T()}}function sm(n){return function(t,e){var r=be(t),i=be(e),s=n(r*i);return[s*i*Ne(t),s*Ne(e)]}}function om(n){return function(t,e){var r=qa(t*t+e*e),i=n(r),s=Ne(i),o=be(i);return[za(t*s,r*o),Oo(r&&e*s/r)]}}var jI=sm(function(n){return qa(2/(1+n))});jI.invert=om(function(n){return 2*Oo(n/2)});var am=sm(function(n){return(n=Gv(n))&&n/Ne(n)});am.invert=om(function(n){return n});function QI(){return YI(am).scale(79.4188).clipAngle(179.999)}function um(n,t){return[n,t]}um.invert=um;function $I(n,t,e){e=e||{};var r=e.units||"kilometers",i=e.steps||8;if(!n)throw new Error("geojson is required");if(typeof e!="object")throw new Error("options must be an object");if(typeof i!="number")throw new Error("steps must be an number");if(t===void 0)throw new Error("radius is required");if(i<=0)throw new Error("steps must be greater than 0");var s=[];switch(n.type){case"GeometryCollection":return dh(n,function(o){var a=Qh(o,t,r,i);a&&s.push(a)}),on(s);case"FeatureCollection":return pa(n,function(o){var a=Qh(o,t,r,i);a&&pa(a,function(u){u&&s.push(u)})}),on(s)}return Qh(n,t,r,i)}function Qh(n,t,e,r){var i=n.properties||{},s=n.type==="Feature"?n.geometry:n;if(s.type==="GeometryCollection"){var o=[];return dh(n,function(_){var E=Qh(_,t,e,r);E&&o.push(E)}),on(o)}var a=KI(s),u={type:s.type,coordinates:hm(s.coordinates,a)},l=new Rf,c=l.read(u),h=sf(of(t,e),"meters"),f=Fe.bufferOp(c,h,r),d=new pv;if(f=d.write(f),!lm(f.coordinates)){var v={type:f.type,coordinates:cm(f.coordinates,a)};return Sn(v,i)}}function lm(n){return Array.isArray(n[0])?lm(n[0]):isNaN(n[0])}function hm(n,t){return typeof n[0]!="object"?t(n):n.map(function(e){return hm(e,t)})}function cm(n,t){return typeof n[0]!="object"?t.invert(n):n.map(function(e){return cm(e,t)})}function KI(n){var t=w0(n).geometry.coordinates,e=[-t[0],-t[1]];return QI().rotate(e).scale(or)}function ZI(n,t,e){e===void 0&&(e={});var r=mr(n),i=mr(t),s=Mf.union(r.coordinates,i.coordinates);return s.length===0?null:s.length===1?ie(s[0],e.properties):nf(s,e.properties)}function Nl(n,t,e){e===void 0&&(e={});var r=mr(n),i=mr(t),s=Mf.intersection(r.coordinates,i.coordinates);return s.length===0?null:s.length===1?ie(s[0],e.properties):nf(s,e.properties)}function t2(n,t,e){e===void 0&&(e={});var r=JSON.stringify(e.properties||{}),i=n[0],s=n[1],o=n[2],a=n[3],u=(s+a)/2,l=(i+o)/2,c=t*2/We([i,u],[o,u],e),h=c*(o-i),f=t*2/We([l,s],[l,a],e),d=f*(a-s),v=h/2,_=v*2,E=Math.sqrt(3)/2*d,P=o-i,y=a-s,w=3/4*_,m=E,S=(P-_)/(_-v/2),C=Math.floor(S),I=(C*w-v/2-P)/2-v/2+w/2,b=Math.floor((y-E)/E),x=(y-b*E)/2,A=b*E-y>E/2;A&&(x-=E/4);for(var N=[],T=[],L=0;L<6;L++){var U=2*Math.PI/6*L;N.push(Math.cos(U)),T.push(Math.sin(U))}for(var $=[],Y=0;Y<=C;Y++)for(var Z=0;Z<=b;Z++){var G=Y%2===1;if(!(Z===0&&G)&&!(Z===0&&A)){var W=Y*w+i-I,k=Z*m+s+x;if(G&&(k-=E/2),e.triangles===!0)r2([W,k],h/2,d/2,JSON.parse(r),N,T).forEach(function(O){e.mask?Nl(e.mask,O)&&$.push(O):$.push(O)});else{var V=e2([W,k],h/2,d/2,JSON.parse(r),N,T);e.mask?Nl(e.mask,V)&&$.push(V):$.push(V)}}}return on($)}function e2(n,t,e,r,i,s){for(var o=[],a=0;a<6;a++){var u=n[0]+t*i[a],l=n[1]+e*s[a];o.push([u,l])}return o.push(o[0].slice()),ie([o],r)}function r2(n,t,e,r,i,s){for(var o=[],a=0;a<6;a++){var u=[];u.push(n),u.push([n[0]+t*i[a],n[1]+e*s[a]]),u.push([n[0]+t*i[(a+1)%6],n[1]+e*s[(a+1)%6]]),u.push(n),o.push(ie([u],r))}return o}function n2(n,t,e,r){r===void 0&&(r={});for(var i=[],s=n[0],o=n[1],a=n[2],u=n[3],l=t/We([s,o],[a,o],r),c=l*(a-s),h=e/We([s,o],[s,u],r),f=h*(u-o),d=a-s,v=u-o,_=Math.floor(d/c),E=Math.floor(v/f),P=(d-_*c)/2,y=(v-E*f)/2,w=s+P,m=0;m<_;m++){for(var S=o+y,C=0;C<E;C++){var I=ie([[[w,S],[w,S+f],[w+c,S+f],[w+c,S],[w,S]]],r.properties);r.mask?GP(r.mask,I)&&i.push(I):i.push(I),S+=f}w+=c}return on(i)}function i2(n,t,e){return e===void 0&&(e={}),n2(n,t,t,e)}function s2(n,t,e){e===void 0&&(e={});for(var r=[],i=t/We([n[0],n[1]],[n[2],n[1]],e),s=i*(n[2]-n[0]),o=t/We([n[0],n[1]],[n[0],n[3]],e),a=o*(n[3]-n[1]),u=0,l=n[0];l<=n[2];){for(var c=0,h=n[1];h<=n[3];){var f=null,d=null;u%2===0&&c%2===0?(f=ie([[[l,h],[l,h+a],[l+s,h],[l,h]]],e.properties),d=ie([[[l,h+a],[l+s,h+a],[l+s,h],[l,h+a]]],e.properties)):u%2===0&&c%2===1?(f=ie([[[l,h],[l+s,h+a],[l+s,h],[l,h]]],e.properties),d=ie([[[l,h],[l,h+a],[l+s,h+a],[l,h]]],e.properties)):c%2===0&&u%2===1?(f=ie([[[l,h],[l,h+a],[l+s,h+a],[l,h]]],e.properties),d=ie([[[l,h],[l+s,h+a],[l+s,h],[l,h]]],e.properties)):c%2===1&&u%2===1&&(f=ie([[[l,h],[l,h+a],[l+s,h],[l,h]]],e.properties),d=ie([[[l,h+a],[l+s,h+a],[l+s,h],[l,h+a]]],e.properties)),e.mask?(Nl(e.mask,f)&&r.push(f),Nl(e.mask,d)&&r.push(d)):(r.push(f),r.push(d)),h+=a,c++}u++,l+=s}return on(r)}function o2(n,t,e){if(e=e||{},typeof e!="object")throw new Error("options is invalid");var r=e.gridType,i=e.property,s=e.weight;if(!n)throw new Error("points is required");if(bC(n,"Point","input must contain Points"),!t)throw new Error("cellSize is required");if(s!==void 0&&typeof s!="number")throw new Error("weight must be a number");i=i||"elevation",r=r||"square",s=s||1;var o=Cn(n),a;switch(r){case"point":case"points":a=vP(o,t,e);break;case"square":case"squares":a=i2(o,t,e);break;case"hex":case"hexes":a=t2(o,t,e);break;case"triangle":case"triangles":a=s2(o,t,e);break;default:throw new Error("invalid gridType")}var u=[];return pa(a,function(l){var c=0,h=0;pa(n,function(d){var v=r==="point"?l:cf(l),_=We(v,d,e),E;if(i!==void 0&&(E=d.properties[i]),E===void 0&&(E=d.geometry.coordinates[2]),E===void 0)throw new Error("zValue is missing");_===0&&(c=E);var P=1/Math.pow(_,s);h+=P,c+=P*E});var f=WC(l);f.properties[i]=c/h,u.push(f)}),on(u)}function a2(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1])&&n.push(n[0]);const e=Kt(t),r=ie([n]);return je(e,r)}function u2(n,t){const e=Br(n);return pf(e,t,{units:"meters"}).geometry.coordinates}function Kf(n){if((n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),n.length<=3)return 0;const t=ie([n]);return sP(t)}function l2(n){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]);const t=ie([n]),r=E0(t).geometry.coordinates;return[r[0],r[1],r[2]??n[0][2]??0]}function fm(n,t,e,r){const[i,s,o]=n,a=va(Kt([i,s]),t,e,{units:"meters"});if(!(!a||!a.geometry||!a.geometry.coordinates))return r=r||[0,0,0],r[0]=a.geometry.coordinates[0],r[1]=a.geometry.coordinates[1],r[2]=o,r}function $h(n,t){return We(Kt(n),Kt(t),{units:"meters"})}function xl(n,t){return tl(Kt(n),Kt(t))}function h2(n,t){return el(Br(n),Br(t))}function c2(n,t){const e=Kt(n),r=Kt(t),i=YC(e,r),s=(n[2]+t[2])/2;return[...i.geometry.coordinates,s]}function f2(n,t){const e=Kt(t),r=Br(n);return eP(r,e,{units:"meters"})}function d2(n,t){const e=Kt(n),r=Br(t);return nP(e,r,{units:"meters"})}function g2(n,t,e,r){const[i,s,o]=n,a=wP(Kt([i,s]),t,e,{units:"meters"});if(!(!a||!a.geometry||!a.geometry.coordinates))return r=r||[0,0,0],r[0]=a.geometry.coordinates[0],r[1]=a.geometry.coordinates[1],r[2]=o,r}function dm(n,t){return T0(Kt(n),Kt(t),{units:"meters"})}function p2(n,t){return _P(Kt(n),Kt(t))}function gm(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=Nl(ie([n]),ie([t]));if(e)return e.geometry.coordinates}function pm(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=ZI(ie([n]),ie([t]));if(e)return e.geometry.coordinates}function vm(n,t=500,e="meters"){const r=$I(Br(n),t,{units:e});if(r)return r.geometry.coordinates}function mm(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=uI(ie([n]),ie([t]));if(e)return e.geometry.coordinates}function ym(n,t,e=10,r="meters"){return XC(n,t,{steps:e,units:r}).geometry.coordinates}function Zf(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=ie([n]),r=ie([t]);return NP(e,r)?"oneBig":F0(e,r)?"twoBig":!1}function _m(n){const t=p.min(p.objsIterator(n,["0"])),e=p.min(p.objsIterator(n,["1"])),r=p.min(p.objsIterator(n,["2"])),i=p.max(p.objsIterator(n,["0"])),s=p.max(p.objsIterator(n,["1"])),o=p.max(p.objsIterator(n,["2"]));return{minPos:[t,e,r],maxPos:[i,s,o],center:[(t+i)*.5,(e+s)*.5,(r+o)*.5]}}function wm(n){const{minPos:t,maxPos:e,center:r}=_m(n);if(t.some(a=>!Number.isFinite(a)||e.some(u=>!Number.isFinite(u))||r.some(u=>!Number.isFinite(u)))){console.warn("geoCenterAndRadiusFromPositions error: minPos.some(e => !Number.isFinite(e) || maxPos.some(e => !Number.isFinite(e)) || center.some(e => !Number.isFinite(e))");return}const i=$h(t,e);let s=i*.5;const o=Math.abs(t[2]-e[2]);return o!=0&&(s=Math.sqrt(i*i+o*o)*.5),{center:r,radius:s}}function Em(n,t){const e=bi(n),r=bi(t);return p.Vector.distance(e,r)}function Tl(n,t){const e=[],r=n.length;let i=0;for(let s=0;s<r-1;++s){if(t===void 0||t==="GEODESIC"){const o=$h(n[s],n[s+1]),a=Math.abs(n[s][2]-n[s+1][2]);if(a===0)i+=o;else{const u=Math.sqrt(o*o+a*a);i+=u}}else if(t==="RHUMB"){const o=dm(n[s],n[s+1]),a=Math.abs(n[s][2]-n[s+1][2]);if(a===0)i+=o;else{const u=Math.sqrt(o*o+a*a);i+=u}}else if(t==="NONE"){const o=Em(n[s],n[s+1]);i+=o}else console.warn(`未知的arcType: ${t},导致距离无法计算!`);e.push(i)}return e}function td(n){const t="__getXyzFromPostion";let e=p.getExtProp(n,t);return(!e||!p.Vector.equals(e[0],n))&&(e=[[...n],bi(n)],p.setExtProp(n,t,e)),e[1]}class Sm extends p.Tree{constructor(t){super(t)}get propUiTree(){return this.uiTree}}class ed extends p.TreeItem{constructor(t,e,r){super(t,e),this._property=r}get property(){return this._property}}class rd extends ed{constructor(t,e){super(t,!1,e)}}class nd extends ed{constructor(t,e){super(t,!0,e)}get groupChildren(){return this.children}}function Cm(n,t){const e=new Sm(t),r=n.getProperties("chinese"),i=[];for(let s of r)if(s instanceof vt){const o=new nd(e,s);o.d(()=>s.destroy()),e.children.push(o),i.push(o)}else{const o=new rd(e,s);e.children.push(o),o.d(()=>s.destroy())}for(;i.length>0;){const s=i.pop();if(!s)throw new Error("should not be here!");const o=s;if(!(o.property instanceof vt))throw new Error("!(treeItem.property instanceof GroupProperty)");for(let a of o.property.children)if(a instanceof vt){const u=new nd(e,a);u.d(()=>a.destroy()),o.groupChildren.push(u),i.push(u)}else{const u=new rd(e,a);o.groupChildren.push(u),u.d(()=>a.destroy())}}return e.d(()=>{e.itemChildrenChanged.reset(),e.itemChildrenToChange.reset();const s=[...e.getDescendants()];s.forEach(o=>{o.children&&(o.children.length=0),o.destroy()}),s.length=0}),e}class Xa extends st{constructor(e){super();g(this,"_propTreeReact",this.dv(p.react(void 0)));this.d(()=>this._propTreeReact.value=void 0),this.dv(new p.ObjResettingWithEvent(this.sceneObjectChanged,r=>{if(!r)return;const i=new st;return i.d(r.toDestroyEvent.don(()=>{this.sceneObject=void 0})),i})),this.d(this.sceneObjectChanged.don(r=>{this._propTreeReact.value=void 0,!(!r||!(r instanceof ft))&&(this._propTreeReact.value=Cm(r,e))}))}get propTree(){return this._propTreeReact.value}get propTreeChanged(){return this._propTreeReact.changed}}(n=>{n.createDefaultProps=()=>({sceneObject:void 0})})(Xa||(Xa={})),p.extendClassProps(Xa.prototype,Xa.createDefaultProps);function id(n){return p.reactDeepArrayWithUndefined(n,(t,e)=>t[0]===e[0]&&t[1]===e[1],t=>[...t])}function Pm(n,t){const e=new Array;for(let r of n)e.push(t(r));return e}function sd(n,t){return n===void 0&&t===void 0?!0:!n||!t?!1:n[0]===t[0]&&n[1]===t[1]&&n[2]===t[2]}function v2(n,t,e){var i;((i=t.attachedViewers.values().toArray()[0])==null?void 0:i.getEngineObject(t))?e.call(n):n.dispose(t.createdEvent.don(()=>e.call(n)))}function m2(n,t,e,r=!0){r&&e(),n.dispose(t.disposableOn(e))}function y2(n,t){const{type:e,id:r}=n;if(e){const i=ft.create(e,r);if(i)return i.json=n,i;console.warn(`cannot create sceneObject from type(${e})`)}else console.warn(`cannot create sceneObject from type(${e})`)}function Im(n){const t=n.children&&p.every(n.children,r=>{if(!(r instanceof Pr))throw new Error("!(treeItem instanceof SceneTreeItem)");return!r.show})||!1,e=n.sceneTree.getSceneObjectShowFunc(n.sceneObject);return!t||e}class Pr extends p.TreeItem{constructor(e,r=!1,i,s,o=!0){super(e,r,i);g(this,"_dragDrop");g(this,"_showChangedNotAffectChildren",!1);g(this,"_showChangedNotAffectParent",!1);g(this,"_type",this.dv(p.react("Unknown")));g(this,"_isExport",this.dv(p.react(!0)));const a=()=>this.tree&&this.tree.itemsChanged.emit([this]);this.dispose(this.nameChanged.disposableOn(a)),this.name=`未命名条目(${this.id})`,this.extras=s,this._isExport.value=o;let u;const l=()=>{u&&(u(),u=void 0)};this.dispose(l),this.dispose(this.sceneObjectChanged.disposableOn(c=>{l(),c&&(u=p.bind([this,"name"],[c,"name"]))})),this.dispose(this.showChanged.disposableOn(c=>{if(e.setSceneObjectShowFunc(this.sceneObject,c),this.tree&&this.tree.forceRedraw(),this.children&&!this._showChangedNotAffectChildren)for(let h of this.children)h instanceof Pr&&(h._showChangedNotAffectParent=!0,h.show=c,h._showChangedNotAffectParent=!1);this.parent&&this.parent instanceof Pr&&!this._showChangedNotAffectParent&&(this.parent._showChangedNotAffectChildren=!0,this.parent.show=Im(this.parent),this.parent._showChangedNotAffectChildren=!1)})),this.dv(new p.ObjResettingWithEvent(this.sceneObjectChanged,()=>{if(!this.sceneObject)return;const c=new st;if("show"in this.sceneObject&&"showChanged"in this.sceneObject&&this.sceneObject.showChanged instanceof H){const h=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};h(),c.dispose(this.sceneObject.showChanged.disposableOn(h))}else if("enabled"in this.sceneObject&&"enabledChanged"in this.sceneObject&&this.sceneObject.enabledChanged instanceof H){const h=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};h(),c.dispose(this.sceneObject.enabledChanged.disposableOn(h))}return c})),this.childrenChangedEvent.disposableOn(()=>{const c=Im(this);this._showChangedNotAffectChildren=!0,this.show=c,this._showChangedNotAffectChildren=!1});{const c=()=>{let h="Unknown";this.sceneObject?h=this.sceneObject.typeName:this.children&&(h="Folder"),this._type.value=h};this.dispose(this.sceneObjectChanged.disposableOn(c)),this.dispose(this.childrenResetedEvent.disposableOn(c)),c()}}get dragDrop(){return this._dragDrop||(this._dragDrop=this.dv(this.sceneTree.createTreeItemDragDropFunc(this))),this._dragDrop}get type(){return this._type.value}get typeChanged(){return this._type.changed}get isExport(){return this._isExport.value}get isExportChanged(){return this._isExport.changed}set isExport(e){this._isExport.value=e}get sceneTree(){return this.tree}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(e){try{this.json=JSON.parse(e)}catch(r){console.error(`sceneTreeItem.jsonStr error ${r}`,r)}}get json(){const e=this.children&&[...this.children].filter(r=>r.isExport).map(r=>r.json);return{name:this.name,show:this.show?void 0:!1,collapsed:this.uiTreeObject.collapsed?!0:void 0,sceneObj:this.sceneObject&&this.sceneObject.json,children:e,extras:this.extras}}set json(e){if(e.name!==void 0&&(this.name=e.name),this.extras=e.extras,this._showChangedNotAffectChildren=!0,this._showChangedNotAffectParent=!0,this.show=e.show??!0,this._showChangedNotAffectChildren=!1,this._showChangedNotAffectParent=!1,this.uiTreeObject.collapsed=e.collapsed??!1,this.sceneObject=void 0,e.sceneObj&&(this.sceneObject=this.sceneTree.createSceneObjectFunc(e.sceneObj,this)),!!e.children){if(this.resetChildren(!0),!this.children)throw new Error("resetChildren(true) cannot get children!");for(let r of e.children){const i=new Pr(this.tree,!0);i.json=r,this.children.push(i)}}}clone(){try{const e=new Pr(this.sceneTree,!!this.children,void 0,this.extras,this.isExport);return e.json=this.json,e.name=this.sceneTree.getSceneTreeItemCloneNameFunc(this),e}catch(e){console.error(`SceneTreeItem.clone error: ${e}`,e)}}insertNewTreeItem(e,r){if(e==="FolderInnerOrAfter"||e==="FolderInnerOrBefore"||e==="FolderInner"){if(r&&r.tree!==this.tree)return console.warn("newTreeItem.tree !== this.tree"),!1;if(this.children&&!(e.includes("Or")&&this.sceneObject))return r&&this.children.push(r),!0;if(e==="FolderInner")return!1;if(e==="FolderInnerOrAfter")return super.insertNewTreeItem("After",r);if(e==="FolderInnerOrBefore")return super.insertNewTreeItem("Before",r);throw new Error("should not be here!")}else return super.insertNewTreeItem(e,r)}}(n=>{n.createDefaultProps=()=>({name:"未命名条目",nameEditing:!1,sceneObject:void 0,show:!0,extras:p.reactJsonWithUndefined(void 0)})})(Pr||(Pr={})),p.extendClassProps(Pr.prototype,Pr.createDefaultProps);function Mm(n,t,e){let{offsetY:r}=t;if(!t.target||!("clientTop"in t.target))return"none";r+=2,r+=t.target.clientTop;let i="none";return n.children?r<=e*.3?i="before":r>=e*.7?!n.uiTreeObject.collapsed&&n.children.length>0?i="inner":i="after":i="inner":r<=e*.5?i="before":i="after",i}class bm extends ip{constructor(t){super(),this._treeItem=t;const{dragStartDataManager:e}=this._treeItem.sceneTree;let r="none";const i=this.disposeVar(p.createTimeoutWithStartValues(()=>{this._treeItem.uiTreeObject.moveToPositionMode=r,console.log(`uiTreeObject.moveToPositionMode = lastDragMode(${r});`)},200));function s(o){r!==o&&(r=o,i.restart())}this.dispose(this._dragStartEvent.disposableOn(o=>{e.data={type:"UITreeA",value:this._treeItem}})),this.dispose(this._dragOverEvent.disposableOn(o=>{if(!o.dataTransfer)return;o.preventDefault();const a=e;if(a.data&&a.data.type==="UITreeA"&&a.data.value!==void 0){const u=a.data.value,l=this._treeItem,{tree:c}=l;if(c){const h=[...c.selectedItems];~h.indexOf(u)||h.push(u);const f=Mm(l,o,c.itemDivHeight);if(f!=="none"&&p.Tree.canMoveToTreeItems(h,l,f)){o.dataTransfer.dropEffect="move",s(f);return}}}o.dataTransfer.dropEffect="none",s("none")})),this.dispose(this._dropEvent.disposableOn(o=>{const a=e;if(!(a.data&&a.data.type==="UITreeA"&&a.data.value!==void 0))return;const u=a.data.value,l=this._treeItem,{tree:c}=l;if(!c)return;const h=[...c.selectedItems];~h.indexOf(u)||h.push(u);const f=Mm(l,o,c.itemDivHeight);f!=="none"&&p.Tree.canMoveToTreeItems(h,l,f)&&(p.Tree.moveToTreeItems(h,l,f),a.data=void 0,s("none"))})),this.dispose(this._dragLeaveEvent.disposableOn(()=>{r="none",i.restart()}))}}function _2(n){if(!(n instanceof Pr))throw new Error("defaultCreateTreeItemDragDrop !(treeItem instanceof SceneTreeItem)");return new bm(n)}function w2(n){let t=!1;return n&&("show"in n?t=n.show??!0:"enabled"in n&&(t=n.enabled??!0)),t}function E2(n,t){n&&("show"in n?n.show=t:"enabled"in n&&(n.enabled=t))}const S2=["EnvironmentVariables","ScriptsLoader","SceneScript","ScriptLoader"];function C2(n){const t=[],{root:e={}}=n,r=[e];for(;r.length>0;){const i=r.pop();if(!i)throw new Error("!todo");if(i.children){for(let s of i.children)if(s.children&&r.unshift(s),s.sceneObj){const{type:o=void 0}=s.sceneObj;o||(console.warn("sceneObjJson has no type! treeItem.sceneObj: "),console.warn(s.sceneObj)),o&&S2.includes(o)&&t.push(s.sceneObj)}}}return t}async function P2(n,t){const e=C2(n);let r=0;const i=e.length;for(let s of e)if(++r,t){const o=r/i;t(o,r,i)}}class Nm extends st{constructor(e,r){super();g(this,"treeItemContexMenuCallback");this._sceneTree=e,this._projectManager=r}get sceneTree(){return this._sceneTree}}class I2 extends st{constructor(e){super();g(this,"_jsonLoadingEvent",this.disposeVar(new H));g(this,"_setJsonProcessing",this.disposeVar(p.createProcessingFromAsyncFunc(async(e,r)=>{this._jsonLoadingEvent.emit({type:"init"}),this._jsonLoadingEvent.emit({type:"loading"}),r&&await e.promise(this._sceneTree.preloadFunc(r)),this._setJson(r),this._jsonLoadingEvent.emit({type:"loaded"})})));this._sceneTree=e,this._setJsonProcessing.errorFunc=r=>{this._jsonLoadingEvent.emit({type:"error",error:r})}}get jsonLoadingEvent(){return this._jsonLoadingEvent}_setJson(e){try{this._sceneTree.setJson(e||{})}catch(r){console.error(`json数据装配时发生错误!error: ${r}`)}}get json(){return this._sceneTree.getJson()}set json(e){this._setJsonProcessing.restart(new p.CancelError("JSON重新赋值!"),e)}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(e){this.json=JSON.parse(e)}}function M2(n){return n.name+"_clone"}function od(n,t,e){if(n instanceof Pr)return n.insertNewTreeItem(t,e);{const r={FolderInnerOrAfter:"InnerOrAfter",FolderInnerOrBefore:"InnerOrBefore",FolderInner:"Inner",InnerOrAfter:"InnerOrAfter",InnerOrBefore:"InnerOrBefore",Inner:"Inner",After:"After",Before:"Before"};return n.insertNewTreeItem(r[t],e)}}function b2(n){[n,...n.getDescendants()].forEach(t=>t.destroy())}const rn=class rn extends p.Tree{constructor(e,r,i,s){super(i);g(this,"_jsonLoading",this.disposeVar(new I2(this)));g(this,"createSceneObjectFunc",rn.defaultCreateSceneObjectFunc);g(this,"createTreeItemDragDropFunc",rn.defaultCreateTreeItemDragDropFunc);g(this,"preloadFunc",rn.defaultPreload);g(this,"getSceneObjectShowFunc",rn.defaultGetSceneObjectShow);g(this,"setSceneObjectShowFunc",rn.defaultSetSceneObjectShow);g(this,"getSceneTreeItemCloneNameFunc",rn.defaultGetSceneTreeItemCloneNameFunc);g(this,"debug",!1);g(this,"_contextMenu",this.disposeVar(new Nm(this,this.projectManager)));g(this,"_showPropUiOnSelecting",this.disposeVar(p.react(!0)));this._name=e,this._dragStartDataManager=r,this._projectManager=s,this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{var a,u;window.lssn=this.lastSelectedItem,window.lsso=(a=this.lastSelectedItem)==null?void 0:a.sceneObject,this.debug&&console.log(((u=this.lastSelectedItem)==null?void 0:u.sceneObject)??"select null")}));const{sceneObjectsManager:o}=this._projectManager;this.dispose(this.itemsDeleted.disposableOn(a=>{for(let u of a){const l=u,{sceneObject:c}=l;c&&o.deleteSceneObject(c)&&c.destroy()&&Kl(c,void 0);for(let h of l.getDescendants()){const{sceneObject:f}=h;f&&o.deleteSceneObject(f)&&f.destroy()&&Kl(f,void 0)}b2(u)}})),this.dispose(this.itemsAdded.disposableOn(a=>{for(let u of a){const l=u;l.sceneObject&&o.addSceneObject(l.sceneObject)&&Kl(l.sceneObject,l)}})),this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{if(!this.showPropUiOnSelecting)return;this._projectManager.propUiTreeManager.sceneObject=void 0;const{lastSelectedItem:a}=this;a&&(this._projectManager.propUiTreeManager.sceneObject=a.sceneObject)}))}get json(){return this._jsonLoading.json}set json(e){this._jsonLoading.json=e}get jsonStr(){return this._jsonLoading.jsonStr}set jsonStr(e){this._jsonLoading.jsonStr=e}get jsonLoadingEvent(){return this._jsonLoading.jsonLoadingEvent}get name(){return this._name}get projectManager(){return this._projectManager}get contextMenu(){return this._contextMenu}get showPropUiOnSelecting(){return this._showPropUiOnSelecting.value}set showPropUiOnSelecting(e){this._showPropUiOnSelecting.value=e}get showPropUiOnSelectingChanged(){return this._showPropUiOnSelecting.changed}get sceneUiTree(){return this.uiTree}getTreeItemFromSceneObjId(e){const r=this.getDescendants();let i;for(let s of r)if(s.sceneObject&&s.sceneObject.id===e){i=s;break}return i}get dragStartDataManager(){return this._dragStartDataManager}getJson(){return{root:{children:[...this.children].filter(e=>e.isExport).map(e=>e.json)}}}setJson(e){var i;e.root=e.root||{};const r=e.root.children??[];this.root.resetChildren(!0);for(let s of r){const o=new Pr(this,!0);o.json=s,(i=this.root.children)==null||i.push(o)}}testAddNewTreeItem(e,r){const i=e||this.lastSelectedItem||this.root;return i?od(i,r):!1}addNewTreeItem(e,r,i,s){const o=e||this.lastSelectedItem||this.root;if(o&&od(o,r)){const a=new Pr(this,i);if(a.sceneObject=s,!od(o,r,a))throw new Error("currentTreeItem.insertNewTreeItem return false!");return a}}createSceneObjectTreeItem(e,r,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const a=ft.create(e,r);return a?this.addNewTreeItem(i,s??"FolderInnerOrAfter",!0,a):void 0}createGroupTreeItem(e,r,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const a=this.addNewTreeItem(i,s??"FolderInnerOrAfter",!0);if(!a){console.warn("addNewTreeItem error!");return}return a.name=e??"未命名组节点",a}createSceneObjectTreeItemFromClass(e,r,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o))return;const a=ft.createFromClass(e,r);return a?this.addNewTreeItem(i,o,!0,a):void 0}createSceneObjectTreeItemFromJson(e,r,i){const s=i??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(r,s))return;const o=ft.createFromJson(e);return console.log(o),o?this.addNewTreeItem(r,i??"FolderInnerOrAfter",!0,o):void 0}destroySceneObjectTreeItem(e){if(e===this.root){console.warn("cannot destroy root! please use function destroyAllSceneObjectTreeItems!");return}e.detachFromParent()}destroyAllSceneObjectTreeItems(){if(!this.root.children)return;const e=[...this.root.children];for(let r of e)this.destroySceneObjectTreeItem(r)}};g(rn,"defaultCreateSceneObjectFunc",y2),g(rn,"defaultCreateTreeItemDragDropFunc",_2),g(rn,"defaultPreload",P2),g(rn,"defaultGetSceneObjectShow",w2),g(rn,"defaultSetSceneObjectShow",E2),g(rn,"defaultGetSceneTreeItemCloneNameFunc",M2);let Al=rn;const ad={saturation:.35,brightness:1.4,gamma:.8,atmosphereScatteringIntensity:5,groundColor:[0,.09411764705882353,.3137254901960784,1]};class N2 extends st{constructor(e){super();g(this,"_currentPosition",this.disposeVar(p.reactArrayWithUndefined(void 0)));g(this,"_currentRotation",this.disposeVar(p.reactArrayWithUndefined(void 0)));g(this,"_currentHeading",this.disposeVar(p.react(void 0)));g(this,"_isRotating",this.disposeVar(p.react(!1)));g(this,"_isGround",this.disposeVar(p.react(!1)));g(this,"_startPosition",[0,0,0]);g(this,"_startRotation",[0,0,0]);g(this,"_processing",this.disposeVar(p.createProcessingFromAsyncFunc(async(e,r,i,s)=>{const{currentPosition:o,currentRotation:a}=this;if(!o||s<=0||!a){this._currentPosition.value=r,this._currentRotation.value=i;return}const u=this._startPosition;u.splice(0,3,...o);const l=this._startRotation;l.splice(0,3,...a);let c=Date.now();const h=xl(u,r);this._currentHeading.value=h;const d=$h(u,r)/s,v=[i[0]-l[0],i[1]-l[1],i[2]-l[2]],_=r[2]-u[2];await e.promise(new Promise(E=>{e.disposer.dispose(p.animateFrame(async()=>{let P=Date.now()-c;P=P<0?0:P,P=P>s?s:P;const y=P*d,w=fm(u,y,h);if(this.isGround&&w){const m=await this._esviewer.getTerrainHeight([w[0],w[1]]);this._currentPosition.value=[w[0],w[1],m??0]}else w&&(w[2]+=_*(P/s)),this._currentPosition.value=w;if(this.isRotating){const[m,S,C]=v,I=P/s;this._currentRotation.value=[l[0]+m*I,l[1]+S*I,l[2]+C*I]}P===s&&(this._currentPosition.value=r,this.isRotating&&(this._currentRotation.value=i),this.isRotating=!1,this.isGround=!1,E())}))}))})));this._esviewer=e}get currentPosition(){return this._currentPosition.value}get currentPositionChanged(){return this._currentPosition.changed}get currentRotation(){return this._currentRotation.value}get currentRotationChanged(){return this._currentRotation.changed}get currentHeading(){return this._currentHeading.value}get currentHeadingChanged(){return this._currentHeading.changed}get isRotating(){return this._isRotating.value}set isRotating(e){this._isRotating.value=e}get isRotatingChanged(){return this._isRotating.changed}get isGround(){return this._isGround.value}set isGround(e){this._isGround.value=e}get isGroundChanged(){return this._isGround.changed}get processing(){return this._processing}restart(e,r,i){this._processing.restart(void 0,e,r,i)}cancel(){this._processing.cancel()}}function xm(n){let t=0;function e(r,i){i++,t=Math.max(i,t),r.forEach(s=>{Array.isArray(s)&&e(s,i)})}return e(n,0),t}const qi=class qi extends ee{constructor(e){super(e);g(this,"editingBindMode","lineString");g(this,"_area",this.dv(p.react(0)));g(this,"_perimeter",this.dv(p.react(0)));const r=()=>{this._updateArea(),this._updatePerimeter()};r(),this.d(this.pointsChanged.don(r))}updateEditing(){var r;const e=[];this.editingBindMode=="doublePoints"?e.push(ct.DoublePointsAppend,ct.DoublePointsModify):this.editingBindMode=="lineString"?e.push(ct.LineStringAppend,ct.LineStringInsert,ct.Translation):this.editingBindMode=="circular"?(e.push(ct.CircularAppend,ct.CircularInsert,ct.Translation),this.supportEditingModes().includes(ct.HeightModify)&&e.push(ct.HeightModify)):this.editingBindMode=="visibility"?e.push(ct.VisibilityAppend,ct.VisibilityModify):this.editingBindMode=="scatter"&&e.push(ct.ScatterAppend,ct.ScatterModify),(r=this.activeViewer)==null||r.startEditing(this,e,{callSource:"inner"})}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}_updateArea(){this._area.value=this.getArea()??0}_updatePerimeter(){this._perimeter.value=this.getPerimeter()??0}getArea(){if(this.points&&this.points.length>=3)return Kf([...this.points])}getDistance(){if(this.points&&this.points.length>=2){const e=Tl(this.points,"GEODESIC");return e[e.length-1]}else return}getPerimeter(){if(this.points&&this.points.length>=3){const e=[...this.points,this.points[0]],r=Tl(e,"GEODESIC");return r[r.length-1]}else return}getIntersect(e){if(this.points&&this.points.length>=3&&e.length>=3){const r=gm(this.points,e);if(!r)return;const i=r[0][0][0];if(Array.isArray(i)){const s=[...r],o=[];return s.forEach(a=>{const u=a[0].map(l=>[...l,0]);o.push(u)}),o}else return[[...r][0].map(a=>[...a,0])]}else return}getUnion(e){if(this.points&&this.points.length>=3&&e.length>=3){const r=pm(this.points,e);if(!r)return;const i=r[0][0][0];if(Array.isArray(i)){const s=[...r],o=[];return s.forEach(a=>{const u=a[0].map(l=>[...l,0]);o.push(u)}),o}else return[[...r][0].map(a=>[...a,0])]}else return}getDifference(e){if(this.points&&this.points.length>=3&&e.length>=3){let r=[...e];const i=e[0],s=e[e.length-1];i[0]===s[0]&&i[1]===s[1]&&i[2]===s[2]||r.push(i);const o=mm([...this.points,this.points[0]],[...r]);if(!o)return{status:"undefined",positions:void 0};const a=[...o];if(xm(a)===3){const u=a.map(f=>f.map(d=>[...d,0]));if(u.length<=1)return{status:"notIncluded",positions:u};const l=u[0],c=u[1];return Zf([...l],[...c])==="oneBig"?{status:"included",positions:u}:{status:"notIncluded",positions:u}}else if(xm(a)===4){const l=[...a.map(h=>h.map(f=>f.map(d=>[...d,0])))],c=[];return l.forEach(h=>{c.push(h[0])}),{status:"notIncluded",positions:c}}else return{status:"undefined",positions:void 0}}else return{status:"undefined",positions:void 0}}getBuffer(e=500,r){if(this.points&&this.points.length>=2){const i=vm(this.points,e,r);return i?[i[0].map(s=>[...s,0])]:void 0}else return}geoPolygonOverlap(e){if(this.points&&this.points.length>=3&&e.length>=3){const r=Zf(this.points,e);return r==="oneBig"?!0:r==="twoBig"?!1:void 0}else return}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",coordinate:[...e.coordinate,new tt([this,"editing"],"编辑",!1),new ht([this,"points"],"位置数组",qi.defaults.points,void 0,!0)],style:[...e.style,new vt([],"点样式"),new tt([this,"pointed"],"开启",!1),new R([this,"pointSize"],"点大小",1),new Tt([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new Gt([this,"pointColor"],"点颜色",[1,1,1,1]),new Gt([this,"pointOutlineColor"],"轮廓颜色",qi.defaults.pointStyle.outlineColor),new R([this,"pointOutlineWidth"],"轮廓宽度",qi.defaults.pointStyle.outlineWidth),new vt([],"线样式"),new tt([this,"stroked"],"开启线样式",!0),new tt([this,"strokeGround"],"贴地",!1),new R([this,"strokeWidth"],"线宽",1),new Tt([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new Gt([this,"strokeColor"],"线颜色",[1,1,1,1]),new vt([],"面样式"),new tt([this,"filled"],"开启",!1),new tt([this,"fillGround"],"贴地",!1),new Gt([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...e.more,new vt([],"点样式集合"),new Et([this,"pointMaterial"],"点材质"),new ht([this,"pointMaterialParams"],"点材质参数"),new vt([],"线样式集合"),new Et([this,"strokeMaterial"],"线材质"),new ht([this,"strokeMaterialParams"],"线材质参数"),new vt([],"面样式集合"),new Et([this,"fillMaterial"],"面材质"),new ht([this,"fillMaterialParams"],"面材质参数")]}}get pointSize(){return this.pointStyle.size}set pointSize(e){this.pointStyle={...this.pointStyle,size:e}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(e){this.pointStyle={...this.pointStyle,sizeType:e}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(e){this.pointStyle={...this.pointStyle,color:[...e]}}get pointColorChanged(){return this.pointStyleChanged}get pointOutlineColor(){return this.pointStyle.outlineColor}set pointOutlineColor(e){this.pointStyle={...this.pointStyle,outlineColor:[...e]}}get pointOutlineColorChanged(){return this.pointStyleChanged}get pointOutlineWidth(){return this.pointStyle.outlineWidth}set pointOutlineWidth(e){this.pointStyle={...this.pointStyle,outlineWidth:e}}get pointOutlineWidthChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(e){this.pointStyle={...this.pointStyle,material:e}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(e){this.pointStyle={...this.pointStyle,materialParams:e}}get pointMaterialParamsChanged(){return this.pointStyleChanged}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}};g(qi,"createDefaultProps",()=>({...ee.createDefaultProps(),pointed:!1,pointStyle:p.reactJson({size:10,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),stroked:!1,strokeStyle:p.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:p.reactJson({color:[1,1,1,1],material:"",materialParams:{},ground:!1}),points:p.reactPositions(void 0)})),g(qi,"type",qi.register("ESGeoVector",qi,{chsName:"地理矢量",tags:["ESObjects"],description:"地理矢量"})),g(qi,"supportEditingModes",[...ee.supportEditingModes,ct.Translation]);let Rt=qi;const Ro=class Ro extends ee{constructor(){super(...arguments);g(this,"_statusDis",this.dv(p.react(!0)));g(this,"_smoothMoveEvent",this.dv(new H));g(this,"_smoothMoveWithRotationEvent",this.dv(new H));g(this,"_smoothMoveOnGroundEvent",this.dv(new H));g(this,"_smoothMoveWithRotationOnGroundEvent",this.dv(new H));g(this,"_automaticLandingEvent",this.dv(new H));g(this,"_smoothMoveKeepPitchEvent",this.dv(new H));g(this,"_smoothMoveRelativelyEvent",this.dv(new H));g(this,"_smoothMoveRelativelyWithRotationEvent",this.dv(new H));g(this,"useCalcFlyToParamInESObjectWithLocation",!0)}updateEditing(){var r;const e=[];this.editingBindMode=="singlePoint"?(e.push(ct.Place,ct.Translation),["ESLocationMeasurement"].includes(this.typeName)||e.push(ct.Rotation),["ESClippingPlane","ESLocationMeasurement","ESLocalRectangle","ESBoxClipping"].includes(this.typeName)||e.push(ct.Scale)):this.editingBindMode=="doublePoints"&&e.push(ct.DoublePointsAppend,ct.DoublePointsModify),(r=this.activeViewer)==null||r.startEditing(this,e,{callSource:"inner"})}get statusDis(){return this._statusDis.value}get statusDisChanged(){return this._statusDis.changed}get smoothMoveEvent(){return this._smoothMoveEvent}smoothMove(e,r){this._smoothMoveEvent.emit(e,r)}get smoothMoveWithRotationEvent(){return this._smoothMoveWithRotationEvent}smoothMoveWithRotation(e,r,i){this._smoothMoveWithRotationEvent.emit(e,r,i)}get smoothMoveOnGroundEvent(){return this._smoothMoveOnGroundEvent}smoothMoveOnGround(e,r,i,s){this._smoothMoveOnGroundEvent.emit(e,r,i,s)}get smoothMoveWithRotationOnGroundEvent(){return this._smoothMoveWithRotationOnGroundEvent}smoothMoveWithRotationOnGround(e,r,i,s,o){this._smoothMoveWithRotationOnGroundEvent.emit(e,r,i,s,o)}get automaticLandingEvent(){return this._automaticLandingEvent}automaticLanding(){const e=this.collision;this.collision=!1,setTimeout(()=>{this._automaticLandingEvent.emit(e)},100)}get smoothMoveKeepPitchEvent(){return this._smoothMoveKeepPitchEvent}smoothMoveKeepPitch(e,r){this._smoothMoveKeepPitchEvent.emit(e,r)}get smoothMoveRelativelyEvent(){return this._smoothMoveRelativelyEvent}smoothMoveRelatively(e,r){this._smoothMoveRelativelyEvent.emit(e,r)}get smoothMoveRelativelyWithRotationEvent(){return this._smoothMoveRelativelyWithRotationEvent}smoothMoveRelativelyWithRotation(e,r,i){this._smoothMoveRelativelyWithRotationEvent.emit(e,r,i)}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",location:[...e.location,new tt([this,"editing"],"是否编辑"),new mt([],()=>this.automaticLanding(),[],"自动落地"),new na([this,"position"],"位置数组",[0,0,0]),new Rc([this,"rotation"],"姿态数组",[0,0,0]),new gr([this,"scale"],"缩放",[1,1,1]),new R([this,"minVisibleDistance"],"最小可见距离",0),new R([this,"maxVisibleDistance"],"最大可见距离",0)],more:[...e.more,new mt(["numbers","number"],(r,i)=>this.smoothMove(r,i),[[0,0,0],0],"平滑移动","smoothMove"),new mt(["numbers","number"],(r,i)=>this.smoothMoveKeepPitch(r,i),[[0,0,0],0],"固定方向平滑移动","smoothMoveKeepPitch"),new mt(["numbers","numbers","number"],(r,i,s)=>this.smoothMoveWithRotation(r,i,s),[[0,0,0],[0,0,0],0],"平滑偏移","smoothMoveWithRotation"),new mt(["number","number","number","string"],(r,i,s,o)=>this.smoothMoveOnGround(r,i,s,o),[0,0,0,""],"贴地平滑移动","smoothMoveOnGround"),new mt(["numbers","number","number","number","string"],(r,i,s,o,a)=>this.smoothMoveWithRotationOnGround(r,i,s,o,a),[[0,0,0],0,0,0,""],"贴地平滑偏移","smoothMoveWithRotationOnGround"),new mt(["numbers","number"],(r,i)=>this.smoothMoveRelatively(r,i),[[0,0,0],0],"smoothMoveRelatively","smoothMoveRelatively"),new mt(["numbers","numbers","number"],(r,i,s)=>this.smoothMoveRelativelyWithRotation(r,i,s),[[0,0,0],[0,0,0],0],"smoothMoveRelativelyWithRotation","smoothMoveRelativelyWithRotation"),new tt([this,"enableVisibleDistance"],"是否应用距离显隐")]}}get pointSize(){return this.pointStyle.size}set pointSize(e){this.pointStyle={...this.pointStyle,size:e}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(e){this.pointStyle={...this.pointStyle,sizeType:e}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(e){this.pointStyle={...this.pointStyle,color:[...e]}}get pointColorChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(e){this.pointStyle={...this.pointStyle,material:e}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(e){this.pointStyle={...this.pointStyle,materialParams:e}}get pointMaterialParamsChanged(){return this.pointStyleChanged}};g(Ro,"createDefaultProps",()=>({...ee.createDefaultProps(),pointed:!1,pointStyle:p.reactJson({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),position:p.reactArray([0,0,0]),rotation:p.reactArray([0,0,0]),scale:p.reactArray([1,1,1]),minVisibleDistance:p.react(0),maxVisibleDistance:p.react(0)})),g(Ro,"type",Ro.register("ESObjectWithLocation",Ro,{chsName:"对象位置",tags:["ESObjects"],description:"对象位置"})),g(Ro,"supportEditingModes",[...ee.supportEditingModes,ct.Place,ct.Translation,ct.Rotation,ct.Scale,ct.DoublePointsAppend,ct.DoublePointsModify]);let dt=Ro;const Ka=class Ka extends dt{getESProperties(){const t={...super.getESProperties()};return{...t,style:[...t.style,new vt([],"点样式集合"),new tt([this,"pointed"],"开启点样式",!1),new R([this,"pointSize"],"点大小",1),new Tt([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new Gt([this,"pointColor"],"点颜色",[1,1,1,1]),new vt([],"线样式集合"),new tt([this,"stroked"],"开启线样式",!1),new tt([this,"strokeGround"],"是否贴地(线)",!1),new R([this,"strokeWidth"],"线宽",1),new Tt([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new Gt([this,"strokeColor"],"线颜色",[1,1,1,1]),new vt([],"面样式集合"),new tt([this,"filled"],"开启填充样式",!1),new tt([this,"fillGround"],"是否贴地",!1),new Gt([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...t.more,new vt([],"点样式"),new Et([this,"pointMaterial"],"点材质",""),new ht([this,"pointMaterialParams"],"点材质参数",{}),new vt([],"线样式"),new Et([this,"strokeMaterial"],"线材质",""),new ht([this,"strokeMaterialParams"],"线材质参数",{}),new vt([],"填充样式"),new Et([this,"fillMaterial"],"面材质",""),new ht([this,"fillMaterialParams"],"面材质参数",{})]}}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(t){this.strokeStyle={...this.strokeStyle,width:t}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(t){this.strokeStyle={...this.strokeStyle,widthType:t}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(t){this.strokeStyle={...this.strokeStyle,color:[...t]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(t){this.strokeStyle={...this.strokeStyle,material:t}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(t){this.strokeStyle={...this.strokeStyle,materialParams:t}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(t){this.strokeStyle={...this.strokeStyle,ground:t}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(t){this.fillStyle={...this.fillStyle,color:[...t]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(t){this.fillStyle={...this.fillStyle,material:t}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(t){this.fillStyle={...this.fillStyle,materialParams:t}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(t){this.fillStyle={...this.fillStyle,ground:t}}get fillGroundChanged(){return this.fillStyleChanged}};g(Ka,"createDefaultProps",()=>({...dt.createDefaultProps(),pointed:!1,pointStyle:p.reactJson({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:1}),stroked:!1,strokeStyle:p.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:p.reactJson({color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),g(Ka,"type",Ka.register("ESLocalVector",Ka,{chsName:"本地矢量",tags:["ESObjects"],description:"本地矢量对象"}));let Ba=Ka;const Vl=class Vl extends Ba{};g(Vl,"type",Vl.register("ESLocalVector2D",Vl,{chsName:"本地矢量2D",tags:["ESObjects"],description:"本地矢量2D对象"}));let gs=Vl;const x2=[["固定朝向",0],["面向屏幕旋转",1],["绕自身Z轴旋转",2]],T2=[["单面不透明",0],["双面不透明",1],["单面遮罩",2],["双面遮罩",3],["单面透明",4],["双面透明",5],["单面未遮挡透明",6],["双面未遮挡透明",7]],Za=class Za extends dt{constructor(){super(...arguments);g(this,"_widgetEvent",this.dv(new H))}get widgetEvent(){return this._widgetEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new tt([this,"screenRender"],"屏幕渲染",!0),new tt([this,"sizeByContent"],"尺寸自适应",!0),new qe([this,"size"],"尺寸大小",[100,100]),new qe([this,"anchor"],"偏移比例",[.5,1]),new qe([this,"offset"],"像素偏移",[0,0]),new Tt([this,"renderMode"],T2,"渲染模式",0),new Tt([this,"rotationType"],x2,"漫游旋转类型",1),new Et([this,"actorTag"],"绑定对象"),new Et([this,"socketName"],"插槽名称"),new gr([this,"positionOffset"],"位置偏移"),new gr([this,"rotationOffset"],"相对姿态")],more:[...e.more,new R([this,"zOrder"],"排序",0)]}}};g(Za,"createDefaultProps",()=>({...dt.createDefaultProps(),screenRender:!0,size:p.reactArray([100,100]),anchor:p.reactArray([.5,1]),offset:p.reactArray([0,0]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,actorTag:"",socketName:"",positionOffset:p.reactArray([0,0,0]),rotationOffset:p.reactArray([0,0,0])})),g(Za,"type",Za.register("ESLabel",Za,{chsName:"标签",tags:["ESObjects"],description:"标签对象"}));let yn=Za;const tu=class tu extends ft{constructor(t){super(t)}};g(tu,"createDefaultProps",()=>({...ft.createDefaultProps(),show:!0,fillStyle:p.reactJson({color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),g(tu,"type",tu.register("ESTestObject",tu,{chsName:"测试",tags:["ESObjects"],description:""}));let ud=tu;const Wi=class Wi extends ee{constructor(e){super(e);g(this,"_refreshTilesetEvent",this.dv(new H));g(this,"_tilesetReadyEvent",this.dv(new H));g(this,"_supportEdit",this.dv(p.react(!0)));g(this,"_highlightFeatureEvent",this.dv(new H));g(this,"_highlightFeatureAndFlyToEvent",this.dv(new H));g(this,"_strokeFeatureEvent",this.disposeVar(new H));g(this,"_getFeatureTableEvent",this.dv(new H));g(this,"_featureTableResultEvent",this.dv(new H));g(this,"_getMaterialNameListEvent",this.disposeVar(new H));g(this,"_setFeatureStyleEvent",this.dv(new H));g(this,"_setFeatureColorEvent",this.dv(new H));g(this,"_setFeatureVisableEvent",this.dv(new H));g(this,"_resetFeatureStyleEvent",this.dv(new H));g(this,"setMaterialInfoEvent",this.ad(new H));g(this,"_setMaterialEvent",this.disposeVar(new H));g(this,"_clippingPlanesId",this.dv(p.react("")));g(this,"_clippingPlaneIds",this.dv(p.react([])));g(this,"_flattenedPlaneId",this.dv(p.react("")));g(this,"_flattenedPlaneEnabled",this.dv(p.react(!1)));g(this,"_clippingPlaneId",this.dv(p.react("")));g(this,"_excavateId",this.dv(p.reactArray([])))}updateEditing(){var e;(e=this.activeViewer)==null||e.startEditing(this,[ct.Translation,ct.Rotation],{callSource:"inner"})}get refreshTilesetEvent(){return this._refreshTilesetEvent}refreshTileset(){this._refreshTilesetEvent.emit()}get tilesetReady(){return this._tilesetReadyEvent}get supportEdit(){return this._supportEdit.value}set supportEdit(e){this._supportEdit.value=e}get supportEditChanged(){return this._supportEdit.changed}get highlightFeatureEvent(){return this._highlightFeatureEvent}highlightFeature(e,r){this._highlightFeatureEvent.emit(e,r)}get highlightFeatureAndFlyToEvent(){return this._highlightFeatureAndFlyToEvent}highlightFeatureAndFlyTo(e,r,i,s){this._highlightFeatureAndFlyToEvent.emit(e,r,i,s)}get strokeFeatureEvent(){return this._strokeFeatureEvent}strokeFeature(e,r=[1,0,0,1]){this._strokeFeatureEvent.emit(e,r)}get getFeatureTableEvent(){return this._getFeatureTableEvent}getFeatureTable(){return Promise.race([new Promise(e=>{const r=this.d(this._featureTableResultEvent.donce(e));this._getFeatureTableEvent.emit(),setTimeout(()=>{r(),e(void 0)},2e3)})])}get getMaterialNameListEvent(){return this._getMaterialNameListEvent}getMaterialNameList(){return new Promise(e=>{const r=new st;r.d(this.getMaterialNameListEvent.don(i=>{i!=="start"&&(r.destroy(),e(i))})),this.getMaterialNameListEvent.emit("start"),setTimeout(()=>{r.isDestroyed()||(r.destroy(),e(void 0))},2e3)})}get setFeatureStyleEvent(){return this._setFeatureStyleEvent}setFeatureStyle(e){this._setFeatureStyleEvent.emit(e)}get setFeatureColorEvent(){return this._setFeatureColorEvent}setFeatureColor(e,r){this._setFeatureColorEvent.emit(e,typeof r=="string"?JSON.parse(r):r)}get setFeatureVisableEvent(){return this._setFeatureVisableEvent}setFeatureVisable(e,r){this._setFeatureVisableEvent.emit(e,typeof r=="string"?JSON.parse(r):r)}get resetFeatureStyleEvent(){return this._resetFeatureStyleEvent}resetFeatureStyle(){this._resetFeatureStyleEvent.emit()}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(e){return new Promise(r=>{const i=new st;i.ad(this.setMaterialInfoEvent.donce(s=>{i.destroy(),r(s)})),this._setMaterialEvent.emit(e)})}get clippingPlanesId(){return this._clippingPlanesId.value}set clippingPlanesId(e){this._clippingPlanesId.value=e}get clippingPlanesIdChanged(){return this._clippingPlanesId.changed}get clippingPlaneIds(){return this._clippingPlaneIds.value}set clippingPlaneIds(e){this._clippingPlaneIds.value=e}get clippingPlaneIdsChanged(){return this._clippingPlaneIds.changed}get flattenedPlaneId(){return this._flattenedPlaneId.value}set flattenedPlaneId(e){this._flattenedPlaneId.value=e}get flattenedPlaneIdChanged(){return this._flattenedPlaneId.changed}get flattenedPlaneEnabled(){return this._flattenedPlaneEnabled.value}set flattenedPlaneEnabled(e){this._flattenedPlaneEnabled.value=e}get flattenedPlaneEnabledChanged(){return this._flattenedPlaneEnabled.changed}get clippingPlaneId(){return this._clippingPlaneId.value}set clippingPlaneId(e){this._clippingPlaneId.value=e}get clippingPlaneIdChanged(){return this._clippingPlaneId.changed}get excavateId(){return this._excavateId.value}set excavateId(e){this._excavateId.value=e}get excavateIdChanged(){return this._excavateId.changed}setLight122(){this.czmEnvironmentMapManager={...ad}}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new Je([this,"maximumScreenSpaceError"],1,[0,256],"精度",16),new Tt([this,"materialMode"],[["常规","normal"],["科技感","technology"]],"材质模式","normal",!0),new Tt([this,"colorBlendMode"],[["默认","HIGHLIGHT"],["替换","REPLACE"],["混合","MIX"]],"颜色模式","HIGHLIGHT"),new ht([this,"materialOverrideMap"],"材质替换",Wi.defaults.materialOverrideMap)],dataSource:[...e.dataSource,new ht([this,"url"],"服务地址",Wi.defaults.url,void 0,!0)],coordinate:[...e.coordinate,new tt([this,"editing"],"编辑",!1,!0),new gr([this,"offset"],"偏移量",[0,0,0],!0),new Rc([this,"rotation"],"旋转",[0,0,0])],more:[...e.more,new ht([this,"materialParams"],"materialParams",Wi.defaults.materialParams),new mt(["string","string"],(r,i)=>this.highlightFeature(r,i),["","rgba(255,0,0,1)"],"highlightFeature"),new mt(["string","string"],(r,i)=>this.setFeatureColor(r,i),["",""],"setFeatureColor"),new mt(["string","string"],(r,i)=>this.setFeatureVisable(r,i),["",""],"setFeatureVisable"),new mt([],()=>this.resetFeatureStyle(),[],"resetFeatureStyle"),new vt([],"ue"),new mt([],()=>this.refreshTileset(),[],"refreshTileset"),new Et([this,"actorTag"]),new tt([this,"highlight"],"是否高亮"),new Gt([this,"highlightColor"]),new R([this,"highlightID"]),new vt([],"czm"),new vt([],"可视化"),new qe([this,"czmImageBasedLightingFactor"],"反射强度"),new R([this,"czmAtmosphereScatteringIntensity"],"大气散射强度"),new ht([this,"czmEnvironmentMapManager"],"动态环境贴图管理器"),new R([this,"czmMaximumMemoryUsage"],"最大内存"),new vt([],"常用"),new Tt([this,"czmClassificationType"],[["NONE","NONE"],["TERRAIN","TERRAIN"],["CESIUM_3D_TILE","CESIUM_3D_TILE"],["BOTH","BOTH"]],"czmClassificationType","NONE",!0),new ht([this,"czmStyleJson"],"czmStyle"),new tt([this,"czmBackFaceCulling"]),new tt([this,"czmSkipLevelOfDetail"]),new R([this,"cacheBytes"],"最大缓存",536870912),new vt([],"调试信息"),new tt([this,"czmDebugShowBoundingVolume"]),new tt([this,"czmDebugShowContentBoundingVolume"]),new vt([],"clippingPlanes"),new tt([this,"clippingPlaneEnabled"]),new tt([this,"unionClippingRegions"]),new Gt([this,"clippingPlaneEdgeColor"]),new R([this,"clippingPlaneEdgeWidth"])]}}};g(Wi,"createDefaultProps",()=>({...ee.createDefaultProps(),url:"",actorTag:"",materialMode:"normal",highlight:!1,maximumScreenSpaceError:16,highlightID:0,highlightColor:p.reactArray([1,0,0,1]),offset:p.reactArrayWithUndefined([0,0,0]),rotation:p.reactArray([0,0,0]),czmImageBasedLightingFactor:p.reactArray([1,1]),czmEnvironmentMapManager:p.reactJsonWithUndefined(void 0),czmLuminanceAtZenith:2,czmAtmosphereScatteringIntensity:2,czmMaximumMemoryUsage:512,czmClassificationType:"NONE",czmStyleJson:p.reactJson({}),czmBackFaceCulling:!0,czmDebugShowBoundingVolume:!1,czmDebugShowContentBoundingVolume:!1,czmSkipLevelOfDetail:!1,cacheBytes:536870912,colorBlendMode:"HIGHLIGHT",clippingPlaneEnabled:!0,unionClippingRegions:!0,clippingPlaneEdgeColor:p.reactArray([1,1,1,1]),clippingPlaneEdgeWidth:2,materialParams:{baseColor:[0,.5,1]},allowPicking:!0,materialOverrideMap:p.reactJsonWithUndefined({}),featureIdLabel:0,splitDirection:"NONE"})),g(Wi,"type",Wi.register("ES3DTileset",Wi,{chsName:"3DTileset",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"})),g(Wi,"supportEditingModes",[...ee.supportEditingModes,ct.Translation,ct.Rotation]);let Wn=Wi;const eu=class eu extends dt{constructor(e){super(e);g(this,"_isFlyInCreated",this.dv(p.react(!1)));g(this,"_readyEvent",this.dv(new H));this.collision=!1,this.d(this.createdEvent.don(()=>{setTimeout(()=>{if((this.editing??!1)||!this.position)this.d(ra([this.positionChanged,this.editingChanged],()=>{this.editing||!this.position||this.isFlyInCreated&&this.flyTo()},{time:"donce"}));else{if(!this.isFlyInCreated)return;this.flyTo()}},1e3)}))}get isFlyInCreated(){return this._isFlyInCreated.value}set isFlyInCreated(e){this._isFlyInCreated.value=e}get isFlyInCreatedChanged(){return this._isFlyInCreated.changed}get readyEvent(){return this._readyEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Tt([this,"mode"],[["柱状警告","cylinder"],["圆形警告","circle"]],"模式","cylinder"),new R([this,"radius"],"半径",10)]}}};g(eu,"createDefaultProps",()=>({...dt.createDefaultProps(),mode:"cylinder",radius:10})),g(eu,"type",eu.register("ESAlarm",eu,{chsName:"报警",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警告类"}));let ld=eu;const Fo=class Fo extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new R([this,"radius"],"半径",1),new Tt([this,"mode"],[["扫描","scan"],["扩散","diffuse"]],"模式",Fo.defaults.mode)]}}};g(Fo,"createDefaultProps",()=>({...dt.createDefaultProps(),radius:1,mode:"scan",collision:!1})),g(Fo,"type",Fo.register("ESApertureEffect",Fo,{chsName:"光圈特效",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"光圈特效"}));let hd=Fo;const Go=class Go extends Rt{constructor(e){super(e);g(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new R([this,"area"],"面积",0,!1,!0),new R([this,"perimeter"],"周长",0,!1,!0)]}}};g(Go,"createDefaultProps",()=>({...Rt.createDefaultProps(),fillStyle:p.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!1}),strokeStyle:p.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!0,stroked:!1,collision:!1})),g(Go,"type",Go.register("ESGeoPolygon",Go,{chsName:"地理多边形",tags:["ESObjects"],description:"地理多边形"})),g(Go,"supportEditingModes",[...Rt.supportEditingModes,ct.CircularAppend,ct.CircularInsert]);let oe=Go;const vs=class vs extends oe{get fillMaterial(){return this.fillStyle.material}set fillMaterial(t){this.fillStyle={...this.fillStyle,material:t}}get fillMaterialParams(){return this.fillStyle?this.fillStyle.materialParams:vs.defaults.fillStyle.materialParams}set fillMaterialParams(t){this.fillStyle={...this.fillStyle??vs.defaults.fillStyle,materialParams:t??vs.defaults.fillStyle.materialParams}}constructor(t){super(t)}};g(vs,"createDefaultProps",()=>({...oe.createDefaultProps(),stroked:!0,filled:!0,units:p.reactArray(["SquareMeter_SquareKilometer","MU_Hectare","PerimeterMeter_PerimeterKilometer"]),fillStyle:p.reactJson({color:[1,1,1,1],material:"Material'/EarthSDKForUE/M_ES_Material.M_ES_Material'",materialParams:{Opacity:.4},ground:!0}),strokeStyle:p.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),g(vs,"type",vs.register("ESAreaMeasurement",vs,{chsName:"面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"面积测量"}));let cd=vs;const ru=class ru extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"general",more:[...t.more,new vt([],"czm"),new Ou([this,"image"],"图片"),new gr([this,"translation"],"偏移")]}}};g(ru,"createDefaultProps",()=>({...dt.createDefaultProps(),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",translation:p.reactArray([0,0,0])})),g(ru,"type",ru.register("ESBlastParticleSystem",ru,{chsName:"粒子爆炸",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子爆炸"}));let fd=ru;const mi=class mi extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new tt([this,"reverse"],"反转",mi.defaults.reverse),new gr([this,"size"],"尺寸",mi.defaults.size),new Gt([this,"edgeColor"],"边框颜色",mi.defaults.edgeColor),new R([this,"edgeWidth"],"边框宽度",mi.defaults.edgeWidth),new Et([this,"targetID"],"瓦片图层",mi.defaults.targetID)]}}};g(mi,"createDefaultProps",()=>({...dt.createDefaultProps(),reverse:!1,edgeColor:p.reactArray([1,1,1,1]),edgeWidth:2,size:p.reactArray([10,10,10]),targetID:""})),g(mi,"type",mi.register("ESBoxClipping",mi,{chsName:"体剖切",tags:["ESObjects","_ES_Impl_Cesium"],description:"体剖切,体裁剪,体裁切,盒裁切"}));let dd=mi;const Ul=class Ul extends dt{constructor(){super(...arguments);g(this,"_thumbnail",this.dv(p.react("")));g(this,"_duration",this.dv(p.react(1)));g(this,"_resetWithCurrentCameraEvent",this.dv(new H));g(this,"_captureEvent",this.dv(new H))}get thumbnail(){return this._thumbnail.value}set thumbnail(e){this._thumbnail.value=e}get thumbnailChanged(){return this._thumbnail.changed}get duration(){return this._duration.value}set duration(e){this._duration.value=e}get durationChanged(){return this._duration.changed}flyIn(e=1,r="default"){this.flyInEvent.emit(e,-1,r)}get resetWithCurrentCameraEvent(){return this._resetWithCurrentCameraEvent}resetWithCurrentCamera(){this._resetWithCurrentCameraEvent.emit()}get captureEvent(){return this._captureEvent}capture(e,r){this._captureEvent.emit(e,r)}execOnCreating(){this.resetWithCurrentCamera()}async initByCurrent(){this.resetWithCurrentCamera()}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"ESCameraView"),new mt([],()=>this.resetWithCurrentCamera(),[],"设置为当前视角"),new mt(["number","number"],(r,i)=>this.capture(r,i),[64,64],"获取缩略图"),new Et([this,"thumbnail"],"缩略图","",!0),new R([this,"duration"],"飞行时间",1,!0)]}}};g(Ul,"type",Ul.register("ESCameraView",Ul,{chsName:"视角",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角"}));let Kh=Ul;class Zh extends st{constructor(e,r,i){super();g(this,"_view",this.dv(new Kh));if(this.d(e.components.disposableAdd(this._view)),this._view.name=(i==null?void 0:i.name)??`视角${e.views.length+1}`,r){const a=this._view,u=r;a.duration=u.duration??1,a.position=u.position,a.rotation=u.rotation??[0,0,0],a.thumbnail=u.thumbnail??"",a.name=u.name}else{const a=(i==null?void 0:i.size)??[64,64];this.d(p.nextAnimateFrame(()=>{this._view.resetWithCurrentCamera(),this._view.capture(a[0],a[1])}))}const s=this._view,o=this.dv(p.createNextAnimateFrameEvent(s.durationChanged,s.positionChanged,s.rotationChanged,s.thumbnailChanged,s.nameChanged));this.d(o.don(()=>e.emitViewsWarpper()))}get view(){return this._view}get viewInfo(){const e=this._view;return{duration:e.duration,position:e.position,rotation:e.rotation,thumbnail:e.thumbnail,name:e.name}}}const Xn=class Xn extends ft{constructor(e){super(e);g(this,"_currentViewIndex",this.dv(p.react(-1)));g(this,"_viewWrappers",this.dv(new p.ObservableArray));g(this,"_currentViewWrapper",this.dv(p.react(void 0)));g(this,"_container",this.dv(p.react(void 0)));this.initProcessing();{const r=()=>{if(!this._currentViewWrapper.value)return;this._viewWrappers.indexOf(this._currentViewWrapper.value)===-1&&(this._currentViewWrapper.value=void 0)};r(),this.d(this._viewWrappers.changedEvent.don(r))}{const r=()=>{const i=this._currentViewWrapper.value;this._currentViewIndex.value=i?this._getIndex(i):-1};r(),this.d(this._viewWrappers.changedEvent.don(r)),this.d(this._currentViewWrapper.changed.don(r))}this.d(()=>{this.clearAllViews()})}get json(){return{...this._innerGetJson(),views:this.views}}set json(e){this._innerSetJson(e),this.views=e.views}get currentViewIndex(){return this._currentViewIndex.value}get currentViewIndexChanged(){return this._currentViewIndex.changed}emitViewsWarpper(){this._viewWrappers.changedEvent.emit(this._viewWrappers)}get container(){return this._container.value}get containerChanged(){return this._container.changed}set container(e){this._container.value=e}get views(){return Pm(this._viewWrappers,e=>e.viewInfo)}get viewsChanged(){return this._viewWrappers.changedEvent}set views(e){if(e.length===this._viewWrappers.length){const r=this._viewWrappers;if(e.every((i,s)=>{const o=r.get(s).view;return i.duration===o.duration&&sd(i.position,o.position)&&sd(i.rotation,o.rotation)&&i.thumbnail===o.thumbnail&&i.name===o.name}))return}this.clearAllViews();for(let r of e)this._viewWrappers.push(new Zh(this,r))}_getIndex(e){return this._viewWrappers.indexOf(e)}clearAllViews(){for(let e of this._viewWrappers)e.destroy();this._viewWrappers.length=0}add(e=`视角${this.views.length+1}`,r=[64,64]){this._viewWrappers.push(new Zh(this,void 0,{name:e,size:r}))}update(e,r,i=[64,64]){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const s=this._viewWrappers.get(e);return r&&(s.view.name=r),s.view.resetWithCurrentCamera(),s.view.capture(i[0],i[1]),!0}addView(){this._viewWrappers.push(new Zh(this))}insertView(e){if(this._viewWrappers.length+1<=e||e<0){console.error("this._views.length <= index || index < 0");return}this._viewWrappers.splice(e,0,new Zh(this))}setCurrentView(e){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const r=this._viewWrappers.get(e);return this._currentViewWrapper.value=r,!0}resetView(e){if(e>=this._viewWrappers.length||e<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const r=this._viewWrappers.get(e);r.view.resetWithCurrentCamera(),r.view.capture()}resetViewName(e,r){if(e>=this._viewWrappers.length||e<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const i=this._viewWrappers.get(e);i.view.name=r}updateView(e,r){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const i=this._viewWrappers.get(e);return i.view.position=r.position,i.view.rotation=r.rotation??[0,0,0],i.view.duration=r.duration??1,i.view.thumbnail=r.thumbnail??"",i.view.name=r.name??"",!0}flyToView(e){if(this.setCurrentView(e)){if(!this._currentViewWrapper.value)throw new Error("this._currentViewWrapper.value");const r=this._currentViewWrapper.value.view.duration;this._currentViewWrapper.value.view.flyIn(r,this.flyMode??Xn.defaults.flyMode)}}flyToPrevView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const r=this._getIndex(e);return this.loop??Xn.defaults.loop?(this.flyToView((this._viewWrappers.length+r-1)%this._viewWrappers.length),!0):r-1<0?!1:(this.flyToView(r-1),!0)}moveToPreView(){const e=this._currentViewWrapper.value;if(!e)return;const r=this._getIndex(e);if(r===0)return;const i=this._viewWrappers.splice(r-1,1,e)[0];this._viewWrappers.set(r,i)}moveToNextView(){const e=this._currentViewWrapper.value;if(!e)return;const r=this._getIndex(e);if(r===this._viewWrappers.length-1)return;const i=this._viewWrappers.splice(r+1,1,e)[0];this._viewWrappers.set(r,i)}flyToNextView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const r=this._getIndex(e);return this.loop??Xn.defaults.loop?(this.flyToView((r+1)%this._viewWrappers.length),!0):r+1>this._viewWrappers.length-1?!1:(this.flyToView(r+1),!0)}stop(){this._currentViewWrapper.value=void 0,this.playing=!1}deleteView(e){if(e<0||e>=this._viewWrappers.length){console.warn("index < 0 || index >= this._viewWrappers.length");return}this._viewWrappers.get(e).destroy(),this._viewWrappers.splice(e,1)}deleteCurrentView(){const e=this._currentViewWrapper.value;if(!e){console.warn("!this._currentViewWrapper.value");return}const r=this._getIndex(e);if(r===-1){console.warn("index === -1");return}this.deleteView(r)}transitionImageUrl(e){return ft.context.getStrFromEnv(e)}_flyStep(e){var o;if(!this.flyToNextView())return this.playing=!1,Promise.resolve();const r=this.intervalTime??Xn.defaults.intervalTime,s=((((o=this._currentViewWrapper.value)==null?void 0:o.viewInfo.duration)??0)+r)*1e3;return e.promise(p.sleep(s)).then(()=>this._flyStep(e))}initProcessing(){const e=this.dv(p.createProcessingFromAsyncFunc(async i=>this._flyStep(i))),r=()=>{this.playing?e.restart():e.cancel()};r(),this.d(this.playingChanged.don(r))}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new Tt([this,"flyMode"],[["默认","default"],["直线飞行","uniform"]],"飞行模式",Xn.defaults.flyMode),new mt([],()=>this.addView(),[],"添加视角"),new mt(["number"],r=>this.insertView(r),[0],"插入视角"),new mt([],()=>this.clearAllViews(),[],"清空所有视角"),new mt([],()=>this.insertView(this.currentViewIndex+1),[],"当前位置插入视角"),new mt([],()=>this.flyToPrevView(),[],"上一个视角"),new mt([],()=>this.flyToNextView(),[],"下一个视角"),new mt([],()=>this.moveToPreView(),[],"当前视角移动到上一个视角"),new mt([],()=>this.moveToNextView(),[],"当前视角移动到下一个视角"),new mt(["number"],r=>this.flyToView(r),[0],"飞入指定视角"),new mt(["number"],r=>this.setCurrentView(r),[0],"设置当前视角"),new mt([],()=>this.deleteCurrentView(),[],"删除当前视角"),new mt(["number"],r=>this.deleteView(r),[0],"删除指定视角"),new mt(["number"],r=>this.resetView(r),[0],"重置视角"),new R([this,"currentViewIndex"],"当前序号",-1,!1,!0),new Kg([this,"playing"],()=>this.stop(),[this,"loop"],"播放",Xn.defaults),new tt([this,"playing"],"是否播放"),new mt([],()=>this.stop(),[],"停止"),new tt([this,"loop"],"是否循环"),new R([this,"intervalTime"],"间隔时间"),new ht([this,"views"],"视角集合",[],void 0,!0)]}}};g(Xn,"createDefaultProps",()=>({...ft.createDefaultProps(),playing:!1,loop:!0,intervalTime:5,flyMode:"default"})),g(Xn,"type",Xn.register("ESCameraViewCollection",Xn,{chsName:"视角集合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角集合"}));let tc=Xn;const nu=class nu extends dt{constructor(e){super(e);g(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new R([this,"aspectRatio"],"宽高比",1.77778),new R([this,"fov"],"横向夹角",90),new R([this,"far"],"视野长度",100),new R([this,"near"],"近面距离",5)]}}};g(nu,"createDefaultProps",()=>({...dt.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,collision:!1})),g(nu,"type",nu.register("ESCameraVisibleRange",nu,{chsName:"摄像头可视域",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"摄像头可视域"}));let gd=nu;const iu=class iu extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Tt([this,"mode"],[["警车","policeCar"]],"模式","policeCar")]}}};g(iu,"createDefaultProps",()=>({...dt.createDefaultProps(),mode:"policeCar",allowPicking:!0})),g(iu,"type",iu.register("ESCar",iu,{chsName:"车辆",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警车等基础车辆模型"}));let ec=iu;const ko=class ko extends Rt{constructor(e){super(e);g(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new R([this,"height"],"高度",10)],coordinate:[...e.coordinate,new R([this,"area"],"面积",0,!1,!0),new R([this,"perimeter"],"周长",0,!1,!0)]}}};g(ko,"createDefaultProps",()=>({...Rt.createDefaultProps(),height:10,filled:!0,fillStyle:p.reactJson({material:"",materialParams:{},ground:!0,color:[1,1,1,1]})})),g(ko,"type",ko.register("ESClassification",ko,{chsName:"倾斜单体化",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"平尾箭头"})),g(ko,"supportEditingModes",[...Rt.supportEditingModes,ct.CircularAppend,ct.CircularInsert,ct.HeightModify]);let rc=ko;const su=class su extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new tt([this,"showArrow"],"显示箭头",!0),new Gt([this,"edgeColor"],"线框颜色",[1,1,1,1]),new R([this,"edgetWidth"],"线框宽度",2),new R([this,"width"],"裁剪宽度",200),new R([this,"height"],"裁剪高度",200),new Et([this,"targetID"],"瓦片图层","")]}}};g(su,"createDefaultProps",()=>({...dt.createDefaultProps(),showArrow:!0,edgeColor:p.reactArray([1,1,1,1]),edgetWidth:2,width:200,height:200,targetID:""})),g(su,"type",su.register("ESClippingPlane",su,{chsName:"裁切",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESClippingPlane"}));let pd=su;class A2 extends st{constructor(t,e,r){super();const i=document.createElement("div");i.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${r.id}) container`);{const u=()=>{const c=` ${e.cssText}
68
+ `)}return t.toString()},Be.prototype.computeEdgeEndLabels=function(t){for(var e=this.iterator();e.hasNext();){var r=e.next();r.computeLabel(t)}},Be.prototype.computeLabelling=function(t){var e=this;this.computeEdgeEndLabels(t[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var r=[!1,!1],i=this.iterator();i.hasNext();)for(var s=i.next(),o=s.getLabel(),a=0;a<2;a++)o.isLine(a)&&o.getLocation(a)===F.BOUNDARY&&(r[a]=!0);for(var u=this.iterator();u.hasNext();)for(var l=u.next(),c=l.getLabel(),h=0;h<2;h++)if(c.isAnyNull(h)){var f=F.NONE;if(r[h])f=F.EXTERIOR;else{var d=l.getCoordinate();f=e.getLocation(h,d,t)}c.setAllLocationsIfNull(h,f)}},Be.prototype.getDegree=function(){return this._edgeMap.size()},Be.prototype.insertEdgeEnd=function(t,e){this._edgeMap.put(t,e),this._edgeList=null},Be.prototype.interfaces_=function(){return[]},Be.prototype.getClass=function(){return Be};var SI=function(n){function t(){n.call(this),this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.linkResultDirectedEdges=function(){var r=this;this.getResultAreaEdges();for(var i=null,s=null,o=this._SCANNING_FOR_INCOMING,a=0;a<this._resultAreaEdgeList.size();a++){var u=r._resultAreaEdgeList.get(a),l=u.getSym();if(u.getLabel().isArea())switch(i===null&&u.isInResult()&&(i=u),o){case r._SCANNING_FOR_INCOMING:if(!l.isInResult())continue;s=l,o=r._LINKING_TO_OUTGOING;break;case r._LINKING_TO_OUTGOING:if(!u.isInResult())continue;s.setNext(u),o=r._SCANNING_FOR_INCOMING;break}}if(o===this._LINKING_TO_OUTGOING){if(i===null)throw new Ri("no outgoing dirEdge found",this.getCoordinate());Pt.isTrue(i.isInResult(),"unable to link last incoming dirEdge"),s.setNext(i)}},t.prototype.insert=function(r){var i=r;this.insertEdgeEnd(i,i)},t.prototype.getRightmostEdge=function(){var r=this.getEdges(),i=r.size();if(i<1)return null;var s=r.get(0);if(i===1)return s;var o=r.get(i-1),a=s.getQuadrant(),u=o.getQuadrant();return Jt.isNorthern(a)&&Jt.isNorthern(u)?s:!Jt.isNorthern(a)&&!Jt.isNorthern(u)?o:s.getDy()!==0?s:o.getDy()!==0?o:(Pt.shouldNeverReachHere("found two horizontal edges incident on node"),null)},t.prototype.print=function(r){Le.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var i=this.iterator();i.hasNext();){var s=i.next();r.print("out "),s.print(r),r.println(),r.print("in "),s.getSym().print(r),r.println()}},t.prototype.getResultAreaEdges=function(){var r=this;if(this._resultAreaEdgeList!==null)return this._resultAreaEdgeList;this._resultAreaEdgeList=new j;for(var i=this.iterator();i.hasNext();){var s=i.next();(s.isInResult()||s.getSym().isInResult())&&r._resultAreaEdgeList.add(s)}return this._resultAreaEdgeList},t.prototype.updateLabelling=function(r){for(var i=this.iterator();i.hasNext();){var s=i.next(),o=s.getLabel();o.setAllLocationsIfNull(0,r.getLocation(0)),o.setAllLocationsIfNull(1,r.getLocation(1))}},t.prototype.linkAllDirectedEdges=function(){var r=this;this.getEdges();for(var i=null,s=null,o=this._edgeList.size()-1;o>=0;o--){var a=r._edgeList.get(o),u=a.getSym();s===null&&(s=u),i!==null&&u.setNext(i),i=a}s.setNext(i)},t.prototype.computeDepths=function(){var r=this;if(arguments.length===1){var i=arguments[0],s=this.findIndex(i),o=i.getDepth(B.LEFT),a=i.getDepth(B.RIGHT),u=this.computeDepths(s+1,this._edgeList.size(),o),l=this.computeDepths(0,s,u);if(l!==a)throw new Ri("depth mismatch at "+i.getCoordinate())}else if(arguments.length===3){for(var c=arguments[0],h=arguments[1],f=arguments[2],d=f,v=c;v<h;v++){var _=r._edgeList.get(v);_.setEdgeDepths(B.RIGHT,d),d=_.getDepth(B.LEFT)}return d}},t.prototype.mergeSymLabels=function(){for(var r=this.iterator();r.hasNext();){var i=r.next(),s=i.getLabel();s.merge(i.getSym().getLabel())}},t.prototype.linkMinimalDirectedEdges=function(r){for(var i=this,s=null,o=null,a=this._SCANNING_FOR_INCOMING,u=this._resultAreaEdgeList.size()-1;u>=0;u--){var l=i._resultAreaEdgeList.get(u),c=l.getSym();switch(s===null&&l.getEdgeRing()===r&&(s=l),a){case i._SCANNING_FOR_INCOMING:if(c.getEdgeRing()!==r)continue;o=c,a=i._LINKING_TO_OUTGOING;break;case i._LINKING_TO_OUTGOING:if(l.getEdgeRing()!==r)continue;o.setNextMin(l),a=i._SCANNING_FOR_INCOMING;break}}a===this._LINKING_TO_OUTGOING&&(Pt.isTrue(s!==null,"found null for first outgoing dirEdge"),Pt.isTrue(s.getEdgeRing()===r,"unable to link last incoming dirEdge"),o.setNextMin(s))},t.prototype.getOutgoingDegree=function(){if(arguments.length===0){for(var r=0,i=this.iterator();i.hasNext();){var s=i.next();s.isInResult()&&r++}return r}else if(arguments.length===1){for(var o=arguments[0],a=0,u=this.iterator();u.hasNext();){var l=u.next();l.getEdgeRing()===o&&a++}return a}},t.prototype.getLabel=function(){return this._label},t.prototype.findCoveredLineEdges=function(){for(var r=F.NONE,i=this.iterator();i.hasNext();){var s=i.next(),o=s.getSym();if(!s.isLineEdge()){if(s.isInResult()){r=F.INTERIOR;break}if(o.isInResult()){r=F.EXTERIOR;break}}}if(r===F.NONE)return null;for(var a=r,u=this.iterator();u.hasNext();){var l=u.next(),c=l.getSym();l.isLineEdge()?l.getEdge().setCovered(a===F.INTERIOR):(l.isInResult()&&(a=F.EXTERIOR),c.isInResult()&&(a=F.INTERIOR))}},t.prototype.computeLabelling=function(r){var i=this;n.prototype.computeLabelling.call(this,r),this._label=new Yt(F.NONE);for(var s=this.iterator();s.hasNext();)for(var o=s.next(),a=o.getEdge(),u=a.getLabel(),l=0;l<2;l++){var c=u.getLocation(l);(c===F.INTERIOR||c===F.BOUNDARY)&&i._label.setLocation(l,F.INTERIOR)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Be),Cv=function(n){function t(){n.apply(this,arguments)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.createNode=function(r){return new Dh(r,new SI)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Ta),os=function n(){this._pts=null,this._orientation=null;var t=arguments[0];this._pts=t,this._orientation=n.orientation(t)};os.prototype.compareTo=function(t){var e=t,r=os.compareOriented(this._pts,this._orientation,e._pts,e._orientation);return r},os.prototype.interfaces_=function(){return[Yr]},os.prototype.getClass=function(){return os},os.orientation=function(t){return Nt.increasingDirection(t)===1},os.compareOriented=function(t,e,r,i){for(var s=e?1:-1,o=i?1:-1,a=e?t.length:-1,u=i?r.length:-1,l=e?0:t.length-1,c=i?0:r.length-1;;){var h=t[l].compareTo(r[c]);if(h!==0)return h;l+=s,c+=o;var f=l===a,d=c===u;if(f&&!d)return-1;if(!f&&d)return 1;if(f&&d)return 0}};var pn=function(){this._edges=new j,this._ocaMap=new He};pn.prototype.print=function(t){var e=this;t.print("MULTILINESTRING ( ");for(var r=0;r<this._edges.size();r++){var i=e._edges.get(r);r>0&&t.print(","),t.print("(");for(var s=i.getCoordinates(),o=0;o<s.length;o++)o>0&&t.print(","),t.print(s[o].x+" "+s[o].y);t.println(")")}t.print(") ")},pn.prototype.addAll=function(t){for(var e=this,r=t.iterator();r.hasNext();)e.add(r.next())},pn.prototype.findEdgeIndex=function(t){for(var e=this,r=0;r<this._edges.size();r++)if(e._edges.get(r).equals(t))return r;return-1},pn.prototype.iterator=function(){return this._edges.iterator()},pn.prototype.getEdges=function(){return this._edges},pn.prototype.get=function(t){return this._edges.get(t)},pn.prototype.findEqualEdge=function(t){var e=new os(t.getCoordinates()),r=this._ocaMap.get(e);return r},pn.prototype.add=function(t){this._edges.add(t);var e=new os(t.getCoordinates());this._ocaMap.put(e,t)},pn.prototype.interfaces_=function(){return[]},pn.prototype.getClass=function(){return pn};var Vs=function(){};Vs.prototype.processIntersections=function(t,e,r,i){},Vs.prototype.isDone=function(){},Vs.prototype.interfaces_=function(){return[]},Vs.prototype.getClass=function(){return Vs};var kr=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var t=arguments[0];this._li=t};kr.prototype.isTrivialIntersection=function(t,e,r,i){if(t===r&&this._li.getIntersectionNum()===1){if(kr.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var s=t.size()-1;if(e===0&&i===s||i===0&&e===s)return!0}}return!1},kr.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},kr.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},kr.prototype.getLineIntersector=function(){return this._li},kr.prototype.hasProperIntersection=function(){return this._hasProper},kr.prototype.processIntersections=function(t,e,r,i){if(t===r&&e===i)return null;this.numTests++;var s=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=r.getCoordinates()[i],u=r.getCoordinates()[i+1];this._li.computeIntersection(s,o,a,u),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(t,e,r,i)||(this._hasIntersection=!0,t.addIntersections(this._li,e,0),r.addIntersections(this._li,i,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))},kr.prototype.hasIntersection=function(){return this._hasIntersection},kr.prototype.isDone=function(){return!1},kr.prototype.hasInteriorIntersection=function(){return this._hasInterior},kr.prototype.interfaces_=function(){return[Vs]},kr.prototype.getClass=function(){return kr},kr.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var Gn=function(){this.coord=null,this.segmentIndex=null,this.dist=null;var t=arguments[0],e=arguments[1],r=arguments[2];this.coord=new D(t),this.segmentIndex=e,this.dist=r};Gn.prototype.getSegmentIndex=function(){return this.segmentIndex},Gn.prototype.getCoordinate=function(){return this.coord},Gn.prototype.print=function(t){t.print(this.coord),t.print(" seg # = "+this.segmentIndex),t.println(" dist = "+this.dist)},Gn.prototype.compareTo=function(t){var e=t;return this.compare(e.segmentIndex,e.dist)},Gn.prototype.isEndPoint=function(t){return this.segmentIndex===0&&this.dist===0||this.segmentIndex===t},Gn.prototype.toString=function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist},Gn.prototype.getDistance=function(){return this.dist},Gn.prototype.compare=function(t,e){return this.segmentIndex<t?-1:this.segmentIndex>t?1:this.dist<e?-1:this.dist>e?1:0},Gn.prototype.interfaces_=function(){return[Yr]},Gn.prototype.getClass=function(){return Gn};var hi=function(){this._nodeMap=new He,this.edge=null;var t=arguments[0];this.edge=t};hi.prototype.print=function(t){t.println("Intersections:");for(var e=this.iterator();e.hasNext();){var r=e.next();r.print(t)}},hi.prototype.iterator=function(){return this._nodeMap.values().iterator()},hi.prototype.addSplitEdges=function(t){var e=this;this.addEndpoints();for(var r=this.iterator(),i=r.next();r.hasNext();){var s=r.next(),o=e.createSplitEdge(i,s);t.add(o),i=s}},hi.prototype.addEndpoints=function(){var t=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[t],t,0)},hi.prototype.createSplitEdge=function(t,e){var r=this,i=e.segmentIndex-t.segmentIndex+2,s=this.edge.pts[e.segmentIndex],o=e.dist>0||!e.coord.equals2D(s);o||i--;var a=new Array(i).fill(null),u=0;a[u++]=new D(t.coord);for(var l=t.segmentIndex+1;l<=e.segmentIndex;l++)a[u++]=r.edge.pts[l];return o&&(a[u]=e.coord),new Rh(a,new Yt(this.edge._label))},hi.prototype.add=function(t,e,r){var i=new Gn(t,e,r),s=this._nodeMap.get(i);return s!==null?s:(this._nodeMap.put(i,i),i)},hi.prototype.isIntersection=function(t){for(var e=this.iterator();e.hasNext();){var r=e.next();if(r.coord.equals(t))return!0}return!1},hi.prototype.interfaces_=function(){return[]},hi.prototype.getClass=function(){return hi};var Us=function(){};Us.prototype.getChainStartIndices=function(t){var e=this,r=0,i=new j;i.add(new Mn(r));do{var s=e.findChainEnd(t,r);i.add(new Mn(s)),r=s}while(r<t.length-1);var o=Us.toIntArray(i);return o},Us.prototype.findChainEnd=function(t,e){for(var r=Jt.quadrant(t[e],t[e+1]),i=e+1;i<t.length;){var s=Jt.quadrant(t[i-1],t[i]);if(s!==r)break;i++}return i-1},Us.prototype.interfaces_=function(){return[]},Us.prototype.getClass=function(){return Us},Us.toIntArray=function(t){for(var e=new Array(t.size()).fill(null),r=0;r<e.length;r++)e[r]=t.get(r).intValue();return e};var ki=function(){this.e=null,this.pts=null,this.startIndex=null,this.env1=new at,this.env2=new at;var t=arguments[0];this.e=t,this.pts=t.getCoordinates();var e=new Us;this.startIndex=e.getChainStartIndices(this.pts)};ki.prototype.getCoordinates=function(){return this.pts},ki.prototype.getMaxX=function(t){var e=this.pts[this.startIndex[t]].x,r=this.pts[this.startIndex[t+1]].x;return e>r?e:r},ki.prototype.getMinX=function(t){var e=this.pts[this.startIndex[t]].x,r=this.pts[this.startIndex[t+1]].x;return e<r?e:r},ki.prototype.computeIntersectsForChain=function(){if(arguments.length===4){var t=arguments[0],e=arguments[1],r=arguments[2],i=arguments[3];this.computeIntersectsForChain(this.startIndex[t],this.startIndex[t+1],e,e.startIndex[r],e.startIndex[r+1],i)}else if(arguments.length===6){var s=arguments[0],o=arguments[1],a=arguments[2],u=arguments[3],l=arguments[4],c=arguments[5],h=this.pts[s],f=this.pts[o],d=a.pts[u],v=a.pts[l];if(o-s===1&&l-u===1)return c.addIntersections(this.e,s,a.e,u),null;if(this.env1.init(h,f),this.env2.init(d,v),!this.env1.intersects(this.env2))return null;var _=Math.trunc((s+o)/2),E=Math.trunc((u+l)/2);s<_&&(u<E&&this.computeIntersectsForChain(s,_,a,u,E,c),E<l&&this.computeIntersectsForChain(s,_,a,E,l,c)),_<o&&(u<E&&this.computeIntersectsForChain(_,o,a,u,E,c),E<l&&this.computeIntersectsForChain(_,o,a,E,l,c))}},ki.prototype.getStartIndexes=function(){return this.startIndex},ki.prototype.computeIntersects=function(t,e){for(var r=this,i=0;i<this.startIndex.length-1;i++)for(var s=0;s<t.startIndex.length-1;s++)r.computeIntersectsForChain(i,t,s,e)},ki.prototype.interfaces_=function(){return[]},ki.prototype.getClass=function(){return ki};var Re=function n(){var t=this;this._depth=Array(2).fill().map(function(){return Array(3)});for(var e=0;e<2;e++)for(var r=0;r<3;r++)t._depth[e][r]=n.NULL_VALUE},Pv={NULL_VALUE:{configurable:!0}};Re.prototype.getDepth=function(t,e){return this._depth[t][e]},Re.prototype.setDepth=function(t,e,r){this._depth[t][e]=r},Re.prototype.isNull=function(){var t=this;if(arguments.length===0){for(var e=0;e<2;e++)for(var r=0;r<3;r++)if(t._depth[e][r]!==Re.NULL_VALUE)return!1;return!0}else if(arguments.length===1){var i=arguments[0];return this._depth[i][1]===Re.NULL_VALUE}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return this._depth[s][o]===Re.NULL_VALUE}},Re.prototype.normalize=function(){for(var t=this,e=0;e<2;e++)if(!t.isNull(e)){var r=t._depth[e][1];t._depth[e][2]<r&&(r=t._depth[e][2]),r<0&&(r=0);for(var i=1;i<3;i++){var s=0;t._depth[e][i]>r&&(s=1),t._depth[e][i]=s}}},Re.prototype.getDelta=function(t){return this._depth[t][B.RIGHT]-this._depth[t][B.LEFT]},Re.prototype.getLocation=function(t,e){return this._depth[t][e]<=0?F.EXTERIOR:F.INTERIOR},Re.prototype.toString=function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]},Re.prototype.add=function(){var t=this;if(arguments.length===1)for(var e=arguments[0],r=0;r<2;r++)for(var i=1;i<3;i++){var s=e.getLocation(r,i);(s===F.EXTERIOR||s===F.INTERIOR)&&(t.isNull(r,i)?t._depth[r][i]=Re.depthAtLocation(s):t._depth[r][i]+=Re.depthAtLocation(s))}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2];u===F.INTERIOR&&this._depth[o][a]++}},Re.prototype.interfaces_=function(){return[]},Re.prototype.getClass=function(){return Re},Re.depthAtLocation=function(t){return t===F.EXTERIOR?0:t===F.INTERIOR?1:Re.NULL_VALUE},Pv.NULL_VALUE.get=function(){return-1},Object.defineProperties(Re,Pv);var Rh=function(n){function t(){if(n.call(this),this.pts=null,this._env=null,this.eiList=new hi(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new Re,this._depthDelta=0,arguments.length===1){var e=arguments[0];t.call(this,e,null)}else if(arguments.length===2){var r=arguments[0],i=arguments[1];this.pts=r,this._label=i}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.getDepth=function(){return this._depth},t.prototype.getCollapsedEdge=function(){var r=new Array(2).fill(null);r[0]=this.pts[0],r[1]=this.pts[1];var i=new t(r,Yt.toLineLabel(this._label));return i},t.prototype.isIsolated=function(){return this._isIsolated},t.prototype.getCoordinates=function(){return this.pts},t.prototype.setIsolated=function(r){this._isIsolated=r},t.prototype.setName=function(r){this._name=r},t.prototype.equals=function(r){var i=this;if(!(r instanceof t))return!1;var s=r;if(this.pts.length!==s.pts.length)return!1;for(var o=!0,a=!0,u=this.pts.length,l=0;l<this.pts.length;l++)if(i.pts[l].equals2D(s.pts[l])||(o=!1),i.pts[l].equals2D(s.pts[--u])||(a=!1),!o&&!a)return!1;return!0},t.prototype.getCoordinate=function(){if(arguments.length===0)return this.pts.length>0?this.pts[0]:null;if(arguments.length===1){var r=arguments[0];return this.pts[r]}},t.prototype.print=function(r){var i=this;r.print("edge "+this._name+": "),r.print("LINESTRING (");for(var s=0;s<this.pts.length;s++)s>0&&r.print(","),r.print(i.pts[s].x+" "+i.pts[s].y);r.print(") "+this._label+" "+this._depthDelta)},t.prototype.computeIM=function(r){t.updateIM(this._label,r)},t.prototype.isCollapsed=function(){return!this._label.isArea()||this.pts.length!==3?!1:!!this.pts[0].equals(this.pts[2])},t.prototype.isClosed=function(){return this.pts[0].equals(this.pts[this.pts.length-1])},t.prototype.getMaximumSegmentIndex=function(){return this.pts.length-1},t.prototype.getDepthDelta=function(){return this._depthDelta},t.prototype.getNumPoints=function(){return this.pts.length},t.prototype.printReverse=function(r){var i=this;r.print("edge "+this._name+": ");for(var s=this.pts.length-1;s>=0;s--)r.print(i.pts[s]+" ");r.println("")},t.prototype.getMonotoneChainEdge=function(){return this._mce===null&&(this._mce=new ki(this)),this._mce},t.prototype.getEnvelope=function(){var r=this;if(this._env===null){this._env=new at;for(var i=0;i<this.pts.length;i++)r._env.expandToInclude(r.pts[i])}return this._env},t.prototype.addIntersection=function(r,i,s,o){var a=new D(r.getIntersection(o)),u=i,l=r.getEdgeDistance(s,o),c=u+1;if(c<this.pts.length){var h=this.pts[c];a.equals2D(h)&&(u=c,l=0)}this.eiList.add(a,u,l)},t.prototype.toString=function(){var r=this,i=new In;i.append("edge "+this._name+": "),i.append("LINESTRING (");for(var s=0;s<this.pts.length;s++)s>0&&i.append(","),i.append(r.pts[s].x+" "+r.pts[s].y);return i.append(") "+this._label+" "+this._depthDelta),i.toString()},t.prototype.isPointwiseEqual=function(r){var i=this;if(this.pts.length!==r.pts.length)return!1;for(var s=0;s<this.pts.length;s++)if(!i.pts[s].equals2D(r.pts[s]))return!1;return!0},t.prototype.setDepthDelta=function(r){this._depthDelta=r},t.prototype.getEdgeIntersectionList=function(){return this.eiList},t.prototype.addIntersections=function(r,i,s){for(var o=this,a=0;a<r.getIntersectionNum();a++)o.addIntersection(r,i,s,a)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.updateIM=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];i.setAtLeastIfValid(r.getLocation(0,B.ON),r.getLocation(1,B.ON),1),r.isArea()&&(i.setAtLeastIfValid(r.getLocation(0,B.LEFT),r.getLocation(1,B.LEFT),2),i.setAtLeastIfValid(r.getLocation(0,B.RIGHT),r.getLocation(1,B.RIGHT),2))}else return n.prototype.updateIM.apply(this,arguments)},t}(Rr),Ze=function(t){this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new pn,this._bufParams=t||null};Ze.prototype.setWorkingPrecisionModel=function(t){this._workingPrecisionModel=t},Ze.prototype.insertUniqueEdge=function(t){var e=this._edgeList.findEqualEdge(t);if(e!==null){var r=e.getLabel(),i=t.getLabel();e.isPointwiseEqual(t)||(i=new Yt(t.getLabel()),i.flip()),r.merge(i);var s=Ze.depthDelta(i),o=e.getDepthDelta(),a=o+s;e.setDepthDelta(a)}else this._edgeList.add(t),t.setDepthDelta(Ze.depthDelta(t.getLabel()))},Ze.prototype.buildSubgraphs=function(t,e){for(var r=new j,i=t.iterator();i.hasNext();){var s=i.next(),o=s.getRightmostCoordinate(),a=new Po(r),u=a.getDepth(o);s.computeDepth(u),s.findResultEdges(),r.add(s),e.add(s.getDirectedEdges(),s.getNodes())}},Ze.prototype.createSubgraphs=function(t){for(var e=new j,r=t.getNodes().iterator();r.hasNext();){var i=r.next();if(!i.isVisited()){var s=new $e;s.create(i),e.add(s)}}return gn.sort(e,gn.reverseOrder()),e},Ze.prototype.createEmptyResultGeometry=function(){var t=this._geomFact.createPolygon();return t},Ze.prototype.getNoder=function(t){if(this._workingNoder!==null)return this._workingNoder;var e=new Gf,r=new Ds;return r.setPrecisionModel(t),e.setSegmentIntersector(new kr(r)),e},Ze.prototype.buffer=function(t,e){var r=this._workingPrecisionModel;r===null&&(r=t.getPrecisionModel()),this._geomFact=t.getFactory();var i=new lr(r,this._bufParams),s=new Zr(t,e,i),o=s.getCurves();if(o.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(o,r),this._graph=new he(new Cv),this._graph.addEdges(this._edgeList.getEdges());var a=this.createSubgraphs(this._graph),u=new wr(this._geomFact);this.buildSubgraphs(a,u);var l=u.getPolygons();if(l.size()<=0)return this.createEmptyResultGeometry();var c=this._geomFact.buildGeometry(l);return c},Ze.prototype.computeNodedEdges=function(t,e){var r=this,i=this.getNoder(e);i.computeNodes(t);for(var s=i.getNodedSubstrings(),o=s.iterator();o.hasNext();){var a=o.next(),u=a.getCoordinates();if(!(u.length===2&&u[0].equals2D(u[1]))){var l=a.getData(),c=new Rh(a.getCoordinates(),new Yt(l));r.insertUniqueEdge(c)}}},Ze.prototype.setNoder=function(t){this._workingNoder=t},Ze.prototype.interfaces_=function(){return[]},Ze.prototype.getClass=function(){return Ze},Ze.depthDelta=function(t){var e=t.getLocation(0,B.LEFT),r=t.getLocation(0,B.RIGHT);return e===F.INTERIOR&&r===F.EXTERIOR?1:e===F.EXTERIOR&&r===F.INTERIOR?-1:0},Ze.convertSegStrings=function(t){for(var e=new xt,r=new j;t.hasNext();){var i=t.next(),s=e.createLineString(i.getCoordinates());r.add(s)}return e.buildGeometry(r)};var as=function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,arguments.length===2){var t=arguments[0],e=arguments[1];this._noder=t,this._scaleFactor=e,this._offsetX=0,this._offsetY=0,this._isScaled=!this.isIntegerPrecision()}else if(arguments.length===4){var r=arguments[0],i=arguments[1],s=arguments[2],o=arguments[3];this._noder=r,this._scaleFactor=i,this._offsetX=s,this._offsetY=o,this._isScaled=!this.isIntegerPrecision()}};as.prototype.rescale=function(){var t=this;if(pt(arguments[0],Pe))for(var e=arguments[0],r=e.iterator();r.hasNext();){var i=r.next();t.rescale(i.getCoordinates())}else if(arguments[0]instanceof Array){for(var s=arguments[0],o=0;o<s.length;o++)s[o].x=s[o].x/t._scaleFactor+t._offsetX,s[o].y=s[o].y/t._scaleFactor+t._offsetY;s.length===2&&s[0].equals2D(s[1])&&Le.out.println(s)}},as.prototype.scale=function(){var t=this;if(pt(arguments[0],Pe)){for(var e=arguments[0],r=new j,i=e.iterator();i.hasNext();){var s=i.next();r.add(new ve(t.scale(s.getCoordinates()),s.getData()))}return r}else if(arguments[0]instanceof Array){for(var o=arguments[0],a=new Array(o.length).fill(null),u=0;u<o.length;u++)a[u]=new D(Math.round((o[u].x-t._offsetX)*t._scaleFactor),Math.round((o[u].y-t._offsetY)*t._scaleFactor),o[u].z);var l=Nt.removeRepeatedPoints(a);return l}},as.prototype.isIntegerPrecision=function(){return this._scaleFactor===1},as.prototype.getNodedSubstrings=function(){var t=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(t),t},as.prototype.computeNodes=function(t){var e=t;this._isScaled&&(e=this.scale(t)),this._noder.computeNodes(e)},as.prototype.interfaces_=function(){return[Gs]},as.prototype.getClass=function(){return as};var kn=function(){this._li=new Ds,this._segStrings=null;var t=arguments[0];this._segStrings=t},Iv={fact:{configurable:!0}};kn.prototype.checkEndPtVertexIntersections=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();){var r=e.next(),i=r.getCoordinates();t.checkEndPtVertexIntersections(i[0],t._segStrings),t.checkEndPtVertexIntersections(i[i.length-1],t._segStrings)}else if(arguments.length===2){for(var s=arguments[0],o=arguments[1],a=o.iterator();a.hasNext();)for(var u=a.next(),l=u.getCoordinates(),c=1;c<l.length-1;c++)if(l[c].equals(s))throw new xi("found endpt/interior pt intersection at index "+c+" :pt "+s)}},kn.prototype.checkInteriorIntersections=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();)for(var r=e.next(),i=this._segStrings.iterator();i.hasNext();){var s=i.next();t.checkInteriorIntersections(r,s)}else if(arguments.length===2)for(var o=arguments[0],a=arguments[1],u=o.getCoordinates(),l=a.getCoordinates(),c=0;c<u.length-1;c++)for(var h=0;h<l.length-1;h++)t.checkInteriorIntersections(o,c,a,h);else if(arguments.length===4){var f=arguments[0],d=arguments[1],v=arguments[2],_=arguments[3];if(f===v&&d===_)return null;var E=f.getCoordinates()[d],P=f.getCoordinates()[d+1],y=v.getCoordinates()[_],w=v.getCoordinates()[_+1];if(this._li.computeIntersection(E,P,y,w),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,E,P)||this.hasInteriorIntersection(this._li,y,w)))throw new xi("found non-noded intersection at "+E+"-"+P+" and "+y+"-"+w)}},kn.prototype.checkValid=function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()},kn.prototype.checkCollapses=function(){var t=this;if(arguments.length===0)for(var e=this._segStrings.iterator();e.hasNext();){var r=e.next();t.checkCollapses(r)}else if(arguments.length===1)for(var i=arguments[0],s=i.getCoordinates(),o=0;o<s.length-2;o++)t.checkCollapse(s[o],s[o+1],s[o+2])},kn.prototype.hasInteriorIntersection=function(t,e,r){for(var i=0;i<t.getIntersectionNum();i++){var s=t.getIntersection(i);if(!(s.equals(e)||s.equals(r)))return!0}return!1},kn.prototype.checkCollapse=function(t,e,r){if(t.equals(r))throw new xi("found non-noded collapse at "+kn.fact.createLineString([t,e,r]))},kn.prototype.interfaces_=function(){return[]},kn.prototype.getClass=function(){return kn},Iv.fact.get=function(){return new xt},Object.defineProperties(kn,Iv);var hr=function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var t=arguments[0],e=arguments[1],r=arguments[2];if(this._originalPt=t,this._pt=t,this._scaleFactor=e,this._li=r,e<=0)throw new ae("Scale factor must be non-zero");e!==1&&(this._pt=new D(this.scale(t.x),this.scale(t.y)),this._p0Scaled=new D,this._p1Scaled=new D),this.initCorners(this._pt)},Mv={SAFE_ENV_EXPANSION_FACTOR:{configurable:!0}};hr.prototype.intersectsScaled=function(t,e){var r=Math.min(t.x,e.x),i=Math.max(t.x,e.x),s=Math.min(t.y,e.y),o=Math.max(t.y,e.y),a=this._maxx<r||this._minx>i||this._maxy<s||this._miny>o;if(a)return!1;var u=this.intersectsToleranceSquare(t,e);return Pt.isTrue(!(a&&u),"Found bad envelope test"),u},hr.prototype.initCorners=function(t){var e=.5;this._minx=t.x-e,this._maxx=t.x+e,this._miny=t.y-e,this._maxy=t.y+e,this._corner[0]=new D(this._maxx,this._maxy),this._corner[1]=new D(this._minx,this._maxy),this._corner[2]=new D(this._minx,this._miny),this._corner[3]=new D(this._maxx,this._miny)},hr.prototype.intersects=function(t,e){return this._scaleFactor===1?this.intersectsScaled(t,e):(this.copyScaled(t,this._p0Scaled),this.copyScaled(e,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))},hr.prototype.scale=function(t){return Math.round(t*this._scaleFactor)},hr.prototype.getCoordinate=function(){return this._originalPt},hr.prototype.copyScaled=function(t,e){e.x=this.scale(t.x),e.y=this.scale(t.y)},hr.prototype.getSafeEnvelope=function(){if(this._safeEnv===null){var t=hr.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new at(this._originalPt.x-t,this._originalPt.x+t,this._originalPt.y-t,this._originalPt.y+t)}return this._safeEnv},hr.prototype.intersectsPixelClosure=function(t,e){return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.hasIntersection()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.hasIntersection())||(this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.hasIntersection()))},hr.prototype.intersectsToleranceSquare=function(t,e){var r=!1,i=!1;return this._li.computeIntersection(t,e,this._corner[0],this._corner[1]),!!(this._li.isProper()||(this._li.computeIntersection(t,e,this._corner[1],this._corner[2]),this._li.isProper())||(this._li.hasIntersection()&&(r=!0),this._li.computeIntersection(t,e,this._corner[2],this._corner[3]),this._li.isProper())||(this._li.hasIntersection()&&(i=!0),this._li.computeIntersection(t,e,this._corner[3],this._corner[0]),this._li.isProper())||r&&i||t.equals(this._pt)||e.equals(this._pt))},hr.prototype.addSnappedNode=function(t,e){var r=t.getCoordinate(e),i=t.getCoordinate(e+1);return this.intersects(r,i)?(t.addIntersection(this.getCoordinate(),e),!0):!1},hr.prototype.interfaces_=function(){return[]},hr.prototype.getClass=function(){return hr},Mv.SAFE_ENV_EXPANSION_FACTOR.get=function(){return .75},Object.defineProperties(hr,Mv);var Sl=function(){this.tempEnv1=new at,this.selectedSegment=new ut};Sl.prototype.select=function(){if(arguments.length!==1){if(arguments.length===2){var t=arguments[0],e=arguments[1];t.getLineSegment(e,this.selectedSegment),this.select(this.selectedSegment)}}},Sl.prototype.interfaces_=function(){return[]},Sl.prototype.getClass=function(){return Sl};var La=function(){this._index=null;var t=arguments[0];this._index=t},bv={HotPixelSnapAction:{configurable:!0}};La.prototype.snap=function(){if(arguments.length===1){var t=arguments[0];return this.snap(t,null,-1)}else if(arguments.length===3){var e=arguments[0],r=arguments[1],i=arguments[2],s=e.getSafeEnvelope(),o=new Nv(e,r,i);return this._index.query(s,{interfaces_:function(){return[is]},visitItem:function(a){var u=a;u.select(s,o)}}),o.isNodeAdded()}},La.prototype.interfaces_=function(){return[]},La.prototype.getClass=function(){return La},bv.HotPixelSnapAction.get=function(){return Nv},Object.defineProperties(La,bv);var Nv=function(n){function t(){n.call(this),this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var e=arguments[0],r=arguments[1],i=arguments[2];this._hotPixel=e,this._parentEdge=r,this._hotPixelVertexIndex=i}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.isNodeAdded=function(){return this._isNodeAdded},t.prototype.select=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1],s=r.getContext();if(this._parentEdge!==null&&s===this._parentEdge&&i===this._hotPixelVertexIndex)return null;this._isNodeAdded=this._hotPixel.addSnappedNode(s,i)}else return n.prototype.select.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Sl),Io=function(){this._li=null,this._interiorIntersections=null;var t=arguments[0];this._li=t,this._interiorIntersections=new j};Io.prototype.processIntersections=function(t,e,r,i){var s=this;if(t===r&&e===i)return null;var o=t.getCoordinates()[e],a=t.getCoordinates()[e+1],u=r.getCoordinates()[i],l=r.getCoordinates()[i+1];if(this._li.computeIntersection(o,a,u,l),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var c=0;c<this._li.getIntersectionNum();c++)s._interiorIntersections.add(s._li.getIntersection(c));t.addIntersections(this._li,e,0),r.addIntersections(this._li,i,1)}},Io.prototype.isDone=function(){return!1},Io.prototype.getInteriorIntersections=function(){return this._interiorIntersections},Io.prototype.interfaces_=function(){return[Vs]},Io.prototype.getClass=function(){return Io};var ci=function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var t=arguments[0];this._pm=t,this._li=new Ds,this._li.setPrecisionModel(t),this._scaleFactor=t.getScale()};ci.prototype.checkCorrectness=function(t){var e=ve.getNodedSubstrings(t),r=new kn(e);try{r.checkValid()}catch(i){if(i instanceof av)i.printStackTrace();else throw i}finally{}},ci.prototype.getNodedSubstrings=function(){return ve.getNodedSubstrings(this._nodedSegStrings)},ci.prototype.snapRound=function(t,e){var r=this.findInteriorIntersections(t,e);this.computeIntersectionSnaps(r),this.computeVertexSnaps(t)},ci.prototype.findInteriorIntersections=function(t,e){var r=new Io(e);return this._noder.setSegmentIntersector(r),this._noder.computeNodes(t),r.getInteriorIntersections()},ci.prototype.computeVertexSnaps=function(){var t=this;if(pt(arguments[0],Pe))for(var e=arguments[0],r=e.iterator();r.hasNext();){var i=r.next();t.computeVertexSnaps(i)}else if(arguments[0]instanceof ve)for(var s=arguments[0],o=s.getCoordinates(),a=0;a<o.length;a++){var u=new hr(o[a],t._scaleFactor,t._li),l=t._pointSnapper.snap(u,s,a);l&&s.addIntersection(o[a],a)}},ci.prototype.computeNodes=function(t){this._nodedSegStrings=t,this._noder=new Gf,this._pointSnapper=new La(this._noder.getIndex()),this.snapRound(t,this._li)},ci.prototype.computeIntersectionSnaps=function(t){for(var e=this,r=t.iterator();r.hasNext();){var i=r.next(),s=new hr(i,e._scaleFactor,e._li);e._pointSnapper.snap(s)}},ci.prototype.interfaces_=function(){return[Gs]},ci.prototype.getClass=function(){return ci};var Fe=function(){if(this._argGeom=null,this._distance=null,this._bufParams=new zt,this._resultGeometry=null,this._saveException=null,arguments.length===1){var t=arguments[0];this._argGeom=t}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this._argGeom=e,this._bufParams=r}},Ra={CAP_ROUND:{configurable:!0},CAP_BUTT:{configurable:!0},CAP_FLAT:{configurable:!0},CAP_SQUARE:{configurable:!0},MAX_PRECISION_DIGITS:{configurable:!0}};Fe.prototype.bufferFixedPrecision=function(t){var e=new as(new ci(new Ut(1)),t.getScale()),r=new Ze(this._bufParams);r.setWorkingPrecisionModel(t),r.setNoder(e),this._resultGeometry=r.buffer(this._argGeom,this._distance)},Fe.prototype.bufferReducedPrecision=function(){var t=this;if(arguments.length===0){for(var e=Fe.MAX_PRECISION_DIGITS;e>=0;e--){try{t.bufferReducedPrecision(e)}catch(o){if(o instanceof Ri)t._saveException=o;else throw o}finally{}if(t._resultGeometry!==null)return null}throw this._saveException}else if(arguments.length===1){var r=arguments[0],i=Fe.precisionScaleFactor(this._argGeom,this._distance,r),s=new Ut(i);this.bufferFixedPrecision(s)}},Fe.prototype.computeGeometry=function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var t=this._argGeom.getFactory().getPrecisionModel();t.getType()===Ut.FIXED?this.bufferFixedPrecision(t):this.bufferReducedPrecision()},Fe.prototype.setQuadrantSegments=function(t){this._bufParams.setQuadrantSegments(t)},Fe.prototype.bufferOriginalPrecision=function(){try{var t=new Ze(this._bufParams);this._resultGeometry=t.buffer(this._argGeom,this._distance)}catch(e){if(e instanceof xi)this._saveException=e;else throw e}finally{}},Fe.prototype.getResultGeometry=function(t){return this._distance=t,this.computeGeometry(),this._resultGeometry},Fe.prototype.setEndCapStyle=function(t){this._bufParams.setEndCapStyle(t)},Fe.prototype.interfaces_=function(){return[]},Fe.prototype.getClass=function(){return Fe},Fe.bufferOp=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],r=new Fe(t),i=r.getResultGeometry(e);return i}else if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof gt&&typeof arguments[1]=="number"){var s=arguments[0],o=arguments[1],a=arguments[2],u=new Fe(s);u.setQuadrantSegments(a);var l=u.getResultGeometry(o);return l}else if(arguments[2]instanceof zt&&arguments[0]instanceof gt&&typeof arguments[1]=="number"){var c=arguments[0],h=arguments[1],f=arguments[2],d=new Fe(c,f),v=d.getResultGeometry(h);return v}}else if(arguments.length===4){var _=arguments[0],E=arguments[1],P=arguments[2],y=arguments[3],w=new Fe(_);w.setQuadrantSegments(P),w.setEndCapStyle(y);var m=w.getResultGeometry(E);return m}},Fe.precisionScaleFactor=function(t,e,r){var i=t.getEnvelopeInternal(),s=Lr.max(Math.abs(i.getMaxX()),Math.abs(i.getMaxY()),Math.abs(i.getMinX()),Math.abs(i.getMinY())),o=e>0?e:0,a=s+2*o,u=Math.trunc(Math.log(a)/Math.log(10)+1),l=r-u,c=Math.pow(10,l);return c},Ra.CAP_ROUND.get=function(){return zt.CAP_ROUND},Ra.CAP_BUTT.get=function(){return zt.CAP_FLAT},Ra.CAP_FLAT.get=function(){return zt.CAP_FLAT},Ra.CAP_SQUARE.get=function(){return zt.CAP_SQUARE},Ra.MAX_PRECISION_DIGITS.get=function(){return 12},Object.defineProperties(Fe,Ra);var tr=function(){this._pt=[new D,new D],this._distance=yt.NaN,this._isNull=!0};tr.prototype.getCoordinates=function(){return this._pt},tr.prototype.getCoordinate=function(t){return this._pt[t]},tr.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(e,r),null;var i=e.distance(r);i<this._distance&&this.initialize(e,r,i)}},tr.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._pt[0].setCoordinate(r),this._pt[1].setCoordinate(i),this._distance=s,this._isNull=!1}},tr.prototype.getDistance=function(){return this._distance},tr.prototype.setMaximum=function(){if(arguments.length===1){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(e,r),null;var i=e.distance(r);i>this._distance&&this.initialize(e,r,i)}},tr.prototype.interfaces_=function(){return[]},tr.prototype.getClass=function(){return tr};var fi=function(){};fi.prototype.interfaces_=function(){return[]},fi.prototype.getClass=function(){return fi},fi.computeDistance=function(){if(arguments[2]instanceof tr&&arguments[0]instanceof ce&&arguments[1]instanceof D)for(var t=arguments[0],e=arguments[1],r=arguments[2],i=t.getCoordinates(),s=new ut,o=0;o<i.length-1;o++){s.setCoordinates(i[o],i[o+1]);var a=s.closestPoint(e);r.setMinimum(a,e)}else if(arguments[2]instanceof tr&&arguments[0]instanceof Ie&&arguments[1]instanceof D){var u=arguments[0],l=arguments[1],c=arguments[2];fi.computeDistance(u.getExteriorRing(),l,c);for(var h=0;h<u.getNumInteriorRing();h++)fi.computeDistance(u.getInteriorRingN(h),l,c)}else if(arguments[2]instanceof tr&&arguments[0]instanceof gt&&arguments[1]instanceof D){var f=arguments[0],d=arguments[1],v=arguments[2];if(f instanceof ce)fi.computeDistance(f,d,v);else if(f instanceof Ie)fi.computeDistance(f,d,v);else if(f instanceof Qe)for(var _=f,E=0;E<_.getNumGeometries();E++){var P=_.getGeometryN(E);fi.computeDistance(P,d,v)}else v.setMinimum(f.getCoordinate(),d)}else if(arguments[2]instanceof tr&&arguments[0]instanceof ut&&arguments[1]instanceof D){var y=arguments[0],w=arguments[1],m=arguments[2],S=y.closestPoint(w);m.setMinimum(S,w)}};var zs=function(t){this._maxPtDist=new tr,this._inputGeom=t||null},kf={MaxPointDistanceFilter:{configurable:!0},MaxMidpointDistanceFilter:{configurable:!0}};zs.prototype.computeMaxMidpointDistance=function(t){var e=new us(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},zs.prototype.computeMaxVertexDistance=function(t){var e=new Mo(this._inputGeom);t.apply(e),this._maxPtDist.setMaximum(e.getMaxPointDistance())},zs.prototype.findDistance=function(t){return this.computeMaxVertexDistance(t),this.computeMaxMidpointDistance(t),this._maxPtDist.getDistance()},zs.prototype.getDistancePoints=function(){return this._maxPtDist},zs.prototype.interfaces_=function(){return[]},zs.prototype.getClass=function(){return zs},kf.MaxPointDistanceFilter.get=function(){return Mo},kf.MaxMidpointDistanceFilter.get=function(){return us},Object.defineProperties(zs,kf);var Mo=function(t){this._maxPtDist=new tr,this._minPtDist=new tr,this._geom=t||null};Mo.prototype.filter=function(t){this._minPtDist.initialize(),fi.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},Mo.prototype.getMaxPointDistance=function(){return this._maxPtDist},Mo.prototype.interfaces_=function(){return[ii]},Mo.prototype.getClass=function(){return Mo};var us=function(t){this._maxPtDist=new tr,this._minPtDist=new tr,this._geom=t||null};us.prototype.filter=function(t,e){if(e===0)return null;var r=t.getCoordinate(e-1),i=t.getCoordinate(e),s=new D((r.x+i.x)/2,(r.y+i.y)/2);this._minPtDist.initialize(),fi.computeDistance(this._geom,s,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},us.prototype.isDone=function(){return!1},us.prototype.isGeometryChanged=function(){return!1},us.prototype.getMaxPointDistance=function(){return this._maxPtDist},us.prototype.interfaces_=function(){return[fn]},us.prototype.getClass=function(){return us};var Vi=function(t){this._comps=t||null};Vi.prototype.filter=function(t){t instanceof Ie&&this._comps.add(t)},Vi.prototype.interfaces_=function(){return[Tn]},Vi.prototype.getClass=function(){return Vi},Vi.getPolygons=function(){if(arguments.length===1){var t=arguments[0];return Vi.getPolygons(t,new j)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return e instanceof Ie?r.add(e):e instanceof Qe&&e.apply(new Vi(r)),r}};var Ge=function(){if(this._lines=null,this._isForcedToLineString=!1,arguments.length===1){var t=arguments[0];this._lines=t}else if(arguments.length===2){var e=arguments[0],r=arguments[1];this._lines=e,this._isForcedToLineString=r}};Ge.prototype.filter=function(t){if(this._isForcedToLineString&&t instanceof si){var e=t.getFactory().createLineString(t.getCoordinateSequence());return this._lines.add(e),null}t instanceof ce&&this._lines.add(t)},Ge.prototype.setForceToLineString=function(t){this._isForcedToLineString=t},Ge.prototype.interfaces_=function(){return[Ti]},Ge.prototype.getClass=function(){return Ge},Ge.getGeometry=function(){if(arguments.length===1){var t=arguments[0];return t.getFactory().buildGeometry(Ge.getLines(t))}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return e.getFactory().buildGeometry(Ge.getLines(e,r))}},Ge.getLines=function(){if(arguments.length===1){var t=arguments[0];return Ge.getLines(t,!1)}else if(arguments.length===2){if(pt(arguments[0],Pe)&&pt(arguments[1],Pe)){for(var e=arguments[0],r=arguments[1],i=e.iterator();i.hasNext();){var s=i.next();Ge.getLines(s,r)}return r}else if(arguments[0]instanceof gt&&typeof arguments[1]=="boolean"){var o=arguments[0],a=arguments[1],u=new j;return o.apply(new Ge(u,a)),u}else if(arguments[0]instanceof gt&&pt(arguments[1],Pe)){var l=arguments[0],c=arguments[1];return l instanceof ce?c.add(l):l.apply(new Ge(c)),c}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&pt(arguments[0],Pe)&&pt(arguments[1],Pe)){for(var h=arguments[0],f=arguments[1],d=arguments[2],v=h.iterator();v.hasNext();){var _=v.next();Ge.getLines(_,f,d)}return f}else if(typeof arguments[2]=="boolean"&&arguments[0]instanceof gt&&pt(arguments[1],Pe)){var E=arguments[0],P=arguments[1],y=arguments[2];return E.apply(new Ge(P,y)),P}}};var vn=function(){if(this._boundaryRule=jr.OGC_SFS_BOUNDARY_RULE,this._isIn=null,this._numBoundaries=null,arguments.length!==0){if(arguments.length===1){var t=arguments[0];if(t===null)throw new ae("Rule must be non-null");this._boundaryRule=t}}};vn.prototype.locateInternal=function(){var t=this;if(arguments[0]instanceof D&&arguments[1]instanceof Ie){var e=arguments[0],r=arguments[1];if(r.isEmpty())return F.EXTERIOR;var i=r.getExteriorRing(),s=this.locateInPolygonRing(e,i);if(s===F.EXTERIOR)return F.EXTERIOR;if(s===F.BOUNDARY)return F.BOUNDARY;for(var o=0;o<r.getNumInteriorRing();o++){var a=r.getInteriorRingN(o),u=t.locateInPolygonRing(e,a);if(u===F.INTERIOR)return F.EXTERIOR;if(u===F.BOUNDARY)return F.BOUNDARY}return F.INTERIOR}else if(arguments[0]instanceof D&&arguments[1]instanceof ce){var l=arguments[0],c=arguments[1];if(!c.getEnvelopeInternal().intersects(l))return F.EXTERIOR;var h=c.getCoordinates();return!c.isClosed()&&(l.equals(h[0])||l.equals(h[h.length-1]))?F.BOUNDARY:K.isOnLine(l,h)?F.INTERIOR:F.EXTERIOR}else if(arguments[0]instanceof D&&arguments[1]instanceof _r){var f=arguments[0],d=arguments[1],v=d.getCoordinate();return v.equals2D(f)?F.INTERIOR:F.EXTERIOR}},vn.prototype.locateInPolygonRing=function(t,e){return e.getEnvelopeInternal().intersects(t)?K.locatePointInRing(t,e.getCoordinates()):F.EXTERIOR},vn.prototype.intersects=function(t,e){return this.locate(t,e)!==F.EXTERIOR},vn.prototype.updateLocationInfo=function(t){t===F.INTERIOR&&(this._isIn=!0),t===F.BOUNDARY&&this._numBoundaries++},vn.prototype.computeLocation=function(t,e){var r=this;if(e instanceof _r&&this.updateLocationInfo(this.locateInternal(t,e)),e instanceof ce)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Ie)this.updateLocationInfo(this.locateInternal(t,e));else if(e instanceof Fs)for(var i=e,s=0;s<i.getNumGeometries();s++){var o=i.getGeometryN(s);r.updateLocationInfo(r.locateInternal(t,o))}else if(e instanceof oi)for(var a=e,u=0;u<a.getNumGeometries();u++){var l=a.getGeometryN(u);r.updateLocationInfo(r.locateInternal(t,l))}else if(e instanceof Qe)for(var c=new li(e);c.hasNext();){var h=c.next();h!==e&&r.computeLocation(t,h)}},vn.prototype.locate=function(t,e){return e.isEmpty()?F.EXTERIOR:e instanceof ce?this.locateInternal(t,e):e instanceof Ie?this.locateInternal(t,e):(this._isIn=!1,this._numBoundaries=0,this.computeLocation(t,e),this._boundaryRule.isInBoundary(this._numBoundaries)?F.BOUNDARY:this._numBoundaries>0||this._isIn?F.INTERIOR:F.EXTERIOR)},vn.prototype.interfaces_=function(){return[]},vn.prototype.getClass=function(){return vn};var er=function n(){if(this._component=null,this._segIndex=null,this._pt=null,arguments.length===2){var t=arguments[0],e=arguments[1];n.call(this,t,n.INSIDE_AREA,e)}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._component=r,this._segIndex=i,this._pt=s}},xv={INSIDE_AREA:{configurable:!0}};er.prototype.isInsideArea=function(){return this._segIndex===er.INSIDE_AREA},er.prototype.getCoordinate=function(){return this._pt},er.prototype.getGeometryComponent=function(){return this._component},er.prototype.getSegmentIndex=function(){return this._segIndex},er.prototype.interfaces_=function(){return[]},er.prototype.getClass=function(){return er},xv.INSIDE_AREA.get=function(){return-1},Object.defineProperties(er,xv);var ls=function(t){this._pts=t||null};ls.prototype.filter=function(t){t instanceof _r&&this._pts.add(t)},ls.prototype.interfaces_=function(){return[Tn]},ls.prototype.getClass=function(){return ls},ls.getPoints=function(){if(arguments.length===1){var t=arguments[0];return t instanceof _r?gn.singletonList(t):ls.getPoints(t,new j)}else if(arguments.length===2){var e=arguments[0],r=arguments[1];return e instanceof _r?r.add(e):e instanceof Qe&&e.apply(new ls(r)),r}};var bo=function(){this._locations=null;var t=arguments[0];this._locations=t};bo.prototype.filter=function(t){(t instanceof _r||t instanceof ce||t instanceof Ie)&&this._locations.add(new er(t,0,t.getCoordinate()))},bo.prototype.interfaces_=function(){return[Tn]},bo.prototype.getClass=function(){return bo},bo.getLocations=function(t){var e=new j;return t.apply(new bo(e)),e};var ke=function(){if(this._geom=null,this._terminateDistance=0,this._ptLocator=new vn,this._minDistanceLocation=null,this._minDistance=yt.MAX_VALUE,arguments.length===2){var t=arguments[0],e=arguments[1];this._geom=[t,e],this._terminateDistance=0}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._geom=new Array(2).fill(null),this._geom[0]=r,this._geom[1]=i,this._terminateDistance=s}};ke.prototype.computeContainmentDistance=function(){var t=this;if(arguments.length===0){var e=new Array(2).fill(null);if(this.computeContainmentDistance(0,e),this._minDistance<=this._terminateDistance)return null;this.computeContainmentDistance(1,e)}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=1-r,o=Vi.getPolygons(this._geom[r]);if(o.size()>0){var a=bo.getLocations(this._geom[s]);if(this.computeContainmentDistance(a,o,i),this._minDistance<=this._terminateDistance)return this._minDistanceLocation[s]=i[0],this._minDistanceLocation[r]=i[1],null}}else if(arguments.length===3){if(arguments[2]instanceof Array&&pt(arguments[0],hn)&&pt(arguments[1],hn)){for(var u=arguments[0],l=arguments[1],c=arguments[2],h=0;h<u.size();h++)for(var f=u.get(h),d=0;d<l.size();d++)if(t.computeContainmentDistance(f,l.get(d),c),t._minDistance<=t._terminateDistance)return null}else if(arguments[2]instanceof Array&&arguments[0]instanceof er&&arguments[1]instanceof Ie){var v=arguments[0],_=arguments[1],E=arguments[2],P=v.getCoordinate();if(F.EXTERIOR!==this._ptLocator.locate(P,_))return this._minDistance=0,E[0]=v,E[1]=new er(_,P),null}}},ke.prototype.computeMinDistanceLinesPoints=function(t,e,r){for(var i=this,s=0;s<t.size();s++)for(var o=t.get(s),a=0;a<e.size();a++){var u=e.get(a);if(i.computeMinDistance(o,u,r),i._minDistance<=i._terminateDistance)return null}},ke.prototype.computeFacetDistance=function(){var t=new Array(2).fill(null),e=Ge.getLines(this._geom[0]),r=Ge.getLines(this._geom[1]),i=ls.getPoints(this._geom[0]),s=ls.getPoints(this._geom[1]);if(this.computeMinDistanceLines(e,r,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(e,s,t),this.updateMinDistance(t,!1),this._minDistance<=this._terminateDistance)||(t[0]=null,t[1]=null,this.computeMinDistanceLinesPoints(r,i,t),this.updateMinDistance(t,!0),this._minDistance<=this._terminateDistance))return null;t[0]=null,t[1]=null,this.computeMinDistancePoints(i,s,t),this.updateMinDistance(t,!1)},ke.prototype.nearestLocations=function(){return this.computeMinDistance(),this._minDistanceLocation},ke.prototype.updateMinDistance=function(t,e){if(t[0]===null)return null;e?(this._minDistanceLocation[0]=t[1],this._minDistanceLocation[1]=t[0]):(this._minDistanceLocation[0]=t[0],this._minDistanceLocation[1]=t[1])},ke.prototype.nearestPoints=function(){this.computeMinDistance();var t=[this._minDistanceLocation[0].getCoordinate(),this._minDistanceLocation[1].getCoordinate()];return t},ke.prototype.computeMinDistance=function(){var t=this;if(arguments.length===0){if(this._minDistanceLocation!==null||(this._minDistanceLocation=new Array(2).fill(null),this.computeContainmentDistance(),this._minDistance<=this._terminateDistance))return null;this.computeFacetDistance()}else if(arguments.length===3){if(arguments[2]instanceof Array&&arguments[0]instanceof ce&&arguments[1]instanceof _r){var e=arguments[0],r=arguments[1],i=arguments[2];if(e.getEnvelopeInternal().distance(r.getEnvelopeInternal())>this._minDistance)return null;for(var s=e.getCoordinates(),o=r.getCoordinate(),a=0;a<s.length-1;a++){var u=K.distancePointLine(o,s[a],s[a+1]);if(u<t._minDistance){t._minDistance=u;var l=new ut(s[a],s[a+1]),c=l.closestPoint(o);i[0]=new er(e,a,c),i[1]=new er(r,0,o)}if(t._minDistance<=t._terminateDistance)return null}}else if(arguments[2]instanceof Array&&arguments[0]instanceof ce&&arguments[1]instanceof ce){var h=arguments[0],f=arguments[1],d=arguments[2];if(h.getEnvelopeInternal().distance(f.getEnvelopeInternal())>this._minDistance)return null;for(var v=h.getCoordinates(),_=f.getCoordinates(),E=0;E<v.length-1;E++)for(var P=0;P<_.length-1;P++){var y=K.distanceLineLine(v[E],v[E+1],_[P],_[P+1]);if(y<t._minDistance){t._minDistance=y;var w=new ut(v[E],v[E+1]),m=new ut(_[P],_[P+1]),S=w.closestPoints(m);d[0]=new er(h,E,S[0]),d[1]=new er(f,P,S[1])}if(t._minDistance<=t._terminateDistance)return null}}}},ke.prototype.computeMinDistancePoints=function(t,e,r){for(var i=this,s=0;s<t.size();s++)for(var o=t.get(s),a=0;a<e.size();a++){var u=e.get(a),l=o.getCoordinate().distance(u.getCoordinate());if(l<i._minDistance&&(i._minDistance=l,r[0]=new er(o,0,o.getCoordinate()),r[1]=new er(u,0,u.getCoordinate())),i._minDistance<=i._terminateDistance)return null}},ke.prototype.distance=function(){if(this._geom[0]===null||this._geom[1]===null)throw new ae("null geometries are not supported");return this._geom[0].isEmpty()||this._geom[1].isEmpty()?0:(this.computeMinDistance(),this._minDistance)},ke.prototype.computeMinDistanceLines=function(t,e,r){for(var i=this,s=0;s<t.size();s++)for(var o=t.get(s),a=0;a<e.size();a++){var u=e.get(a);if(i.computeMinDistance(o,u,r),i._minDistance<=i._terminateDistance)return null}},ke.prototype.interfaces_=function(){return[]},ke.prototype.getClass=function(){return ke},ke.distance=function(t,e){var r=new ke(t,e);return r.distance()},ke.isWithinDistance=function(t,e,r){var i=new ke(t,e,r);return i.distance()<=r},ke.nearestPoints=function(t,e){var r=new ke(t,e);return r.nearestPoints()};var Ye=function(){this._pt=[new D,new D],this._distance=yt.NaN,this._isNull=!0};Ye.prototype.getCoordinates=function(){return this._pt},Ye.prototype.getCoordinate=function(t){return this._pt[t]},Ye.prototype.setMinimum=function(){if(arguments.length===1){var t=arguments[0];this.setMinimum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(e,r),null;var i=e.distance(r);i<this._distance&&this.initialize(e,r,i)}},Ye.prototype.initialize=function(){if(arguments.length===0)this._isNull=!0;else if(arguments.length===2){var t=arguments[0],e=arguments[1];this._pt[0].setCoordinate(t),this._pt[1].setCoordinate(e),this._distance=t.distance(e),this._isNull=!1}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._pt[0].setCoordinate(r),this._pt[1].setCoordinate(i),this._distance=s,this._isNull=!1}},Ye.prototype.toString=function(){return ln.toLineString(this._pt[0],this._pt[1])},Ye.prototype.getDistance=function(){return this._distance},Ye.prototype.setMaximum=function(){if(arguments.length===1){var t=arguments[0];this.setMaximum(t._pt[0],t._pt[1])}else if(arguments.length===2){var e=arguments[0],r=arguments[1];if(this._isNull)return this.initialize(e,r),null;var i=e.distance(r);i>this._distance&&this.initialize(e,r,i)}},Ye.prototype.interfaces_=function(){return[]},Ye.prototype.getClass=function(){return Ye};var Vn=function(){};Vn.prototype.interfaces_=function(){return[]},Vn.prototype.getClass=function(){return Vn},Vn.computeDistance=function(){if(arguments[2]instanceof Ye&&arguments[0]instanceof ce&&arguments[1]instanceof D)for(var t=arguments[0],e=arguments[1],r=arguments[2],i=new ut,s=t.getCoordinates(),o=0;o<s.length-1;o++){i.setCoordinates(s[o],s[o+1]);var a=i.closestPoint(e);r.setMinimum(a,e)}else if(arguments[2]instanceof Ye&&arguments[0]instanceof Ie&&arguments[1]instanceof D){var u=arguments[0],l=arguments[1],c=arguments[2];Vn.computeDistance(u.getExteriorRing(),l,c);for(var h=0;h<u.getNumInteriorRing();h++)Vn.computeDistance(u.getInteriorRingN(h),l,c)}else if(arguments[2]instanceof Ye&&arguments[0]instanceof gt&&arguments[1]instanceof D){var f=arguments[0],d=arguments[1],v=arguments[2];if(f instanceof ce)Vn.computeDistance(f,d,v);else if(f instanceof Ie)Vn.computeDistance(f,d,v);else if(f instanceof Qe)for(var _=f,E=0;E<_.getNumGeometries();E++){var P=_.getGeometryN(E);Vn.computeDistance(P,d,v)}else v.setMinimum(f.getCoordinate(),d)}else if(arguments[2]instanceof Ye&&arguments[0]instanceof ut&&arguments[1]instanceof D){var y=arguments[0],w=arguments[1],m=arguments[2],S=y.closestPoint(w);m.setMinimum(S,w)}};var tn=function(){this._g0=null,this._g1=null,this._ptDist=new Ye,this._densifyFrac=0;var t=arguments[0],e=arguments[1];this._g0=t,this._g1=e},Vf={MaxPointDistanceFilter:{configurable:!0},MaxDensifiedByFractionDistanceFilter:{configurable:!0}};tn.prototype.getCoordinates=function(){return this._ptDist.getCoordinates()},tn.prototype.setDensifyFraction=function(t){if(t>1||t<=0)throw new ae("Fraction is not in range (0.0 - 1.0]");this._densifyFrac=t},tn.prototype.compute=function(t,e){this.computeOrientedDistance(t,e,this._ptDist),this.computeOrientedDistance(e,t,this._ptDist)},tn.prototype.distance=function(){return this.compute(this._g0,this._g1),this._ptDist.getDistance()},tn.prototype.computeOrientedDistance=function(t,e,r){var i=new No(e);if(t.apply(i),r.setMaximum(i.getMaxPointDistance()),this._densifyFrac>0){var s=new hs(e,this._densifyFrac);t.apply(s),r.setMaximum(s.getMaxPointDistance())}},tn.prototype.orientedDistance=function(){return this.computeOrientedDistance(this._g0,this._g1,this._ptDist),this._ptDist.getDistance()},tn.prototype.interfaces_=function(){return[]},tn.prototype.getClass=function(){return tn},tn.distance=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],r=new tn(t,e);return r.distance()}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=new tn(i,s);return a.setDensifyFraction(o),a.distance()}},Vf.MaxPointDistanceFilter.get=function(){return No},Vf.MaxDensifiedByFractionDistanceFilter.get=function(){return hs},Object.defineProperties(tn,Vf);var No=function(){this._maxPtDist=new Ye,this._minPtDist=new Ye,this._euclideanDist=new Vn,this._geom=null;var t=arguments[0];this._geom=t};No.prototype.filter=function(t){this._minPtDist.initialize(),Vn.computeDistance(this._geom,t,this._minPtDist),this._maxPtDist.setMaximum(this._minPtDist)},No.prototype.getMaxPointDistance=function(){return this._maxPtDist},No.prototype.interfaces_=function(){return[ii]},No.prototype.getClass=function(){return No};var hs=function(){this._maxPtDist=new Ye,this._minPtDist=new Ye,this._geom=null,this._numSubSegs=0;var t=arguments[0],e=arguments[1];this._geom=t,this._numSubSegs=Math.trunc(Math.round(1/e))};hs.prototype.filter=function(t,e){var r=this;if(e===0)return null;for(var i=t.getCoordinate(e-1),s=t.getCoordinate(e),o=(s.x-i.x)/this._numSubSegs,a=(s.y-i.y)/this._numSubSegs,u=0;u<this._numSubSegs;u++){var l=i.x+u*o,c=i.y+u*a,h=new D(l,c);r._minPtDist.initialize(),Vn.computeDistance(r._geom,h,r._minPtDist),r._maxPtDist.setMaximum(r._minPtDist)}},hs.prototype.isDone=function(){return!1},hs.prototype.isGeometryChanged=function(){return!1},hs.prototype.getMaxPointDistance=function(){return this._maxPtDist},hs.prototype.interfaces_=function(){return[fn]},hs.prototype.getClass=function(){return hs};var Sr=function(t,e,r){this._minValidDistance=null,this._maxValidDistance=null,this._minDistanceFound=null,this._maxDistanceFound=null,this._isValid=!0,this._errMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._bufDistance=e||null,this._result=r||null},Uf={VERBOSE:{configurable:!0},MAX_DISTANCE_DIFF_FRAC:{configurable:!0}};Sr.prototype.checkMaximumDistance=function(t,e,r){var i=new tn(e,t);if(i.setDensifyFraction(.25),this._maxDistanceFound=i.orientedDistance(),this._maxDistanceFound>r){this._isValid=!1;var s=i.getCoordinates();this._errorLocation=s[1],this._errorIndicator=t.getFactory().createLineString(s),this._errMsg="Distance between buffer curve and input is too large ("+this._maxDistanceFound+" at "+ln.toLineString(s[0],s[1])+")"}},Sr.prototype.isValid=function(){var t=Math.abs(this._bufDistance),e=Sr.MAX_DISTANCE_DIFF_FRAC*t;return this._minValidDistance=t-e,this._maxValidDistance=t+e,this._input.isEmpty()||this._result.isEmpty()?!0:(this._bufDistance>0?this.checkPositiveValid():this.checkNegativeValid(),Sr.VERBOSE&&Le.out.println("Min Dist= "+this._minDistanceFound+" err= "+(1-this._minDistanceFound/this._bufDistance)+" Max Dist= "+this._maxDistanceFound+" err= "+(this._maxDistanceFound/this._bufDistance-1)),this._isValid)},Sr.prototype.checkNegativeValid=function(){if(!(this._input instanceof Ie||this._input instanceof oi||this._input instanceof Qe))return null;var t=this.getPolygonLines(this._input);if(this.checkMinimumDistance(t,this._result,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(t,this._result,this._maxValidDistance)},Sr.prototype.getErrorIndicator=function(){return this._errorIndicator},Sr.prototype.checkMinimumDistance=function(t,e,r){var i=new ke(t,e,r);if(this._minDistanceFound=i.distance(),this._minDistanceFound<r){this._isValid=!1;var s=i.nearestPoints();this._errorLocation=i.nearestPoints()[1],this._errorIndicator=t.getFactory().createLineString(s),this._errMsg="Distance between buffer curve and input is too small ("+this._minDistanceFound+" at "+ln.toLineString(s[0],s[1])+" )"}},Sr.prototype.checkPositiveValid=function(){var t=this._result.getBoundary();if(this.checkMinimumDistance(this._input,t,this._minValidDistance),!this._isValid)return null;this.checkMaximumDistance(this._input,t,this._maxValidDistance)},Sr.prototype.getErrorLocation=function(){return this._errorLocation},Sr.prototype.getPolygonLines=function(t){for(var e=new j,r=new Ge(e),i=Vi.getPolygons(t),s=i.iterator();s.hasNext();){var o=s.next();o.apply(r)}return t.getFactory().buildGeometry(e)},Sr.prototype.getErrorMessage=function(){return this._errMsg},Sr.prototype.interfaces_=function(){return[]},Sr.prototype.getClass=function(){return Sr},Uf.VERBOSE.get=function(){return!1},Uf.MAX_DISTANCE_DIFF_FRAC.get=function(){return .012},Object.defineProperties(Sr,Uf);var Ve=function(t,e,r){this._isValid=!0,this._errorMsg=null,this._errorLocation=null,this._errorIndicator=null,this._input=t||null,this._distance=e||null,this._result=r||null},zf={VERBOSE:{configurable:!0},MAX_ENV_DIFF_FRAC:{configurable:!0}};Ve.prototype.isValid=function(){return this.checkPolygonal(),this._isValid?(this.checkExpectedEmpty(),this._isValid?(this.checkEnvelope(),this._isValid?(this.checkArea(),this._isValid?(this.checkDistance(),this._isValid):this._isValid):this._isValid):this._isValid):this._isValid},Ve.prototype.checkEnvelope=function(){if(this._distance<0)return null;var t=this._distance*Ve.MAX_ENV_DIFF_FRAC;t===0&&(t=.001);var e=new at(this._input.getEnvelopeInternal());e.expandBy(this._distance);var r=new at(this._result.getEnvelopeInternal());r.expandBy(t),r.contains(e)||(this._isValid=!1,this._errorMsg="Buffer envelope is incorrect",this._errorIndicator=this._input.getFactory().toGeometry(r)),this.report("Envelope")},Ve.prototype.checkDistance=function(){var t=new Sr(this._input,this._distance,this._result);t.isValid()||(this._isValid=!1,this._errorMsg=t.getErrorMessage(),this._errorLocation=t.getErrorLocation(),this._errorIndicator=t.getErrorIndicator()),this.report("Distance")},Ve.prototype.checkArea=function(){var t=this._input.getArea(),e=this._result.getArea();this._distance>0&&t>e&&(this._isValid=!1,this._errorMsg="Area of positive buffer is smaller than input",this._errorIndicator=this._result),this._distance<0&&t<e&&(this._isValid=!1,this._errorMsg="Area of negative buffer is larger than input",this._errorIndicator=this._result),this.report("Area")},Ve.prototype.checkPolygonal=function(){this._result instanceof Ie||this._result instanceof oi||(this._isValid=!1),this._errorMsg="Result is not polygonal",this._errorIndicator=this._result,this.report("Polygonal")},Ve.prototype.getErrorIndicator=function(){return this._errorIndicator},Ve.prototype.getErrorLocation=function(){return this._errorLocation},Ve.prototype.checkExpectedEmpty=function(){if(this._input.getDimension()>=2||this._distance>0)return null;this._result.isEmpty()||(this._isValid=!1,this._errorMsg="Result is non-empty",this._errorIndicator=this._result),this.report("ExpectedEmpty")},Ve.prototype.report=function(t){if(!Ve.VERBOSE)return null;Le.out.println("Check "+t+": "+(this._isValid?"passed":"FAILED"))},Ve.prototype.getErrorMessage=function(){return this._errorMsg},Ve.prototype.interfaces_=function(){return[]},Ve.prototype.getClass=function(){return Ve},Ve.isValidMsg=function(t,e,r){var i=new Ve(t,e,r);return i.isValid()?null:i.getErrorMessage()},Ve.isValid=function(t,e,r){var i=new Ve(t,e,r);return!!i.isValid()},zf.VERBOSE.get=function(){return!1},zf.MAX_ENV_DIFF_FRAC.get=function(){return .012},Object.defineProperties(Ve,zf);var Un=function(){this._pts=null,this._data=null;var t=arguments[0],e=arguments[1];this._pts=t,this._data=e};Un.prototype.getCoordinates=function(){return this._pts},Un.prototype.size=function(){return this._pts.length},Un.prototype.getCoordinate=function(t){return this._pts[t]},Un.prototype.isClosed=function(){return this._pts[0].equals(this._pts[this._pts.length-1])},Un.prototype.getSegmentOctant=function(t){return t===this._pts.length-1?-1:So.octant(this.getCoordinate(t),this.getCoordinate(t+1))},Un.prototype.setData=function(t){this._data=t},Un.prototype.getData=function(){return this._data},Un.prototype.toString=function(){return ln.toLineString(new pe(this._pts))},Un.prototype.interfaces_=function(){return[ui]},Un.prototype.getClass=function(){return Un};var Te=function(){this._findAllIntersections=!1,this._isCheckEndSegmentsOnly=!1,this._li=null,this._interiorIntersection=null,this._intSegments=null,this._intersections=new j,this._intersectionCount=0,this._keepIntersections=!0;var t=arguments[0];this._li=t,this._interiorIntersection=null};Te.prototype.getInteriorIntersection=function(){return this._interiorIntersection},Te.prototype.setCheckEndSegmentsOnly=function(t){this._isCheckEndSegmentsOnly=t},Te.prototype.getIntersectionSegments=function(){return this._intSegments},Te.prototype.count=function(){return this._intersectionCount},Te.prototype.getIntersections=function(){return this._intersections},Te.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},Te.prototype.setKeepIntersections=function(t){this._keepIntersections=t},Te.prototype.processIntersections=function(t,e,r,i){if(!this._findAllIntersections&&this.hasIntersection()||t===r&&e===i)return null;if(this._isCheckEndSegmentsOnly){var s=this.isEndSegment(t,e)||this.isEndSegment(r,i);if(!s)return null}var o=t.getCoordinates()[e],a=t.getCoordinates()[e+1],u=r.getCoordinates()[i],l=r.getCoordinates()[i+1];this._li.computeIntersection(o,a,u,l),this._li.hasIntersection()&&this._li.isInteriorIntersection()&&(this._intSegments=new Array(4).fill(null),this._intSegments[0]=o,this._intSegments[1]=a,this._intSegments[2]=u,this._intSegments[3]=l,this._interiorIntersection=this._li.getIntersection(0),this._keepIntersections&&this._intersections.add(this._interiorIntersection),this._intersectionCount++)},Te.prototype.isEndSegment=function(t,e){return e===0||e>=t.size()-2},Te.prototype.hasIntersection=function(){return this._interiorIntersection!==null},Te.prototype.isDone=function(){return this._findAllIntersections?!1:this._interiorIntersection!==null},Te.prototype.interfaces_=function(){return[Vs]},Te.prototype.getClass=function(){return Te},Te.createAllIntersectionsFinder=function(t){var e=new Te(t);return e.setFindAllIntersections(!0),e},Te.createAnyIntersectionFinder=function(t){return new Te(t)},Te.createIntersectionCounter=function(t){var e=new Te(t);return e.setFindAllIntersections(!0),e.setKeepIntersections(!1),e};var mn=function(){this._li=new Ds,this._segStrings=null,this._findAllIntersections=!1,this._segInt=null,this._isValid=!0;var t=arguments[0];this._segStrings=t};mn.prototype.execute=function(){if(this._segInt!==null)return null;this.checkInteriorIntersections()},mn.prototype.getIntersections=function(){return this._segInt.getIntersections()},mn.prototype.isValid=function(){return this.execute(),this._isValid},mn.prototype.setFindAllIntersections=function(t){this._findAllIntersections=t},mn.prototype.checkInteriorIntersections=function(){this._isValid=!0,this._segInt=new Te(this._li),this._segInt.setFindAllIntersections(this._findAllIntersections);var t=new Gf;if(t.setSegmentIntersector(this._segInt),t.computeNodes(this._segStrings),this._segInt.hasIntersection())return this._isValid=!1,null},mn.prototype.checkValid=function(){if(this.execute(),!this._isValid)throw new Ri(this.getErrorMessage(),this._segInt.getInteriorIntersection())},mn.prototype.getErrorMessage=function(){if(this._isValid)return"no intersections found";var t=this._segInt.getIntersectionSegments();return"found non-noded intersection between "+ln.toLineString(t[0],t[1])+" and "+ln.toLineString(t[2],t[3])},mn.prototype.interfaces_=function(){return[]},mn.prototype.getClass=function(){return mn},mn.computeIntersections=function(t){var e=new mn(t);return e.setFindAllIntersections(!0),e.isValid(),e.getIntersections()};var qs=function n(){this._nv=null;var t=arguments[0];this._nv=new mn(n.toSegmentStrings(t))};qs.prototype.checkValid=function(){this._nv.checkValid()},qs.prototype.interfaces_=function(){return[]},qs.prototype.getClass=function(){return qs},qs.toSegmentStrings=function(t){for(var e=new j,r=t.iterator();r.hasNext();){var i=r.next();e.add(new Un(i.getCoordinates(),i))}return e},qs.checkValid=function(t){var e=new qs(t);e.checkValid()};var xo=function(t){this._mapOp=t};xo.prototype.map=function(t){for(var e=this,r=new j,i=0;i<t.getNumGeometries();i++){var s=e._mapOp.map(t.getGeometryN(i));s.isEmpty()||r.add(s)}return t.getFactory().createGeometryCollection(xt.toGeometryArray(r))},xo.prototype.interfaces_=function(){return[]},xo.prototype.getClass=function(){return xo},xo.map=function(t,e){var r=new xo(e);return r.map(t)};var zn=function(){this._op=null,this._geometryFactory=null,this._ptLocator=null,this._lineEdgesList=new j,this._resultLineList=new j;var t=arguments[0],e=arguments[1],r=arguments[2];this._op=t,this._geometryFactory=e,this._ptLocator=r};zn.prototype.collectLines=function(t){for(var e=this,r=this._op.getGraph().getEdgeEnds().iterator();r.hasNext();){var i=r.next();e.collectLineEdge(i,t,e._lineEdgesList),e.collectBoundaryTouchEdge(i,t,e._lineEdgesList)}},zn.prototype.labelIsolatedLine=function(t,e){var r=this._ptLocator.locate(t.getCoordinate(),this._op.getArgGeometry(e));t.getLabel().setLocation(e,r)},zn.prototype.build=function(t){return this.findCoveredLineEdges(),this.collectLines(t),this.buildLines(t),this._resultLineList},zn.prototype.collectLineEdge=function(t,e,r){var i=t.getLabel(),s=t.getEdge();t.isLineEdge()&&!t.isVisited()&&St.isResultOfOp(i,e)&&!s.isCovered()&&(r.add(s),t.setVisitedEdge(!0))},zn.prototype.findCoveredLineEdges=function(){for(var t=this,e=this._op.getGraph().getNodes().iterator();e.hasNext();){var r=e.next();r.getEdges().findCoveredLineEdges()}for(var i=this._op.getGraph().getEdgeEnds().iterator();i.hasNext();){var s=i.next(),o=s.getEdge();if(s.isLineEdge()&&!o.isCoveredSet()){var a=t._op.isCoveredByA(s.getCoordinate());o.setCovered(a)}}},zn.prototype.labelIsolatedLines=function(t){for(var e=this,r=t.iterator();r.hasNext();){var i=r.next(),s=i.getLabel();i.isIsolated()&&(s.isNull(0)?e.labelIsolatedLine(i,0):e.labelIsolatedLine(i,1))}},zn.prototype.buildLines=function(t){for(var e=this,r=this._lineEdgesList.iterator();r.hasNext();){var i=r.next(),s=e._geometryFactory.createLineString(i.getCoordinates());e._resultLineList.add(s),i.setInResult(!0)}},zn.prototype.collectBoundaryTouchEdge=function(t,e,r){var i=t.getLabel();if(t.isLineEdge()||t.isVisited()||t.isInteriorAreaEdge()||t.getEdge().isInResult())return null;Pt.isTrue(!(t.isInResult()||t.getSym().isInResult())||!t.getEdge().isInResult()),St.isResultOfOp(i,e)&&e===St.INTERSECTION&&(r.add(t.getEdge()),t.setVisitedEdge(!0))},zn.prototype.interfaces_=function(){return[]},zn.prototype.getClass=function(){return zn};var To=function(){this._op=null,this._geometryFactory=null,this._resultPointList=new j;var t=arguments[0],e=arguments[1];this._op=t,this._geometryFactory=e};To.prototype.filterCoveredNodeToPoint=function(t){var e=t.getCoordinate();if(!this._op.isCoveredByLA(e)){var r=this._geometryFactory.createPoint(e);this._resultPointList.add(r)}},To.prototype.extractNonCoveredResultNodes=function(t){for(var e=this,r=this._op.getGraph().getNodes().iterator();r.hasNext();){var i=r.next();if(!i.isInResult()&&!i.isIncidentEdgeInResult()&&(i.getEdges().getDegree()===0||t===St.INTERSECTION)){var s=i.getLabel();St.isResultOfOp(s,t)&&e.filterCoveredNodeToPoint(i)}}},To.prototype.build=function(t){return this.extractNonCoveredResultNodes(t),this._resultPointList},To.prototype.interfaces_=function(){return[]},To.prototype.getClass=function(){return To};var cr=function(){this._inputGeom=null,this._factory=null,this._pruneEmptyGeometry=!0,this._preserveGeometryCollectionType=!0,this._preserveCollections=!1,this._preserveType=!1};cr.prototype.transformPoint=function(t,e){return this._factory.createPoint(this.transformCoordinates(t.getCoordinateSequence(),t))},cr.prototype.transformPolygon=function(t,e){var r=this,i=!0,s=this.transformLinearRing(t.getExteriorRing(),t);(s===null||!(s instanceof si)||s.isEmpty())&&(i=!1);for(var o=new j,a=0;a<t.getNumInteriorRing();a++){var u=r.transformLinearRing(t.getInteriorRingN(a),t);u===null||u.isEmpty()||(u instanceof si||(i=!1),o.add(u))}if(i)return this._factory.createPolygon(s,o.toArray([]));var l=new j;return s!==null&&l.add(s),l.addAll(o),this._factory.buildGeometry(l)},cr.prototype.createCoordinateSequence=function(t){return this._factory.getCoordinateSequenceFactory().create(t)},cr.prototype.getInputGeometry=function(){return this._inputGeom},cr.prototype.transformMultiLineString=function(t,e){for(var r=this,i=new j,s=0;s<t.getNumGeometries();s++){var o=r.transformLineString(t.getGeometryN(s),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},cr.prototype.transformCoordinates=function(t,e){return this.copy(t)},cr.prototype.transformLineString=function(t,e){return this._factory.createLineString(this.transformCoordinates(t.getCoordinateSequence(),t))},cr.prototype.transformMultiPoint=function(t,e){for(var r=this,i=new j,s=0;s<t.getNumGeometries();s++){var o=r.transformPoint(t.getGeometryN(s),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},cr.prototype.transformMultiPolygon=function(t,e){for(var r=this,i=new j,s=0;s<t.getNumGeometries();s++){var o=r.transformPolygon(t.getGeometryN(s),t);o!==null&&(o.isEmpty()||i.add(o))}return this._factory.buildGeometry(i)},cr.prototype.copy=function(t){return t.copy()},cr.prototype.transformGeometryCollection=function(t,e){for(var r=this,i=new j,s=0;s<t.getNumGeometries();s++){var o=r.transform(t.getGeometryN(s));o!==null&&(r._pruneEmptyGeometry&&o.isEmpty()||i.add(o))}return this._preserveGeometryCollectionType?this._factory.createGeometryCollection(xt.toGeometryArray(i)):this._factory.buildGeometry(i)},cr.prototype.transform=function(t){if(this._inputGeom=t,this._factory=t.getFactory(),t instanceof _r)return this.transformPoint(t,null);if(t instanceof xa)return this.transformMultiPoint(t,null);if(t instanceof si)return this.transformLinearRing(t,null);if(t instanceof ce)return this.transformLineString(t,null);if(t instanceof Fs)return this.transformMultiLineString(t,null);if(t instanceof Ie)return this.transformPolygon(t,null);if(t instanceof oi)return this.transformMultiPolygon(t,null);if(t instanceof Qe)return this.transformGeometryCollection(t,null);throw new ae("Unknown Geometry subtype: "+t.getClass().getName())},cr.prototype.transformLinearRing=function(t,e){var r=this.transformCoordinates(t.getCoordinateSequence(),t);if(r===null)return this._factory.createLinearRing(null);var i=r.size();return i>0&&i<4&&!this._preserveType?this._factory.createLineString(r):this._factory.createLinearRing(r)},cr.prototype.interfaces_=function(){return[]},cr.prototype.getClass=function(){return cr};var di=function n(){if(this._snapTolerance=0,this._srcPts=null,this._seg=new ut,this._allowSnappingToSourceVertices=!1,this._isClosed=!1,arguments[0]instanceof ce&&typeof arguments[1]=="number"){var t=arguments[0],e=arguments[1];n.call(this,t.getCoordinates(),e)}else if(arguments[0]instanceof Array&&typeof arguments[1]=="number"){var r=arguments[0],i=arguments[1];this._srcPts=r,this._isClosed=n.isClosed(r),this._snapTolerance=i}};di.prototype.snapVertices=function(t,e){for(var r=this,i=this._isClosed?t.size()-1:t.size(),s=0;s<i;s++){var o=t.get(s),a=r.findSnapForVertex(o,e);a!==null&&(t.set(s,new D(a)),s===0&&r._isClosed&&t.set(t.size()-1,new D(a)))}},di.prototype.findSnapForVertex=function(t,e){for(var r=this,i=0;i<e.length;i++){if(t.equals2D(e[i]))return null;if(t.distance(e[i])<r._snapTolerance)return e[i]}return null},di.prototype.snapTo=function(t){var e=new ul(this._srcPts);this.snapVertices(e,t),this.snapSegments(e,t);var r=e.toCoordinateArray();return r},di.prototype.snapSegments=function(t,e){var r=this;if(e.length===0)return null;var i=e.length;e[0].equals2D(e[e.length-1])&&(i=e.length-1);for(var s=0;s<i;s++){var o=e[s],a=r.findSegmentIndexToSnap(o,t);a>=0&&t.add(a+1,new D(o),!1)}},di.prototype.findSegmentIndexToSnap=function(t,e){for(var r=this,i=yt.MAX_VALUE,s=-1,o=0;o<e.size()-1;o++){if(r._seg.p0=e.get(o),r._seg.p1=e.get(o+1),r._seg.p0.equals2D(t)||r._seg.p1.equals2D(t)){if(r._allowSnappingToSourceVertices)continue;return-1}var a=r._seg.distance(t);a<r._snapTolerance&&a<i&&(i=a,s=o)}return s},di.prototype.setAllowSnappingToSourceVertices=function(t){this._allowSnappingToSourceVertices=t},di.prototype.interfaces_=function(){return[]},di.prototype.getClass=function(){return di},di.isClosed=function(t){return t.length<=1?!1:t[0].equals2D(t[t.length-1])};var me=function(t){this._srcGeom=t||null},Tv={SNAP_PRECISION_FACTOR:{configurable:!0}};me.prototype.snapTo=function(t,e){var r=this.extractTargetCoordinates(t),i=new Av(e,r);return i.transform(this._srcGeom)},me.prototype.snapToSelf=function(t,e){var r=this.extractTargetCoordinates(this._srcGeom),i=new Av(t,r,!0),s=i.transform(this._srcGeom),o=s;return e&&pt(o,ns)&&(o=s.buffer(0)),o},me.prototype.computeSnapTolerance=function(t){var e=this.computeMinimumSegmentLength(t),r=e/10;return r},me.prototype.extractTargetCoordinates=function(t){for(var e=new xn,r=t.getCoordinates(),i=0;i<r.length;i++)e.add(r[i]);return e.toArray(new Array(0).fill(null))},me.prototype.computeMinimumSegmentLength=function(t){for(var e=yt.MAX_VALUE,r=0;r<t.length-1;r++){var i=t[r].distance(t[r+1]);i<e&&(e=i)}return e},me.prototype.interfaces_=function(){return[]},me.prototype.getClass=function(){return me},me.snap=function(t,e,r){var i=new Array(2).fill(null),s=new me(t);i[0]=s.snapTo(e,r);var o=new me(e);return i[1]=o.snapTo(i[0],r),i},me.computeOverlaySnapTolerance=function(){if(arguments.length===1){var t=arguments[0],e=me.computeSizeBasedSnapTolerance(t),r=t.getPrecisionModel();if(r.getType()===Ut.FIXED){var i=1/r.getScale()*2/1.415;i>e&&(e=i)}return e}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return Math.min(me.computeOverlaySnapTolerance(s),me.computeOverlaySnapTolerance(o))}},me.computeSizeBasedSnapTolerance=function(t){var e=t.getEnvelopeInternal(),r=Math.min(e.getHeight(),e.getWidth()),i=r*me.SNAP_PRECISION_FACTOR;return i},me.snapToSelf=function(t,e,r){var i=new me(t);return i.snapToSelf(e,r)},Tv.SNAP_PRECISION_FACTOR.get=function(){return 1e-9},Object.defineProperties(me,Tv);var Av=function(n){function t(e,r,i){n.call(this),this._snapTolerance=e||null,this._snapPts=r||null,this._isSelfSnap=i!==void 0?i:!1}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.snapLine=function(r,i){var s=new di(r,this._snapTolerance);return s.setAllowSnappingToSourceVertices(this._isSelfSnap),s.snapTo(i)},t.prototype.transformCoordinates=function(r,i){var s=r.toCoordinateArray(),o=this.snapLine(s,this._snapPts);return this._factory.getCoordinateSequenceFactory().create(o)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(cr),rr=function(){this._isFirst=!0,this._commonMantissaBitsCount=53,this._commonBits=0,this._commonSignExp=null};rr.prototype.getCommon=function(){return yt.longBitsToDouble(this._commonBits)},rr.prototype.add=function(t){var e=yt.doubleToLongBits(t);if(this._isFirst)return this._commonBits=e,this._commonSignExp=rr.signExpBits(this._commonBits),this._isFirst=!1,null;var r=rr.signExpBits(e);if(r!==this._commonSignExp)return this._commonBits=0,null;this._commonMantissaBitsCount=rr.numCommonMostSigMantissaBits(this._commonBits,e),this._commonBits=rr.zeroLowerBits(this._commonBits,64-(12+this._commonMantissaBitsCount))},rr.prototype.toString=function(){if(arguments.length===1){var t=arguments[0],e=yt.longBitsToDouble(t),r=yt.toBinaryString(t),i="0000000000000000000000000000000000000000000000000000000000000000"+r,s=i.substring(i.length-64),o=s.substring(0,1)+" "+s.substring(1,12)+"(exp) "+s.substring(12)+" [ "+e+" ]";return o}},rr.prototype.interfaces_=function(){return[]},rr.prototype.getClass=function(){return rr},rr.getBit=function(t,e){var r=1<<e;return(t&r)!==0?1:0},rr.signExpBits=function(t){return t>>52},rr.zeroLowerBits=function(t,e){var r=(1<<e)-1,i=~r,s=t&i;return s},rr.numCommonMostSigMantissaBits=function(t,e){for(var r=0,i=52;i>=0;i--){if(rr.getBit(t,i)!==rr.getBit(e,i))return r;r++}return 52};var cs=function(){this._commonCoord=null,this._ccFilter=new Ao},qf={CommonCoordinateFilter:{configurable:!0},Translater:{configurable:!0}};cs.prototype.addCommonBits=function(t){var e=new fs(this._commonCoord);t.apply(e),t.geometryChanged()},cs.prototype.removeCommonBits=function(t){if(this._commonCoord.x===0&&this._commonCoord.y===0)return t;var e=new D(this._commonCoord);e.x=-e.x,e.y=-e.y;var r=new fs(e);return t.apply(r),t.geometryChanged(),t},cs.prototype.getCommonCoordinate=function(){return this._commonCoord},cs.prototype.add=function(t){t.apply(this._ccFilter),this._commonCoord=this._ccFilter.getCommonCoordinate()},cs.prototype.interfaces_=function(){return[]},cs.prototype.getClass=function(){return cs},qf.CommonCoordinateFilter.get=function(){return Ao},qf.Translater.get=function(){return fs},Object.defineProperties(cs,qf);var Ao=function(){this._commonBitsX=new rr,this._commonBitsY=new rr};Ao.prototype.filter=function(t){this._commonBitsX.add(t.x),this._commonBitsY.add(t.y)},Ao.prototype.getCommonCoordinate=function(){return new D(this._commonBitsX.getCommon(),this._commonBitsY.getCommon())},Ao.prototype.interfaces_=function(){return[ii]},Ao.prototype.getClass=function(){return Ao};var fs=function(){this.trans=null;var t=arguments[0];this.trans=t};fs.prototype.filter=function(t,e){var r=t.getOrdinate(e,0)+this.trans.x,i=t.getOrdinate(e,1)+this.trans.y;t.setOrdinate(e,0,r),t.setOrdinate(e,1,i)},fs.prototype.isDone=function(){return!1},fs.prototype.isGeometryChanged=function(){return!0},fs.prototype.interfaces_=function(){return[fn]},fs.prototype.getClass=function(){return fs};var Ae=function(t,e){this._geom=new Array(2).fill(null),this._snapTolerance=null,this._cbr=null,this._geom[0]=t,this._geom[1]=e,this.computeSnapTolerance()};Ae.prototype.selfSnap=function(t){var e=new me(t),r=e.snapTo(t,this._snapTolerance);return r},Ae.prototype.removeCommonBits=function(t){this._cbr=new cs,this._cbr.add(t[0]),this._cbr.add(t[1]);var e=new Array(2).fill(null);return e[0]=this._cbr.removeCommonBits(t[0].copy()),e[1]=this._cbr.removeCommonBits(t[1].copy()),e},Ae.prototype.prepareResult=function(t){return this._cbr.addCommonBits(t),t},Ae.prototype.getResultGeometry=function(t){var e=this.snap(this._geom),r=St.overlayOp(e[0],e[1],t);return this.prepareResult(r)},Ae.prototype.checkValid=function(t){t.isValid()||Le.out.println("Snapped geometry is invalid")},Ae.prototype.computeSnapTolerance=function(){this._snapTolerance=me.computeOverlaySnapTolerance(this._geom[0],this._geom[1])},Ae.prototype.snap=function(t){var e=this.removeCommonBits(t),r=me.snap(e[0],e[1],this._snapTolerance);return r},Ae.prototype.interfaces_=function(){return[]},Ae.prototype.getClass=function(){return Ae},Ae.overlayOp=function(t,e,r){var i=new Ae(t,e);return i.getResultGeometry(r)},Ae.union=function(t,e){return Ae.overlayOp(t,e,St.UNION)},Ae.intersection=function(t,e){return Ae.overlayOp(t,e,St.INTERSECTION)},Ae.symDifference=function(t,e){return Ae.overlayOp(t,e,St.SYMDIFFERENCE)},Ae.difference=function(t,e){return Ae.overlayOp(t,e,St.DIFFERENCE)};var nr=function(t,e){this._geom=new Array(2).fill(null),this._geom[0]=t,this._geom[1]=e};nr.prototype.getResultGeometry=function(t){var e=null,r=!1,i=null;try{e=St.overlayOp(this._geom[0],this._geom[1],t);var s=!0;s&&(r=!0)}catch(o){if(o instanceof xi)i=o;else throw o}finally{}if(!r)try{e=Ae.overlayOp(this._geom[0],this._geom[1],t)}catch(o){throw o instanceof xi?i:o}finally{}return e},nr.prototype.interfaces_=function(){return[]},nr.prototype.getClass=function(){return nr},nr.overlayOp=function(t,e,r){var i=new nr(t,e);return i.getResultGeometry(r)},nr.union=function(t,e){return nr.overlayOp(t,e,St.UNION)},nr.intersection=function(t,e){return nr.overlayOp(t,e,St.INTERSECTION)},nr.symDifference=function(t,e){return nr.overlayOp(t,e,St.SYMDIFFERENCE)},nr.difference=function(t,e){return nr.overlayOp(t,e,St.DIFFERENCE)};var Cl=function(){this.mce=null,this.chainIndex=null;var t=arguments[0],e=arguments[1];this.mce=t,this.chainIndex=e};Cl.prototype.computeIntersections=function(t,e){this.mce.computeIntersectsForChain(this.chainIndex,t.mce,t.chainIndex,e)},Cl.prototype.interfaces_=function(){return[]},Cl.prototype.getClass=function(){return Cl};var Cr=function n(){if(this._label=null,this._xValue=null,this._eventType=null,this._insertEvent=null,this._deleteEventIndex=null,this._obj=null,arguments.length===2){var t=arguments[0],e=arguments[1];this._eventType=n.DELETE,this._xValue=t,this._insertEvent=e}else if(arguments.length===3){var r=arguments[0],i=arguments[1],s=arguments[2];this._eventType=n.INSERT,this._label=r,this._xValue=i,this._obj=s}},Wf={INSERT:{configurable:!0},DELETE:{configurable:!0}};Cr.prototype.isDelete=function(){return this._eventType===Cr.DELETE},Cr.prototype.setDeleteEventIndex=function(t){this._deleteEventIndex=t},Cr.prototype.getObject=function(){return this._obj},Cr.prototype.compareTo=function(t){var e=t;return this._xValue<e._xValue?-1:this._xValue>e._xValue?1:this._eventType<e._eventType?-1:this._eventType>e._eventType?1:0},Cr.prototype.getInsertEvent=function(){return this._insertEvent},Cr.prototype.isInsert=function(){return this._eventType===Cr.INSERT},Cr.prototype.isSameLabel=function(t){return this._label===null?!1:this._label===t._label},Cr.prototype.getDeleteEventIndex=function(){return this._deleteEventIndex},Cr.prototype.interfaces_=function(){return[Yr]},Cr.prototype.getClass=function(){return Cr},Wf.INSERT.get=function(){return 1},Wf.DELETE.get=function(){return 2},Object.defineProperties(Cr,Wf);var Fh=function(){};Fh.prototype.interfaces_=function(){return[]},Fh.prototype.getClass=function(){return Fh};var Ue=function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._properIntersectionPoint=null,this._li=null,this._includeProper=null,this._recordIsolated=null,this._isSelfIntersection=null,this._numIntersections=0,this.numTests=0,this._bdyNodes=null,this._isDone=!1,this._isDoneWhenProperInt=!1;var t=arguments[0],e=arguments[1],r=arguments[2];this._li=t,this._includeProper=e,this._recordIsolated=r};Ue.prototype.isTrivialIntersection=function(t,e,r,i){if(t===r&&this._li.getIntersectionNum()===1){if(Ue.isAdjacentSegments(e,i))return!0;if(t.isClosed()){var s=t.getNumPoints()-1;if(e===0&&i===s||i===0&&e===s)return!0}}return!1},Ue.prototype.getProperIntersectionPoint=function(){return this._properIntersectionPoint},Ue.prototype.setIsDoneIfProperInt=function(t){this._isDoneWhenProperInt=t},Ue.prototype.hasProperInteriorIntersection=function(){return this._hasProperInterior},Ue.prototype.isBoundaryPointInternal=function(t,e){for(var r=e.iterator();r.hasNext();){var i=r.next(),s=i.getCoordinate();if(t.isIntersection(s))return!0}return!1},Ue.prototype.hasProperIntersection=function(){return this._hasProper},Ue.prototype.hasIntersection=function(){return this._hasIntersection},Ue.prototype.isDone=function(){return this._isDone},Ue.prototype.isBoundaryPoint=function(t,e){return e===null?!1:!!(this.isBoundaryPointInternal(t,e[0])||this.isBoundaryPointInternal(t,e[1]))},Ue.prototype.setBoundaryNodes=function(t,e){this._bdyNodes=new Array(2).fill(null),this._bdyNodes[0]=t,this._bdyNodes[1]=e},Ue.prototype.addIntersections=function(t,e,r,i){if(t===r&&e===i)return null;this.numTests++;var s=t.getCoordinates()[e],o=t.getCoordinates()[e+1],a=r.getCoordinates()[i],u=r.getCoordinates()[i+1];this._li.computeIntersection(s,o,a,u),this._li.hasIntersection()&&(this._recordIsolated&&(t.setIsolated(!1),r.setIsolated(!1)),this._numIntersections++,this.isTrivialIntersection(t,e,r,i)||(this._hasIntersection=!0,(this._includeProper||!this._li.isProper())&&(t.addIntersections(this._li,e,0),r.addIntersections(this._li,i,1)),this._li.isProper()&&(this._properIntersectionPoint=this._li.getIntersection(0).copy(),this._hasProper=!0,this._isDoneWhenProperInt&&(this._isDone=!0),this.isBoundaryPoint(this._li,this._bdyNodes)||(this._hasProperInterior=!0))))},Ue.prototype.interfaces_=function(){return[]},Ue.prototype.getClass=function(){return Ue},Ue.isAdjacentSegments=function(t,e){return Math.abs(t-e)===1};var CI=function(n){function t(){n.call(this),this.events=new j,this.nOverlaps=null}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.prepareEvents=function(){var r=this;gn.sort(this.events);for(var i=0;i<this.events.size();i++){var s=r.events.get(i);s.isDelete()&&s.getInsertEvent().setDeleteEventIndex(i)}},t.prototype.computeIntersections=function(){var r=this;if(arguments.length===1){var i=arguments[0];this.nOverlaps=0,this.prepareEvents();for(var s=0;s<this.events.size();s++){var o=r.events.get(s);if(o.isInsert()&&r.processOverlaps(s,o.getDeleteEventIndex(),o,i),i.isDone())break}}else if(arguments.length===3){if(arguments[2]instanceof Ue&&pt(arguments[0],hn)&&pt(arguments[1],hn)){var a=arguments[0],u=arguments[1],l=arguments[2];this.addEdges(a,a),this.addEdges(u,u),this.computeIntersections(l)}else if(typeof arguments[2]=="boolean"&&pt(arguments[0],hn)&&arguments[1]instanceof Ue){var c=arguments[0],h=arguments[1],f=arguments[2];f?this.addEdges(c,null):this.addEdges(c),this.computeIntersections(h)}}},t.prototype.addEdge=function(r,i){for(var s=this,o=r.getMonotoneChainEdge(),a=o.getStartIndexes(),u=0;u<a.length-1;u++){var l=new Cl(o,u),c=new Cr(i,o.getMinX(u),l);s.events.add(c),s.events.add(new Cr(o.getMaxX(u),c))}},t.prototype.processOverlaps=function(r,i,s,o){for(var a=this,u=s.getObject(),l=r;l<i;l++){var c=a.events.get(l);if(c.isInsert()){var h=c.getObject();s.isSameLabel(c)||(u.computeIntersections(h,o),a.nOverlaps++)}}},t.prototype.addEdges=function(){var r=this;if(arguments.length===1)for(var i=arguments[0],s=i.iterator();s.hasNext();){var o=s.next();r.addEdge(o,o)}else if(arguments.length===2)for(var a=arguments[0],u=arguments[1],l=a.iterator();l.hasNext();){var c=l.next();r.addEdge(c,u)}},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Fh),gi=function(){this._min=yt.POSITIVE_INFINITY,this._max=yt.NEGATIVE_INFINITY},Ov={NodeComparator:{configurable:!0}};gi.prototype.getMin=function(){return this._min},gi.prototype.intersects=function(t,e){return!(this._min>e||this._max<t)},gi.prototype.getMax=function(){return this._max},gi.prototype.toString=function(){return ln.toLineString(new D(this._min,0),new D(this._max,0))},gi.prototype.interfaces_=function(){return[]},gi.prototype.getClass=function(){return gi},Ov.NodeComparator.get=function(){return Pl},Object.defineProperties(gi,Ov);var Pl=function(){};Pl.prototype.compare=function(t,e){var r=t,i=e,s=(r._min+r._max)/2,o=(i._min+i._max)/2;return s<o?-1:s>o?1:0},Pl.prototype.interfaces_=function(){return[ya]},Pl.prototype.getClass=function(){return Pl};var PI=function(n){function t(){n.call(this),this._item=null;var e=arguments[0],r=arguments[1],i=arguments[2];this._min=e,this._max=r,this._item=i}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.query=function(r,i,s){if(!this.intersects(r,i))return null;s.visitItem(this._item)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(gi),II=function(n){function t(){n.call(this),this._node1=null,this._node2=null;var e=arguments[0],r=arguments[1];this._node1=e,this._node2=r,this.buildExtent(this._node1,this._node2)}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.buildExtent=function(r,i){this._min=Math.min(r._min,i._min),this._max=Math.max(r._max,i._max)},t.prototype.query=function(r,i,s){if(!this.intersects(r,i))return null;this._node1!==null&&this._node1.query(r,i,s),this._node2!==null&&this._node2.query(r,i,s)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(gi),pi=function(){this._leaves=new j,this._root=null,this._level=0};pi.prototype.buildTree=function(){var t=this;gn.sort(this._leaves,new gi.NodeComparator);for(var e=this._leaves,r=null,i=new j;;){if(t.buildLevel(e,i),i.size()===1)return i.get(0);r=e,e=i,i=r}},pi.prototype.insert=function(t,e,r){if(this._root!==null)throw new Error("Index cannot be added to once it has been queried");this._leaves.add(new PI(t,e,r))},pi.prototype.query=function(t,e,r){this.init(),this._root.query(t,e,r)},pi.prototype.buildRoot=function(){if(this._root!==null)return null;this._root=this.buildTree()},pi.prototype.printNode=function(t){Le.out.println(ln.toLineString(new D(t._min,this._level),new D(t._max,this._level)))},pi.prototype.init=function(){if(this._root!==null)return null;this.buildRoot()},pi.prototype.buildLevel=function(t,e){this._level++,e.clear();for(var r=0;r<t.size();r+=2){var i=t.get(r),s=r+1<t.size()?t.get(r):null;if(s===null)e.add(i);else{var o=new II(t.get(r),t.get(r+1));e.add(o)}}},pi.prototype.interfaces_=function(){return[]},pi.prototype.getClass=function(){return pi};var Fa=function(){this._items=new j};Fa.prototype.visitItem=function(t){this._items.add(t)},Fa.prototype.getItems=function(){return this._items},Fa.prototype.interfaces_=function(){return[is]},Fa.prototype.getClass=function(){return Fa};var Ga=function(){this._index=null;var t=arguments[0];if(!pt(t,ns))throw new ae("Argument must be Polygonal");this._index=new Ws(t)},Hf={SegmentVisitor:{configurable:!0},IntervalIndexedGeometry:{configurable:!0}};Ga.prototype.locate=function(t){var e=new Nn(t),r=new ka(e);return this._index.query(t.y,t.y,r),e.getLocation()},Ga.prototype.interfaces_=function(){return[Da]},Ga.prototype.getClass=function(){return Ga},Hf.SegmentVisitor.get=function(){return ka},Hf.IntervalIndexedGeometry.get=function(){return Ws},Object.defineProperties(Ga,Hf);var ka=function(){this._counter=null;var t=arguments[0];this._counter=t};ka.prototype.visitItem=function(t){var e=t;this._counter.countSegment(e.getCoordinate(0),e.getCoordinate(1))},ka.prototype.interfaces_=function(){return[is]},ka.prototype.getClass=function(){return ka};var Ws=function(){this._index=new pi;var t=arguments[0];this.init(t)};Ws.prototype.init=function(t){for(var e=this,r=Ge.getLines(t),i=r.iterator();i.hasNext();){var s=i.next(),o=s.getCoordinates();e.addLine(o)}},Ws.prototype.addLine=function(t){for(var e=this,r=1;r<t.length;r++){var i=new ut(t[r-1],t[r]),s=Math.min(i.p0.y,i.p1.y),o=Math.max(i.p0.y,i.p1.y);e._index.insert(s,o,i)}},Ws.prototype.query=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],r=new Fa;return this._index.query(t,e,r),r.getItems()}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];this._index.query(i,s,o)}},Ws.prototype.interfaces_=function(){return[]},Ws.prototype.getClass=function(){return Ws};var Il=function(n){function t(){if(n.call(this),this._parentGeom=null,this._lineEdgeMap=new dv,this._boundaryNodeRule=null,this._useBoundaryDeterminationRule=!0,this._argIndex=null,this._boundaryNodes=null,this._hasTooFewPoints=!1,this._invalidPoint=null,this._areaPtLocator=null,this._ptLocator=new vn,arguments.length===2){var e=arguments[0],r=arguments[1],i=jr.OGC_SFS_BOUNDARY_RULE;this._argIndex=e,this._parentGeom=r,this._boundaryNodeRule=i,r!==null&&this.add(r)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];this._argIndex=s,this._parentGeom=o,this._boundaryNodeRule=a,o!==null&&this.add(o)}}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.insertBoundaryPoint=function(r,i){var s=this._nodes.addNode(i),o=s.getLabel(),a=1,u=F.NONE;u=o.getLocation(r,B.ON),u===F.BOUNDARY&&a++;var l=t.determineBoundary(this._boundaryNodeRule,a);o.setLocation(r,l)},t.prototype.computeSelfNodes=function(){if(arguments.length===2){var r=arguments[0],i=arguments[1];return this.computeSelfNodes(r,i,!1)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2],u=new Ue(s,!0,!1);u.setIsDoneIfProperInt(a);var l=this.createEdgeSetIntersector(),c=this._parentGeom instanceof si||this._parentGeom instanceof Ie||this._parentGeom instanceof oi,h=o||!c;return l.computeIntersections(this._edges,u,h),this.addSelfIntersectionNodes(this._argIndex),u}},t.prototype.computeSplitEdges=function(r){for(var i=this._edges.iterator();i.hasNext();){var s=i.next();s.eiList.addSplitEdges(r)}},t.prototype.computeEdgeIntersections=function(r,i,s){var o=new Ue(i,s,!0);o.setBoundaryNodes(this.getBoundaryNodes(),r.getBoundaryNodes());var a=this.createEdgeSetIntersector();return a.computeIntersections(this._edges,r._edges,o),o},t.prototype.getGeometry=function(){return this._parentGeom},t.prototype.getBoundaryNodeRule=function(){return this._boundaryNodeRule},t.prototype.hasTooFewPoints=function(){return this._hasTooFewPoints},t.prototype.addPoint=function(){if(arguments[0]instanceof _r){var r=arguments[0],i=r.getCoordinate();this.insertPoint(this._argIndex,i,F.INTERIOR)}else if(arguments[0]instanceof D){var s=arguments[0];this.insertPoint(this._argIndex,s,F.INTERIOR)}},t.prototype.addPolygon=function(r){var i=this;this.addPolygonRing(r.getExteriorRing(),F.EXTERIOR,F.INTERIOR);for(var s=0;s<r.getNumInteriorRing();s++){var o=r.getInteriorRingN(s);i.addPolygonRing(o,F.INTERIOR,F.EXTERIOR)}},t.prototype.addEdge=function(r){this.insertEdge(r);var i=r.getCoordinates();this.insertPoint(this._argIndex,i[0],F.BOUNDARY),this.insertPoint(this._argIndex,i[i.length-1],F.BOUNDARY)},t.prototype.addLineString=function(r){var i=Nt.removeRepeatedPoints(r.getCoordinates());if(i.length<2)return this._hasTooFewPoints=!0,this._invalidPoint=i[0],null;var s=new Rh(i,new Yt(this._argIndex,F.INTERIOR));this._lineEdgeMap.put(r,s),this.insertEdge(s),Pt.isTrue(i.length>=2,"found LineString with single point"),this.insertBoundaryPoint(this._argIndex,i[0]),this.insertBoundaryPoint(this._argIndex,i[i.length-1])},t.prototype.getInvalidPoint=function(){return this._invalidPoint},t.prototype.getBoundaryPoints=function(){for(var r=this.getBoundaryNodes(),i=new Array(r.size()).fill(null),s=0,o=r.iterator();o.hasNext();){var a=o.next();i[s++]=a.getCoordinate().copy()}return i},t.prototype.getBoundaryNodes=function(){return this._boundaryNodes===null&&(this._boundaryNodes=this._nodes.getBoundaryNodes(this._argIndex)),this._boundaryNodes},t.prototype.addSelfIntersectionNode=function(r,i,s){if(this.isBoundaryNode(r,i))return null;s===F.BOUNDARY&&this._useBoundaryDeterminationRule?this.insertBoundaryPoint(r,i):this.insertPoint(r,i,s)},t.prototype.addPolygonRing=function(r,i,s){if(r.isEmpty())return null;var o=Nt.removeRepeatedPoints(r.getCoordinates());if(o.length<4)return this._hasTooFewPoints=!0,this._invalidPoint=o[0],null;var a=i,u=s;K.isCCW(o)&&(a=s,u=i);var l=new Rh(o,new Yt(this._argIndex,F.BOUNDARY,a,u));this._lineEdgeMap.put(r,l),this.insertEdge(l),this.insertPoint(this._argIndex,o[0],F.BOUNDARY)},t.prototype.insertPoint=function(r,i,s){var o=this._nodes.addNode(i),a=o.getLabel();a===null?o._label=new Yt(r,s):a.setLocation(r,s)},t.prototype.createEdgeSetIntersector=function(){return new CI},t.prototype.addSelfIntersectionNodes=function(r){for(var i=this,s=this._edges.iterator();s.hasNext();)for(var o=s.next(),a=o.getLabel().getLocation(r),u=o.eiList.iterator();u.hasNext();){var l=u.next();i.addSelfIntersectionNode(r,l.coord,a)}},t.prototype.add=function(){if(arguments.length===1){var r=arguments[0];if(r.isEmpty())return null;if(r instanceof oi&&(this._useBoundaryDeterminationRule=!1),r instanceof Ie)this.addPolygon(r);else if(r instanceof ce)this.addLineString(r);else if(r instanceof _r)this.addPoint(r);else if(r instanceof xa)this.addCollection(r);else if(r instanceof Fs)this.addCollection(r);else if(r instanceof oi)this.addCollection(r);else if(r instanceof Qe)this.addCollection(r);else throw new Error(r.getClass().getName())}else return n.prototype.add.apply(this,arguments)},t.prototype.addCollection=function(r){for(var i=this,s=0;s<r.getNumGeometries();s++){var o=r.getGeometryN(s);i.add(o)}},t.prototype.locate=function(r){return pt(this._parentGeom,ns)&&this._parentGeom.getNumGeometries()>50?(this._areaPtLocator===null&&(this._areaPtLocator=new Ga(this._parentGeom)),this._areaPtLocator.locate(r)):this._ptLocator.locate(r,this._parentGeom)},t.prototype.findEdge=function(){if(arguments.length===1){var r=arguments[0];return this._lineEdgeMap.get(r)}else return n.prototype.findEdge.apply(this,arguments)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t.determineBoundary=function(r,i){return r.isInBoundary(i)?F.BOUNDARY:F.INTERIOR},t}(he),Va=function(){if(this._li=new Ds,this._resultPrecisionModel=null,this._arg=null,arguments.length===1){var t=arguments[0];this.setComputationPrecision(t.getPrecisionModel()),this._arg=new Array(1).fill(null),this._arg[0]=new Il(0,t)}else if(arguments.length===2){var e=arguments[0],r=arguments[1],i=jr.OGC_SFS_BOUNDARY_RULE;e.getPrecisionModel().compareTo(r.getPrecisionModel())>=0?this.setComputationPrecision(e.getPrecisionModel()):this.setComputationPrecision(r.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Il(0,e,i),this._arg[1]=new Il(1,r,i)}else if(arguments.length===3){var s=arguments[0],o=arguments[1],a=arguments[2];s.getPrecisionModel().compareTo(o.getPrecisionModel())>=0?this.setComputationPrecision(s.getPrecisionModel()):this.setComputationPrecision(o.getPrecisionModel()),this._arg=new Array(2).fill(null),this._arg[0]=new Il(0,s,a),this._arg[1]=new Il(1,o,a)}};Va.prototype.getArgGeometry=function(t){return this._arg[t].getGeometry()},Va.prototype.setComputationPrecision=function(t){this._resultPrecisionModel=t,this._li.setPrecisionModel(this._resultPrecisionModel)},Va.prototype.interfaces_=function(){return[]},Va.prototype.getClass=function(){return Va};var Hs=function(){};Hs.prototype.interfaces_=function(){return[]},Hs.prototype.getClass=function(){return Hs},Hs.map=function(){if(arguments[0]instanceof gt&&pt(arguments[1],Hs.MapOp)){for(var t=arguments[0],e=arguments[1],r=new j,i=0;i<t.getNumGeometries();i++){var s=e.map(t.getGeometryN(i));s!==null&&r.add(s)}return t.getFactory().buildGeometry(r)}else if(pt(arguments[0],Pe)&&pt(arguments[1],Hs.MapOp)){for(var o=arguments[0],a=arguments[1],u=new j,l=o.iterator();l.hasNext();){var c=l.next(),h=a.map(c);h!==null&&u.add(h)}return u}},Hs.MapOp=function(){};var St=function(n){function t(){var e=arguments[0],r=arguments[1];n.call(this,e,r),this._ptLocator=new vn,this._geomFact=null,this._resultGeom=null,this._graph=null,this._edgeList=new pn,this._resultPolyList=new j,this._resultLineList=new j,this._resultPointList=new j,this._graph=new he(new Cv),this._geomFact=e.getFactory()}return n&&(t.__proto__=n),t.prototype=Object.create(n&&n.prototype),t.prototype.constructor=t,t.prototype.insertUniqueEdge=function(r){var i=this._edgeList.findEqualEdge(r);if(i!==null){var s=i.getLabel(),o=r.getLabel();i.isPointwiseEqual(r)||(o=new Yt(r.getLabel()),o.flip());var a=i.getDepth();a.isNull()&&a.add(s),a.add(o),s.merge(o)}else this._edgeList.add(r)},t.prototype.getGraph=function(){return this._graph},t.prototype.cancelDuplicateResultEdges=function(){for(var r=this._graph.getEdgeEnds().iterator();r.hasNext();){var i=r.next(),s=i.getSym();i.isInResult()&&s.isInResult()&&(i.setInResult(!1),s.setInResult(!1))}},t.prototype.isCoveredByLA=function(r){return!!(this.isCovered(r,this._resultLineList)||this.isCovered(r,this._resultPolyList))},t.prototype.computeGeometry=function(r,i,s,o){var a=new j;return a.addAll(r),a.addAll(i),a.addAll(s),a.isEmpty()?t.createEmptyResult(o,this._arg[0].getGeometry(),this._arg[1].getGeometry(),this._geomFact):this._geomFact.buildGeometry(a)},t.prototype.mergeSymLabels=function(){for(var r=this._graph.getNodes().iterator();r.hasNext();){var i=r.next();i.getEdges().mergeSymLabels()}},t.prototype.isCovered=function(r,i){for(var s=this,o=i.iterator();o.hasNext();){var a=o.next(),u=s._ptLocator.locate(r,a);if(u!==F.EXTERIOR)return!0}return!1},t.prototype.replaceCollapsedEdges=function(){for(var r=new j,i=this._edgeList.iterator();i.hasNext();){var s=i.next();s.isCollapsed()&&(i.remove(),r.add(s.getCollapsedEdge()))}this._edgeList.addAll(r)},t.prototype.updateNodeLabelling=function(){for(var r=this._graph.getNodes().iterator();r.hasNext();){var i=r.next(),s=i.getEdges().getLabel();i.getLabel().merge(s)}},t.prototype.getResultGeometry=function(r){return this.computeOverlay(r),this._resultGeom},t.prototype.insertUniqueEdges=function(r){for(var i=this,s=r.iterator();s.hasNext();){var o=s.next();i.insertUniqueEdge(o)}},t.prototype.computeOverlay=function(r){this.copyPoints(0),this.copyPoints(1),this._arg[0].computeSelfNodes(this._li,!1),this._arg[1].computeSelfNodes(this._li,!1),this._arg[0].computeEdgeIntersections(this._arg[1],this._li,!0);var i=new j;this._arg[0].computeSplitEdges(i),this._arg[1].computeSplitEdges(i),this.insertUniqueEdges(i),this.computeLabelsFromDepths(),this.replaceCollapsedEdges(),qs.checkValid(this._edgeList.getEdges()),this._graph.addEdges(this._edgeList.getEdges()),this.computeLabelling(),this.labelIncompleteNodes(),this.findResultAreaEdges(r),this.cancelDuplicateResultEdges();var s=new wr(this._geomFact);s.add(this._graph),this._resultPolyList=s.getPolygons();var o=new zn(this,this._geomFact,this._ptLocator);this._resultLineList=o.build(r);var a=new To(this,this._geomFact,this._ptLocator);this._resultPointList=a.build(r),this._resultGeom=this.computeGeometry(this._resultPointList,this._resultLineList,this._resultPolyList,r)},t.prototype.labelIncompleteNode=function(r,i){var s=this._ptLocator.locate(r.getCoordinate(),this._arg[i].getGeometry());r.getLabel().setLocation(i,s)},t.prototype.copyPoints=function(r){for(var i=this,s=this._arg[r].getNodeIterator();s.hasNext();){var o=s.next(),a=i._graph.addNode(o.getCoordinate());a.setLabel(r,o.getLabel().getLocation(r))}},t.prototype.findResultAreaEdges=function(r){for(var i=this._graph.getEdgeEnds().iterator();i.hasNext();){var s=i.next(),o=s.getLabel();o.isArea()&&!s.isInteriorAreaEdge()&&t.isResultOfOp(o.getLocation(0,B.RIGHT),o.getLocation(1,B.RIGHT),r)&&s.setInResult(!0)}},t.prototype.computeLabelsFromDepths=function(){for(var r=this._edgeList.iterator();r.hasNext();){var i=r.next(),s=i.getLabel(),o=i.getDepth();if(!o.isNull()){o.normalize();for(var a=0;a<2;a++)!s.isNull(a)&&s.isArea()&&!o.isNull(a)&&(o.getDelta(a)===0?s.toLine(a):(Pt.isTrue(!o.isNull(a,B.LEFT),"depth of LEFT side has not been initialized"),s.setLocation(a,B.LEFT,o.getLocation(a,B.LEFT)),Pt.isTrue(!o.isNull(a,B.RIGHT),"depth of RIGHT side has not been initialized"),s.setLocation(a,B.RIGHT,o.getLocation(a,B.RIGHT))))}}},t.prototype.computeLabelling=function(){for(var r=this,i=this._graph.getNodes().iterator();i.hasNext();){var s=i.next();s.getEdges().computeLabelling(r._arg)}this.mergeSymLabels(),this.updateNodeLabelling()},t.prototype.labelIncompleteNodes=function(){for(var r=this,i=this._graph.getNodes().iterator();i.hasNext();){var s=i.next(),o=s.getLabel();s.isIsolated()&&(o.isNull(0)?r.labelIncompleteNode(s,0):r.labelIncompleteNode(s,1)),s.getEdges().updateLabelling(o)}},t.prototype.isCoveredByA=function(r){return!!this.isCovered(r,this._resultPolyList)},t.prototype.interfaces_=function(){return[]},t.prototype.getClass=function(){return t},t}(Va);St.overlayOp=function(n,t,e){var r=new St(n,t),i=r.getResultGeometry(e);return i},St.intersection=function(n,t){if(n.isEmpty()||t.isEmpty())return St.createEmptyResult(St.INTERSECTION,n,t,n.getFactory());if(n.isGeometryCollection()){var e=t;return xo.map(n,{interfaces_:function(){return[Hs.MapOp]},map:function(r){return r.intersection(e)}})}return n.checkNotGeometryCollection(n),n.checkNotGeometryCollection(t),nr.overlayOp(n,t,St.INTERSECTION)},St.symDifference=function(n,t){if(n.isEmpty()||t.isEmpty()){if(n.isEmpty()&&t.isEmpty())return St.createEmptyResult(St.SYMDIFFERENCE,n,t,n.getFactory());if(n.isEmpty())return t.copy();if(t.isEmpty())return n.copy()}return n.checkNotGeometryCollection(n),n.checkNotGeometryCollection(t),nr.overlayOp(n,t,St.SYMDIFFERENCE)},St.resultDimension=function(n,t,e){var r=t.getDimension(),i=e.getDimension(),s=-1;switch(n){case St.INTERSECTION:s=Math.min(r,i);break;case St.UNION:s=Math.max(r,i);break;case St.DIFFERENCE:s=r;break;case St.SYMDIFFERENCE:s=Math.max(r,i);break}return s},St.createEmptyResult=function(n,t,e,r){var i=null;switch(St.resultDimension(n,t,e)){case-1:i=r.createGeometryCollection(new Array(0).fill(null));break;case 0:i=r.createPoint();break;case 1:i=r.createLineString();break;case 2:i=r.createPolygon();break}return i},St.difference=function(n,t){return n.isEmpty()?St.createEmptyResult(St.DIFFERENCE,n,t,n.getFactory()):t.isEmpty()?n.copy():(n.checkNotGeometryCollection(n),n.checkNotGeometryCollection(t),nr.overlayOp(n,t,St.DIFFERENCE))},St.isResultOfOp=function(){if(arguments.length===2){var n=arguments[0],t=arguments[1],e=n.getLocation(0),r=n.getLocation(1);return St.isResultOfOp(e,r,t)}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2];switch(i===F.BOUNDARY&&(i=F.INTERIOR),s===F.BOUNDARY&&(s=F.INTERIOR),o){case St.INTERSECTION:return i===F.INTERIOR&&s===F.INTERIOR;case St.UNION:return i===F.INTERIOR||s===F.INTERIOR;case St.DIFFERENCE:return i===F.INTERIOR&&s!==F.INTERIOR;case St.SYMDIFFERENCE:return i===F.INTERIOR&&s!==F.INTERIOR||i!==F.INTERIOR&&s===F.INTERIOR}return!1}},St.INTERSECTION=1,St.UNION=2,St.DIFFERENCE=3,St.SYMDIFFERENCE=4;var ds=function(){this._g=null,this._boundaryDistanceTolerance=null,this._linework=null,this._ptLocator=new vn,this._seg=new ut;var t=arguments[0],e=arguments[1];this._g=t,this._boundaryDistanceTolerance=e,this._linework=this.extractLinework(t)};ds.prototype.isWithinToleranceOfBoundary=function(t){for(var e=this,r=0;r<this._linework.getNumGeometries();r++)for(var i=e._linework.getGeometryN(r),s=i.getCoordinateSequence(),o=0;o<s.size()-1;o++){s.getCoordinate(o,e._seg.p0),s.getCoordinate(o+1,e._seg.p1);var a=e._seg.distance(t);if(a<=e._boundaryDistanceTolerance)return!0}return!1},ds.prototype.getLocation=function(t){return this.isWithinToleranceOfBoundary(t)?F.BOUNDARY:this._ptLocator.locate(t,this._g)},ds.prototype.extractLinework=function(t){var e=new Ua;t.apply(e);var r=e.getLinework(),i=xt.toLineStringArray(r);return t.getFactory().createMultiLineString(i)},ds.prototype.interfaces_=function(){return[]},ds.prototype.getClass=function(){return ds};var Ua=function(){this._linework=null,this._linework=new j};Ua.prototype.getLinework=function(){return this._linework},Ua.prototype.filter=function(t){var e=this;if(t instanceof Ie){var r=t;this._linework.add(r.getExteriorRing());for(var i=0;i<r.getNumInteriorRing();i++)e._linework.add(r.getInteriorRingN(i))}},Ua.prototype.interfaces_=function(){return[Tn]},Ua.prototype.getClass=function(){return Ua};var Xs=function(){this._g=null,this._doLeft=!0,this._doRight=!0;var t=arguments[0];this._g=t};Xs.prototype.extractPoints=function(t,e,r){for(var i=this,s=t.getCoordinates(),o=0;o<s.length-1;o++)i.computeOffsetPoints(s[o],s[o+1],e,r)},Xs.prototype.setSidesToGenerate=function(t,e){this._doLeft=t,this._doRight=e},Xs.prototype.getPoints=function(t){for(var e=this,r=new j,i=Ge.getLines(this._g),s=i.iterator();s.hasNext();){var o=s.next();e.extractPoints(o,t,r)}return r},Xs.prototype.computeOffsetPoints=function(t,e,r,i){var s=e.x-t.x,o=e.y-t.y,a=Math.sqrt(s*s+o*o),u=r*s/a,l=r*o/a,c=(e.x+t.x)/2,h=(e.y+t.y)/2;if(this._doLeft){var f=new D(c-l,h+u);i.add(f)}if(this._doRight){var d=new D(c+l,h-u);i.add(d)}},Xs.prototype.interfaces_=function(){return[]},Xs.prototype.getClass=function(){return Xs};var Vr=function n(){this._geom=null,this._locFinder=null,this._location=new Array(3).fill(null),this._invalidLocation=null,this._boundaryDistanceTolerance=n.TOLERANCE,this._testCoords=new j;var t=arguments[0],e=arguments[1],r=arguments[2];this._boundaryDistanceTolerance=n.computeBoundaryDistanceTolerance(t,e),this._geom=[t,e,r],this._locFinder=[new ds(this._geom[0],this._boundaryDistanceTolerance),new ds(this._geom[1],this._boundaryDistanceTolerance),new ds(this._geom[2],this._boundaryDistanceTolerance)]},Dv={TOLERANCE:{configurable:!0}};Vr.prototype.reportResult=function(t,e,r){Le.out.println("Overlay result invalid - A:"+F.toLocationSymbol(e[0])+" B:"+F.toLocationSymbol(e[1])+" expected:"+(r?"i":"e")+" actual:"+F.toLocationSymbol(e[2]))},Vr.prototype.isValid=function(t){this.addTestPts(this._geom[0]),this.addTestPts(this._geom[1]);var e=this.checkValid(t);return e},Vr.prototype.checkValid=function(){var t=this;if(arguments.length===1){for(var e=arguments[0],r=0;r<this._testCoords.size();r++){var i=t._testCoords.get(r);if(!t.checkValid(e,i))return t._invalidLocation=i,!1}return!0}else if(arguments.length===2){var s=arguments[0],o=arguments[1];return this._location[0]=this._locFinder[0].getLocation(o),this._location[1]=this._locFinder[1].getLocation(o),this._location[2]=this._locFinder[2].getLocation(o),Vr.hasLocation(this._location,F.BOUNDARY)?!0:this.isValidResult(s,this._location)}},Vr.prototype.addTestPts=function(t){var e=new Xs(t);this._testCoords.addAll(e.getPoints(5*this._boundaryDistanceTolerance))},Vr.prototype.isValidResult=function(t,e){var r=St.isResultOfOp(e[0],e[1],t),i=e[2]===F.INTERIOR,s=!(r^i);return s||this.reportResult(t,e,r),s},Vr.prototype.getInvalidLocation=function(){return this._invalidLocation},Vr.prototype.interfaces_=function(){return[]},Vr.prototype.getClass=function(){return Vr},Vr.hasLocation=function(t,e){for(var r=0;r<3;r++)if(t[r]===e)return!0;return!1},Vr.computeBoundaryDistanceTolerance=function(t,e){return Math.min(me.computeSizeBasedSnapTolerance(t),me.computeSizeBasedSnapTolerance(e))},Vr.isValid=function(t,e,r,i){var s=new Vr(t,e,i);return s.isValid(r)},Dv.TOLERANCE.get=function(){return 1e-6},Object.defineProperties(Vr,Dv);var Ur=function n(t){this._geomFactory=null,this._skipEmpty=!1,this._inputGeoms=null,this._geomFactory=n.extractFactory(t),this._inputGeoms=t};Ur.prototype.extractElements=function(t,e){var r=this;if(t===null)return null;for(var i=0;i<t.getNumGeometries();i++){var s=t.getGeometryN(i);r._skipEmpty&&s.isEmpty()||e.add(s)}},Ur.prototype.combine=function(){for(var t=this,e=new j,r=this._inputGeoms.iterator();r.hasNext();){var i=r.next();t.extractElements(i,e)}return e.size()===0?this._geomFactory!==null?this._geomFactory.createGeometryCollection(null):null:this._geomFactory.buildGeometry(e)},Ur.prototype.interfaces_=function(){return[]},Ur.prototype.getClass=function(){return Ur},Ur.combine=function(){if(arguments.length===1){var t=arguments[0],e=new Ur(t);return e.combine()}else if(arguments.length===2){var r=arguments[0],i=arguments[1],s=new Ur(Ur.createList(r,i));return s.combine()}else if(arguments.length===3){var o=arguments[0],a=arguments[1],u=arguments[2],l=new Ur(Ur.createList(o,a,u));return l.combine()}},Ur.extractFactory=function(t){return t.isEmpty()?null:t.iterator().next().getFactory()},Ur.createList=function(){if(arguments.length===2){var t=arguments[0],e=arguments[1],r=new j;return r.add(t),r.add(e),r}else if(arguments.length===3){var i=arguments[0],s=arguments[1],o=arguments[2],a=new j;return a.add(i),a.add(s),a.add(o),a}};var Ee=function(){this._inputPolys=null,this._geomFactory=null;var t=arguments[0];this._inputPolys=t,this._inputPolys===null&&(this._inputPolys=new j)},Lv={STRTREE_NODE_CAPACITY:{configurable:!0}};Ee.prototype.reduceToGeometries=function(t){for(var e=this,r=new j,i=t.iterator();i.hasNext();){var s=i.next(),o=null;pt(s,hn)?o=e.unionTree(s):s instanceof gt&&(o=s),r.add(o)}return r},Ee.prototype.extractByEnvelope=function(t,e,r){for(var i=new j,s=0;s<e.getNumGeometries();s++){var o=e.getGeometryN(s);o.getEnvelopeInternal().intersects(t)?i.add(o):r.add(o)}return this._geomFactory.buildGeometry(i)},Ee.prototype.unionOptimized=function(t,e){var r=t.getEnvelopeInternal(),i=e.getEnvelopeInternal();if(!r.intersects(i)){var s=Ur.combine(t,e);return s}if(t.getNumGeometries()<=1&&e.getNumGeometries()<=1)return this.unionActual(t,e);var o=r.intersection(i);return this.unionUsingEnvelopeIntersection(t,e,o)},Ee.prototype.union=function(){if(this._inputPolys===null)throw new Error("union() method cannot be called twice");if(this._inputPolys.isEmpty())return null;this._geomFactory=this._inputPolys.iterator().next().getFactory();for(var t=new mv(Ee.STRTREE_NODE_CAPACITY),e=this._inputPolys.iterator();e.hasNext();){var r=e.next();t.insert(r.getEnvelopeInternal(),r)}this._inputPolys=null;var i=t.itemsTree(),s=this.unionTree(i);return s},Ee.prototype.binaryUnion=function(){if(arguments.length===1){var t=arguments[0];return this.binaryUnion(t,0,t.size())}else if(arguments.length===3){var e=arguments[0],r=arguments[1],i=arguments[2];if(i-r<=1){var s=Ee.getGeometry(e,r);return this.unionSafe(s,null)}else{if(i-r===2)return this.unionSafe(Ee.getGeometry(e,r),Ee.getGeometry(e,r+1));var o=Math.trunc((i+r)/2),a=this.binaryUnion(e,r,o),u=this.binaryUnion(e,o,i);return this.unionSafe(a,u)}}},Ee.prototype.repeatedUnion=function(t){for(var e=null,r=t.iterator();r.hasNext();){var i=r.next();e===null?e=i.copy():e=e.union(i)}return e},Ee.prototype.unionSafe=function(t,e){return t===null&&e===null?null:t===null?e.copy():e===null?t.copy():this.unionOptimized(t,e)},Ee.prototype.unionActual=function(t,e){return Ee.restrictToPolygons(t.union(e))},Ee.prototype.unionTree=function(t){var e=this.reduceToGeometries(t),r=this.binaryUnion(e);return r},Ee.prototype.unionUsingEnvelopeIntersection=function(t,e,r){var i=new j,s=this.extractByEnvelope(r,t,i),o=this.extractByEnvelope(r,e,i),a=this.unionActual(s,o);i.add(a);var u=Ur.combine(i);return u},Ee.prototype.bufferUnion=function(){if(arguments.length===1){var t=arguments[0],e=t.get(0).getFactory(),r=e.buildGeometry(t),i=r.buffer(0);return i}else if(arguments.length===2){var s=arguments[0],o=arguments[1],a=s.getFactory(),u=a.createGeometryCollection([s,o]),l=u.buffer(0);return l}},Ee.prototype.interfaces_=function(){return[]},Ee.prototype.getClass=function(){return Ee},Ee.restrictToPolygons=function(t){if(pt(t,ns))return t;var e=Vi.getPolygons(t);return e.size()===1?e.get(0):t.getFactory().createMultiPolygon(xt.toPolygonArray(e))},Ee.getGeometry=function(t,e){return e>=t.size()?null:t.get(e)},Ee.union=function(t){var e=new Ee(t);return e.union()},Lv.STRTREE_NODE_CAPACITY.get=function(){return 4},Object.defineProperties(Ee,Lv);var Gh=function(){};Gh.prototype.interfaces_=function(){return[]},Gh.prototype.getClass=function(){return Gh},Gh.union=function(t,e){if(t.isEmpty()||e.isEmpty()){if(t.isEmpty()&&e.isEmpty())return St.createEmptyResult(St.UNION,t,e,t.getFactory());if(t.isEmpty())return e.copy();if(e.isEmpty())return t.copy()}return t.checkNotGeometryCollection(t),t.checkNotGeometryCollection(e),nr.overlayOp(t,e,St.UNION)};function Bs(){return new kh}function kh(){this.reset()}kh.prototype={constructor:kh,reset:function(){this.s=this.t=0},add:function(n){Rv(Vh,n,this.t),Rv(this,Vh.s,this.s),this.s?this.t+=Vh.t:this.s=Vh.t},valueOf:function(){return this.s}};var Vh=new kh;function Rv(n,t,e){var r=n.s=t+e,i=r-t,s=r-i;n.t=t-s+(e-i)}var Se=1e-6,jt=Math.PI,Ui=jt/2,Fv=jt/4,zi=jt*2,Ys=180/jt,qn=jt/180,ir=Math.abs,MI=Math.atan,za=Math.atan2,be=Math.cos,Ne=Math.sin,qa=Math.sqrt;function Gv(n){return n>1?0:n<-1?jt:Math.acos(n)}function Oo(n){return n>1?Ui:n<-1?-Ui:Math.asin(n)}function Ml(){}function Uh(n,t){n&&Vv.hasOwnProperty(n.type)&&Vv[n.type](n,t)}var kv={Feature:function(n,t){Uh(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++r<i;)Uh(e[r].geometry,t)}},Vv={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){Xf(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)Xf(e[r],t,0)},Polygon:function(n,t){Uv(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)Uv(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,i=e.length;++r<i;)Uh(e[r],t)}};function Xf(n,t,e){var r=-1,i=n.length-e,s;for(t.lineStart();++r<i;)s=n[r],t.point(s[0],s[1],s[2]);t.lineEnd()}function Uv(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)Xf(n[e],t,1);t.polygonEnd()}function bI(n,t){n&&kv.hasOwnProperty(n.type)?kv[n.type](n,t):Uh(n,t)}Bs(),Bs();function Bf(n){return[za(n[1],n[0]),Oo(n[2])]}function Wa(n){var t=n[0],e=n[1],r=be(e);return[r*be(t),r*Ne(t),Ne(e)]}function zh(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function qh(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function Yf(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function Wh(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function Jf(n){var t=qa(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}Bs();function zv(n,t){function e(r,i){return r=n(r,i),t(r[0],r[1])}return n.invert&&t.invert&&(e.invert=function(r,i){return r=t.invert(r,i),r&&n.invert(r[0],r[1])}),e}function jf(n,t){return[n>jt?n-zi:n<-jt?n+zi:n,t]}jf.invert=jf;function NI(n,t,e){return(n%=zi)?t||e?zv(Wv(n),Hv(t,e)):Wv(n):t||e?Hv(t,e):jf}function qv(n){return function(t,e){return t+=n,[t>jt?t-zi:t<-jt?t+zi:t,e]}}function Wv(n){var t=qv(n);return t.invert=qv(-n),t}function Hv(n,t){var e=be(n),r=Ne(n),i=be(t),s=Ne(t);function o(a,u){var l=be(u),c=be(a)*l,h=Ne(a)*l,f=Ne(u),d=f*e+c*r;return[za(h*i-d*s,c*e-f*r),Oo(d*i+h*s)]}return o.invert=function(a,u){var l=be(u),c=be(a)*l,h=Ne(a)*l,f=Ne(u),d=f*i-h*s;return[za(h*i+f*s,c*e+d*r),Oo(d*e-c*r)]},o}function xI(n,t,e,r,i,s){if(e){var o=be(t),a=Ne(t),u=r*e;i==null?(i=t+r*zi,s=t-u/2):(i=Xv(o,i),s=Xv(o,s),(r>0?i<s:i>s)&&(i+=r*zi));for(var l,c=i;r>0?c>s:c<s;c-=u)l=Bf([o,-a*be(c),-a*Ne(c)]),n.point(l[0],l[1])}}function Xv(n,t){t=Wa(t),t[0]-=n,Jf(t);var e=Gv(-t[1]);return((-t[2]<0?-e:e)+zi-Se)%zi}function Bv(){var n=[],t;return{point:function(e,r){t.push([e,r])},lineStart:function(){n.push(t=[])},lineEnd:Ml,rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}}function TI(n,t,e,r,i,s){var o=n[0],a=n[1],u=t[0],l=t[1],c=0,h=1,f=u-o,d=l-a,v;if(v=e-o,!(!f&&v>0)){if(v/=f,f<0){if(v<c)return;v<h&&(h=v)}else if(f>0){if(v>h)return;v>c&&(c=v)}if(v=i-o,!(!f&&v<0)){if(v/=f,f<0){if(v>h)return;v>c&&(c=v)}else if(f>0){if(v<c)return;v<h&&(h=v)}if(v=r-a,!(!d&&v>0)){if(v/=d,d<0){if(v<c)return;v<h&&(h=v)}else if(d>0){if(v>h)return;v>c&&(c=v)}if(v=s-a,!(!d&&v<0)){if(v/=d,d<0){if(v>h)return;v>c&&(c=v)}else if(d>0){if(v<c)return;v<h&&(h=v)}return c>0&&(n[0]=o+c*f,n[1]=a+c*d),h<1&&(t[0]=o+h*f,t[1]=a+h*d),!0}}}}}function Hh(n,t){return ir(n[0]-t[0])<Se&&ir(n[1]-t[1])<Se}function Xh(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Yv(n,t,e,r,i){var s=[],o=[],a,u;if(n.forEach(function(v){if(!((_=v.length-1)<=0)){var _,E=v[0],P=v[_],y;if(Hh(E,P)){for(i.lineStart(),a=0;a<_;++a)i.point((E=v[a])[0],E[1]);i.lineEnd();return}s.push(y=new Xh(E,v,null,!0)),o.push(y.o=new Xh(E,null,y,!1)),s.push(y=new Xh(P,v,null,!1)),o.push(y.o=new Xh(P,null,y,!0))}}),!!s.length){for(o.sort(t),Jv(s),Jv(o),a=0,u=o.length;a<u;++a)o[a].e=e=!e;for(var l=s[0],c,h;;){for(var f=l,d=!0;f.v;)if((f=f.n)===l)return;c=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(a=0,u=c.length;a<u;++a)i.point((h=c[a])[0],h[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(d)for(c=f.p.z,a=c.length-1;a>=0;--a)i.point((h=c[a])[0],h[1]);else r(f.x,f.p.x,-1,i);f=f.p}f=f.o,c=f.z,d=!d}while(!f.v);i.lineEnd()}}}function Jv(n){if(t=n.length){for(var t,e=0,r=n[0],i;++e<t;)r.n=i=n[e],i.p=r,r=i;r.n=i=n[0],i.p=r}}function jv(n,t){return n<t?-1:n>t?1:n>=t?0:NaN}function AI(n){return n.length===1&&(n=OI(n)),{left:function(t,e,r,i){for(r==null&&(r=0),i==null&&(i=t.length);r<i;){var s=r+i>>>1;n(t[s],e)<0?r=s+1:i=s}return r},right:function(t,e,r,i){for(r==null&&(r=0),i==null&&(i=t.length);r<i;){var s=r+i>>>1;n(t[s],e)>0?i=s:r=s+1}return r}}}function OI(n){return function(t,e){return jv(n(t),e)}}AI(jv);function Qv(n){for(var t=n.length,e,r=-1,i=0,s,o;++r<t;)i+=n[r].length;for(s=new Array(i);--t>=0;)for(o=n[t],e=o.length;--e>=0;)s[--i]=o[e];return s}var Bh=1e9,Yh=-1e9;function DI(n,t,e,r){function i(l,c){return n<=l&&l<=e&&t<=c&&c<=r}function s(l,c,h,f){var d=0,v=0;if(l==null||(d=o(l,h))!==(v=o(c,h))||u(l,c)<0^h>0)do f.point(d===0||d===3?n:e,d>1?r:t);while((d=(d+h+4)%4)!==v);else f.point(c[0],c[1])}function o(l,c){return ir(l[0]-n)<Se?c>0?0:3:ir(l[0]-e)<Se?c>0?2:1:ir(l[1]-t)<Se?c>0?1:0:c>0?3:2}function a(l,c){return u(l.x,c.x)}function u(l,c){var h=o(l,1),f=o(c,1);return h!==f?h-f:h===0?c[1]-l[1]:h===1?l[0]-c[0]:h===2?l[1]-c[1]:c[0]-l[0]}return function(l){var c=l,h=Bv(),f,d,v,_,E,P,y,w,m,S,C,I={point:b,lineStart:T,lineEnd:L,polygonStart:A,polygonEnd:N};function b($,Y){i($,Y)&&c.point($,Y)}function x(){for(var $=0,Y=0,Z=d.length;Y<Z;++Y)for(var G=d[Y],W=1,k=G.length,V=G[0],O,q,X=V[0],rt=V[1];W<k;++W)O=X,q=rt,V=G[W],X=V[0],rt=V[1],q<=r?rt>r&&(X-O)*(r-q)>(rt-q)*(n-O)&&++$:rt<=r&&(X-O)*(r-q)<(rt-q)*(n-O)&&--$;return $}function A(){c=h,f=[],d=[],C=!0}function N(){var $=x(),Y=C&&$,Z=(f=Qv(f)).length;(Y||Z)&&(l.polygonStart(),Y&&(l.lineStart(),s(null,null,1,l),l.lineEnd()),Z&&Yv(f,a,$,s,l),l.polygonEnd()),c=l,f=d=v=null}function T(){I.point=U,d&&d.push(v=[]),S=!0,m=!1,y=w=NaN}function L(){f&&(U(_,E),P&&m&&h.rejoin(),f.push(h.result())),I.point=b,m&&c.lineEnd()}function U($,Y){var Z=i($,Y);if(d&&v.push([$,Y]),S)_=$,E=Y,P=Z,S=!1,Z&&(c.lineStart(),c.point($,Y));else if(Z&&m)c.point($,Y);else{var G=[y=Math.max(Yh,Math.min(Bh,y)),w=Math.max(Yh,Math.min(Bh,w))],W=[$=Math.max(Yh,Math.min(Bh,$)),Y=Math.max(Yh,Math.min(Bh,Y))];TI(G,W,n,t,e,r)?(m||(c.lineStart(),c.point(G[0],G[1])),c.point(W[0],W[1]),Z||c.lineEnd(),C=!1):Z&&(c.lineStart(),c.point($,Y),C=!1)}y=$,w=Y,m=Z}return I}}var Qf=Bs();function LI(n,t){var e=t[0],r=t[1],i=[Ne(e),-be(e),0],s=0,o=0;Qf.reset();for(var a=0,u=n.length;a<u;++a)if(c=(l=n[a]).length)for(var l,c,h=l[c-1],f=h[0],d=h[1]/2+Fv,v=Ne(d),_=be(d),E=0;E<c;++E,f=y,v=m,_=S,h=P){var P=l[E],y=P[0],w=P[1]/2+Fv,m=Ne(w),S=be(w),C=y-f,I=C>=0?1:-1,b=I*C,x=b>jt,A=v*m;if(Qf.add(za(A*I*Ne(b),_*S+A*be(b))),s+=x?C+I*zi:C,x^f>=e^y>=e){var N=qh(Wa(h),Wa(P));Jf(N);var T=qh(i,N);Jf(T);var L=(x^C>=0?-1:1)*Oo(T[2]);(r>L||r===L&&(N[0]||N[1]))&&(o+=x^C>=0?1:-1)}}return(s<-1e-6||s<Se&&Qf<-1e-6)^o&1}Bs();function $v(n){return n}Bs(),Bs();var Ha=1/0,Jh=Ha,bl=-Ha,jh=bl,Kv={point:RI,lineStart:Ml,lineEnd:Ml,polygonStart:Ml,polygonEnd:Ml,result:function(){var n=[[Ha,Jh],[bl,jh]];return bl=jh=-(Jh=Ha=1/0),n}};function RI(n,t){n<Ha&&(Ha=n),n>bl&&(bl=n),t<Jh&&(Jh=t),t>jh&&(jh=t)}Bs();function Zv(n,t,e,r){return function(i,s){var o=t(s),a=i.invert(r[0],r[1]),u=Bv(),l=t(u),c=!1,h,f,d,v={point:_,lineStart:P,lineEnd:y,polygonStart:function(){v.point=w,v.lineStart=m,v.lineEnd=S,f=[],h=[]},polygonEnd:function(){v.point=_,v.lineStart=P,v.lineEnd=y,f=Qv(f);var C=LI(h,a);f.length?(c||(s.polygonStart(),c=!0),Yv(f,GI,C,e,s)):C&&(c||(s.polygonStart(),c=!0),s.lineStart(),e(null,null,1,s),s.lineEnd()),c&&(s.polygonEnd(),c=!1),f=h=null},sphere:function(){s.polygonStart(),s.lineStart(),e(null,null,1,s),s.lineEnd(),s.polygonEnd()}};function _(C,I){var b=i(C,I);n(C=b[0],I=b[1])&&s.point(C,I)}function E(C,I){var b=i(C,I);o.point(b[0],b[1])}function P(){v.point=E,o.lineStart()}function y(){v.point=_,o.lineEnd()}function w(C,I){d.push([C,I]);var b=i(C,I);l.point(b[0],b[1])}function m(){l.lineStart(),d=[]}function S(){w(d[0][0],d[0][1]),l.lineEnd();var C=l.clean(),I=u.result(),b,x=I.length,A,N,T;if(d.pop(),h.push(d),d=null,!!x){if(C&1){if(N=I[0],(A=N.length-1)>0){for(c||(s.polygonStart(),c=!0),s.lineStart(),b=0;b<A;++b)s.point((T=N[b])[0],T[1]);s.lineEnd()}return}x>1&&C&2&&I.push(I.pop().concat(I.shift())),f.push(I.filter(FI))}}return v}}function FI(n){return n.length>1}function GI(n,t){return((n=n.x)[0]<0?n[1]-Ui-Se:Ui-n[1])-((t=t.x)[0]<0?t[1]-Ui-Se:Ui-t[1])}const tm=Zv(function(){return!0},kI,UI,[-jt,-Ui]);function kI(n){var t=NaN,e=NaN,r=NaN,i;return{lineStart:function(){n.lineStart(),i=1},point:function(s,o){var a=s>0?jt:-jt,u=ir(s-t);ir(u-jt)<Se?(n.point(t,e=(e+o)/2>0?Ui:-Ui),n.point(r,e),n.lineEnd(),n.lineStart(),n.point(a,e),n.point(s,e),i=0):r!==a&&u>=jt&&(ir(t-r)<Se&&(t-=r*Se),ir(s-a)<Se&&(s-=a*Se),e=VI(t,e,s,o),n.point(r,e),n.lineEnd(),n.lineStart(),n.point(a,e),i=0),n.point(t=s,e=o),r=a},lineEnd:function(){n.lineEnd(),t=e=NaN},clean:function(){return 2-i}}}function VI(n,t,e,r){var i,s,o=Ne(n-e);return ir(o)>Se?MI((Ne(t)*(s=be(r))*Ne(e)-Ne(r)*(i=be(t))*Ne(n))/(i*s*o)):(t+r)/2}function UI(n,t,e,r){var i;if(n==null)i=e*Ui,r.point(-jt,i),r.point(0,i),r.point(jt,i),r.point(jt,0),r.point(jt,-i),r.point(0,-i),r.point(-jt,-i),r.point(-jt,0),r.point(-jt,i);else if(ir(n[0]-t[0])>Se){var s=n[0]<t[0]?jt:-jt;i=e*s/2,r.point(-s,i),r.point(0,i),r.point(s,i)}else r.point(t[0],t[1])}function zI(n,t){var e=be(n),r=e>0,i=ir(e)>Se;function s(c,h,f,d){xI(d,n,t,f,c,h)}function o(c,h){return be(c)*be(h)>e}function a(c){var h,f,d,v,_;return{lineStart:function(){v=d=!1,_=1},point:function(E,P){var y=[E,P],w,m=o(E,P),S=r?m?0:l(E,P):m?l(E+(E<0?jt:-jt),P):0;if(!h&&(v=d=m)&&c.lineStart(),m!==d&&(w=u(h,y),(!w||Hh(h,w)||Hh(y,w))&&(y[0]+=Se,y[1]+=Se,m=o(y[0],y[1]))),m!==d)_=0,m?(c.lineStart(),w=u(y,h),c.point(w[0],w[1])):(w=u(h,y),c.point(w[0],w[1]),c.lineEnd()),h=w;else if(i&&h&&r^m){var C;!(S&f)&&(C=u(y,h,!0))&&(_=0,r?(c.lineStart(),c.point(C[0][0],C[0][1]),c.point(C[1][0],C[1][1]),c.lineEnd()):(c.point(C[1][0],C[1][1]),c.lineEnd(),c.lineStart(),c.point(C[0][0],C[0][1])))}m&&(!h||!Hh(h,y))&&c.point(y[0],y[1]),h=y,d=m,f=S},lineEnd:function(){d&&c.lineEnd(),h=null},clean:function(){return _|(v&&d)<<1}}}function u(c,h,f){var d=Wa(c),v=Wa(h),_=[1,0,0],E=qh(d,v),P=zh(E,E),y=E[0],w=P-y*y;if(!w)return!f&&c;var m=e*P/w,S=-e*y/w,C=qh(_,E),I=Wh(_,m),b=Wh(E,S);Yf(I,b);var x=C,A=zh(I,x),N=zh(x,x),T=A*A-N*(zh(I,I)-1);if(!(T<0)){var L=qa(T),U=Wh(x,(-A-L)/N);if(Yf(U,I),U=Bf(U),!f)return U;var $=c[0],Y=h[0],Z=c[1],G=h[1],W;Y<$&&(W=$,$=Y,Y=W);var k=Y-$,V=ir(k-jt)<Se,O=V||k<Se;if(!V&&G<Z&&(W=Z,Z=G,G=W),O?V?Z+G>0^U[1]<(ir(U[0]-$)<Se?Z:G):Z<=U[1]&&U[1]<=G:k>jt^($<=U[0]&&U[0]<=Y)){var q=Wh(x,(-A+L)/N);return Yf(q,I),[U,Bf(q)]}}}function l(c,h){var f=r?n:jt-n,d=0;return c<-f?d|=1:c>f&&(d|=2),h<-f?d|=4:h>f&&(d|=8),d}return Zv(o,a,s,r?[0,-n]:[-jt,n-jt])}function em(n){return function(t){var e=new $f;for(var r in n)e[r]=n[r];return e.stream=t,e}}function $f(){}$f.prototype={constructor:$f,point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function rm(n,t,e){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],s=n.clipExtent&&n.clipExtent();n.scale(150).translate([0,0]),s!=null&&n.clipExtent(null),bI(e,n.stream(Kv));var o=Kv.result(),a=Math.min(r/(o[1][0]-o[0][0]),i/(o[1][1]-o[0][1])),u=+t[0][0]+(r-a*(o[1][0]+o[0][0]))/2,l=+t[0][1]+(i-a*(o[1][1]+o[0][1]))/2;return s!=null&&n.clipExtent(s),n.scale(a*150).translate([u,l])}function qI(n,t,e){return rm(n,[[0,0],t],e)}var nm=16,WI=be(30*qn);function im(n,t){return+t?XI(n,t):HI(n)}function HI(n){return em({point:function(t,e){t=n(t,e),this.stream.point(t[0],t[1])}})}function XI(n,t){function e(r,i,s,o,a,u,l,c,h,f,d,v,_,E){var P=l-r,y=c-i,w=P*P+y*y;if(w>4*t&&_--){var m=o+f,S=a+d,C=u+v,I=qa(m*m+S*S+C*C),b=Oo(C/=I),x=ir(ir(C)-1)<Se||ir(s-h)<Se?(s+h)/2:za(S,m),A=n(x,b),N=A[0],T=A[1],L=N-r,U=T-i,$=y*L-P*U;($*$/w>t||ir((P*L+y*U)/w-.5)>.3||o*f+a*d+u*v<WI)&&(e(r,i,s,o,a,u,N,T,x,m/=I,S/=I,C,_,E),E.point(N,T),e(N,T,x,m,S,C,l,c,h,f,d,v,_,E))}}return function(r){var i,s,o,a,u,l,c,h,f,d,v,_,E={point:P,lineStart:y,lineEnd:m,polygonStart:function(){r.polygonStart(),E.lineStart=S},polygonEnd:function(){r.polygonEnd(),E.lineStart=y}};function P(b,x){b=n(b,x),r.point(b[0],b[1])}function y(){h=NaN,E.point=w,r.lineStart()}function w(b,x){var A=Wa([b,x]),N=n(b,x);e(h,f,c,d,v,_,h=N[0],f=N[1],c=b,d=A[0],v=A[1],_=A[2],nm,r),r.point(h,f)}function m(){E.point=P,r.lineEnd()}function S(){y(),E.point=C,E.lineEnd=I}function C(b,x){w(i=b,x),s=h,o=f,a=d,u=v,l=_,E.point=w}function I(){e(h,f,c,d,v,_,s,o,i,a,u,l,nm,r),E.lineEnd=m,m()}return E}}var BI=em({point:function(n,t){this.stream.point(n*qn,t*qn)}});function YI(n){return JI(function(){return n})()}function JI(n){var t,e=150,r=480,i=250,s,o,a=0,u=0,l=0,c=0,h=0,f,d,v=null,_=tm,E=null,P,y,w,m=$v,S=.5,C=im(N,S),I,b;function x(U){return U=d(U[0]*qn,U[1]*qn),[U[0]*e+s,o-U[1]*e]}function A(U){return U=d.invert((U[0]-s)/e,(o-U[1])/e),U&&[U[0]*Ys,U[1]*Ys]}function N(U,$){return U=t(U,$),[U[0]*e+s,o-U[1]*e]}x.stream=function(U){return I&&b===U?I:I=BI(_(f,C(m(b=U))))},x.clipAngle=function(U){return arguments.length?(_=+U?zI(v=U*qn,6*qn):(v=null,tm),L()):v*Ys},x.clipExtent=function(U){return arguments.length?(m=U==null?(E=P=y=w=null,$v):DI(E=+U[0][0],P=+U[0][1],y=+U[1][0],w=+U[1][1]),L()):E==null?null:[[E,P],[y,w]]},x.scale=function(U){return arguments.length?(e=+U,T()):e},x.translate=function(U){return arguments.length?(r=+U[0],i=+U[1],T()):[r,i]},x.center=function(U){return arguments.length?(a=U[0]%360*qn,u=U[1]%360*qn,T()):[a*Ys,u*Ys]},x.rotate=function(U){return arguments.length?(l=U[0]%360*qn,c=U[1]%360*qn,h=U.length>2?U[2]%360*qn:0,T()):[l*Ys,c*Ys,h*Ys]},x.precision=function(U){return arguments.length?(C=im(N,S=U*U),L()):qa(S)},x.fitExtent=function(U,$){return rm(x,U,$)},x.fitSize=function(U,$){return qI(x,U,$)};function T(){d=zv(f=NI(l,c,h),t);var U=t(a,u);return s=r-U[0]*e,o=i+U[1]*e,L()}function L(){return I=b=null,x}return function(){return t=n.apply(this,arguments),x.invert=t.invert&&A,T()}}function sm(n){return function(t,e){var r=be(t),i=be(e),s=n(r*i);return[s*i*Ne(t),s*Ne(e)]}}function om(n){return function(t,e){var r=qa(t*t+e*e),i=n(r),s=Ne(i),o=be(i);return[za(t*s,r*o),Oo(r&&e*s/r)]}}var jI=sm(function(n){return qa(2/(1+n))});jI.invert=om(function(n){return 2*Oo(n/2)});var am=sm(function(n){return(n=Gv(n))&&n/Ne(n)});am.invert=om(function(n){return n});function QI(){return YI(am).scale(79.4188).clipAngle(179.999)}function um(n,t){return[n,t]}um.invert=um;function $I(n,t,e){e=e||{};var r=e.units||"kilometers",i=e.steps||8;if(!n)throw new Error("geojson is required");if(typeof e!="object")throw new Error("options must be an object");if(typeof i!="number")throw new Error("steps must be an number");if(t===void 0)throw new Error("radius is required");if(i<=0)throw new Error("steps must be greater than 0");var s=[];switch(n.type){case"GeometryCollection":return dh(n,function(o){var a=Qh(o,t,r,i);a&&s.push(a)}),on(s);case"FeatureCollection":return pa(n,function(o){var a=Qh(o,t,r,i);a&&pa(a,function(u){u&&s.push(u)})}),on(s)}return Qh(n,t,r,i)}function Qh(n,t,e,r){var i=n.properties||{},s=n.type==="Feature"?n.geometry:n;if(s.type==="GeometryCollection"){var o=[];return dh(n,function(_){var E=Qh(_,t,e,r);E&&o.push(E)}),on(o)}var a=KI(s),u={type:s.type,coordinates:hm(s.coordinates,a)},l=new Rf,c=l.read(u),h=sf(of(t,e),"meters"),f=Fe.bufferOp(c,h,r),d=new pv;if(f=d.write(f),!lm(f.coordinates)){var v={type:f.type,coordinates:cm(f.coordinates,a)};return Sn(v,i)}}function lm(n){return Array.isArray(n[0])?lm(n[0]):isNaN(n[0])}function hm(n,t){return typeof n[0]!="object"?t(n):n.map(function(e){return hm(e,t)})}function cm(n,t){return typeof n[0]!="object"?t.invert(n):n.map(function(e){return cm(e,t)})}function KI(n){var t=w0(n).geometry.coordinates,e=[-t[0],-t[1]];return QI().rotate(e).scale(or)}function ZI(n,t,e){e===void 0&&(e={});var r=mr(n),i=mr(t),s=Mf.union(r.coordinates,i.coordinates);return s.length===0?null:s.length===1?ie(s[0],e.properties):nf(s,e.properties)}function Nl(n,t,e){e===void 0&&(e={});var r=mr(n),i=mr(t),s=Mf.intersection(r.coordinates,i.coordinates);return s.length===0?null:s.length===1?ie(s[0],e.properties):nf(s,e.properties)}function t2(n,t,e){e===void 0&&(e={});var r=JSON.stringify(e.properties||{}),i=n[0],s=n[1],o=n[2],a=n[3],u=(s+a)/2,l=(i+o)/2,c=t*2/We([i,u],[o,u],e),h=c*(o-i),f=t*2/We([l,s],[l,a],e),d=f*(a-s),v=h/2,_=v*2,E=Math.sqrt(3)/2*d,P=o-i,y=a-s,w=3/4*_,m=E,S=(P-_)/(_-v/2),C=Math.floor(S),I=(C*w-v/2-P)/2-v/2+w/2,b=Math.floor((y-E)/E),x=(y-b*E)/2,A=b*E-y>E/2;A&&(x-=E/4);for(var N=[],T=[],L=0;L<6;L++){var U=2*Math.PI/6*L;N.push(Math.cos(U)),T.push(Math.sin(U))}for(var $=[],Y=0;Y<=C;Y++)for(var Z=0;Z<=b;Z++){var G=Y%2===1;if(!(Z===0&&G)&&!(Z===0&&A)){var W=Y*w+i-I,k=Z*m+s+x;if(G&&(k-=E/2),e.triangles===!0)r2([W,k],h/2,d/2,JSON.parse(r),N,T).forEach(function(O){e.mask?Nl(e.mask,O)&&$.push(O):$.push(O)});else{var V=e2([W,k],h/2,d/2,JSON.parse(r),N,T);e.mask?Nl(e.mask,V)&&$.push(V):$.push(V)}}}return on($)}function e2(n,t,e,r,i,s){for(var o=[],a=0;a<6;a++){var u=n[0]+t*i[a],l=n[1]+e*s[a];o.push([u,l])}return o.push(o[0].slice()),ie([o],r)}function r2(n,t,e,r,i,s){for(var o=[],a=0;a<6;a++){var u=[];u.push(n),u.push([n[0]+t*i[a],n[1]+e*s[a]]),u.push([n[0]+t*i[(a+1)%6],n[1]+e*s[(a+1)%6]]),u.push(n),o.push(ie([u],r))}return o}function n2(n,t,e,r){r===void 0&&(r={});for(var i=[],s=n[0],o=n[1],a=n[2],u=n[3],l=t/We([s,o],[a,o],r),c=l*(a-s),h=e/We([s,o],[s,u],r),f=h*(u-o),d=a-s,v=u-o,_=Math.floor(d/c),E=Math.floor(v/f),P=(d-_*c)/2,y=(v-E*f)/2,w=s+P,m=0;m<_;m++){for(var S=o+y,C=0;C<E;C++){var I=ie([[[w,S],[w,S+f],[w+c,S+f],[w+c,S],[w,S]]],r.properties);r.mask?GP(r.mask,I)&&i.push(I):i.push(I),S+=f}w+=c}return on(i)}function i2(n,t,e){return e===void 0&&(e={}),n2(n,t,t,e)}function s2(n,t,e){e===void 0&&(e={});for(var r=[],i=t/We([n[0],n[1]],[n[2],n[1]],e),s=i*(n[2]-n[0]),o=t/We([n[0],n[1]],[n[0],n[3]],e),a=o*(n[3]-n[1]),u=0,l=n[0];l<=n[2];){for(var c=0,h=n[1];h<=n[3];){var f=null,d=null;u%2===0&&c%2===0?(f=ie([[[l,h],[l,h+a],[l+s,h],[l,h]]],e.properties),d=ie([[[l,h+a],[l+s,h+a],[l+s,h],[l,h+a]]],e.properties)):u%2===0&&c%2===1?(f=ie([[[l,h],[l+s,h+a],[l+s,h],[l,h]]],e.properties),d=ie([[[l,h],[l,h+a],[l+s,h+a],[l,h]]],e.properties)):c%2===0&&u%2===1?(f=ie([[[l,h],[l,h+a],[l+s,h+a],[l,h]]],e.properties),d=ie([[[l,h],[l+s,h+a],[l+s,h],[l,h]]],e.properties)):c%2===1&&u%2===1&&(f=ie([[[l,h],[l,h+a],[l+s,h],[l,h]]],e.properties),d=ie([[[l,h+a],[l+s,h+a],[l+s,h],[l,h+a]]],e.properties)),e.mask?(Nl(e.mask,f)&&r.push(f),Nl(e.mask,d)&&r.push(d)):(r.push(f),r.push(d)),h+=a,c++}u++,l+=s}return on(r)}function o2(n,t,e){if(e=e||{},typeof e!="object")throw new Error("options is invalid");var r=e.gridType,i=e.property,s=e.weight;if(!n)throw new Error("points is required");if(bC(n,"Point","input must contain Points"),!t)throw new Error("cellSize is required");if(s!==void 0&&typeof s!="number")throw new Error("weight must be a number");i=i||"elevation",r=r||"square",s=s||1;var o=Cn(n),a;switch(r){case"point":case"points":a=vP(o,t,e);break;case"square":case"squares":a=i2(o,t,e);break;case"hex":case"hexes":a=t2(o,t,e);break;case"triangle":case"triangles":a=s2(o,t,e);break;default:throw new Error("invalid gridType")}var u=[];return pa(a,function(l){var c=0,h=0;pa(n,function(d){var v=r==="point"?l:cf(l),_=We(v,d,e),E;if(i!==void 0&&(E=d.properties[i]),E===void 0&&(E=d.geometry.coordinates[2]),E===void 0)throw new Error("zValue is missing");_===0&&(c=E);var P=1/Math.pow(_,s);h+=P,c+=P*E});var f=WC(l);f.properties[i]=c/h,u.push(f)}),on(u)}function a2(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1])&&n.push(n[0]);const e=Kt(t),r=ie([n]);return je(e,r)}function u2(n,t){const e=Br(n);return pf(e,t,{units:"meters"}).geometry.coordinates}function Kf(n){if((n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),n.length<=3)return 0;const t=ie([n]);return sP(t)}function l2(n){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]);const t=ie([n]),r=E0(t).geometry.coordinates;return[r[0],r[1],r[2]??n[0][2]??0]}function fm(n,t,e,r){const[i,s,o]=n,a=va(Kt([i,s]),t,e,{units:"meters"});if(!(!a||!a.geometry||!a.geometry.coordinates))return r=r||[0,0,0],r[0]=a.geometry.coordinates[0],r[1]=a.geometry.coordinates[1],r[2]=o,r}function $h(n,t){return We(Kt(n),Kt(t),{units:"meters"})}function xl(n,t){return tl(Kt(n),Kt(t))}function h2(n,t){return el(Br(n),Br(t))}function c2(n,t){const e=Kt(n),r=Kt(t),i=YC(e,r),s=(n[2]+t[2])/2;return[...i.geometry.coordinates,s]}function f2(n,t){const e=Kt(t),r=Br(n);return eP(r,e,{units:"meters"})}function d2(n,t){const e=Kt(n),r=Br(t);return nP(e,r,{units:"meters"})}function g2(n,t,e,r){const[i,s,o]=n,a=wP(Kt([i,s]),t,e,{units:"meters"});if(!(!a||!a.geometry||!a.geometry.coordinates))return r=r||[0,0,0],r[0]=a.geometry.coordinates[0],r[1]=a.geometry.coordinates[1],r[2]=o,r}function dm(n,t){return T0(Kt(n),Kt(t),{units:"meters"})}function p2(n,t){return _P(Kt(n),Kt(t))}function gm(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=Nl(ie([n]),ie([t]));if(e)return e.geometry.coordinates}function pm(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=ZI(ie([n]),ie([t]));if(e)return e.geometry.coordinates}function vm(n,t=500,e="meters"){const r=$I(Br(n),t,{units:e});if(r)return r.geometry.coordinates}function mm(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=uI(ie([n]),ie([t]));if(e)return e.geometry.coordinates}function ym(n,t,e=10,r="meters"){return XC(n,t,{steps:e,units:r}).geometry.coordinates}function Zf(n,t){(n[0][0]!==n[n.length-1][0]||n[0][1]!==n[n.length-1][1]||n[0][2]!==n[n.length-1][2])&&n.push(n[0]),(t[0][0]!==t[t.length-1][0]||t[0][1]!==t[t.length-1][1]||t[0][2]!==t[t.length-1][2])&&t.push(t[0]);const e=ie([n]),r=ie([t]);return NP(e,r)?"oneBig":F0(e,r)?"twoBig":!1}function _m(n){const t=p.min(p.objsIterator(n,["0"])),e=p.min(p.objsIterator(n,["1"])),r=p.min(p.objsIterator(n,["2"])),i=p.max(p.objsIterator(n,["0"])),s=p.max(p.objsIterator(n,["1"])),o=p.max(p.objsIterator(n,["2"]));return{minPos:[t,e,r],maxPos:[i,s,o],center:[(t+i)*.5,(e+s)*.5,(r+o)*.5]}}function wm(n){const{minPos:t,maxPos:e,center:r}=_m(n);if(t.some(a=>!Number.isFinite(a)||e.some(u=>!Number.isFinite(u))||r.some(u=>!Number.isFinite(u)))){console.warn("geoCenterAndRadiusFromPositions error: minPos.some(e => !Number.isFinite(e) || maxPos.some(e => !Number.isFinite(e)) || center.some(e => !Number.isFinite(e))");return}const i=$h(t,e);let s=i*.5;const o=Math.abs(t[2]-e[2]);return o!=0&&(s=Math.sqrt(i*i+o*o)*.5),{center:r,radius:s}}function Em(n,t){const e=bi(n),r=bi(t);return p.Vector.distance(e,r)}function Tl(n,t){const e=[],r=n.length;let i=0;for(let s=0;s<r-1;++s){if(t===void 0||t==="GEODESIC"){const o=$h(n[s],n[s+1]),a=Math.abs(n[s][2]-n[s+1][2]);if(a===0)i+=o;else{const u=Math.sqrt(o*o+a*a);i+=u}}else if(t==="RHUMB"){const o=dm(n[s],n[s+1]),a=Math.abs(n[s][2]-n[s+1][2]);if(a===0)i+=o;else{const u=Math.sqrt(o*o+a*a);i+=u}}else if(t==="NONE"){const o=Em(n[s],n[s+1]);i+=o}else console.warn(`未知的arcType: ${t},导致距离无法计算!`);e.push(i)}return e}function td(n){const t="__getXyzFromPostion";let e=p.getExtProp(n,t);return(!e||!p.Vector.equals(e[0],n))&&(e=[[...n],bi(n)],p.setExtProp(n,t,e)),e[1]}class Sm extends p.Tree{constructor(t){super(t)}get propUiTree(){return this.uiTree}}class ed extends p.TreeItem{constructor(t,e,r){super(t,e),this._property=r}get property(){return this._property}}class rd extends ed{constructor(t,e){super(t,!1,e)}}class nd extends ed{constructor(t,e){super(t,!0,e)}get groupChildren(){return this.children}}function Cm(n,t){const e=new Sm(t),r=n.getProperties("chinese"),i=[];for(let s of r)if(s instanceof vt){const o=new nd(e,s);o.d(()=>s.destroy()),e.children.push(o),i.push(o)}else{const o=new rd(e,s);e.children.push(o),o.d(()=>s.destroy())}for(;i.length>0;){const s=i.pop();if(!s)throw new Error("should not be here!");const o=s;if(!(o.property instanceof vt))throw new Error("!(treeItem.property instanceof GroupProperty)");for(let a of o.property.children)if(a instanceof vt){const u=new nd(e,a);u.d(()=>a.destroy()),o.groupChildren.push(u),i.push(u)}else{const u=new rd(e,a);o.groupChildren.push(u),u.d(()=>a.destroy())}}return e.d(()=>{e.itemChildrenChanged.reset(),e.itemChildrenToChange.reset();const s=[...e.getDescendants()];s.forEach(o=>{o.children&&(o.children.length=0),o.destroy()}),s.length=0}),e}class Xa extends st{constructor(e){super();g(this,"_propTreeReact",this.dv(p.react(void 0)));this.d(()=>this._propTreeReact.value=void 0),this.dv(new p.ObjResettingWithEvent(this.sceneObjectChanged,r=>{if(!r)return;const i=new st;return i.d(r.toDestroyEvent.don(()=>{this.sceneObject=void 0})),i})),this.d(this.sceneObjectChanged.don(r=>{this._propTreeReact.value=void 0,!(!r||!(r instanceof ft))&&(this._propTreeReact.value=Cm(r,e))}))}get propTree(){return this._propTreeReact.value}get propTreeChanged(){return this._propTreeReact.changed}}(n=>{n.createDefaultProps=()=>({sceneObject:void 0})})(Xa||(Xa={})),p.extendClassProps(Xa.prototype,Xa.createDefaultProps);function id(n){return p.reactDeepArrayWithUndefined(n,(t,e)=>t[0]===e[0]&&t[1]===e[1],t=>[...t])}function Pm(n,t){const e=new Array;for(let r of n)e.push(t(r));return e}function sd(n,t){return n===void 0&&t===void 0?!0:!n||!t?!1:n[0]===t[0]&&n[1]===t[1]&&n[2]===t[2]}function v2(n,t,e){var i;((i=t.attachedViewers.values().toArray()[0])==null?void 0:i.getEngineObject(t))?e.call(n):(n.dispose(t.viewerAttached.don(()=>{e.call(n)})),n.dispose(t.createdEvent.don(()=>e.call(n))))}function m2(n,t,e,r=!0){r&&e(),n.dispose(t.disposableOn(e))}function y2(n,t){const{type:e,id:r}=n;if(e){const i=ft.create(e,r);if(i)return i.json=n,i;console.warn(`cannot create sceneObject from type(${e})`)}else console.warn(`cannot create sceneObject from type(${e})`)}function Im(n){const t=n.children&&p.every(n.children,r=>{if(!(r instanceof Pr))throw new Error("!(treeItem instanceof SceneTreeItem)");return!r.show})||!1,e=n.sceneTree.getSceneObjectShowFunc(n.sceneObject);return!t||e}class Pr extends p.TreeItem{constructor(e,r=!1,i,s,o=!0){super(e,r,i);g(this,"_dragDrop");g(this,"_showChangedNotAffectChildren",!1);g(this,"_showChangedNotAffectParent",!1);g(this,"_type",this.dv(p.react("Unknown")));g(this,"_isExport",this.dv(p.react(!0)));const a=()=>this.tree&&this.tree.itemsChanged.emit([this]);this.dispose(this.nameChanged.disposableOn(a)),this.name=`未命名条目(${this.id})`,this.extras=s,this._isExport.value=o;let u;const l=()=>{u&&(u(),u=void 0)};this.dispose(l),this.dispose(this.sceneObjectChanged.disposableOn(c=>{l(),c&&(u=p.bind([this,"name"],[c,"name"]))})),this.dispose(this.showChanged.disposableOn(c=>{if(e.setSceneObjectShowFunc(this.sceneObject,c),this.tree&&this.tree.forceRedraw(),this.children&&!this._showChangedNotAffectChildren)for(let h of this.children)h instanceof Pr&&(h._showChangedNotAffectParent=!0,h.show=c,h._showChangedNotAffectParent=!1);this.parent&&this.parent instanceof Pr&&!this._showChangedNotAffectParent&&(this.parent._showChangedNotAffectChildren=!0,this.parent.show=Im(this.parent),this.parent._showChangedNotAffectChildren=!1)})),this.dv(new p.ObjResettingWithEvent(this.sceneObjectChanged,()=>{if(!this.sceneObject)return;const c=new st;if("show"in this.sceneObject&&"showChanged"in this.sceneObject&&this.sceneObject.showChanged instanceof H){const h=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};h(),c.dispose(this.sceneObject.showChanged.disposableOn(h))}else if("enabled"in this.sceneObject&&"enabledChanged"in this.sceneObject&&this.sceneObject.enabledChanged instanceof H){const h=()=>{this.show=e.getSceneObjectShowFunc(this.sceneObject)};h(),c.dispose(this.sceneObject.enabledChanged.disposableOn(h))}return c})),this.childrenChangedEvent.disposableOn(()=>{const c=Im(this);this._showChangedNotAffectChildren=!0,this.show=c,this._showChangedNotAffectChildren=!1});{const c=()=>{let h="Unknown";this.sceneObject?h=this.sceneObject.typeName:this.children&&(h="Folder"),this._type.value=h};this.dispose(this.sceneObjectChanged.disposableOn(c)),this.dispose(this.childrenResetedEvent.disposableOn(c)),c()}}get dragDrop(){return this._dragDrop||(this._dragDrop=this.dv(this.sceneTree.createTreeItemDragDropFunc(this))),this._dragDrop}get type(){return this._type.value}get typeChanged(){return this._type.changed}get isExport(){return this._isExport.value}get isExportChanged(){return this._isExport.changed}set isExport(e){this._isExport.value=e}get sceneTree(){return this.tree}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(e){try{this.json=JSON.parse(e)}catch(r){console.error(`sceneTreeItem.jsonStr error ${r}`,r)}}get json(){const e=this.children&&[...this.children].filter(r=>r.isExport).map(r=>r.json);return{name:this.name,show:this.show?void 0:!1,collapsed:this.uiTreeObject.collapsed?!0:void 0,sceneObj:this.sceneObject&&this.sceneObject.json,children:e,extras:this.extras}}set json(e){if(e.name!==void 0&&(this.name=e.name),this.extras=e.extras,this._showChangedNotAffectChildren=!0,this._showChangedNotAffectParent=!0,this.show=e.show??!0,this._showChangedNotAffectChildren=!1,this._showChangedNotAffectParent=!1,this.uiTreeObject.collapsed=e.collapsed??!1,this.sceneObject=void 0,e.sceneObj&&(this.sceneObject=this.sceneTree.createSceneObjectFunc(e.sceneObj,this)),!!e.children){if(this.resetChildren(!0),!this.children)throw new Error("resetChildren(true) cannot get children!");for(let r of e.children){const i=new Pr(this.tree,!0);i.json=r,this.children.push(i)}}}clone(){try{const e=new Pr(this.sceneTree,!!this.children,void 0,this.extras,this.isExport);return e.json=this.json,e.name=this.sceneTree.getSceneTreeItemCloneNameFunc(this),e}catch(e){console.error(`SceneTreeItem.clone error: ${e}`,e)}}insertNewTreeItem(e,r){if(e==="FolderInnerOrAfter"||e==="FolderInnerOrBefore"||e==="FolderInner"){if(r&&r.tree!==this.tree)return console.warn("newTreeItem.tree !== this.tree"),!1;if(this.children&&!(e.includes("Or")&&this.sceneObject))return r&&this.children.push(r),!0;if(e==="FolderInner")return!1;if(e==="FolderInnerOrAfter")return super.insertNewTreeItem("After",r);if(e==="FolderInnerOrBefore")return super.insertNewTreeItem("Before",r);throw new Error("should not be here!")}else return super.insertNewTreeItem(e,r)}}(n=>{n.createDefaultProps=()=>({name:"未命名条目",nameEditing:!1,sceneObject:void 0,show:!0,extras:p.reactJsonWithUndefined(void 0)})})(Pr||(Pr={})),p.extendClassProps(Pr.prototype,Pr.createDefaultProps);function Mm(n,t,e){let{offsetY:r}=t;if(!t.target||!("clientTop"in t.target))return"none";r+=2,r+=t.target.clientTop;let i="none";return n.children?r<=e*.3?i="before":r>=e*.7?!n.uiTreeObject.collapsed&&n.children.length>0?i="inner":i="after":i="inner":r<=e*.5?i="before":i="after",i}class bm extends ip{constructor(t){super(),this._treeItem=t;const{dragStartDataManager:e}=this._treeItem.sceneTree;let r="none";const i=this.disposeVar(p.createTimeoutWithStartValues(()=>{this._treeItem.uiTreeObject.moveToPositionMode=r,console.log(`uiTreeObject.moveToPositionMode = lastDragMode(${r});`)},200));function s(o){r!==o&&(r=o,i.restart())}this.dispose(this._dragStartEvent.disposableOn(o=>{e.data={type:"UITreeA",value:this._treeItem}})),this.dispose(this._dragOverEvent.disposableOn(o=>{if(!o.dataTransfer)return;o.preventDefault();const a=e;if(a.data&&a.data.type==="UITreeA"&&a.data.value!==void 0){const u=a.data.value,l=this._treeItem,{tree:c}=l;if(c){const h=[...c.selectedItems];~h.indexOf(u)||h.push(u);const f=Mm(l,o,c.itemDivHeight);if(f!=="none"&&p.Tree.canMoveToTreeItems(h,l,f)){o.dataTransfer.dropEffect="move",s(f);return}}}o.dataTransfer.dropEffect="none",s("none")})),this.dispose(this._dropEvent.disposableOn(o=>{const a=e;if(!(a.data&&a.data.type==="UITreeA"&&a.data.value!==void 0))return;const u=a.data.value,l=this._treeItem,{tree:c}=l;if(!c)return;const h=[...c.selectedItems];~h.indexOf(u)||h.push(u);const f=Mm(l,o,c.itemDivHeight);f!=="none"&&p.Tree.canMoveToTreeItems(h,l,f)&&(p.Tree.moveToTreeItems(h,l,f),a.data=void 0,s("none"))})),this.dispose(this._dragLeaveEvent.disposableOn(()=>{r="none",i.restart()}))}}function _2(n){if(!(n instanceof Pr))throw new Error("defaultCreateTreeItemDragDrop !(treeItem instanceof SceneTreeItem)");return new bm(n)}function w2(n){let t=!1;return n&&("show"in n?t=n.show??!0:"enabled"in n&&(t=n.enabled??!0)),t}function E2(n,t){n&&("show"in n?n.show=t:"enabled"in n&&(n.enabled=t))}const S2=["EnvironmentVariables","ScriptsLoader","SceneScript","ScriptLoader"];function C2(n){const t=[],{root:e={}}=n,r=[e];for(;r.length>0;){const i=r.pop();if(!i)throw new Error("!todo");if(i.children){for(let s of i.children)if(s.children&&r.unshift(s),s.sceneObj){const{type:o=void 0}=s.sceneObj;o||(console.warn("sceneObjJson has no type! treeItem.sceneObj: "),console.warn(s.sceneObj)),o&&S2.includes(o)&&t.push(s.sceneObj)}}}return t}async function P2(n,t){const e=C2(n);let r=0;const i=e.length;for(let s of e)if(++r,t){const o=r/i;t(o,r,i)}}class Nm extends st{constructor(e,r){super();g(this,"treeItemContexMenuCallback");this._sceneTree=e,this._projectManager=r}get sceneTree(){return this._sceneTree}}class I2 extends st{constructor(e){super();g(this,"_jsonLoadingEvent",this.disposeVar(new H));g(this,"_setJsonProcessing",this.disposeVar(p.createProcessingFromAsyncFunc(async(e,r)=>{this._jsonLoadingEvent.emit({type:"init"}),this._jsonLoadingEvent.emit({type:"loading"}),r&&await e.promise(this._sceneTree.preloadFunc(r)),this._setJson(r),this._jsonLoadingEvent.emit({type:"loaded"})})));this._sceneTree=e,this._setJsonProcessing.errorFunc=r=>{this._jsonLoadingEvent.emit({type:"error",error:r})}}get jsonLoadingEvent(){return this._jsonLoadingEvent}_setJson(e){try{this._sceneTree.setJson(e||{})}catch(r){console.error(`json数据装配时发生错误!error: ${r}`)}}get json(){return this._sceneTree.getJson()}set json(e){this._setJsonProcessing.restart(new p.CancelError("JSON重新赋值!"),e)}get jsonStr(){return JSON.stringify(this.json,void 0," ")}set jsonStr(e){this.json=JSON.parse(e)}}function M2(n){return n.name+"_clone"}function od(n,t,e){if(n instanceof Pr)return n.insertNewTreeItem(t,e);{const r={FolderInnerOrAfter:"InnerOrAfter",FolderInnerOrBefore:"InnerOrBefore",FolderInner:"Inner",InnerOrAfter:"InnerOrAfter",InnerOrBefore:"InnerOrBefore",Inner:"Inner",After:"After",Before:"Before"};return n.insertNewTreeItem(r[t],e)}}function b2(n){[n,...n.getDescendants()].forEach(t=>t.destroy())}const rn=class rn extends p.Tree{constructor(e,r,i,s){super(i);g(this,"_jsonLoading",this.disposeVar(new I2(this)));g(this,"createSceneObjectFunc",rn.defaultCreateSceneObjectFunc);g(this,"createTreeItemDragDropFunc",rn.defaultCreateTreeItemDragDropFunc);g(this,"preloadFunc",rn.defaultPreload);g(this,"getSceneObjectShowFunc",rn.defaultGetSceneObjectShow);g(this,"setSceneObjectShowFunc",rn.defaultSetSceneObjectShow);g(this,"getSceneTreeItemCloneNameFunc",rn.defaultGetSceneTreeItemCloneNameFunc);g(this,"debug",!1);g(this,"_contextMenu",this.disposeVar(new Nm(this,this.projectManager)));g(this,"_showPropUiOnSelecting",this.disposeVar(p.react(!0)));this._name=e,this._dragStartDataManager=r,this._projectManager=s,this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{var a,u;window.lssn=this.lastSelectedItem,window.lsso=(a=this.lastSelectedItem)==null?void 0:a.sceneObject,this.debug&&console.log(((u=this.lastSelectedItem)==null?void 0:u.sceneObject)??"select null")}));const{sceneObjectsManager:o}=this._projectManager;this.dispose(this.itemsDeleted.disposableOn(a=>{for(let u of a){const l=u,{sceneObject:c}=l;c&&o.deleteSceneObject(c)&&c.destroy()&&Kl(c,void 0);for(let h of l.getDescendants()){const{sceneObject:f}=h;f&&o.deleteSceneObject(f)&&f.destroy()&&Kl(f,void 0)}b2(u)}})),this.dispose(this.itemsAdded.disposableOn(a=>{for(let u of a){const l=u;l.sceneObject&&o.addSceneObject(l.sceneObject)&&Kl(l.sceneObject,l)}})),this.dispose(this.selectedItems.changedEvent.disposableOn(()=>{if(!this.showPropUiOnSelecting)return;this._projectManager.propUiTreeManager.sceneObject=void 0;const{lastSelectedItem:a}=this;a&&(this._projectManager.propUiTreeManager.sceneObject=a.sceneObject)}))}get json(){return this._jsonLoading.json}set json(e){this._jsonLoading.json=e}get jsonStr(){return this._jsonLoading.jsonStr}set jsonStr(e){this._jsonLoading.jsonStr=e}get jsonLoadingEvent(){return this._jsonLoading.jsonLoadingEvent}get name(){return this._name}get projectManager(){return this._projectManager}get contextMenu(){return this._contextMenu}get showPropUiOnSelecting(){return this._showPropUiOnSelecting.value}set showPropUiOnSelecting(e){this._showPropUiOnSelecting.value=e}get showPropUiOnSelectingChanged(){return this._showPropUiOnSelecting.changed}get sceneUiTree(){return this.uiTree}getTreeItemFromSceneObjId(e){const r=this.getDescendants();let i;for(let s of r)if(s.sceneObject&&s.sceneObject.id===e){i=s;break}return i}get dragStartDataManager(){return this._dragStartDataManager}getJson(){return{root:{children:[...this.children].filter(e=>e.isExport).map(e=>e.json)}}}setJson(e){var i;e.root=e.root||{};const r=e.root.children??[];this.root.resetChildren(!0);for(let s of r){const o=new Pr(this,!0);o.json=s,(i=this.root.children)==null||i.push(o)}}testAddNewTreeItem(e,r){const i=e||this.lastSelectedItem||this.root;return i?od(i,r):!1}addNewTreeItem(e,r,i,s){const o=e||this.lastSelectedItem||this.root;if(o&&od(o,r)){const a=new Pr(this,i);if(a.sceneObject=s,!od(o,r,a))throw new Error("currentTreeItem.insertNewTreeItem return false!");return a}}createSceneObjectTreeItem(e,r,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const a=ft.create(e,r);return a?this.addNewTreeItem(i,s??"FolderInnerOrAfter",!0,a):void 0}createGroupTreeItem(e,r,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o)){console.warn(`cannot addNewTreeItem! currentTreeItem(${i?i.id:"root"})`);return}const a=this.addNewTreeItem(i,s??"FolderInnerOrAfter",!0);if(!a){console.warn("addNewTreeItem error!");return}return a.name=e??"未命名组节点",a}createSceneObjectTreeItemFromClass(e,r,i,s){const o=s??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(i,o))return;const a=ft.createFromClass(e,r);return a?this.addNewTreeItem(i,o,!0,a):void 0}createSceneObjectTreeItemFromJson(e,r,i){const s=i??"FolderInnerOrAfter";if(!this.testAddNewTreeItem(r,s))return;const o=ft.createFromJson(e);return console.log(o),o?this.addNewTreeItem(r,i??"FolderInnerOrAfter",!0,o):void 0}destroySceneObjectTreeItem(e){if(e===this.root){console.warn("cannot destroy root! please use function destroyAllSceneObjectTreeItems!");return}e.detachFromParent()}destroyAllSceneObjectTreeItems(){if(!this.root.children)return;const e=[...this.root.children];for(let r of e)this.destroySceneObjectTreeItem(r)}};g(rn,"defaultCreateSceneObjectFunc",y2),g(rn,"defaultCreateTreeItemDragDropFunc",_2),g(rn,"defaultPreload",P2),g(rn,"defaultGetSceneObjectShow",w2),g(rn,"defaultSetSceneObjectShow",E2),g(rn,"defaultGetSceneTreeItemCloneNameFunc",M2);let Al=rn;const ad={saturation:.35,brightness:1.4,gamma:.8,atmosphereScatteringIntensity:5,groundColor:[0,.09411764705882353,.3137254901960784,1]};class N2 extends st{constructor(e){super();g(this,"_currentPosition",this.disposeVar(p.reactArrayWithUndefined(void 0)));g(this,"_currentRotation",this.disposeVar(p.reactArrayWithUndefined(void 0)));g(this,"_currentHeading",this.disposeVar(p.react(void 0)));g(this,"_isRotating",this.disposeVar(p.react(!1)));g(this,"_isGround",this.disposeVar(p.react(!1)));g(this,"_startPosition",[0,0,0]);g(this,"_startRotation",[0,0,0]);g(this,"_processing",this.disposeVar(p.createProcessingFromAsyncFunc(async(e,r,i,s)=>{const{currentPosition:o,currentRotation:a}=this;if(!o||s<=0||!a){this._currentPosition.value=r,this._currentRotation.value=i;return}const u=this._startPosition;u.splice(0,3,...o);const l=this._startRotation;l.splice(0,3,...a);let c=Date.now();const h=xl(u,r);this._currentHeading.value=h;const d=$h(u,r)/s,v=[i[0]-l[0],i[1]-l[1],i[2]-l[2]],_=r[2]-u[2];await e.promise(new Promise(E=>{e.disposer.dispose(p.animateFrame(async()=>{let P=Date.now()-c;P=P<0?0:P,P=P>s?s:P;const y=P*d,w=fm(u,y,h);if(this.isGround&&w){const m=await this._esviewer.getTerrainHeight([w[0],w[1]]);this._currentPosition.value=[w[0],w[1],m??0]}else w&&(w[2]+=_*(P/s)),this._currentPosition.value=w;if(this.isRotating){const[m,S,C]=v,I=P/s;this._currentRotation.value=[l[0]+m*I,l[1]+S*I,l[2]+C*I]}P===s&&(this._currentPosition.value=r,this.isRotating&&(this._currentRotation.value=i),this.isRotating=!1,this.isGround=!1,E())}))}))})));this._esviewer=e}get currentPosition(){return this._currentPosition.value}get currentPositionChanged(){return this._currentPosition.changed}get currentRotation(){return this._currentRotation.value}get currentRotationChanged(){return this._currentRotation.changed}get currentHeading(){return this._currentHeading.value}get currentHeadingChanged(){return this._currentHeading.changed}get isRotating(){return this._isRotating.value}set isRotating(e){this._isRotating.value=e}get isRotatingChanged(){return this._isRotating.changed}get isGround(){return this._isGround.value}set isGround(e){this._isGround.value=e}get isGroundChanged(){return this._isGround.changed}get processing(){return this._processing}restart(e,r,i){this._processing.restart(void 0,e,r,i)}cancel(){this._processing.cancel()}}function xm(n){let t=0;function e(r,i){i++,t=Math.max(i,t),r.forEach(s=>{Array.isArray(s)&&e(s,i)})}return e(n,0),t}const qi=class qi extends ee{constructor(e){super(e);g(this,"editingBindMode","lineString");g(this,"_area",this.dv(p.react(0)));g(this,"_perimeter",this.dv(p.react(0)));const r=()=>{this._updateArea(),this._updatePerimeter()};r(),this.d(this.pointsChanged.don(r))}updateEditing(){var r;const e=[];this.editingBindMode=="doublePoints"?e.push(ct.DoublePointsAppend,ct.DoublePointsModify):this.editingBindMode=="lineString"?e.push(ct.LineStringAppend,ct.LineStringInsert,ct.Translation):this.editingBindMode=="circular"?(e.push(ct.CircularAppend,ct.CircularInsert,ct.Translation),this.supportEditingModes().includes(ct.HeightModify)&&e.push(ct.HeightModify)):this.editingBindMode=="visibility"?e.push(ct.VisibilityAppend,ct.VisibilityModify):this.editingBindMode=="scatter"&&e.push(ct.ScatterAppend,ct.ScatterModify),(r=this.activeViewer)==null||r.startEditing(this,e,{callSource:"inner"})}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}_updateArea(){this._area.value=this.getArea()??0}_updatePerimeter(){this._perimeter.value=this.getPerimeter()??0}getArea(){if(this.points&&this.points.length>=3)return Kf([...this.points])}getDistance(){if(this.points&&this.points.length>=2){const e=Tl(this.points,"GEODESIC");return e[e.length-1]}else return}getPerimeter(){if(this.points&&this.points.length>=3){const e=[...this.points,this.points[0]],r=Tl(e,"GEODESIC");return r[r.length-1]}else return}getIntersect(e){if(this.points&&this.points.length>=3&&e.length>=3){const r=gm(this.points,e);if(!r)return;const i=r[0][0][0];if(Array.isArray(i)){const s=[...r],o=[];return s.forEach(a=>{const u=a[0].map(l=>[...l,0]);o.push(u)}),o}else return[[...r][0].map(a=>[...a,0])]}else return}getUnion(e){if(this.points&&this.points.length>=3&&e.length>=3){const r=pm(this.points,e);if(!r)return;const i=r[0][0][0];if(Array.isArray(i)){const s=[...r],o=[];return s.forEach(a=>{const u=a[0].map(l=>[...l,0]);o.push(u)}),o}else return[[...r][0].map(a=>[...a,0])]}else return}getDifference(e){if(this.points&&this.points.length>=3&&e.length>=3){let r=[...e];const i=e[0],s=e[e.length-1];i[0]===s[0]&&i[1]===s[1]&&i[2]===s[2]||r.push(i);const o=mm([...this.points,this.points[0]],[...r]);if(!o)return{status:"undefined",positions:void 0};const a=[...o];if(xm(a)===3){const u=a.map(f=>f.map(d=>[...d,0]));if(u.length<=1)return{status:"notIncluded",positions:u};const l=u[0],c=u[1];return Zf([...l],[...c])==="oneBig"?{status:"included",positions:u}:{status:"notIncluded",positions:u}}else if(xm(a)===4){const l=[...a.map(h=>h.map(f=>f.map(d=>[...d,0])))],c=[];return l.forEach(h=>{c.push(h[0])}),{status:"notIncluded",positions:c}}else return{status:"undefined",positions:void 0}}else return{status:"undefined",positions:void 0}}getBuffer(e=500,r){if(this.points&&this.points.length>=2){const i=vm(this.points,e,r);return i?[i[0].map(s=>[...s,0])]:void 0}else return}geoPolygonOverlap(e){if(this.points&&this.points.length>=3&&e.length>=3){const r=Zf(this.points,e);return r==="oneBig"?!0:r==="twoBig"?!1:void 0}else return}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",coordinate:[...e.coordinate,new tt([this,"editing"],"编辑",!1),new ht([this,"points"],"位置数组",qi.defaults.points,void 0,!0)],style:[...e.style,new vt([],"点样式"),new tt([this,"pointed"],"开启",!1),new R([this,"pointSize"],"点大小",1),new Tt([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new Gt([this,"pointColor"],"点颜色",[1,1,1,1]),new Gt([this,"pointOutlineColor"],"轮廓颜色",qi.defaults.pointStyle.outlineColor),new R([this,"pointOutlineWidth"],"轮廓宽度",qi.defaults.pointStyle.outlineWidth),new vt([],"线样式"),new tt([this,"stroked"],"开启线样式",!0),new tt([this,"strokeGround"],"贴地",!1),new R([this,"strokeWidth"],"线宽",1),new Tt([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new Gt([this,"strokeColor"],"线颜色",[1,1,1,1]),new vt([],"面样式"),new tt([this,"filled"],"开启",!1),new tt([this,"fillGround"],"贴地",!1),new Gt([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...e.more,new vt([],"点样式集合"),new Et([this,"pointMaterial"],"点材质"),new ht([this,"pointMaterialParams"],"点材质参数"),new vt([],"线样式集合"),new Et([this,"strokeMaterial"],"线材质"),new ht([this,"strokeMaterialParams"],"线材质参数"),new vt([],"面样式集合"),new Et([this,"fillMaterial"],"面材质"),new ht([this,"fillMaterialParams"],"面材质参数")]}}get pointSize(){return this.pointStyle.size}set pointSize(e){this.pointStyle={...this.pointStyle,size:e}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(e){this.pointStyle={...this.pointStyle,sizeType:e}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(e){this.pointStyle={...this.pointStyle,color:[...e]}}get pointColorChanged(){return this.pointStyleChanged}get pointOutlineColor(){return this.pointStyle.outlineColor}set pointOutlineColor(e){this.pointStyle={...this.pointStyle,outlineColor:[...e]}}get pointOutlineColorChanged(){return this.pointStyleChanged}get pointOutlineWidth(){return this.pointStyle.outlineWidth}set pointOutlineWidth(e){this.pointStyle={...this.pointStyle,outlineWidth:e}}get pointOutlineWidthChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(e){this.pointStyle={...this.pointStyle,material:e}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(e){this.pointStyle={...this.pointStyle,materialParams:e}}get pointMaterialParamsChanged(){return this.pointStyleChanged}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}};g(qi,"createDefaultProps",()=>({...ee.createDefaultProps(),pointed:!1,pointStyle:p.reactJson({size:10,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),stroked:!1,strokeStyle:p.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:p.reactJson({color:[1,1,1,1],material:"",materialParams:{},ground:!1}),points:p.reactPositions(void 0)})),g(qi,"type",qi.register("ESGeoVector",qi,{chsName:"地理矢量",tags:["ESObjects"],description:"地理矢量"})),g(qi,"supportEditingModes",[...ee.supportEditingModes,ct.Translation]);let Rt=qi;const Ro=class Ro extends ee{constructor(){super(...arguments);g(this,"_statusDis",this.dv(p.react(!0)));g(this,"_smoothMoveEvent",this.dv(new H));g(this,"_smoothMoveWithRotationEvent",this.dv(new H));g(this,"_smoothMoveOnGroundEvent",this.dv(new H));g(this,"_smoothMoveWithRotationOnGroundEvent",this.dv(new H));g(this,"_automaticLandingEvent",this.dv(new H));g(this,"_smoothMoveKeepPitchEvent",this.dv(new H));g(this,"_smoothMoveRelativelyEvent",this.dv(new H));g(this,"_smoothMoveRelativelyWithRotationEvent",this.dv(new H));g(this,"useCalcFlyToParamInESObjectWithLocation",!0)}updateEditing(){var r;const e=[];this.editingBindMode=="singlePoint"?(e.push(ct.Place,ct.Translation),["ESLocationMeasurement"].includes(this.typeName)||e.push(ct.Rotation),["ESClippingPlane","ESLocationMeasurement","ESLocalRectangle","ESBoxClipping"].includes(this.typeName)||e.push(ct.Scale)):this.editingBindMode=="doublePoints"&&e.push(ct.DoublePointsAppend,ct.DoublePointsModify),(r=this.activeViewer)==null||r.startEditing(this,e,{callSource:"inner"})}get statusDis(){return this._statusDis.value}get statusDisChanged(){return this._statusDis.changed}get smoothMoveEvent(){return this._smoothMoveEvent}smoothMove(e,r){this._smoothMoveEvent.emit(e,r)}get smoothMoveWithRotationEvent(){return this._smoothMoveWithRotationEvent}smoothMoveWithRotation(e,r,i){this._smoothMoveWithRotationEvent.emit(e,r,i)}get smoothMoveOnGroundEvent(){return this._smoothMoveOnGroundEvent}smoothMoveOnGround(e,r,i,s){this._smoothMoveOnGroundEvent.emit(e,r,i,s)}get smoothMoveWithRotationOnGroundEvent(){return this._smoothMoveWithRotationOnGroundEvent}smoothMoveWithRotationOnGround(e,r,i,s,o){this._smoothMoveWithRotationOnGroundEvent.emit(e,r,i,s,o)}get automaticLandingEvent(){return this._automaticLandingEvent}automaticLanding(){const e=this.collision;this.collision=!1,setTimeout(()=>{this._automaticLandingEvent.emit(e)},100)}get smoothMoveKeepPitchEvent(){return this._smoothMoveKeepPitchEvent}smoothMoveKeepPitch(e,r){this._smoothMoveKeepPitchEvent.emit(e,r)}get smoothMoveRelativelyEvent(){return this._smoothMoveRelativelyEvent}smoothMoveRelatively(e,r){this._smoothMoveRelativelyEvent.emit(e,r)}get smoothMoveRelativelyWithRotationEvent(){return this._smoothMoveRelativelyWithRotationEvent}smoothMoveRelativelyWithRotation(e,r,i){this._smoothMoveRelativelyWithRotationEvent.emit(e,r,i)}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",location:[...e.location,new tt([this,"editing"],"是否编辑"),new mt([],()=>this.automaticLanding(),[],"自动落地"),new na([this,"position"],"位置数组",[0,0,0]),new Rc([this,"rotation"],"姿态数组",[0,0,0]),new gr([this,"scale"],"缩放",[1,1,1]),new R([this,"minVisibleDistance"],"最小可见距离",0),new R([this,"maxVisibleDistance"],"最大可见距离",0)],more:[...e.more,new mt(["numbers","number"],(r,i)=>this.smoothMove(r,i),[[0,0,0],0],"平滑移动","smoothMove"),new mt(["numbers","number"],(r,i)=>this.smoothMoveKeepPitch(r,i),[[0,0,0],0],"固定方向平滑移动","smoothMoveKeepPitch"),new mt(["numbers","numbers","number"],(r,i,s)=>this.smoothMoveWithRotation(r,i,s),[[0,0,0],[0,0,0],0],"平滑偏移","smoothMoveWithRotation"),new mt(["number","number","number","string"],(r,i,s,o)=>this.smoothMoveOnGround(r,i,s,o),[0,0,0,""],"贴地平滑移动","smoothMoveOnGround"),new mt(["numbers","number","number","number","string"],(r,i,s,o,a)=>this.smoothMoveWithRotationOnGround(r,i,s,o,a),[[0,0,0],0,0,0,""],"贴地平滑偏移","smoothMoveWithRotationOnGround"),new mt(["numbers","number"],(r,i)=>this.smoothMoveRelatively(r,i),[[0,0,0],0],"smoothMoveRelatively","smoothMoveRelatively"),new mt(["numbers","numbers","number"],(r,i,s)=>this.smoothMoveRelativelyWithRotation(r,i,s),[[0,0,0],[0,0,0],0],"smoothMoveRelativelyWithRotation","smoothMoveRelativelyWithRotation"),new tt([this,"enableVisibleDistance"],"是否应用距离显隐")]}}get pointSize(){return this.pointStyle.size}set pointSize(e){this.pointStyle={...this.pointStyle,size:e}}get pointSizeChanged(){return this.pointStyleChanged}get pointSizeType(){return this.pointStyle.sizeType}set pointSizeType(e){this.pointStyle={...this.pointStyle,sizeType:e}}get pointSizeTypeChanged(){return this.pointStyleChanged}get pointColor(){return this.pointStyle.color}set pointColor(e){this.pointStyle={...this.pointStyle,color:[...e]}}get pointColorChanged(){return this.pointStyleChanged}get pointMaterial(){return this.pointStyle.material}set pointMaterial(e){this.pointStyle={...this.pointStyle,material:e}}get pointMaterialChanged(){return this.pointStyleChanged}get pointMaterialParams(){return this.pointStyle.materialParams}set pointMaterialParams(e){this.pointStyle={...this.pointStyle,materialParams:e}}get pointMaterialParamsChanged(){return this.pointStyleChanged}};g(Ro,"createDefaultProps",()=>({...ee.createDefaultProps(),pointed:!1,pointStyle:p.reactJson({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:2}),position:p.reactArray([0,0,0]),rotation:p.reactArray([0,0,0]),scale:p.reactArray([1,1,1]),minVisibleDistance:p.react(0),maxVisibleDistance:p.react(0)})),g(Ro,"type",Ro.register("ESObjectWithLocation",Ro,{chsName:"对象位置",tags:["ESObjects"],description:"对象位置"})),g(Ro,"supportEditingModes",[...ee.supportEditingModes,ct.Place,ct.Translation,ct.Rotation,ct.Scale,ct.DoublePointsAppend,ct.DoublePointsModify]);let dt=Ro;const Ka=class Ka extends dt{getESProperties(){const t={...super.getESProperties()};return{...t,style:[...t.style,new vt([],"点样式集合"),new tt([this,"pointed"],"开启点样式",!1),new R([this,"pointSize"],"点大小",1),new Tt([this,"pointSizeType"],[["screen","screen"],["world","world"]],"点类型","screen"),new Gt([this,"pointColor"],"点颜色",[1,1,1,1]),new vt([],"线样式集合"),new tt([this,"stroked"],"开启线样式",!1),new tt([this,"strokeGround"],"是否贴地(线)",!1),new R([this,"strokeWidth"],"线宽",1),new Tt([this,"strokeWidthType"],[["screen","screen"],["world","world"]],"线类型","screen"),new Gt([this,"strokeColor"],"线颜色",[1,1,1,1]),new vt([],"面样式集合"),new tt([this,"filled"],"开启填充样式",!1),new tt([this,"fillGround"],"是否贴地",!1),new Gt([this,"fillColor"],"填充颜色",[1,1,1,1])],more:[...t.more,new vt([],"点样式"),new Et([this,"pointMaterial"],"点材质",""),new ht([this,"pointMaterialParams"],"点材质参数",{}),new vt([],"线样式"),new Et([this,"strokeMaterial"],"线材质",""),new ht([this,"strokeMaterialParams"],"线材质参数",{}),new vt([],"填充样式"),new Et([this,"fillMaterial"],"面材质",""),new ht([this,"fillMaterialParams"],"面材质参数",{})]}}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(t){this.strokeStyle={...this.strokeStyle,width:t}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(t){this.strokeStyle={...this.strokeStyle,widthType:t}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(t){this.strokeStyle={...this.strokeStyle,color:[...t]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(t){this.strokeStyle={...this.strokeStyle,material:t}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(t){this.strokeStyle={...this.strokeStyle,materialParams:t}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(t){this.strokeStyle={...this.strokeStyle,ground:t}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(t){this.fillStyle={...this.fillStyle,color:[...t]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(t){this.fillStyle={...this.fillStyle,material:t}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(t){this.fillStyle={...this.fillStyle,materialParams:t}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(t){this.fillStyle={...this.fillStyle,ground:t}}get fillGroundChanged(){return this.fillStyleChanged}};g(Ka,"createDefaultProps",()=>({...dt.createDefaultProps(),pointed:!1,pointStyle:p.reactJson({size:1,sizeType:"screen",color:[1,1,1,1],material:"",materialParams:{},outlineColor:[1,0,0,1],outlineWidth:1}),stroked:!1,strokeStyle:p.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!1,fillStyle:p.reactJson({color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),g(Ka,"type",Ka.register("ESLocalVector",Ka,{chsName:"本地矢量",tags:["ESObjects"],description:"本地矢量对象"}));let Ba=Ka;const Vl=class Vl extends Ba{};g(Vl,"type",Vl.register("ESLocalVector2D",Vl,{chsName:"本地矢量2D",tags:["ESObjects"],description:"本地矢量2D对象"}));let gs=Vl;const x2=[["固定朝向",0],["面向屏幕旋转",1],["绕自身Z轴旋转",2]],T2=[["单面不透明",0],["双面不透明",1],["单面遮罩",2],["双面遮罩",3],["单面透明",4],["双面透明",5],["单面未遮挡透明",6],["双面未遮挡透明",7]],Za=class Za extends dt{constructor(){super(...arguments);g(this,"_widgetEvent",this.dv(new H))}get widgetEvent(){return this._widgetEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new tt([this,"screenRender"],"屏幕渲染",!0),new tt([this,"sizeByContent"],"尺寸自适应",!0),new qe([this,"size"],"尺寸大小",[100,100]),new qe([this,"anchor"],"偏移比例",[.5,1]),new qe([this,"offset"],"像素偏移",[0,0]),new Tt([this,"renderMode"],T2,"渲染模式",0),new Tt([this,"rotationType"],x2,"漫游旋转类型",1),new Et([this,"actorTag"],"绑定对象"),new Et([this,"socketName"],"插槽名称"),new gr([this,"positionOffset"],"位置偏移"),new gr([this,"rotationOffset"],"相对姿态")],more:[...e.more,new R([this,"zOrder"],"排序",0)]}}};g(Za,"createDefaultProps",()=>({...dt.createDefaultProps(),screenRender:!0,size:p.reactArray([100,100]),anchor:p.reactArray([.5,1]),offset:p.reactArray([0,0]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,actorTag:"",socketName:"",positionOffset:p.reactArray([0,0,0]),rotationOffset:p.reactArray([0,0,0])})),g(Za,"type",Za.register("ESLabel",Za,{chsName:"标签",tags:["ESObjects"],description:"标签对象"}));let yn=Za;const tu=class tu extends ft{constructor(t){super(t)}};g(tu,"createDefaultProps",()=>({...ft.createDefaultProps(),show:!0,fillStyle:p.reactJson({color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),g(tu,"type",tu.register("ESTestObject",tu,{chsName:"测试",tags:["ESObjects"],description:""}));let ud=tu;const Wi=class Wi extends ee{constructor(e){super(e);g(this,"_refreshTilesetEvent",this.dv(new H));g(this,"_tilesetReadyEvent",this.dv(new H));g(this,"_supportEdit",this.dv(p.react(!0)));g(this,"_highlightFeatureEvent",this.dv(new H));g(this,"_highlightFeatureAndFlyToEvent",this.dv(new H));g(this,"_strokeFeatureEvent",this.disposeVar(new H));g(this,"_getFeatureTableEvent",this.dv(new H));g(this,"_featureTableResultEvent",this.dv(new H));g(this,"_getMaterialNameListEvent",this.disposeVar(new H));g(this,"_setFeatureStyleEvent",this.dv(new H));g(this,"_setFeatureColorEvent",this.dv(new H));g(this,"_setFeatureVisableEvent",this.dv(new H));g(this,"_resetFeatureStyleEvent",this.dv(new H));g(this,"setMaterialInfoEvent",this.ad(new H));g(this,"_setMaterialEvent",this.disposeVar(new H));g(this,"_clippingPlanesId",this.dv(p.react("")));g(this,"_clippingPlaneIds",this.dv(p.react([])));g(this,"_flattenedPlaneId",this.dv(p.react("")));g(this,"_flattenedPlaneEnabled",this.dv(p.react(!1)));g(this,"_clippingPlaneId",this.dv(p.react("")));g(this,"_excavateId",this.dv(p.reactArray([])))}updateEditing(){var e;(e=this.activeViewer)==null||e.startEditing(this,[ct.Translation,ct.Rotation],{callSource:"inner"})}get refreshTilesetEvent(){return this._refreshTilesetEvent}refreshTileset(){this._refreshTilesetEvent.emit()}get tilesetReady(){return this._tilesetReadyEvent}get supportEdit(){return this._supportEdit.value}set supportEdit(e){this._supportEdit.value=e}get supportEditChanged(){return this._supportEdit.changed}get highlightFeatureEvent(){return this._highlightFeatureEvent}highlightFeature(e,r){this._highlightFeatureEvent.emit(e,r)}get highlightFeatureAndFlyToEvent(){return this._highlightFeatureAndFlyToEvent}highlightFeatureAndFlyTo(e,r,i,s){this._highlightFeatureAndFlyToEvent.emit(e,r,i,s)}get strokeFeatureEvent(){return this._strokeFeatureEvent}strokeFeature(e,r=[1,0,0,1]){this._strokeFeatureEvent.emit(e,r)}get getFeatureTableEvent(){return this._getFeatureTableEvent}getFeatureTable(){return Promise.race([new Promise(e=>{const r=this.d(this._featureTableResultEvent.donce(e));this._getFeatureTableEvent.emit(),setTimeout(()=>{r(),e(void 0)},2e3)})])}get getMaterialNameListEvent(){return this._getMaterialNameListEvent}getMaterialNameList(){return new Promise(e=>{const r=new st;r.d(this.getMaterialNameListEvent.don(i=>{i!=="start"&&(r.destroy(),e(i))})),this.getMaterialNameListEvent.emit("start"),setTimeout(()=>{r.isDestroyed()||(r.destroy(),e(void 0))},2e3)})}get setFeatureStyleEvent(){return this._setFeatureStyleEvent}setFeatureStyle(e){this._setFeatureStyleEvent.emit(e)}get setFeatureColorEvent(){return this._setFeatureColorEvent}setFeatureColor(e,r){this._setFeatureColorEvent.emit(e,typeof r=="string"?JSON.parse(r):r)}get setFeatureVisableEvent(){return this._setFeatureVisableEvent}setFeatureVisable(e,r){this._setFeatureVisableEvent.emit(e,typeof r=="string"?JSON.parse(r):r)}get resetFeatureStyleEvent(){return this._resetFeatureStyleEvent}resetFeatureStyle(){this._resetFeatureStyleEvent.emit()}get setMaterialEvent(){return this._setMaterialEvent}setMaterial(e){return new Promise(r=>{const i=new st;i.ad(this.setMaterialInfoEvent.donce(s=>{i.destroy(),r(s)})),this._setMaterialEvent.emit(e)})}get clippingPlanesId(){return this._clippingPlanesId.value}set clippingPlanesId(e){this._clippingPlanesId.value=e}get clippingPlanesIdChanged(){return this._clippingPlanesId.changed}get clippingPlaneIds(){return this._clippingPlaneIds.value}set clippingPlaneIds(e){this._clippingPlaneIds.value=e}get clippingPlaneIdsChanged(){return this._clippingPlaneIds.changed}get flattenedPlaneId(){return this._flattenedPlaneId.value}set flattenedPlaneId(e){this._flattenedPlaneId.value=e}get flattenedPlaneIdChanged(){return this._flattenedPlaneId.changed}get flattenedPlaneEnabled(){return this._flattenedPlaneEnabled.value}set flattenedPlaneEnabled(e){this._flattenedPlaneEnabled.value=e}get flattenedPlaneEnabledChanged(){return this._flattenedPlaneEnabled.changed}get clippingPlaneId(){return this._clippingPlaneId.value}set clippingPlaneId(e){this._clippingPlaneId.value=e}get clippingPlaneIdChanged(){return this._clippingPlaneId.changed}get excavateId(){return this._excavateId.value}set excavateId(e){this._excavateId.value=e}get excavateIdChanged(){return this._excavateId.changed}setLight122(){this.czmEnvironmentMapManager={...ad}}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"dataSource",basic:[...e.basic,new Je([this,"maximumScreenSpaceError"],1,[0,256],"精度",16),new Tt([this,"materialMode"],[["常规","normal"],["科技感","technology"]],"材质模式","normal",!0),new Tt([this,"colorBlendMode"],[["默认","HIGHLIGHT"],["替换","REPLACE"],["混合","MIX"]],"颜色模式","HIGHLIGHT"),new ht([this,"materialOverrideMap"],"材质替换",Wi.defaults.materialOverrideMap)],dataSource:[...e.dataSource,new ht([this,"url"],"服务地址",Wi.defaults.url,void 0,!0)],coordinate:[...e.coordinate,new tt([this,"editing"],"编辑",!1,!0),new gr([this,"offset"],"偏移量",[0,0,0],!0),new Rc([this,"rotation"],"旋转",[0,0,0])],more:[...e.more,new ht([this,"materialParams"],"materialParams",Wi.defaults.materialParams),new mt(["string","string"],(r,i)=>this.highlightFeature(r,i),["","rgba(255,0,0,1)"],"highlightFeature"),new mt(["string","string"],(r,i)=>this.setFeatureColor(r,i),["",""],"setFeatureColor"),new mt(["string","string"],(r,i)=>this.setFeatureVisable(r,i),["",""],"setFeatureVisable"),new mt([],()=>this.resetFeatureStyle(),[],"resetFeatureStyle"),new vt([],"ue"),new mt([],()=>this.refreshTileset(),[],"refreshTileset"),new Et([this,"actorTag"]),new tt([this,"highlight"],"是否高亮"),new Gt([this,"highlightColor"]),new R([this,"highlightID"]),new vt([],"czm"),new vt([],"可视化"),new qe([this,"czmImageBasedLightingFactor"],"反射强度"),new R([this,"czmAtmosphereScatteringIntensity"],"大气散射强度"),new ht([this,"czmEnvironmentMapManager"],"动态环境贴图管理器"),new R([this,"czmMaximumMemoryUsage"],"最大内存"),new vt([],"常用"),new Tt([this,"czmClassificationType"],[["NONE","NONE"],["TERRAIN","TERRAIN"],["CESIUM_3D_TILE","CESIUM_3D_TILE"],["BOTH","BOTH"]],"czmClassificationType","NONE",!0),new ht([this,"czmStyleJson"],"czmStyle"),new tt([this,"czmBackFaceCulling"]),new tt([this,"czmSkipLevelOfDetail"]),new R([this,"cacheBytes"],"最大缓存",536870912),new vt([],"调试信息"),new tt([this,"czmDebugShowBoundingVolume"]),new tt([this,"czmDebugShowContentBoundingVolume"]),new vt([],"clippingPlanes"),new tt([this,"clippingPlaneEnabled"]),new tt([this,"unionClippingRegions"]),new Gt([this,"clippingPlaneEdgeColor"]),new R([this,"clippingPlaneEdgeWidth"])]}}};g(Wi,"createDefaultProps",()=>({...ee.createDefaultProps(),url:"",actorTag:"",materialMode:"normal",highlight:!1,maximumScreenSpaceError:16,highlightID:0,highlightColor:p.reactArray([1,0,0,1]),offset:p.reactArrayWithUndefined([0,0,0]),rotation:p.reactArray([0,0,0]),czmImageBasedLightingFactor:p.reactArray([1,1]),czmEnvironmentMapManager:p.reactJsonWithUndefined(void 0),czmLuminanceAtZenith:2,czmAtmosphereScatteringIntensity:2,czmMaximumMemoryUsage:512,czmClassificationType:"NONE",czmStyleJson:p.reactJson({}),czmBackFaceCulling:!0,czmDebugShowBoundingVolume:!1,czmDebugShowContentBoundingVolume:!1,czmSkipLevelOfDetail:!1,cacheBytes:536870912,colorBlendMode:"HIGHLIGHT",clippingPlaneEnabled:!0,unionClippingRegions:!0,clippingPlaneEdgeColor:p.reactArray([1,1,1,1]),clippingPlaneEdgeWidth:2,materialParams:{baseColor:[0,.5,1]},allowPicking:!0,materialOverrideMap:p.reactJsonWithUndefined({}),featureIdLabel:0,splitDirection:"NONE"})),g(Wi,"type",Wi.register("ES3DTileset",Wi,{chsName:"3DTileset",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"3DTileset"})),g(Wi,"supportEditingModes",[...ee.supportEditingModes,ct.Translation,ct.Rotation]);let Wn=Wi;const eu=class eu extends dt{constructor(e){super(e);g(this,"_isFlyInCreated",this.dv(p.react(!1)));g(this,"_readyEvent",this.dv(new H));this.collision=!1,this.d(this.createdEvent.don(()=>{setTimeout(()=>{if((this.editing??!1)||!this.position)this.d(ra([this.positionChanged,this.editingChanged],()=>{this.editing||!this.position||this.isFlyInCreated&&this.flyTo()},{time:"donce"}));else{if(!this.isFlyInCreated)return;this.flyTo()}},1e3)}))}get isFlyInCreated(){return this._isFlyInCreated.value}set isFlyInCreated(e){this._isFlyInCreated.value=e}get isFlyInCreatedChanged(){return this._isFlyInCreated.changed}get readyEvent(){return this._readyEvent}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Tt([this,"mode"],[["柱状警告","cylinder"],["圆形警告","circle"]],"模式","cylinder"),new R([this,"radius"],"半径",10)]}}};g(eu,"createDefaultProps",()=>({...dt.createDefaultProps(),mode:"cylinder",radius:10})),g(eu,"type",eu.register("ESAlarm",eu,{chsName:"报警",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警告类"}));let ld=eu;const Fo=class Fo extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new R([this,"radius"],"半径",1),new Tt([this,"mode"],[["扫描","scan"],["扩散","diffuse"]],"模式",Fo.defaults.mode)]}}};g(Fo,"createDefaultProps",()=>({...dt.createDefaultProps(),radius:1,mode:"scan",collision:!1})),g(Fo,"type",Fo.register("ESApertureEffect",Fo,{chsName:"光圈特效",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"光圈特效"}));let hd=Fo;const Go=class Go extends Rt{constructor(e){super(e);g(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,coordinate:[...e.coordinate,new R([this,"area"],"面积",0,!1,!0),new R([this,"perimeter"],"周长",0,!1,!0)]}}};g(Go,"createDefaultProps",()=>({...Rt.createDefaultProps(),fillStyle:p.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!1}),strokeStyle:p.reactJson({width:1,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1}),filled:!0,stroked:!1,collision:!1})),g(Go,"type",Go.register("ESGeoPolygon",Go,{chsName:"地理多边形",tags:["ESObjects"],description:"地理多边形"})),g(Go,"supportEditingModes",[...Rt.supportEditingModes,ct.CircularAppend,ct.CircularInsert]);let oe=Go;const vs=class vs extends oe{get fillMaterial(){return this.fillStyle.material}set fillMaterial(t){this.fillStyle={...this.fillStyle,material:t}}get fillMaterialParams(){return this.fillStyle?this.fillStyle.materialParams:vs.defaults.fillStyle.materialParams}set fillMaterialParams(t){this.fillStyle={...this.fillStyle??vs.defaults.fillStyle,materialParams:t??vs.defaults.fillStyle.materialParams}}constructor(t){super(t)}};g(vs,"createDefaultProps",()=>({...oe.createDefaultProps(),stroked:!0,filled:!0,units:p.reactArray(["SquareMeter_SquareKilometer","MU_Hectare","PerimeterMeter_PerimeterKilometer"]),fillStyle:p.reactJson({color:[1,1,1,1],material:"Material'/EarthSDKForUE/M_ES_Material.M_ES_Material'",materialParams:{Opacity:.4},ground:!0}),strokeStyle:p.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),g(vs,"type",vs.register("ESAreaMeasurement",vs,{chsName:"面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE","_ES_Impl_Ol"],description:"面积测量"}));let cd=vs;const ru=class ru extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"general",more:[...t.more,new vt([],"czm"),new Ou([this,"image"],"图片"),new gr([this,"translation"],"偏移")]}}};g(ru,"createDefaultProps",()=>({...dt.createDefaultProps(),image:"${earthsdk3-assets-script-dir}/assets/img/smoke.png",translation:p.reactArray([0,0,0])})),g(ru,"type",ru.register("ESBlastParticleSystem",ru,{chsName:"粒子爆炸",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"粒子爆炸"}));let fd=ru;const mi=class mi extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new tt([this,"reverse"],"反转",mi.defaults.reverse),new gr([this,"size"],"尺寸",mi.defaults.size),new Gt([this,"edgeColor"],"边框颜色",mi.defaults.edgeColor),new R([this,"edgeWidth"],"边框宽度",mi.defaults.edgeWidth),new Et([this,"targetID"],"瓦片图层",mi.defaults.targetID)]}}};g(mi,"createDefaultProps",()=>({...dt.createDefaultProps(),reverse:!1,edgeColor:p.reactArray([1,1,1,1]),edgeWidth:2,size:p.reactArray([10,10,10]),targetID:""})),g(mi,"type",mi.register("ESBoxClipping",mi,{chsName:"体剖切",tags:["ESObjects","_ES_Impl_Cesium"],description:"体剖切,体裁剪,体裁切,盒裁切"}));let dd=mi;const Ul=class Ul extends dt{constructor(){super(...arguments);g(this,"_thumbnail",this.dv(p.react("")));g(this,"_duration",this.dv(p.react(1)));g(this,"_resetWithCurrentCameraEvent",this.dv(new H));g(this,"_captureEvent",this.dv(new H))}get thumbnail(){return this._thumbnail.value}set thumbnail(e){this._thumbnail.value=e}get thumbnailChanged(){return this._thumbnail.changed}get duration(){return this._duration.value}set duration(e){this._duration.value=e}get durationChanged(){return this._duration.changed}flyIn(e=1,r="default"){this.flyInEvent.emit(e,-1,r)}get resetWithCurrentCameraEvent(){return this._resetWithCurrentCameraEvent}resetWithCurrentCamera(){this._resetWithCurrentCameraEvent.emit()}get captureEvent(){return this._captureEvent}capture(e,r){this._captureEvent.emit(e,r)}execOnCreating(){this.resetWithCurrentCamera()}async initByCurrent(){this.resetWithCurrentCamera()}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"ESCameraView"),new mt([],()=>this.resetWithCurrentCamera(),[],"设置为当前视角"),new mt(["number","number"],(r,i)=>this.capture(r,i),[64,64],"获取缩略图"),new Et([this,"thumbnail"],"缩略图","",!0),new R([this,"duration"],"飞行时间",1,!0)]}}};g(Ul,"type",Ul.register("ESCameraView",Ul,{chsName:"视角",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角"}));let Kh=Ul;class Zh extends st{constructor(e,r,i){super();g(this,"_view",this.dv(new Kh));if(this.d(e.components.disposableAdd(this._view)),this._view.name=(i==null?void 0:i.name)??`视角${e.views.length+1}`,r){const a=this._view,u=r;a.duration=u.duration??1,a.position=u.position,a.rotation=u.rotation??[0,0,0],a.thumbnail=u.thumbnail??"",a.name=u.name}else{const a=(i==null?void 0:i.size)??[64,64];this.d(p.nextAnimateFrame(()=>{this._view.resetWithCurrentCamera(),this._view.capture(a[0],a[1])}))}const s=this._view,o=this.dv(p.createNextAnimateFrameEvent(s.durationChanged,s.positionChanged,s.rotationChanged,s.thumbnailChanged,s.nameChanged));this.d(o.don(()=>e.emitViewsWarpper()))}get view(){return this._view}get viewInfo(){const e=this._view;return{duration:e.duration,position:e.position,rotation:e.rotation,thumbnail:e.thumbnail,name:e.name}}}const Xn=class Xn extends ft{constructor(e){super(e);g(this,"_currentViewIndex",this.dv(p.react(-1)));g(this,"_viewWrappers",this.dv(new p.ObservableArray));g(this,"_currentViewWrapper",this.dv(p.react(void 0)));g(this,"_container",this.dv(p.react(void 0)));this.initProcessing();{const r=()=>{if(!this._currentViewWrapper.value)return;this._viewWrappers.indexOf(this._currentViewWrapper.value)===-1&&(this._currentViewWrapper.value=void 0)};r(),this.d(this._viewWrappers.changedEvent.don(r))}{const r=()=>{const i=this._currentViewWrapper.value;this._currentViewIndex.value=i?this._getIndex(i):-1};r(),this.d(this._viewWrappers.changedEvent.don(r)),this.d(this._currentViewWrapper.changed.don(r))}this.d(()=>{this.clearAllViews()})}get json(){return{...this._innerGetJson(),views:this.views}}set json(e){this._innerSetJson(e),this.views=e.views}get currentViewIndex(){return this._currentViewIndex.value}get currentViewIndexChanged(){return this._currentViewIndex.changed}emitViewsWarpper(){this._viewWrappers.changedEvent.emit(this._viewWrappers)}get container(){return this._container.value}get containerChanged(){return this._container.changed}set container(e){this._container.value=e}get views(){return Pm(this._viewWrappers,e=>e.viewInfo)}get viewsChanged(){return this._viewWrappers.changedEvent}set views(e){if(e.length===this._viewWrappers.length){const r=this._viewWrappers;if(e.every((i,s)=>{const o=r.get(s).view;return i.duration===o.duration&&sd(i.position,o.position)&&sd(i.rotation,o.rotation)&&i.thumbnail===o.thumbnail&&i.name===o.name}))return}this.clearAllViews();for(let r of e)this._viewWrappers.push(new Zh(this,r))}_getIndex(e){return this._viewWrappers.indexOf(e)}clearAllViews(){for(let e of this._viewWrappers)e.destroy();this._viewWrappers.length=0}add(e=`视角${this.views.length+1}`,r=[64,64]){this._viewWrappers.push(new Zh(this,void 0,{name:e,size:r}))}update(e,r,i=[64,64]){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const s=this._viewWrappers.get(e);return r&&(s.view.name=r),s.view.resetWithCurrentCamera(),s.view.capture(i[0],i[1]),!0}addView(){this._viewWrappers.push(new Zh(this))}insertView(e){if(this._viewWrappers.length+1<=e||e<0){console.error("this._views.length <= index || index < 0");return}this._viewWrappers.splice(e,0,new Zh(this))}setCurrentView(e){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const r=this._viewWrappers.get(e);return this._currentViewWrapper.value=r,!0}resetView(e){if(e>=this._viewWrappers.length||e<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const r=this._viewWrappers.get(e);r.view.resetWithCurrentCamera(),r.view.capture()}resetViewName(e,r){if(e>=this._viewWrappers.length||e<0){console.warn("index >= this._viewWrappers.length || index < 0");return}const i=this._viewWrappers.get(e);i.view.name=r}updateView(e,r){if(e>=this._viewWrappers.length||e<0)return console.warn("index >= this._viewWrappers.length || index < 0"),!1;const i=this._viewWrappers.get(e);return i.view.position=r.position,i.view.rotation=r.rotation??[0,0,0],i.view.duration=r.duration??1,i.view.thumbnail=r.thumbnail??"",i.view.name=r.name??"",!0}flyToView(e){if(this.setCurrentView(e)){if(!this._currentViewWrapper.value)throw new Error("this._currentViewWrapper.value");const r=this._currentViewWrapper.value.view.duration;this._currentViewWrapper.value.view.flyIn(r,this.flyMode??Xn.defaults.flyMode)}}flyToPrevView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const r=this._getIndex(e);return this.loop??Xn.defaults.loop?(this.flyToView((this._viewWrappers.length+r-1)%this._viewWrappers.length),!0):r-1<0?!1:(this.flyToView(r-1),!0)}moveToPreView(){const e=this._currentViewWrapper.value;if(!e)return;const r=this._getIndex(e);if(r===0)return;const i=this._viewWrappers.splice(r-1,1,e)[0];this._viewWrappers.set(r,i)}moveToNextView(){const e=this._currentViewWrapper.value;if(!e)return;const r=this._getIndex(e);if(r===this._viewWrappers.length-1)return;const i=this._viewWrappers.splice(r+1,1,e)[0];this._viewWrappers.set(r,i)}flyToNextView(){const e=this._currentViewWrapper.value;if(!e)return this.flyToView(0),!0;const r=this._getIndex(e);return this.loop??Xn.defaults.loop?(this.flyToView((r+1)%this._viewWrappers.length),!0):r+1>this._viewWrappers.length-1?!1:(this.flyToView(r+1),!0)}stop(){this._currentViewWrapper.value=void 0,this.playing=!1}deleteView(e){if(e<0||e>=this._viewWrappers.length){console.warn("index < 0 || index >= this._viewWrappers.length");return}this._viewWrappers.get(e).destroy(),this._viewWrappers.splice(e,1)}deleteCurrentView(){const e=this._currentViewWrapper.value;if(!e){console.warn("!this._currentViewWrapper.value");return}const r=this._getIndex(e);if(r===-1){console.warn("index === -1");return}this.deleteView(r)}transitionImageUrl(e){return ft.context.getStrFromEnv(e)}_flyStep(e){var o;if(!this.flyToNextView())return this.playing=!1,Promise.resolve();const r=this.intervalTime??Xn.defaults.intervalTime,s=((((o=this._currentViewWrapper.value)==null?void 0:o.viewInfo.duration)??0)+r)*1e3;return e.promise(p.sleep(s)).then(()=>this._flyStep(e))}initProcessing(){const e=this.dv(p.createProcessingFromAsyncFunc(async i=>this._flyStep(i))),r=()=>{this.playing?e.restart():e.cancel()};r(),this.d(this.playingChanged.don(r))}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new Tt([this,"flyMode"],[["默认","default"],["直线飞行","uniform"]],"飞行模式",Xn.defaults.flyMode),new mt([],()=>this.addView(),[],"添加视角"),new mt(["number"],r=>this.insertView(r),[0],"插入视角"),new mt([],()=>this.clearAllViews(),[],"清空所有视角"),new mt([],()=>this.insertView(this.currentViewIndex+1),[],"当前位置插入视角"),new mt([],()=>this.flyToPrevView(),[],"上一个视角"),new mt([],()=>this.flyToNextView(),[],"下一个视角"),new mt([],()=>this.moveToPreView(),[],"当前视角移动到上一个视角"),new mt([],()=>this.moveToNextView(),[],"当前视角移动到下一个视角"),new mt(["number"],r=>this.flyToView(r),[0],"飞入指定视角"),new mt(["number"],r=>this.setCurrentView(r),[0],"设置当前视角"),new mt([],()=>this.deleteCurrentView(),[],"删除当前视角"),new mt(["number"],r=>this.deleteView(r),[0],"删除指定视角"),new mt(["number"],r=>this.resetView(r),[0],"重置视角"),new R([this,"currentViewIndex"],"当前序号",-1,!1,!0),new Kg([this,"playing"],()=>this.stop(),[this,"loop"],"播放",Xn.defaults),new tt([this,"playing"],"是否播放"),new mt([],()=>this.stop(),[],"停止"),new tt([this,"loop"],"是否循环"),new R([this,"intervalTime"],"间隔时间"),new ht([this,"views"],"视角集合",[],void 0,!0)]}}};g(Xn,"createDefaultProps",()=>({...ft.createDefaultProps(),playing:!1,loop:!0,intervalTime:5,flyMode:"default"})),g(Xn,"type",Xn.register("ESCameraViewCollection",Xn,{chsName:"视角集合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"视角集合"}));let tc=Xn;const nu=class nu extends dt{constructor(e){super(e);g(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new R([this,"aspectRatio"],"宽高比",1.77778),new R([this,"fov"],"横向夹角",90),new R([this,"far"],"视野长度",100),new R([this,"near"],"近面距离",5)]}}};g(nu,"createDefaultProps",()=>({...dt.createDefaultProps(),fov:90,aspectRatio:1.77778,far:100,near:5,collision:!1})),g(nu,"type",nu.register("ESCameraVisibleRange",nu,{chsName:"摄像头可视域",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"摄像头可视域"}));let gd=nu;const iu=class iu extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Tt([this,"mode"],[["警车","policeCar"]],"模式","policeCar")]}}};g(iu,"createDefaultProps",()=>({...dt.createDefaultProps(),mode:"policeCar",allowPicking:!0})),g(iu,"type",iu.register("ESCar",iu,{chsName:"车辆",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"警车等基础车辆模型"}));let ec=iu;const ko=class ko extends Rt{constructor(e){super(e);g(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new R([this,"height"],"高度",10)],coordinate:[...e.coordinate,new R([this,"area"],"面积",0,!1,!0),new R([this,"perimeter"],"周长",0,!1,!0)]}}};g(ko,"createDefaultProps",()=>({...Rt.createDefaultProps(),height:10,filled:!0,fillStyle:p.reactJson({material:"",materialParams:{},ground:!0,color:[1,1,1,1]})})),g(ko,"type",ko.register("ESClassification",ko,{chsName:"倾斜单体化",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"平尾箭头"})),g(ko,"supportEditingModes",[...Rt.supportEditingModes,ct.CircularAppend,ct.CircularInsert,ct.HeightModify]);let rc=ko;const su=class su extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new tt([this,"showArrow"],"显示箭头",!0),new Gt([this,"edgeColor"],"线框颜色",[1,1,1,1]),new R([this,"edgetWidth"],"线框宽度",2),new R([this,"width"],"裁剪宽度",200),new R([this,"height"],"裁剪高度",200),new Et([this,"targetID"],"瓦片图层","")]}}};g(su,"createDefaultProps",()=>({...dt.createDefaultProps(),showArrow:!0,edgeColor:p.reactArray([1,1,1,1]),edgetWidth:2,width:200,height:200,targetID:""})),g(su,"type",su.register("ESClippingPlane",su,{chsName:"裁切",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESClippingPlane"}));let pd=su;class A2 extends st{constructor(t,e,r){super();const i=document.createElement("div");i.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${r.id}) container`);{const u=()=>{const c=` ${e.cssText}
69
69
  ${e.cssAllInitial?"all: initial;":""}
70
70
  ${e.show?"":"display: none"}
71
71
  `;i.style.cssText=c};u();const l=this.dv(p.createNextAnimateFrameEvent(e.cssAllInitialChanged,e.cssTextChanged,e.showChanged));this.d(l.don(u))}t.appendChild(i),this.d(()=>t.removeChild(i));const s=this.dv(p.createNextAnimateFrameEvent(e.instanceClassChanged,e.containerChanged,e.shadowDomChanged)),o=this.dv(new p.ObjResettingWithEvent(s,()=>{const{instanceClass:u,container:l}=e;if(!u||l)return;let c=i;if(i.firstElementChild&&i.removeChild(i.firstElementChild),e.shadowDom){const h=i.appendChild(document.createElement("div"));h.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${r.id}) container shadowDiv`),c=h.attachShadow({mode:"open"}).appendChild(document.createElement("div")),c.setAttribute("xe2-div",`ESCustomDiv(${e.id})(viewer: ${r.id}) container shadowDiv div`)}return new u(c,e,r)})),{_updateEvent:a}=e;this.d(a.don(u=>{if(o.obj)try{u(o.obj,e,r)}catch(l){console.error(`ESCustomDiv update error! ${l}`)}}))}}const Tm=`class MyDiv {
@@ -354,7 +354,7 @@ export type ESJTimeIntervalCollectionJsonType = {
354
354
  \`\`\`
355
355
  ${zm}
356
356
  \`\`\`
357
- `;function qm(n){try{return JSON.parse(n),!0}catch{return!1}}const W2="${earthsdk3-assets-script-dir}/assets/misc/2.geojson",Wt=class Wt extends ee{constructor(e){super(e);g(this,"_flyToFeatureEvent",this.dv(new H));g(this,"_flyToFeatureIndexEvent",this.dv(new H));g(this,"_features",this.disposeVar(p.reactJsonWithUndefined(void 0)));g(this,"pickedInfoType","FeatureCollection");this._updateUrl(),this.ad(this.urlChanged.don(()=>{this._updateUrl()})),this.ad(this.editingChanged.don(()=>{console.warn("ESGeoJson暂不支持编辑!")}))}get flyToFeatureEvent(){return this._flyToFeatureEvent}flyToFeature(e,r,i){this._flyToFeatureEvent.emit(e,r,i)}get flyToFeatureIndexEvent(){return this._flyToFeatureIndexEvent}flyToFeatureIndex(e,r){this._flyToFeatureIndexEvent.emit(e,r)}get features(){return this._features.value}set features(e){this._features.value=e}get featuresChanged(){return this._features.changed}getFeatures(){if(this.features)return this.features;console.log("数据未加载完成,请稍后调用此方法getFeatures()")}async _updateUrl(){var e;if(!this.url){this.features=void 0;return}typeof this.url=="object"?this.features=this.url:qm(this.url)?this.features=JSON.parse(this.url):await fetch(ft.context.getStrFromEnv(this.url)).then(r=>r.json()).then(r=>{this.features=r}).catch(r=>{console.warn("ESEntityCluster数据加载失败",r)}),this.pickedInfoType=((e=this.features)==null?void 0:e.type)??"FeatureCollection"}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",dataSource:[...e.dataSource,new ht([this,"url"],"服务地址",Wt.defaults.url),new R([this,"minFeatureVisibleDistance"],"要素最小可视距离",Wt.defaults.minFeatureVisibleDistance),new R([this,"maxFeatureVisibleDistance"],"要素最大可视距离",Wt.defaults.maxFeatureVisibleDistance),new Tt([this,"heightReference"],[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]],"高度参考")],style:[...e.style,new vt([],"点样式集合"),new tt([this,"textShow"],"是否显示",Wt.defaults.textShow),new qe([this,"textAnchor"],"锚点",Wt.defaults.anchor),new Et([this,"textProperty"],"标注显示属性",Wt.defaults.textStyle.textProperty),new Et([this,"textDefaultText"],"默认文本",Wt.defaults.textStyle.defaultText),new Gt([this,"textColor"],"文本颜色",Wt.defaults.textStyle.color),new Gt([this,"textBackgroundColor"],"文本背景颜色",Wt.defaults.textStyle.backgroundColor),new Et([this,"textFontStyle"],"字体样式",Wt.defaults.textStyle.fontStyle),new Et([this,"textFontWeight"],"字体粗细",Wt.defaults.textStyle.fontWeight),new R([this,"textFontSize"],"字体大小",Wt.defaults.textStyle.fontSize),new qe([this,"textOffset"],"像素偏移",Wt.defaults.textStyle.offset),new vt([],"点图片样式集合"),new tt([this,"imageShow"],"是否显示",Wt.defaults.imageShow),new qe([this,"imageAnchor"],"锚点",Wt.defaults.imageStyle.anchor),new ht([this,"imageUrl"],"图片地址",Wt.defaults.imageStyle.url),new qe([this,"imageSize"],"图片大小",Wt.defaults.imageStyle.size),new qe([this,"imageOffset"],"像素偏移",Wt.defaults.imageStyle.offset),new vt([],"线样式集合"),new tt([this,"stroked"],"是否显示",Wt.defaults.stroked),new tt([this,"strokeGround"],"贴地",Wt.defaults.strokeStyle.ground),new R([this,"strokeWidth"],"线宽",Wt.defaults.strokeStyle.width),new Tt([this,"strokeWidthType"],Wt.defaults.strokeStyle.widthTypes,"线宽类型"),new Gt([this,"strokeColor"],"线颜色",Wt.defaults.strokeStyle.color),new Et([this,"strokeMaterial"],"线材质",Wt.defaults.strokeStyle.material),new ht([this,"strokeMaterialParams"],"线材质参数",Wt.defaults.strokeStyle.materialParams),new vt([],"面样式集合"),new tt([this,"filled"],"是否显示",Wt.defaults.filled),new tt([this,"fillGround"],"贴地",Wt.defaults.fillStyle.ground),new Gt([this,"fillColor"],"填充颜色",Wt.defaults.fillStyle.color),new Et([this,"fillMaterial"],"填充材质",Wt.defaults.fillStyle.material),new ht([this,"fillMaterialParams"],"填充材质参数",Wt.defaults.fillStyle.materialParams)],more:[...e.more,new vt([],"标注文本样式"),new Et([this,"textFontFamily"],"字体",Wt.defaults.textStyle.fontFamily),new vt([],"通用"),new Cs([this,"loadFuncStr"],"loadFnStr",zm,q2,!0)]}}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}get textProperty(){return this.textStyle.textProperty}set textProperty(e){this.textStyle={...this.textStyle,textProperty:e}}get textPropertyChanged(){return this.textStyleChanged}get textDefaultText(){return this.textStyle.defaultText}set textDefaultText(e){this.textStyle={...this.textStyle,defaultText:e}}get textDefaultTextChanged(){return this.textStyleChanged}get textColor(){return this.textStyle.color}set textColor(e){this.textStyle={...this.textStyle,color:e}}get textColorChanged(){return this.textStyleChanged}get textBackgroundColor(){return this.textStyle.backgroundColor}set textBackgroundColor(e){this.textStyle={...this.textStyle,backgroundColor:e}}get textBackgroundColorChanged(){return this.textStyleChanged}get textFontFamily(){return this.textStyle.fontFamily}set textFontFamily(e){this.textStyle={...this.textStyle,fontFamily:e}}get textFontFamilyChanged(){return this.textStyleChanged}get textFontStyle(){return this.textStyle.fontStyle}set textFontStyle(e){this.textStyle={...this.textStyle,fontStyle:e}}get textFontStyleChanged(){return this.textStyleChanged}get textFontWeight(){return this.textStyle.fontWeight}set textFontWeight(e){this.textStyle={...this.textStyle,fontWeight:e}}get textFontWeightChanged(){return this.textStyleChanged}get textFontSize(){return this.textStyle.fontSize}set textFontSize(e){this.textStyle={...this.textStyle,fontSize:e}}get textFontSizeChanged(){return this.textStyleChanged}get textAnchor(){return this.textStyle.anchor}set textAnchor(e){this.textStyle={...this.textStyle,anchor:e}}get textAnchorChanged(){return this.textStyleChanged}get textOffset(){return this.textStyle.offset}set textOffset(e){this.textStyle={...this.textStyle,offset:e}}get textOffsetChanged(){return this.textStyleChanged}get imageUrl(){return this.imageStyle.url}set imageUrl(e){this.imageStyle={...this.imageStyle,url:e}}get imageUrlChanged(){return this.imageStyleChanged}get imageSize(){return this.imageStyle.size}set imageSize(e){this.imageStyle={...this.imageStyle,size:e}}get imageSizeChanged(){return this.imageStyleChanged}get imageAnchor(){return this.imageStyle.anchor}set imageAnchor(e){this.imageStyle={...this.imageStyle,anchor:e}}get imageAnchorChanged(){return this.imageStyleChanged}get imageOffset(){return this.imageStyle.offset}set imageOffset(e){this.imageStyle={...this.imageStyle,offset:e}}get imageOffsetChanged(){return this.imageStyleChanged}};g(Wt,"createDefaultProps",()=>({...ee.createDefaultProps(),show:!0,allowPicking:!0,loadFuncStr:void 0,url:W2,stroked:!0,strokeStyle:p.reactJson({width:1,widthType:"world",color:[.79,.91,.06,1],material:"",materialParams:{},ground:!1}),filled:!0,fillStyle:p.reactJson({color:[.79,.91,.06,.2],material:"",materialParams:{},ground:!1}),imageShow:!0,imageStyle:p.reactJson({url:"${earthsdk3-assets-script-dir}/assets/img/location.png",size:[32,32],anchor:[.5,1],offset:[0,0]}),textShow:!0,textStyle:p.reactJson({textProperty:"",defaultText:"默认标注",color:[1,1,1,1],backgroundColor:void 0,fontFamily:"Arial",fontSize:16,fontStyle:"normal",fontWeight:"normal",anchor:[0,1],offset:[16,-8]}),minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReference:"NONE"})),g(Wt,"type",Wt.register("ESGeoJson",Wt,{chsName:"ESGeoJson",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"GeoJson数据加载"}));let Ll=Wt;const Bo=class Bo extends Rt{constructor(e){super(e);g(this,"editingBindMode","doublePoints");g(this,"_height",this.disposeVar(p.react(0)));{const r=()=>{this.height=this.points&&this.points.length>=2?this.points[1][2]-this.points[0][2]:0};r(),this.ad(this.pointsChanged.don(r))}}get height(){return this._height.value}set height(e){this._height.value=e}get heightChanged(){return this._height.changed}};g(Bo,"createDefaultProps",()=>({...Rt.createDefaultProps(),stroked:!0,strokeStyle:p.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),g(Bo,"type",Bo.register("ESHeightMeasurement",Bo,{chsName:"高度测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"高度测量"})),g(Bo,"supportEditingModes",[...Rt.supportEditingModes,ct.DoublePointsAppend,ct.DoublePointsModify]);let kd=Bo;const cu=class cu extends gs{constructor(e){super(e);g(this,"_area",this.dv(p.react(0)));g(this,"_perimeter",this.dv(p.react(0)));g(this,"editingBindMode","doublePoints");const r=()=>{this._area.value=Math.PI*this.radius*this.radius,this._perimeter.value=2*Math.PI*this.radius};r(),this.d(this.radiusChanged.don(r))}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}toPolygon(e=10,r){return ym([...this.position],this.radius,e,r)[0].map(s=>[...s,this.position?this.position[2]:0])}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",basic:[...e.basic,new R([this,"radius"],"圆半径",1,!0)],coordinate:[...e.coordinate,new tt([this,"editing"],"是否编辑"),new na([this,"position"],"三维坐标",[0,0,0],!0),new R([this,"area"],"面积",0,!1,!0),new R([this,"perimeter"],"周长",0,!1,!0)]}}};g(cu,"createDefaultProps",()=>({...gs.createDefaultProps(),radius:1,filled:!0,collision:!1,fillStyle:p.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!1})})),g(cu,"type",cu.register("ESLocalCircle",cu,{chsName:"局部坐标圆形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalCircle"}));let Vd=cu;const fu=class fu extends gs{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new Jg([this,"points"],"坐标",[])]}}};g(fu,"createDefaultProps",()=>({...gs.createDefaultProps(),points:id([]),filled:!0})),g(fu,"type",fu.register("ESLocalPolygon",fu,{chsName:"局部2D坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygon"}));let Rl=fu;const du=class du extends Ba{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new Dc([this,"points"],"本地位置数组")]}}};g(du,"createDefaultProps",()=>({...Ba.createDefaultProps(),points:p.reactPositions(void 0),filled:!0})),g(du,"type",du.register("ESLocalPolygonZ",du,{chsName:"局部坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygonZ"}));let Ud=du;const gu=class gu extends gs{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new R([this,"width"],"宽度"),new R([this,"height"],"高度")]}}};g(gu,"createDefaultProps",()=>({...gs.createDefaultProps(),width:5e5,height:3e5,filled:!0})),g(gu,"type",gu.register("ESLocalRectangle",gu,{chsName:"局部坐标四边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalRectangle"}));let zd=gu;const ms=class ms extends Rt{constructor(e){super(e);g(this,"editingBindMode","lineString");g(this,"_distance",this.dv(p.react(0)));g(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);g(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());const r=()=>{if(this.points&&this.points.length>=2){const i=Tl(this.points,"GEODESIC"),s=i[i.length-1];this._distance.value=s}else this._distance.value=0};r(),this.d(this.pointsChanged.don(r))}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new R([this,"height"],"高度",10),new R([this,"width"],"宽度",10),new Tt([this,"materialMode"],ms.materialModes,"模式","purple")],coordinate:[...e.coordinate,new R([this,"distance"],"距离",0,!1,!0)]}}};g(ms,"createDefaultProps",()=>({...Rt.createDefaultProps(),height:10,width:10,materialMode:"singleArrow",filled:!0,stroked:!0,fillStyle:p.reactJson({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),g(ms,"type",ms.register("ESPipeFence",ms,{chsName:"管道电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"管道电子围栏"})),g(ms,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","color"]]),g(ms,"supportEditingModes",[...Rt.supportEditingModes,ct.LineStringAppend,ct.LineStringInsert]);let uc=ms;const ys=class ys extends Wn{constructor(e){super(e);g(this,"_setLayerVisibleEvent",this.dv(new H));g(this,"_setLayerColorEvent",this.dv(new H))}get setLayerVisibleEvent(){return this._setLayerVisibleEvent}setLayerVisible(e,r){this._setLayerVisibleEvent.emit(e,r)}get setLayerColorEvent(){return this._setLayerColorEvent}setLayerColor(e,r){this._setLayerColorEvent.emit(e,r)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"ESPipeserTileset"),new mt(["string","string"],(r,i)=>this.setLayerVisible(r,i),["",""],"setLayerVisible"),new mt(["string","string"],(r,i)=>this.setLayerColor(r,i),["",""],"setLayerColor"),new Tt([this,"colorMode"],ys.colorModes,"colorMode",ys.defaults.colorMode,!0)]}}};g(ys,"createDefaultProps",()=>({...Wn.createDefaultProps(),colorMode:"default"})),g(ys,"type",ys.register("ESPipeserTileset",ys,{chsName:"PipeSer图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"PipeSer图层"})),g(ys,"colorModes",[["default","default"],["color","color"],["blend","blend"]]);let qd=ys;const _s=class _s extends Rt{constructor(e){super(e);g(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",coordinate:[...e.coordinate,new R([this,"area"],"面积",0,!1,!0),new R([this,"perimeter"],"周长",0,!1,!0)],basic:[...e.basic,new R([this,"height"],"高度",10),new Tt([this,"materialMode"],_s.materialModes,"模式","danger")]}}};g(_s,"createDefaultProps",()=>({...Rt.createDefaultProps(),height:10,materialMode:"danger",filled:!0,collision:!1})),g(_s,"type",_s.register("ESPolygonFence",_s,{chsName:"多边形电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"多边形电子围栏"})),g(_s,"materialModes",[["模式一","danger"],["模式二","checkerboard"],["模式三","warning"],["模式四","cord"],["模式五","scanline"],["模式六","honeycomb"],["模式七","gradientColor"]]),g(_s,"supportEditingModes",[...Rt.supportEditingModes,ct.CircularAppend,ct.CircularInsert,ct.HeightModify]);let lc=_s;const to=class to extends Rt{constructor(e){super(e);g(this,"_deprecated",["ground"]);g(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());g(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"通用","通用"),new tt([this,"ground"],"是否贴地"),new tt([this,"outlineTranslucent"],"轮廓线半透明"),new R([this,"height"],"高度"),new R([this,"extrudedHeight"],"拉伸高度"),new Kn([this,"rectangle"],"范围",to.defaults.rectangle,!0),new R([this,"stRotation"],"纹理旋转角度"),new R([this,"rotation"],"旋转角度"),new tt([this,"pointEditing"],"是否单点编辑")]}}};g(to,"createDefaultProps",()=>({...Rt.createDefaultProps(),ground:!1,outlineTranslucent:!0,height:0,extrudedHeight:0,rectangle:p.reactArrayWithUndefined(void 0),rotation:0,stRotation:0,pointEditing:!1,filled:!0})),g(to,"type",to.register("ESRectangle",to,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),g(to,"supportEditingModes",[...Rt.supportEditingModes,ct.DoublePointsAppend,ct.DoublePointsModify]);let Wd=to;const pu=class pu extends oe{getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ht([this,"innerRings"],"裁切多边形数组",[],void 0,!0)]}}};g(pu,"createDefaultProps",()=>({...oe.createDefaultProps(),innerRings:p.reactPositionsSet([])})),g(pu,"type",pu.register("ESPolygonWithHole",pu,{chsName:"内部裁切多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"带洞多边形"}));let Hd=pu;const eo=class eo extends oe{constructor(e){super(e);g(this,"_startEvent",this.disposeVar(new H));g(this,"_stopEvent",this.dv(new H));g(this,"_surfaceArea",this.disposeVar(p.react(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}get surfaceArea(){return this._surfaceArea.value}set surfaceArea(e){this._surfaceArea.value=e}get surfaceChanged(){return this._surfaceArea.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"表面积测量","表面积测量"),new mt([],()=>this.start(),[],"开始计算"),new R([this,"interpolation"],"插值距离",eo.defaults.interpolation),new R([this,"offsetHeight"],"偏移高度",eo.defaults.offsetHeight)]}}};g(eo,"createDefaultProps",()=>({...oe.createDefaultProps(),interpolation:.5,offsetHeight:0,units:p.reactArray(["SquareMeter_SquareKilometer","MU_Hectare"]),fillStyle:p.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!0})})),g(eo,"type",eo.register("ESSurfaceAreaMeasurement",eo,{chsName:"表面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"表面积测量"}));let Xd=eo;const ro=class ro extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new R([this,"downloadProgress"],"下载进度",ro.defaults.downloadProgress,!0,!0),new ht([this,"importOptions"],"导入参数",ro.defaults.importOptions,void 0,!0)],dataSource:[...t.dataSource,new ht([this,"url"],"路径")]}}};g(ro,"createDefaultProps",()=>({...dt.createDefaultProps(),url:"",importOptions:p.reactJsonWithUndefined({buildCollisions:"QueryAndPhysics",buildHierarchy:"Simplified",collisionType:"CTF_UseComplexAsSimple",bImportMetaData:!0}),downloadProgress:0})),g(ro,"type",ro.register("ESDatasmithRuntimeModel",ro,{chsName:"Datasmith Model",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Datasmith Model"}));let Bd=ro;const br=class br extends Rl{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Tt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",br.defaults.waterType),new R([this,"frequency"],"频率",br.defaults.frequency),new Je([this,"amplitude"],.01,[0,1],"振幅",br.defaults.amplitude),new Je([this,"flowDirection"],1,[0,360],"流向",br.defaults.flowDirection),new Je([this,"waveVelocity"],.01,[0,1],"波动频率",br.defaults.waveVelocity),new Je([this,"specularIntensity"],.01,[0,1],"镜面反射强度",br.defaults.specularIntensity),new Je([this,"murkiness"],.1,[0,10],"水体浑浊度",br.defaults.murkiness),new R([this,"flowSpeed"],"水流速度",br.defaults.flowSpeed),new Gt([this,"waterColor"],"水的底色",br.defaults.waterColor),new ht([this,"waterImage"],"水的图片",br.defaults.waterImage)]}}};g(br,"createDefaultProps",()=>({...Rl.createDefaultProps(),allowPicking:!0,waterImage:p.reactJsonWithUndefined(void 0),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5,stroked:!1,filled:!0})),g(br,"type",br.register("ESDynamicWater",br,{chsName:"动态水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"局部多边形水面"}));let Yd=br;const Nr=class Nr extends oe{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",basic:[...t.basic,new Tt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",Nr.defaults.waterType),new R([this,"frequency"],"频率",Nr.defaults.frequency),new Je([this,"amplitude"],.01,[0,1],"振幅",Nr.defaults.amplitude),new Je([this,"flowDirection"],1,[0,360],"流向",Nr.defaults.flowDirection),new Je([this,"waveVelocity"],.01,[0,1],"波动频率",Nr.defaults.waveVelocity),new Je([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Nr.defaults.specularIntensity),new Je([this,"murkiness"],.1,[0,10],"水体浑浊度",Nr.defaults.murkiness),new R([this,"flowSpeed"],"水流速度",Nr.defaults.flowSpeed),new Gt([this,"waterColor"],"水的底色",Nr.defaults.waterColor),new ht([this,"waterImage"],"水的图片",Nr.defaults.waterImage)]}}};g(Nr,"createDefaultProps",()=>({...oe.createDefaultProps(),allowPicking:!0,waterImage:p.reactJsonWithUndefined({}),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5})),g(Nr,"type",Nr.register("ESGeoWater",Nr,{chsName:"地理水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理动态水面"}));let Jd=Nr;const Yo=class Yo extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new R([this,"downloadProgress"],"下载进度",Yo.defaults.downloadProgress,!0,!0),new Et([this,"levelName"],"levelName",""),new R([this,"levelLoadDistance"],"levelLoadDistance",1e3),new gr([this,"levelOffset"],"levelOffset",[0,0,0])],dataSource:[...t.dataSource,new ht([this,"url"],"url","")]}}};g(Yo,"createDefaultProps",()=>({...dt.createDefaultProps(),url:"",downloadProgress:0,levelName:"",levelOffset:p.reactArray([0,0,0]),levelLoadDistance:1e3})),g(Yo,"type",Yo.register("ESLevelRuntimeModel",Yo,{chsName:"关卡包模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"关卡包模型"}));let jd=Yo;const _n=class _n extends ps{constructor(e){super(e);g(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);g(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})())}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new R([this,"radius"],"半径",_n.defaults.radius),new R([this,"sides"],"圆边数",_n.defaults.sides),new R([this,"speed"],"材质速度",_n.defaults.speed),new Tt([this,"materialMode"],_n.materialModes,"材质模式",_n.defaults.materialMode),new ht([this,"materialImage"],"材质图片和重复度",_n.defaults.materialImage)]}}};g(_n,"createDefaultProps",()=>({...ps.createDefaultProps(),radius:10,sides:10,materialMode:"singleArrow",materialImage:p.reactJson({url:"",uDis:50,vDis:10}),speed:1,filled:!0,stroked:!1,fillStyle:p.reactJson({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),g(_n,"type",_n.register("ESPipeline",_n,{chsName:"管线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPipeline"})),g(_n,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"]]);let Qd=_n;const Yi=class Yi extends Rt{constructor(e){super(e);g(this,"editingBindMode","visibility")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Gt([this,"visibleColor"],"可视区域颜色",Yi.defaults.visibleColor),new Gt([this,"invisibleColor"],"遮挡区域颜色",Yi.defaults.invisibleColor),new R([this,"heightOffset"],"视点高度偏移",Yi.defaults.heightOffset)]}}};g(Yi,"createDefaultProps",()=>({...Rt.createDefaultProps(),visibleColor:p.reactArray([0,1,0,1]),invisibleColor:p.reactArray([1,0,0,1]),heightOffset:0})),g(Yi,"type",Yi.register("ESVisibilityAnalysis",Yi,{chsName:"通视分析,视线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通视分析,视线分析"})),g(Yi,"supportEditingModes",[...Rt.supportEditingModes,ct.VisibilityAppend,ct.VisibilityModify]);let $d=Yi;const vu=class vu extends oe{constructor(e){super(e);g(this,"_startEvent",this.dv(new H));g(this,"_clearEvent",this.dv(new H));g(this,"_volume",this.disposeVar(p.react(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get volume(){return this._volume.value}set volume(e){this._volume.value=e}get volumeChanged(){return this._volume.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"通用","通用"),new R([this,"planeHeight"],"基准面高程",void 0,!0),new R([this,"gridWidth"],"采样间距 m"),new R([this,"cutVolume"],"挖方",0,!1,!0),new R([this,"fillVolume"],"填方",0,!1,!0),new R([this,"cutAndFillVolume"],"挖填方",0,!1,!0),new R([this,"progress"],"计算进度",0,!1,!0),new mt([],()=>this.start(),[],"开始分析"),new mt([],()=>this.clear(),[],"清空分析结果"),new tt([this,"depthTest"],"是否开启深度检测")]}}};g(vu,"createDefaultProps",()=>({...oe.createDefaultProps(),planeHeight:p.react(void 0),gridWidth:1,cutVolume:0,fillVolume:0,cutAndFillVolume:0,progress:0,depthTest:!1,filled:!1,stroked:!0,strokeStyle:p.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),g(vu,"type",vu.register("ESVolumeMeasurement",vu,{chsName:"体积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"体积测量"}));let Kd=vu;const mu=class mu extends Do{constructor(e){super(e);g(this,"_human",this.dv(new Do));g(this,"_poi",this.dv(new Dl));this.d(this.components.disposableAdd(this._human,!0)),this.d(this.components.disposableAdd(this._poi));{const{_human:r,_poi:i}=this;this.d(p.track([r,"show"],[this,"show"])),this.d(p.track([i,"show"],[this,"show"])),this.d(p.track([r,"allowPicking"],[this,"allowPicking"])),this.d(p.track([i,"allowPicking"],[this,"allowPicking"])),this.d(p.bind([r,"scale"],[this,"scale"])),this.d(p.bind([i,"scale"],[this,"scale"])),this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.track([i,"collision"],[this,"collision"])),this.d(p.bind([r,"flyInParam"],[this,"flyInParam"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.track([r,"animation"],[this,"animation"])),this.d(p.track([r,"mode"],[this,"mode"])),this.d(p.track([r,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(p.track([r,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(p.track([i,"name"],[this,"name"])),this.d(p.track([i,"mode"],[this,"poiMode"])),this.d(p.track([i,"autoAnchor"],[this,"autoAnchor"])),this.d(p.track([i,"screenRender"],[this,"screenRender"])),this.d(p.track([i,"size"],[this,"size"])),this.d(p.track([i,"anchor"],[this,"anchor"])),this.d(p.track([i,"sizeByContent"],[this,"sizeByContent"])),this.d(p.track([i,"renderMode"],[this,"renderMode"])),this.d(p.track([i,"rotationType"],[this,"rotationType"])),this.d(p.track([i,"zOrder"],[this,"zOrder"])),this.d(p.track([i,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(p.track([i,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(p.bind([r,"position"],[this,"position"])),this.d(p.bind([r,"rotation"],[this,"rotation"])),this.d(this.flyInEvent.don(s=>{r.flyIn(s)})),this.d(this.flyToEvent.don(s=>{r.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{r.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{r.calcFlyInParam()})),this.d(this.smoothMoveEvent.don((s,o)=>{r.smoothMove(s,o)})),this.d(this.smoothMoveWithRotationEvent.don((s,o,a)=>{r.smoothMoveWithRotation(s,o,a)})),this.d(this.smoothMoveOnGroundEvent.don((s,o,a,u)=>{r.smoothMoveOnGround(s,o,a,u)})),this.d(this.smoothMoveWithRotationOnGroundEvent.don((s,o,a,u,l)=>{r.smoothMoveWithRotationOnGround(s,o,a,u,l)})),this.d(this.automaticLandingEvent.don(()=>{r.automaticLanding()}))}}get human(){return this._human}get poi(){return this._poi}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Tt([this,"poiMode"],Dl.modes,"poi模式","SquareH01"),new R([this,"poiOffsetHeight"],"poi高度偏移",1.8)]}}};g(mu,"createDefaultProps",()=>({poiOffsetHeight:1.8,poiMode:"SquareH01",style:p.reactJson({}),autoAnchor:!0,screenRender:!0,size:p.reactArray([100,100]),anchor:p.reactArray([.5,1]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,...Do.createDefaultProps()})),g(mu,"type",mu.register("ESHumanPoi",mu,{chsName:"人员poi",tags:["ESObjects"],description:"ESHuman + ESPoi2D组合对象"}));let Zd=mu;const Ei=class Ei extends oe{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new R([this,"depth"],"深度",Ei.defaults.depth),new R([this,"interpolation"],"插值",Ei.defaults.interpolation),new R([this,"opacity"],"透明度",Ei.defaults.opacity),new ht([this,"sideImage"],"侧面图片",Ei.defaults.sideImage),new ht([this,"bottomImage"],"底面图片",Ei.defaults.bottomImage)]}}};g(Ei,"createDefaultProps",()=>({...oe.createDefaultProps(),depth:100,sideImage:p.reactJson({url:ft.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/side.jpg"),uDis:50,vDis:50}),bottomImage:p.reactJson({url:ft.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/bottom.jpg"),uDis:50,vDis:50}),opacity:1,interpolation:50,collision:!1,allowPicking:!1,filled:!0})),g(Ei,"type",Ei.register("ESPit",Ei,{chsName:"坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"坑"}));let Ja=Ei;const yu=class yu extends Ja{constructor(e){super(e);g(this,"_excavate",this.dv(new Ol));g(this,"_pit",this.dv(new Ja));this.d(this.components.disposableAdd(this._excavate)),this.d(this.components.disposableAdd(this._pit,!0));{const{_excavate:r,_pit:i}=this;this.d(p.track([r,"show"],[this,"show"])),this.d(p.track([i,"show"],[this,"show"])),this.d(p.track([r,"allowPicking"],[this,"allowPicking"])),this.d(p.track([i,"allowPicking"],[this,"allowPicking"])),this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.track([i,"collision"],[this,"collision"])),this.d(p.bind([i,"points"],[this,"points"])),this.d(p.track([r,"points"],[this,"points"])),this.d(p.track([i,"pointed"],[this,"pointed"])),this.d(p.track([r,"pointed"],[this,"pointed"])),this.d(p.track([i,"pointStyle"],[this,"pointStyle"])),this.d(p.track([r,"pointStyle"],[this,"pointStyle"])),this.d(p.track([i,"stroked"],[this,"stroked"])),this.d(p.track([r,"stroked"],[this,"stroked"])),this.d(p.track([i,"strokeStyle"],[this,"strokeStyle"])),this.d(p.track([r,"strokeStyle"],[this,"strokeStyle"])),this.d(p.track([i,"filled"],[this,"filled"])),this.d(p.track([i,"fillStyle"],[this,"fillStyle"])),this.d(p.track([r,"fillStyle"],[this,"fillStyle"])),this.d(p.track([r,"mode"],[this,"mode"])),this.d(p.track([r,"targetID"],[this,"targetID"])),this.d(p.track([i,"depth"],[this,"depth"])),this.d(p.track([i,"sideImage"],[this,"sideImage"])),this.d(p.track([i,"bottomImage"],[this,"bottomImage"])),this.d(p.track([i,"opacity"],[this,"opacity"])),this.d(p.track([i,"interpolation"],[this,"interpolation"])),this.d(p.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(p.bind([i,"flyToParam"],[this,"flyToParam"])),this.d(this.flyInEvent.don(s=>{i.flyIn(s)})),this.d(this.flyToEvent.don(s=>{i.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get excavate(){return this._excavate}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Tt([this,"mode"],Ol.modes,"模式","in"),new Et([this,"targetID"],"瓦片图层","")]}}};g(yu,"createDefaultProps",()=>({...Ja.createDefaultProps(),mode:"in",targetID:""})),g(yu,"type",yu.register("ESHole",yu,{chsName:"挖坑(带材质+深度)",tags:["ESObjects"],description:"挖坑"}));let tg=yu;const eg={layerconfigfind:"/ts/layer/config/get",layerconfigsave:"/ts/layer/config/put",featureproperty:"/ts/editor/property",featureeditormuti:"/ts/editor/update",getts:"/ts/info"},H2=async(n,t,e,r)=>{try{const i=window.localStorage.getItem("Authorization");let s=n+`${eg.layerconfigfind}?tileServiceName=${t}`;e&&(s+=`&earthdstoken=${encodeURIComponent(r)}`);const o={headers:{...!e&&i?{Authorization:i}:{}},mode:"cors"},u=await(await fetch(s,o)).text();return JSON.parse(u)}catch(i){console.error(i)}},X2=async(n,t,e,r,i)=>{try{const s=window.localStorage.getItem("Authorization");let o=n+eg.layerconfigsave;const a=i??{};e&&(o+=`?earthdstoken=${encodeURIComponent(r)}`);const u={method:"POST",headers:{"Content-Type":"application/json",...!e&&s?{Authorization:s}:{}},mode:"cors",body:JSON.stringify({tileServiceName:t,layerConfig:JSON.stringify(a)})},c=await(await fetch(o,u)).text();return JSON.parse(c)}catch(s){console.error(s)}},B2=async(n,t,e)=>{try{const r=window.localStorage.getItem("Authorization");let i=n;t&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const s={headers:{...!t&&r?{Authorization:r}:{}},mode:"cors"},a=await(await fetch(i,s)).text(),u=JSON.parse(a);if(u.status=="ok")return u.data.port;console.error(u.status);return}catch(r){console.error(r)}},Y2=async(n,t,e,r,i)=>{try{const s={tileServiceName:t,featureId:e},o=window.localStorage.getItem("Authorization");let a=n+eg.featureproperty;r&&(a+=`?earthdstoken=${encodeURIComponent(i)}`);const l=await(await fetch(a,{method:"post",headers:{"Content-Type":"application/json",...!r&&o?{Authorization:o}:{}},body:JSON.stringify(s),mode:"cors"})).text(),c=JSON.parse(l);if(c.status=="ok")return c.data;console.error(c.data.status);return}catch(s){console.error(s)}},_u=class _u extends Wn{constructor(e){super(e);g(this,"_es3DTileset",this.dv(new Wn));g(this,"_ids",this.dv(p.reactJson([])));g(this,"_useEarthDSToken",this.dv(p.react(!1)));g(this,"_earthdstoken",this.dv(p.react("")));g(this,"_visJson",this.disposeVar(p.react({})));g(this,"_highlightInner3DtilesetEvent",this.dv(new H));g(this,"_removeHighlightInner3DtilesetEvent",this.dv(new H));g(this,"_tilesetServePort",this.dv(p.react("")));{const r=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ts01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{r()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const r=this._es3DTileset;this.d(p.track([r,"allowPicking"],[this,"allowPicking"])),this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.track([r,"actorTag"],[this,"actorTag"])),this.d(p.track([r,"materialMode"],[this,"materialMode"])),this.d(p.track([r,"highlight"],[this,"highlight"])),this.d(p.track([r,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(p.track([r,"highlightID"],[this,"highlightID"])),this.d(p.track([r,"highlightColor"],[this,"highlightColor"])),this.d(p.bind([r,"offset"],[this,"offset"])),this.d(p.bind([r,"rotation"],[this,"rotation"])),this.d(p.track([r,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(p.track([r,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(p.track([r,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(p.track([r,"czmClassificationType"],[this,"czmClassificationType"])),this.d(p.track([r,"czmStyleJson"],[this,"czmStyleJson"])),this.d(p.track([r,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(p.track([r,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(p.track([r,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(p.track([r,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(p.track([r,"colorBlendMode"],[this,"colorBlendMode"])),this.d(p.track([r,"cacheBytes"],[this,"cacheBytes"])),this.d(p.track([r,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(p.track([r,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(p.track([r,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(p.track([r,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(p.track([r,"materialParams"],[this,"materialParams"])),this.d(p.bind([r,"supportEdit"],[this,"supportEdit"])),this.d(p.bind([r,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(p.bind([r,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(p.bind([r,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(p.bind([r,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(p.bind([r,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(p.bind([r,"excavateId"],[this,"excavateId"]))}{const r=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{r.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{r.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{r.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{r.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{r.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{r.resetFeatureStyle(...i)})),this.d(this.setFeatureStyleEvent.don((...i)=>{r.setFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{r.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{r.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{r.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{r.calcFlyInParam(...i)}))}{const r=this._es3DTileset;this.d(r.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(r.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const r=()=>{this.es3DTileset.show=this.show};r(),this.d(this.showChanged.don(()=>{r()}))}}get es3DTileset(){return this._es3DTileset}get ids(){return this._ids.value}get idsChanged(){return this._ids.changed}set ids(e){this._ids.value=e}get useEarthDSToken(){return this._useEarthDSToken.value}get useEarthDSTokenChanged(){return this._useEarthDSToken.changed}set useEarthDSToken(e){this._useEarthDSToken.value=e}get earthdstoken(){return this._earthdstoken.value}get earthdstokenChanged(){return this._earthdstoken.changed}set earthdstoken(e){this._earthdstoken.value=e}get visJson(){return this._visJson.value}set visJson(e){this._visJson.value=e}get visJsonChanged(){return this._visJson.changed}setFeatureVisable(e,r){var i;if((i=this.layerConfig)!=null&&i.length){const s={};s[r[0].value]=r[0].visable,this.visJson={...this.visJson,...s}}else this.setFeatureVisableEvent.emit(e,typeof r=="string"?JSON.parse(r):r)}async getFeatureProperty(e){return await Y2(this.baseUrl,this.tileServiceName,e,this.useEarthDSToken,this.earthdstoken)}async getLayerConfig(){const e=await H2(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken);return!e||!Array.isArray(e)?this.layerConfig=[]:this.layerConfig=e,this.layerConfig}async saveLayerConfig(){const e=this.layerConfig;return await X2(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken,e)}get highlightInner3DtilesetEvent(){return this._highlightInner3DtilesetEvent}_highlightInner3Dtileset(e){this._highlightInner3DtilesetEvent.emit(e)}async highlightDSFeature(e){this._highlightInner3Dtileset(e)}get removeHighlightInner3DtilesetEvent(){return this._removeHighlightInner3DtilesetEvent}_removeHighlightInner3Dtileset(e){this._removeHighlightInner3DtilesetEvent.emit(e)}async removeHighlightDSFeature(e){this._removeHighlightInner3Dtileset(e)}async pickFeature(e,r){var a,u,l;const i=await e.pick(r),s=i.sceneObject;return!s||s.id!==this.id&&s.typeName!="ESRtsFeatureEditing"?void 0:s.typeName!="ESRtsFeatureEditing"?(this.ids=[...this.ids,(a=i==null?void 0:i.tilesetPickInfo)==null?void 0:a.id],{featureId:(u=i==null?void 0:i.tilesetPickInfo)==null?void 0:u.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}):{featureId:(l=i==null?void 0:i.sceneObject)==null?void 0:l.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}async getport(){const e=await B2(this.url,this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const e=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],r=+new Date;if(e){const s=this.tileServiceIp,o=await this.getport();await this.getLayerConfig(),this._es3DTileset.url=`${s}:${o}/tiles/tileset.json?t=${r}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01");return r}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01")}get tileServiceName(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:e[1];if(!r)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return r}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01");return r}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ht([this,"layerConfig"],"图层配置",[],void 0,!0)]}}};g(_u,"createDefaultProps",()=>({...Wn.createDefaultProps(),layerConfig:p.reactJsonWithUndefined([])})),g(_u,"type",_u.register("ESRtsTileset",_u,{chsName:"CIMRTS实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let rg=_u;function J2(n){return typeof n=="number"&&!isNaN(n)}const wu=class wu extends Wn{get json(){return{...this._innerGetJson(),show:this.show,materials:this.materials,changeMaterial:this.changeMaterial,props:this.props,rotation:this.rotation}}set json(t){this._innerSetJson(t)}async init(t,e){this.featureId=e;const r=await t.getFeatureProperty(e);this.uiShowprops=r.allFields.map(o=>({featureClassName:o.featureClassName,fields:o.fields.map(a=>({key:a.name,type:a.type,value:a.type!="Double"?a.value:J2(a.value)?Number(a.value.toFixed(3)):""}))})),this.datasetName=r.datasetName,t.setFeatureVisable("id",[{value:this.featureId,visable:!1}]),this.d(()=>{t.setFeatureVisable("id",[{value:this.featureId,visable:!0}])});const i=t.tileServiceIp,s=t.tilesetServePort;if(!s)throw new Error("ESRtsFeatureEditing: port is not defined");this.url=`${i}:${s}/featuretiles/${this.featureId}/tileset.json`,this.allowPicking=!0,this.d(this.pickedEvent.don(o=>{o.assign({sceneObject:t}),t.pickedEvent.emit(o)})),this.d(()=>{this.editing=!1,t.removeHighlightDSFeature(this)})}constructor(t){super(t)}};g(wu,"createDefaultProps",()=>({...Wn.createDefaultProps(),datasetName:void 0,featureId:void 0,materials:p.reactJson({}),changeMaterial:p.reactJsonWithUndefined(void 0),uiShowprops:p.reactJson({}),props:p.reactJson({})})),g(wu,"type",wu.register("ESRtsFeatureEditing",wu,{chsName:"ESRtsFeatureEditing",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let ng=wu;const j2=async(n,t,e)=>{try{const r=window.localStorage.getItem("Authorization");let i=n;t&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const s={headers:{...!t&&r?{Authorization:r}:{}},mode:"cors"},a=await(await fetch(i,s)).text(),u=JSON.parse(a);if(u.status=="ok")return u.data.port;console.error(u.status);return}catch(r){console.error(r)}},ql=class ql extends Wn{constructor(e){super(e);g(this,"_es3DTileset",this.dv(new Wn));g(this,"_tilesetServePort",this.dv(p.react("")));g(this,"_useEarthDSToken",this.dv(p.react(!1)));g(this,"_earthdstoken",this.dv(p.react("")));{const r=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ms01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{r()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const r=this._es3DTileset;this.d(p.track([r,"allowPicking"],[this,"allowPicking"])),this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.track([r,"actorTag"],[this,"actorTag"])),this.d(p.track([r,"materialMode"],[this,"materialMode"])),this.d(p.track([r,"highlight"],[this,"highlight"])),this.d(p.track([r,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(p.track([r,"highlightID"],[this,"highlightID"])),this.d(p.track([r,"highlightColor"],[this,"highlightColor"])),this.d(p.bind([r,"offset"],[this,"offset"])),this.d(p.bind([r,"rotation"],[this,"rotation"])),this.d(p.track([r,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(p.track([r,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(p.track([r,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(p.track([r,"czmClassificationType"],[this,"czmClassificationType"])),this.d(p.track([r,"czmStyleJson"],[this,"czmStyleJson"])),this.d(p.track([r,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(p.track([r,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(p.track([r,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(p.track([r,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(p.track([r,"colorBlendMode"],[this,"colorBlendMode"])),this.d(p.track([r,"cacheBytes"],[this,"cacheBytes"])),this.d(p.track([r,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(p.track([r,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(p.track([r,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(p.track([r,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(p.track([r,"materialParams"],[this,"materialParams"])),this.d(p.bind([r,"supportEdit"],[this,"supportEdit"])),this.d(p.bind([r,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(p.bind([r,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(p.bind([r,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(p.bind([r,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(p.bind([r,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(p.bind([r,"excavateId"],[this,"excavateId"]))}{const r=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{r.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{r.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{r.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{r.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{r.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{r.resetFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{r.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{r.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{r.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{r.calcFlyInParam(...i)}))}{const r=this._es3DTileset;this.d(r.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(r.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const r=()=>{this.es3DTileset.show=this.show};r(),this.d(this.showChanged.don(()=>{r()}))}}get es3DTileset(){return this._es3DTileset}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}get useEarthDSToken(){return this._useEarthDSToken.value}get useEarthDSTokenChanged(){return this._useEarthDSToken.changed}set useEarthDSToken(e){this._useEarthDSToken.value=e}get earthdstoken(){return this._earthdstoken.value}get earthdstokenChanged(){return this._earthdstoken.changed}set earthdstoken(e){this._earthdstoken.value=e}async getport(){const e=await j2(this.url,this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const e=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],r=+new Date;if(e){const s=this.tileServiceIp,o=await this.getport();this._es3DTileset.url=`${s}:${o}/tiles/tileset.json?t=${r}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01");return r}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01");return r}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceName(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:e[1];if(!r)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return r}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}};g(ql,"type",ql.register("ESMsTileset",ql,{chsName:"Modelser实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let ig=ql;const Wm={defaultValue:[{type:"2",widget:"WidgetBlueprint'/ESFoliage/PoiSheng.PoiSheng'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"3",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"4",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"5",widget:"WidgetBlueprint'/ESFoliage/PoiXiang.PoiXiang'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"6",widget:"WidgetBlueprint'/ESFoliage/PoiCun.PoiCun'",povit:[.5,1],worldScale:.1,hiddenDistance:40}],sampleValue:`
357
+ `;function qm(n){try{return JSON.parse(n),!0}catch{return!1}}const W2="${earthsdk3-assets-script-dir}/assets/misc/2.geojson",Wt=class Wt extends ee{constructor(e){super(e);g(this,"_flyToFeatureEvent",this.dv(new H));g(this,"_flyToFeatureIndexEvent",this.dv(new H));g(this,"_features",this.disposeVar(p.reactJsonWithUndefined(void 0)));g(this,"pickedInfoType","FeatureCollection");this._updateUrl(),this.ad(this.urlChanged.don(()=>{this._updateUrl()})),this.ad(this.editingChanged.don(()=>{console.warn("ESGeoJson暂不支持编辑!")}))}get flyToFeatureEvent(){return this._flyToFeatureEvent}flyToFeature(e,r,i){this._flyToFeatureEvent.emit(e,r,i)}get flyToFeatureIndexEvent(){return this._flyToFeatureIndexEvent}flyToFeatureIndex(e,r){this._flyToFeatureIndexEvent.emit(e,r)}get features(){return this._features.value}set features(e){this._features.value=e}get featuresChanged(){return this._features.changed}getFeatures(){if(this.features)return this.features;console.log("数据未加载完成,请稍后调用此方法getFeatures()")}async _updateUrl(){var e;if(!this.url){this.features=void 0;return}typeof this.url=="object"?this.features=this.url:qm(this.url)?this.features=JSON.parse(this.url):await fetch(ft.context.getStrFromEnv(this.url)).then(r=>r.json()).then(r=>{this.features=r}).catch(r=>{console.warn("ESEntityCluster数据加载失败",r)}),this.pickedInfoType=((e=this.features)==null?void 0:e.type)??"FeatureCollection"}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",dataSource:[...e.dataSource,new ht([this,"url"],"服务地址",Wt.defaults.url),new R([this,"minFeatureVisibleDistance"],"要素最小可视距离",Wt.defaults.minFeatureVisibleDistance),new R([this,"maxFeatureVisibleDistance"],"要素最大可视距离",Wt.defaults.maxFeatureVisibleDistance),new Tt([this,"heightReference"],[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]],"高度参考")],style:[...e.style,new vt([],"点样式集合"),new tt([this,"textShow"],"是否显示",Wt.defaults.textShow),new qe([this,"textAnchor"],"锚点",Wt.defaults.anchor),new Et([this,"textProperty"],"标注显示属性",Wt.defaults.textStyle.textProperty),new Et([this,"textDefaultText"],"默认文本",Wt.defaults.textStyle.defaultText),new Gt([this,"textColor"],"文本颜色",Wt.defaults.textStyle.color),new Gt([this,"textBackgroundColor"],"文本背景颜色",Wt.defaults.textStyle.backgroundColor),new Et([this,"textFontStyle"],"字体样式",Wt.defaults.textStyle.fontStyle),new Et([this,"textFontWeight"],"字体粗细",Wt.defaults.textStyle.fontWeight),new R([this,"textFontSize"],"字体大小",Wt.defaults.textStyle.fontSize),new qe([this,"textOffset"],"像素偏移",Wt.defaults.textStyle.offset),new vt([],"点图片样式集合"),new tt([this,"imageShow"],"是否显示",Wt.defaults.imageShow),new qe([this,"imageAnchor"],"锚点",Wt.defaults.imageStyle.anchor),new ht([this,"imageUrl"],"图片地址",Wt.defaults.imageStyle.url),new qe([this,"imageSize"],"图片大小",Wt.defaults.imageStyle.size),new qe([this,"imageOffset"],"像素偏移",Wt.defaults.imageStyle.offset),new vt([],"线样式集合"),new tt([this,"stroked"],"是否显示",Wt.defaults.stroked),new tt([this,"strokeGround"],"贴地",Wt.defaults.strokeStyle.ground),new R([this,"strokeWidth"],"线宽",Wt.defaults.strokeStyle.width),new Tt([this,"strokeWidthType"],Wt.defaults.strokeStyle.widthTypes,"线宽类型"),new Gt([this,"strokeColor"],"线颜色",Wt.defaults.strokeStyle.color),new Et([this,"strokeMaterial"],"线材质",Wt.defaults.strokeStyle.material),new ht([this,"strokeMaterialParams"],"线材质参数",Wt.defaults.strokeStyle.materialParams),new vt([],"面样式集合"),new tt([this,"filled"],"是否显示",Wt.defaults.filled),new tt([this,"fillGround"],"贴地",Wt.defaults.fillStyle.ground),new Gt([this,"fillColor"],"填充颜色",Wt.defaults.fillStyle.color),new Et([this,"fillMaterial"],"填充材质",Wt.defaults.fillStyle.material),new ht([this,"fillMaterialParams"],"填充材质参数",Wt.defaults.fillStyle.materialParams)],more:[...e.more,new vt([],"标注文本样式"),new Et([this,"textFontFamily"],"字体",Wt.defaults.textStyle.fontFamily),new vt([],"通用"),new Cs([this,"loadFuncStr"],"loadFnStr",zm,q2,!0)]}}get strokeWidth(){return this.strokeStyle.width}set strokeWidth(e){this.strokeStyle={...this.strokeStyle,width:e}}get strokeWidthChanged(){return this.strokeStyleChanged}get strokeWidthType(){return this.strokeStyle.widthType}set strokeWidthType(e){this.strokeStyle={...this.strokeStyle,widthType:e}}get strokeWidthTypeChanged(){return this.strokeStyleChanged}get strokeColor(){return this.strokeStyle.color}set strokeColor(e){this.strokeStyle={...this.strokeStyle,color:[...e]}}get strokeColorChanged(){return this.strokeStyleChanged}get strokeMaterial(){return this.strokeStyle.material}set strokeMaterial(e){this.strokeStyle={...this.strokeStyle,material:e}}get strokeMaterialChanged(){return this.strokeStyleChanged}get strokeMaterialParams(){return this.strokeStyle.materialParams}set strokeMaterialParams(e){this.strokeStyle={...this.strokeStyle,materialParams:e}}get strokeMaterialParamsChanged(){return this.strokeStyleChanged}get strokeGround(){return this.strokeStyle.ground}set strokeGround(e){this.strokeStyle={...this.strokeStyle,ground:e}}get strokeGroundChanged(){return this.strokeStyleChanged}get fillColor(){return this.fillStyle.color}set fillColor(e){this.fillStyle={...this.fillStyle,color:[...e]}}get fillColorChanged(){return this.fillStyleChanged}get fillMaterial(){return this.fillStyle.material}set fillMaterial(e){this.fillStyle={...this.fillStyle,material:e}}get fillMaterialChanged(){return this.fillStyleChanged}get fillMaterialParams(){return this.fillStyle.materialParams}set fillMaterialParams(e){this.fillStyle={...this.fillStyle,materialParams:e}}get fillMaterialParamsChanged(){return this.fillStyleChanged}get fillGround(){return this.fillStyle.ground}set fillGround(e){this.fillStyle={...this.fillStyle,ground:e}}get fillGroundChanged(){return this.fillStyleChanged}get textProperty(){return this.textStyle.textProperty}set textProperty(e){this.textStyle={...this.textStyle,textProperty:e}}get textPropertyChanged(){return this.textStyleChanged}get textDefaultText(){return this.textStyle.defaultText}set textDefaultText(e){this.textStyle={...this.textStyle,defaultText:e}}get textDefaultTextChanged(){return this.textStyleChanged}get textColor(){return this.textStyle.color}set textColor(e){this.textStyle={...this.textStyle,color:e}}get textColorChanged(){return this.textStyleChanged}get textBackgroundColor(){return this.textStyle.backgroundColor}set textBackgroundColor(e){this.textStyle={...this.textStyle,backgroundColor:e}}get textBackgroundColorChanged(){return this.textStyleChanged}get textFontFamily(){return this.textStyle.fontFamily}set textFontFamily(e){this.textStyle={...this.textStyle,fontFamily:e}}get textFontFamilyChanged(){return this.textStyleChanged}get textFontStyle(){return this.textStyle.fontStyle}set textFontStyle(e){this.textStyle={...this.textStyle,fontStyle:e}}get textFontStyleChanged(){return this.textStyleChanged}get textFontWeight(){return this.textStyle.fontWeight}set textFontWeight(e){this.textStyle={...this.textStyle,fontWeight:e}}get textFontWeightChanged(){return this.textStyleChanged}get textFontSize(){return this.textStyle.fontSize}set textFontSize(e){this.textStyle={...this.textStyle,fontSize:e}}get textFontSizeChanged(){return this.textStyleChanged}get textAnchor(){return this.textStyle.anchor}set textAnchor(e){this.textStyle={...this.textStyle,anchor:e}}get textAnchorChanged(){return this.textStyleChanged}get textOffset(){return this.textStyle.offset}set textOffset(e){this.textStyle={...this.textStyle,offset:e}}get textOffsetChanged(){return this.textStyleChanged}get imageUrl(){return this.imageStyle.url}set imageUrl(e){this.imageStyle={...this.imageStyle,url:e}}get imageUrlChanged(){return this.imageStyleChanged}get imageSize(){return this.imageStyle.size}set imageSize(e){this.imageStyle={...this.imageStyle,size:e}}get imageSizeChanged(){return this.imageStyleChanged}get imageAnchor(){return this.imageStyle.anchor}set imageAnchor(e){this.imageStyle={...this.imageStyle,anchor:e}}get imageAnchorChanged(){return this.imageStyleChanged}get imageOffset(){return this.imageStyle.offset}set imageOffset(e){this.imageStyle={...this.imageStyle,offset:e}}get imageOffsetChanged(){return this.imageStyleChanged}};g(Wt,"createDefaultProps",()=>({...ee.createDefaultProps(),show:!0,allowPicking:!0,loadFuncStr:void 0,url:W2,stroked:!0,strokeStyle:p.reactJson({width:1,widthType:"world",color:[.79,.91,.06,1],material:"",materialParams:{},ground:!1}),filled:!0,fillStyle:p.reactJson({color:[.79,.91,.06,.2],material:"",materialParams:{},ground:!1}),imageShow:!0,imageStyle:p.reactJson({url:"${earthsdk3-assets-script-dir}/assets/img/location.png",size:[32,32],anchor:[.5,1],offset:[0,0]}),textShow:!0,textStyle:p.reactJson({textProperty:"",defaultText:"默认标注",color:[1,1,1,1],backgroundColor:void 0,fontFamily:"Arial",fontSize:16,fontStyle:"normal",fontWeight:"normal",anchor:[0,1],offset:[16,-8]}),minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReference:"NONE"})),g(Wt,"type",Wt.register("ESGeoJson",Wt,{chsName:"ESGeoJson",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"GeoJson数据加载"}));let Ll=Wt;const Bo=class Bo extends Rt{constructor(e){super(e);g(this,"editingBindMode","doublePoints");g(this,"_height",this.disposeVar(p.react(0)));{const r=()=>{this.height=this.points&&this.points.length>=2?this.points[1][2]-this.points[0][2]:0};r(),this.ad(this.pointsChanged.don(r))}}get height(){return this._height.value}set height(e){this._height.value=e}get heightChanged(){return this._height.changed}};g(Bo,"createDefaultProps",()=>({...Rt.createDefaultProps(),stroked:!0,strokeStyle:p.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),g(Bo,"type",Bo.register("ESHeightMeasurement",Bo,{chsName:"高度测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"高度测量"})),g(Bo,"supportEditingModes",[...Rt.supportEditingModes,ct.DoublePointsAppend,ct.DoublePointsModify]);let kd=Bo;const cu=class cu extends gs{constructor(e){super(e);g(this,"_area",this.dv(p.react(0)));g(this,"_perimeter",this.dv(p.react(0)));g(this,"editingBindMode","doublePoints");const r=()=>{this._area.value=Math.PI*this.radius*this.radius,this._perimeter.value=2*Math.PI*this.radius};r(),this.d(this.radiusChanged.don(r))}get area(){return this._area.value}get areaChanged(){return this._area.changed}get perimeter(){return this._perimeter.value}get perimeterChanged(){return this._perimeter.changed}toPolygon(e=10,r){return ym([...this.position],this.radius,e,r)[0].map(s=>[...s,this.position?this.position[2]:0])}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"style",basic:[...e.basic,new R([this,"radius"],"圆半径",1,!0)],coordinate:[...e.coordinate,new tt([this,"editing"],"是否编辑"),new na([this,"position"],"三维坐标",[0,0,0],!0),new R([this,"area"],"面积",0,!1,!0),new R([this,"perimeter"],"周长",0,!1,!0)]}}};g(cu,"createDefaultProps",()=>({...gs.createDefaultProps(),radius:1,filled:!0,collision:!1,fillStyle:p.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!1})})),g(cu,"type",cu.register("ESLocalCircle",cu,{chsName:"局部坐标圆形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalCircle"}));let Vd=cu;const fu=class fu extends gs{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new Jg([this,"points"],"坐标",[])]}}};g(fu,"createDefaultProps",()=>({...gs.createDefaultProps(),points:id([]),filled:!0})),g(fu,"type",fu.register("ESLocalPolygon",fu,{chsName:"局部2D坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygon"}));let Rl=fu;const du=class du extends Ba{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new Dc([this,"points"],"本地位置数组")]}}};g(du,"createDefaultProps",()=>({...Ba.createDefaultProps(),points:p.reactPositions(void 0),filled:!0})),g(du,"type",du.register("ESLocalPolygonZ",du,{chsName:"局部坐标多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalPolygonZ"}));let Ud=du;const gu=class gu extends gs{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new R([this,"width"],"宽度"),new R([this,"height"],"高度")]}}};g(gu,"createDefaultProps",()=>({...gs.createDefaultProps(),width:5e5,height:3e5,filled:!0})),g(gu,"type",gu.register("ESLocalRectangle",gu,{chsName:"局部坐标四边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESLocalRectangle"}));let zd=gu;const ms=class ms extends Rt{constructor(e){super(e);g(this,"editingBindMode","lineString");g(this,"_distance",this.dv(p.react(0)));g(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);g(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());const r=()=>{if(this.points&&this.points.length>=2){const i=Tl(this.points,"GEODESIC"),s=i[i.length-1];this._distance.value=s}else this._distance.value=0};r(),this.d(this.pointsChanged.don(r))}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new R([this,"height"],"高度",10),new R([this,"width"],"宽度",10),new Tt([this,"materialMode"],ms.materialModes,"模式","purple")],coordinate:[...e.coordinate,new R([this,"distance"],"距离",0,!1,!0)]}}};g(ms,"createDefaultProps",()=>({...Rt.createDefaultProps(),height:10,width:10,materialMode:"singleArrow",filled:!0,stroked:!0,fillStyle:p.reactJson({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),g(ms,"type",ms.register("ESPipeFence",ms,{chsName:"管道电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"管道电子围栏"})),g(ms,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","color"]]),g(ms,"supportEditingModes",[...Rt.supportEditingModes,ct.LineStringAppend,ct.LineStringInsert]);let uc=ms;const ys=class ys extends Wn{constructor(e){super(e);g(this,"_setLayerVisibleEvent",this.dv(new H));g(this,"_setLayerColorEvent",this.dv(new H))}get setLayerVisibleEvent(){return this._setLayerVisibleEvent}setLayerVisible(e,r){this._setLayerVisibleEvent.emit(e,r)}get setLayerColorEvent(){return this._setLayerColorEvent}setLayerColor(e,r){this._setLayerColorEvent.emit(e,r)}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"ESPipeserTileset"),new mt(["string","string"],(r,i)=>this.setLayerVisible(r,i),["",""],"setLayerVisible"),new mt(["string","string"],(r,i)=>this.setLayerColor(r,i),["",""],"setLayerColor"),new Tt([this,"colorMode"],ys.colorModes,"colorMode",ys.defaults.colorMode,!0)]}}};g(ys,"createDefaultProps",()=>({...Wn.createDefaultProps(),colorMode:"default"})),g(ys,"type",ys.register("ESPipeserTileset",ys,{chsName:"PipeSer图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"PipeSer图层"})),g(ys,"colorModes",[["default","default"],["color","color"],["blend","blend"]]);let qd=ys;const _s=class _s extends Rt{constructor(e){super(e);g(this,"editingBindMode","circular")}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",coordinate:[...e.coordinate,new R([this,"area"],"面积",0,!1,!0),new R([this,"perimeter"],"周长",0,!1,!0)],basic:[...e.basic,new R([this,"height"],"高度",10),new Tt([this,"materialMode"],_s.materialModes,"模式","danger")]}}};g(_s,"createDefaultProps",()=>({...Rt.createDefaultProps(),height:10,materialMode:"danger",filled:!0,collision:!1})),g(_s,"type",_s.register("ESPolygonFence",_s,{chsName:"多边形电子围栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"多边形电子围栏"})),g(_s,"materialModes",[["模式一","danger"],["模式二","checkerboard"],["模式三","warning"],["模式四","cord"],["模式五","scanline"],["模式六","honeycomb"],["模式七","gradientColor"]]),g(_s,"supportEditingModes",[...Rt.supportEditingModes,ct.CircularAppend,ct.CircularInsert,ct.HeightModify]);let lc=_s;const to=class to extends Rt{constructor(e){super(e);g(this,"_deprecated",["ground"]);g(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());g(this,"editingBindMode","doublePoints")}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"通用","通用"),new tt([this,"ground"],"是否贴地"),new tt([this,"outlineTranslucent"],"轮廓线半透明"),new R([this,"height"],"高度"),new R([this,"extrudedHeight"],"拉伸高度"),new Kn([this,"rectangle"],"范围",to.defaults.rectangle,!0),new R([this,"stRotation"],"纹理旋转角度"),new R([this,"rotation"],"旋转角度"),new tt([this,"pointEditing"],"是否单点编辑")]}}};g(to,"createDefaultProps",()=>({...Rt.createDefaultProps(),ground:!1,outlineTranslucent:!0,height:0,extrudedHeight:0,rectangle:p.reactArrayWithUndefined(void 0),rotation:0,stRotation:0,pointEditing:!1,filled:!0})),g(to,"type",to.register("ESRectangle",to,{chsName:"矩形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"矩形"})),g(to,"supportEditingModes",[...Rt.supportEditingModes,ct.DoublePointsAppend,ct.DoublePointsModify]);let Wd=to;const pu=class pu extends oe{getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new ht([this,"innerRings"],"裁切多边形数组",[],void 0,!0)]}}};g(pu,"createDefaultProps",()=>({...oe.createDefaultProps(),innerRings:p.reactPositionsSet([])})),g(pu,"type",pu.register("ESPolygonWithHole",pu,{chsName:"内部裁切多边形",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"带洞多边形"}));let Hd=pu;const eo=class eo extends oe{constructor(e){super(e);g(this,"_startEvent",this.disposeVar(new H));g(this,"_stopEvent",this.dv(new H));g(this,"_surfaceArea",this.disposeVar(p.react(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get stopEvent(){return this._stopEvent}stop(){this._stopEvent.emit()}get surfaceArea(){return this._surfaceArea.value}set surfaceArea(e){this._surfaceArea.value=e}get surfaceChanged(){return this._surfaceArea.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"表面积测量","表面积测量"),new mt([],()=>this.start(),[],"开始计算"),new R([this,"interpolation"],"插值距离",eo.defaults.interpolation),new R([this,"offsetHeight"],"偏移高度",eo.defaults.offsetHeight)]}}};g(eo,"createDefaultProps",()=>({...oe.createDefaultProps(),interpolation:.5,offsetHeight:0,units:p.reactArray(["SquareMeter_SquareKilometer","MU_Hectare"]),fillStyle:p.reactJson({color:[1,1,1,.5],material:"",materialParams:{},ground:!0})})),g(eo,"type",eo.register("ESSurfaceAreaMeasurement",eo,{chsName:"表面积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"表面积测量"}));let Xd=eo;const ro=class ro extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new R([this,"downloadProgress"],"下载进度",ro.defaults.downloadProgress,!0,!0),new ht([this,"importOptions"],"导入参数",ro.defaults.importOptions,void 0,!0)],dataSource:[...t.dataSource,new ht([this,"url"],"路径")]}}};g(ro,"createDefaultProps",()=>({...dt.createDefaultProps(),url:"",importOptions:p.reactJsonWithUndefined({buildCollisions:"QueryAndPhysics",buildHierarchy:"Simplified",collisionType:"CTF_UseComplexAsSimple",bImportMetaData:!0}),downloadProgress:0})),g(ro,"type",ro.register("ESDatasmithRuntimeModel",ro,{chsName:"Datasmith Model",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Datasmith Model"}));let Bd=ro;const br=class br extends Rl{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Tt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",br.defaults.waterType),new R([this,"frequency"],"频率",br.defaults.frequency),new Je([this,"amplitude"],.01,[0,1],"振幅",br.defaults.amplitude),new Je([this,"flowDirection"],1,[0,360],"流向",br.defaults.flowDirection),new Je([this,"waveVelocity"],.01,[0,1],"波动频率",br.defaults.waveVelocity),new Je([this,"specularIntensity"],.01,[0,1],"镜面反射强度",br.defaults.specularIntensity),new Je([this,"murkiness"],.1,[0,10],"水体浑浊度",br.defaults.murkiness),new R([this,"flowSpeed"],"水流速度",br.defaults.flowSpeed),new Gt([this,"waterColor"],"水的底色",br.defaults.waterColor),new ht([this,"waterImage"],"水的图片",br.defaults.waterImage)]}}};g(br,"createDefaultProps",()=>({...Rl.createDefaultProps(),allowPicking:!0,waterImage:p.reactJsonWithUndefined(void 0),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5,stroked:!1,filled:!0})),g(br,"type",br.register("ESDynamicWater",br,{chsName:"动态水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"局部多边形水面"}));let Yd=br;const Nr=class Nr extends oe{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,defaultMenu:"basic",basic:[...t.basic,new Tt([this,"waterType"],[["river","river"],["ocean","ocean"],["lake","lake"],["custom","custom"]],"水域类型",Nr.defaults.waterType),new R([this,"frequency"],"频率",Nr.defaults.frequency),new Je([this,"amplitude"],.01,[0,1],"振幅",Nr.defaults.amplitude),new Je([this,"flowDirection"],1,[0,360],"流向",Nr.defaults.flowDirection),new Je([this,"waveVelocity"],.01,[0,1],"波动频率",Nr.defaults.waveVelocity),new Je([this,"specularIntensity"],.01,[0,1],"镜面反射强度",Nr.defaults.specularIntensity),new Je([this,"murkiness"],.1,[0,10],"水体浑浊度",Nr.defaults.murkiness),new R([this,"flowSpeed"],"水流速度",Nr.defaults.flowSpeed),new Gt([this,"waterColor"],"水的底色",Nr.defaults.waterColor),new ht([this,"waterImage"],"水的图片",Nr.defaults.waterImage)]}}};g(Nr,"createDefaultProps",()=>({...oe.createDefaultProps(),allowPicking:!0,waterImage:p.reactJsonWithUndefined({}),waterColor:[.1497,.165,.0031,1],frequency:1e3,waveVelocity:.5,amplitude:.1,specularIntensity:.8,waterType:"river",flowDirection:0,flowSpeed:0,murkiness:5})),g(Nr,"type",Nr.register("ESGeoWater",Nr,{chsName:"地理水面",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"地理动态水面"}));let Jd=Nr;const Yo=class Yo extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new R([this,"downloadProgress"],"下载进度",Yo.defaults.downloadProgress,!0,!0),new Et([this,"levelName"],"levelName",""),new R([this,"levelLoadDistance"],"levelLoadDistance",1e3),new gr([this,"levelOffset"],"levelOffset",[0,0,0])],dataSource:[...t.dataSource,new ht([this,"url"],"url","")]}}};g(Yo,"createDefaultProps",()=>({...dt.createDefaultProps(),url:"",downloadProgress:0,levelName:"",levelOffset:p.reactArray([0,0,0]),levelLoadDistance:1e3})),g(Yo,"type",Yo.register("ESLevelRuntimeModel",Yo,{chsName:"关卡包模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"关卡包模型"}));let jd=Yo;const _n=class _n extends ps{constructor(e){super(e);g(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);g(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})())}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new R([this,"radius"],"半径",_n.defaults.radius),new R([this,"sides"],"圆边数",_n.defaults.sides),new R([this,"speed"],"材质速度",_n.defaults.speed),new Tt([this,"materialMode"],_n.materialModes,"材质模式",_n.defaults.materialMode),new ht([this,"materialImage"],"材质图片和重复度",_n.defaults.materialImage)]}}};g(_n,"createDefaultProps",()=>({...ps.createDefaultProps(),radius:10,sides:10,materialMode:"singleArrow",materialImage:p.reactJson({url:"",uDis:50,vDis:10}),speed:1,filled:!0,stroked:!1,fillStyle:p.reactJson({color:[1,0,.73,1],material:"",materialParams:{},ground:!1})})),g(_n,"type",_n.register("ESPipeline",_n,{chsName:"管线",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPipeline"})),g(_n,"materialModes",[["单箭头","singleArrow"],["多箭头","multipleArrows"]]);let Qd=_n;const Yi=class Yi extends Rt{constructor(e){super(e);g(this,"editingBindMode","visibility")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Gt([this,"visibleColor"],"可视区域颜色",Yi.defaults.visibleColor),new Gt([this,"invisibleColor"],"遮挡区域颜色",Yi.defaults.invisibleColor),new R([this,"heightOffset"],"视点高度偏移",Yi.defaults.heightOffset)]}}};g(Yi,"createDefaultProps",()=>({...Rt.createDefaultProps(),visibleColor:p.reactArray([0,1,0,1]),invisibleColor:p.reactArray([1,0,0,1]),heightOffset:0})),g(Yi,"type",Yi.register("ESVisibilityAnalysis",Yi,{chsName:"通视分析,视线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"通视分析,视线分析"})),g(Yi,"supportEditingModes",[...Rt.supportEditingModes,ct.VisibilityAppend,ct.VisibilityModify]);let $d=Yi;const vu=class vu extends oe{constructor(e){super(e);g(this,"_startEvent",this.dv(new H));g(this,"_clearEvent",this.dv(new H));g(this,"_volume",this.disposeVar(p.react(0)))}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get volume(){return this._volume.value}set volume(e){this._volume.value=e}get volumeChanged(){return this._volume.changed}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new vt([],"通用","通用"),new R([this,"planeHeight"],"基准面高程",void 0,!0),new R([this,"gridWidth"],"采样间距 m"),new R([this,"cutVolume"],"挖方",0,!1,!0),new R([this,"fillVolume"],"填方",0,!1,!0),new R([this,"cutAndFillVolume"],"挖填方",0,!1,!0),new R([this,"progress"],"计算进度",0,!1,!0),new mt([],()=>this.start(),[],"开始分析"),new mt([],()=>this.clear(),[],"清空分析结果"),new tt([this,"depthTest"],"是否开启深度检测")]}}};g(vu,"createDefaultProps",()=>({...oe.createDefaultProps(),planeHeight:p.react(void 0),gridWidth:1,cutVolume:0,fillVolume:0,cutAndFillVolume:0,progress:0,depthTest:!1,filled:!1,stroked:!0,strokeStyle:p.reactJson({width:2,widthType:"screen",color:[1,1,1,1],material:"",materialParams:{},ground:!1})})),g(vu,"type",vu.register("ESVolumeMeasurement",vu,{chsName:"体积测量",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"体积测量"}));let Kd=vu;const mu=class mu extends Do{constructor(e){super(e);g(this,"_human",this.dv(new Do));g(this,"_poi",this.dv(new Dl));this.d(this.components.disposableAdd(this._human,!0)),this.d(this.components.disposableAdd(this._poi));{const{_human:r,_poi:i}=this;this.d(p.track([r,"show"],[this,"show"])),this.d(p.track([i,"show"],[this,"show"])),this.d(p.track([r,"allowPicking"],[this,"allowPicking"])),this.d(p.track([i,"allowPicking"],[this,"allowPicking"])),this.d(p.bind([r,"scale"],[this,"scale"])),this.d(p.bind([i,"scale"],[this,"scale"])),this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.track([i,"collision"],[this,"collision"])),this.d(p.bind([r,"flyInParam"],[this,"flyInParam"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.track([r,"animation"],[this,"animation"])),this.d(p.track([r,"mode"],[this,"mode"])),this.d(p.track([r,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(p.track([r,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(p.track([i,"name"],[this,"name"])),this.d(p.track([i,"mode"],[this,"poiMode"])),this.d(p.track([i,"autoAnchor"],[this,"autoAnchor"])),this.d(p.track([i,"screenRender"],[this,"screenRender"])),this.d(p.track([i,"size"],[this,"size"])),this.d(p.track([i,"anchor"],[this,"anchor"])),this.d(p.track([i,"sizeByContent"],[this,"sizeByContent"])),this.d(p.track([i,"renderMode"],[this,"renderMode"])),this.d(p.track([i,"rotationType"],[this,"rotationType"])),this.d(p.track([i,"zOrder"],[this,"zOrder"])),this.d(p.track([i,"minVisibleDistance"],[this,"minVisibleDistance"])),this.d(p.track([i,"maxVisibleDistance"],[this,"maxVisibleDistance"])),this.d(p.bind([r,"position"],[this,"position"])),this.d(p.bind([r,"rotation"],[this,"rotation"])),this.d(this.flyInEvent.don(s=>{r.flyIn(s)})),this.d(this.flyToEvent.don(s=>{r.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{r.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{r.calcFlyInParam()})),this.d(this.smoothMoveEvent.don((s,o)=>{r.smoothMove(s,o)})),this.d(this.smoothMoveWithRotationEvent.don((s,o,a)=>{r.smoothMoveWithRotation(s,o,a)})),this.d(this.smoothMoveOnGroundEvent.don((s,o,a,u)=>{r.smoothMoveOnGround(s,o,a,u)})),this.d(this.smoothMoveWithRotationOnGroundEvent.don((s,o,a,u,l)=>{r.smoothMoveWithRotationOnGround(s,o,a,u,l)})),this.d(this.automaticLandingEvent.don(()=>{r.automaticLanding()}))}}get human(){return this._human}get poi(){return this._poi}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Tt([this,"poiMode"],Dl.modes,"poi模式","SquareH01"),new R([this,"poiOffsetHeight"],"poi高度偏移",1.8)]}}};g(mu,"createDefaultProps",()=>({poiOffsetHeight:1.8,poiMode:"SquareH01",style:p.reactJson({}),autoAnchor:!0,screenRender:!0,size:p.reactArray([100,100]),anchor:p.reactArray([.5,1]),sizeByContent:!0,renderMode:0,rotationType:1,zOrder:0,...Do.createDefaultProps()})),g(mu,"type",mu.register("ESHumanPoi",mu,{chsName:"人员poi",tags:["ESObjects"],description:"ESHuman + ESPoi2D组合对象"}));let Zd=mu;const Ei=class Ei extends oe{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new R([this,"depth"],"深度",Ei.defaults.depth),new R([this,"interpolation"],"插值",Ei.defaults.interpolation),new R([this,"opacity"],"透明度",Ei.defaults.opacity),new ht([this,"sideImage"],"侧面图片",Ei.defaults.sideImage),new ht([this,"bottomImage"],"底面图片",Ei.defaults.bottomImage)]}}};g(Ei,"createDefaultProps",()=>({...oe.createDefaultProps(),depth:100,sideImage:p.reactJson({url:ft.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/side.jpg"),uDis:50,vDis:50}),bottomImage:p.reactJson({url:ft.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/ESPit/bottom.jpg"),uDis:50,vDis:50}),opacity:1,interpolation:50,collision:!1,allowPicking:!1,filled:!0})),g(Ei,"type",Ei.register("ESPit",Ei,{chsName:"坑",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"坑"}));let Ja=Ei;const yu=class yu extends Ja{constructor(e){super(e);g(this,"_excavate",this.dv(new Ol));g(this,"_pit",this.dv(new Ja));this.d(this.components.disposableAdd(this._excavate)),this.d(this.components.disposableAdd(this._pit,!0));{const{_excavate:r,_pit:i}=this;this.d(p.track([r,"show"],[this,"show"])),this.d(p.track([i,"show"],[this,"show"])),this.d(p.track([r,"allowPicking"],[this,"allowPicking"])),this.d(p.track([i,"allowPicking"],[this,"allowPicking"])),this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.track([i,"collision"],[this,"collision"])),this.d(p.bind([i,"points"],[this,"points"])),this.d(p.track([r,"points"],[this,"points"])),this.d(p.track([i,"pointed"],[this,"pointed"])),this.d(p.track([r,"pointed"],[this,"pointed"])),this.d(p.track([i,"pointStyle"],[this,"pointStyle"])),this.d(p.track([r,"pointStyle"],[this,"pointStyle"])),this.d(p.track([i,"stroked"],[this,"stroked"])),this.d(p.track([r,"stroked"],[this,"stroked"])),this.d(p.track([i,"strokeStyle"],[this,"strokeStyle"])),this.d(p.track([r,"strokeStyle"],[this,"strokeStyle"])),this.d(p.track([i,"filled"],[this,"filled"])),this.d(p.track([i,"fillStyle"],[this,"fillStyle"])),this.d(p.track([r,"fillStyle"],[this,"fillStyle"])),this.d(p.track([r,"mode"],[this,"mode"])),this.d(p.track([r,"targetID"],[this,"targetID"])),this.d(p.track([i,"depth"],[this,"depth"])),this.d(p.track([i,"sideImage"],[this,"sideImage"])),this.d(p.track([i,"bottomImage"],[this,"bottomImage"])),this.d(p.track([i,"opacity"],[this,"opacity"])),this.d(p.track([i,"interpolation"],[this,"interpolation"])),this.d(p.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(p.bind([i,"flyToParam"],[this,"flyToParam"])),this.d(this.flyInEvent.don(s=>{i.flyIn(s)})),this.d(this.flyToEvent.don(s=>{i.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get excavate(){return this._excavate}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Tt([this,"mode"],Ol.modes,"模式","in"),new Et([this,"targetID"],"瓦片图层","")]}}};g(yu,"createDefaultProps",()=>({...Ja.createDefaultProps(),mode:"in",targetID:""})),g(yu,"type",yu.register("ESHole",yu,{chsName:"挖坑(带材质+深度)",tags:["ESObjects"],description:"挖坑"}));let tg=yu;const eg={layerconfigfind:"/ts/layer/config/get",layerconfigsave:"/ts/layer/config/put",featureproperty:"/ts/editor/property",featureeditormuti:"/ts/editor/update",getts:"/ts/info"},H2=async(n,t,e,r)=>{try{const i=window.localStorage.getItem("Authorization");let s=n+`${eg.layerconfigfind}?tileServiceName=${t}`;e&&(s+=`&earthdstoken=${encodeURIComponent(r)}`);const o={headers:{...!e&&i?{Authorization:i}:{}},mode:"cors"},u=await(await fetch(s,o)).text();return JSON.parse(u)}catch(i){console.error(i)}},X2=async(n,t,e,r,i)=>{try{const s=window.localStorage.getItem("Authorization");let o=n+eg.layerconfigsave;const a=i??{};e&&(o+=`?earthdstoken=${encodeURIComponent(r)}`);const u={method:"POST",headers:{"Content-Type":"application/json",...!e&&s?{Authorization:s}:{}},mode:"cors",body:JSON.stringify({tileServiceName:t,layerConfig:JSON.stringify(a)})},c=await(await fetch(o,u)).text();return JSON.parse(c)}catch(s){console.error(s)}},B2=async(n,t,e)=>{try{const r=window.localStorage.getItem("Authorization");let i=n;t&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const s={headers:{...!t&&r?{Authorization:r}:{}},mode:"cors"},a=await(await fetch(i,s)).text(),u=JSON.parse(a);if(u.status=="ok")return u.data.port;console.error(u.status);return}catch(r){console.error(r)}},Y2=async(n,t,e,r,i)=>{try{const s={tileServiceName:t,featureId:e},o=window.localStorage.getItem("Authorization");let a=n+eg.featureproperty;r&&(a+=`?earthdstoken=${encodeURIComponent(i)}`);const l=await(await fetch(a,{method:"post",headers:{"Content-Type":"application/json",...!r&&o?{Authorization:o}:{}},body:JSON.stringify(s),mode:"cors"})).text(),c=JSON.parse(l);if(c.status=="ok")return c.data;console.error(c.data.status);return}catch(s){console.error(s)}},_u=class _u extends Wn{constructor(e){super(e);g(this,"_es3DTileset",this.dv(new Wn));g(this,"_ids",this.dv(p.reactJson([])));g(this,"_useEarthDSToken",this.dv(p.react(!1)));g(this,"_earthdstoken",this.dv(p.react("")));g(this,"_visJson",this.disposeVar(p.react({})));g(this,"_highlightInner3DtilesetEvent",this.dv(new H));g(this,"_removeHighlightInner3DtilesetEvent",this.dv(new H));g(this,"_tilesetServePort",this.dv(p.react("")));{const r=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ts01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{r()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const r=this._es3DTileset;this.d(p.track([r,"allowPicking"],[this,"allowPicking"])),this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.track([r,"actorTag"],[this,"actorTag"])),this.d(p.track([r,"materialMode"],[this,"materialMode"])),this.d(p.track([r,"highlight"],[this,"highlight"])),this.d(p.track([r,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(p.track([r,"highlightID"],[this,"highlightID"])),this.d(p.track([r,"highlightColor"],[this,"highlightColor"])),this.d(p.bind([r,"offset"],[this,"offset"])),this.d(p.bind([r,"rotation"],[this,"rotation"])),this.d(p.track([r,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(p.track([r,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(p.track([r,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(p.track([r,"czmClassificationType"],[this,"czmClassificationType"])),this.d(p.track([r,"czmStyleJson"],[this,"czmStyleJson"])),this.d(p.track([r,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(p.track([r,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(p.track([r,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(p.track([r,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(p.track([r,"colorBlendMode"],[this,"colorBlendMode"])),this.d(p.track([r,"cacheBytes"],[this,"cacheBytes"])),this.d(p.track([r,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(p.track([r,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(p.track([r,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(p.track([r,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(p.track([r,"materialParams"],[this,"materialParams"])),this.d(p.bind([r,"supportEdit"],[this,"supportEdit"])),this.d(p.bind([r,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(p.bind([r,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(p.bind([r,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(p.bind([r,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(p.bind([r,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(p.bind([r,"excavateId"],[this,"excavateId"]))}{const r=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{r.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{r.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{r.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{r.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{r.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{r.resetFeatureStyle(...i)})),this.d(this.setFeatureStyleEvent.don((...i)=>{r.setFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{r.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{r.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{r.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{r.calcFlyInParam(...i)}))}{const r=this._es3DTileset;this.d(r.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(r.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const r=()=>{this.es3DTileset.show=this.show};r(),this.d(this.showChanged.don(()=>{r()}))}}get es3DTileset(){return this._es3DTileset}get ids(){return this._ids.value}get idsChanged(){return this._ids.changed}set ids(e){this._ids.value=e}get useEarthDSToken(){return this._useEarthDSToken.value}get useEarthDSTokenChanged(){return this._useEarthDSToken.changed}set useEarthDSToken(e){this._useEarthDSToken.value=e}get earthdstoken(){return this._earthdstoken.value}get earthdstokenChanged(){return this._earthdstoken.changed}set earthdstoken(e){this._earthdstoken.value=e}get visJson(){return this._visJson.value}set visJson(e){this._visJson.value=e}get visJsonChanged(){return this._visJson.changed}setFeatureVisable(e,r){var i;if((i=this.layerConfig)!=null&&i.length){const s={};s[r[0].value]=r[0].visable,this.visJson={...this.visJson,...s}}else this.setFeatureVisableEvent.emit(e,typeof r=="string"?JSON.parse(r):r)}async getFeatureProperty(e){return await Y2(this.baseUrl,this.tileServiceName,e,this.useEarthDSToken,this.earthdstoken)}async getLayerConfig(){const e=await H2(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken);return!e||!Array.isArray(e)?this.layerConfig=[]:this.layerConfig=e,this.layerConfig}async saveLayerConfig(){const e=this.layerConfig;return await X2(this.baseUrl,this.tileServiceName,this.useEarthDSToken,this.earthdstoken,e)}get highlightInner3DtilesetEvent(){return this._highlightInner3DtilesetEvent}_highlightInner3Dtileset(e){this._highlightInner3DtilesetEvent.emit(e)}async highlightDSFeature(e){this._highlightInner3Dtileset(e)}get removeHighlightInner3DtilesetEvent(){return this._removeHighlightInner3DtilesetEvent}_removeHighlightInner3Dtileset(e){this._removeHighlightInner3DtilesetEvent.emit(e)}async removeHighlightDSFeature(e){this._removeHighlightInner3Dtileset(e)}async pickFeature(e,r){var a,u,l;const i=await e.pick(r),s=i.sceneObject;return!s||s.id!==this.id&&s.typeName!="ESRtsFeatureEditing"?void 0:s.typeName!="ESRtsFeatureEditing"?(this.ids=[...this.ids,(a=i==null?void 0:i.tilesetPickInfo)==null?void 0:a.id],{featureId:(u=i==null?void 0:i.tilesetPickInfo)==null?void 0:u.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}):{featureId:(l=i==null?void 0:i.sceneObject)==null?void 0:l.id,pickInnerFields:i==null?void 0:i.tilesetPickInfo}}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}async getport(){const e=await B2(this.url,this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const e=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],r=+new Date;if(e){const s=this.tileServiceIp,o=await this.getport();await this.getLayerConfig(),this._es3DTileset.url=`${s}:${o}/tiles/tileset.json?t=${r}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01");return r}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ts01")}get tileServiceName(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:e[1];if(!r)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return r}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01");return r}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ts01")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ht([this,"layerConfig"],"图层配置",[],void 0,!0)]}}};g(_u,"createDefaultProps",()=>({...Wn.createDefaultProps(),layerConfig:p.reactJsonWithUndefined([])})),g(_u,"type",_u.register("ESRtsTileset",_u,{chsName:"CIMRTS实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let rg=_u;function J2(n){return typeof n=="number"&&!isNaN(n)}const wu=class wu extends Wn{get json(){return{...this._innerGetJson(),show:this.show,materials:this.materials,changeMaterial:this.changeMaterial,props:this.props,rotation:this.rotation,offset:this.offset}}set json(t){this._innerSetJson(t)}async init(t,e){this.featureId=e;const r=await t.getFeatureProperty(e);this.uiShowprops=r.allFields.map(o=>({featureClassName:o.featureClassName,fields:o.fields.map(a=>({key:a.name,type:a.type,value:a.type!="Double"?a.value:J2(a.value)?Number(a.value.toFixed(3)):""}))})),this.datasetName=r.datasetName,t.setFeatureVisable("id",[{value:this.featureId,visable:!1}]),this.d(()=>{t.setFeatureVisable("id",[{value:this.featureId,visable:!0}])});const i=t.tileServiceIp,s=t.tilesetServePort;if(!s)throw new Error("ESRtsFeatureEditing: port is not defined");this.url=`${i}:${s}/featuretiles/${this.featureId}/tileset.json`,this.allowPicking=!0,this.d(this.pickedEvent.don(o=>{o.assign({sceneObject:t}),t.pickedEvent.emit(o)})),this.d(()=>{this.editing=!1,t.removeHighlightDSFeature(this)})}constructor(t){super(t)}};g(wu,"createDefaultProps",()=>({...Wn.createDefaultProps(),datasetName:void 0,featureId:void 0,materials:p.reactJson({}),changeMaterial:p.reactJsonWithUndefined(void 0),uiShowprops:p.reactJson({}),props:p.reactJson({})})),g(wu,"type",wu.register("ESRtsFeatureEditing",wu,{chsName:"ESRtsFeatureEditing",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let ng=wu;const j2=async(n,t,e)=>{try{const r=window.localStorage.getItem("Authorization");let i=n;t&&(i+=`?earthdstoken=${encodeURIComponent(e)}`);const s={headers:{...!t&&r?{Authorization:r}:{}},mode:"cors"},a=await(await fetch(i,s)).text(),u=JSON.parse(a);if(u.status=="ok")return u.data.port;console.error(u.status);return}catch(r){console.error(r)}},ql=class ql extends Wn{constructor(e){super(e);g(this,"_es3DTileset",this.dv(new Wn));g(this,"_tilesetServePort",this.dv(p.react("")));g(this,"_useEarthDSToken",this.dv(p.react(!1)));g(this,"_earthdstoken",this.dv(p.react("")));{const r=async()=>{if(typeof this.url!="string"){console.error("服务地址不合法, Init Error! 示例: http://localhost:9009/ts/info/ms01");return}this.url?this.refresh():this._es3DTileset.url=""};this.d(this.urlChanged.don(()=>{r()}))}{this.d(this.components.disposableAdd(this._es3DTileset,!0));const r=this._es3DTileset;this.d(p.track([r,"allowPicking"],[this,"allowPicking"])),this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.bind([r,"flyToParam"],[this,"flyToParam"])),this.d(p.track([r,"actorTag"],[this,"actorTag"])),this.d(p.track([r,"materialMode"],[this,"materialMode"])),this.d(p.track([r,"highlight"],[this,"highlight"])),this.d(p.track([r,"maximumScreenSpaceError"],[this,"maximumScreenSpaceError"])),this.d(p.track([r,"highlightID"],[this,"highlightID"])),this.d(p.track([r,"highlightColor"],[this,"highlightColor"])),this.d(p.bind([r,"offset"],[this,"offset"])),this.d(p.bind([r,"rotation"],[this,"rotation"])),this.d(p.track([r,"czmImageBasedLightingFactor"],[this,"czmImageBasedLightingFactor"])),this.d(p.track([r,"czmLuminanceAtZenith"],[this,"czmLuminanceAtZenith"])),this.d(p.track([r,"czmMaximumMemoryUsage"],[this,"czmMaximumMemoryUsage"])),this.d(p.track([r,"czmClassificationType"],[this,"czmClassificationType"])),this.d(p.track([r,"czmStyleJson"],[this,"czmStyleJson"])),this.d(p.track([r,"czmBackFaceCulling"],[this,"czmBackFaceCulling"])),this.d(p.track([r,"czmDebugShowBoundingVolume"],[this,"czmDebugShowBoundingVolume"])),this.d(p.track([r,"czmDebugShowContentBoundingVolume"],[this,"czmDebugShowContentBoundingVolume"])),this.d(p.track([r,"czmSkipLevelOfDetail"],[this,"czmSkipLevelOfDetail"])),this.d(p.track([r,"colorBlendMode"],[this,"colorBlendMode"])),this.d(p.track([r,"cacheBytes"],[this,"cacheBytes"])),this.d(p.track([r,"clippingPlaneEnabled"],[this,"clippingPlaneEnabled"])),this.d(p.track([r,"unionClippingRegions"],[this,"unionClippingRegions"])),this.d(p.track([r,"clippingPlaneEdgeColor"],[this,"clippingPlaneEdgeColor"])),this.d(p.track([r,"clippingPlaneEdgeWidth"],[this,"clippingPlaneEdgeWidth"])),this.d(p.track([r,"materialParams"],[this,"materialParams"])),this.d(p.bind([r,"supportEdit"],[this,"supportEdit"])),this.d(p.bind([r,"clippingPlanesId"],[this,"clippingPlanesId"])),this.d(p.bind([r,"clippingPlaneIds"],[this,"clippingPlaneIds"])),this.d(p.bind([r,"flattenedPlaneId"],[this,"flattenedPlaneId"])),this.d(p.bind([r,"flattenedPlaneEnabled"],[this,"flattenedPlaneEnabled"])),this.d(p.bind([r,"clippingPlaneId"],[this,"clippingPlaneId"])),this.d(p.bind([r,"excavateId"],[this,"excavateId"]))}{const r=this._es3DTileset;this.d(this.refreshTilesetEvent.don(()=>{r.refreshTileset()})),this.d(this.highlightFeatureEvent.don((...i)=>{r.highlightFeature(...i)})),this.d(this.highlightFeatureAndFlyToEvent.don((...i)=>{r.highlightFeatureAndFlyTo(...i)})),this.d(this.setFeatureColorEvent.don((...i)=>{r.setFeatureColor(...i)})),this.d(this.setFeatureVisableEvent.don((...i)=>{r.setFeatureVisable(...i)})),this.d(this.resetFeatureStyleEvent.don((...i)=>{r.resetFeatureStyle(...i)})),this.d(this.flyInEvent.don((...i)=>{r.flyIn(i[0])})),this.d(this.flyToEvent.don((...i)=>{r.flyTo(i[0])})),this.d(this.calcFlyToParamEvent.don((...i)=>{r.calcFlyToParam(...i)})),this.d(this.calcFlyInParamEvent.don((...i)=>{r.calcFlyInParam(...i)}))}{const r=this._es3DTileset;this.d(r.tilesetReady.don(i=>{this.tilesetReady.emit(i)})),this.d(r.pickedEvent.don(i=>{i.assign({sceneObject:this}),this.pickedEvent.emit(i)}))}{const r=()=>{this.es3DTileset.show=this.show};r(),this.d(this.showChanged.don(()=>{r()}))}}get es3DTileset(){return this._es3DTileset}get tilesetServePort(){return this._tilesetServePort.value}get tilesetServePortChanged(){return this._tilesetServePort.changed}set tilesetServePort(e){this._tilesetServePort.value=e}get useEarthDSToken(){return this._useEarthDSToken.value}get useEarthDSTokenChanged(){return this._useEarthDSToken.changed}set useEarthDSToken(e){this._useEarthDSToken.value=e}get earthdstoken(){return this._earthdstoken.value}get earthdstokenChanged(){return this._earthdstoken.changed}set earthdstoken(e){this._earthdstoken.value=e}async getport(){const e=await j2(this.url,this.useEarthDSToken,this.earthdstoken);if(e)return this.tilesetServePort=e,e;throw new Error("服务地址port获取失败!")}async refresh(){var i;if(!this.url||typeof this.url!="string")return;const e=(i=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:i[1],r=+new Date;if(e){const s=this.tileServiceIp,o=await this.getport();this._es3DTileset.url=`${s}:${o}/tiles/tileset.json?t=${r}`}console.log("3dtileset url:",this._es3DTileset.url)}get baseUrl(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^\/]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01");return r}else throw new Error("服务地址不合法,baseUrl is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceIp(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/^(https?:\/\/[^:]+)/))==null?void 0:e[1];if(!r)throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01");return r}else throw new Error("服务地址不合法,ip is not found! 示例: http://localhost:9009/ts/info/ms01")}get tileServiceName(){var e;if(this.url&&typeof this.url=="string"){const r=(e=this.url.match(/\/ts\/info\/(.*)/))==null?void 0:e[1];if(!r)throw console.log(this.url),new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01,");return r}else throw new Error("服务地址不合法,tileServiceName is not found! 示例: http://localhost:9009/ts/info/ms01")}};g(ql,"type",ql.register("ESMsTileset",ql,{chsName:"Modelser实时3DTileset图层",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"实时3DTileset图层"}));let ig=ql;const Wm={defaultValue:[{type:"2",widget:"WidgetBlueprint'/ESFoliage/PoiSheng.PoiSheng'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"3",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"4",widget:"WidgetBlueprint'/ESFoliage/PoiShi.PoiShi'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"5",widget:"WidgetBlueprint'/ESFoliage/PoiXiang.PoiXiang'",povit:[.5,1],worldScale:.1,hiddenDistance:40},{type:"6",widget:"WidgetBlueprint'/ESFoliage/PoiCun.PoiCun'",povit:[.5,1],worldScale:.1,hiddenDistance:40}],sampleValue:`
358
358
  ## 参数类型为 ESPoiType[]
359
359
  \`\`\`js
360
360
  type Vector2D = [number, number]
@@ -367,7 +367,7 @@ ${zm}
367
367
  hiddenDistance: number
368
368
  }
369
369
  \`\`\`
370
- `},Jo=class Jo extends ee{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new vt([],"通用"),new ht([this,"url"],"路径"),new ht([this,"poiTypes"],Jo.defaults.poiTypes,Wm.sampleValue),new R([this,"heightOffset"])]}}};g(Jo,"createDefaultProps",()=>({...ee.createDefaultProps(),url:"",poiTypes:p.reactJsonWithUndefined(Wm.defaultValue),heightOffset:40})),g(Jo,"type",Jo.register("ESPoiTileset",Jo,{chsName:"ESPoiTileset",tags:["ESObjects","_ES_Impl_UE"],description:"ESPoiTileset"}));let sg=Jo;const Eu=class Eu extends ft{getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new vt([],"通用","通用"),new tt([this,"show"],"是否显示"),new Tt([this,"screenPosition"],[["left","left"],["right","right"]],"定位","right"),new qe([this,"cssPosition"],"位置")]}}};g(Eu,"createDefaultProps",()=>({...ft.createDefaultProps(),show:!0,screenPosition:"right",cssPosition:[40,30]})),g(Eu,"type",Eu.register("ESScale",Eu,{chsName:"比例尺",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"比例尺"}));let og=Eu;const Ji=class Ji extends oe{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new R([this,"height"],"高度",Ji.defaults.height,!0),new R([this,"extrudedHeight"],"拉伸高度",Ji.defaults.extrudedHeight,!0),new tt([this,"perPositionHeight"],"应用每个位置高度",Ji.defaults.perPositionHeight,!0)]}}};g(Ji,"createDefaultProps",()=>({...oe.createDefaultProps(),height:0,extrudedHeight:10,perPositionHeight:!1,collision:!1})),g(Ji,"type",Ji.register("ESGeoExtrudedPolygon",Ji,{chsName:"拉升多边形体",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"拉升多边形体"})),g(Ji,"supportEditingModes",[...oe.supportEditingModes,ct.HeightModify]);let Lo=Ji;const jo=class jo extends oe{constructor(e){super(e);g(this,"_classification",this.dv(new rc));g(this,"_geoExtrudedPolygon",this.dv(new Lo));this.d(this.components.disposableAdd(this._classification)),this.d(this.components.disposableAdd(this._geoExtrudedPolygon,!0));{const{_classification:r,_geoExtrudedPolygon:i}=this;i.perPositionHeight=!0,this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.track([i,"collision"],[this,"collision"])),this.d(p.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(p.bind([i,"flyToParam"],[this,"flyToParam"])),this.d(p.bind([i,"points"],[this,"points"])),this.d(p.bind([i,"extrudedHeight"],[this,"height"])),this.d(p.bind([r,"fillColor"],[this,"overheightColor"])),this.d(p.bind([i,"fillColor"],[this,"standardColor"]));{const s=()=>{const{height:o,points:a,maxHeight:u}=this;if(!a)return;const l=a.map(c=>[c[0],c[1],o]);r.points=l,r.height=u-o,u-o<=0?r.show=!1:r.show=this.show&&this.filled};s(),this.d(ra([this.heightChanged,this.pointsChanged,this.maxHeightChanged],s))}{const s=()=>{const{show:o,filled:a}=this;r.show=o&&a,i.show=o&&a};s(),this.d(ra([this.showChanged,this.filledChanged],s))}this.d(this.flyInEvent.don(s=>{i.flyIn(s)})),this.d(this.flyToEvent.don(s=>{i.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get classification(){return this._classification}get geoExtrudedPolygon(){return this._geoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new R([this,"height"],"高度",10),new R([this,"maxHeight"],"最高高度",200),new Gt([this,"overheightColor"],"超高颜色",[1,0,0,.5]),new Gt([this,"standardColor"],"标准颜色",[0,1,0,.5])]}}};g(jo,"createDefaultProps",()=>({...oe.createDefaultProps(),height:10,maxHeight:200,overheightColor:[1,0,0,.5],standardColor:[0,1,0,.5]})),g(jo,"type",jo.register("ESHeightLimitAnalysis",jo,{chsName:"控高分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"控高分析对象"})),g(jo,"supportEditingModes",[...oe.supportEditingModes,ct.HeightModify]);let ag=jo;const Si=class Si extends ee{constructor(e){super(e);g(this,"_widgetEvent",this.dv(new H));g(this,"_data",this.dv(p.react(void 0)));{const r=()=>{this.url&&(typeof this.url=="object"?this.data=this.url:qm(this.url)?this.data=JSON.parse(this.url):fetch(ft.context.getStrFromEnv(this.url)).then(i=>i.json()).then(i=>{this.data=i}).catch(i=>{console.warn("ESEntityCluster数据加载失败",i)}))};r(),this.d(this.urlChanged.don(r))}}get widgetEvent(){return this._widgetEvent}get data(){return this._data.value}set data(e){this._data.value=e}get dataChanged(){return this._data.changed}getFeatures(){if(this._data)return this._data;console.log("数据未加载完成,请稍后重试")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ht([this,"url"],"地址",Si.defaults.url),new R([this,"pixelRange"],"集合范围",Si.defaults.pixelRange),new R([this,"minimumClusterSize"],"最小数量",Si.defaults.minimumClusterSize),new Tt([this,"heightReference"],[["None","None"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["CLAMP_TO_TERRAIN","CLAMP_TO_TERRAIN"]],"高度模式","None")],more:[...e.more,new ht([this,"style"],"style",Si.defaults.style),new tt([this,"perspective"],"透视效果",Si.defaults.perspective)]}}};g(Si,"createDefaultProps",()=>({...ee.createDefaultProps(),url:"",pixelRange:200,minimumClusterSize:2,style:p.reactJsonWithUndefined({cluster:[{minValue:2,mode:"SquareV02",style:{}}],nonCluster:{mode:"SquareV03",style:{}}}),heightReference:"None",perspective:!1})),g(Si,"type",Si.register("ESEntityCluster",Si,{chsName:"Poi聚合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于聚合POI标注,提高性能。"}));let ug=Si;class Fl extends st{constructor(){super();g(this,"_player",this.disposeVar(new Zn));const e=this._player;{const r=()=>{const i=(this.stopTime??0)-(this.startTime??0);e.duration=i>0?i:0};r(),this.d(this.startTimeChanged.don(r)),this.d(this.stopTimeChanged.don(r))}this.d(p.bind([e,"playing"],[this,"playing"])),this.d(p.bind([e,"loop"],[this,"loop"])),this.d(p.bind([e,"speed"],[this,"speed"])),this.d(e.currentTimeChanged.don(()=>{this.startTime!==void 0&&e.currentTime!==void 0&&(this.currentTime=e.currentTime+this.startTime)})),this.d(this.currentTimeChanged.don(()=>{if(this.currentTime===void 0||this.startTime===void 0)return;const r=this.currentTime-this.startTime;e.currentTime=p.clamp(r,0,e.duration)}))}get player(){return this._player}get ratio(){return this._player.ratio}get ratioChanged(){return this._player.ratioChanged}set ratio(e){this._player.ratio=e}}(n=>{n.createDefaultProps=()=>({...ft.createDefaultProps(),currentTime:void 0,startTime:void 0,stopTime:void 0,playing:void 0,loop:void 0,speed:void 0})})(Fl||(Fl={})),p.extendClassProps(Fl.prototype,Fl.createDefaultProps);const Su=class Su extends ft{constructor(e){super(e);g(this,"_absolutePlayer",this.dv(new Fl));const r=this.absolutePlayer;this.d(p.bind([r,"currentTime"],[this,"currentTime"])),this.d(p.bind([r,"startTime"],[this,"startTime"])),this.d(p.bind([r,"stopTime"],[this,"stopTime"])),this.d(p.bind([r,"playing"],[this,"playing"])),this.d(p.bind([r,"loop"],[this,"loop"])),this.d(p.bind([r,"speed"],[this,"speed"]))}get absolutePlayer(){return this._absolutePlayer}get ratio(){return this._absolutePlayer.ratio}get ratioChanged(){return this._absolutePlayer.ratioChanged}set ratio(e){this._absolutePlayer.ratio=e}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new $l([this,"playing"],[this,"ratio"],[this,"loop"],"播放器"),new ao([this,"currentTime"],"currentTime"),new ao([this,"startTime"]),new ao([this,"stopTime"]),new tt([this,"playing"]),new tt([this,"loop"]),new R([this,"speed"])]}}};g(Su,"createDefaultProps",()=>({...ft.createDefaultProps(),currentTime:0,startTime:0,stopTime:0,playing:!1,loop:!1,speed:1})),g(Su,"type",Su.register("ESPlayer",Su,{chsName:"ESPlayer",tags:["ESObjects","_ES_Impl_UE"],description:"ESPlayer"}));let ja=Su;function Hm(n,t=!1){const e=n.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),r=e.length;if(r===0)return e;if(r===1)return(!e[0][2]===void 0||t)&&(e[0][2]=void 0),e;for(let i=1;i<r;++i){if(e[i][2]!==void 0&&!t)continue;const s=e[i-1][1],o=e[i][1],a=bi(s),u=bi(o),l=p.Vector.distance(a,u);if(l===0){e[i][2]=e[i-1][2];continue}const c=xl(s,o),h=o[2]-s[2],f=Math.asin(h/l)*180/Math.PI,d=Number.isFinite(c)?c:0,v=Number.isFinite(f)?f:0;e[i][2]=[d,v,0]}return(e[0][2]===void 0||t)&&(e[0][2]=r>1?e[1][2]:void 0),e}function Xm(n,t=!1){const e=n.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),r=e.length;if(r===0)return e;if(r===1)return(!e[0][2]===void 0||t)&&(e[0][2]=void 0),e;for(let i=r-2;i>=0;--i){if(e[i][2]!==void 0&&!t)continue;const s=e[i][1],o=e[i+1][1],a=bi(s),u=bi(o),l=p.Vector.distance(a,u);if(l===0){e[i][2]=e[i+1][2];continue}const c=xl(s,o),h=o[2]-s[2],f=Math.asin(h/l)*180/Math.PI,d=Number.isFinite(c)?c:0,v=Number.isFinite(f)?f:0;e[i][2]=[d,v,0]}return(e[r-1][2]===void 0||t)&&(e[r-1][2]=r>1?e[r-2][2]:[0,0,0]),e}function Q2(n,t=!1){const e=Hm(n,t),r=Xm(n,t);if(e.length!==r.length)throw new Error("p.length !== n.length");const i=e.length;for(let s=0;s<i;s++){const o=e[s][2],a=r[s][2];o===void 0&&a===void 0?e[s][2]=void 0:o===void 0?e[s][2]=a:a===void 0?e[s][2]=o:e[s][2]=Fc(o,a,.5)}return e}function $2(n,t,e){let i;if(!n.timePosRots)return;const s=[],o=n.timePosRots.length;if(!(o<=2)){s.push(n.timePosRots[0]);for(let a=1;a<o-1;++a){const u=n.timePosRots[a-1][0],l=n.timePosRots[a][0],c=n.timePosRots[a+1][0],h=n.accumDistances[a-1],f=n.accumDistances[a],d=n.accumDistances[a+1],v=f-h;if(v!==0){const E=v-(i??(t.length==1?t[0]:t[a-1]||t[t.length-1])*.5);let P=(E<0?0:E)/v;Number.isNaN(P)&&(P=0);const y=(1-P)*u+P*l,w=n.getCurrent(y);w&&s.push([y,w.position,w.rotation])}e&&s.push(n.timePosRots[a]);const _=d-f;if(_!==0){let E=(t.length==1?t[0]:t[a-1]||t[t.length-1])*.5;const P=(t.length==1?t[0]:t[a]||t[t.length-1])*.5||0;E+P>_?(E=_*(E/(E+P)),i=_-E):i=void 0;let y=(E<0?0:E)/_;const w=(1-y)*l+y*c,m=n.getCurrent(w);m&&s.push([w,m.position,m.rotation])}}s.push(n.timePosRots[o-1]),n.timePosRots=s}}function Bm(n,t){if(t<0)return[void 0,0];if(t>n.length-1)return[void 0,n.length-1];const e=[...n].slice(0,t+1).reverse().findIndex(i=>!!(i!=null&&i[2]));if(e===-1)return[void 0,0];const r=t-e;return[n[r][2],r]}function Ym(n,t){if(t<0)return[void 0,0];if(t>=n.length)return[void 0,n.length-1];const e=n.slice(t).findIndex(([,,i])=>i!==void 0),r=e===-1?n.length-1:t+e;return[n[r][2],r]}function K2(n,t,e="Lerp"){let r,i,s,o;if(n.length!==0){if(t<=n[0][0])r=n[0][1],i=n[0][2],s=0,o=0;else if(t>=n[n.length-1][0]){const[u,l,c]=n[n.length-1];r=l,i=c,s=n.length-2,o=1}else{const u=n.findIndex(([l])=>t<=l);if(u===-1)throw new Error("nextIndex === -1");s=u-1;{const[l,c]=n[s],[h,f]=n[u],d=(t-l)/(h-l),v=td(c),_=td(f),E=p.Vector.lerp(v,_,d);r=n0(E),o=d}{let[l,c]=Bm(n,s),[h,f]=Ym(n,u);if(e==="Lerp")if(l&&h){if(c<0||f>=n.length)throw new Error("Invalid rotation index");const d=(t-n[c][0])/(n[f][0]-n[c][0]);i=Fc(l,h,d)}else l?i=l:h?i=h:i=void 0;else e==="Prev"?l&&(i=l):e==="Next"&&h&&(i=h)}}return{position:r,rotation:i,index:s,ratio:o}}}function Z2(n){try{const t=JSON.parse(n);if(Array.isArray(t)&&t.length>0){const e=typeof t[0][0]=="number",r=Array.isArray(t[0][1])&&t[0][1].length===3;return e&&r?t:void 0}throw new Error("解析有问题")}catch{const e=n.split(/\n|\r\n/),r=[],i=e.length;for(let s=0;s<i;++s){const o=e[s],a=o.split(/[^0-9e\.\+\-]+/).filter(u=>u!=="").map(u=>+u);a.length<4?console.warn(`第${s+1}行数据无法解析成路径的数据, 原内容为: ${o}`):a.length<7?r.push([a[0],[a[1],a[2],a[3]],void 0]):r.push([a[0],[a[1],a[2],a[3]],[a[4],a[5],a[6]]])}return r}}function tM(n,t,e){const{timePosRots:r}=n;if(!r)throw new Error("!timePosRots");if(r.length===0)throw new Error("timePosRots.length === 0");t=Math.max(t,r[0][0]),e=Math.min(e,r[r.length-1][0]);const i=n.getCurrent(t),s=n.getCurrent(e);if(!i||!s)return;const o=[];i.ratio<1&&o.push([t,i.position,i.rotation]);for(let a=i.index+1;a<=s.index;++a)o.push(r[a]);return s.ratio>0&&o.push([e,s.position,s.rotation]),o}const eM=`
370
+ `},Jo=class Jo extends ee{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new vt([],"通用"),new ht([this,"url"],"路径"),new ht([this,"poiTypes"],Jo.defaults.poiTypes,Wm.sampleValue),new R([this,"heightOffset"])]}}};g(Jo,"createDefaultProps",()=>({...ee.createDefaultProps(),url:"",poiTypes:p.reactJsonWithUndefined(Wm.defaultValue),heightOffset:40})),g(Jo,"type",Jo.register("ESPoiTileset",Jo,{chsName:"ESPoiTileset",tags:["ESObjects","_ES_Impl_UE"],description:"ESPoiTileset"}));let sg=Jo;const Eu=class Eu extends ft{getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new vt([],"通用","通用"),new tt([this,"show"],"是否显示"),new Tt([this,"screenPosition"],[["left","left"],["right","right"]],"定位","right"),new qe([this,"cssPosition"],"位置")]}}};g(Eu,"createDefaultProps",()=>({...ft.createDefaultProps(),show:!0,screenPosition:"right",cssPosition:[40,30]})),g(Eu,"type",Eu.register("ESScale",Eu,{chsName:"比例尺",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"比例尺"}));let og=Eu;const Ji=class Ji extends oe{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,coordinate:[...t.coordinate,new R([this,"height"],"高度",Ji.defaults.height,!0),new R([this,"extrudedHeight"],"拉伸高度",Ji.defaults.extrudedHeight,!0),new tt([this,"perPositionHeight"],"应用每个位置高度",Ji.defaults.perPositionHeight,!0)]}}};g(Ji,"createDefaultProps",()=>({...oe.createDefaultProps(),height:0,extrudedHeight:10,perPositionHeight:!1,collision:!1})),g(Ji,"type",Ji.register("ESGeoExtrudedPolygon",Ji,{chsName:"拉升多边形体",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"拉升多边形体"})),g(Ji,"supportEditingModes",[...oe.supportEditingModes,ct.HeightModify]);let Lo=Ji;const jo=class jo extends oe{constructor(e){super(e);g(this,"_classification",this.dv(new rc));g(this,"_geoExtrudedPolygon",this.dv(new Lo));this.d(this.components.disposableAdd(this._classification)),this.d(this.components.disposableAdd(this._geoExtrudedPolygon,!0));{const{_classification:r,_geoExtrudedPolygon:i}=this;i.perPositionHeight=!0,this.d(p.track([r,"collision"],[this,"collision"])),this.d(p.track([i,"collision"],[this,"collision"])),this.d(p.bind([i,"flyInParam"],[this,"flyInParam"])),this.d(p.bind([i,"flyToParam"],[this,"flyToParam"])),this.d(p.bind([i,"points"],[this,"points"])),this.d(p.bind([i,"extrudedHeight"],[this,"height"])),this.d(p.bind([r,"fillColor"],[this,"overheightColor"])),this.d(p.bind([i,"fillColor"],[this,"standardColor"]));{const s=()=>{const{height:o,points:a,maxHeight:u}=this;if(!a)return;const l=a.map(c=>[c[0],c[1],o]);r.points=l,r.height=u-o,u-o<=0?r.show=!1:r.show=this.show&&this.filled};s(),this.d(ra([this.heightChanged,this.pointsChanged,this.maxHeightChanged],s))}{const s=()=>{const{show:o,filled:a}=this;r.show=o&&a,i.show=o&&a};s(),this.d(ra([this.showChanged,this.filledChanged],s))}this.d(this.flyInEvent.don(s=>{i.flyIn(s)})),this.d(this.flyToEvent.don(s=>{i.flyTo(s)})),this.d(this.calcFlyToParamEvent.don(()=>{i.calcFlyToParam()})),this.d(this.calcFlyInParamEvent.don(()=>{i.calcFlyInParam()}))}}get classification(){return this._classification}get geoExtrudedPolygon(){return this._geoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new R([this,"height"],"高度",10),new R([this,"maxHeight"],"最高高度",200),new Gt([this,"overheightColor"],"超高颜色",[1,0,0,.5]),new Gt([this,"standardColor"],"标准颜色",[0,1,0,.5])]}}};g(jo,"createDefaultProps",()=>({...oe.createDefaultProps(),height:10,maxHeight:200,overheightColor:[1,0,0,.5],standardColor:[0,1,0,.5]})),g(jo,"type",jo.register("ESHeightLimitAnalysis",jo,{chsName:"控高分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"控高分析对象"})),g(jo,"supportEditingModes",[...oe.supportEditingModes,ct.HeightModify]);let ag=jo;const Si=class Si extends ee{constructor(e){super(e);g(this,"_widgetEvent",this.dv(new H));g(this,"_data",this.dv(p.react(void 0)));{const r=()=>{this.url&&(typeof this.url=="object"?this.data=this.url:qm(this.url)?this.data=JSON.parse(this.url):fetch(ft.context.getStrFromEnv(this.url)).then(i=>i.json()).then(i=>{this.data=i}).catch(i=>{console.warn("ESEntityCluster数据加载失败",i)}))};r(),this.d(this.urlChanged.don(r))}}get widgetEvent(){return this._widgetEvent}get data(){return this._data.value}set data(e){this._data.value=e}get dataChanged(){return this._data.changed}getFeatures(){if(this._data)return this._data;console.log("数据未加载完成,请稍后重试")}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new ht([this,"url"],"地址",Si.defaults.url),new R([this,"pixelRange"],"集合范围",Si.defaults.pixelRange),new R([this,"minimumClusterSize"],"最小数量",Si.defaults.minimumClusterSize),new Tt([this,"heightReference"],[["None","None"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["CLAMP_TO_TERRAIN","CLAMP_TO_TERRAIN"]],"高度模式","None")],more:[...e.more,new ht([this,"style"],"style",Si.defaults.style),new tt([this,"perspective"],"透视效果",Si.defaults.perspective)]}}};g(Si,"createDefaultProps",()=>({...ee.createDefaultProps(),url:"",pixelRange:200,minimumClusterSize:2,style:p.reactJsonWithUndefined({cluster:[{minValue:2,mode:"SquareV02",style:{}}],nonCluster:{mode:"SquareV03",style:{}}}),heightReference:"None",perspective:!1})),g(Si,"type",Si.register("ESEntityCluster",Si,{chsName:"Poi聚合",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于聚合POI标注,提高性能。"}));let ug=Si;class Fl extends st{constructor(){super();g(this,"_player",this.disposeVar(new Zn));const e=this._player;{const r=()=>{const i=(this.stopTime??0)-(this.startTime??0);e.duration=i>0?i:0};r(),this.d(this.startTimeChanged.don(r)),this.d(this.stopTimeChanged.don(r))}this.d(p.bind([e,"playing"],[this,"playing"])),this.d(p.bind([e,"loop"],[this,"loop"])),this.d(p.bind([e,"speed"],[this,"speed"])),this.d(e.currentTimeChanged.don(()=>{this.startTime!==void 0&&e.currentTime!==void 0&&(this.currentTime=e.currentTime+this.startTime)})),this.d(this.currentTimeChanged.don(()=>{if(this.currentTime===void 0||this.startTime===void 0)return;const r=this.currentTime-this.startTime;e.currentTime=p.clamp(r,0,e.duration)}))}get player(){return this._player}get ratio(){return this._player.ratio}get ratioChanged(){return this._player.ratioChanged}set ratio(e){this._player.ratio=e}}(n=>{n.createDefaultProps=()=>({...ft.createDefaultProps(),currentTime:void 0,startTime:void 0,stopTime:void 0,playing:void 0,loop:void 0,speed:void 0})})(Fl||(Fl={})),p.extendClassProps(Fl.prototype,Fl.createDefaultProps);const Su=class Su extends ft{constructor(e){super(e);g(this,"_absolutePlayer",this.dv(new Fl));const r=this.absolutePlayer;this.d(p.bind([r,"currentTime"],[this,"currentTime"])),this.d(p.bind([r,"startTime"],[this,"startTime"])),this.d(p.bind([r,"stopTime"],[this,"stopTime"])),this.d(p.bind([r,"playing"],[this,"playing"])),this.d(p.bind([r,"loop"],[this,"loop"])),this.d(p.bind([r,"speed"],[this,"speed"]))}get absolutePlayer(){return this._absolutePlayer}get ratio(){return this._absolutePlayer.ratio}get ratioChanged(){return this._absolutePlayer.ratioChanged}set ratio(e){this._absolutePlayer.ratio=e}getESProperties(){const e={...super.getESProperties()};return{...e,more:[...e.more,new $l([this,"playing"],[this,"ratio"],[this,"loop"],"播放器"),new ao([this,"currentTime"],"currentTime"),new ao([this,"startTime"]),new ao([this,"stopTime"]),new tt([this,"playing"]),new tt([this,"loop"]),new R([this,"speed"])]}}};g(Su,"createDefaultProps",()=>({...ft.createDefaultProps(),currentTime:0,startTime:0,stopTime:0,playing:!1,loop:!1,speed:1})),g(Su,"type",Su.register("ESPlayer",Su,{chsName:"ESPlayer",tags:["ESObjects","_ES_Impl_UE"],description:"ESPlayer"}));let ja=Su;function Hm(n,t=!1){const e=n.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),r=e.length;if(r===0)return e;if(r===1)return(!e[0][2]===void 0||t)&&(e[0][2]=void 0),e;for(let i=1;i<r;++i){if(e[i][2]!==void 0&&!t)continue;const s=e[i-1][1],o=e[i][1],a=bi(s),u=bi(o),l=p.Vector.distance(a,u);if(l===0){e[i][2]=e[i-1][2];continue}const c=xl(s,o),h=o[2]-s[2],f=Math.asin(h/l)*180/Math.PI,d=Number.isFinite(c)?c:0,v=Number.isFinite(f)?f:0;e[i][2]=[d,v,0]}return(e[0][2]===void 0||t)&&(e[0][2]=r>1?e[1][2]:void 0),e}function Xm(n,t=!1){const e=n.map(i=>[i[0],[...i[1]],i[2]?[...i[2]]:void 0]),r=e.length;if(r===0)return e;if(r===1)return(!e[0][2]===void 0||t)&&(e[0][2]=void 0),e;for(let i=r-2;i>=0;--i){if(e[i][2]!==void 0&&!t)continue;const s=e[i][1],o=e[i+1][1],a=bi(s),u=bi(o),l=p.Vector.distance(a,u);if(l===0){e[i][2]=e[i+1][2];continue}const c=xl(s,o),h=o[2]-s[2],f=Math.asin(h/l)*180/Math.PI,d=Number.isFinite(c)?c:0,v=Number.isFinite(f)?f:0;e[i][2]=[d,v,0]}return(e[r-1][2]===void 0||t)&&(e[r-1][2]=r>1?e[r-2][2]:[0,0,0]),e}function Q2(n,t=!1){const e=Hm(n,t),r=Xm(n,t);if(e.length!==r.length)throw new Error("p.length !== n.length");const i=e.length;for(let s=0;s<i;s++){const o=e[s][2],a=r[s][2];o===void 0&&a===void 0?e[s][2]=void 0:o===void 0?e[s][2]=a:a===void 0?e[s][2]=o:e[s][2]=Fc(o,a,.5)}return e}function $2(n,t,e){let i;if(!n.timePosRots)return;const s=[],o=n.timePosRots.length;if(!(o<=2)){s.push(n.timePosRots[0]);for(let a=1;a<o-1;++a){const u=n.timePosRots[a-1][0],l=n.timePosRots[a][0],c=n.timePosRots[a+1][0],h=n.accumDistances[a-1],f=n.accumDistances[a],d=n.accumDistances[a+1],v=f-h;if(v!==0){const E=v-(i??(t.length==1?t[0]:t[a-1]||t[t.length-1])*.5);let P=(E<0?0:E)/v;Number.isNaN(P)&&(P=0);const y=(1-P)*u+P*l,w=n.getCurrent(y);w&&s.push([y,w.position,w.rotation])}e&&s.push(n.timePosRots[a]);const _=d-f;if(_!==0){let E=(t.length==1?t[0]:t[a-1]||t[t.length-1])*.5;const P=(t.length==1?t[0]:t[a]||t[t.length-1])*.5||0;E+P>_?(E=_*(E/(E+P)),i=_-E):i=void 0;let y=(E<0?0:E)/_;Number.isNaN(y)&&(y=0);const w=(1-y)*l+y*c,m=n.getCurrent(w);m&&s.push([w,m.position,m.rotation])}}s.push(n.timePosRots[o-1]),n.timePosRots=s}}function Bm(n,t){if(t<0)return[void 0,0];if(t>n.length-1)return[void 0,n.length-1];const e=[...n].slice(0,t+1).reverse().findIndex(i=>!!(i!=null&&i[2]));if(e===-1)return[void 0,0];const r=t-e;return[n[r][2],r]}function Ym(n,t){if(t<0)return[void 0,0];if(t>=n.length)return[void 0,n.length-1];const e=n.slice(t).findIndex(([,,i])=>i!==void 0),r=e===-1?n.length-1:t+e;return[n[r][2],r]}function K2(n,t,e="Lerp"){let r,i,s,o;if(n.length!==0){if(t<=n[0][0])r=n[0][1],i=n[0][2],s=0,o=0;else if(t>=n[n.length-1][0]){const[u,l,c]=n[n.length-1];r=l,i=c,s=n.length-2,o=1}else{const u=n.findIndex(([l])=>t<=l);if(u===-1)throw new Error("nextIndex === -1");s=u-1;{const[l,c]=n[s],[h,f]=n[u],d=(t-l)/(h-l),v=td(c),_=td(f),E=p.Vector.lerp(v,_,d);r=n0(E),o=d}{let[l,c]=Bm(n,s),[h,f]=Ym(n,u);if(e==="Lerp")if(l&&h){if(c<0||f>=n.length)throw new Error("Invalid rotation index");const d=(t-n[c][0])/(n[f][0]-n[c][0]);i=Fc(l,h,d)}else l?i=l:h?i=h:i=void 0;else e==="Prev"?l&&(i=l):e==="Next"&&h&&(i=h)}}return{position:r,rotation:i,index:s,ratio:o}}}function Z2(n){try{const t=JSON.parse(n);if(Array.isArray(t)&&t.length>0){const e=typeof t[0][0]=="number",r=Array.isArray(t[0][1])&&t[0][1].length===3;return e&&r?t:void 0}throw new Error("解析有问题")}catch{const e=n.split(/\n|\r\n/),r=[],i=e.length;for(let s=0;s<i;++s){const o=e[s],a=o.split(/[^0-9e\.\+\-]+/).filter(u=>u!=="").map(u=>+u);a.length<4?console.warn(`第${s+1}行数据无法解析成路径的数据, 原内容为: ${o}`):a.length<7?r.push([a[0],[a[1],a[2],a[3]],void 0]):r.push([a[0],[a[1],a[2],a[3]],[a[4],a[5],a[6]]])}return r}}function tM(n,t,e){const{timePosRots:r}=n;if(!r)throw new Error("!timePosRots");if(r.length===0)throw new Error("timePosRots.length === 0");t=Math.max(t,r[0][0]),e=Math.min(e,r[r.length-1][0]);const i=n.getCurrent(t),s=n.getCurrent(e);if(!i||!s)return;const o=[];i.ratio<1&&o.push([t,i.position,i.rotation]);for(let a=i.index+1;a<=s.index;++a)o.push(r[a]);return s.ratio>0&&o.push([e,s.position,s.rotation]),o}const eM=`
371
371
  timePosRots是一个内部包含三个元素的数组,第一个表示时间戳,单位毫秒,第二个表示经纬度,第三个表示姿态(偏航、俯仰、翻转)。示例代码如下:
372
372
  \`\`\`
373
373
  [
@@ -412,7 +412,7 @@ timePosRots是一个内部包含三个元素的数组,第一个表示时间戳
412
412
  ]
413
413
  ]
414
414
  \`\`\`
415
- `,zr=class zr extends st{constructor(e,r){super();g(this,"_scratchCurrentInfo",{position:[0,0,0],rotation:[0,0,0],index:0});g(this,"_currentInfo",this.disposeVar(p.react(void 0,(e,r)=>!1)));g(this,"_player");g(this,"_flyToEvent",this.disposeVar(new H));g(this,"_accumDistancesChanged",this.disposeVar(new H));g(this,"_accumDistancesChangedInit",this.dispose(this.timePosRotsChanged.disposableOn(()=>(this._accumDistancesDirty=!0,this._accumDistancesChanged.emit()))));g(this,"_accumDistancesDirty",!1);g(this,"_accumDistances",[]);g(this,"_getCurrentFunc",this.disposeVar(p.react(void 0)));this._player=this.disposeVar(new Zn);const i=()=>{const s=this.getCurrent(this.currentTime??0);if(s===void 0)this._currentInfo.value=void 0;else{const{index:o,position:a,rotation:u,ratio:l}=s;this._scratchCurrentInfo.index=o,this._scratchCurrentInfo.position=a,this._scratchCurrentInfo.rotation=u,this._scratchCurrentInfo.ratio=l,this._currentInfo.value=this._scratchCurrentInfo}};i(),this.currentTimeChanged.disposableOn(i),this.timePosRotsChanged.disposableOn(i),this.rotLerpModeChanged.disposableOn(i),this.dispose(p.bind([this._player,"loop"],[this,"loop"]));{const s=()=>{if(this.startTime===void 0||this.currentTime===void 0)return;const o=this.currentTime-this.startTime;(this._player.currentTime===void 0||Math.abs(o-this._player.currentTime)>.01)&&(this._player.currentTime=o)};s(),this.dispose(this.currentTimeChanged.disposableOn(s))}{const s=()=>{if(this.startTime===void 0||this._player.currentTime===void 0)return;const o=this._player.currentTime+this.startTime;(this.currentTime===void 0||Math.abs(o-this.currentTime)>.01)&&(this.currentTime=o)};s(),this.dispose(this._player.currentTimeChanged.disposableOn(s))}this.dispose(p.bind([this._player,"duration"],[this,"duration"])),this.dispose(p.bind([this._player,"playing"],[this,"playing"])),this.dispose(p.bind([this._player,"speed"],[this,"speed"]));{const s=()=>{(this.autoComputeTimeFromTimePosRots??!0)&&this.computeTimeFromTimePosRots()};s();const o=this.disposeVar(p.createNextAnimateFrameEvent(this.autoComputeTimeFromTimePosRotsChanged,this.timePosRotsChanged));this.dispose(o.disposableOn(s))}{const s=()=>{const o=this.timePosRots;if(!o)return;let a=0;const u=o.length;for(let l=0;l<u;++l){const c=o[l][0];if(c<0)console.warn("地理路径的时间戳不能小于0!");else if(c<a){console.warn(`地理路径的时间戳需要满足从小到大的数据,元素越靠后,时间越靠后!当前不满足条件的元素是index: ${l} time: ${c}`);break}}};s(),this.dispose(this.timePosRotsChanged.disposableOn(s))}{const s=this.disposeVar(p.createProcessingFromAsyncFunc(async o=>{if(!this.dataUri)return;await o.promise(p.sleep(1e3));const a=await o.promise(fetch(this.dataUri)),u=await o.promise(a.text());this.timePosRots=zr.parseData(u)}));this.dispose(this.dataUriChanged.disposableOn(()=>{s.restart()})),this.dispose(this.dataTextChanged.disposableOn(()=>{this.dataText&&(this.timePosRots=zr.parseData(this.dataText))}))}}get currentInfo(){return this._currentInfo.value}get currentInfoChanged(){return this._currentInfo.changed}get currentIndex(){return this._currentInfo.value&&this._currentInfo.value.index}get currentIndexChanged(){return this._currentInfo.changed}get currentPosition(){return this._currentInfo.value&&this._currentInfo.value.position}get currentPositionChanged(){return this._currentInfo.changed}get currentRotation(){return this._currentInfo.value&&this._currentInfo.value.rotation}get currentRotationChanged(){return this._currentInfo.changed}get player(){return this._player}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get accumDistancesChanged(){return this._accumDistancesChanged}get accumDistances(){if(this._accumDistancesDirty)return this._accumDistances;if(!this.timePosRots||this.timePosRots.length<2)return this._accumDistances=[],this._accumDistances;{const e=this.timePosRots.length;let r=0;const i=[];let s=bi(this.timePosRots[0][1]);i.push(r);for(let o=1;o<e;++o){const a=bi(this.timePosRots[o][1]),u=p.Vector.distance(a,s);s=a,r+=u,i.push(r)}this._accumDistances=i}return this._accumDistances}get totalDistanceChanged(){return this._accumDistancesChanged}get totalDistance(){return this.accumDistances.length>0?this.accumDistances[this.accumDistances.length-1]:0}getCurrent(e){return this.getCurrentFunc?this.getCurrentFunc(e,this):this.timePosRots&&K2(this.timePosRots,e,this.rotLerpMode)}subPath(e,r){return this.timePosRots&&tM(this,e,r)}computeRotIfUndefinedUsingPrevLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=zr.computeRotIfUndefinedUsingPrevLine(this.timePosRots,e)}computeRotIfUndefinedUsingNextLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=zr.computeRotIfUndefinedUsingNextLine(this.timePosRots,e)}computeRotIfUndefinedUsingLerp(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=zr.computeRotIfUndefinedUsingLerp(this.timePosRots,e)}computeRotIfUndefined(e=!1){this.computeRotIfUndefinedUsingPrevLine(e)}addAroundPoints(e,r){$2(this,e,r)}get getCurrentFunc(){return this._getCurrentFunc.value}set getCurrentFunc(e){this._getCurrentFunc.value=e}get getCurrentFuncChanged(){return this._getCurrentFunc.changed}computeTimeFromTimePosRots(){const e=this.timePosRots;if(!e||e.length<=1){this.startTime=void 0,this.stopTime=void 0,this.duration=void 0;return}this.startTime=e[0][0],this.stopTime=e[e.length-1][0],this.duration=this.stopTime-this.startTime}get ratio(){return this.player.ratio}set ratio(e){this.player.ratio=e}get ratioChanged(){return this.player.ratioChanged}};g(zr,"computeRotIfUndefinedUsingPrevLine",Hm),g(zr,"computeRotIfUndefinedUsingNextLine",Xm),g(zr,"computeRotIfUndefinedUsingLerp",Q2),g(zr,"getLeftRotation",Bm),g(zr,"getRightRotation",Ym),g(zr,"parseData",Z2),g(zr,"defaults",{timePosRots:[],startTime:0,stopTime:3e3,loop:!1,duration:3e3,playing:!1,dataText:""}),g(zr,"timePosRotsMd",eM);let js=zr;(n=>{n.createDefaultProps=()=>({show:!1,currentPoiShow:!0,timePosRots:p.reactDeepArrayWithUndefined(void 0,(t,e)=>t[0]===e[0]&&t[1].every((r,i)=>r===e[1][i])&&t[2]===e[2]===void 0||t[2]!==void 0&&e[2]!==void 0&&t[2].every((r,i)=>e[2][i]),t=>[t[0],[...t[1]],t[2]&&[...t[2]]||void 0]),autoComputeTimeFromTimePosRots:!0,leadTime:0,trailTime:0,startTime:void 0,stopTime:void 0,loop:!1,currentTime:0,duration:void 0,speed:1,playing:!1,polylineShow:!0,width:1,ground:!1,color:p.reactArray([1,1,1,1]),hasDash:!1,gapColor:p.reactArray([0,0,0,0]),dashLength:16,dashPattern:255,hasArrow:!1,depthTest:!1,arcType:"GEODESIC",allowPicking:!1,dataUri:"",dataText:void 0,rotLerpMode:"Lerp",debug:!1})})(js||(js={})),p.extendClassProps(js.prototype,js.createDefaultProps);const Cu=class Cu extends ps{constructor(e){super(e);g(this,"_path");g(this,"_currentPositionChanged",this.disposeVar(new H));g(this,"_currentRotationChanged",this.disposeVar(new H));g(this,"_currentChanged",this.disposeVar(new H));g(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);g(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());this.strokeStyle={width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{},ground:!1},this._path=this.disposeVar(new js),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentPositionChanged.emit(this._path.currentPosition))),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentRotationChanged.emit(this.currentRotation))),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentChanged.emit(this.current))),this._path.show=!0,this._path.polylineShow=!1,this._path.currentPoiShow=!1;{const r=()=>{if(!this.timeStamps||!this.points){this._path.timePosRots=void 0;return}const s=this.timeStamps.length,o=this.points.length,a=Math.min(s,o),u=[];for(let l=0;l<a;++l)u.push([this.timeStamps[l],this.points[l]]);this._path.timePosRots=u,this.rotationRadius.some(l=>l>0)?(this._path.addAroundPoints(this.rotationRadius,!0),this._path.computeRotIfUndefinedUsingLerp(!0),this._path.rotLerpMode="Lerp"):(this._path.computeRotIfUndefinedUsingPrevLine(!0),this._path.rotLerpMode="Next")},i=this.disposeVar(p.createNextAnimateFrameEvent(this.timeStampsChanged,this.pointsChanged,this.rotationRadiusChanged));r(),this.dispose(i.disposableOn(r))}}get path(){return this._path}get currentPosition(){return this._path.currentPosition}get currentPositionChanged(){return this._currentPositionChanged}get currentRotation(){const e=this._path.currentRotation;if(e)return[ia(e[0]-90),e[1],e[2]]}get currentRotationChanged(){return this._currentRotationChanged}get current(){return{position:this.currentPosition,rotation:this.currentRotation}}get currentChanged(){return this._currentChanged}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Zg([this,"timeStamps"],"时间序列",[],!0),new R([this,"speed"],"线条流速",1),new Tt([this,"materialMode"],[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","pureColor"]],"模式","singleArrow"),new ht([this,"rotationRadius"],"拐弯半径")],more:[...e.more,new gr([this,"currentPosition"],"当前位置",void 0,!0,!0)]}}};g(Cu,"createDefaultProps",()=>({...Rt.createDefaultProps(),timeStamps:p.reactArrayWithUndefined(void 0),speed:1,materialMode:"singleArrow",stroked:!0,strokeStyle:p.reactJson({width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{},ground:!1}),rotationRadius:[5]})),g(Cu,"type",Cu.register("ESPath",Cu,{chsName:"ESPath",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPath"}));let Qa=Cu;const no=class no extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new vt([]),new tt([this,"textEditingInteraction"],"文本编辑交互"),new tt([this,"textEditing"],"文本编辑"),new R([this,"width"],"宽度",no.defaults.width,!0),new Lc([this,"text"],"内容",no.defaults.text,void 0,!0),new Kn([this,"originRatioAndOffset"],"原点比例和偏移"),new R([this,"opacity"],"透明度"),new R([this,"fontSize"],"字体大小"),new Gt([this,"color"],"字体颜色"),new Gt([this,"backgroundColor"],"背景颜色"),new Kn([this,"padding"],"内边距"),new Kn([this,"borderRadius"],"边框圆角"),new Gt([this,"borderColor"],"边框颜色"),new R([this,"borderWidth"],"边框宽度"),new Tt([this,"textAlign"],[["center","center"],["left","left"],["right","right"]],"文字位置"),new Tt([this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]],"边框类型")]}}};g(no,"createDefaultProps",()=>({...dt.createDefaultProps(),text:"请输入文字",width:80,textEditingInteraction:!1,textEditing:!1,originRatioAndOffset:p.reactArray([.5,1,0,0]),opacity:1,fontSize:14,textAlign:"left",color:p.reactArray([1,1,1,1]),backgroundColor:p.reactArray([0,0,0,.8]),padding:p.reactArray([5,5,5,5]),borderRadius:p.reactArray([6,6,6,6]),borderWidth:0,borderColor:p.reactArray([1,1,1,1]),borderStyle:"solid"})),g(no,"type",no.register("ESGeoDivTextPoi",no,{chsName:"图标点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"图标点"}));let lg=no;const Pu=class Pu extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Gt([this,"color"],"颜色",[1,1,0,1])]}}};g(Pu,"createDefaultProps",()=>({...dt.createDefaultProps(),color:p.reactArray([1,1,0,1])})),g(Pu,"type",Pu.register("ESCityBasePoint",Pu,{chsName:"城市基点(Czm)",tags:["ESObjects","CityObjects","_ES_Impl_Cesium"],description:"城市基点(Czm)"}));let hg=Pu;const rM=[{id:"document",version:"1.0"},{id:"Vehicle",availability:"2012-08-04T16:00:00Z/2012-08-04T16:14:15.251Z",billboard:{eyeOffset:{cartesian:[0,0,0]},horizontalOrigin:"CENTER",image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEISURBVEhLvVXBDYQwDOuojHKj8LhBbpTbpBCEkZsmIVTXq1RVQGrHiWlLmTTqPiZBlyLgy/KSZQ5JSHDQ/mCYCsC8106kDU0AdwRnvYZArWRcAl0dcYJq1hWCb3hBrumbDAVMwAC82WoRvgMnVMDBnB0nYZFTbE6BBvdUGqVqCbjBIk3PyFFR/NU7EKzru+qZsau3ryPwwCRLKYOzutZuCL6fUmWeJGzNzL/RxAMrUmASSCkkAayk2IxPlwhAAYGpsiHQjbLccfdOY5gKkCXAMi7SscAwbQpAnKyctWyUZ6z8ja3OGMepwD8asz+9FnSvbhU8uVOHFIwQsI3/p0CfhuqCSQuxLqsN6mu8SS+N42MAAAAASUVORK5CYII=",pixelOffset:{cartesian2:[0,0]},scale:.8333333333333334,show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}],verticalOrigin:"BOTTOM"},label:{fillColor:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",rgba:[255,255,0,255]}],font:"bold 10pt Segoe UI Semibold",horizontalOrigin:"LEFT",outlineColor:{rgba:[0,0,0,255]},pixelOffset:{cartesian2:[10,0]},scale:1,show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}],style:"FILL",text:"Vehicle",verticalOrigin:"CENTER"},path:{material:{solidColor:{color:{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",rgba:[255,255,0,255]}}},width:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",number:5}],show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}]},position:{interpolationAlgorithm:"LAGRANGE",interpolationDegree:1,epoch:"2012-08-04T16:00:00Z",cartesian:[0,-23797546637012e-7,-466533288013588e-8,362813368924173e-8,100,-237951008905552e-8,-466541964840452e-8,362818220006795e-8,200,-23795684769522e-7,-46655553441867e-7,362797083323261e-8,300,-237963893786855e-8,-466569163561896e-8,362775082085873e-8,400,-237970929834665e-8,-46658279679646e-7,362753080187124e-8,500,-237983728064915e-8,-46658477494347e-7,362742212874017e-8,600,-237962498289073e-8,-466590750853722e-8,36274841191848e-7,700,-237938612743523e-8,-466602954174431e-8,362748383297459e-8,800,-237914726777171e-8,-466615156669944e-8,36274835403492e-7,900,-237890840390057e-8,-466627358340244e-8,362748324130864e-8,1e3]}}],nM=`第一个packet代表了cesium场景(cesium时间轴的范围,当前时刻,倍速等信息)之外,其他的packet都可以理解为描述某一时间范围内的entity的行为。
415
+ `,zr=class zr extends st{constructor(e,r){super();g(this,"_scratchCurrentInfo",{position:[0,0,0],rotation:[0,0,0],index:0});g(this,"_currentInfo",this.disposeVar(p.react(void 0,(e,r)=>!1)));g(this,"_player");g(this,"_flyToEvent",this.disposeVar(new H));g(this,"_accumDistancesChanged",this.disposeVar(new H));g(this,"_accumDistancesChangedInit",this.dispose(this.timePosRotsChanged.disposableOn(()=>(this._accumDistancesDirty=!0,this._accumDistancesChanged.emit()))));g(this,"_accumDistancesDirty",!1);g(this,"_accumDistances",[]);g(this,"_getCurrentFunc",this.disposeVar(p.react(void 0)));this._player=this.disposeVar(new Zn);const i=()=>{const s=this.getCurrent(this.currentTime??0);if(s===void 0)this._currentInfo.value=void 0;else{const{index:o,position:a,rotation:u,ratio:l}=s;this._scratchCurrentInfo.index=o,this._scratchCurrentInfo.position=a,this._scratchCurrentInfo.rotation=u,this._scratchCurrentInfo.ratio=l,this._currentInfo.value=this._scratchCurrentInfo}};i(),this.currentTimeChanged.disposableOn(i),this.timePosRotsChanged.disposableOn(i),this.rotLerpModeChanged.disposableOn(i),this.dispose(p.bind([this._player,"loop"],[this,"loop"]));{const s=()=>{if(this.startTime===void 0||this.currentTime===void 0)return;const o=this.currentTime-this.startTime;(this._player.currentTime===void 0||Math.abs(o-this._player.currentTime)>.01)&&(this._player.currentTime=o)};s(),this.dispose(this.currentTimeChanged.disposableOn(s))}{const s=()=>{if(this.startTime===void 0||this._player.currentTime===void 0)return;const o=this._player.currentTime+this.startTime;(this.currentTime===void 0||Math.abs(o-this.currentTime)>.01)&&(this.currentTime=o)};s(),this.dispose(this._player.currentTimeChanged.disposableOn(s))}this.dispose(p.bind([this._player,"duration"],[this,"duration"])),this.dispose(p.bind([this._player,"playing"],[this,"playing"])),this.dispose(p.bind([this._player,"speed"],[this,"speed"]));{const s=()=>{(this.autoComputeTimeFromTimePosRots??!0)&&this.computeTimeFromTimePosRots()};s();const o=this.disposeVar(p.createNextAnimateFrameEvent(this.autoComputeTimeFromTimePosRotsChanged,this.timePosRotsChanged));this.dispose(o.disposableOn(s))}{const s=()=>{const o=this.timePosRots;if(!o)return;let a=0;const u=o.length;for(let l=0;l<u;++l){const c=o[l][0];if(c<0)console.warn("地理路径的时间戳不能小于0!");else if(c<a){console.warn(`地理路径的时间戳需要满足从小到大的数据,元素越靠后,时间越靠后!当前不满足条件的元素是index: ${l} time: ${c}`);break}}};s(),this.dispose(this.timePosRotsChanged.disposableOn(s))}{const s=this.disposeVar(p.createProcessingFromAsyncFunc(async o=>{if(!this.dataUri)return;await o.promise(p.sleep(1e3));const a=await o.promise(fetch(this.dataUri)),u=await o.promise(a.text());this.timePosRots=zr.parseData(u)}));this.dispose(this.dataUriChanged.disposableOn(()=>{s.restart()})),this.dispose(this.dataTextChanged.disposableOn(()=>{this.dataText&&(this.timePosRots=zr.parseData(this.dataText))}))}}get currentInfo(){return this._currentInfo.value}get currentInfoChanged(){return this._currentInfo.changed}get currentIndex(){return this._currentInfo.value&&this._currentInfo.value.index}get currentIndexChanged(){return this._currentInfo.changed}get currentPosition(){return this._currentInfo.value&&this._currentInfo.value.position}get currentPositionChanged(){return this._currentInfo.changed}get currentRotation(){return this._currentInfo.value&&this._currentInfo.value.rotation}get currentRotationChanged(){return this._currentInfo.changed}get player(){return this._player}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get accumDistancesChanged(){return this._accumDistancesChanged}get accumDistances(){if(!this._accumDistancesDirty)return this._accumDistances;if(!this.timePosRots||this.timePosRots.length<2)this._accumDistances=[];else{const e=this.timePosRots.length;let r=0;const i=[];let s=bi(this.timePosRots[0][1]);i.push(r);for(let o=1;o<e;++o){const a=bi(this.timePosRots[o][1]),u=p.Vector.distance(a,s);s=a,r+=u,i.push(r)}this._accumDistances=i}return this._accumDistances}get totalDistanceChanged(){return this._accumDistancesChanged}get totalDistance(){return this.accumDistances.length>0?this.accumDistances[this.accumDistances.length-1]:0}getCurrent(e){return this.getCurrentFunc?this.getCurrentFunc(e,this):this.timePosRots&&K2(this.timePosRots,e,this.rotLerpMode)}subPath(e,r){return this.timePosRots&&tM(this,e,r)}computeRotIfUndefinedUsingPrevLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=zr.computeRotIfUndefinedUsingPrevLine(this.timePosRots,e)}computeRotIfUndefinedUsingNextLine(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=zr.computeRotIfUndefinedUsingNextLine(this.timePosRots,e)}computeRotIfUndefinedUsingLerp(e=!1){if(!this.timePosRots){console.warn("timePosRots不存在,无法计算!");return}this.timePosRots=zr.computeRotIfUndefinedUsingLerp(this.timePosRots,e)}computeRotIfUndefined(e=!1){this.computeRotIfUndefinedUsingPrevLine(e)}addAroundPoints(e,r){$2(this,e,r)}get getCurrentFunc(){return this._getCurrentFunc.value}set getCurrentFunc(e){this._getCurrentFunc.value=e}get getCurrentFuncChanged(){return this._getCurrentFunc.changed}computeTimeFromTimePosRots(){const e=this.timePosRots;if(!e||e.length<=1){this.startTime=void 0,this.stopTime=void 0,this.duration=void 0;return}this.startTime=e[0][0],this.stopTime=e[e.length-1][0],this.duration=this.stopTime-this.startTime}get ratio(){return this.player.ratio}set ratio(e){this.player.ratio=e}get ratioChanged(){return this.player.ratioChanged}};g(zr,"computeRotIfUndefinedUsingPrevLine",Hm),g(zr,"computeRotIfUndefinedUsingNextLine",Xm),g(zr,"computeRotIfUndefinedUsingLerp",Q2),g(zr,"getLeftRotation",Bm),g(zr,"getRightRotation",Ym),g(zr,"parseData",Z2),g(zr,"defaults",{timePosRots:[],startTime:0,stopTime:3e3,loop:!1,duration:3e3,playing:!1,dataText:""}),g(zr,"timePosRotsMd",eM);let js=zr;(n=>{n.createDefaultProps=()=>({show:!1,currentPoiShow:!0,timePosRots:p.reactDeepArrayWithUndefined(void 0,(t,e)=>t[0]===e[0]&&t[1].every((r,i)=>r===e[1][i])&&t[2]===e[2]===void 0||t[2]!==void 0&&e[2]!==void 0&&t[2].every((r,i)=>e[2][i]),t=>[t[0],[...t[1]],t[2]&&[...t[2]]||void 0]),autoComputeTimeFromTimePosRots:!0,leadTime:0,trailTime:0,startTime:void 0,stopTime:void 0,loop:!1,currentTime:0,duration:void 0,speed:1,playing:!1,polylineShow:!0,width:1,ground:!1,color:p.reactArray([1,1,1,1]),hasDash:!1,gapColor:p.reactArray([0,0,0,0]),dashLength:16,dashPattern:255,hasArrow:!1,depthTest:!1,arcType:"GEODESIC",allowPicking:!1,dataUri:"",dataText:void 0,rotLerpMode:"Lerp",debug:!1})})(js||(js={})),p.extendClassProps(js.prototype,js.createDefaultProps);const Cu=class Cu extends ps{constructor(e){super(e);g(this,"_path");g(this,"_currentPositionChanged",this.disposeVar(new H));g(this,"_currentRotationChanged",this.disposeVar(new H));g(this,"_currentChanged",this.disposeVar(new H));g(this,"_deprecated",[{materialMode:{blue:"multipleArrows",purple:"singleArrow"}},"show"]);g(this,"_deprecatedWarningFunc",(()=>{this._deprecatedWarning()})());this.strokeStyle={width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{},ground:!1},this._path=this.disposeVar(new js),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentPositionChanged.emit(this._path.currentPosition))),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentRotationChanged.emit(this.currentRotation))),this.dispose(this._path.currentInfoChanged.disposableOn(()=>this._currentChanged.emit(this.current))),this._path.show=!0,this._path.polylineShow=!1,this._path.currentPoiShow=!1;{const r=()=>{if(!this.timeStamps||!this.points){this._path.timePosRots=void 0;return}const s=this.timeStamps.length,o=this.points.length,a=Math.min(s,o),u=[];for(let l=0;l<a;++l)u.push([this.timeStamps[l],this.points[l]]);this._path.timePosRots=u,this.rotationRadius.some(l=>l>0)?(this._path.addAroundPoints(this.rotationRadius,!0),this._path.computeRotIfUndefinedUsingLerp(!0),this._path.rotLerpMode="Lerp"):(this._path.computeRotIfUndefinedUsingPrevLine(!0),this._path.rotLerpMode="Next")},i=this.disposeVar(p.createNextAnimateFrameEvent(this.timeStampsChanged,this.pointsChanged,this.rotationRadiusChanged));r(),this.dispose(i.disposableOn(r))}}get path(){return this._path}get currentPosition(){return this._path.currentPosition}get currentPositionChanged(){return this._currentPositionChanged}get currentRotation(){const e=this._path.currentRotation;if(e)return[ia(e[0]-90),e[1],e[2]]}get currentRotationChanged(){return this._currentRotationChanged}get current(){return{position:this.currentPosition,rotation:this.currentRotation}}get currentChanged(){return this._currentChanged}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new Zg([this,"timeStamps"],"时间序列",[],!0),new R([this,"speed"],"线条流速",1),new Tt([this,"materialMode"],[["单箭头","singleArrow"],["多箭头","multipleArrows"],["纯色","pureColor"]],"模式","singleArrow"),new ht([this,"rotationRadius"],"拐弯半径")],more:[...e.more,new gr([this,"currentPosition"],"当前位置",void 0,!0,!0)]}}};g(Cu,"createDefaultProps",()=>({...Rt.createDefaultProps(),timeStamps:p.reactArrayWithUndefined(void 0),speed:1,materialMode:"singleArrow",stroked:!0,strokeStyle:p.reactJson({width:10,widthType:"world",color:[1,0,.73,1],material:"",materialParams:{},ground:!1}),rotationRadius:[5]})),g(Cu,"type",Cu.register("ESPath",Cu,{chsName:"ESPath",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"ESPath"}));let Qa=Cu;const no=class no extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,more:[...t.more,new vt([]),new tt([this,"textEditingInteraction"],"文本编辑交互"),new tt([this,"textEditing"],"文本编辑"),new R([this,"width"],"宽度",no.defaults.width,!0),new Lc([this,"text"],"内容",no.defaults.text,void 0,!0),new Kn([this,"originRatioAndOffset"],"原点比例和偏移"),new R([this,"opacity"],"透明度"),new R([this,"fontSize"],"字体大小"),new Gt([this,"color"],"字体颜色"),new Gt([this,"backgroundColor"],"背景颜色"),new Kn([this,"padding"],"内边距"),new Kn([this,"borderRadius"],"边框圆角"),new Gt([this,"borderColor"],"边框颜色"),new R([this,"borderWidth"],"边框宽度"),new Tt([this,"textAlign"],[["center","center"],["left","left"],["right","right"]],"文字位置"),new Tt([this,"borderStyle"],[["none","none"],["hidden","hidden"],["dotted","dotted"],["dashed","dashed"],["solid","solid"],["double","double"],["groove","groove"],["ridge","ridge"],["inset","inset"],["outset","outset"]],"边框类型")]}}};g(no,"createDefaultProps",()=>({...dt.createDefaultProps(),text:"请输入文字",width:80,textEditingInteraction:!1,textEditing:!1,originRatioAndOffset:p.reactArray([.5,1,0,0]),opacity:1,fontSize:14,textAlign:"left",color:p.reactArray([1,1,1,1]),backgroundColor:p.reactArray([0,0,0,.8]),padding:p.reactArray([5,5,5,5]),borderRadius:p.reactArray([6,6,6,6]),borderWidth:0,borderColor:p.reactArray([1,1,1,1]),borderStyle:"solid"})),g(no,"type",no.register("ESGeoDivTextPoi",no,{chsName:"图标点",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"图标点"}));let lg=no;const Pu=class Pu extends dt{constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new Gt([this,"color"],"颜色",[1,1,0,1])]}}};g(Pu,"createDefaultProps",()=>({...dt.createDefaultProps(),color:p.reactArray([1,1,0,1])})),g(Pu,"type",Pu.register("ESCityBasePoint",Pu,{chsName:"城市基点(Czm)",tags:["ESObjects","CityObjects","_ES_Impl_Cesium"],description:"城市基点(Czm)"}));let hg=Pu;const rM=[{id:"document",version:"1.0"},{id:"Vehicle",availability:"2012-08-04T16:00:00Z/2012-08-04T16:14:15.251Z",billboard:{eyeOffset:{cartesian:[0,0,0]},horizontalOrigin:"CENTER",image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEISURBVEhLvVXBDYQwDOuojHKj8LhBbpTbpBCEkZsmIVTXq1RVQGrHiWlLmTTqPiZBlyLgy/KSZQ5JSHDQ/mCYCsC8106kDU0AdwRnvYZArWRcAl0dcYJq1hWCb3hBrumbDAVMwAC82WoRvgMnVMDBnB0nYZFTbE6BBvdUGqVqCbjBIk3PyFFR/NU7EKzru+qZsau3ryPwwCRLKYOzutZuCL6fUmWeJGzNzL/RxAMrUmASSCkkAayk2IxPlwhAAYGpsiHQjbLccfdOY5gKkCXAMi7SscAwbQpAnKyctWyUZ6z8ja3OGMepwD8asz+9FnSvbhU8uVOHFIwQsI3/p0CfhuqCSQuxLqsN6mu8SS+N42MAAAAASUVORK5CYII=",pixelOffset:{cartesian2:[0,0]},scale:.8333333333333334,show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}],verticalOrigin:"BOTTOM"},label:{fillColor:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",rgba:[255,255,0,255]}],font:"bold 10pt Segoe UI Semibold",horizontalOrigin:"LEFT",outlineColor:{rgba:[0,0,0,255]},pixelOffset:{cartesian2:[10,0]},scale:1,show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}],style:"FILL",text:"Vehicle",verticalOrigin:"CENTER"},path:{material:{solidColor:{color:{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",rgba:[255,255,0,255]}}},width:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",number:5}],show:[{interval:"2012-08-04T16:00:00Z/2012-08-04T18:00:00Z",boolean:!0}]},position:{interpolationAlgorithm:"LAGRANGE",interpolationDegree:1,epoch:"2012-08-04T16:00:00Z",cartesian:[0,-23797546637012e-7,-466533288013588e-8,362813368924173e-8,100,-237951008905552e-8,-466541964840452e-8,362818220006795e-8,200,-23795684769522e-7,-46655553441867e-7,362797083323261e-8,300,-237963893786855e-8,-466569163561896e-8,362775082085873e-8,400,-237970929834665e-8,-46658279679646e-7,362753080187124e-8,500,-237983728064915e-8,-46658477494347e-7,362742212874017e-8,600,-237962498289073e-8,-466590750853722e-8,36274841191848e-7,700,-237938612743523e-8,-466602954174431e-8,362748383297459e-8,800,-237914726777171e-8,-466615156669944e-8,36274835403492e-7,900,-237890840390057e-8,-466627358340244e-8,362748324130864e-8,1e3]}}],nM=`第一个packet代表了cesium场景(cesium时间轴的范围,当前时刻,倍速等信息)之外,其他的packet都可以理解为描述某一时间范围内的entity的行为。
416
416
  \`\`\`
417
417
  [{
418
418
  "id": "document",