mirage2d 1.1.51 → 1.1.52

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 (528) hide show
  1. package/dist/mirage2d.cjs.js +1 -1
  2. package/dist/mirage2d.umd.js +1 -1
  3. package/package.json +5 -3
  4. package/dist/MirageHttp.es.js +0 -5268
  5. package/dist/MirageHttp.es.js.map +0 -1
  6. package/dist/MirageHttp.umd.js +0 -2
  7. package/dist/MirageHttp.umd.js.map +0 -1
  8. package/dist/lib/gifler/README.md +0 -14
  9. package/dist/lib/gifler/gifler.js +0 -1051
  10. package/dist/lib/gifler/gifler.min.js +0 -2
  11. package/dist/lib/gifler/metalsmith-watch.json +0 -33
  12. package/dist/lib/gifler/metalsmith.json +0 -25
  13. package/dist/lib/gifler/package.json +0 -33
  14. package/dist/lib/gifler/site/_constants.less +0 -29
  15. package/dist/lib/gifler/site/_examples/rainbow.js +0 -28
  16. package/dist/lib/gifler/site/_examples/simple.js +0 -1
  17. package/dist/lib/gifler/site/_layout.jade +0 -20
  18. package/dist/lib/gifler/site/_nav.jade +0 -8
  19. package/dist/lib/gifler/site/assets/gif/_data.json +0 -18
  20. package/dist/lib/gifler/site/assets/gif/florian-8.gif +0 -0
  21. package/dist/lib/gifler/site/assets/gif/nyan.gif +0 -0
  22. package/dist/lib/gifler/site/assets/gif/pots.gif +0 -0
  23. package/dist/lib/gifler/site/assets/gif/run.gif +0 -0
  24. package/dist/lib/gifler/site/assets/gif/toroid.gif +0 -0
  25. package/dist/lib/gifler/site/assets/gifler.js +0 -2
  26. package/dist/lib/gifler/site/assets/lib/highlight.pack.js +0 -1
  27. package/dist/lib/gifler/site/assets/lib/monokai_sublime.css +0 -154
  28. package/dist/lib/gifler/site/examples.jade +0 -43
  29. package/dist/lib/gifler/site/examples.less +0 -37
  30. package/dist/lib/gifler/site/index.jade +0 -49
  31. package/dist/lib/gifler/site/index.less +0 -63
  32. package/dist/lib/gifler/site/theme.less +0 -121
  33. package/dist/lib/gifler/src/gifler.coffee +0 -203
  34. package/dist/lib/includeLibs.js +0 -105
  35. package/dist/lib/jsts/README.md +0 -39
  36. package/dist/lib/jsts/dist/jsts.js +0 -33201
  37. package/dist/lib/jsts/dist/jsts.js.map +0 -1
  38. package/dist/lib/jsts/dist/jsts.min.js +0 -8
  39. package/dist/lib/jsts/dist/jsts.min.js.map +0 -1
  40. package/dist/lib/jsts/hasInterface.js +0 -3
  41. package/dist/lib/jsts/java/io/ByteArrayOutputStream.js +0 -1
  42. package/dist/lib/jsts/java/io/IOException.js +0 -3
  43. package/dist/lib/jsts/java/io/InputStream.js +0 -1
  44. package/dist/lib/jsts/java/io/LineNumberReader.js +0 -1
  45. package/dist/lib/jsts/java/io/OutputStream.js +0 -1
  46. package/dist/lib/jsts/java/io/PrintStream.js +0 -1
  47. package/dist/lib/jsts/java/io/Serializable.js +0 -1
  48. package/dist/lib/jsts/java/io/StringReader.js +0 -1
  49. package/dist/lib/jsts/java/io/StringWriter.js +0 -1
  50. package/dist/lib/jsts/java/io/Writer.js +0 -1
  51. package/dist/lib/jsts/java/lang/Character.js +0 -9
  52. package/dist/lib/jsts/java/lang/Cloneable.js +0 -1
  53. package/dist/lib/jsts/java/lang/Comparable.js +0 -1
  54. package/dist/lib/jsts/java/lang/Double.js +0 -301
  55. package/dist/lib/jsts/java/lang/Exception.js +0 -9
  56. package/dist/lib/jsts/java/lang/IllegalArgumentException.js +0 -8
  57. package/dist/lib/jsts/java/lang/IndexOutOfBoundsException.js +0 -8
  58. package/dist/lib/jsts/java/lang/Integer.js +0 -33
  59. package/dist/lib/jsts/java/lang/Long.js +0 -16
  60. package/dist/lib/jsts/java/lang/RuntimeException.js +0 -8
  61. package/dist/lib/jsts/java/lang/StringBuffer.js +0 -14
  62. package/dist/lib/jsts/java/lang/StringBuilder.js +0 -14
  63. package/dist/lib/jsts/java/lang/System.js +0 -15
  64. package/dist/lib/jsts/java/lang/UnsupportedOperationException.js +0 -8
  65. package/dist/lib/jsts/java/text/DecimalFormat.js +0 -1
  66. package/dist/lib/jsts/java/text/DecimalFormatSymbols.js +0 -1
  67. package/dist/lib/jsts/java/util/ArrayList.js +0 -109
  68. package/dist/lib/jsts/java/util/Arrays.js +0 -44
  69. package/dist/lib/jsts/java/util/Collection.js +0 -47
  70. package/dist/lib/jsts/java/util/Collections.js +0 -35
  71. package/dist/lib/jsts/java/util/Comparator.js +0 -1
  72. package/dist/lib/jsts/java/util/EmptyStackException.js +0 -8
  73. package/dist/lib/jsts/java/util/HashMap.js +0 -43
  74. package/dist/lib/jsts/java/util/HashSet.js +0 -87
  75. package/dist/lib/jsts/java/util/Iterator.js +0 -24
  76. package/dist/lib/jsts/java/util/LinkedList.js +0 -17
  77. package/dist/lib/jsts/java/util/List.js +0 -26
  78. package/dist/lib/jsts/java/util/Map.js +0 -51
  79. package/dist/lib/jsts/java/util/NoSuchElementException.js +0 -8
  80. package/dist/lib/jsts/java/util/PriorityQueue.js +0 -78
  81. package/dist/lib/jsts/java/util/Set.js +0 -19
  82. package/dist/lib/jsts/java/util/SortedMap.js +0 -6
  83. package/dist/lib/jsts/java/util/SortedSet.js +0 -6
  84. package/dist/lib/jsts/java/util/Stack.js +0 -103
  85. package/dist/lib/jsts/java/util/TreeMap.js +0 -262
  86. package/dist/lib/jsts/java/util/TreeSet.js +0 -82
  87. package/dist/lib/jsts/org/locationtech/jts/JTSVersion.js +0 -25
  88. package/dist/lib/jsts/org/locationtech/jts/algorithm/Angle.js +0 -97
  89. package/dist/lib/jsts/org/locationtech/jts/algorithm/Area.js +0 -50
  90. package/dist/lib/jsts/org/locationtech/jts/algorithm/BoundaryNodeRule.js +0 -44
  91. package/dist/lib/jsts/org/locationtech/jts/algorithm/CGAlgorithms3D.js +0 -58
  92. package/dist/lib/jsts/org/locationtech/jts/algorithm/CGAlgorithmsDD.js +0 -78
  93. package/dist/lib/jsts/org/locationtech/jts/algorithm/Centroid.js +0 -123
  94. package/dist/lib/jsts/org/locationtech/jts/algorithm/ConvexHull.js +0 -244
  95. package/dist/lib/jsts/org/locationtech/jts/algorithm/Distance.js +0 -55
  96. package/dist/lib/jsts/org/locationtech/jts/algorithm/HCoordinate.js +0 -76
  97. package/dist/lib/jsts/org/locationtech/jts/algorithm/InteriorPoint.js +0 -18
  98. package/dist/lib/jsts/org/locationtech/jts/algorithm/InteriorPointArea.js +0 -194
  99. package/dist/lib/jsts/org/locationtech/jts/algorithm/InteriorPointLine.js +0 -74
  100. package/dist/lib/jsts/org/locationtech/jts/algorithm/InteriorPointPoint.js +0 -46
  101. package/dist/lib/jsts/org/locationtech/jts/algorithm/Intersection.js +0 -43
  102. package/dist/lib/jsts/org/locationtech/jts/algorithm/Length.js +0 -23
  103. package/dist/lib/jsts/org/locationtech/jts/algorithm/LineIntersector.js +0 -152
  104. package/dist/lib/jsts/org/locationtech/jts/algorithm/MinimumBoundingCircle.js +0 -180
  105. package/dist/lib/jsts/org/locationtech/jts/algorithm/MinimumDiameter.js +0 -162
  106. package/dist/lib/jsts/org/locationtech/jts/algorithm/NotRepresentableException.js +0 -10
  107. package/dist/lib/jsts/org/locationtech/jts/algorithm/Orientation.js +0 -86
  108. package/dist/lib/jsts/org/locationtech/jts/algorithm/PointLocation.js +0 -44
  109. package/dist/lib/jsts/org/locationtech/jts/algorithm/PointLocator.js +0 -111
  110. package/dist/lib/jsts/org/locationtech/jts/algorithm/RayCrossingCounter.js +0 -87
  111. package/dist/lib/jsts/org/locationtech/jts/algorithm/RectangleLineIntersector.js +0 -42
  112. package/dist/lib/jsts/org/locationtech/jts/algorithm/RobustDeterminant.js +0 -196
  113. package/dist/lib/jsts/org/locationtech/jts/algorithm/RobustLineIntersector.js +0 -155
  114. package/dist/lib/jsts/org/locationtech/jts/algorithm/construct/LargestEmptyCircle.js +0 -193
  115. package/dist/lib/jsts/org/locationtech/jts/algorithm/construct/MaximumInscribedCircle.js +0 -167
  116. package/dist/lib/jsts/org/locationtech/jts/algorithm/distance/DiscreteHausdorffDistance.js +0 -128
  117. package/dist/lib/jsts/org/locationtech/jts/algorithm/distance/DistanceToPoint.js +0 -46
  118. package/dist/lib/jsts/org/locationtech/jts/algorithm/distance/PointPairDistance.js +0 -70
  119. package/dist/lib/jsts/org/locationtech/jts/algorithm/distance_module.js +0 -9
  120. package/dist/lib/jsts/org/locationtech/jts/algorithm/locate/IndexedPointInAreaLocator.js +0 -96
  121. package/dist/lib/jsts/org/locationtech/jts/algorithm/locate/PointOnGeometryLocator.js +0 -3
  122. package/dist/lib/jsts/org/locationtech/jts/algorithm/locate/SimplePointInAreaLocator.js +0 -66
  123. package/dist/lib/jsts/org/locationtech/jts/algorithm/locate.js +0 -9
  124. package/dist/lib/jsts/org/locationtech/jts/algorithm/match/AreaSimilarityMeasure.js +0 -11
  125. package/dist/lib/jsts/org/locationtech/jts/algorithm/match/HausdorffSimilarityMeasure.js +0 -23
  126. package/dist/lib/jsts/org/locationtech/jts/algorithm/match/SimilarityMeasure.js +0 -3
  127. package/dist/lib/jsts/org/locationtech/jts/algorithm/match/SimilarityMeasureCombiner.js +0 -5
  128. package/dist/lib/jsts/org/locationtech/jts/algorithm/match.js +0 -11
  129. package/dist/lib/jsts/org/locationtech/jts/algorithm.js +0 -41
  130. package/dist/lib/jsts/org/locationtech/jts/densify/Densifier.js +0 -85
  131. package/dist/lib/jsts/org/locationtech/jts/densify.js +0 -5
  132. package/dist/lib/jsts/org/locationtech/jts/dissolve/DissolveEdgeGraph.js +0 -10
  133. package/dist/lib/jsts/org/locationtech/jts/dissolve/DissolveHalfEdge.js +0 -18
  134. package/dist/lib/jsts/org/locationtech/jts/dissolve/LineDissolver.js +0 -148
  135. package/dist/lib/jsts/org/locationtech/jts/dissolve.js +0 -5
  136. package/dist/lib/jsts/org/locationtech/jts/edgegraph/EdgeGraph.js +0 -59
  137. package/dist/lib/jsts/org/locationtech/jts/edgegraph/EdgeGraphBuilder.js +0 -49
  138. package/dist/lib/jsts/org/locationtech/jts/edgegraph/HalfEdge.js +0 -185
  139. package/dist/lib/jsts/org/locationtech/jts/edgegraph/MarkHalfEdge.js +0 -38
  140. package/dist/lib/jsts/org/locationtech/jts/geom/Coordinate.js +0 -219
  141. package/dist/lib/jsts/org/locationtech/jts/geom/CoordinateArrays.js +0 -245
  142. package/dist/lib/jsts/org/locationtech/jts/geom/CoordinateFilter.js +0 -3
  143. package/dist/lib/jsts/org/locationtech/jts/geom/CoordinateList.js +0 -130
  144. package/dist/lib/jsts/org/locationtech/jts/geom/CoordinateSequence.js +0 -53
  145. package/dist/lib/jsts/org/locationtech/jts/geom/CoordinateSequenceComparator.js +0 -67
  146. package/dist/lib/jsts/org/locationtech/jts/geom/CoordinateSequenceFactory.js +0 -18
  147. package/dist/lib/jsts/org/locationtech/jts/geom/CoordinateSequenceFilter.js +0 -5
  148. package/dist/lib/jsts/org/locationtech/jts/geom/CoordinateSequences.js +0 -139
  149. package/dist/lib/jsts/org/locationtech/jts/geom/CoordinateXY.js +0 -66
  150. package/dist/lib/jsts/org/locationtech/jts/geom/CoordinateXYM.js +0 -83
  151. package/dist/lib/jsts/org/locationtech/jts/geom/CoordinateXYZM.js +0 -78
  152. package/dist/lib/jsts/org/locationtech/jts/geom/Coordinates.js +0 -48
  153. package/dist/lib/jsts/org/locationtech/jts/geom/Dimension.js +0 -50
  154. package/dist/lib/jsts/org/locationtech/jts/geom/Envelope.js +0 -360
  155. package/dist/lib/jsts/org/locationtech/jts/geom/Geometry.js +0 -230
  156. package/dist/lib/jsts/org/locationtech/jts/geom/GeometryCollection.js +0 -211
  157. package/dist/lib/jsts/org/locationtech/jts/geom/GeometryCollectionIterator.js +0 -68
  158. package/dist/lib/jsts/org/locationtech/jts/geom/GeometryComponentFilter.js +0 -3
  159. package/dist/lib/jsts/org/locationtech/jts/geom/GeometryFactory.js +0 -267
  160. package/dist/lib/jsts/org/locationtech/jts/geom/GeometryFilter.js +0 -3
  161. package/dist/lib/jsts/org/locationtech/jts/geom/IntersectionMatrix.js +0 -212
  162. package/dist/lib/jsts/org/locationtech/jts/geom/LineSegment.js +0 -273
  163. package/dist/lib/jsts/org/locationtech/jts/geom/LineString.js +0 -210
  164. package/dist/lib/jsts/org/locationtech/jts/geom/Lineal.js +0 -1
  165. package/dist/lib/jsts/org/locationtech/jts/geom/LinearRing.js +0 -48
  166. package/dist/lib/jsts/org/locationtech/jts/geom/Location.js +0 -20
  167. package/dist/lib/jsts/org/locationtech/jts/geom/MultiLineString.js +0 -65
  168. package/dist/lib/jsts/org/locationtech/jts/geom/MultiPoint.js +0 -61
  169. package/dist/lib/jsts/org/locationtech/jts/geom/MultiPolygon.js +0 -62
  170. package/dist/lib/jsts/org/locationtech/jts/geom/OctagonalEnvelope.js +0 -273
  171. package/dist/lib/jsts/org/locationtech/jts/geom/Point.js +0 -140
  172. package/dist/lib/jsts/org/locationtech/jts/geom/Polygon.js +0 -275
  173. package/dist/lib/jsts/org/locationtech/jts/geom/Polygonal.js +0 -1
  174. package/dist/lib/jsts/org/locationtech/jts/geom/PrecisionModel.js +0 -133
  175. package/dist/lib/jsts/org/locationtech/jts/geom/Puntal.js +0 -1
  176. package/dist/lib/jsts/org/locationtech/jts/geom/TopologyException.js +0 -13
  177. package/dist/lib/jsts/org/locationtech/jts/geom/Triangle.js +0 -158
  178. package/dist/lib/jsts/org/locationtech/jts/geom/impl/CoordinateArraySequence.js +0 -177
  179. package/dist/lib/jsts/org/locationtech/jts/geom/impl/CoordinateArraySequenceFactory.js +0 -44
  180. package/dist/lib/jsts/org/locationtech/jts/geom/impl/PackedCoordinateSequenceFactory.js +0 -98
  181. package/dist/lib/jsts/org/locationtech/jts/geom/prep/AbstractPreparedPolygonContains.js +0 -60
  182. package/dist/lib/jsts/org/locationtech/jts/geom/prep/BasicPreparedGeometry.js +0 -74
  183. package/dist/lib/jsts/org/locationtech/jts/geom/prep/PreparedGeometry.js +0 -13
  184. package/dist/lib/jsts/org/locationtech/jts/geom/prep/PreparedGeometryFactory.js +0 -19
  185. package/dist/lib/jsts/org/locationtech/jts/geom/prep/PreparedLineString.js +0 -23
  186. package/dist/lib/jsts/org/locationtech/jts/geom/prep/PreparedLineStringIntersects.js +0 -37
  187. package/dist/lib/jsts/org/locationtech/jts/geom/prep/PreparedPoint.js +0 -15
  188. package/dist/lib/jsts/org/locationtech/jts/geom/prep/PreparedPolygon.js +0 -57
  189. package/dist/lib/jsts/org/locationtech/jts/geom/prep/PreparedPolygonContains.js +0 -22
  190. package/dist/lib/jsts/org/locationtech/jts/geom/prep/PreparedPolygonContainsProperly.js +0 -30
  191. package/dist/lib/jsts/org/locationtech/jts/geom/prep/PreparedPolygonCovers.js +0 -23
  192. package/dist/lib/jsts/org/locationtech/jts/geom/prep/PreparedPolygonIntersects.js +0 -31
  193. package/dist/lib/jsts/org/locationtech/jts/geom/prep/PreparedPolygonPredicate.js +0 -60
  194. package/dist/lib/jsts/org/locationtech/jts/geom/util/AffineTransformation.js +0 -393
  195. package/dist/lib/jsts/org/locationtech/jts/geom/util/AffineTransformationBuilder.js +0 -52
  196. package/dist/lib/jsts/org/locationtech/jts/geom/util/AffineTransformationFactory.js +0 -55
  197. package/dist/lib/jsts/org/locationtech/jts/geom/util/ComponentCoordinateExtracter.js +0 -25
  198. package/dist/lib/jsts/org/locationtech/jts/geom/util/GeometryCollectionMapper.js +0 -24
  199. package/dist/lib/jsts/org/locationtech/jts/geom/util/GeometryCombiner.js +0 -71
  200. package/dist/lib/jsts/org/locationtech/jts/geom/util/GeometryEditor.js +0 -138
  201. package/dist/lib/jsts/org/locationtech/jts/geom/util/GeometryExtracter.js +0 -41
  202. package/dist/lib/jsts/org/locationtech/jts/geom/util/GeometryMapper.js +0 -28
  203. package/dist/lib/jsts/org/locationtech/jts/geom/util/GeometryTransformer.js +0 -125
  204. package/dist/lib/jsts/org/locationtech/jts/geom/util/LineStringExtracter.js +0 -37
  205. package/dist/lib/jsts/org/locationtech/jts/geom/util/LinearComponentExtracter.js +0 -88
  206. package/dist/lib/jsts/org/locationtech/jts/geom/util/NoninvertibleTransformationException.js +0 -15
  207. package/dist/lib/jsts/org/locationtech/jts/geom/util/PointExtracter.js +0 -38
  208. package/dist/lib/jsts/org/locationtech/jts/geom/util/PolygonExtracter.js +0 -34
  209. package/dist/lib/jsts/org/locationtech/jts/geom/util/ShortCircuitedGeometryVisitor.js +0 -23
  210. package/dist/lib/jsts/org/locationtech/jts/geom/util/SineStarFactory.js +0 -62
  211. package/dist/lib/jsts/org/locationtech/jts/geom/util.js +0 -35
  212. package/dist/lib/jsts/org/locationtech/jts/geom.js +0 -51
  213. package/dist/lib/jsts/org/locationtech/jts/geomgraph/Depth.js +0 -85
  214. package/dist/lib/jsts/org/locationtech/jts/geomgraph/DirectedEdge.js +0 -143
  215. package/dist/lib/jsts/org/locationtech/jts/geomgraph/DirectedEdgeStar.js +0 -233
  216. package/dist/lib/jsts/org/locationtech/jts/geomgraph/Edge.js +0 -190
  217. package/dist/lib/jsts/org/locationtech/jts/geomgraph/EdgeEnd.js +0 -94
  218. package/dist/lib/jsts/org/locationtech/jts/geomgraph/EdgeEndStar.js +0 -173
  219. package/dist/lib/jsts/org/locationtech/jts/geomgraph/EdgeIntersection.js +0 -52
  220. package/dist/lib/jsts/org/locationtech/jts/geomgraph/EdgeIntersectionList.js +0 -74
  221. package/dist/lib/jsts/org/locationtech/jts/geomgraph/EdgeList.js +0 -57
  222. package/dist/lib/jsts/org/locationtech/jts/geomgraph/EdgeNodingValidator.js +0 -28
  223. package/dist/lib/jsts/org/locationtech/jts/geomgraph/EdgeRing.js +0 -160
  224. package/dist/lib/jsts/org/locationtech/jts/geomgraph/GeometryGraph.js +0 -238
  225. package/dist/lib/jsts/org/locationtech/jts/geomgraph/GraphComponent.js +0 -49
  226. package/dist/lib/jsts/org/locationtech/jts/geomgraph/Label.js +0 -132
  227. package/dist/lib/jsts/org/locationtech/jts/geomgraph/Node.js +0 -91
  228. package/dist/lib/jsts/org/locationtech/jts/geomgraph/NodeFactory.js +0 -6
  229. package/dist/lib/jsts/org/locationtech/jts/geomgraph/NodeMap.js +0 -64
  230. package/dist/lib/jsts/org/locationtech/jts/geomgraph/PlanarGraph.js +0 -138
  231. package/dist/lib/jsts/org/locationtech/jts/geomgraph/Position.js +0 -10
  232. package/dist/lib/jsts/org/locationtech/jts/geomgraph/Quadrant.js +0 -51
  233. package/dist/lib/jsts/org/locationtech/jts/geomgraph/TopologyLocation.js +0 -122
  234. package/dist/lib/jsts/org/locationtech/jts/geomgraph/index/EdgeSetIntersector.js +0 -1
  235. package/dist/lib/jsts/org/locationtech/jts/geomgraph/index/MonotoneChain.js +0 -15
  236. package/dist/lib/jsts/org/locationtech/jts/geomgraph/index/MonotoneChainEdge.js +0 -66
  237. package/dist/lib/jsts/org/locationtech/jts/geomgraph/index/MonotoneChainIndexer.js +0 -45
  238. package/dist/lib/jsts/org/locationtech/jts/geomgraph/index/SegmentIntersector.js +0 -109
  239. package/dist/lib/jsts/org/locationtech/jts/geomgraph/index/SimpleEdgeSetIntersector.js +0 -45
  240. package/dist/lib/jsts/org/locationtech/jts/geomgraph/index/SimpleMCSweepLineIntersector.js +0 -92
  241. package/dist/lib/jsts/org/locationtech/jts/geomgraph/index/SimpleSweepLineIntersector.js +0 -91
  242. package/dist/lib/jsts/org/locationtech/jts/geomgraph/index/SweepLineEvent.js +0 -61
  243. package/dist/lib/jsts/org/locationtech/jts/geomgraph/index/SweepLineSegment.js +0 -27
  244. package/dist/lib/jsts/org/locationtech/jts/geomgraph.js +0 -5
  245. package/dist/lib/jsts/org/locationtech/jts/index/ArrayListVisitor.js +0 -19
  246. package/dist/lib/jsts/org/locationtech/jts/index/ItemVisitor.js +0 -3
  247. package/dist/lib/jsts/org/locationtech/jts/index/SpatialIndex.js +0 -11
  248. package/dist/lib/jsts/org/locationtech/jts/index/bintree/Bintree.js +0 -69
  249. package/dist/lib/jsts/org/locationtech/jts/index/bintree/Interval.js +0 -67
  250. package/dist/lib/jsts/org/locationtech/jts/index/bintree/Key.js +0 -42
  251. package/dist/lib/jsts/org/locationtech/jts/index/bintree/Node.js +0 -89
  252. package/dist/lib/jsts/org/locationtech/jts/index/bintree/NodeBase.js +0 -93
  253. package/dist/lib/jsts/org/locationtech/jts/index/bintree/Root.js +0 -33
  254. package/dist/lib/jsts/org/locationtech/jts/index/chain/MonotoneChain.js +0 -99
  255. package/dist/lib/jsts/org/locationtech/jts/index/chain/MonotoneChainBuilder.js +0 -41
  256. package/dist/lib/jsts/org/locationtech/jts/index/chain/MonotoneChainOverlapAction.js +0 -20
  257. package/dist/lib/jsts/org/locationtech/jts/index/chain/MonotoneChainSelectAction.js +0 -18
  258. package/dist/lib/jsts/org/locationtech/jts/index/hprtree/HPRtree.js +0 -245
  259. package/dist/lib/jsts/org/locationtech/jts/index/hprtree/HilbertEncoder.js +0 -29
  260. package/dist/lib/jsts/org/locationtech/jts/index/hprtree/Item.js +0 -21
  261. package/dist/lib/jsts/org/locationtech/jts/index/intervalrtree/IntervalRTreeBranchNode.js +0 -26
  262. package/dist/lib/jsts/org/locationtech/jts/index/intervalrtree/IntervalRTreeLeafNode.js +0 -18
  263. package/dist/lib/jsts/org/locationtech/jts/index/intervalrtree/IntervalRTreeNode.js +0 -41
  264. package/dist/lib/jsts/org/locationtech/jts/index/intervalrtree/SortedPackedIntervalRTree.js +0 -66
  265. package/dist/lib/jsts/org/locationtech/jts/index/kdtree/KdNode.js +0 -61
  266. package/dist/lib/jsts/org/locationtech/jts/index/kdtree/KdNodeVisitor.js +0 -3
  267. package/dist/lib/jsts/org/locationtech/jts/index/kdtree/KdTree.js +0 -190
  268. package/dist/lib/jsts/org/locationtech/jts/index/kdtree.js +0 -5
  269. package/dist/lib/jsts/org/locationtech/jts/index/quadtree/DoubleBits.js +0 -84
  270. package/dist/lib/jsts/org/locationtech/jts/index/quadtree/IntervalSize.js +0 -12
  271. package/dist/lib/jsts/org/locationtech/jts/index/quadtree/Key.js +0 -52
  272. package/dist/lib/jsts/org/locationtech/jts/index/quadtree/Node.js +0 -110
  273. package/dist/lib/jsts/org/locationtech/jts/index/quadtree/NodeBase.js +0 -134
  274. package/dist/lib/jsts/org/locationtech/jts/index/quadtree/Quadtree.js +0 -78
  275. package/dist/lib/jsts/org/locationtech/jts/index/quadtree/Root.js +0 -35
  276. package/dist/lib/jsts/org/locationtech/jts/index/quadtree.js +0 -5
  277. package/dist/lib/jsts/org/locationtech/jts/index/strtree/AbstractNode.js +0 -43
  278. package/dist/lib/jsts/org/locationtech/jts/index/strtree/AbstractSTRtree.js +0 -281
  279. package/dist/lib/jsts/org/locationtech/jts/index/strtree/Boundable.js +0 -3
  280. package/dist/lib/jsts/org/locationtech/jts/index/strtree/BoundablePair.js +0 -89
  281. package/dist/lib/jsts/org/locationtech/jts/index/strtree/BoundablePairDistanceComparator.js +0 -34
  282. package/dist/lib/jsts/org/locationtech/jts/index/strtree/EnvelopeDistance.js +0 -48
  283. package/dist/lib/jsts/org/locationtech/jts/index/strtree/GeometryItemDistance.js +0 -13
  284. package/dist/lib/jsts/org/locationtech/jts/index/strtree/Interval.js +0 -37
  285. package/dist/lib/jsts/org/locationtech/jts/index/strtree/ItemBoundable.js +0 -23
  286. package/dist/lib/jsts/org/locationtech/jts/index/strtree/ItemDistance.js +0 -3
  287. package/dist/lib/jsts/org/locationtech/jts/index/strtree/SIRtree.js +0 -72
  288. package/dist/lib/jsts/org/locationtech/jts/index/strtree/STRtree.js +0 -284
  289. package/dist/lib/jsts/org/locationtech/jts/index/strtree.js +0 -5
  290. package/dist/lib/jsts/org/locationtech/jts/index/sweepline/SweepLineEvent.js +0 -50
  291. package/dist/lib/jsts/org/locationtech/jts/index/sweepline/SweepLineIndex.js +0 -49
  292. package/dist/lib/jsts/org/locationtech/jts/index/sweepline/SweepLineInterval.js +0 -28
  293. package/dist/lib/jsts/org/locationtech/jts/index/sweepline/SweepLineOverlapAction.js +0 -3
  294. package/dist/lib/jsts/org/locationtech/jts/index.js +0 -5
  295. package/dist/lib/jsts/org/locationtech/jts/io/GeoJSONParser.js +0 -420
  296. package/dist/lib/jsts/org/locationtech/jts/io/GeoJSONReader.js +0 -37
  297. package/dist/lib/jsts/org/locationtech/jts/io/GeoJSONWriter.js +0 -36
  298. package/dist/lib/jsts/org/locationtech/jts/io/OL3Parser.js +0 -189
  299. package/dist/lib/jsts/org/locationtech/jts/io/WKTParser.js +0 -784
  300. package/dist/lib/jsts/org/locationtech/jts/io/WKTReader.js +0 -42
  301. package/dist/lib/jsts/org/locationtech/jts/io/WKTWriter.js +0 -55
  302. package/dist/lib/jsts/org/locationtech/jts/io.js +0 -13
  303. package/dist/lib/jsts/org/locationtech/jts/linearref/ExtractLineByLocation.js +0 -64
  304. package/dist/lib/jsts/org/locationtech/jts/linearref/LengthIndexOfPoint.js +0 -61
  305. package/dist/lib/jsts/org/locationtech/jts/linearref/LengthIndexedLine.js +0 -78
  306. package/dist/lib/jsts/org/locationtech/jts/linearref/LengthLocationMap.js +0 -98
  307. package/dist/lib/jsts/org/locationtech/jts/linearref/LinearGeometryBuilder.js +0 -71
  308. package/dist/lib/jsts/org/locationtech/jts/linearref/LinearIterator.js +0 -76
  309. package/dist/lib/jsts/org/locationtech/jts/linearref/LinearLocation.js +0 -201
  310. package/dist/lib/jsts/org/locationtech/jts/linearref/LocationIndexOfLine.js +0 -29
  311. package/dist/lib/jsts/org/locationtech/jts/linearref/LocationIndexOfPoint.js +0 -64
  312. package/dist/lib/jsts/org/locationtech/jts/linearref/LocationIndexedLine.js +0 -60
  313. package/dist/lib/jsts/org/locationtech/jts/linearref.js +0 -15
  314. package/dist/lib/jsts/org/locationtech/jts/math/DD.js +0 -608
  315. package/dist/lib/jsts/org/locationtech/jts/math/MathUtil.js +0 -55
  316. package/dist/lib/jsts/org/locationtech/jts/math/Matrix.js +0 -43
  317. package/dist/lib/jsts/org/locationtech/jts/math/Plane3D.js +0 -36
  318. package/dist/lib/jsts/org/locationtech/jts/math/Vector2D.js +0 -172
  319. package/dist/lib/jsts/org/locationtech/jts/math/Vector3D.js +0 -104
  320. package/dist/lib/jsts/org/locationtech/jts/monkey.js +0 -146
  321. package/dist/lib/jsts/org/locationtech/jts/noding/BasicSegmentString.js +0 -44
  322. package/dist/lib/jsts/org/locationtech/jts/noding/FastNodingValidator.js +0 -60
  323. package/dist/lib/jsts/org/locationtech/jts/noding/FastSegmentSetIntersectionFinder.js +0 -26
  324. package/dist/lib/jsts/org/locationtech/jts/noding/InteriorIntersectionFinderAdder.js +0 -40
  325. package/dist/lib/jsts/org/locationtech/jts/noding/IntersectionAdder.js +0 -88
  326. package/dist/lib/jsts/org/locationtech/jts/noding/IteratedNoder.js +0 -53
  327. package/dist/lib/jsts/org/locationtech/jts/noding/MCIndexNoder.js +0 -85
  328. package/dist/lib/jsts/org/locationtech/jts/noding/MCIndexSegmentSetMutualIntersector.js +0 -82
  329. package/dist/lib/jsts/org/locationtech/jts/noding/NodableSegmentString.js +0 -7
  330. package/dist/lib/jsts/org/locationtech/jts/noding/NodedSegmentString.js +0 -96
  331. package/dist/lib/jsts/org/locationtech/jts/noding/Noder.js +0 -4
  332. package/dist/lib/jsts/org/locationtech/jts/noding/NodingIntersectionFinder.js +0 -139
  333. package/dist/lib/jsts/org/locationtech/jts/noding/NodingValidator.js +0 -96
  334. package/dist/lib/jsts/org/locationtech/jts/noding/Octant.js +0 -31
  335. package/dist/lib/jsts/org/locationtech/jts/noding/OrientedCoordinateArray.js +0 -44
  336. package/dist/lib/jsts/org/locationtech/jts/noding/ScaledNoder.js +0 -82
  337. package/dist/lib/jsts/org/locationtech/jts/noding/SegmentIntersectionDetector.js +0 -80
  338. package/dist/lib/jsts/org/locationtech/jts/noding/SegmentIntersector.js +0 -4
  339. package/dist/lib/jsts/org/locationtech/jts/noding/SegmentNode.js +0 -51
  340. package/dist/lib/jsts/org/locationtech/jts/noding/SegmentNodeList.js +0 -199
  341. package/dist/lib/jsts/org/locationtech/jts/noding/SegmentPointComparator.js +0 -40
  342. package/dist/lib/jsts/org/locationtech/jts/noding/SegmentSetMutualIntersector.js +0 -3
  343. package/dist/lib/jsts/org/locationtech/jts/noding/SegmentString.js +0 -8
  344. package/dist/lib/jsts/org/locationtech/jts/noding/SegmentStringDissolver.js +0 -53
  345. package/dist/lib/jsts/org/locationtech/jts/noding/SegmentStringUtil.js +0 -44
  346. package/dist/lib/jsts/org/locationtech/jts/noding/SimpleNoder.js +0 -33
  347. package/dist/lib/jsts/org/locationtech/jts/noding/SimpleSegmentSetMutualIntersector.js +0 -34
  348. package/dist/lib/jsts/org/locationtech/jts/noding/SinglePassNoder.js +0 -19
  349. package/dist/lib/jsts/org/locationtech/jts/noding/snapround/GeometryNoder.js +0 -59
  350. package/dist/lib/jsts/org/locationtech/jts/noding/snapround/HotPixel.js +0 -120
  351. package/dist/lib/jsts/org/locationtech/jts/noding/snapround/MCIndexPointSnapper.js +0 -65
  352. package/dist/lib/jsts/org/locationtech/jts/noding/snapround/MCIndexSnapRounder.js +0 -89
  353. package/dist/lib/jsts/org/locationtech/jts/noding/snapround/SimpleSnapRounder.js +0 -105
  354. package/dist/lib/jsts/org/locationtech/jts/noding.js +0 -9
  355. package/dist/lib/jsts/org/locationtech/jts/operation/BoundaryOp.js +0 -104
  356. package/dist/lib/jsts/org/locationtech/jts/operation/GeometryGraphOperation.js +0 -36
  357. package/dist/lib/jsts/org/locationtech/jts/operation/IsSimpleOp.js +0 -165
  358. package/dist/lib/jsts/org/locationtech/jts/operation/buffer/BufferBuilder.js +0 -148
  359. package/dist/lib/jsts/org/locationtech/jts/operation/buffer/BufferInputLineSimplifier.js +0 -96
  360. package/dist/lib/jsts/org/locationtech/jts/operation/buffer/BufferOp.js +0 -126
  361. package/dist/lib/jsts/org/locationtech/jts/operation/buffer/BufferParameters.js +0 -87
  362. package/dist/lib/jsts/org/locationtech/jts/operation/buffer/BufferSubgraph.js +0 -150
  363. package/dist/lib/jsts/org/locationtech/jts/operation/buffer/OffsetCurveBuilder.js +0 -170
  364. package/dist/lib/jsts/org/locationtech/jts/operation/buffer/OffsetCurveSetBuilder.js +0 -118
  365. package/dist/lib/jsts/org/locationtech/jts/operation/buffer/OffsetSegmentGenerator.js +0 -269
  366. package/dist/lib/jsts/org/locationtech/jts/operation/buffer/OffsetSegmentString.js +0 -62
  367. package/dist/lib/jsts/org/locationtech/jts/operation/buffer/RightmostEdgeFinder.js +0 -91
  368. package/dist/lib/jsts/org/locationtech/jts/operation/buffer/SubgraphDepthLocater.js +0 -100
  369. package/dist/lib/jsts/org/locationtech/jts/operation/buffer/VariableBuffer.js +0 -226
  370. package/dist/lib/jsts/org/locationtech/jts/operation/buffer/validate/BufferCurveMaximumDistanceFinder.js +0 -92
  371. package/dist/lib/jsts/org/locationtech/jts/operation/buffer/validate/BufferDistanceValidator.js +0 -107
  372. package/dist/lib/jsts/org/locationtech/jts/operation/buffer/validate/BufferResultValidator.js +0 -116
  373. package/dist/lib/jsts/org/locationtech/jts/operation/buffer/validate/DistanceToPointFinder.js +0 -46
  374. package/dist/lib/jsts/org/locationtech/jts/operation/buffer/validate/PointPairDistance.js +0 -66
  375. package/dist/lib/jsts/org/locationtech/jts/operation/buffer.js +0 -7
  376. package/dist/lib/jsts/org/locationtech/jts/operation/distance/ConnectedElementLocationFilter.js +0 -28
  377. package/dist/lib/jsts/org/locationtech/jts/operation/distance/ConnectedElementPointFilter.js +0 -26
  378. package/dist/lib/jsts/org/locationtech/jts/operation/distance/DistanceOp.js +0 -231
  379. package/dist/lib/jsts/org/locationtech/jts/operation/distance/FacetSequence.js +0 -150
  380. package/dist/lib/jsts/org/locationtech/jts/operation/distance/FacetSequenceTreeBuilder.js +0 -50
  381. package/dist/lib/jsts/org/locationtech/jts/operation/distance/GeometryLocation.js +0 -36
  382. package/dist/lib/jsts/org/locationtech/jts/operation/distance/IndexedFacetDistance.js +0 -68
  383. package/dist/lib/jsts/org/locationtech/jts/operation/distance.js +0 -5
  384. package/dist/lib/jsts/org/locationtech/jts/operation/distance3d/AxisPlaneCoordinateSequence.js +0 -82
  385. package/dist/lib/jsts/org/locationtech/jts/operation/distance3d/Distance3DOp.js +0 -299
  386. package/dist/lib/jsts/org/locationtech/jts/operation/distance3d/PlanarPolygon3D.js +0 -110
  387. package/dist/lib/jsts/org/locationtech/jts/operation/linemerge/EdgeString.js +0 -42
  388. package/dist/lib/jsts/org/locationtech/jts/operation/linemerge/LineMergeDirectedEdge.js +0 -22
  389. package/dist/lib/jsts/org/locationtech/jts/operation/linemerge/LineMergeEdge.js +0 -15
  390. package/dist/lib/jsts/org/locationtech/jts/operation/linemerge/LineMergeGraph.js +0 -34
  391. package/dist/lib/jsts/org/locationtech/jts/operation/linemerge/LineMerger.js +0 -108
  392. package/dist/lib/jsts/org/locationtech/jts/operation/linemerge/LineSequencer.js +0 -245
  393. package/dist/lib/jsts/org/locationtech/jts/operation/linemerge.js +0 -7
  394. package/dist/lib/jsts/org/locationtech/jts/operation/overlay/ConsistentPolygonRingChecker.js +0 -69
  395. package/dist/lib/jsts/org/locationtech/jts/operation/overlay/EdgeSetNoder.js +0 -28
  396. package/dist/lib/jsts/org/locationtech/jts/operation/overlay/LineBuilder.js +0 -89
  397. package/dist/lib/jsts/org/locationtech/jts/operation/overlay/MaximalEdgeRing.js +0 -39
  398. package/dist/lib/jsts/org/locationtech/jts/operation/overlay/MinimalEdgeRing.js +0 -17
  399. package/dist/lib/jsts/org/locationtech/jts/operation/overlay/OverlayNodeFactory.js +0 -11
  400. package/dist/lib/jsts/org/locationtech/jts/operation/overlay/OverlayOp.js +0 -312
  401. package/dist/lib/jsts/org/locationtech/jts/operation/overlay/PointBuilder.js +0 -39
  402. package/dist/lib/jsts/org/locationtech/jts/operation/overlay/PolygonBuilder.js +0 -144
  403. package/dist/lib/jsts/org/locationtech/jts/operation/overlay/snap/GeometrySnapper.js +0 -118
  404. package/dist/lib/jsts/org/locationtech/jts/operation/overlay/snap/LineStringSnapper.js +0 -87
  405. package/dist/lib/jsts/org/locationtech/jts/operation/overlay/snap/SnapIfNeededOverlayOp.js +0 -54
  406. package/dist/lib/jsts/org/locationtech/jts/operation/overlay/snap/SnapOverlayOp.js +0 -70
  407. package/dist/lib/jsts/org/locationtech/jts/operation/overlay/snap.js +0 -7
  408. package/dist/lib/jsts/org/locationtech/jts/operation/overlay/validate/FuzzyPointLocator.js +0 -71
  409. package/dist/lib/jsts/org/locationtech/jts/operation/overlay/validate/OffsetPointGenerator.js +0 -51
  410. package/dist/lib/jsts/org/locationtech/jts/operation/overlay/validate/OverlayResultValidator.js +0 -81
  411. package/dist/lib/jsts/org/locationtech/jts/operation/overlay.js +0 -7
  412. package/dist/lib/jsts/org/locationtech/jts/operation/polygonize/EdgeRing.js +0 -235
  413. package/dist/lib/jsts/org/locationtech/jts/operation/polygonize/HoleAssigner.js +0 -44
  414. package/dist/lib/jsts/org/locationtech/jts/operation/polygonize/PolygonizeDirectedEdge.js +0 -35
  415. package/dist/lib/jsts/org/locationtech/jts/operation/polygonize/PolygonizeEdge.js +0 -15
  416. package/dist/lib/jsts/org/locationtech/jts/operation/polygonize/PolygonizeGraph.js +0 -247
  417. package/dist/lib/jsts/org/locationtech/jts/operation/polygonize/Polygonizer.js +0 -170
  418. package/dist/lib/jsts/org/locationtech/jts/operation/polygonize.js +0 -5
  419. package/dist/lib/jsts/org/locationtech/jts/operation/predicate/RectangleContains.js +0 -62
  420. package/dist/lib/jsts/org/locationtech/jts/operation/predicate/RectangleIntersects.js +0 -151
  421. package/dist/lib/jsts/org/locationtech/jts/operation/relate/EdgeEndBuilder.js +0 -56
  422. package/dist/lib/jsts/org/locationtech/jts/operation/relate/EdgeEndBundle.js +0 -93
  423. package/dist/lib/jsts/org/locationtech/jts/operation/relate/EdgeEndBundleStar.js +0 -22
  424. package/dist/lib/jsts/org/locationtech/jts/operation/relate/RelateComputer.js +0 -168
  425. package/dist/lib/jsts/org/locationtech/jts/operation/relate/RelateNode.js +0 -17
  426. package/dist/lib/jsts/org/locationtech/jts/operation/relate/RelateNodeFactory.js +0 -11
  427. package/dist/lib/jsts/org/locationtech/jts/operation/relate/RelateNodeGraph.js +0 -48
  428. package/dist/lib/jsts/org/locationtech/jts/operation/relate/RelateOp.js +0 -101
  429. package/dist/lib/jsts/org/locationtech/jts/operation/relate.js +0 -5
  430. package/dist/lib/jsts/org/locationtech/jts/operation/union/CascadedPolygonUnion.js +0 -124
  431. package/dist/lib/jsts/org/locationtech/jts/operation/union/InputExtracter.js +0 -93
  432. package/dist/lib/jsts/org/locationtech/jts/operation/union/OverlapUnion.js +0 -146
  433. package/dist/lib/jsts/org/locationtech/jts/operation/union/PointGeometryUnion.js +0 -42
  434. package/dist/lib/jsts/org/locationtech/jts/operation/union/UnaryUnionOp.js +0 -97
  435. package/dist/lib/jsts/org/locationtech/jts/operation/union/UnionInteracting.js +0 -70
  436. package/dist/lib/jsts/org/locationtech/jts/operation/union/UnionOp.js +0 -22
  437. package/dist/lib/jsts/org/locationtech/jts/operation/union.js +0 -5
  438. package/dist/lib/jsts/org/locationtech/jts/operation/valid/ConnectedInteriorTester.js +0 -118
  439. package/dist/lib/jsts/org/locationtech/jts/operation/valid/ConsistentAreaTester.js +0 -50
  440. package/dist/lib/jsts/org/locationtech/jts/operation/valid/IndexedNestedRingTester.js +0 -56
  441. package/dist/lib/jsts/org/locationtech/jts/operation/valid/IsValidOp.js +0 -323
  442. package/dist/lib/jsts/org/locationtech/jts/operation/valid/RepeatedPointTester.js +0 -48
  443. package/dist/lib/jsts/org/locationtech/jts/operation/valid/TopologyValidationError.js +0 -44
  444. package/dist/lib/jsts/org/locationtech/jts/operation/valid.js +0 -7
  445. package/dist/lib/jsts/org/locationtech/jts/operation.js +0 -23
  446. package/dist/lib/jsts/org/locationtech/jts/planargraph/DirectedEdge.js +0 -99
  447. package/dist/lib/jsts/org/locationtech/jts/planargraph/DirectedEdgeStar.js +0 -75
  448. package/dist/lib/jsts/org/locationtech/jts/planargraph/Edge.js +0 -46
  449. package/dist/lib/jsts/org/locationtech/jts/planargraph/GraphComponent.js +0 -53
  450. package/dist/lib/jsts/org/locationtech/jts/planargraph/Node.js +0 -55
  451. package/dist/lib/jsts/org/locationtech/jts/planargraph/NodeMap.js +0 -25
  452. package/dist/lib/jsts/org/locationtech/jts/planargraph/PlanarGraph.js +0 -96
  453. package/dist/lib/jsts/org/locationtech/jts/planargraph/Subgraph.js +0 -39
  454. package/dist/lib/jsts/org/locationtech/jts/planargraph/algorithm/ConnectedSubgraphFinder.js +0 -48
  455. package/dist/lib/jsts/org/locationtech/jts/precision/CommonBits.js +0 -86
  456. package/dist/lib/jsts/org/locationtech/jts/precision/CommonBitsOp.js +0 -58
  457. package/dist/lib/jsts/org/locationtech/jts/precision/CommonBitsRemover.js +0 -81
  458. package/dist/lib/jsts/org/locationtech/jts/precision/CoordinatePrecisionReducerFilter.js +0 -24
  459. package/dist/lib/jsts/org/locationtech/jts/precision/EnhancedPrecisionOp.js +0 -109
  460. package/dist/lib/jsts/org/locationtech/jts/precision/GeometryPrecisionReducer.js +0 -80
  461. package/dist/lib/jsts/org/locationtech/jts/precision/MinimumClearance.js +0 -125
  462. package/dist/lib/jsts/org/locationtech/jts/precision/PrecisionReducerCoordinateOperation.js +0 -44
  463. package/dist/lib/jsts/org/locationtech/jts/precision/SimpleMinimumClearance.js +0 -114
  464. package/dist/lib/jsts/org/locationtech/jts/precision.js +0 -17
  465. package/dist/lib/jsts/org/locationtech/jts/shape/GeometricShapeBuilder.js +0 -50
  466. package/dist/lib/jsts/org/locationtech/jts/shape/fractal/HilbertCode.js +0 -109
  467. package/dist/lib/jsts/org/locationtech/jts/shape/fractal/HilbertCurveBuilder.js +0 -44
  468. package/dist/lib/jsts/org/locationtech/jts/shape/fractal/KochSnowflakeBuilder.js +0 -65
  469. package/dist/lib/jsts/org/locationtech/jts/shape/fractal/MortonCode.js +0 -49
  470. package/dist/lib/jsts/org/locationtech/jts/shape/fractal/MortonCurveBuilder.js +0 -43
  471. package/dist/lib/jsts/org/locationtech/jts/shape/fractal/SierpinskiCarpetBuilder.js +0 -52
  472. package/dist/lib/jsts/org/locationtech/jts/shape/random/RandomPointsBuilder.js +0 -60
  473. package/dist/lib/jsts/org/locationtech/jts/shape/random/RandomPointsInGridBuilder.js +0 -71
  474. package/dist/lib/jsts/org/locationtech/jts/simplify/DouglasPeuckerLineSimplifier.js +0 -60
  475. package/dist/lib/jsts/org/locationtech/jts/simplify/DouglasPeuckerSimplifier.js +0 -81
  476. package/dist/lib/jsts/org/locationtech/jts/simplify/LineSegmentIndex.js +0 -58
  477. package/dist/lib/jsts/org/locationtech/jts/simplify/TaggedLineSegment.js +0 -26
  478. package/dist/lib/jsts/org/locationtech/jts/simplify/TaggedLineString.js +0 -71
  479. package/dist/lib/jsts/org/locationtech/jts/simplify/TaggedLineStringSimplifier.js +0 -124
  480. package/dist/lib/jsts/org/locationtech/jts/simplify/TaggedLinesSimplifier.js +0 -25
  481. package/dist/lib/jsts/org/locationtech/jts/simplify/TopologyPreservingSimplifier.js +0 -79
  482. package/dist/lib/jsts/org/locationtech/jts/simplify/VWLineSimplifier.js +0 -126
  483. package/dist/lib/jsts/org/locationtech/jts/simplify/VWSimplifier.js +0 -81
  484. package/dist/lib/jsts/org/locationtech/jts/simplify.js +0 -9
  485. package/dist/lib/jsts/org/locationtech/jts/triangulate/ConformingDelaunayTriangulationBuilder.js +0 -90
  486. package/dist/lib/jsts/org/locationtech/jts/triangulate/ConformingDelaunayTriangulator.js +0 -215
  487. package/dist/lib/jsts/org/locationtech/jts/triangulate/ConstraintEnforcementException.js +0 -27
  488. package/dist/lib/jsts/org/locationtech/jts/triangulate/ConstraintSplitPointFinder.js +0 -3
  489. package/dist/lib/jsts/org/locationtech/jts/triangulate/ConstraintVertex.js +0 -32
  490. package/dist/lib/jsts/org/locationtech/jts/triangulate/ConstraintVertexFactory.js +0 -3
  491. package/dist/lib/jsts/org/locationtech/jts/triangulate/DelaunayTriangulationBuilder.js +0 -80
  492. package/dist/lib/jsts/org/locationtech/jts/triangulate/IncrementalDelaunayTriangulator.js +0 -46
  493. package/dist/lib/jsts/org/locationtech/jts/triangulate/MidpointSplitPointFinder.js +0 -12
  494. package/dist/lib/jsts/org/locationtech/jts/triangulate/NonEncroachingSplitPointFinder.js +0 -27
  495. package/dist/lib/jsts/org/locationtech/jts/triangulate/Segment.js +0 -73
  496. package/dist/lib/jsts/org/locationtech/jts/triangulate/SplitSegment.js +0 -51
  497. package/dist/lib/jsts/org/locationtech/jts/triangulate/VertexTaggedGeometryDataMapper.js +0 -44
  498. package/dist/lib/jsts/org/locationtech/jts/triangulate/VoronoiDiagramBuilder.js +0 -78
  499. package/dist/lib/jsts/org/locationtech/jts/triangulate/quadedge/EdgeConnectedTriangleTraversal.js +0 -35
  500. package/dist/lib/jsts/org/locationtech/jts/triangulate/quadedge/LastFoundQuadEdgeLocator.js +0 -31
  501. package/dist/lib/jsts/org/locationtech/jts/triangulate/quadedge/LocateFailureException.js +0 -32
  502. package/dist/lib/jsts/org/locationtech/jts/triangulate/quadedge/QuadEdge.js +0 -142
  503. package/dist/lib/jsts/org/locationtech/jts/triangulate/quadedge/QuadEdgeLocator.js +0 -3
  504. package/dist/lib/jsts/org/locationtech/jts/triangulate/quadedge/QuadEdgeSubdivision.js +0 -443
  505. package/dist/lib/jsts/org/locationtech/jts/triangulate/quadedge/QuadEdgeTriangle.js +0 -184
  506. package/dist/lib/jsts/org/locationtech/jts/triangulate/quadedge/QuadEdgeUtil.js +0 -12
  507. package/dist/lib/jsts/org/locationtech/jts/triangulate/quadedge/TraversalVisitor.js +0 -3
  508. package/dist/lib/jsts/org/locationtech/jts/triangulate/quadedge/TrianglePredicate.js +0 -106
  509. package/dist/lib/jsts/org/locationtech/jts/triangulate/quadedge/TriangleVisitor.js +0 -3
  510. package/dist/lib/jsts/org/locationtech/jts/triangulate/quadedge/Vertex.js +0 -199
  511. package/dist/lib/jsts/org/locationtech/jts/triangulate/quadedge.js +0 -5
  512. package/dist/lib/jsts/org/locationtech/jts/triangulate.js +0 -11
  513. package/dist/lib/jsts/org/locationtech/jts/util/Assert.js +0 -37
  514. package/dist/lib/jsts/org/locationtech/jts/util/AssertionFailedException.js +0 -15
  515. package/dist/lib/jsts/org/locationtech/jts/util/CollectionUtil.js +0 -27
  516. package/dist/lib/jsts/org/locationtech/jts/util/CoordinateArrayFilter.js +0 -21
  517. package/dist/lib/jsts/org/locationtech/jts/util/CoordinateCountFilter.js +0 -18
  518. package/dist/lib/jsts/org/locationtech/jts/util/GeometricShapeFactory.js +0 -258
  519. package/dist/lib/jsts/org/locationtech/jts/util/IntArrayList.js +0 -42
  520. package/dist/lib/jsts/org/locationtech/jts/util/Memory.js +0 -41
  521. package/dist/lib/jsts/org/locationtech/jts/util/NumberUtil.js +0 -5
  522. package/dist/lib/jsts/org/locationtech/jts/util/ObjectCounter.js +0 -36
  523. package/dist/lib/jsts/org/locationtech/jts/util/PriorityQueue.js +0 -56
  524. package/dist/lib/jsts/org/locationtech/jts/util/StringUtil.js +0 -63
  525. package/dist/lib/jsts/org/locationtech/jts/util/TestBuilderProxy.js +0 -33
  526. package/dist/lib/jsts/org/locationtech/jts/util/UniqueCoordinateArrayFilter.js +0 -31
  527. package/dist/lib/jsts/org/locationtech/jts/util.js +0 -21
  528. package/dist/lib/jsts/package.json +0 -66
@@ -318,7 +318,7 @@ var k4=function(){return"undefined"!=typeof window?window:"undefined"!=typeof gl
318
318
  * By Jimmy Wärting, https://github.com/jimmywarting
319
319
  * License: MIT
320
320
  * See https://github.com/eligrey/Blob.js/blob/master/LICENSE.md
321
- */k4.URL=k4.URL||k4.webkitURL||function(t,e){return(e=document.createElement("a")).href=t,e};var N4=k4.Blob,R4=URL.createObjectURL,U4=URL.revokeObjectURL,D4=k4.Symbol&&k4.Symbol.toStringTag,Q4=!1,G4=!1,j4=!!k4.ArrayBuffer,H4=O4&&O4.prototype.append&&O4.prototype.getBlob;try{Q4=2===new Blob(["ä"]).size,G4=2===new Blob([new Uint8Array([1,2])]).size}catch(OR){}function z4(t){return t.map((function(t){if(t.buffer instanceof ArrayBuffer){var e=t.buffer;if(t.byteLength!==e.byteLength){var r=new Uint8Array(t.byteLength);r.set(new Uint8Array(e,t.byteOffset,t.byteLength)),e=r.buffer}return e}return t}))}function V4(t,e){e=e||{};var r=new O4;return z4(t).forEach((function(t){r.append(t)})),e.type?r.getBlob(e.type):r.getBlob()}function K4(t,e){return new N4(z4(t),e||{})}if(k4.Blob&&(V4.prototype=Blob.prototype,K4.prototype=Blob.prototype),D4)try{File.prototype[D4]="File",Blob.prototype[D4]="Blob",FileReader.prototype[D4]="FileReader"}catch(OR){}function q4(){var t=!!k4.ActiveXObject||"-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style,e=k4.XMLHttpRequest&&k4.XMLHttpRequest.prototype.send;t&&e&&(XMLHttpRequest.prototype.send=function(t){t instanceof Blob?(this.setRequestHeader("Content-Type",t.type),e.call(this,t)):e.call(this,t)});try{new File([],"")}catch(n){try{var r=new Function('class File extends Blob {constructor(chunks, name, opts) {opts = opts || {};super(chunks, opts || {});this.name = name;this.lastModifiedDate = opts.lastModified ? new Date(opts.lastModified) : new Date;this.lastModified = +this.lastModifiedDate;}};return new File([], ""), File')();k4.File=r}catch(i){r=function(t,e,r){var n=new Blob(t,r),i=r&&void 0!==r.lastModified?new Date(r.lastModified):new Date;return n.name=e,n.lastModifiedDate=i,n.lastModified=+i,n.toString=function(){return"[object File]"},D4&&(n[D4]="File"),n},k4.File=r}}}Q4?(q4(),k4.Blob=G4?k4.Blob:K4):H4?(q4(),k4.Blob=V4):function(){function t(t){for(var e=[],r=0;r<t.length;r++){var n=t.charCodeAt(r);n<128?e.push(n):n<2048?e.push(192|n>>6,128|63&n):n<55296||n>=57344?e.push(224|n>>12,128|n>>6&63,128|63&n):(r++,n=65536+((1023&n)<<10|1023&t.charCodeAt(r)),e.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return e}function e(t){var e,r,n,i,o,s;for(e="",n=t.length,r=0;r<n;)switch((i=t[r++])>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:e+=String.fromCharCode(i);break;case 12:case 13:o=t[r++],e+=String.fromCharCode((31&i)<<6|63&o);break;case 14:o=t[r++],s=t[r++],e+=String.fromCharCode((15&i)<<12|(63&o)<<6|(63&s)<<0)}return e}function r(t){for(var e=new Array(t.byteLength),r=new Uint8Array(t),n=e.length;n--;)e[n]=r[n];return e}function n(t){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r=[],n=0;n<t.length;n+=3){var i=t[n],o=n+1<t.length,s=o?t[n+1]:0,a=n+2<t.length,l=a?t[n+2]:0,u=i>>2,h=(3&i)<<4|s>>4,c=(15&s)<<2|l>>6,A=63&l;a||(A=64,o||(c=64)),r.push(e[u],e[h],e[c],e[A])}return r.join("")}var i=Object.create||function(t){function e(){}return e.prototype=t,new e};if(j4)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(t){return t&&o.indexOf(Object.prototype.toString.call(t))>-1};function a(e,n){for(var i=0,o=(e=e||[]).length;i<o;i++){var l=e[i];l instanceof a?e[i]=l._buffer:"string"==typeof l?e[i]=t(l):j4&&(ArrayBuffer.prototype.isPrototypeOf(l)||s(l))?e[i]=r(l):j4&&(u=l)&&DataView.prototype.isPrototypeOf(u)?e[i]=r(l.buffer):e[i]=t(String(l))}var u;this._buffer=[].concat.apply([],e),this.size=this._buffer.length,this.type=n&&n.type||""}function l(t,e,r){r=r||{};var n=a.call(this,t,r)||this;return n.name=e,n.lastModifiedDate=r.lastModified?new Date(r.lastModified):new Date,n.lastModified=+n.lastModifiedDate,n}if(a.prototype.slice=function(t,e,r){return new a([this._buffer.slice(t||0,e||this._buffer.length)],{type:r})},a.prototype.toString=function(){return"[object Blob]"},l.prototype=i(a.prototype),l.prototype.constructor=l,Object.setPrototypeOf)Object.setPrototypeOf(l,a);else try{l.__proto__=a}catch(OR){}function u(){if(!(this instanceof u))throw new TypeError("Failed to construct 'FileReader': Please use the 'new' operator, this DOM object constructor cannot be called as a function.");var t=document.createDocumentFragment();this.addEventListener=t.addEventListener,this.dispatchEvent=function(e){var r=this["on"+e.type];"function"==typeof r&&r(e),t.dispatchEvent(e)},this.removeEventListener=t.removeEventListener}function h(t,e,r){if(!(e instanceof a))throw new TypeError("Failed to execute '"+r+"' on 'FileReader': parameter 1 is not of type 'Blob'.");t.result="",setTimeout((function(){this.readyState=u.LOADING,t.dispatchEvent(new Event("load")),t.dispatchEvent(new Event("loadend"))}))}l.prototype.toString=function(){return"[object File]"},u.EMPTY=0,u.LOADING=1,u.DONE=2,u.prototype.error=null,u.prototype.onabort=null,u.prototype.onerror=null,u.prototype.onload=null,u.prototype.onloadend=null,u.prototype.onloadstart=null,u.prototype.onprogress=null,u.prototype.readAsDataURL=function(t){h(this,t,"readAsDataURL"),this.result="data:"+t.type+";base64,"+n(t._buffer)},u.prototype.readAsText=function(t){h(this,t,"readAsText"),this.result=e(t._buffer)},u.prototype.readAsArrayBuffer=function(t){h(this,t,"readAsText"),this.result=t._buffer.slice()},u.prototype.abort=function(){},URL.createObjectURL=function(t){return t instanceof a?"data:"+t.type+";base64,"+n(t._buffer):R4.call(URL,t)},URL.revokeObjectURL=function(t){U4&&U4.call(URL,t)};var c=k4.XMLHttpRequest&&k4.XMLHttpRequest.prototype.send;c&&(XMLHttpRequest.prototype.send=function(t){t instanceof a?(this.setRequestHeader("Content-Type",t.type),c.call(this,e(t._buffer))):c.call(this,t)}),k4.FileReader=u,k4.File=l,k4.Blob=a}();var W4="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";void 0===k4.btoa&&(k4.btoa=function(t){var e,r,n,i,o,s=0,a=0,l="",u=[];if(!t)return t;do{e=(o=t.charCodeAt(s++)<<16|t.charCodeAt(s++)<<8|t.charCodeAt(s++))>>18&63,r=o>>12&63,n=o>>6&63,i=63&o,u[a++]=W4.charAt(e)+W4.charAt(r)+W4.charAt(n)+W4.charAt(i)}while(s<t.length);l=u.join("");var h=t.length%3;return(h?l.slice(0,h-3):l)+"===".slice(h||3)}),void 0===k4.atob&&(k4.atob=function(t){var e,r,n,i,o,s,a=0,l=0,u=[];if(!t)return t;t+="";do{e=(s=W4.indexOf(t.charAt(a++))<<18|W4.indexOf(t.charAt(a++))<<12|(i=W4.indexOf(t.charAt(a++)))<<6|(o=W4.indexOf(t.charAt(a++))))>>16&255,r=s>>8&255,n=255&s,u[l++]=64==i?String.fromCharCode(e):64==o?String.fromCharCode(e,r):String.fromCharCode(e,r,n)}while(a<t.length);return u.join("")});class X4 extends Ca{constructor(t){const r=t||{};let n=document.createElement("div");n.setAttribute("id","mouse-position"),n.innerHTML="",n.style.float="right",n.style.left=" 0px",n.style.right="0px",n.style.bottom="0px";var i=document.createElement("div");i.setAttribute("id","locationbar"),i.style.position="absolute",i.style.zIndex="991",i.style.padding=" 3px 10px",i.style.fontSize=" 13px",i.style.color="#e9e9e9",i.style.textShadow="2px 2px 2px #000",i.style.backgroundColor="rgba(0,0,0,.4)",i.style.minHeight="26px",i.style.left=" 0px",i.style.right="0px",i.style.bottom="0px",i.appendChild(n),super({element:i,target:r.target}),e(this,"_mouseposition"),this._mouseposition=n}show(){this.element.style.display="block"}hide(){this.element.style.display="none"}updateMousePosition(t){this._mouseposition.innerHTML=t}}class Y4 extends Ca{constructor(t,r,n){const i=t||{},o=new Image;o.src="image/basemaps/bingimage.png",o.className="mirage-mapswitch-image";const s=document.createElement("div");s.className="mirage-mapswitch-button-itemLabel",s.innerHTML="天地图影像";const a=document.createElement("div");a.className="mirage-mapswitch-button mirage-mapswitch-toolbar-button",a.appendChild(o),a.appendChild(s);const l=document.createElement("div");l.className="mirage-mapswitch-box";const u=document.createElement("div");u.className="mirage-mapswitch-baseLayerPicker-dropDown",u.style.maxHeight="300px",r.forEach((t=>{const e=new Image;e.src=t.icon,e.className="mirage-mapswitch-baseLayerPicker-itemIcon";const r=document.createElement("div");r.className="mirage-mapswitch-baseLayerPicker-itemLabel",r.innerHTML=t.name;const i=document.createElement("div");i.className="mirage-mapswitch-baseLayerPicker-item mirage-mapswitch-baseLayerPicker-selectedItem",i.appendChild(e),i.appendChild(r),i.addEventListener("click",(t=>{this._isshow=!1,u.className="mirage-mapswitch-baseLayerPicker-dropDown",o.src=t.currentTarget.children[0].src,s.innerHTML=t.currentTarget.innerText,n(t.currentTarget.innerText)}),!1),u.appendChild(i)})),l.appendChild(a),l.appendChild(u),super({element:l,target:i.target}),e(this,"mouseposition"),e(this,"_isshow"),this._isshow=!1,a.addEventListener("click",this.showSwitch.bind(this),!1)}showSwitch(t){this._isshow=!this._isshow;let e=document.getElementsByClassName("mirage-mapswitch-baseLayerPicker-dropDown");this._isshow?e[0].className="mirage-mapswitch-baseLayerPicker-dropDown mirage-mapswitch-baseLayerPicker-dropDown-visible":e[0].className="mirage-mapswitch-baseLayerPicker-dropDown"}show(){this.element.style.display="block"}hide(){this.element.style.display="none"}}var Z4=function(t){t=t||{};var e=document.createElement("button"),r=document.createElement("div");r.className=(t.className||"ol-swipe")+" ol-unselectable ol-control",r.appendChild(e),r.addEventListener("mousedown",this.move.bind(this)),r.addEventListener("touchstart",this.move.bind(this)),Ca.call(this,{element:r}),this.precomposeRight_=this.precomposeRight.bind(this),this.precomposeLeft_=this.precomposeLeft.bind(this),this.postcompose_=this.postcompose.bind(this),this.layers=[],t.layers&&this.addLayer(t.layers,!1),t.rightLayers&&this.addLayer(t.rightLayers,!0),this.on("propertychange",function(t){if(this.getMap())try{this.getMap().renderSync()}catch(e){}"horizontal"===this.get("orientation")?(this.element.style.top=100*this.get("position")+"%",this.element.style.left=""):("vertical"!==this.get("orientation")&&this.set("orientation","vertical"),this.element.style.left=100*this.get("position")+"%",this.element.style.top=""),"orientation"===t.key&&(this.element.classList.remove("horizontal","vertical"),this.element.classList.add(this.get("orientation"))),this.isMoving||this.layers.forEach((function(t){t.layer.getImageRatio&&t.layer.changed()}))}.bind(this)),this.set("position",t.position||.5),this.set("orientation",t.orientation||"vertical")};vg(Z4,Ca),Z4.prototype.setMap=function(t){var e,r;if(this.getMap()){for(e=0;e<this.layers.length;e++)(r=this.layers[e]).right?r.layer.un(["precompose","prerender"],this.precomposeRight_):r.layer.un(["precompose","prerender"],this.precomposeLeft_),r.layer.un(["postcompose","postrender"],this.postcompose_);try{this.getMap().renderSync()}catch(OR){}}if(Ca.prototype.setMap.call(this,t),t){for(this._listener=[],e=0;e<this.layers.length;e++)(r=this.layers[e]).right?r.layer.on(["precompose","prerender"],this.precomposeRight_):r.layer.on(["precompose","prerender"],this.precomposeLeft_),r.layer.on(["postcompose","postrender"],this.postcompose_);try{t.renderSync()}catch(OR){}}},Z4.prototype.isLayer_=function(t){for(var e=0;e<this.layers.length;e++)if(this.layers[e].layer===t)return e;return-1},Z4.prototype.addLayer=function(t,e){t instanceof Array||(t=[t]);for(var r=0;r<t.length;r++){var n=t[r];if(this.isLayer_(n)<0&&(this.layers.push({layer:n,right:e}),this.getMap())){e?n.on(["precompose","prerender"],this.precomposeRight_):n.on(["precompose","prerender"],this.precomposeLeft_),n.on(["postcompose","postrender"],this.postcompose_);try{this.getMap().renderSync()}catch(OR){}}}},Z4.prototype.removeLayers=function(){var t=[];this.layers.forEach((function(e){t.push(e.layer)})),this.removeLayer(t)},Z4.prototype.removeLayer=function(t){t instanceof Array||(t=[t]);for(var e=0;e<t.length;e++){var r=this.isLayer_(t[e]);r>=0&&this.getMap()&&(this.layers[r].right?t[e].un(["precompose","prerender"],this.precomposeRight_):t[e].un(["precompose","prerender"],this.precomposeLeft_),t[e].un(["postcompose","postrender"],this.postcompose_),this.layers.splice(r,1))}if(this.getMap())try{this.getMap().renderSync()}catch(OR){}},Z4.prototype.getRectangle=function(){var t;return"vertical"===this.get("orientation")?[0,0,(t=this.getMap().getSize())[0]*this.get("position"),t[1]]:[0,0,(t=this.getMap().getSize())[0],t[1]*this.get("position")]},Z4.prototype.move=function(t){var e,r=this;switch(this._movefn||(this._movefn=this.move.bind(this)),t.type){case"touchcancel":case"touchend":case"mouseup":r.isMoving=!1,["mouseup","mousemove","touchend","touchcancel","touchmove"].forEach((function(t){document.removeEventListener(t,r._movefn)})),this.layers.forEach((function(t){t.layer.getImageRatio&&t.layer.changed()}));break;case"mousedown":case"touchstart":r.isMoving=!0,["mouseup","mousemove","touchend","touchcancel","touchmove"].forEach((function(t){document.addEventListener(t,r._movefn)}));case"mousemove":case"touchmove":if(r.isMoving)if("vertical"===r.get("orientation")){var n=t.pageX||t.touches&&t.touches.length&&t.touches[0].pageX||t.changedTouches&&t.changedTouches.length&&t.changedTouches[0].pageX;if(!n)break;n-=r.getMap().getTargetElement().getBoundingClientRect().left+window.pageXOffset-document.documentElement.clientLeft;var i=(e=r.getMap().getSize()[0])-Math.min(Math.max(0,e-n),e);e=i/e,r.set("position",e),r.dispatchEvent({type:"moving",size:[i,r.getMap().getSize()[1]],position:[e,0]})}else{var o=t.pageY||t.touches&&t.touches.length&&t.touches[0].pageY||t.changedTouches&&t.changedTouches.length&&t.changedTouches[0].pageY;if(!o)break;o-=r.getMap().getTargetElement().getBoundingClientRect().top+window.pageYOffset-document.documentElement.clientTop;var s=(e=r.getMap().getSize()[1])-Math.min(Math.max(0,e-o),e);e=s/e,r.set("position",e),r.dispatchEvent({type:"moving",size:[r.getMap().getSize()[0],s],position:[0,e]})}}},Z4.prototype._transformPt=function(t,e){var r=t.inversePixelTransform,n=e[0],i=e[1];return e[0]=r[0]*n+r[2]*i+r[4],e[1]=r[1]*n+r[3]*i+r[5],e},Z4.prototype._drawRect=function(t,e){var r=t.inversePixelTransform;if(r){var n=[[e[0][0],e[0][1]],[e[0][0],e[1][1]],[e[1][0],e[1][1]],[e[1][0],e[0][1]],[e[0][0],e[0][1]]];if(t.context.save(),t.target.getImageRatio){var i=-Math.atan2(t.frameState.pixelToCoordinateTransform[1],t.frameState.pixelToCoordinateTransform[0]);t.context.translate(t.frameState.size[0]/2,t.frameState.size[1]/2),t.context.rotate(i),t.context.translate(-t.frameState.size[0]/2,-t.frameState.size[1]/2)}n.forEach((function(e,n){e=[e[0]*r[0]-e[1]*r[1]+r[4],-e[0]*r[2]+e[1]*r[3]+r[5]],n?t.context.lineTo(e[0],e[1]):t.context.moveTo(e[0],e[1])})),t.context.restore()}else{var o=t.frameState.pixelRatio;t.context.rect(e[0][0]*o,e[0][1]*o,e[1][0]*o,e[1][1]*o)}},Z4.prototype.precomposeLeft=function(t){var e=t.context;if(e instanceof WebGLRenderingContext){if("prerender"===t.type){e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.enable(e.SCISSOR_TEST);var r,n,i=this.getMap().getSize(),o=this._transformPt(t,[0,i[1]]),s=this._transformPt(t,[i[0],0]),a=s[0]-o[0],l=s[1]-o[1];"vertical"===this.get("orientation")?(r=Math.round(a*this.get("position")),n=l):(r=a,n=Math.round(l*this.get("position")),o[1]+=l-n),e.scissor(o[0],o[1],r,n)}}else{var u=t.frameState.size;e.save(),e.beginPath();var h=[[0,0],[u[0],u[1]]];"vertical"===this.get("orientation")?h[1]=[.5*u[0]+this.getMap().getSize()[0]*(this.get("position")-.5),u[1]]:h[1]=[u[0],.5*u[1]+this.getMap().getSize()[1]*(this.get("position")-.5)],this._drawRect(t,h),e.clip()}},Z4.prototype.precomposeRight=function(t){var e=t.context;if(e instanceof WebGLRenderingContext){if("prerender"===t.type){e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.enable(e.SCISSOR_TEST);var r,n,i=this.getMap().getSize(),o=this._transformPt(t,[0,i[1]]),s=this._transformPt(t,[i[0],0]),a=s[0]-o[0],l=s[1]-o[1];"vertical"===this.get("orientation")?(n=l,r=Math.round(a*(1-this.get("position"))),o[0]+=a-r):(r=a,n=Math.round(l*(1-this.get("position")))),e.scissor(o[0],o[1],r,n)}}else{var u=t.frameState.size;e.save(),e.beginPath();var h=[[0,0],[u[0],u[1]]];"vertical"===this.get("orientation")?h[0]=[.5*u[0]+this.getMap().getSize()[0]*(this.get("position")-.5),0]:h[0]=[0,.5*u[1]+this.getMap().getSize()[1]*(this.get("position")-.5)],this._drawRect(t,h),e.clip()}},Z4.prototype.postcompose=function(t){if(t.context instanceof WebGLRenderingContext){if("postrender"===t.type){var e=t.context;e.disable(e.SCISSOR_TEST)}}else t.target.getClassName&&"ol-layer"!==t.target.getClassName()&&t.target.get("declutter")?setTimeout((function(){t.context.restore()}),0):t.context.restore()};class J4{constructor(){e(this,"events",new Map)}on(t,e,r){return this.events.has(t)||this.events.set(t,[]),(this.events.get(t)||[]).push({handler:e,once:r}),()=>{this.off(t,e)}}once(t,e){return this.on(t,e,!0)}fire(t,...e){let r=0;for(;r<(this.events.get(t)||[]).length;){const n=this.events.get(t)||[],{handler:i,once:o}=n[r];o&&n.splice(r--,1),r++,i(...e)}}off(t,e){t&&(e?this.events.set(t,(this.events.get(t)||[]).filter((t=>t.handler!==e))):this.events.set(t,[]))}}class $4 extends J4{constructor(){super(),e(this,"_swipe"),this._swipe=new Z4}show(t,e,r="vertical"){this.fire("show",{swipe:this._swipe,leftlayerID:t,rightlayerID:e}),this._swipe.set("orientation",r)}hide(){this.fire("hide",this._swipe)}}var t6=function(t){t||(t={});var e=this;this.selection_=new Q,this.handles_=new Q,this.overlayLayer_=new ls({source:new ws({features:this.handles_,useSpatialIndex:!1,wrapX:!1}),name:"Transform overlay",displayInLayerSwitcher:!1,style:function(t){return e.style[(t.get("handle")||"default")+(t.get("constraint")||"")+(t.get("option")||"")]}}),Za.call(this,{handleDownEvent:this.handleDownEvent_,handleDragEvent:this.handleDragEvent_,handleMoveEvent:this.handleMoveEvent_,handleUpEvent:this.handleUpEvent_}),this.features_=t.features,"function"==typeof t.filter&&(this._filter=t.filter),this.layers_=t.layers?t.layers instanceof Array?t.layers:[t.layers]:null,this._handleEvent=t.condition||function(){return!0},this.addFn_=t.addCondition||function(){return!1},this.setPointRadius(t.pointRadius),this.set("translateFeature",!1!==t.translateFeature),this.set("translate",!1!==t.translate),this.set("translateBBox",!0===t.translateBBox),this.set("stretch",!1!==t.stretch),this.set("scale",!1!==t.scale),this.set("rotate",!1!==t.rotate),this.set("keepAspectRatio",t.keepAspectRatio||function(t){return t.originalEvent.shiftKey}),this.set("modifyCenter",t.modifyCenter||function(t){return t.originalEvent.metaKey||t.originalEvent.ctrlKey}),this.set("noFlip",t.noFlip||!1),this.set("selection",!1!==t.selection),this.set("hitTolerance",t.hitTolerance||0),this.set("enableRotatedTransform",t.enableRotatedTransform||!1),this.set("keepRectangle",t.keepRectangle||!1),this.on("propertychange",(function(){this.drawSketch_()})),this.setDefaultStyle()};function e6(t,e){var r=(t[0]*e[0]+t[1]*e[1])/(e[0]*e[0]+e[1]*e[1]);return[e[0]*r,e[1]*r]}function r6(t,e){return[e[0]-t[0],e[1]-t[1]]}function n6(t,e){return[t[0]+e[0],t[1]+e[1]]}vg(t6,Za),t6.prototype.Cursors={default:"auto",select:"pointer",translate:"move",rotate:"move",rotate0:"move",scale:"nesw-resize",scale1:"nwse-resize",scale2:"nesw-resize",scale3:"nwse-resize",scalev:"ew-resize",scaleh1:"ns-resize",scalev2:"ew-resize",scaleh3:"ns-resize"},t6.prototype.setMap=function(t){var e=this.getMap();if(e){var r=e.getTargetElement();e.removeLayer(this.overlayLayer_),this.previousCursor_&&r&&(r.style.cursor=this.previousCursor_),this.previousCursor_=void 0}Za.prototype.setMap.call(this,t),this.overlayLayer_.setMap(t),null===t&&this.select(null),null!==t&&(this.isTouch=/touch/.test(t.getViewport().className),this.setDefaultStyle())},t6.prototype.setActive=function(t){this.select(null),this.overlayLayer_.setVisible(t),Za.prototype.setActive.call(this,t)},t6.prototype.setDefaultStyle=function(t){var e=(t=t||{}).pointStroke||new vn({color:[255,0,0,1],width:1}),r=t.stroke||new vn({color:[255,0,0,1],width:1,lineDash:[4,4]}),n=t.fill||new fn({color:[255,0,0,.01]}),i=t.pointFill||new fn({color:[255,255,255,.8]}),o=new ii({fill:i,stroke:e,radius:this.isTouch?12:6,displacement:this.isTouch?[24,-24]:[12,-12],points:15});o.setDisplacement||(o.getAnchor()[0]=this.isTouch?-10:-5);var s=new ii({fill:i,stroke:e,radius:this.isTouch?16:8,points:4,angle:Math.PI/4}),a=new ii({fill:i,stroke:e,radius:this.isTouch?12:6,points:4,angle:Math.PI/4});function l(t,e,r){return[new Ai({image:t,stroke:e,fill:r})]}this.style={default:l(s,r,n),translate:l(s,e,i),rotate:l(o,e,i),rotate0:l(s,e,i),scale:l(s,e,i),scale1:l(s,e,i),scale2:l(s,e,i),scale3:l(s,e,i),scalev:l(a,e,i),scaleh1:l(a,e,i),scalev2:l(a,e,i),scaleh3:l(a,e,i)},this.drawSketch_()},t6.prototype.setStyle=function(t,e){if(e){this.style[t]=e instanceof Array?e:[e];for(var r=0;r<this.style[t].length;r++){var n=this.style[t][r].getImage();n&&("rotate"==t&&(n.getAnchor()[0]=-5),this.isTouch&&n.setScale(1.8));var i=this.style[t][r].getText();i&&("rotate"==t&&i.setOffsetX(this.isTouch?14:7),this.isTouch&&i.setScale(1.8))}this.drawSketch_()}},t6.prototype.getFeatureAtPixel_=function(t){var e=this;return this.getMap().forEachFeatureAtPixel(t,(function(t,r){var n=!1;if(!r){if(t===e.bbox_)return!!e.get("translateBBox")&&{feature:t,handle:"translate",constraint:"",option:""};if(e.handles_.forEach((function(e){e===t&&(n=!0)})),n)return{feature:t,handle:t.get("handle"),constraint:t.get("constraint"),option:t.get("option")}}if(!e.get("selection"))return e.selection_.getArray().some((function(e){return t===e}))?{feature:t}:null;if(e._filter)return e._filter(t,r)?{feature:t}:null;if(e.layers_){for(var i=0;i<e.layers_.length;i++)if(e.layers_[i]===r)return{feature:t};return null}return e.features_?(e.features_.forEach((function(e){e===t&&(n=!0)})),n?{feature:t}:null):{feature:t}}),{hitTolerance:this.get("hitTolerance")})||{}},t6.prototype.getGeometryRotateToZero_=function(t,e){var r=t.getGeometry(),n=this.getMap().getView().getRotation();if(0===n||!this.get("enableRotatedTransform"))return e?r.clone():r;var i=r.clone();return i.rotate(-1*n,this.getMap().getView().getCenter()),i},t6.prototype._isRectangle=function(t){return!(!this.get("keepRectangle")||"Polygon"!==t.getType())&&5===t.getCoordinates()[0].length},t6.prototype.drawSketch_=function(t){var e,r,n,i=this.selection_.item(0)&&this._isRectangle(this.selection_.item(0).getGeometry());if(this.overlayLayer_.getSource().clear(),this.selection_.getLength()){var o,s=this.getMap().getView().getRotation(),a=this.getGeometryRotateToZero_(this.selection_.item(0)).getExtent();i&&(o=this.getGeometryRotateToZero_(this.selection_.item(0)).getCoordinates()[0].slice(0,4)).unshift(o[3]),a=mt(a,0),this.selection_.forEach(function(t){var e=this.getGeometryRotateToZero_(t).getExtent();Ft(a,e)}.bind(this));var l=1===this.selection_.getLength()?this._pointRadius(this.selection_.item(0)):0;if(!l||l instanceof Array||(l=[l,l]),!0===t)this.ispt_||(this.overlayLayer_.getSource().addFeature(new z({geometry:new Vr(this.center_),handle:"rotate0"})),n=cn(a),this.get("enableRotatedTransform")&&0!==s&&n.rotate(s,this.getMap().getView().getCenter()),r=this.bbox_=new z(n),this.overlayLayer_.getSource().addFeature(r));else{if(this.ispt_){var u=this.getMap().getPixelFromCoordinate([a[0],a[1]]);if(u){var h=l&&l[0]||10,c=l&&l[1]||10;a=yt([this.getMap().getCoordinateFromPixel([u[0]-h,u[1]-c]),this.getMap().getCoordinateFromPixel([u[0]+h,u[1]+c])])}}n=i?new hn([o]):cn(a),this.get("enableRotatedTransform")&&0!==s&&n.rotate(s,this.getMap().getView().getCenter()),r=this.bbox_=new z(n);var A=[],f=n.getCoordinates()[0];if(!this.ispt_||l){if(A.push(r),!this.iscircle_&&!this.ispt_&&this.get("stretch")&&this.get("scale"))for(e=0;e<f.length-1;e++)r=new z({geometry:new Vr([(f[e][0]+f[e+1][0])/2,(f[e][1]+f[e+1][1])/2]),handle:"scale",constraint:e%2?"h":"v",option:e}),A.push(r);if(this.get("scale"))for(e=0;e<f.length-1;e++)r=new z({geometry:new Vr(f[e]),handle:"scale",option:e}),A.push(r);this.get("translate")&&!this.get("translateFeature")&&(r=new z({geometry:new Vr([(f[0][0]+f[2][0])/2,(f[0][1]+f[2][1])/2]),handle:"translate"}),A.push(r))}!this.iscircle_&&this.get("rotate")&&(r=new z({geometry:new Vr(f[3]),handle:"rotate"}),A.push(r)),this.overlayLayer_.getSource().addFeatures(A)}}},t6.prototype.select=function(t,e){if(!t)return this.selection_.clear(),void this.drawSketch_();if(t.getGeometry&&t.getGeometry()){if(e)this.selection_.push(t);else{var r=this.selection_.getArray().indexOf(t);this.selection_.removeAt(r)}this.ispt_=1===this.selection_.getLength()&&"Point"==this.selection_.item(0).getGeometry().getType(),this.iscircle_=1===this.selection_.getLength()&&"Circle"==this.selection_.item(0).getGeometry().getType(),this.drawSketch_(),this.watchFeatures_(),this.dispatchEvent({type:"select",feature:t,features:this.selection_})}},t6.prototype.setSelection=function(t){this.selection_.clear(),t.forEach(function(t){this.selection_.push(t)}.bind(this)),this.ispt_=1===this.selection_.getLength()&&"Point"==this.selection_.item(0).getGeometry().getType(),this.iscircle_=1===this.selection_.getLength()&&"Circle"==this.selection_.item(0).getGeometry().getType(),this.drawSketch_(),this.watchFeatures_(),this.dispatchEvent({type:"select",features:this.selection_})},t6.prototype.watchFeatures_=function(){this._featureListeners&&this._featureListeners.forEach((function(t){M(t)})),this._featureListeners=[],this.selection_.forEach(function(t){this._featureListeners.push(t.on("change",function(){this.isUpdating_||this.drawSketch_()}.bind(this)))}.bind(this))},t6.prototype.handleDownEvent_=function(t){if(this._handleEvent(t,this.selection_)){var e=this.getFeatureAtPixel_(t.pixel),r=e.feature;if(this.selection_.getLength()&&this.selection_.getArray().indexOf(r)>=0&&(this.ispt_&&this.get("translate")||this.get("translateFeature"))&&(e.handle="translate"),e.handle){this.mode_=e.handle,this.opt_=e.option,this.constraint_=e.constraint;var n=this.getMap().getView().getRotation();this.coordinate_=t.coordinate,this.pixel_=t.pixel,this.geoms_=[],this.rotatedGeoms_=[];for(var i,o=[1/0,1/0,-1/0,-1/0],s=[1/0,1/0,-1/0,-1/0],a=0;i=this.selection_.item(a);a++)if(this.geoms_.push(i.getGeometry().clone()),o=Ft(o,i.getGeometry().getExtent()),this.get("enableRotatedTransform")&&0!==n){var l=this.getGeometryRotateToZero_(i,!0);this.rotatedGeoms_.push(l),s=Ft(s,l.getExtent())}if(this.extent_=cn(o).getCoordinates()[0],this.get("enableRotatedTransform")&&0!==n&&(this.rotatedExtent_=cn(s).getCoordinates()[0]),"rotate"===this.mode_){this.center_=this.getCenter()||Ut(o);var u=t.map.getTargetElement();u.style.cursor=this.Cursors.rotate0,this.previousCursor_=u.style.cursor}else this.center_=Ut(o);return this.angle_=Math.atan2(this.center_[1]-t.coordinate[1],this.center_[0]-t.coordinate[0]),this.dispatchEvent({type:this.mode_+"start",feature:this.selection_.item(0),features:this.selection_,pixel:t.pixel,coordinate:t.coordinate}),!0}if(this.get("selection")){if(r){this.addFn_(t)||this.selection_.clear();var h=this.selection_.getArray().indexOf(r);h<0?this.selection_.push(r):this.selection_.removeAt(h)}else this.selection_.clear();return this.ispt_=1===this.selection_.getLength()&&"Point"==this.selection_.item(0).getGeometry().getType(),this.iscircle_=1===this.selection_.getLength()&&"Circle"==this.selection_.item(0).getGeometry().getType(),this.drawSketch_(),this.watchFeatures_(),this.dispatchEvent({type:"select",feature:r,features:this.selection_,pixel:t.pixel,coordinate:t.coordinate}),!1}}},t6.prototype.getFeatures=function(){return this.selection_},t6.prototype.getCenter=function(){return this.get("center")},t6.prototype.setCenter=function(t){return this.set("center",t)},t6.prototype.handleDragEvent_=function(t){if(this._handleEvent(t,this.features_)){var e,r,n,i,o=this.getMap().getView().getRotation(),s=[this.coordinate_[0],this.coordinate_[1]],a=[t.coordinate[0],t.coordinate[1]];switch(this.isUpdating_=!0,this.mode_){case"rotate":var l=Math.atan2(this.center_[1]-a[1],this.center_[0]-a[0]);if(!this.ispt)for(e=0;n=this.selection_.item(e);e++)(i=this.geoms_[e].clone()).rotate(l-this.angle_,this.center_),"Circle"==i.getType()&&i.setCenterAndRadius(i.getCenter(),i.getRadius()),n.setGeometry(i);this.drawSketch_(!0),this.dispatchEvent({type:"rotating",feature:this.selection_.item(0),features:this.selection_,angle:l-this.angle_,pixel:t.pixel,coordinate:t.coordinate});break;case"translate":var u=a[0]-s[0],h=a[1]-s[1];for(e=0;n=this.selection_.item(e);e++)n.getGeometry().translate(u,h);this.handles_.forEach((function(t){t.getGeometry().translate(u,h)})),this.coordinate_=t.coordinate,this.dispatchEvent({type:"translating",feature:this.selection_.item(0),features:this.selection_,delta:[u,h],pixel:t.pixel,coordinate:t.coordinate});break;case"scale":var c=this.center_;if(this.get("modifyCenter")(t)){var A=this.extent_;this.get("enableRotatedTransform")&&0!==o&&(A=this.rotatedExtent_),c=A[(Number(this.opt_)+2)%4]}var f=1==this.geoms_.length&&this._isRectangle(this.geoms_[0]),p=this.constraint_,d=this.opt_,g=this.coordinate_,y=t.coordinate;if(this.get("enableRotatedTransform")&&0!==o){var m=new Vr(this.coordinate_);m.rotate(-1*o,c),g=m.getCoordinates();var v=new Vr(t.coordinate);v.rotate(-1*o,c),y=v.getCoordinates()}var _=(y[0]-c[0])/(g[0]-c[0]),w=(y[1]-c[1])/(g[1]-c[1]),b=[y[0]-g[0],y[1]-g[1]];if(this.get("enableRotatedTransform")&&0!==o){var x=new Vr(c);x.rotate(-1*o,this.getMap().getView().getCenter()),c=x.getCoordinates()}for(this.get("noFlip")&&(_<0&&(_=-_),w<0&&(w=-w)),this.constraint_?"h"==this.constraint_?_=1:w=1:this.get("keepAspectRatio")(t)&&(_=w=Math.min(_,w)),e=0;n=this.selection_.item(e);e++)(i=0!==o&&this.get("enableRotatedTransform")?this.rotatedGeoms_[e].clone():this.geoms_[e].clone()).applyTransform((function(t,e,n){if(n<2)return e;if(f){var o=[[6],[0,8],[2],[4]],s=[t[0],t[1]],a=[t[2],t[3]],l=[t[4],t[5]],u=[t[6],t[7]],h=[t[8],t[9]];if(p){var A=d%2==0?r6(s,a):r6(u,s),g=e6(b,A),m=[...o[d],...o[d+1<o.length?d+1:0]];for(r=0;r<t.length;r+=n)e[r]=m.includes(r)?t[r]+g[0]:t[r],e[r+1]=m.includes(r)?t[r+1]+g[1]:t[r+1]}else{var v,x;switch(d){case 0:v=e6(b=r6(u,y),r6(l,u)),x=e6(b,r6(s,u)),[e[0],e[1]]=n6(s,v),[e[4],e[5]]=n6(l,x),[e[6],e[7]]=n6(u,b),[e[8],e[9]]=n6(h,v);break;case 1:v=e6(b=r6(s,y),r6(u,s)),x=e6(b,r6(a,s)),[e[0],e[1]]=n6(s,b),[e[2],e[3]]=n6(a,v),[e[6],e[7]]=n6(u,x),[e[8],e[9]]=n6(h,b);break;case 2:v=e6(b=r6(a,y),r6(s,a)),x=e6(b,r6(l,a)),[e[0],e[1]]=n6(s,x),[e[2],e[3]]=n6(a,b),[e[4],e[5]]=n6(l,v),[e[8],e[9]]=n6(h,x);break;case 3:v=e6(b=r6(l,y),r6(a,l)),x=e6(b,r6(u,l)),[e[2],e[3]]=n6(a,x),[e[4],e[5]]=n6(l,b),[e[6],e[7]]=n6(u,v)}}}else for(r=0;r<t.length;r+=n)1!=_&&(e[r]=c[0]+(t[r]-c[0])*_),1!=w&&(e[r+1]=c[1]+(t[r+1]-c[1])*w);return"Circle"==i.getType()&&i.setCenterAndRadius(i.getCenter(),i.getRadius()),e})),this.get("enableRotatedTransform")&&0!==o&&i.rotate(o,this.getMap().getView().getCenter()),n.setGeometry(i);this.drawSketch_(),this.dispatchEvent({type:"scaling",feature:this.selection_.item(0),features:this.selection_,scale:[_,w],pixel:t.pixel,coordinate:t.coordinate})}this.isUpdating_=!1}},t6.prototype.handleMoveEvent_=function(t){if(this._handleEvent(t,this.features_)&&!this.mode_){var e=this.getFeatureAtPixel_(t.pixel),r=t.map.getTargetElement();if(e.feature){var n=e.handle?this.Cursors[(e.handle||"default")+(e.constraint||"")+(e.option||"")]:this.Cursors.select;void 0===this.previousCursor_&&(this.previousCursor_=r.style.cursor),r.style.cursor=n}else void 0!==this.previousCursor_&&(r.style.cursor=this.previousCursor_),this.previousCursor_=void 0}},t6.prototype.handleUpEvent_=function(t){return"rotate"===this.mode_&&(t.map.getTargetElement().style.cursor=this.Cursors.default,this.previousCursor_=void 0),this.dispatchEvent({type:this.mode_+"end",feature:this.selection_.item(0),features:this.selection_,oldgeom:this.geoms_[0],oldgeoms:this.geoms_}),this.drawSketch_(),this.mode_=null,!1},t6.prototype.getFeatures=function(){return this.selection_},t6.prototype.setPointRadius=function(t){this._pointRadius="function"==typeof t?t:function(){return t}};class i6{constructor(t){e(this,"transformInteraction"),this.transformInteraction=new t6({enableRotatedTransform:!1,hitTolerance:2,translateFeature:!0,scale:!0,rotate:!0,keepAspectRatio:!1,keepRectangle:!1,translate:!0,stretch:!0,pointRadius:function(t){let e=t.get("radius")||10;return[e,e]}}),this.transformInteraction.setActive(!1),this.transformInteraction.on(["select"],(t=>{s&&t.features&&t.features.getLength()&&this.transformInteraction.setCenter(t.features.getArray()[0].getGeometry().getFirstCoordinate())}));let r=0,n=10,i=[1,1],o=[0,0],s=!1;this.transformInteraction.on(["rotatestart","translatestart","scalestart"],(function(t){r=t.feature.get("angle")||0,n=t.feature.get("radius")||10,i=t.feature.get("Scale")||[1,1],o=[0,0]})),this.transformInteraction.on("rotating",(t=>{t.feature.set("angle",r-t.angle),t.feature.dispatchEvent({type:"onRotating",data:r-t.angle})})),this.transformInteraction.on("translating",(t=>{o[0]+=t.delta[0],o[1]+=t.delta[1],t.feature.dispatchEvent({type:"onMoveing",data:Ut(t.features.getArray()[0].getGeometry().getExtent())})})),this.transformInteraction.on("scaling",(t=>{if(1===t.features.getLength()){let e=t.features.item(0);e.set("radius",n*Math.abs(t.scale[0])),e.set("Scale",[i[0]*Math.abs(t.scale[0]),i[1]*Math.abs(t.scale[1])]),t.feature.dispatchEvent({type:"onScaling",data:[i[0]*Math.abs(t.scale[0]),i[1]*Math.abs(t.scale[1])]})}})),this.transformInteraction.on(["rotateend","translateend","scaleend"],(t=>{}))}setHandleStyle(){{let t=new ii({fill:new fn({color:[255,255,255,.01]}),stroke:new vn({width:1,color:[0,0,0,.01]}),radius:8,points:10});this.transformInteraction.setStyle("rotate",new Ai({text:new fi({text:"",font:"16px Fontawesome",textAlign:"left",fill:new fn({color:"red"})}),image:t})),this.transformInteraction.setStyle("rotate0",new Ai({text:new fi({text:"",font:"20px Fontawesome",fill:new fn({color:[255,255,255,.8]}),stroke:new vn({width:2,color:"red"})})})),this.transformInteraction.setStyle("translate",new Ai({text:new fi({text:"",font:"20px Fontawesome",fill:new fn({color:[255,255,255,.8]}),stroke:new vn({width:2,color:"red"})})}))}this.transformInteraction.set("translate",this.transformInteraction.get("translate"))}appendTo(t){t.addInteraction(this.transformInteraction)}setActive(t){this.transformInteraction.setActive(t)}}class o6{constructor(){e(this,"data"),e(this,"pi"),e(this,"x_pi"),e(this,"a"),e(this,"ee"),Fd(),Td(yp),this.data=[],this.data.push({dh:13,wkid:4502}),this.data.push({dh:14,wkid:4503}),this.data.push({dh:15,wkid:4504}),this.data.push({dh:16,wkid:4505}),this.data.push({dh:17,wkid:4506}),this.data.push({dh:18,wkid:4507}),this.data.push({dh:19,wkid:4508}),this.data.push({dh:20,wkid:4509}),this.data.push({dh:21,wkid:4510}),this.data.push({dh:22,wkid:4511}),this.data.push({dh:23,wkid:4512}),this.data.push({dh:75,wkid:4534}),this.data.push({dh:78,wkid:4535}),this.data.push({dh:81,wkid:4536}),this.data.push({dh:84,wkid:4537}),this.data.push({dh:87,wkid:4538}),this.data.push({dh:90,wkid:4539}),this.data.push({dh:93,wkid:4540}),this.data.push({dh:96,wkid:4541}),this.data.push({dh:99,wkid:4542}),this.data.push({dh:102,wkid:4543}),this.data.push({dh:105,wkid:4544}),this.data.push({dh:108,wkid:4545}),this.data.push({dh:111,wkid:4546}),this.data.push({dh:114,wkid:4547}),this.data.push({dh:117,wkid:4548}),this.data.push({dh:120,wkid:4549}),this.data.push({dh:123,wkid:4550}),this.data.push({dh:126,wkid:4551}),this.data.push({dh:129,wkid:4552}),this.data.push({dh:132,wkid:4553}),this.data.push({dh:135,wkid:4554}),this.pi=3.141592653589793,this.x_pi=52.35987755982988,this.a=6378245,this.ee=.006693421622965943}ConvertToMapCoord(t,e){return{Coord3857:this.ConvertCoordinatesTo3857(t,e),Coord4326:this.ConvertCoordinatesTo4326(t,e)}}ConvertCoordinatesTo3857(t,e){return-1==t.toUpperCase().indexOf("EPSG:")&&(t="EPSG:"+t),yp(t,"EPSG:3857",e)}ConvertCoordinatesTo4326(t,e){return-1==t.toUpperCase().indexOf("EPSG:")&&(t="EPSG:"+t),yp(t,"EPSG:4326",e)}formatJsonTo3857(t){let e;return e="EPSG:3857"==t.crs.properties.name?(new iA).readFeatures(t):"EPSG:4326"==t.crs.properties.name?(new iA).readFeatures(t,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"}):(new iA).readFeatures(t,{dataProjection:t.crs.properties.name,featureProjection:"EPSG:3857"}),e}formatJsonTo4326Json(t){let e,r=new iA;return e="EPSG:4326"==t.crs.properties.name?r.readFeatures(t):"EPSG:3857"==t.crs.properties.name?r.readFeatures(t,{dataProjection:"EPSG:3857",featureProjection:"EPSG:4326"}):r.readFeatures(t,{dataProjection:t.crs.properties.name,featureProjection:"EPSG:4326"}),r.writeFeaturesObject(e)}formatJsonToPoint(t){let e=this.formatJsonTo3857(t),r=[];return e.forEach((t=>{switch(t.getGeometry().getType()){case"Polygon":r.push(new z({geometry:t.getGeometry().getInteriorPoint(),properties:t.getProperties().properties}));break;case"Point":r.push(t)}})),r}LnglatToCGCS2000(t,e,r=3){let n,i;return n=3==r?3*parseInt(((t+1.5)/3).toString()):6*parseInt(((t+6)/6).toString())-3,this.data.forEach((t=>{t.dh!=n||(i=t.wkid)})),i?yp("EPSG:4326","EPSG:"+i,[t,e]):[0,0]}ConvertWebMercatorToCGCS2000(t,e,r=3){let n=nr([t,e]);return this.LnglatToCGCS2000(n[0],n[1],r)}webMktToLngLat(t){return nr(t)}lngLatToWebMkt(t){return rr(t)}transformLat(t,e){let r=2*t-100+3*e+.2*e*e+.1*t*e+.2*Math.sqrt(Math.abs(t));return r+=2*(20*Math.sin(6*t*this.pi)+20*Math.sin(2*t*this.pi))/3,r+=2*(20*Math.sin(e*this.pi)+40*Math.sin(e/3*this.pi))/3,r+=2*(160*Math.sin(e/12*this.pi)+320*Math.sin(e*this.pi/30))/3,r}transformLon(t,e){let r=300+t+2*e+.1*t*t+.1*t*e+.1*Math.sqrt(Math.abs(t));return r+=2*(20*Math.sin(6*t*this.pi)+20*Math.sin(2*t*this.pi))/3,r+=2*(20*Math.sin(t*this.pi)+40*Math.sin(t/3*this.pi))/3,r+=2*(150*Math.sin(t/12*this.pi)+300*Math.sin(t/30*this.pi))/3,r}transform(t,e){if(this.outOfChina(t,e))return[t,e];let r=this.transformLat(e-105,t-35),n=this.transformLon(e-105,t-35),i=t/180*this.pi,o=Math.sin(i);o=1-this.ee*o*o;let s=Math.sqrt(o);return r=180*r/(this.a*(1-this.ee)/(o*s)*this.pi),n=180*n/(this.a/s*Math.cos(i)*this.pi),[t+r,e+n]}outOfChina(t,e){return e<72.004||e>137.8347||t<.8293||t>55.8271}wgs84ToGcj02(t,e){if(this.outOfChina(t,e))return{lat:t,lon:e};let r=this.transformLat(e-105,t-35),n=this.transformLon(e-105,t-35),i=t/180*this.pi,o=Math.sin(i);o=1-this.ee*o*o;let s=Math.sqrt(o);return r=180*r/(this.a*(1-this.ee)/(o*s)*this.pi),n=180*n/(this.a/s*Math.cos(i)*this.pi),{mgLat:t+r,mgLon:e+n}}gcj02ToWgs84(t,e){let r=this.transform(t,e),n=2*e-r[1];return{latitude:2*t-r[0],lontitude:n}}gcj02ToBd09(t,e){let r=e,n=t,i=Math.sqrt(r*r+n*n)+2e-5*Math.sin(n*this.x_pi),o=Math.atan2(n,r)+3e-6*Math.cos(r*this.x_pi),s=i*Math.cos(o)+.0065;return{tempLat:i*Math.sin(o)+.006,tempLon:s}}bd09ToGcj02(t,e){let r=e-.0065,n=t-.006,i=Math.sqrt(r*r+n*n)-2e-5*Math.sin(n*this.x_pi),o=Math.atan2(n,r)-3e-6*Math.cos(r*this.x_pi),s=i*Math.cos(o);return{tempLat:i*Math.sin(o),tempLon:s}}wgs84ToBd09(t,e){let r=this.wgs84ToGcj02(t,e);return this.gcj02ToBd09(r[0],r[1])}bd09_To_gps84(t,e){let r=this.bd09ToGcj02(t,e),n=this.gcj02ToWgs84(r[0],r[1]);return n[0]=n[0].toFixed(6),n[1]=n[1].toFixed(6),n}}function s6(t){const e=t.frameState,r=lt(t.inversePixelTransform.slice(),e.coordinateToPixelTransform);return new ko(t.context,e.pixelRatio,e.extent,r,e.viewState.rotation)}window.ol&&(ol.util?ol.util.VERSION||(ol.util.VERSION=ol.VERSION||"6.1.0"):ol.util={VERSION:ol.VERSION||"5.3.0"});var a6="6.15.1".split(".");a6=100*parseInt(a6[0])+parseInt(a6[1]);var l6=function(t,e){var r=t.frameState.pixelRatio;if(a6>605&&1!==r&&e.getImage()instanceof Wo){var n=(e=e.clone()).getImage();n.setScale(n.getScale()*r);var i=n.getAnchor();if(n.setDisplacement){var o=n.getDisplacement();o&&(o[0]-=i[0]/r,o[1]+=i[1]/r,n.setAnchor([0,0]))}else i&&(i[0]/=r,i[1]/=r)}return e},u6=function(t){var e=t||{};ls.call(this,e),this.oldcluster=new ws,this.clusters=[],this.animation={start:!1},this.set("animationDuration","number"==typeof e.animationDuration?e.animationDuration:700),this.set("animationMethod",e.animationMethod||Ss),this.getSource().on("change",this.saveCluster.bind(this)),this.on(["precompose","prerender"],this.animate.bind(this)),this.on(["postcompose","postrender"],this.postanimate.bind(this))};vg(u6,ls),u6.prototype.saveCluster=function(){if(this.oldcluster){if(this.oldcluster.clear(),!this.get("animationDuration"))return;var t=this.getSource().getFeatures();t.length&&t[0].get("features")&&(this.oldcluster.addFeatures(this.clusters),this.clusters=t.slice(0),this.sourceChanged=!0)}},u6.prototype.getClusterForFeature=function(t,e){for(var r,n=0;r=e[n];n++){var i=r.get("features");if(i&&i.length)for(var o,s=0;o=i[s];s++)if(t===o)return r}return!1},u6.prototype.stopAnimation=function(){this.animation.start=!1,this.animation.cA=[],this.animation.cB=[]},u6.prototype.animate=function(t){var e=this.get("animationDuration");if(e){var r,n,i=t.frameState.viewState.resolution,o=this.animation,s=t.frameState.time;if(o.resolution!=i&&this.sourceChanged){var a=t.frameState.extent;for(o.resolution<i?(a=mt(a,100*i),o.cA=this.oldcluster.getFeaturesInExtent(a),o.cB=this.getSource().getFeaturesInExtent(a),o.revers=!1):(a=mt(a,100*i),o.cA=this.getSource().getFeaturesInExtent(a),o.cB=this.oldcluster.getFeaturesInExtent(a),o.revers=!0),o.clusters=[],r=0;n=o.cA[r];r++){var l=n.get("features");if(l&&l.length){var u=this.getClusterForFeature(l[0],o.cB);u&&o.clusters.push({f:n,pt:u.getGeometry().getCoordinates()})}}if(o.resolution=i,this.sourceChanged=!1,!o.clusters.length||o.clusters.length>1e3)return void this.stopAnimation();s=o.start=(new Date).getTime()}if(o.start){var h=t.vectorContext||s6(t),c=(s-o.start)/e;c>1&&(this.stopAnimation(),c=1),c=this.get("animationMethod")(c);var A=this.getStyle(),f="function"==typeof A?A:A.length?function(){return A}:function(){return[A]};for(t.context.save(),t.context.globalAlpha=this.getOpacity(),r=0;u=o.clusters[r];r++){var p=u.f.getGeometry().getCoordinates(),d=p[0]-u.pt[0],g=p[1]-u.pt[1];o.revers?(p[0]=u.pt[0]+c*d,p[1]=u.pt[1]+c*g):(p[0]=p[0]-c*d,p[1]=p[1]-c*g);var y=f(u.f,i,!0);if(y.length||(y=[y]),1!==u.f.get("features").length||d||g){var m=new Vr(p);l=new z(m)}else l=u.f.get("features")[0];for(var v,_=0;v=y[_];_++)if(v.getText()&&/\n/.test(v.getText().getText())){var w,b=v.getText().getOffsetX(),x=v.getText().getOffsetY(),C=v.getText().getRotation()||0,S=1.2*Number((v.getText().getFont()||"10px").match(/\d+/)),E=v.getText().getText().split("\n"),B=E.length-1,I=v.clone();E.forEach((function(e,r){switch(1==r&&(I.setImage(),I.setFill(),I.setStroke()),v.getText().getTextBaseline()){case"alphabetic":case"ideographic":case"bottom":w=B;break;case"hanging":case"top":w=0;break;default:w=B/2}I.getText().setOffsetX(b-Math.sin(C)*S*(r-w)),I.getText().setOffsetY(x+Math.cos(C)*S*(r-w)),I.getText().setText(e),h.drawFeature(l,l6(t,I))}))}else h.drawFeature(l,l6(t,v))}t.context.restore(),t.frameState.animate=!0,t.context.save(),t.context.beginPath(),t.context.rect(0,0,0,0),t.context.clip(),this.clip_=!0}}},u6.prototype.postanimate=function(t){this.clip_&&(t.context.restore(),this.clip_=!1)};var h6,c6=function(t){t=t||{},this.pointRadius=t.pointRadius||12,this.circleMaxObjects=t.circleMaxObjects||10,this.maxObjects=t.maxObjects||60,this.spiral=!1!==t.spiral,this.animate=t.animate,this.animationDuration=t.animationDuration||500,this.selectCluster_=!1!==t.selectCluster,this._autoClose=!1!==t.autoClose;var e=this.overlayLayer_=new ls({source:new ws({features:new Q,wrapX:t.wrapX,useSpatialIndex:!0}),name:"Cluster overlay",updateWhileAnimating:!0,updateWhileInteracting:!0,displayInLayerSwitcher:!1,style:t.featureStyle});if(t.layers)if("function"==typeof t.layers){var r=t.layers;t.layers=function(t){return t===e||r(t)}}else t.layers.push&&t.layers.push(this.overlayLayer_);if(t.filter){var n=t.filter;t.filter=function(t,e){return!(!e&&t.get("selectclusterlink"))&&n(t,e)}}else t.filter=function(t,e){return!(!e&&t.get("selectclusterlink"))};this.filter_=t.filter,this._autoClose||t.toggleCondition||(t.toggleCondition=sl),gu.call(this,t),this.on("select",this.selectCluster.bind(this))};vg(c6,gu),c6.prototype.setMap=function(t){this.getMap()&&this.getMap().removeLayer(this.overlayLayer_),this._listener&&M(this._listener),this._listener=null,gu.prototype.setMap.call(this,t),this.overlayLayer_.setMap(t),t&&t.getView()&&(this._listener=t.getView().on("change:resolution",this.clear.bind(this)))},c6.prototype.clear=function(){this.getFeatures().clear(),this.overlayLayer_.getSource().clear()},c6.prototype.getLayer=function(){return this.overlayLayer_},c6.prototype.selectCluster=function(t){if(t instanceof z&&(t={selected:[t]}),t.selected.length){var e=t.selected[0];if(!e.get("selectclusterfeature")){var r=this.overlayLayer_.getSource();this._autoClose&&r.clear();var n=e.get("features");if(n&&1!=n.length){this.selectCluster_||this.getFeatures().clear();var i,o,s,a,l,u,h,c=e.getGeometry().getCoordinates(),A=this.getMap().getView().getResolution(),f=[];if(!this.spiral||n.length<=this.circleMaxObjects)for(a=Math.min(n.length,this.circleMaxObjects),i=A*this.pointRadius*(.5+a/4),s=0;s<a;s++)o=2*Math.PI*s/a,2!=a&&4!=a||(o+=Math.PI/4),l=[c[0]+i*Math.sin(o),c[1]+i*Math.cos(o)],(u=new z({selectclusterfeature:!0,features:[n[s]],geometry:new Vr(l)})).setStyle(n[s].getStyle()),f.push(u),h=new z({selectclusterlink:!0,geometry:new mn([c,l])}),f.push(h);else{o=0;var p=2*this.pointRadius;for(a=Math.min(this.maxObjects,n.length),s=0;s<a;s++){o+=(p+.1)/(i=p/2+p*o/(2*Math.PI));var d=A*i*Math.sin(o),g=A*i*Math.cos(o);l=[c[0]+d,c[1]+g],(u=new z({selectclusterfeature:!0,features:[n[s]],geometry:new Vr(l)})).setStyle(n[s].getStyle()),f.push(u),h=new z({selectclusterlink:!0,geometry:new mn([c,l])}),f.push(h)}}e.set("selectcluserfeatures",f),this.animate?this.animateCluster_(c,f):r.addFeatures(f)}}}else this._autoClose?this.clear():t.deselected.forEach((t=>{var e=t.get("selectcluserfeatures");e&&e.forEach((t=>{this.overlayLayer_.getSource().removeFeature(t)}))}))},c6.prototype.animateCluster_=function(t,e){if(this.listenerKey_&&M(this.listenerKey_),e.length){var r=this.overlayLayer_.getStyle(),n="function"==typeof r?r:r.length?function(){return r}:function(){return[r]},i=this.animationDuration||500,o=(new Date).getTime();this.listenerKey_=this.overlayLayer_.on(["postcompose","postrender"],function(r){for(var s,a=r.vectorContext||s6(r),l=r.frameState.pixelRatio,u=this.getMap().getView().getResolution(),h=Ss((r.frameState.time-o)/i),c=0;s=e[c];c++)if(s.get("features")){var A=s.getGeometry().getCoordinates();A[0]=t[0]+h*(A[0]-t[0]),A[1]=t[1]+h*(A[1]-t[1]);for(var f=new Vr(A),p=n(s,u),d=0;d<p.length;d++){var g,y=!Bu.prototype.getFeaturesAtPixel&&p[d].getImage();y&&(g=y.getScale(),y.setScale(l)),a.setStyle?(a.setStyle(p[d]),a.drawGeometry(f)):(a.setImageStyle(y),a.drawPointGeometry(f)),y&&y.setScale(g)}}if(h>1)return M(this.listenerKey_),this.overlayLayer_.getSource().addFeatures(e),void this.overlayLayer_.changed();r.frameState.animate=!0}.bind(this));var s=new z(new Vr(this.getMap().getView().getCenter()));s.setStyle(new Ai({image:new si({})})),this.overlayLayer_.getSource().addFeature(s)}},c6.prototype.getClusterExtent=function(t){if(!t.get("features"))return null;var e=[1/0,1/0,-1/0,-1/0];return t.get("features").forEach((function(t){e=Ft(e,t.getGeometry().getExtent())})),e[0]===e[2]&&e[1]===e[3]?null:e},function(){var t=function(t,e,r){return(t[0]-r[0])*(e[1]-r[1])-(t[1]-r[1])*(e[0]-r[0])<=0};h6=function(e){var r;e.sort((function(t,e){return t[0]==e[0]?t[1]-e[1]:t[0]-e[0]}));var n=[];for(r=0;r<e.length;r++){for(;n.length>=2&&t(n[n.length-2],n[n.length-1],e[r]);)n.pop();n.push(e[r])}var i=[];for(r=e.length-1;r>=0;r--){for(;i.length>=2&&t(i[i.length-2],i[i.length-1],e[r]);)i.pop();i.push(e[r])}return i.pop(),n.pop(),n.concat(i)};var e=function(t){var r,n,i=[];switch(t.getType()){case"Point":i.push(t.getCoordinates());break;case"LineString":case"LinearRing":case"MultiPoint":i=t.getCoordinates();break;case"MultiLineString":for(n=t.getLineStrings(),r=0;r<n.length;r++)i.concat(e(n[r]));break;case"Polygon":i=e(t.getLinearRing(0));break;case"MultiPolygon":for(n=t.getPolygons(),r=0;r<n.length;r++)i.concat(e(n[r]));break;case"GeometryCollection":for(n=t.getGeometries(),r=0;r<n.length;r++)i.concat(e(n[r]))}return i};_r.prototype.convexHull=function(){return h6(e(this))}}();const A6=h6;var f6=globalThis&&globalThis.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),p6={Point:function(t){return void 0!==t.m&&void 0!==t.z?new Vr([t.x,t.y,t.z,t.m],"XYZM"):void 0!==t.z?new Vr([t.x,t.y,t.z],"XYZ"):void 0!==t.m?new Vr([t.x,t.y,t.m],"XYM"):new Vr([t.x,t.y])},LineString:function(t){var e=m6(t);return new mn(t.paths[0],e)},Polygon:function(t){var e=m6(t);return new hn(t.rings,e)},MultiPoint:function(t){var e=m6(t);return new Wl(t.points,e)},MultiLineString:function(t){var e=m6(t);return new Vl(t.paths,e)},MultiPolygon:function(t){var e=m6(t);return new Jl(t.rings,e)}},d6={Point:function(t,e){var r,n=t.getCoordinates(),i=t.getLayout();return"XYZ"===i?r={x:n[0],y:n[1],z:n[2]}:"XYM"===i?r={x:n[0],y:n[1],m:n[2]}:"XYZM"===i?r={x:n[0],y:n[1],z:n[2],m:n[3]}:"XY"===i?r={x:n[0],y:n[1]}:G(!1,34),r},LineString:function(t,e){var r=v6(t);return{hasZ:r.hasZ,hasM:r.hasM,paths:[t.getCoordinates()]}},Polygon:function(t,e){var r=v6(t);return{hasZ:r.hasZ,hasM:r.hasM,rings:t.getCoordinates(!1)}},MultiPoint:function(t,e){var r=v6(t);return{hasZ:r.hasZ,hasM:r.hasM,points:t.getCoordinates()}},MultiLineString:function(t,e){var r=v6(t);return{hasZ:r.hasZ,hasM:r.hasM,paths:t.getCoordinates()}},MultiPolygon:function(t,e){for(var r=v6(t),n=t.getCoordinates(!1),i=[],o=0;o<n.length;o++)for(var s=n[o].length-1;s>=0;s--)i.push(n[o][s]);return{hasZ:r.hasZ,hasM:r.hasM,rings:i}}},g6=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this)||this).geometryName_=n.geometryName,r}return f6(e,t),e.prototype.readFeatureFromObject=function(t,e,r){var n=t,i=y6(n.geometry,e),o=new z;if(this.geometryName_&&o.setGeometryName(this.geometryName_),o.setGeometry(i),n.attributes){o.setProperties(n.attributes,!0);var s=n.attributes[r];void 0!==s&&o.setId(s)}return o},e.prototype.readFeaturesFromObject=function(t,e){var r=e||{};if(t.features){for(var n=[],i=t.features,o=0,s=i.length;o<s;++o)n.push(this.readFeatureFromObject(i[o],r,t.objectIdFieldName));return n}return[this.readFeatureFromObject(t,r)]},e.prototype.readGeometryFromObject=function(t,e){return y6(t,e)},e.prototype.readProjectionFromObject=function(t){return t.spatialReference&&void 0!==t.spatialReference.wkid?Ye("EPSG:"+t.spatialReference.wkid):null},e.prototype.writeGeometryObject=function(t,e){return _6(t,this.adaptOptions(e))},e.prototype.writeFeatureObject=function(t,e){e=this.adaptOptions(e);var r={};if(!t.hasProperties())return r.attributes={},r;var n=t.getProperties(),i=t.getGeometry();if(i){r.geometry=_6(i,e);var o=e&&(e.dataProjection||e.featureProjection);o&&(r.geometry.spatialReference={wkid:Number(Ye(o).getCode().split(":").pop())}),delete n[t.getGeometryName()]}return x(n)?r.attributes={}:r.attributes=n,r},e.prototype.writeFeaturesObject=function(t,e){e=this.adaptOptions(e);for(var r=[],n=0,i=t.length;n<i;++n)r.push(this.writeFeatureObject(t[n],e));return{features:r}},e}($c);function y6(t,e){var r,n,i;if(!t)return null;if("number"==typeof t.x&&"number"==typeof t.y)i="Point";else if(t.points)i="MultiPoint";else if(t.paths)i=1===t.paths.length?"LineString":"MultiLineString";else if(t.rings){var o=t,s=m6(o),a=function(t,e){var r,n,i=[],o=[],s=[];for(r=0,n=t.length;r<n;++r)i.length=0,Tr(i,0,t[r],e.length),rn(i,0,i.length,e.length)?o.push([t[r]]):s.push(t[r]);for(;s.length;){var a=s.shift(),l=!1;for(r=o.length-1;r>=0;r--){var u=o[r][0];if(bt(new Hr(u).getExtent(),new Hr(a).getExtent())){o[r].push(a),l=!0;break}}l||o.push([a.reverse()])}return o}(o.rings,s);1===a.length?(i="Polygon",t=_({},t,((r={}).rings=a[0],r))):(i="MultiPolygon",t=_({},t,((n={}).rings=a,n)))}return Bh((0,p6[i])(t),!1,e)}function m6(t){var e="XY";return!0===t.hasZ&&!0===t.hasM?e="XYZM":!0===t.hasZ?e="XYZ":!0===t.hasM&&(e="XYM"),e}function v6(t){var e=t.getLayout();return{hasZ:"XYZ"===e||"XYZM"===e,hasM:"XYM"===e||"XYZM"===e}}function _6(t,e){return(0,d6[t.getType()])(Bh(t,!0,e),e)}const w6=g6;var b6="http://www.w3.org/2001/XMLSchema-instance";function x6(t,e){return j6().createElementNS(t,e)}function C6(t,e){return S6(t,e,[]).join("")}function S6(t,e,r){if(t.nodeType==Node.CDATA_SECTION_NODE||t.nodeType==Node.TEXT_NODE)e?r.push(String(t.nodeValue).replace(/(\r\n|\r|\n)/g,"")):r.push(t.nodeValue);else{var n=void 0;for(n=t.firstChild;n;n=n.nextSibling)S6(n,e,r)}return r}function E6(t){return"documentElement"in t}function B6(t){return(new DOMParser).parseFromString(t,"application/xml")}function I6(t,e){return function(r,n){var i=t.call(void 0!==e?e:this,r,n);void 0!==i&&d(n[n.length-1],i)}}function P6(t,e){return function(r,n){var i=t.call(void 0!==e?e:this,r,n);void 0!==i&&n[n.length-1].push(i)}}function F6(t,e){return function(r,n){var i=t.call(void 0!==e?e:this,r,n);void 0!==i&&(n[n.length-1]=i)}}function T6(t,e,r){return function(n,i){var o=t.call(void 0!==r?r:this,n,i);void 0!==o&&(i[i.length-1][void 0!==e?e:n.localName]=o)}}function M6(t,e){return function(r,n,i){t.call(void 0!==e?e:this,r,n,i),i[i.length-1].node.appendChild(r)}}function L6(t,e){var r=t;return function(t,n,i){var o=n[n.length-1].node,s=r;return void 0===s&&(s=i),x6(void 0!==e?e:o.namespaceURI,s)}}var k6=L6();function O6(t,e){for(var r=e.length,n=new Array(r),i=0;i<r;++i)n[i]=t[e[i]];return n}function N6(t,e,r){var n,i,o=void 0!==r?r:{};for(n=0,i=t.length;n<i;++n)o[t[n]]=e;return o}function R6(t,e,r,n){var i;for(i=e.firstElementChild;i;i=i.nextElementSibling){var o=t[i.namespaceURI];if(void 0!==o){var s=o[i.localName];void 0!==s&&s.call(n,i,r)}}}function U6(t,e,r,n,i){return n.push(t),R6(e,r,n,i),n.pop()}function D6(t,e,r,n,i,o,s){return i.push(t),function(t,e,r,n,i,o){for(var s,a,l=(void 0!==i?i:r).length,u=0;u<l;++u)void 0!==(s=r[u])&&void 0!==(a=e.call(void 0!==o?o:this,s,n,void 0!==i?i[u]:void 0))&&t[a.namespaceURI][a.localName].call(o,a,s,n)}(e,r,n,i,o,s),i.pop()}var Q6=void 0,G6=void 0;function j6(){return void 0===G6&&"undefined"!=typeof document&&(G6=document.implementation.createDocument("","",null)),G6}var H6=globalThis&&globalThis.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();const z6=function(t){function e(){var e=t.call(this)||this;return e.xmlSerializer_=(void 0===Q6&&"undefined"!=typeof XMLSerializer&&(Q6=new XMLSerializer),Q6),e}return H6(e,t),e.prototype.getType=function(){return"xml"},e.prototype.readFeature=function(t,e){if(t){if("string"==typeof t){var r=B6(t);return this.readFeatureFromDocument(r,e)}return E6(t)?this.readFeatureFromDocument(t,e):this.readFeatureFromNode(t,e)}return null},e.prototype.readFeatureFromDocument=function(t,e){var r=this.readFeaturesFromDocument(t,e);return r.length>0?r[0]:null},e.prototype.readFeatureFromNode=function(t,e){return null},e.prototype.readFeatures=function(t,e){if(t){if("string"==typeof t){var r=B6(t);return this.readFeaturesFromDocument(r,e)}return E6(t)?this.readFeaturesFromDocument(t,e):this.readFeaturesFromNode(t,e)}return[]},e.prototype.readFeaturesFromDocument=function(t,e){for(var r=[],n=t.firstChild;n;n=n.nextSibling)n.nodeType==Node.ELEMENT_NODE&&d(r,this.readFeaturesFromNode(n,e));return r},e.prototype.readFeaturesFromNode=function(t,e){return n()},e.prototype.readGeometry=function(t,e){if(t){if("string"==typeof t){var r=B6(t);return this.readGeometryFromDocument(r,e)}return E6(t)?this.readGeometryFromDocument(t,e):this.readGeometryFromNode(t,e)}return null},e.prototype.readGeometryFromDocument=function(t,e){return null},e.prototype.readGeometryFromNode=function(t,e){return null},e.prototype.readProjection=function(t){if(t){if("string"==typeof t){var e=B6(t);return this.readProjectionFromDocument(e)}return E6(t)?this.readProjectionFromDocument(t):this.readProjectionFromNode(t)}return null},e.prototype.readProjectionFromDocument=function(t){return this.dataProjection},e.prototype.readProjectionFromNode=function(t){return this.dataProjection},e.prototype.writeFeature=function(t,e){var r=this.writeFeatureNode(t,e);return this.xmlSerializer_.serializeToString(r)},e.prototype.writeFeatureNode=function(t,e){return null},e.prototype.writeFeatures=function(t,e){var r=this.writeFeaturesNode(t,e);return this.xmlSerializer_.serializeToString(r)},e.prototype.writeFeaturesNode=function(t,e){return null},e.prototype.writeGeometry=function(t,e){var r=this.writeGeometryNode(t,e);return this.xmlSerializer_.serializeToString(r)},e.prototype.writeGeometryNode=function(t,e){return null},e}(Eh);var V6=globalThis&&globalThis.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),K6="http://www.opengis.net/gml",q6=/^[\s\xa0]*$/,W6=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.featureType=n.featureType,r.featureNS=n.featureNS,r.srsName=n.srsName,r.schemaLocation="",r.FEATURE_COLLECTION_PARSERS={},r.FEATURE_COLLECTION_PARSERS[r.namespace]={featureMember:P6(r.readFeaturesInternal),featureMembers:F6(r.readFeaturesInternal)},r.supportedMediaTypes=["application/gml+xml"],r}return V6(e,t),e.prototype.readFeaturesInternal=function(t,e){var r=t.localName,n=null;if("FeatureCollection"==r)n=U6([],this.FEATURE_COLLECTION_PARSERS,t,e,this);else if("featureMembers"==r||"featureMember"==r||"member"==r){var i=e[0],o=i.featureType,s=i.featureNS;if(!o&&t.childNodes){o=[],s={};for(var a=0,l=t.childNodes.length;a<l;++a){var u=t.childNodes[a];if(1===u.nodeType){var h=u.nodeName.split(":").pop();if(-1===o.indexOf(h)){var c="",A=0,f=u.namespaceURI;for(var p in s){if(s[p]===f){c=p;break}++A}c||(s[c="p"+A]=f),o.push(c+":"+h)}}}"featureMember"!=r&&(i.featureType=o,i.featureNS=s)}if("string"==typeof s){var d=s;(s={}).p0=d}var g={},y=Array.isArray(o)?o:[o];for(var m in s){var v={};for(a=0,l=y.length;a<l;++a)(-1===y[a].indexOf(":")?"p0":y[a].split(":")[0])===m&&(v[y[a].split(":").pop()]="featureMembers"==r?P6(this.readFeatureElement,this):F6(this.readFeatureElement,this));g[s[m]]=v}n=U6("featureMember"==r||"member"==r?void 0:[],g,t,e)}return null===n&&(n=[]),n},e.prototype.readGeometryOrExtent=function(t,e){var r=e[0];return r.srsName=t.firstElementChild.getAttribute("srsName"),r.srsDimension=t.firstElementChild.getAttribute("srsDimension"),U6(null,this.GEOMETRY_PARSERS,t,e,this)},e.prototype.readExtentElement=function(t,e){var r=e[0],n=this.readGeometryOrExtent(t,e);return n?Ih(n,r):void 0},e.prototype.readGeometryElement=function(t,e){var r=e[0],n=this.readGeometryOrExtent(t,e);return n?Bh(n,!1,r):void 0},e.prototype.readFeatureElementInternal=function(t,e,r){for(var n,i={},o=t.firstElementChild;o;o=o.nextElementSibling){var s=void 0,a=o.localName;0===o.childNodes.length||1===o.childNodes.length&&(3===o.firstChild.nodeType||4===o.firstChild.nodeType)?(s=C6(o,!1),q6.test(s)&&(s=void 0)):(r&&(s="boundedBy"===a?this.readExtentElement(o,e):this.readGeometryElement(o,e)),s?"boundedBy"!==a&&(n=a):s=this.readFeatureElementInternal(o,e,!1));var l=o.attributes.length;if(l>0){s={_content_:s};for(var u=0;u<l;u++)s[o.attributes[u].name]=o.attributes[u].value}i[a]?(i[a]instanceof Array||(i[a]=[i[a]]),i[a].push(s)):i[a]=s}if(r){var h=new z(i);n&&h.setGeometryName(n);var c=t.getAttribute("fid")||function(t,e,r){return t.getAttributeNS(e,"id")||""}(t,this.namespace);return c&&h.setId(c),h}return i},e.prototype.readFeatureElement=function(t,e){return this.readFeatureElementInternal(t,e,!0)},e.prototype.readPoint=function(t,e){var r=this.readFlatCoordinatesFromNode(t,e);if(r)return new Vr(r,"XYZ")},e.prototype.readMultiPoint=function(t,e){var r=U6([],this.MULTIPOINT_PARSERS,t,e,this);return r?new Wl(r):void 0},e.prototype.readMultiLineString=function(t,e){var r=U6([],this.MULTILINESTRING_PARSERS,t,e,this);if(r)return new Vl(r)},e.prototype.readMultiPolygon=function(t,e){var r=U6([],this.MULTIPOLYGON_PARSERS,t,e,this);if(r)return new Jl(r)},e.prototype.pointMemberParser=function(t,e){R6(this.POINTMEMBER_PARSERS,t,e,this)},e.prototype.lineStringMemberParser=function(t,e){R6(this.LINESTRINGMEMBER_PARSERS,t,e,this)},e.prototype.polygonMemberParser=function(t,e){R6(this.POLYGONMEMBER_PARSERS,t,e,this)},e.prototype.readLineString=function(t,e){var r=this.readFlatCoordinatesFromNode(t,e);return r?new mn(r,"XYZ"):void 0},e.prototype.readFlatLinearRing=function(t,e){return U6(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,e,this)||void 0},e.prototype.readLinearRing=function(t,e){var r=this.readFlatCoordinatesFromNode(t,e);if(r)return new Hr(r,"XYZ")},e.prototype.readPolygon=function(t,e){var r=U6([null],this.FLAT_LINEAR_RINGS_PARSERS,t,e,this);if(r&&r[0]){var n,i=r[0],o=[i.length],s=void 0;for(s=1,n=r.length;s<n;++s)d(i,r[s]),o.push(i.length);return new hn(i,"XYZ",o)}},e.prototype.readFlatCoordinatesFromNode=function(t,e){return U6(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,e,this)},e.prototype.readGeometryFromNode=function(t,e){return this.readGeometryElement(t,[this.getReadOptions(t,e||{})])||null},e.prototype.readFeaturesFromNode=function(t,e){var r={featureType:this.featureType,featureNS:this.featureNS};return e&&_(r,this.getReadOptions(t,e)),this.readFeaturesInternal(t,[r])||[]},e.prototype.readProjectionFromNode=function(t){return Ye(this.srsName?this.srsName:t.firstElementChild.getAttribute("srsName"))},e}(z6);W6.prototype.namespace=K6,W6.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{}},W6.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{}},W6.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{}},W6.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml":{pointMember:P6(W6.prototype.pointMemberParser),pointMembers:P6(W6.prototype.pointMemberParser)}},W6.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml":{lineStringMember:P6(W6.prototype.lineStringMemberParser),lineStringMembers:P6(W6.prototype.lineStringMemberParser)}},W6.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml":{polygonMember:P6(W6.prototype.polygonMemberParser),polygonMembers:P6(W6.prototype.polygonMemberParser)}},W6.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml":{Point:P6(W6.prototype.readFlatCoordinatesFromNode)}},W6.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:P6(W6.prototype.readLineString)}},W6.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:P6(W6.prototype.readPolygon)}},W6.prototype.RING_PARSERS={"http://www.opengis.net/gml":{LinearRing:F6(W6.prototype.readFlatLinearRing)}};const X6=W6;function Y6(t){var e,r=C6(t,!1);return(e=/^\s*(true|1)|(false|0)\s*$/.exec(r))?void 0!==e[1]||!1:void 0}function Z6(t){var e,r=C6(t,!1);return(e=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(r))?parseFloat(e[1]):void 0}function J6(t){return $6(C6(t,!1))}function $6(t){var e=/^\s*(\d+)\s*$/.exec(t);return e?parseInt(e[1],10):void 0}function t8(t){return C6(t,!1).trim()}function e8(t,e){n8(t,e?"1":"0")}function r8(t,e){var r=e.toPrecision();t.appendChild(j6().createTextNode(r))}function n8(t,e){t.appendChild(j6().createTextNode(e))}var i8=globalThis&&globalThis.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),o8={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},s8=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,n)||this).FEATURE_COLLECTION_PARSERS[K6].featureMember=P6(r.readFeaturesInternal),r.schemaLocation=n.schemaLocation?n.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/2.1.2/feature.xsd",r}return i8(e,t),e.prototype.readFlatCoordinates=function(t,e){var r=C6(t,!1).replace(/^\s*|\s*$/g,""),n=e[0].srsName,i="enu";if(n){var o=Ye(n);o&&(i=o.getAxisOrientation())}for(var s=r.trim().split(/\s+/),a=[],l=0,u=s.length;l<u;l++){var h=s[l].split(/,+/),c=parseFloat(h[0]),A=parseFloat(h[1]),f=3===h.length?parseFloat(h[2]):0;"en"===i.substr(0,2)?a.push(c,A,f):a.push(A,c,f)}return a},e.prototype.readBox=function(t,e){var r=U6([null],this.BOX_PARSERS_,t,e,this);return St(r[1][0],r[1][1],r[1][3],r[1][4])},e.prototype.innerBoundaryIsParser=function(t,e){var r=U6(void 0,this.RING_PARSERS,t,e,this);r&&e[e.length-1].push(r)},e.prototype.outerBoundaryIsParser=function(t,e){var r=U6(void 0,this.RING_PARSERS,t,e,this);r&&(e[e.length-1][0]=r)},e.prototype.GEOMETRY_NODE_FACTORY_=function(t,e,r){var n,i=e[e.length-1],o=i.multiSurface,s=i.surface,a=i.multiCurve;return Array.isArray(t)?n="Envelope":"MultiPolygon"===(n=t.getType())&&!0===o?n="MultiSurface":"Polygon"===n&&!0===s?n="Surface":"MultiLineString"===n&&!0===a&&(n="MultiCurve"),x6("http://www.opengis.net/gml",n)},e.prototype.writeFeatureElement=function(t,e,r){var n=e.getId();n&&t.setAttribute("fid",n);var i=r[r.length-1],o=i.featureNS,s=e.getGeometryName();i.serializers||(i.serializers={},i.serializers[o]={});var a=[],l=[];if(e.hasProperties()){var u=e.getProperties();for(var h in u){var c=u[h];null!==c&&(a.push(h),l.push(c),h==s||"function"==typeof c.getSimplifiedGeometry?h in i.serializers[o]||(i.serializers[o][h]=M6(this.writeGeometryElement,this)):h in i.serializers[o]||(i.serializers[o][h]=M6(n8)))}}var A=_({},i);A.node=t,D6(A,i.serializers,L6(void 0,o),l,r,a)},e.prototype.writeCurveOrLineString=function(t,e,r){var n=r[r.length-1].srsName;if("LineStringSegment"!==t.nodeName&&n&&t.setAttribute("srsName",n),"LineString"===t.nodeName||"LineStringSegment"===t.nodeName){var i=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(i),this.writeCoordinates_(i,e,r)}else if("Curve"===t.nodeName){var o=x6(t.namespaceURI,"segments");t.appendChild(o),this.writeCurveSegments_(o,e,r)}},e.prototype.writeLineStringOrCurveMember=function(t,e,r){var n=this.GEOMETRY_NODE_FACTORY_(e,r);n&&(t.appendChild(n),this.writeCurveOrLineString(n,e,r))},e.prototype.writeMultiCurveOrLineString=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName,s=n.curve;o&&t.setAttribute("srsName",o);var a=e.getLineStrings();D6({node:t,hasZ:i,srsName:o,curve:s},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,a,r,void 0,this)},e.prototype.writeGeometryElement=function(t,e,r){var n,i=r[r.length-1],o=_({},i);o.node=t,n=Array.isArray(e)?Ih(e,i):Bh(e,!0,i),D6(o,this.GEOMETRY_SERIALIZERS,this.GEOMETRY_NODE_FACTORY_,[n],r,void 0,this)},e.prototype.createCoordinatesNode_=function(t){var e=x6(t,"coordinates");return e.setAttribute("decimal","."),e.setAttribute("cs",","),e.setAttribute("ts"," "),e},e.prototype.writeCoordinates_=function(t,e,r){for(var n=r[r.length-1],i=n.hasZ,o=n.srsName,s=e.getCoordinates(),a=s.length,l=new Array(a),u=0;u<a;++u){var h=s[u];l[u]=this.getCoords_(h,o,i)}n8(t,l.join(" "))},e.prototype.writeCurveSegments_=function(t,e,r){var n=x6(t.namespaceURI,"LineStringSegment");t.appendChild(n),this.writeCurveOrLineString(n,e,r)},e.prototype.writeSurfaceOrPolygon=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName;if("PolygonPatch"!==t.nodeName&&o&&t.setAttribute("srsName",o),"Polygon"===t.nodeName||"PolygonPatch"===t.nodeName){var s=e.getLinearRings();D6({node:t,hasZ:i,srsName:o},this.RING_SERIALIZERS,this.RING_NODE_FACTORY_,s,r,void 0,this)}else if("Surface"===t.nodeName){var a=x6(t.namespaceURI,"patches");t.appendChild(a),this.writeSurfacePatches_(a,e,r)}},e.prototype.RING_NODE_FACTORY_=function(t,e,r){var n=e[e.length-1],i=n.node,o=n.exteriorWritten;return void 0===o&&(n.exteriorWritten=!0),x6(i.namespaceURI,void 0!==o?"innerBoundaryIs":"outerBoundaryIs")},e.prototype.writeSurfacePatches_=function(t,e,r){var n=x6(t.namespaceURI,"PolygonPatch");t.appendChild(n),this.writeSurfaceOrPolygon(n,e,r)},e.prototype.writeRing=function(t,e,r){var n=x6(t.namespaceURI,"LinearRing");t.appendChild(n),this.writeLinearRing(n,e,r)},e.prototype.getCoords_=function(t,e,r){var n="enu";e&&(n=Ye(e).getAxisOrientation());var i="en"===n.substr(0,2)?t[0]+","+t[1]:t[1]+","+t[0];return r&&(i+=","+(t[2]||0)),i},e.prototype.writePoint=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName;o&&t.setAttribute("srsName",o);var s=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(s);var a=e.getCoordinates();n8(s,this.getCoords_(a,o,i))},e.prototype.writeMultiPoint=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName;o&&t.setAttribute("srsName",o);var s=e.getPoints();D6({node:t,hasZ:i,srsName:o},this.POINTMEMBER_SERIALIZERS,L6("pointMember"),s,r,void 0,this)},e.prototype.writePointMember=function(t,e,r){var n=x6(t.namespaceURI,"Point");t.appendChild(n),this.writePoint(n,e,r)},e.prototype.writeLinearRing=function(t,e,r){var n=r[r.length-1].srsName;n&&t.setAttribute("srsName",n);var i=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(i),this.writeCoordinates_(i,e,r)},e.prototype.writeMultiSurfaceOrPolygon=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName,s=n.surface;o&&t.setAttribute("srsName",o);var a=e.getPolygons();D6({node:t,hasZ:i,srsName:o,surface:s},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,a,r,void 0,this)},e.prototype.writeSurfaceOrPolygonMember=function(t,e,r){var n=this.GEOMETRY_NODE_FACTORY_(e,r);n&&(t.appendChild(n),this.writeSurfaceOrPolygon(n,e,r))},e.prototype.writeEnvelope=function(t,e,r){var n=r[r.length-1].srsName;n&&t.setAttribute("srsName",n);var i=[e[0]+" "+e[1],e[2]+" "+e[3]];D6({node:t},this.ENVELOPE_SERIALIZERS,k6,i,r,["lowerCorner","upperCorner"],this)},e.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(t,e,r){var n=e[e.length-1].node;return x6("http://www.opengis.net/gml",o8[n.nodeName])},e}(X6);s8.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{coordinates:F6(s8.prototype.readFlatCoordinates)}},s8.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{innerBoundaryIs:s8.prototype.innerBoundaryIsParser,outerBoundaryIs:s8.prototype.outerBoundaryIsParser}},s8.prototype.BOX_PARSERS_={"http://www.opengis.net/gml":{coordinates:P6(s8.prototype.readFlatCoordinates)}},s8.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:F6(X6.prototype.readPoint),MultiPoint:F6(X6.prototype.readMultiPoint),LineString:F6(X6.prototype.readLineString),MultiLineString:F6(X6.prototype.readMultiLineString),LinearRing:F6(X6.prototype.readLinearRing),Polygon:F6(X6.prototype.readPolygon),MultiPolygon:F6(X6.prototype.readMultiPolygon),Box:F6(s8.prototype.readBox)}},s8.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:M6(s8.prototype.writeCurveOrLineString),MultiCurve:M6(s8.prototype.writeMultiCurveOrLineString),Point:M6(s8.prototype.writePoint),MultiPoint:M6(s8.prototype.writeMultiPoint),LineString:M6(s8.prototype.writeCurveOrLineString),MultiLineString:M6(s8.prototype.writeMultiCurveOrLineString),LinearRing:M6(s8.prototype.writeLinearRing),Polygon:M6(s8.prototype.writeSurfaceOrPolygon),MultiPolygon:M6(s8.prototype.writeMultiSurfaceOrPolygon),Surface:M6(s8.prototype.writeSurfaceOrPolygon),MultiSurface:M6(s8.prototype.writeMultiSurfaceOrPolygon),Envelope:M6(s8.prototype.writeEnvelope)}},s8.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:M6(s8.prototype.writeLineStringOrCurveMember),curveMember:M6(s8.prototype.writeLineStringOrCurveMember)}},s8.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{outerBoundaryIs:M6(s8.prototype.writeRing),innerBoundaryIs:M6(s8.prototype.writeRing)}},s8.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:M6(s8.prototype.writePointMember)}},s8.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:M6(s8.prototype.writeSurfaceOrPolygonMember),polygonMember:M6(s8.prototype.writeSurfaceOrPolygonMember)}},s8.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:M6(n8),upperCorner:M6(n8)}};const a8=s8;var l8=globalThis&&globalThis.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),u8={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},h8=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,n)||this).surface_=void 0!==n.surface&&n.surface,r.curve_=void 0!==n.curve&&n.curve,r.multiCurve_=void 0===n.multiCurve||n.multiCurve,r.multiSurface_=void 0===n.multiSurface||n.multiSurface,r.schemaLocation=n.schemaLocation?n.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",r.hasZ=void 0!==n.hasZ&&n.hasZ,r}return l8(e,t),e.prototype.readMultiCurve=function(t,e){var r=U6([],this.MULTICURVE_PARSERS,t,e,this);return r?new Vl(r):void 0},e.prototype.readFlatCurveRing=function(t,e){for(var r=U6([],this.MULTICURVE_PARSERS,t,e,this),n=[],i=0,o=r.length;i<o;++i)d(n,r[i].getFlatCoordinates());return n},e.prototype.readMultiSurface=function(t,e){var r=U6([],this.MULTISURFACE_PARSERS,t,e,this);if(r)return new Jl(r)},e.prototype.curveMemberParser=function(t,e){R6(this.CURVEMEMBER_PARSERS,t,e,this)},e.prototype.surfaceMemberParser=function(t,e){R6(this.SURFACEMEMBER_PARSERS,t,e,this)},e.prototype.readPatch=function(t,e){return U6([null],this.PATCHES_PARSERS,t,e,this)},e.prototype.readSegment=function(t,e){return U6([],this.SEGMENTS_PARSERS,t,e,this)},e.prototype.readPolygonPatch=function(t,e){return U6([null],this.FLAT_LINEAR_RINGS_PARSERS,t,e,this)},e.prototype.readLineStringSegment=function(t,e){return U6([null],this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,e,this)},e.prototype.interiorParser=function(t,e){var r=U6(void 0,this.RING_PARSERS,t,e,this);r&&e[e.length-1].push(r)},e.prototype.exteriorParser=function(t,e){var r=U6(void 0,this.RING_PARSERS,t,e,this);r&&(e[e.length-1][0]=r)},e.prototype.readSurface=function(t,e){var r=U6([null],this.SURFACE_PARSERS,t,e,this);if(r&&r[0]){var n,i=r[0],o=[i.length],s=void 0;for(s=1,n=r.length;s<n;++s)d(i,r[s]),o.push(i.length);return new hn(i,"XYZ",o)}},e.prototype.readCurve=function(t,e){var r=U6([null],this.CURVE_PARSERS,t,e,this);return r?new mn(r,"XYZ"):void 0},e.prototype.readEnvelope=function(t,e){var r=U6([null],this.ENVELOPE_PARSERS,t,e,this);return St(r[1][0],r[1][1],r[2][0],r[2][1])},e.prototype.readFlatPos=function(t,e){for(var r,n=C6(t,!1),i=/^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/,o=[];r=i.exec(n);)o.push(parseFloat(r[1])),n=n.substr(r[0].length);if(""===n){var s=e[0].srsName,a="enu";if(s&&(a=Ye(s).getAxisOrientation()),"neu"===a){var l,u=void 0;for(u=0,l=o.length;u<l;u+=3){var h=o[u],c=o[u+1];o[u]=c,o[u+1]=h}}var A=o.length;if(2==A&&o.push(0),0!==A)return o}},e.prototype.readFlatPosList=function(t,e){var r=C6(t,!1).replace(/^\s*|\s*$/g,""),n=e[0],i=n.srsName,o=n.srsDimension,s="enu";i&&(s=Ye(i).getAxisOrientation());var a,l,u,h=r.split(/\s+/),c=2;t.getAttribute("srsDimension")?c=$6(t.getAttribute("srsDimension")):t.getAttribute("dimension")?c=$6(t.getAttribute("dimension")):t.parentNode.getAttribute("srsDimension")?c=$6(t.parentNode.getAttribute("srsDimension")):o&&(c=$6(o));for(var A=[],f=0,p=h.length;f<p;f+=c)a=parseFloat(h[f]),l=parseFloat(h[f+1]),u=3===c?parseFloat(h[f+2]):0,"en"===s.substr(0,2)?A.push(a,l,u):A.push(l,a,u);return A},e.prototype.writePos_=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=i?"3":"2";t.setAttribute("srsDimension",o);var s=n.srsName,a="enu";s&&(a=Ye(s).getAxisOrientation());var l,u=e.getCoordinates();l="en"===a.substr(0,2)?u[0]+" "+u[1]:u[1]+" "+u[0],i&&(l+=" "+(u[2]||0)),n8(t,l)},e.prototype.getCoords_=function(t,e,r){var n="enu";e&&(n=Ye(e).getAxisOrientation());var i="en"===n.substr(0,2)?t[0]+" "+t[1]:t[1]+" "+t[0];return r&&(i+=" "+(t[2]||0)),i},e.prototype.writePosList_=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=i?"3":"2";t.setAttribute("srsDimension",o);for(var s,a=n.srsName,l=e.getCoordinates(),u=l.length,h=new Array(u),c=0;c<u;++c)s=l[c],h[c]=this.getCoords_(s,a,i);n8(t,h.join(" "))},e.prototype.writePoint=function(t,e,r){var n=r[r.length-1].srsName;n&&t.setAttribute("srsName",n);var i=x6(t.namespaceURI,"pos");t.appendChild(i),this.writePos_(i,e,r)},e.prototype.writeEnvelope=function(t,e,r){var n=r[r.length-1].srsName;n&&t.setAttribute("srsName",n);var i=[e[0]+" "+e[1],e[2]+" "+e[3]];D6({node:t},this.ENVELOPE_SERIALIZERS,k6,i,r,["lowerCorner","upperCorner"],this)},e.prototype.writeLinearRing=function(t,e,r){var n=r[r.length-1].srsName;n&&t.setAttribute("srsName",n);var i=x6(t.namespaceURI,"posList");t.appendChild(i),this.writePosList_(i,e,r)},e.prototype.RING_NODE_FACTORY_=function(t,e,r){var n=e[e.length-1],i=n.node,o=n.exteriorWritten;return void 0===o&&(n.exteriorWritten=!0),x6(i.namespaceURI,void 0!==o?"interior":"exterior")},e.prototype.writeSurfaceOrPolygon=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName;if("PolygonPatch"!==t.nodeName&&o&&t.setAttribute("srsName",o),"Polygon"===t.nodeName||"PolygonPatch"===t.nodeName){var s=e.getLinearRings();D6({node:t,hasZ:i,srsName:o},this.RING_SERIALIZERS,this.RING_NODE_FACTORY_,s,r,void 0,this)}else if("Surface"===t.nodeName){var a=x6(t.namespaceURI,"patches");t.appendChild(a),this.writeSurfacePatches_(a,e,r)}},e.prototype.writeCurveOrLineString=function(t,e,r){var n=r[r.length-1].srsName;if("LineStringSegment"!==t.nodeName&&n&&t.setAttribute("srsName",n),"LineString"===t.nodeName||"LineStringSegment"===t.nodeName){var i=x6(t.namespaceURI,"posList");t.appendChild(i),this.writePosList_(i,e,r)}else if("Curve"===t.nodeName){var o=x6(t.namespaceURI,"segments");t.appendChild(o),this.writeCurveSegments_(o,e,r)}},e.prototype.writeMultiSurfaceOrPolygon=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName,s=n.surface;o&&t.setAttribute("srsName",o);var a=e.getPolygons();D6({node:t,hasZ:i,srsName:o,surface:s},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,a,r,void 0,this)},e.prototype.writeMultiPoint=function(t,e,r){var n=r[r.length-1],i=n.srsName,o=n.hasZ;i&&t.setAttribute("srsName",i);var s=e.getPoints();D6({node:t,hasZ:o,srsName:i},this.POINTMEMBER_SERIALIZERS,L6("pointMember"),s,r,void 0,this)},e.prototype.writeMultiCurveOrLineString=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName,s=n.curve;o&&t.setAttribute("srsName",o);var a=e.getLineStrings();D6({node:t,hasZ:i,srsName:o,curve:s},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,a,r,void 0,this)},e.prototype.writeRing=function(t,e,r){var n=x6(t.namespaceURI,"LinearRing");t.appendChild(n),this.writeLinearRing(n,e,r)},e.prototype.writeSurfaceOrPolygonMember=function(t,e,r){var n=this.GEOMETRY_NODE_FACTORY_(e,r);n&&(t.appendChild(n),this.writeSurfaceOrPolygon(n,e,r))},e.prototype.writePointMember=function(t,e,r){var n=x6(t.namespaceURI,"Point");t.appendChild(n),this.writePoint(n,e,r)},e.prototype.writeLineStringOrCurveMember=function(t,e,r){var n=this.GEOMETRY_NODE_FACTORY_(e,r);n&&(t.appendChild(n),this.writeCurveOrLineString(n,e,r))},e.prototype.writeSurfacePatches_=function(t,e,r){var n=x6(t.namespaceURI,"PolygonPatch");t.appendChild(n),this.writeSurfaceOrPolygon(n,e,r)},e.prototype.writeCurveSegments_=function(t,e,r){var n=x6(t.namespaceURI,"LineStringSegment");t.appendChild(n),this.writeCurveOrLineString(n,e,r)},e.prototype.writeGeometryElement=function(t,e,r){var n,i=r[r.length-1],o=_({},i);o.node=t,n=Array.isArray(e)?Ih(e,i):Bh(e,!0,i),D6(o,this.GEOMETRY_SERIALIZERS,this.GEOMETRY_NODE_FACTORY_,[n],r,void 0,this)},e.prototype.writeFeatureElement=function(t,e,r){var n=e.getId();n&&t.setAttribute("fid",n);var i=r[r.length-1],o=i.featureNS,s=e.getGeometryName();i.serializers||(i.serializers={},i.serializers[o]={});var a=[],l=[];if(e.hasProperties()){var u=e.getProperties();for(var h in u){var c=u[h];null!==c&&(a.push(h),l.push(c),h==s||"function"==typeof c.getSimplifiedGeometry?h in i.serializers[o]||(i.serializers[o][h]=M6(this.writeGeometryElement,this)):h in i.serializers[o]||(i.serializers[o][h]=M6(n8)))}}var A=_({},i);A.node=t,D6(A,i.serializers,L6(void 0,o),l,r,a)},e.prototype.writeFeatureMembers_=function(t,e,r){var n=r[r.length-1],i=n.featureType,o=n.featureNS,s={};s[o]={},s[o][i]=M6(this.writeFeatureElement,this);var a=_({},n);a.node=t,D6(a,s,L6(i,o),e,r)},e.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(t,e,r){var n=e[e.length-1].node;return x6(this.namespace,u8[n.nodeName])},e.prototype.GEOMETRY_NODE_FACTORY_=function(t,e,r){var n,i=e[e.length-1],o=i.multiSurface,s=i.surface,a=i.curve,l=i.multiCurve;return Array.isArray(t)?n="Envelope":"MultiPolygon"===(n=t.getType())&&!0===o?n="MultiSurface":"Polygon"===n&&!0===s?n="Surface":"LineString"===n&&!0===a?n="Curve":"MultiLineString"===n&&!0===l&&(n="MultiCurve"),x6(this.namespace,n)},e.prototype.writeGeometryNode=function(t,e){e=this.adaptOptions(e);var r=x6(this.namespace,"geom"),n={node:r,hasZ:this.hasZ,srsName:this.srsName,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_};return e&&_(n,e),this.writeGeometryElement(r,t,[n]),r},e.prototype.writeFeaturesNode=function(t,e){e=this.adaptOptions(e);var r=x6(this.namespace,"featureMembers");r.setAttributeNS(b6,"xsi:schemaLocation",this.schemaLocation);var n={srsName:this.srsName,hasZ:this.hasZ,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_,featureNS:this.featureNS,featureType:this.featureType};return e&&_(n,e),this.writeFeatureMembers_(r,t,[n]),r},e}(X6);h8.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{pos:F6(h8.prototype.readFlatPos),posList:F6(h8.prototype.readFlatPosList),coordinates:F6(a8.prototype.readFlatCoordinates)}},h8.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{interior:h8.prototype.interiorParser,exterior:h8.prototype.exteriorParser}},h8.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:F6(X6.prototype.readPoint),MultiPoint:F6(X6.prototype.readMultiPoint),LineString:F6(X6.prototype.readLineString),MultiLineString:F6(X6.prototype.readMultiLineString),LinearRing:F6(X6.prototype.readLinearRing),Polygon:F6(X6.prototype.readPolygon),MultiPolygon:F6(X6.prototype.readMultiPolygon),Surface:F6(h8.prototype.readSurface),MultiSurface:F6(h8.prototype.readMultiSurface),Curve:F6(h8.prototype.readCurve),MultiCurve:F6(h8.prototype.readMultiCurve),Envelope:F6(h8.prototype.readEnvelope)}},h8.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml":{curveMember:P6(h8.prototype.curveMemberParser),curveMembers:P6(h8.prototype.curveMemberParser)}},h8.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml":{surfaceMember:P6(h8.prototype.surfaceMemberParser),surfaceMembers:P6(h8.prototype.surfaceMemberParser)}},h8.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:P6(X6.prototype.readLineString),Curve:P6(h8.prototype.readCurve)}},h8.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:P6(X6.prototype.readPolygon),Surface:P6(h8.prototype.readSurface)}},h8.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml":{patches:F6(h8.prototype.readPatch)}},h8.prototype.CURVE_PARSERS={"http://www.opengis.net/gml":{segments:F6(h8.prototype.readSegment)}},h8.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml":{lowerCorner:P6(h8.prototype.readFlatPosList),upperCorner:P6(h8.prototype.readFlatPosList)}},h8.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml":{PolygonPatch:F6(h8.prototype.readPolygonPatch)}},h8.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml":{LineStringSegment:I6(h8.prototype.readLineStringSegment)}},X6.prototype.RING_PARSERS={"http://www.opengis.net/gml":{LinearRing:F6(X6.prototype.readFlatLinearRing),Ring:F6(h8.prototype.readFlatCurveRing)}},h8.prototype.writeFeatures,h8.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{exterior:M6(h8.prototype.writeRing),interior:M6(h8.prototype.writeRing)}},h8.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:M6(n8),upperCorner:M6(n8)}},h8.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:M6(h8.prototype.writeSurfaceOrPolygonMember),polygonMember:M6(h8.prototype.writeSurfaceOrPolygonMember)}},h8.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:M6(h8.prototype.writePointMember)}},h8.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:M6(h8.prototype.writeLineStringOrCurveMember),curveMember:M6(h8.prototype.writeLineStringOrCurveMember)}},h8.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:M6(h8.prototype.writeCurveOrLineString),MultiCurve:M6(h8.prototype.writeMultiCurveOrLineString),Point:M6(h8.prototype.writePoint),MultiPoint:M6(h8.prototype.writeMultiPoint),LineString:M6(h8.prototype.writeCurveOrLineString),MultiLineString:M6(h8.prototype.writeMultiCurveOrLineString),LinearRing:M6(h8.prototype.writeLinearRing),Polygon:M6(h8.prototype.writeSurfaceOrPolygon),MultiPolygon:M6(h8.prototype.writeMultiSurfaceOrPolygon),Surface:M6(h8.prototype.writeSurfaceOrPolygon),MultiSurface:M6(h8.prototype.writeMultiSurfaceOrPolygon),Envelope:M6(h8.prototype.writeEnvelope)}};const c8=h8;var A8,f8,p8,d8,g8,y8,m8,v8,_8,w8=globalThis&&globalThis.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),b8=["http://www.google.com/kml/ext/2.2"],x8=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],C8={fraction:"fraction",pixels:"pixels",insetPixels:"pixels"},S8=N6(x8,{ExtendedData:v7,Region:_7,MultiGeometry:T6(h7,"geometry"),LineString:T6(a7,"geometry"),LinearRing:T6(l7,"geometry"),Point:T6(c7,"geometry"),Polygon:T6(f7,"geometry"),Style:T6(d7),StyleMap:function(t,e){var r=q8.call(this,t,e);if(r){var n=e[e.length-1];Array.isArray(r)?n.Style=r:"string"==typeof r?n.styleUrl=r:G(!1,38)}},address:T6(t8),description:T6(t8),name:T6(t8),open:T6(Y6),phoneNumber:T6(t8),styleUrl:T6(z8),visibility:T6(Y6)},N6(b8,{MultiTrack:T6((function(t,e){var r=U6([],t7,t,e);if(r)return new Vl(r)}),"geometry"),Track:T6(r7,"geometry")})),E8=N6(x8,{ExtendedData:v7,Region:_7,Link:function(t,e){R6(B8,t,e)},address:T6(t8),description:T6(t8),name:T6(t8),open:T6(Y6),phoneNumber:T6(t8),visibility:T6(Y6)}),B8=N6(x8,{href:T6(H8)}),I8=N6(x8,{LatLonAltBox:function(t,e){var r=U6({},x7,t,e);if(r){var n=e[e.length-1],i=[parseFloat(r.west),parseFloat(r.south),parseFloat(r.east),parseFloat(r.north)];n.extent=i,n.altitudeMode=r.altitudeMode,n.minAltitude=parseFloat(r.minAltitude),n.maxAltitude=parseFloat(r.maxAltitude)}},Lod:function(t,e){var r=U6({},C7,t,e);if(r){var n=e[e.length-1];n.minLodPixels=parseFloat(r.minLodPixels),n.maxLodPixels=parseFloat(r.maxLodPixels),n.minFadeExtent=parseFloat(r.minFadeExtent),n.maxFadeExtent=parseFloat(r.maxFadeExtent)}}}),P8=N6(x8,["Document","Placemark"]),F8=N6(x8,{Document:M6((function(t,e,r){D6({node:t},P7,F7,e,r,void 0,this)})),Placemark:M6(t9)}),T8=null,M8=null,L8=null,k8=null,O8=null,N8=null;function R8(t){return 32/Math.min(t[0],t[1])}function U8(t){return t}var D8=function(t){function e(e){var r=t.call(this)||this,n=e||{};return N8||(T8=new fn({color:A8=[255,255,255,1]}),y8="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png",M8=new Wo({anchor:f8=[20,2],anchorOrigin:"bottom-left",anchorXUnits:p8="pixels",anchorYUnits:d8="pixels",crossOrigin:"anonymous",rotation:0,scale:R8(g8=[64,64]),size:g8,src:y8}),m8="NO_IMAGE",L8=new vn({color:A8,width:1}),v8=new vn({color:[51,51,51,1],width:2}),k8=new fi({font:"bold 16px Helvetica",fill:T8,stroke:v8,scale:.8}),O8=new Ai({fill:T8,image:M8,text:k8,stroke:L8,zIndex:0}),N8=[O8]),r.dataProjection=Ye("EPSG:4326"),r.defaultStyle_=n.defaultStyle?n.defaultStyle:N8,r.extractStyles_=void 0===n.extractStyles||n.extractStyles,r.writeStyles_=void 0===n.writeStyles||n.writeStyles,r.sharedStyles_={},r.showPointNames_=void 0===n.showPointNames||n.showPointNames,r.crossOrigin_=void 0!==n.crossOrigin?n.crossOrigin:"anonymous",r.iconUrlFunction_=n.iconUrlFunction?n.iconUrlFunction:U8,r.supportedMediaTypes=["application/vnd.google-earth.kml+xml"],r}return w8(e,t),e.prototype.readDocumentOrFolder_=function(t,e){return U6([],N6(x8,{Document:I6(this.readDocumentOrFolder_,this),Folder:I6(this.readDocumentOrFolder_,this),Placemark:P6(this.readPlacemark_,this),Style:this.readSharedStyle_.bind(this),StyleMap:this.readSharedStyleMap_.bind(this)}),t,e,this)||void 0},e.prototype.readPlacemark_=function(t,e){var r,n,i,o,s,a=U6({geometry:null},S8,t,e,this);if(a){var l=new z,u=t.getAttribute("id");null!==u&&l.setId(u);var h=e[0],c=a.geometry;if(c&&Bh(c,!1,h),l.setGeometry(c),delete a.geometry,this.extractStyles_){var A=(r=a.Style,n=a.styleUrl,i=this.defaultStyle_,o=this.sharedStyles_,s=this.showPointNames_,function(t,e){var a=s,l="",u=[];if(a){var h=t.getGeometry();if(h)if(h instanceof $h)a=(u=h.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return"Point"===e||"MultiPoint"===e}))).length>0;else{var c=h.getType();a="Point"===c||"MultiPoint"===c}}a&&(l=t.get("name"),(a=a&&!!l)&&l.search(/&[^&]+;/)>-1&&(_8||(_8=document.createElement("textarea")),_8.innerHTML=l,l=_8.value));var A=i;if(r?A=r:n&&(A=Q8(n,i,o)),a){var f=function(t,e){var r=[0,0],n="start",i=t.getImage();if(i){var o=i.getSize();if(o&&2==o.length){var s=i.getScaleArray(),a=i.getAnchor();r[0]=s[0]*(o[0]-a[0]),r[1]=s[1]*(o[1]/2-a[1]),n="left"}}var l=t.getText();return l?((l=l.clone()).setFont(l.getFont()||k8.getFont()),l.setScale(l.getScale()||k8.getScale()),l.setFill(l.getFill()||k8.getFill()),l.setStroke(l.getStroke()||v8)):l=k8.clone(),l.setText(e),l.setOffsetX(r[0]),l.setOffsetY(r[1]),l.setTextAlign(n),new Ai({image:i,text:l})}(A[0],l);return u.length>0?(f.setGeometry(new $h(u)),[f,new Ai({geometry:A[0].getGeometry(),image:null,fill:A[0].getFill(),stroke:A[0].getStroke(),text:null})].concat(A.slice(1))):f}return A});l.setStyle(A)}return delete a.Style,l.setProperties(a,!0),l}},e.prototype.readSharedStyle_=function(t,e){var r=t.getAttribute("id");if(null!==r){var n=d7.call(this,t,e);if(n){var i,o=t.baseURI;o&&"about:blank"!=o||(o=window.location.href),i=o?new URL("#"+r,o).href:"#"+r,this.sharedStyles_[i]=n}}},e.prototype.readSharedStyleMap_=function(t,e){var r=t.getAttribute("id");if(null!==r){var n=q8.call(this,t,e);if(n){var i,o=t.baseURI;o&&"about:blank"!=o||(o=window.location.href),i=o?new URL("#"+r,o).href:"#"+r,this.sharedStyles_[i]=n}}},e.prototype.readFeatureFromNode=function(t,e){return A(x8,t.namespaceURI)&&this.readPlacemark_(t,[this.getReadOptions(t,e)])||null},e.prototype.readFeaturesFromNode=function(t,e){if(!A(x8,t.namespaceURI))return[];var r,n=t.localName;if("Document"==n||"Folder"==n)return(r=this.readDocumentOrFolder_(t,[this.getReadOptions(t,e)]))||[];if("Placemark"==n){var i=this.readPlacemark_(t,[this.getReadOptions(t,e)]);return i?[i]:[]}if("kml"==n){r=[];for(var o=t.firstElementChild;o;o=o.nextElementSibling){var s=this.readFeaturesFromNode(o,e);s&&d(r,s)}return r}return[]},e.prototype.readName=function(t){if(t){if("string"==typeof t){var e=B6(t);return this.readNameFromDocument(e)}return E6(t)?this.readNameFromDocument(t):this.readNameFromNode(t)}},e.prototype.readNameFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE){var r=this.readNameFromNode(e);if(r)return r}},e.prototype.readNameFromNode=function(t){for(var e=t.firstElementChild;e;e=e.nextElementSibling)if(A(x8,e.namespaceURI)&&"name"==e.localName)return t8(e);for(e=t.firstElementChild;e;e=e.nextElementSibling){var r=e.localName;if(A(x8,e.namespaceURI)&&("Document"==r||"Folder"==r||"Placemark"==r||"kml"==r)){var n=this.readNameFromNode(e);if(n)return n}}},e.prototype.readNetworkLinks=function(t){var e=[];if("string"==typeof t){var r=B6(t);d(e,this.readNetworkLinksFromDocument(r))}else E6(t)?d(e,this.readNetworkLinksFromDocument(t)):d(e,this.readNetworkLinksFromNode(t));return e},e.prototype.readNetworkLinksFromDocument=function(t){for(var e=[],r=t.firstChild;r;r=r.nextSibling)r.nodeType==Node.ELEMENT_NODE&&d(e,this.readNetworkLinksFromNode(r));return e},e.prototype.readNetworkLinksFromNode=function(t){for(var e=[],r=t.firstElementChild;r;r=r.nextElementSibling)if(A(x8,r.namespaceURI)&&"NetworkLink"==r.localName){var n=U6({},E8,r,[]);e.push(n)}for(r=t.firstElementChild;r;r=r.nextElementSibling){var i=r.localName;!A(x8,r.namespaceURI)||"Document"!=i&&"Folder"!=i&&"kml"!=i||d(e,this.readNetworkLinksFromNode(r))}return e},e.prototype.readRegion=function(t){var e=[];if("string"==typeof t){var r=B6(t);d(e,this.readRegionFromDocument(r))}else E6(t)?d(e,this.readRegionFromDocument(t)):d(e,this.readRegionFromNode(t));return e},e.prototype.readRegionFromDocument=function(t){for(var e=[],r=t.firstChild;r;r=r.nextSibling)r.nodeType==Node.ELEMENT_NODE&&d(e,this.readRegionFromNode(r));return e},e.prototype.readRegionFromNode=function(t){for(var e=[],r=t.firstElementChild;r;r=r.nextElementSibling)if(A(x8,r.namespaceURI)&&"Region"==r.localName){var n=U6({},I8,r,[]);e.push(n)}for(r=t.firstElementChild;r;r=r.nextElementSibling){var i=r.localName;!A(x8,r.namespaceURI)||"Document"!=i&&"Folder"!=i&&"kml"!=i||d(e,this.readRegionFromNode(r))}return e},e.prototype.writeFeaturesNode=function(t,e){e=this.adaptOptions(e);var r=x6(x8[4],"kml"),n="http://www.w3.org/2000/xmlns/";r.setAttributeNS(n,"xmlns:gx",b8[0]),r.setAttributeNS(n,"xmlns:xsi",b6),r.setAttributeNS(b6,"xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd");var i={node:r},o={};t.length>1?o.Document=t:1==t.length&&(o.Placemark=t[0]);var s=P8[r.namespaceURI],a=O6(o,s);return D6(i,F8,k6,a,[e],s,this),r},e}(z6);function Q8(t,e,r){return Array.isArray(t)?t:"string"==typeof t?Q8(r[t],e,r):e}function G8(t){var e=C6(t,!1),r=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(e);if(r){var n=r[1];return[parseInt(n.substr(6,2),16),parseInt(n.substr(4,2),16),parseInt(n.substr(2,2),16),parseInt(n.substr(0,2),16)/255]}}function j8(t){var e=C6(t,!1),r=[];e=e.replace(/\s*,\s*/g,",");for(var n,i=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?),([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|,|$)(?:([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|$))?\s*/i;n=i.exec(e);){var o=parseFloat(n[1]),s=parseFloat(n[2]),a=n[3]?parseFloat(n[3]):0;r.push(o,s,a),e=e.substr(n[0].length)}if(""===e)return r}function H8(t){var e=C6(t,!1).trim(),r=t.baseURI;return r&&"about:blank"!=r||(r=window.location.href),r?new URL(e,r).href:e}function z8(t){var e=C6(t,!1).trim().replace(/^(?!.*#)/,"#"),r=t.baseURI;return r&&"about:blank"!=r||(r=window.location.href),r?new URL(e,r).href:e}function V8(t){return Z6(t)}var K8=N6(x8,{Pair:function(t,e){var r=U6({},w7,t,e,this);if(r){var n=r.key;if(n&&"normal"==n){var i=r.styleUrl;i&&(e[e.length-1]=i);var o=r.Style;o&&(e[e.length-1]=o)}}}});function q8(t,e){return U6(void 0,K8,t,e,this)}var W8=N6(x8,{Icon:T6((function(t,e){return U6({},n7,t,e)||null})),color:T6(G8),heading:T6(Z6),hotSpot:T6((function(t){var e,r=t.getAttribute("xunits"),n=t.getAttribute("yunits");return e="insetPixels"!==r?"insetPixels"!==n?"bottom-left":"top-left":"insetPixels"!==n?"bottom-right":"top-right",{x:parseFloat(t.getAttribute("x")),xunits:C8[r],y:parseFloat(t.getAttribute("y")),yunits:C8[n],origin:e}})),scale:T6(V8)}),X8=N6(x8,{color:T6(G8),scale:T6(V8)}),Y8=N6(x8,{color:T6(G8),width:T6(Z6)}),Z8=N6(x8,{color:T6(G8),fill:T6(Y6),outline:T6(Y6)}),J8=N6(x8,{coordinates:F6(j8)});function $8(t,e){return U6(null,J8,t,e)}var t7=N6(b8,{Track:P6(r7)}),e7=N6(x8,{when:function(t,e){var r=e[e.length-1].whens,n=C6(t,!1),i=Date.parse(n);r.push(isNaN(i)?0:i)}},N6(b8,{coord:function(t,e){var r=e[e.length-1].coordinates,n=C6(t,!1),i=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(n);if(i){var o=parseFloat(i[1]),s=parseFloat(i[2]),a=parseFloat(i[3]);r.push([o,s,a])}else r.push([])}}));function r7(t,e){var r=U6({coordinates:[],whens:[]},e7,t,e);if(r){for(var n=[],i=r.coordinates,o=r.whens,s=0,a=Math.min(i.length,o.length);s<a;++s)3==i[s].length&&n.push(i[s][0],i[s][1],i[s][2],o[s]);return new mn(n,"XYZM")}}var n7=N6(x8,{href:T6(H8)},N6(b8,{x:T6(Z6),y:T6(Z6),w:T6(Z6),h:T6(Z6)})),i7=N6(x8,{coordinates:F6(j8)});function o7(t,e){return U6(null,i7,t,e)}var s7=N6(x8,{extrude:T6(Y6),tessellate:T6(Y6),altitudeMode:T6(t8)});function a7(t,e){var r=U6({},s7,t,e),n=o7(t,e);if(n){var i=new mn(n,"XYZ");return i.setProperties(r,!0),i}}function l7(t,e){var r=U6({},s7,t,e),n=o7(t,e);if(n){var i=new hn(n,"XYZ",[n.length]);return i.setProperties(r,!0),i}}var u7=N6(x8,{LineString:P6(a7),LinearRing:P6(l7),MultiGeometry:P6(h7),Point:P6(c7),Polygon:P6(f7)});function h7(t,e){var r,n=U6([],u7,t,e);if(!n)return null;if(0===n.length)return new $h(n);for(var i=!0,o=n[0].getType(),s=1,a=n.length;s<a;++s)if(n[s].getType()!=o){i=!1;break}if(i){var l=void 0,u=void 0;if("Point"==o){var h=n[0];for(l=h.getLayout(),u=h.getFlatCoordinates(),s=1,a=n.length;s<a;++s)d(u,n[s].getFlatCoordinates());g7(r=new Wl(u,l),n)}else"LineString"==o?g7(r=new Vl(n),n):"Polygon"==o?g7(r=new Jl(n),n):"GeometryCollection"==o?r=new $h(n):G(!1,37)}else r=new $h(n);return r}function c7(t,e){var r=U6({},s7,t,e),n=o7(t,e);if(n){var i=new Vr(n,"XYZ");return i.setProperties(r,!0),i}}var A7=N6(x8,{innerBoundaryIs:function(t,e){var r=U6([],S7,t,e);if(r.length>0){var n=e[e.length-1];n.push.apply(n,r)}},outerBoundaryIs:function(t,e){var r=U6(void 0,E7,t,e);r&&(e[e.length-1][0]=r)}});function f7(t,e){var r=U6({},s7,t,e),n=U6([null],A7,t,e);if(n&&n[0]){for(var i=n[0],o=[i.length],s=1,a=n.length;s<a;++s)d(i,n[s]),o.push(i.length);var l=new hn(i,"XYZ",o);return l.setProperties(r,!0),l}}var p7=N6(x8,{IconStyle:function(t,e){var r=U6({},W8,t,e);if(r){var n,i,o,s,a=e[e.length-1],l="Icon"in r?r.Icon:{},u=!("Icon"in r)||Object.keys(l).length>0,h=l.href;h?n=h:u&&(n=y8);var c,A="bottom-left",f=r.hotSpot;f?(i=[f.x,f.y],o=f.xunits,s=f.yunits,A=f.origin):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(n)&&(/pushpin/.test(n)?(i=f8,o=p8,s=d8):/arrow-reverse/.test(n)?(i=[54,42],o=p8,s=d8):/paddle/.test(n)&&(i=[32,1],o=p8,s=d8));var p,d=l.x,g=l.y;void 0!==d&&void 0!==g&&(c=[d,g]);var y,m=l.w,v=l.h;void 0!==m&&void 0!==v&&(p=[m,v]);var _=r.heading;void 0!==_&&(y=ie(_));var w=r.scale,b=r.color;if(u){n==y8&&(p=g8);var x=new Wo({anchor:i,anchorOrigin:A,anchorXUnits:o,anchorYUnits:s,crossOrigin:this.crossOrigin_,offset:c,offsetOrigin:"bottom-left",rotation:y,scale:w,size:p,src:this.iconUrlFunction_(n),color:b}),C=x.getScaleArray()[0],S=x.getSize();if(null===S){var E=x.getImageState();if(0===E||1===E){var B=function(){var t=x.getImageState();if(0!==t&&1!==t){var e=x.getSize();if(e&&2==e.length){var r=R8(e);x.setScale(C*r)}x.unlistenImageChange(B)}};x.listenImageChange(B),0===E&&x.load()}}else if(2==S.length){var I=R8(S);x.setScale(C*I)}a.imageStyle=x}else a.imageStyle=m8}},LabelStyle:function(t,e){var r=U6({},X8,t,e);if(r){var n=e[e.length-1],i=new fi({fill:new fn({color:"color"in r?r.color:A8}),scale:r.scale});n.textStyle=i}},LineStyle:function(t,e){var r=U6({},Y8,t,e);if(r){var n=e[e.length-1],i=new vn({color:"color"in r?r.color:A8,width:"width"in r?r.width:1});n.strokeStyle=i}},PolyStyle:function(t,e){var r=U6({},Z8,t,e);if(r){var n=e[e.length-1],i=new fn({color:"color"in r?r.color:A8});n.fillStyle=i;var o=r.fill;void 0!==o&&(n.fill=o);var s=r.outline;void 0!==s&&(n.outline=s)}}});function d7(t,e){var r=U6({},p7,t,e,this);if(!r)return null;var n,i="fillStyle"in r?r.fillStyle:T8,o=r.fill;void 0===o||o||(i=null),"imageStyle"in r?r.imageStyle!=m8&&(n=r.imageStyle):n=M8;var s="textStyle"in r?r.textStyle:k8,a="strokeStyle"in r?r.strokeStyle:L8,l=r.outline;return void 0===l||l?[new Ai({fill:i,image:n,stroke:a,text:s,zIndex:void 0})]:[new Ai({geometry:function(t){var e=t.getGeometry(),r=e.getType();return"GeometryCollection"===r?new $h(e.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return"Polygon"!==e&&"MultiPolygon"!==e}))):"Polygon"!==r&&"MultiPolygon"!==r?e:void 0},fill:i,image:n,stroke:a,text:s,zIndex:void 0}),new Ai({geometry:function(t){var e=t.getGeometry(),r=e.getType();return"GeometryCollection"===r?new $h(e.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return"Polygon"===e||"MultiPolygon"===e}))):"Polygon"===r||"MultiPolygon"===r?e:void 0},fill:i,stroke:null,zIndex:void 0})]}function g7(t,e){var r,n,i,o=e.length,s=new Array(e.length),a=new Array(e.length),l=new Array(e.length);r=!1,n=!1,i=!1;for(var u=0;u<o;++u){var h=e[u];s[u]=h.get("extrude"),a[u]=h.get("tessellate"),l[u]=h.get("altitudeMode"),r=r||void 0!==s[u],n=n||void 0!==a[u],i=i||l[u]}r&&t.set("extrude",s),n&&t.set("tessellate",a),i&&t.set("altitudeMode",l)}var y7=N6(x8,{displayName:T6(t8),value:T6(t8)}),m7=N6(x8,{Data:function(t,e){var r=t.getAttribute("name");R6(y7,t,e);var n=e[e.length-1];r&&n.displayName?n[r]={value:n.value,displayName:n.displayName,toString:function(){return n.value}}:null!==r?n[r]=n.value:null!==n.displayName&&(n[n.displayName]=n.value),delete n.value},SchemaData:function(t,e){R6(b7,t,e)}});function v7(t,e){R6(m7,t,e)}function _7(t,e){R6(I8,t,e)}var w7=N6(x8,{Style:T6(d7),key:T6(t8),styleUrl:T6(z8)}),b7=N6(x8,{SimpleData:function(t,e){var r=t.getAttribute("name");if(null!==r){var n=t8(t);e[e.length-1][r]=n}}}),x7=N6(x8,{altitudeMode:T6(t8),minAltitude:T6(Z6),maxAltitude:T6(Z6),north:T6(Z6),south:T6(Z6),east:T6(Z6),west:T6(Z6)}),C7=N6(x8,{minLodPixels:T6(Z6),maxLodPixels:T6(Z6),minFadeExtent:T6(Z6),maxFadeExtent:T6(Z6)}),S7=N6(x8,{LinearRing:P6($8)}),E7=N6(x8,{LinearRing:F6($8)});function B7(t,e){for(var r=Fn(e),n=[255*(4==r.length?r[3]:1),r[2],r[1],r[0]],i=0;i<4;++i){var o=Math.floor(n[i]).toString(16);n[i]=1==o.length?"0"+o:o}n8(t,n.join(""))}var I7=N6(x8,{Data:M6((function(t,e,r){t.setAttribute("name",e.name);var n={node:t},i=e.value;"object"==typeof i?(null!==i&&i.displayName&&D6(n,I7,k6,[i.displayName],r,["displayName"]),null!==i&&i.value&&D6(n,I7,k6,[i.value],r,["value"])):D6(n,I7,k6,[i],r,["value"])})),value:M6((function(t,e){n8(t,e)})),displayName:M6((function(t,e){!function(t,e){t.appendChild(j6().createCDATASection(e))}(t,e)}))}),P7=N6(x8,{Placemark:M6(t9)}),F7=function(t,e,r){return x6(e[e.length-1].node.namespaceURI,"Placemark")},T7=L6("Data"),M7=N6(x8,["href"],N6(b8,["x","y","w","h"])),L7=N6(x8,{href:M6(n8)},N6(b8,{x:M6(r8),y:M6(r8),w:M6(r8),h:M6(r8)})),k7=function(t,e,r){return x6(b8[0],"gx:"+r)},O7=N6(x8,["scale","heading","Icon","color","hotSpot"]),N7=N6(x8,{Icon:M6((function(t,e,r){var n={node:t},i=r[r.length-1].node,o=M7[i.namespaceURI],s=O6(e,o);D6(n,L7,k6,s,r,o),s=O6(e,o=M7[b8[0]]),D6(n,L7,k7,s,r,o)})),color:M6(B7),heading:M6(r8),hotSpot:M6((function(t,e){t.setAttribute("x",String(e.x)),t.setAttribute("y",String(e.y)),t.setAttribute("xunits",e.xunits),t.setAttribute("yunits",e.yunits)})),scale:M6(h9)}),R7=N6(x8,["color","scale"]),U7=N6(x8,{color:M6(B7),scale:M6(h9)}),D7=N6(x8,["color","width"]),Q7=N6(x8,{color:M6(B7),width:M6(r8)}),G7={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},j7=function(t,e,r){if(t)return x6(e[e.length-1].node.namespaceURI,G7[t.getType()])},H7=L6("Point"),z7=L6("LineString"),V7=L6("LinearRing"),K7=L6("Polygon"),q7=N6(x8,{LineString:M6(n9),Point:M6(n9),Polygon:M6(l9),GeometryCollection:M6(W7)});function W7(t,e,r){var n,i={node:t},o=e.getType(),s=[];"GeometryCollection"===o?(e.getGeometriesArrayRecursive().forEach((function(t){var e=t.getType();"MultiPoint"===e?s=s.concat(t.getPoints()):"MultiLineString"===e?s=s.concat(t.getLineStrings()):"MultiPolygon"===e?s=s.concat(t.getPolygons()):"Point"===e||"LineString"===e||"Polygon"===e?s.push(t):G(!1,39)})),n=j7):"MultiPoint"===o?(s=e.getPoints(),n=H7):"MultiLineString"===o?(s=e.getLineStrings(),n=z7):"MultiPolygon"===o?(s=e.getPolygons(),n=K7):G(!1,39),D6(i,q7,n,s,r)}var X7=N6(x8,{LinearRing:M6(n9)});function Y7(t,e,r){D6({node:t},X7,V7,[e],r)}var Z7=N6(x8,{ExtendedData:M6((function(t,e,r){for(var n={node:t},i=e.names,o=e.values,s=i.length,a=0;a<s;a++)D6(n,I7,T7,[{name:i[a],value:o[a]}],r)})),MultiGeometry:M6(W7),LineString:M6(n9),LinearRing:M6(n9),Point:M6(n9),Polygon:M6(l9),Style:M6((function(t,e,r){var n,i={node:t},o={};if(e.pointStyles.length){var s=e.pointStyles[0].getText();s&&(o.LabelStyle=s);var a=e.pointStyles[0].getImage();a&&"function"==typeof a.getSrc&&(o.IconStyle=a)}e.lineStyles.length&&(n=e.lineStyles[0].getStroke())&&(o.LineStyle=n),e.polyStyles.length&&((n=e.polyStyles[0].getStroke())&&!o.LineStyle&&(o.LineStyle=n),o.PolyStyle=e.polyStyles[0]);var l=r[r.length-1].node,u=c9[l.namespaceURI],h=O6(o,u);D6(i,A9,k6,h,r,u)})),address:M6(n8),description:M6(n8),name:M6(n8),open:M6(e8),phoneNumber:M6(n8),styleUrl:M6(n8),visibility:M6(e8)}),J7=N6(x8,["name","open","visibility","address","phoneNumber","description","styleUrl","Style"]),$7=L6("ExtendedData");function t9(t,e,r){var n={node:t};e.getId()&&t.setAttribute("id",e.getId());var i=e.getProperties(),o={address:1,description:1,name:1,open:1,phoneNumber:1,styleUrl:1,visibility:1};o[e.getGeometryName()]=1;var s=Object.keys(i||{}).sort().filter((function(t){return!o[t]})),a=e.getStyleFunction();if(a){var l=a(e,0);if(l){var u=Array.isArray(l)?l:[l],h=u;if(e.getGeometry()&&(h=u.filter((function(t){var r=t.getGeometryFunction()(e);if(r){var n=r.getType();return"GeometryCollection"===n?r.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return"Point"===e||"MultiPoint"===e})).length:"Point"===n||"MultiPoint"===n}}))),this.writeStyles_){var c=u,A=u;e.getGeometry()&&(c=u.filter((function(t){var r=t.getGeometryFunction()(e);if(r){var n=r.getType();return"GeometryCollection"===n?r.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return"LineString"===e||"MultiLineString"===e})).length:"LineString"===n||"MultiLineString"===n}})),A=u.filter((function(t){var r=t.getGeometryFunction()(e);if(r){var n=r.getType();return"GeometryCollection"===n?r.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return"Polygon"===e||"MultiPolygon"===e})).length:"Polygon"===n||"MultiPolygon"===n}}))),i.Style={pointStyles:h,lineStyles:c,polyStyles:A}}if(h.length&&void 0===i.name){var f=h[0].getText();f&&(i.name=f.getText())}}}var p=r[r.length-1].node,d=J7[p.namespaceURI],g=O6(i,d);if(D6(n,Z7,k6,g,r,d),s.length>0){var y=O6(i,s);D6(n,Z7,$7,[{names:s,values:y}],r)}var m=r[0],v=e.getGeometry();v&&(v=Bh(v,!0,m)),D6(n,Z7,j7,[v],r)}var e9=N6(x8,["extrude","tessellate","altitudeMode","coordinates"]),r9=N6(x8,{extrude:M6(e8),tessellate:M6(e8),altitudeMode:M6(n8),coordinates:M6((function(t,e,r){var n,i=r[r.length-1],o=i.layout,s=i.stride;"XY"==o||"XYM"==o?n=2:"XYZ"==o||"XYZM"==o?n=3:G(!1,34);var a=e.length,l="";if(a>0){l+=e[0];for(var u=1;u<n;++u)l+=","+e[u];for(var h=s;h<a;h+=s)for(l+=" "+e[h],u=1;u<n;++u)l+=","+e[h+u]}n8(t,l)}))});function n9(t,e,r){var n=e.getFlatCoordinates(),i={node:t};i.layout=e.getLayout(),i.stride=e.getStride();var o=e.getProperties();o.coordinates=n;var s=r[r.length-1].node,a=e9[s.namespaceURI],l=O6(o,a);D6(i,r9,k6,l,r,a)}var i9=N6(x8,["color","fill","outline"]),o9=N6(x8,{outerBoundaryIs:M6(Y7),innerBoundaryIs:M6(Y7)}),s9=L6("innerBoundaryIs"),a9=L6("outerBoundaryIs");function l9(t,e,r){var n=e.getLinearRings(),i=n.shift(),o={node:t};D6(o,o9,s9,n,r),D6(o,o9,a9,[i],r)}var u9=N6(x8,{color:M6(B7),fill:M6(e8),outline:M6(e8)});function h9(t,e){r8(t,Math.round(1e6*e)/1e6)}var c9=N6(x8,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),A9=N6(x8,{IconStyle:M6((function(t,e,r){var n={node:t},i={},o=e.getSrc(),s=e.getSize(),a=e.getImageSize(),l={href:o};if(s){l.w=s[0],l.h=s[1];var u=e.getAnchor(),h=e.getOrigin();if(h&&a&&0!==h[0]&&h[1]!==s[1]&&(l.x=h[0],l.y=a[1]-(h[1]+s[1])),u&&(u[0]!==s[0]/2||u[1]!==s[1]/2)){var c={x:u[0],xunits:"pixels",y:s[1]-u[1],yunits:"pixels"};i.hotSpot=c}}i.Icon=l;var A=e.getScaleArray()[0],f=s;null===f&&(f=g8),2==f.length&&(A/=R8(f)),1!==A&&(i.scale=A);var p=e.getRotation();0!==p&&(i.heading=p);var d=e.getColor();d&&(i.color=d);var g=r[r.length-1].node,y=O7[g.namespaceURI],m=O6(i,y);D6(n,N7,k6,m,r,y)})),LabelStyle:M6((function(t,e,r){var n={node:t},i={},o=e.getFill();o&&(i.color=o.getColor());var s=e.getScale();s&&1!==s&&(i.scale=s);var a=r[r.length-1].node,l=R7[a.namespaceURI],u=O6(i,l);D6(n,U7,k6,u,r,l)})),LineStyle:M6((function(t,e,r){var n={node:t},i={color:e.getColor(),width:Number(e.getWidth())||1},o=r[r.length-1].node,s=D7[o.namespaceURI],a=O6(i,s);D6(n,Q7,k6,a,r,s)})),PolyStyle:M6((function(t,e,r){var n={node:t},i=e.getFill(),o=e.getStroke(),s={color:i?i.getColor():void 0,fill:!!i&&void 0,outline:!!o&&void 0},a=r[r.length-1].node,l=i9[a.namespaceURI],u=O6(s,l);D6(n,u9,k6,u,r,l)}))});const f9=D8;var p9=globalThis&&globalThis.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),d9=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,n)||this).schemaLocation=n.schemaLocation?n.schemaLocation:r.namespace+" http://schemas.opengis.net/gml/3.2.1/gml.xsd",r}return p9(e,t),e}(c8);d9.prototype.namespace="http://www.opengis.net/gml/3.2",d9.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml/3.2":{pos:F6(c8.prototype.readFlatPos),posList:F6(c8.prototype.readFlatPosList),coordinates:F6(a8.prototype.readFlatCoordinates)}},d9.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml/3.2":{interior:c8.prototype.interiorParser,exterior:c8.prototype.exteriorParser}},d9.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml/3.2":{Point:F6(X6.prototype.readPoint),MultiPoint:F6(X6.prototype.readMultiPoint),LineString:F6(X6.prototype.readLineString),MultiLineString:F6(X6.prototype.readMultiLineString),LinearRing:F6(X6.prototype.readLinearRing),Polygon:F6(X6.prototype.readPolygon),MultiPolygon:F6(X6.prototype.readMultiPolygon),Surface:F6(d9.prototype.readSurface),MultiSurface:F6(c8.prototype.readMultiSurface),Curve:F6(d9.prototype.readCurve),MultiCurve:F6(c8.prototype.readMultiCurve),Envelope:F6(d9.prototype.readEnvelope)}},d9.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml/3.2":{curveMember:P6(c8.prototype.curveMemberParser),curveMembers:P6(c8.prototype.curveMemberParser)}},d9.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{surfaceMember:P6(c8.prototype.surfaceMemberParser),surfaceMembers:P6(c8.prototype.surfaceMemberParser)}},d9.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:P6(X6.prototype.readLineString),Curve:P6(c8.prototype.readCurve)}},d9.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:P6(X6.prototype.readPolygon),Surface:P6(c8.prototype.readSurface)}},d9.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{patches:F6(c8.prototype.readPatch)}},d9.prototype.CURVE_PARSERS={"http://www.opengis.net/gml/3.2":{segments:F6(c8.prototype.readSegment)}},d9.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml/3.2":{lowerCorner:P6(c8.prototype.readFlatPosList),upperCorner:P6(c8.prototype.readFlatPosList)}},d9.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml/3.2":{PolygonPatch:F6(c8.prototype.readPolygonPatch)}},d9.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml/3.2":{LineStringSegment:I6(c8.prototype.readLineStringSegment)}},d9.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml/3.2":{pointMember:P6(X6.prototype.pointMemberParser),pointMembers:P6(X6.prototype.pointMemberParser)}},d9.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml/3.2":{lineStringMember:P6(X6.prototype.lineStringMemberParser),lineStringMembers:P6(X6.prototype.lineStringMemberParser)}},d9.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml/3.2":{polygonMember:P6(X6.prototype.polygonMemberParser),polygonMembers:P6(X6.prototype.polygonMemberParser)}},d9.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Point:P6(X6.prototype.readFlatCoordinatesFromNode)}},d9.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:P6(X6.prototype.readLineString)}},d9.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:P6(X6.prototype.readPolygon)}},d9.prototype.RING_PARSERS={"http://www.opengis.net/gml/3.2":{LinearRing:F6(X6.prototype.readFlatLinearRing),Ring:F6(d9.prototype.readFlatCurveRing)}},d9.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml/3.2":{exterior:M6(c8.prototype.writeRing),interior:M6(c8.prototype.writeRing)}},d9.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lowerCorner:M6(n8),upperCorner:M6(n8)}},d9.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{surfaceMember:M6(c8.prototype.writeSurfaceOrPolygonMember),polygonMember:M6(c8.prototype.writeSurfaceOrPolygonMember)}},d9.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{pointMember:M6(c8.prototype.writePointMember)}},d9.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lineStringMember:M6(c8.prototype.writeLineStringOrCurveMember),curveMember:M6(c8.prototype.writeLineStringOrCurveMember)}},d9.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml/3.2":{Curve:M6(c8.prototype.writeCurveOrLineString),MultiCurve:M6(c8.prototype.writeMultiCurveOrLineString),Point:M6(d9.prototype.writePoint),MultiPoint:M6(c8.prototype.writeMultiPoint),LineString:M6(c8.prototype.writeCurveOrLineString),MultiLineString:M6(c8.prototype.writeMultiCurveOrLineString),LinearRing:M6(c8.prototype.writeLinearRing),Polygon:M6(c8.prototype.writeSurfaceOrPolygon),MultiPolygon:M6(c8.prototype.writeMultiSurfaceOrPolygon),Surface:M6(c8.prototype.writeSurfaceOrPolygon),MultiSurface:M6(c8.prototype.writeMultiSurfaceOrPolygon),Envelope:M6(c8.prototype.writeEnvelope)}};const g9=d9,y9=function(){function t(t){this.tagName_=t}return t.prototype.getTagName=function(){return this.tagName_},t}();var m9=globalThis&&globalThis.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();const v9=function(t){function e(e,r){var n=t.call(this,e)||this;return n.conditions=r,G(n.conditions.length>=2,57),n}return m9(e,t),e}(y9);var _9=globalThis&&globalThis.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();const w9=function(t){function e(e){return t.call(this,"And",Array.prototype.slice.call(arguments))||this}return _9(e,t),e}(v9);var b9=globalThis&&globalThis.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();const x9=function(t){function e(e,r,n){var i=t.call(this,"BBOX")||this;if(i.geometryName=e,i.extent=r,4!==r.length)throw new Error("Expected an extent with four values ([minX, minY, maxX, maxY])");return i.srsName=n,i}return b9(e,t),e}(y9);var C9=globalThis&&globalThis.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),S9={"http://www.opengis.net/gml":{boundedBy:T6(X6.prototype.readExtentElement,"bounds")},"http://www.opengis.net/wfs/2.0":{member:P6(X6.prototype.readFeaturesInternal)}},E9={"http://www.opengis.net/wfs":{totalInserted:T6(J6),totalUpdated:T6(J6),totalDeleted:T6(J6)},"http://www.opengis.net/wfs/2.0":{totalInserted:T6(J6),totalUpdated:T6(J6),totalDeleted:T6(J6)}},B9={"http://www.opengis.net/wfs":{TransactionSummary:T6(U9,"transactionSummary"),InsertResults:T6(j9,"insertIds")},"http://www.opengis.net/wfs/2.0":{TransactionSummary:T6(U9,"transactionSummary"),InsertResults:T6(j9,"insertIds")}},I9={"http://www.opengis.net/wfs":{PropertyName:M6(n8)},"http://www.opengis.net/wfs/2.0":{PropertyName:M6(n8)}},P9={"http://www.opengis.net/wfs":{Insert:M6(H9),Update:M6(q9),Delete:M6(K9),Property:M6(W9),Native:M6(X9)},"http://www.opengis.net/wfs/2.0":{Insert:M6(H9),Update:M6(q9),Delete:M6(K9),Property:M6(W9),Native:M6(X9)}},F9="http://www.w3.org/2000/xmlns/",T9={"2.0.0":"http://www.opengis.net/ogc/1.1","1.1.0":"http://www.opengis.net/ogc","1.0.0":"http://www.opengis.net/ogc"},M9={"2.0.0":"http://www.opengis.net/wfs/2.0","1.1.0":"http://www.opengis.net/wfs","1.0.0":"http://www.opengis.net/wfs"},L9={"2.0.0":"http://www.opengis.net/fes/2.0","1.1.0":"http://www.opengis.net/fes","1.0.0":"http://www.opengis.net/fes"},k9={"2.0.0":"http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd","1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.0.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"},O9={"2.0.0":g9,"1.1.0":c8,"1.0.0":a8},N9=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.version_=n.version?n.version:"1.1.0",r.featureType_=n.featureType,r.featureNS_=n.featureNS,r.gmlFormat_=n.gmlFormat?n.gmlFormat:new O9[r.version_],r.schemaLocation_=n.schemaLocation?n.schemaLocation:k9[r.version_],r}return C9(e,t),e.prototype.getFeatureType=function(){return this.featureType_},e.prototype.setFeatureType=function(t){this.featureType_=t},e.prototype.readFeaturesFromNode=function(t,e){var r={node:t};_(r,{featureType:this.featureType_,featureNS:this.featureNS_}),_(r,this.getReadOptions(t,e||{}));var n=[r],i=U6([],"2.0.0"===this.version_?S9:this.gmlFormat_.FEATURE_COLLECTION_PARSERS,t,n,this.gmlFormat_);return i||(i=[]),i},e.prototype.readTransactionResponse=function(t){if(t){if("string"==typeof t){var e=B6(t);return this.readTransactionResponseFromDocument(e)}return E6(t)?this.readTransactionResponseFromDocument(t):this.readTransactionResponseFromNode(t)}},e.prototype.readFeatureCollectionMetadata=function(t){if(t){if("string"==typeof t){var e=B6(t);return this.readFeatureCollectionMetadataFromDocument(e)}return E6(t)?this.readFeatureCollectionMetadataFromDocument(t):this.readFeatureCollectionMetadataFromNode(t)}},e.prototype.readFeatureCollectionMetadataFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readFeatureCollectionMetadataFromNode(e)},e.prototype.readFeatureCollectionMetadataFromNode=function(t){var e={},r=$6(t.getAttribute("numberOfFeatures"));return e.numberOfFeatures=r,U6(e,S9,t,[],this.gmlFormat_)},e.prototype.readTransactionResponseFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readTransactionResponseFromNode(e)},e.prototype.readTransactionResponseFromNode=function(t){return U6({},B9,t,[])},e.prototype.writeGetFeature=function(t){var e=this,r=x6(M9[this.version_],"GetFeature");r.setAttribute("service","WFS"),r.setAttribute("version",this.version_),t.handle&&r.setAttribute("handle",t.handle),t.outputFormat&&r.setAttribute("outputFormat",t.outputFormat),void 0!==t.maxFeatures&&r.setAttribute("maxFeatures",String(t.maxFeatures)),t.resultType&&r.setAttribute("resultType",t.resultType),void 0!==t.startIndex&&r.setAttribute("startIndex",String(t.startIndex)),void 0!==t.count&&r.setAttribute("count",String(t.count)),void 0!==t.viewParams&&r.setAttribute("viewParams",t.viewParams),r.setAttributeNS(b6,"xsi:schemaLocation",this.schemaLocation_);var n={node:r};if(_(n,{version:this.version_,srsName:t.srsName,featureNS:t.featureNS?t.featureNS:this.featureNS_,featurePrefix:t.featurePrefix,propertyNames:t.propertyNames?t.propertyNames:[]}),G(Array.isArray(t.featureTypes),11),"string"==typeof t.featureTypes[0]){var i=t.filter;t.bbox&&(G(t.geometryName,12),i=this.combineBboxAndFilter(t.geometryName,t.bbox,t.srsName,i)),_(n,{geometryName:t.geometryName,filter:i}),Att(r,t.featureTypes,[n])}else t.featureTypes.forEach((function(i){var o=e.combineBboxAndFilter(i.geometryName,i.bbox,t.srsName,t.filter);_(n,{geometryName:i.geometryName,filter:o}),Att(r,[i.name],[n])}));return r},e.prototype.combineBboxAndFilter=function(t,e,r,n){var i=function(t,e,r){return new x9(t,e,r)}(t,e,r);return n?function(t){var e=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(w9,e))}(n,i):i},e.prototype.writeTransaction=function(t,e,r,n){var i,o=[],s=n.version?n.version:this.version_,a=x6(M9[s],"Transaction");a.setAttribute("service","WFS"),a.setAttribute("version",s),n&&(i=n.gmlOptions?n.gmlOptions:{},n.handle&&a.setAttribute("handle",n.handle)),a.setAttributeNS(b6,"xsi:schemaLocation",k9[s]);var l=function(t,e,r,n){var i,o=n.featurePrefix?n.featurePrefix:"feature";return"1.0.0"===r?i=2:"1.1.0"===r?i=3:"2.0.0"===r&&(i=3.2),_({node:t},{version:r,featureNS:n.featureNS,featureType:n.featureType,featurePrefix:o,gmlVersion:i,hasZ:n.hasZ,srsName:n.srsName},e)}(a,i,s,n);return t&&R9("Insert",t,o,l),e&&R9("Update",e,o,l),r&&R9("Delete",r,o,l),n.nativeElements&&R9("Native",n.nativeElements,o,l),a},e.prototype.readProjectionFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readProjectionFromNode(e);return null},e.prototype.readProjectionFromNode=function(t){if(t.firstElementChild&&t.firstElementChild.firstElementChild)for(var e=(t=t.firstElementChild.firstElementChild).firstElementChild;e;e=e.nextElementSibling)if(0!==e.childNodes.length&&(1!==e.childNodes.length||3!==e.firstChild.nodeType)){var r=[{}];return this.gmlFormat_.readGeometryElement(e,r),Ye(r.pop().srsName)}return null},e}(z6);function R9(t,e,r,n){D6(n,P9,L6(t),e,r)}function U9(t,e){return U6({},E9,t,e)}var D9={"http://www.opengis.net/ogc":{FeatureId:P6((function(t,e){return t.getAttribute("fid")}))},"http://www.opengis.net/ogc/1.1":{FeatureId:P6((function(t,e){return t.getAttribute("fid")}))}};function Q9(t,e){R6(D9,t,e)}var G9={"http://www.opengis.net/wfs":{Feature:Q9},"http://www.opengis.net/wfs/2.0":{Feature:Q9}};function j9(t,e){return U6([],G9,t,e)}function H9(t,e,r){var n=r[r.length-1],i=n.featureType,o=n.featureNS,s=n.gmlVersion,a=x6(o,i);t.appendChild(a),2===s?a8.prototype.writeFeatureElement(a,e,r):3===s?c8.prototype.writeFeatureElement(a,e,r):g9.prototype.writeFeatureElement(a,e,r)}function z9(t,e,r){var n=r[r.length-1].version,i=T9[n],o=x6(i,"Filter"),s=x6(i,"FeatureId");o.appendChild(s),s.setAttribute("fid",e),t.appendChild(o)}function V9(t,e){var r=(t=t||"feature")+":";return 0===e.indexOf(r)?e:r+e}function K9(t,e,r){var n=r[r.length-1];G(void 0!==e.getId(),26);var i=n.featureType,o=n.featurePrefix,s=n.featureNS,a=V9(o,i);t.setAttribute("typeName",a),t.setAttributeNS(F9,"xmlns:"+o,s);var l=e.getId();void 0!==l&&z9(t,l,r)}function q9(t,e,r){var n=r[r.length-1];G(void 0!==e.getId(),27);var i=n.version,o=n.featureType,s=n.featurePrefix,a=n.featureNS,l=V9(s,o),u=e.getGeometryName();t.setAttribute("typeName",l),t.setAttributeNS(F9,"xmlns:"+s,a);var h=e.getId();if(void 0!==h){for(var c=e.getKeys(),A=[],f=0,p=c.length;f<p;f++){var d=e.get(c[f]);if(void 0!==d){var g=c[f];d&&"function"==typeof d.getSimplifiedGeometry&&(g=u),A.push({name:g,value:d})}}D6({version:i,gmlVersion:n.gmlVersion,node:t,hasZ:n.hasZ,srsName:n.srsName},P9,L6("Property"),A,r),z9(t,h,r)}}function W9(t,e,r){var n=r[r.length-1],i=n.version,o=M9[i],s=x6(o,"Name"),a=n.gmlVersion;if(t.appendChild(s),n8(s,e.name),void 0!==e.value&&null!==e.value){var l=x6(o,"Value");t.appendChild(l),e.value&&"function"==typeof e.value.getSimplifiedGeometry?2===a?a8.prototype.writeGeometryElement(l,e.value,r):3===a?c8.prototype.writeGeometryElement(l,e.value,r):g9.prototype.writeGeometryElement(l,e.value,r):n8(l,e.value)}}function X9(t,e,r){e.vendorId&&t.setAttribute("vendorId",e.vendorId),void 0!==e.safeToIgnore&&t.setAttribute("safeToIgnore",String(e.safeToIgnore)),void 0!==e.value&&n8(t,e.value)}var Y9={"http://www.opengis.net/wfs":{Query:M6(Z9)},"http://www.opengis.net/wfs/2.0":{Query:M6(Z9)},"http://www.opengis.net/ogc":{During:M6(ett),And:M6(rtt),Or:M6(rtt),Not:M6(ntt),BBOX:M6(J9),Contains:M6($9),Intersects:M6($9),Within:M6($9),DWithin:M6(ttt),PropertyIsEqualTo:M6(itt),PropertyIsNotEqualTo:M6(itt),PropertyIsLessThan:M6(itt),PropertyIsLessThanOrEqualTo:M6(itt),PropertyIsGreaterThan:M6(itt),PropertyIsGreaterThanOrEqualTo:M6(itt),PropertyIsNull:M6(ott),PropertyIsBetween:M6(stt),PropertyIsLike:M6(att)},"http://www.opengis.net/fes/2.0":{During:M6(ett),And:M6(rtt),Or:M6(rtt),Not:M6(ntt),BBOX:M6(J9),Contains:M6($9),Disjoint:M6($9),Intersects:M6($9),ResourceId:M6((function(t,e,r){t.setAttribute("rid",e.rid)})),Within:M6($9),DWithin:M6(ttt),PropertyIsEqualTo:M6(itt),PropertyIsNotEqualTo:M6(itt),PropertyIsLessThan:M6(itt),PropertyIsLessThanOrEqualTo:M6(itt),PropertyIsGreaterThan:M6(itt),PropertyIsGreaterThanOrEqualTo:M6(itt),PropertyIsNull:M6(ott),PropertyIsBetween:M6(stt),PropertyIsLike:M6(att)}};function Z9(t,e,r){var n,i,o=r[r.length-1],s=o.version,a=o.featurePrefix,l=o.featureNS,u=o.propertyNames,h=o.srsName;n=a?V9(a,e):e,i="2.0.0"===s?"typeNames":"typeName",t.setAttribute(i,n),h&&t.setAttribute("srsName",h),l&&t.setAttributeNS(F9,"xmlns:"+a,l);var c=_({},o);c.node=t,D6(c,I9,L6("PropertyName"),u,r);var A=o.filter;if(A){var f=x6(ftt(s),"Filter");t.appendChild(f),function(t,e,r){var n=r[r.length-1],i={node:t};_(i,{context:n}),D6(i,Y9,L6(e.getTagName()),[e],r)}(f,A,r)}}function J9(t,e,r){var n=r[r.length-1],i=n.context.version;n.srsName=e.srsName;var o=O9[i];htt(i,t,e.geometryName),o.prototype.writeGeometryElement(t,e.extent,r)}function $9(t,e,r){var n=r[r.length-1],i=n.context.version;n.srsName=e.srsName;var o=O9[i];htt(i,t,e.geometryName),o.prototype.writeGeometryElement(t,e.geometry,r)}function ttt(t,e,r){var n=r[r.length-1].context.version;$9(t,e,r);var i=x6(ftt(n),"Distance");n8(i,e.distance.toString()),"2.0.0"===n?i.setAttribute("uom",e.unit):i.setAttribute("units",e.unit),t.appendChild(i)}function ett(t,e,r){var n=r[r.length-1].context.version;ltt(L9[n],"ValueReference",t,e.propertyName);var i=x6(K6,"TimePeriod");t.appendChild(i);var o=x6(K6,"begin");i.appendChild(o),ctt(o,e.begin);var s=x6(K6,"end");i.appendChild(s),ctt(s,e.end)}function rtt(t,e,r){var n=r[r.length-1].context,i={node:t};_(i,{context:n});for(var o=e.conditions,s=0,a=o.length;s<a;++s){var l=o[s];D6(i,Y9,L6(l.getTagName()),[l],r)}}function ntt(t,e,r){var n=r[r.length-1].context,i={node:t};_(i,{context:n});var o=e.condition;D6(i,Y9,L6(o.getTagName()),[o],r)}function itt(t,e,r){var n=r[r.length-1].context.version;void 0!==e.matchCase&&t.setAttribute("matchCase",e.matchCase.toString()),htt(n,t,e.propertyName),utt(n,t,""+e.expression)}function ott(t,e,r){htt(r[r.length-1].context.version,t,e.propertyName)}function stt(t,e,r){var n=r[r.length-1].context.version,i=ftt(n);htt(n,t,e.propertyName);var o=x6(i,"LowerBoundary");t.appendChild(o),utt(n,o,""+e.lowerBoundary);var s=x6(i,"UpperBoundary");t.appendChild(s),utt(n,s,""+e.upperBoundary)}function att(t,e,r){var n=r[r.length-1].context.version;t.setAttribute("wildCard",e.wildCard),t.setAttribute("singleChar",e.singleChar),t.setAttribute("escapeChar",e.escapeChar),void 0!==e.matchCase&&t.setAttribute("matchCase",e.matchCase.toString()),htt(n,t,e.propertyName),utt(n,t,""+e.pattern)}function ltt(t,e,r,n){var i=x6(t,e);n8(i,n),r.appendChild(i)}function utt(t,e,r){ltt(ftt(t),"Literal",e,r)}function htt(t,e,r){"2.0.0"===t?ltt(L9[t],"ValueReference",e,r):ltt(T9[t],"PropertyName",e,r)}function ctt(t,e){var r=x6(K6,"TimeInstant");t.appendChild(r);var n=x6(K6,"timePosition");r.appendChild(n),n8(n,e)}function Att(t,e,r){var n=r[r.length-1],i=_({},n);i.node=t,D6(i,Y9,L6("Query"),e,r)}function ftt(t){return"2.0.0"===t?L9[t]:T9[t]}const ptt=N9;var dtt=function(t){(t=t||{}).displacement||(t.displacement=[t.offsetX||0,-t.offsetY||0]),this.sanchor_="anchored"===t.kind?8:0,this._shadow=Number(t.shadow)||0,t.stroke||(t.stroke=new vn({width:0,color:"#000"}));var e=t.stroke.getWidth();if(e<0&&(e=0),"folio"==t.kind&&(e+=6),t.stroke.setWidth(e),ii.call(this,{radius:t.radius+e+this.sanchor_/2+this._shadow/2,points:0,displacement:[t.displacement[0]||0,(t.displacement[1]||0)+this.sanchor_],fill:ii.prototype.render?new fn({color:[0,0,0,0]}):null}),!this.getHitDetectionImage){var r=ii.prototype.getImage.call(this);if(!this.hitDetectionCanvas_)for(var n in this)if(this[n]&&this[n].getContext&&this[n]!==r){this.hitDetectionCanvas_=this[n];break}this.hitDetectionCanvas_=document.createElement("canvas"),this.hitDetectionCanvas_.width=r.width,this.hitDetectionCanvas_.height=r.height;var i=this.hitDetectionCanvas_;this.getHitDetectionImage=function(){return i}}this._stroke=t.stroke,this._fill=t.fill,this._crop=t.crop,this._crossOrigin=t.crossOrigin,this._kind=t.kind||"default",this._radius=t.radius,this._src=t.src,this._offset=[t.offsetX?t.offsetX:0,t.offsetY?t.offsetY:0],this._onload=t.onload,"number"==typeof t.opacity&&this.setOpacity(t.opacity),"number"==typeof t.rotation&&this.setRotation(t.rotation),this.getImage()};vg(dtt,ii),dtt.prototype.setOffset=function(t){this._offset=[t[0]||0,t[1]||0],this.getImage()},dtt.prototype.clone=function(){var t=new dtt({stroke:this._stroke,fill:this._fill,shadow:this._shadow,crop:this._crop,crossOrigin:this._crossOrigin,kind:this._kind,radius:this._radius,src:this._src,offsetX:this._offset[0],offsetY:this._offset[1],opacity:this.getOpacity(),rotation:this.getRotation()});return t.getImage(),t},CanvasRenderingContext2D.prototype.roundRect=function(t,e,r,n,i){return i?(r<2*i&&(i=r/2),n<2*i&&(i=n/2),this.beginPath(),this.moveTo(t+i,e),this.arcTo(t+r,e,t+r,e+n,i),this.arcTo(t+r,e+n,t,e+n,i),this.arcTo(t,e+n,t,e,i),this.arcTo(t,e,t+r,e,i),this.closePath()):this.rect(t,e,r,n),this},dtt.prototype.drawBack_=function(t,e,r,n){var i=this._shadow,o=t.canvas;t.beginPath(),t.fillStyle=e,t.clearRect(0,0,o.width,o.height);var s=o.width/n,a=o.height/n;switch(this._kind){case"square":t.rect(0,0,s-i,a-i);break;case"circle":t.arc(this._radius+r,this._radius+r,this._radius+r,0,2*Math.PI,!1);break;case"folio":r-=6,t.strokeStyle="rgba(0,0,0,0.5)",t.lineWidth=1;var l=s-i-12,u=Math.atan(6/l);t.save(),t.rotate(-u),t.translate(-6,2),t.beginPath(),t.rect(6,6,l,l),t.stroke(),t.fill(),t.restore(),t.save(),t.translate(6,-1),t.rotate(u),t.beginPath(),t.rect(6,6,l,l),t.stroke(),t.fill(),t.restore(),t.beginPath(),t.rect(6,6,l,l),t.stroke();break;case"anchored":t.roundRect(this.sanchor_/2,0,s-this.sanchor_-i,a-this.sanchor_-i,r),t.moveTo(s/2-this.sanchor_-i/2,a-this.sanchor_-i),t.lineTo(s/2+this.sanchor_-i/2,a-this.sanchor_-i),t.lineTo(s/2-i/2,a-i);break;default:t.roundRect(0,0,s-i,a-i,r)}t.closePath()},dtt.prototype.getImage=function(t){t=t||1;var e,r=ii.prototype.getImage.call(this,t);if(this._gethit)return r;var n=0;this._stroke&&(e=Sn(this._stroke.getColor()),n=this._stroke.getWidth()),this._gethit=!0;var i=this.getHitDetectionImage().getContext("2d");i.save(),i.setTransform(1,0,0,1,0,0),this.drawBack_(i,"#000",n,1),i.fill(),i.restore(),this._gethit=!1,(i=r.getContext("2d")).save(),i.setTransform(t,0,0,t,0,0),this.drawBack_(i,e,n,t),this._shadow&&(i.shadowColor="rgba(0,0,0,0.5)",i.shadowBlur=t*this._shadow/2,i.shadowOffsetX=t*this._shadow/2,i.shadowOffsetY=t*this._shadow/2),i.fill(),i.restore();var o=this,s=this.img_=new Image;if(this._crossOrigin&&(s.crossOrigin=this._crossOrigin),s.src=this._src,s.width?o.drawImage_(r,s,t):s.onload=function(){o.drawImage_(r,s,t),o._onload&&o._onload()},!this.getDisplacement){var a=this.getAnchor();a[0]=(r.width/t-this._shadow)/2-this._offset[0],this.sanchor_?a[1]=r.height/t-this._shadow-this._offset[1]:a[1]=(r.height/t-this._shadow)/2-this._offset[1]}return r},dtt.prototype.getPhoto=function(){return this.img_},dtt.prototype.drawImage_=function(t,e,r){var n=t.getContext("2d"),i=0;this._stroke&&(i=this._stroke.getWidth());var o,s,a,l,u,h,c,A,f,p=2*this._radius;n.save(),ii.prototype.render&&n.setTransform(r,0,0,r,0,0),"circle"==this._kind&&(n.beginPath(),n.arc(this._radius+i,this._radius+i,this._radius,0,2*Math.PI,!1),n.clip()),this._crop?(A=f=(o=Math.min(e.width/p,e.height/p))*p,h=(e.width-A)/2,c=(e.height-f)/2,s=a=0,l=u=p+1):(h=c=0,s=(p-(l=(o=Math.min(p/e.width,p/e.height))*(A=e.width)))/2,a=(p-(u=o*(f=e.height)))/2),s+=i+this.sanchor_/2,a+=i,n.drawImage(e,h,c,A,f,s,a,l,u),"circle"==this._kind&&i&&(n.beginPath(),n.strokeStyle=Sn(this._stroke.getColor()),n.lineWidth=i/4,n.arc(this._radius+i,this._radius+i,this._radius,0,2*Math.PI,!1),n.stroke()),n.restore()};var gtt=function(t){t=t||{},this.duration_="number"==typeof t.duration?t.duration>=0?t.duration:0:1e3,this.fade_="function"==typeof t.fade?t.fade:null,this.repeat_=Number(t.repeat);var e="function"==typeof t.easing?t.easing:Bs;t.revers?this.easing_=function(t){return 1-e(t)}:this.easing_=e,this.hiddenStyle=t.hiddenStyle,N.call(this)};vg(gtt,N),gtt.hiddenStyle=new Ai({image:new si({}),stroke:new vn({color:"transparent"})}),gtt.prototype.drawGeom_=function(t,e,r){this.fade_&&(t.context.globalAlpha=this.fade_(1-t.elapsed));for(var n=t.style,i=0;i<n.length;i++)try{var o=t.vectorContext||s6(t),s=l6(t,n[i]);o.setStyle(s),s.getZIndex()<0?o.drawGeometry(r||e):o.drawGeometry(e)}catch(a){}},gtt.prototype.animate=function(){return!1},Bu.prototype.animateFeature=function(t,e){var r=this._featureAnimationLayer;r||(r=this._featureAnimationLayer=new ls({source:new ws})).setMap(this),r.getSource().addFeature(t);var n=e.on("animationend",(function(e){e.feature===t&&(r.getSource().removeFeature(t),M(n))}));r.animateFeature(t,e)},di.prototype.animateFeature=function(t,e,r){var n,i=this,o=t.getStyle(),s=o||(this.getStyleFunction?this.getStyleFunction()(t):null);s||(s=[]),s instanceof Array||(s=[s]);var a={vectorContext:null,frameState:null,start:0,time:0,elapsed:0,extent:!1,feature:t,geom:t.getGeometry(),typeGeom:t.getGeometry().getType(),bbox:t.getGeometry().getExtent(),coord:Ut(t.getGeometry().getExtent()),style:s};e instanceof Array||(e=[e]);for(var l=e.length-1;l>=0;l--)0===e[l].duration_&&e.splice(l,1);var u=0,h=0,c=r&&this.getFilters?this.getFilters():[];function A(r){a.type=r.type;try{a.vectorContext=r.vectorContext||s6(r)}catch(o){}if(a.frameState=r.frameState,a.inversePixelTransform=r.inversePixelTransform,a.extent||(a.extent=r.frameState.extent,a.start=r.frameState.time,a.context=r.context),a.time=r.frameState.time-a.start,a.elapsed=a.time/e[h].duration_,a.elapsed>1&&(a.elapsed=1),r.context.save(),c.forEach((function(t){t.get("active")&&t.precompose(r)})),this.getOpacity&&(r.context.globalAlpha=this.getOpacity()),e[h].animate(a)){var n={type:"animating",step:h,start:a.start,time:a.time,elapsed:a.elapsed,rotation:a.rotation||0,geom:a.geom,coordinate:a.coord,feature:t};e[h].dispatchEvent(n),i.dispatchEvent(n)}else++u<e[h].repeat_?a.extent=!1:h<e.length-1?(e[h].dispatchEvent({type:"animationend",feature:t}),h++,u=0,a.extent=!1):f();c.forEach((function(t){t.get("active")&&t.postcompose(r)})),r.context.restore(),r.frameState.animate=!0}function f(r){M(n),n=null,t.setStyle(o);var s={type:"animationend",feature:t};if(r)for(var a in r)r.hasOwnProperty(a)&&(s[a]=r[a]);e[h].dispatchEvent(s),i.dispatchEvent(s)}function p(r){if(e.length&&!n){if(n=i.on(["postcompose","postrender"],A.bind(i)),i.renderSync)try{i.renderSync()}catch(OR){}else i.changed();t.setStyle(e[h].hiddenStyle||gtt.hiddenStyle);var o={type:"animationstart",feature:t};if(r)for(var s in r)r.hasOwnProperty(s)&&(o[s]=r[s]);e[h].dispatchEvent(o),i.dispatchEvent(o)}}return p(),{start:p,stop:f,isPlaying:function(){return!!n}}};var ytt=function(t){gtt.call(this,t=t||{}),this.amplitude_=t.amplitude||40,this.bounce_=-Math.PI*(t.bounce||3)};vg(ytt,gtt),ytt.prototype.animate=function(t){var e=t.geom.clone(),r=Math.abs(Math.sin(this.bounce_*t.elapsed))*this.amplitude_*(1-this.easing_(t.elapsed))*t.frameState.viewState.resolution;return e.translate(0,r),this.drawGeom_(t,e,t.geom),t.time<=this.duration_};var mtt=function(t){gtt.call(this,t),this.set("nb",t.nb||10)};vg(mtt,gtt),mtt.prototype.animate=function(t){return Math.round(this.easing_(t.elapsed)*this.get("nb"))%2||this.drawGeom_(t,t.geom),t.time<=this.duration_};var vtt=function(t){t=t||{},this.speed_=t.speed||0,gtt.call(this,t),this.side_=t.side||"top"};vg(vtt,gtt),vtt.prototype.animate=function(t){if(!t.time){var e=t.frameState.viewState.rotation,r=t.frameState.size[1]*t.frameState.viewState.resolution;"top"!=this.side_&&(r*=-1),this.dx=-Math.sin(e)*r,this.dy=Math.cos(e)*r,this.speed_&&(this.duration_=r/this.speed_/t.frameState.viewState.resolution)}var n=t.geom.clone();return n.translate(this.dx*(1-this.easing_(t.elapsed)),this.dy*(1-this.easing_(t.elapsed))),this.drawGeom_(t,n,t.geom),t.time<=this.duration_};var _tt=function(t){t=t||{},this.speed_=t.speed||0,gtt.call(this,t)};vg(_tt,gtt),_tt.prototype.animate=function(t){return t.context.globalAlpha=this.easing_(t.elapsed),this.drawGeom_(t,t.geom),t.time<=this.duration_};var wtt=function(t){switch(gtt.call(this,t=t||{}),this.speed_=t.speed||0,this.path_=t.path,t.rotate){case!0:case 0:this.rotate_=0;break;default:this.rotate_=t.rotate||!1}this.path_&&this.path_.getGeometry&&(this.path_=this.path_.getGeometry()),this.path_&&this.path_.getLineString&&(this.path_=this.path_.getLineString()),this.path_.getLength?(this.dist_=this.path_.getLength(),this.path_&&this.path_.getCoordinates&&(this.path_=this.path_.getCoordinates())):this.dist_=0,this.speed_>0&&(this.duration_=this.dist_/this.speed_)};vg(wtt,gtt),wtt.prototype.animate=function(t){if(!t.time&&!this.dist_)return!1;var e,r,n,i,o,s,a=this.dist_*this.easing_(t.elapsed),l=0;r=this.path_[0];for(var u=1;u<this.path_.length;u++){if(e=r,i=(r=this.path_[u])[0]-e[0],o=r[1]-e[1],(s=Math.sqrt(i*i+o*o))&&l+s>=a){n=(a-l)/s,r=[e[0]+(r[0]-e[0])*n,e[1]+(r[1]-e[1])*n];break}l+=s}var h=t.style;if(t.rotation=Math.PI/2+Math.atan2(e[1]-r[1],e[0]-r[0]),!1!==this.rotate_){var c=[],A=this.rotate_-t.rotation+t.frameState.viewState.rotation;t.rotation=Math.PI/2+Math.atan2(e[1]-r[1],e[0]-r[0]);for(var f=0;n=t.style[f];f++)n.getImage()&&n.getImage().setRotation(A),c.push(n);t.style=c}return t.geom.setCoordinates(r),this.drawGeom_(t,t.geom),t.style=h,t.time<=this.duration_};var btt=function(t){gtt.call(this,t=t||{}),this.amplitude_=t.amplitude||40,this.bounce_=-Math.PI*(t.bounce||6),this.horizontal_=t.horizontal};vg(btt,gtt),btt.prototype.animate=function(t){var e=t.geom.clone(),r=t.geom.clone(),n=this.easing_(t.elapsed);return n=Math.sin(this.bounce_*n)*this.amplitude_*(1-n)*t.frameState.viewState.resolution,this.horizontal_?(e.translate(n,0),r.translate(n,0)):e.translate(0,n),this.drawGeom_(t,e,r),t.time<=this.duration_};var xtt=function(t){gtt.call(this,t)};vg(xtt,gtt),xtt.prototype.animate=function(t){return this.drawGeom_(t,t.geom),t.time<=this.duration_};var Ctt=function(t){t=t||{},this.speed_=t.speed||0,gtt.call(this,t),this.side_=t.side||"left"};vg(Ctt,gtt),Ctt.prototype.animate=function(t){t.time||("left"==this.side_?this.dx=t.extent[0]-t.bbox[2]:this.dx=t.extent[2]-t.bbox[0],this.speed_&&(this.duration_=Math.abs(this.dx)/this.speed_/t.frameState.viewState.resolution));var e=t.geom.clone();return e.translate(this.dx*(1-this.easing_(t.elapsed)),0),this.drawGeom_(t,e),t.time<=this.duration_};var Stt=function(t){gtt.call(this,t)};vg(Stt,gtt),Stt.prototype.animate=function(t){var e=this.easing_(t.elapsed);if(e){t.context.save();var r=t.frameState.pixelRatio;t.context.globalAlpha=e,t.context.scale(e,1/e);var n=t.frameState.coordinateToPixelTransform,i=(1/e-1)*r*(n[0]*t.coord[0]+n[1]*t.coord[1]+n[4]),o=(e-1)*r*(n[2]*t.coord[0]+n[3]*t.coord[1]+n[5]);t.context.translate(i,o),this.drawGeom_(t,t.geom),t.context.restore()}return t.time<=this.duration_};var Ett=function(t){gtt.call(this,t=t||{}),this.speed_=t.speed||0,this.side_=t.side||"left"};vg(Ett,gtt),Ett.prototype.animate=function(t){var e,r;!t.time&&this.speed_&&("left"==this.side_?(e=this.dx=t.extent[0]-t.bbox[2],r=this.dy=t.extent[3]-t.bbox[1]):(e=this.dx=t.extent[2]-t.bbox[0],r=this.dy=t.extent[3]-t.bbox[1]),this.duration_=Math.sqrt(e*e+r*r)/this.speed_/t.frameState.viewState.resolution);var n=t.geom.clone(),i=t.geom.clone();return n.translate(this.dx*(1-this.easing_(t.elapsed)),this.dy*Math.cos(Math.PI/2*this.easing_(t.elapsed))),i.translate(this.dx*(1-this.easing_(t.elapsed)),0),this.drawGeom_(t,n,i),t.time<=this.duration_};var Btt=function(t){gtt.call(this,t=t||{}),this.set("zoomout",t.zoomOut)};vg(Btt,gtt),vg((function(t){(t=t||{}).zoomOut=!0,Btt.call(this,t)}),Btt),Btt.prototype.animate=function(t){var e=this.easing_(t.elapsed);if(e){this.get("zoomout")&&(e=1/e);var r,n,i=t.style,o=[];for(r=0;r<i.length;r++)(n=i[r].getImage())&&(o[r]=n.getScale(),"postrender"===t.type?n.setScale(o[r]*e/t.frameState.pixelRatio):n.setScale(o[r]*e));for(this.drawGeom_(t,t.geom),r=0;r<i.length;r++)(n=i[r].getImage())&&n.setScale(o[r])}return t.time<=this.duration_};class Itt extends z{constructor(t){super(),e(this,"option"),e(this,"Proj"),this.option={lnglat:[0,0],dataWkID:og.EPSG3857,tooltipOption:{offset:[0,0]},popupOption:{offset:[0,0]},style:{text:{font:"14px Microsoft YaHei",text:"",fill:{color:"#8B4513"},stroke:{color:"rgba(255, 255, 255,1)",width:2},backgroundFill:{color:"rgba(255, 255, 255, 0.0)"},backgroundStroke:{color:"rgba(0, 0, 0, 0.0)",width:2},padding:[3,3,3,3],offsetX:0,offsetY:-10,textBaseline:"bottom"},image:{scale:1,radius:5,fill:{color:"rgba(255, 0, 0,1)"},stroke:{color:"rgba(255, 255, 0,1)",width:1}},stroke:{color:"rgba(255, 255, 0,1)",width:2,lineDash:null,pattern:void 0,ratio:1,patternColor:"rgba(0, 0, 0,1)",offset:0,scale:1,size:5,spacing:10,angle:0},fill:{color:"rgba(255, 255, 255,0.2)",pattern:void 0,image:void 0,ratio:1,patternColor:"rgba(0, 0, 0,1)",offset:0,scale:1,size:5,spacing:10,angle:0},imageOption:{},zIndex:999,radius:0,startAngle:0,stopAngle:0,rotation:0},attribute:null},this.option=bT.merge(this.option,t,!0),this.Proj=new o6}setAttribute(t){let e=bT.merge(this.getProperties(),t,!0);this.setProperties(e)}toGeoJSON(){return(new iA).writeGeometryObject(this.getGeometry(),{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"})}bindPopup(t,e={offset:[0,0]}){this.option.popupInfo=t,this.option.popupOption=e}bindTooltip(t,e={offset:[0,0]}){this.option.tooltipInfo=t,this.option.tooltipOption=e}isPopupBind(){return!!this.option.popupInfo}isTooltipBind(){return!!this.option.tooltipInfo}openPopup(t,e){t&&(this.option.popupInfo=t),e&&(this.option.popupOption=e),this.dispatchEvent({type:"graphicPopopOpen",data:this.option.popupInfo,option:this.option.popupOption})}closePopup(){this.dispatchEvent({type:"graphicPopopClose",data:this.option.popupInfo})}openTooltip(t,e){t&&(this.option.tooltipInfo=t),e&&(this.option.tooltipOption=e),this.dispatchEvent({type:"graphicTooltipOpen",data:this.option.tooltipInfo,option:this.option.tooltipOption})}}class Ptt extends Itt{constructor(t){let e;if(super(t),this.option=bT.merge(this.option,t,!0),0!=this.option.lnglat[0])switch(this.option.dataWkID){case og.EPSG4326:this.setGeometry(new Vr(rr(t.lnglat)));break;case og.EPSG3857:this.setGeometry(new Vr(t.lnglat));break;case og.BAIDU:e=this.Proj.bd09_To_gps84(t.lnglat[0],t.lnglat[1]),this.setGeometry(new Vr([e.lontitude,e.latitude]));break;case og.GCJ02:e=this.Proj.gcj02ToWgs84(t.lnglat[0],t.lnglat[1]),this.setGeometry(new Vr([e.lontitude,e.latitude]));break;case og.CGCS2000_GK_CM_6:break;default:this.setGeometry(new Vr(this.Proj.ConvertCoordinatesTo3857(this.option.dataWkID,t.lnglat)))}this.option.attribute&&this.setProperties(this.option.attribute),this.setStyle(new Ai({text:new fi({font:this.option.style.text.font,text:this.option.style.text.text,offsetX:this.option.style.text.offsetX,offsetY:this.option.style.text.offsetY,fill:new fn({color:this.option.style.text.fill.color}),stroke:new vn({color:this.option.style.text.stroke.color,width:this.option.style.text.stroke.width})}),image:new si({scale:this.option.style.image.scale,radius:this.option.style.image.radius,fill:new fn({color:this.option.style.image.fill.color}),stroke:new vn({color:this.option.style.image.stroke.color,width:this.option.style.image.stroke.width})}),zIndex:this.option.style.zIndex}))}setCoordinates(t,e,r=og.EPSG4326){let n=this.getGeometry();this.option.dataWkID==og.EPSG4326?n.setCoordinates(rr([t,e])):this.option.dataWkID==og.EPSG3857?n.setCoordinates([t,e]):n.setCoordinates(this.Proj.ConvertCoordinatesTo3857(this.option.dataWkID,[t,e]))}}var Ftt=function(t){var e,r;t||(t={});var n=this.canvas_=document.createElement("canvas"),i=(Number(t.scale)>0?Number(t.scale):1)*rt||rt,o=n.getContext("2d");if(t.image){t.image.load();var s=t.image.getImage();if(s.width)n.width=Math.round(s.width*i),n.height=Math.round(s.height*i),o.globalAlpha="number"==typeof t.opacity?t.opacity:1,o.drawImage(s,0,0,s.width,s.height,0,0,n.width,n.height),e=o.createPattern(n,"repeat");else{var a=this;e=[0,0,0,0],s.onload=function(){n.width=Math.round(s.width*i),n.height=Math.round(s.height*i),o.globalAlpha="number"==typeof t.opacity?t.opacity:1,o.drawImage(s,0,0,s.width,s.height,0,0,n.width,n.height),e=o.createPattern(n,"repeat"),a.setColor(e)}}}else{var l=this.getPattern_(t);if(n.width=Math.round(l.width*i),n.height=Math.round(l.height*i),o.beginPath(),t.fill&&(o.fillStyle=Sn(t.fill.getColor()),o.fillRect(0,0,n.width,n.height)),o.scale(i,i),o.lineCap="round",o.lineWidth=l.stroke||1,o.fillStyle=Sn(t.color||"#000"),o.strokeStyle=Sn(t.color||"#000"),l.circles)for(r=0;r<l.circles.length;r++){var u=l.circles[r];o.beginPath(),o.arc(u[0],u[1],u[2],0,2*Math.PI),l.fill&&o.fill(),l.stroke&&o.stroke()}if(l.repeat||(l.repeat=[[0,0]]),l.char&&(o.font=l.font||l.width+"px Arial",o.textAlign="center",o.textBaseline="middle",l.angle?(o.fillText(l.char,l.width/4,l.height/4),o.fillText(l.char,5*l.width/4,5*l.height/4),o.fillText(l.char,l.width/4,5*l.height/4),o.fillText(l.char,5*l.width/4,l.height/4),o.fillText(l.char,3*l.width/4,3*l.height/4),o.fillText(l.char,-l.width/4,-l.height/4),o.fillText(l.char,3*l.width/4,-l.height/4),o.fillText(l.char,-l.width/4,3*l.height/4)):o.fillText(l.char,l.width/2,l.height/2)),l.lines)for(r=0;r<l.lines.length;r++)for(var h=0;h<l.repeat.length;h++){var c=l.lines[r];o.beginPath(),o.moveTo(c[0]+l.repeat[h][0],c[1]+l.repeat[h][1]);for(var A=2;A<c.length;A+=2)o.lineTo(c[A]+l.repeat[h][0],c[A+1]+l.repeat[h][1]);l.fill&&o.fill(),l.stroke&&o.stroke(),o.save(),o.strokeStyle="red",o.strokeWidth=.1,o.restore()}if(e=o.createPattern(n,"repeat"),t.offset){var f=t.offset;if("number"==typeof f&&(f=[f,f]),f instanceof Array){var p=Math.round(f[0]*i),d=Math.round(f[1]*i);o.scale(1/i,1/i),o.clearRect(0,0,n.width,n.height),o.translate(p,d),o.fillStyle=e,o.fillRect(-p,-d,n.width,n.height),e=o.createPattern(n,"repeat")}}}t.color=e,vn.call(this,t)};vg(Ftt,vn),Ftt.prototype.clone=function(){var t=fn.prototype.clone.call(this);return t.canvas_=this.canvas_,t},Ftt.prototype.getImage=function(){return this.canvas_},Ftt.prototype.getPattern_=function(t){var e,r=_g.prototype.patterns[t.pattern]||_g.prototype.patterns.dot,n=Math.round(t.spacing)||10;switch(t.pattern){case"dot":case"circle":e=0===t.size?0:t.size/2||2,t.angle?(n=r.width=r.height=Math.round(1.4*n),r.circles=[[n/4,n/4,e],[3*n/4,3*n/4,e]],"circle"==t.pattern&&(r.circles=r.circles.concat([[n/4+n,n/4,e],[n/4,n/4+n,e],[3*n/4-n,3*n/4,e],[3*n/4,3*n/4-n,e],[n/4+n,n/4+n,e],[3*n/4-n,3*n/4-n,e]]))):(r.width=r.height=n,r.circles=[[n/2,n/2,e]],"circle"==t.pattern&&(r.circles=r.circles.concat([[n/2+n,n/2,e],[n/2-n,n/2,e],[n/2,n/2+n,e],[n/2,n/2-n,e],[n/2+n,n/2+n,e],[n/2+n,n/2-n,e],[n/2-n,n/2+n,e],[n/2-n,n/2-n,e]])));break;case"tile":case"square":e=0===t.size?0:t.size/2||2,t.angle?(r.width=r.height=n,r.lines=[[n/2-e,n/2,n/2,n/2-e,n/2+e,n/2,n/2,n/2+e,n/2-e,n/2]]):(r.width=r.height=n,r.lines=[[n/2-e,n/2-e,n/2+e,n/2-e,n/2+e,n/2+e,n/2-e,n/2+e,n/2-e,n/2-e]]),"square"==t.pattern&&(r.repeat=[[0,0],[0,n],[n,0],[0,-n],[-n,0],[-n,-n],[n,n],[-n,n],[n,-n]]);break;case"cross":t.angle&&(t.angle=45);case"hatch":var i=Math.round(((t.angle||0)-90)%360);i>180&&(i-=360),i*=Math.PI/180;var o=Math.cos(i),s=Math.sin(i);if(Math.abs(s)<1e-4)r.width=r.height=n,r.lines=[[0,.5,n,.5]],r.repeat=[[0,0],[0,n]];else if(Math.abs(o)<1e-4)r.width=r.height=n,r.lines=[[.5,0,.5,n]],r.repeat=[[0,0],[n,0]],"cross"==t.pattern&&(r.lines.push([0,.5,n,.5]),r.repeat.push([0,n]));else{var a=r.width=Math.round(Math.abs(n/s))||1,l=r.height=Math.round(Math.abs(n/o))||1;"cross"==t.pattern?(r.lines=[[-a,-l,2*a,2*l],[2*a,-l,-a,2*l]],r.repeat=[[0,0]]):o*s>0?(r.lines=[[-a,-l,2*a,2*l]],r.repeat=[[0,0],[a,0],[0,l]]):(r.lines=[[2*a,-l,-a,2*l]],r.repeat=[[0,0],[-a,0],[0,l]])}r.stroke=0===t.size?0:t.size||4}return r};class Ttt extends Itt{constructor(t){if(super(t),0!=this.option.lnglat[0])switch(this.option.dataWkID){case og.EPSG4326:this.setGeometry(new hn(t.lnglat).transform("EPSG:4326","EPSG:3857"));break;case og.EPSG3857:this.setGeometry(new hn(t.lnglat));break;case og.BAIDU:this.option.lnglat.forEach(((t,e)=>{t.forEach(((e,r)=>{let n=this.Proj.bd09_To_gps84(e[0],e[1]);t[r]=[n.lontitude,n.latitude]}))})),this.setGeometry(new hn(this.option.lnglat));break;case og.GCJ02:this.option.lnglat.forEach(((t,e)=>{t.forEach(((e,r)=>{let n=this.Proj.gcj02ToWgs84(e[0],e[1]);t[r]=[n.lontitude,n.latitude]}))})),this.setGeometry(new hn(this.option.lnglat));break;default:this.option.lnglat.forEach((t=>{t.forEach(((e,r)=>{t[r]=this.Proj.ConvertCoordinatesTo3857(this.option.dataWkID,e)}))})),this.setGeometry(new hn(this.option.lnglat))}let e,r;if(this.option.attribute&&this.setProperties(this.option.attribute),e=this.option.style.stroke.pattern?new Ftt({pattern:this.option.style.stroke.pattern,ratio:this.option.style.stroke.ratio,color:this.option.style.stroke.patternColor,offset:this.option.style.stroke.offset,scale:this.option.style.stroke.scale,fill:new fn({color:this.option.style.stroke.color}),size:this.option.style.stroke.size,spacing:this.option.style.stroke.spacing,angle:this.option.style.stroke.angle,width:this.option.style.stroke.width}):new vn({color:this.option.style.stroke.color,width:this.option.style.stroke.width,lineDash:this.option.style.stroke.lineDash}),this.option.style.fill.pattern)r=new _g({pattern:this.option.style.fill.pattern,image:void 0,ratio:this.option.style.fill.ratio,color:this.option.style.fill.patternColor,offset:this.option.style.fill.offset,scale:this.option.style.fill.scale,size:this.option.style.fill.size,spacing:this.option.style.fill.spacing,angle:this.option.style.fill.angle,fill:new fn({color:this.option.style.fill.color})});else if(this.option.style.fill.image){const t=document.createElement("canvas").getContext("2d"),r=new Image;r.src=this.option.style.fill.image,r.onload=()=>{this.setStyle(new Ai({stroke:e,fill:new fn({color:t.createPattern(r,"repeat")}),text:new fi({text:this.option.style.text.text,font:this.option.style.text.font,fill:new fn({color:this.option.style.fill.color}),stroke:new vn({color:this.option.style.stroke.color,width:this.option.style.stroke.width})}),zIndex:this.option.style.zIndex}))}}else r=new fn({color:this.option.style.fill.color});this.setStyle(new Ai({stroke:e,fill:r,text:new fi({text:this.option.style.text.text,font:this.option.style.text.font,fill:new fn({color:this.option.style.fill.color}),stroke:new vn({color:this.option.style.stroke.color,width:this.option.style.stroke.width})}),zIndex:this.option.style.zIndex}))}setGeometryFromExtent(t){this.setGeometry(cn(t))}}const Mtt=Object.freeze(Object.defineProperty({__proto__:null,LabelGraphic:class extends Itt{constructor(t){let e;if(super(t),0!=this.option.lnglat[0])switch(this.option.dataWkID){case og.EPSG4326:this.setGeometry(new Vr(rr(t.lnglat)));break;case og.EPSG3857:this.setGeometry(new Vr(t.lnglat));break;case og.BAIDU:e=this.Proj.bd09_To_gps84(t.lnglat[0],t.lnglat[1]),this.setGeometry(new Vr([e.lontitude,e.latitude]));break;case og.GCJ02:e=this.Proj.gcj02ToWgs84(t.lnglat[0],t.lnglat[1]),this.setGeometry(new Vr([e.lontitude,e.latitude]));break;default:this.setGeometry(new Vr(this.Proj.ConvertCoordinatesTo3857(this.option.dataWkID,t.lnglat)))}this.option.attribute&&this.setProperties(this.option.attribute),this.setStyle(new Ai({text:new fi({font:this.option.style.text.font,text:this.option.style.text.text,fill:new fn({color:this.option.style.text.fill.color}),stroke:new vn({color:this.option.style.text.stroke.color,width:this.option.style.text.stroke.width}),backgroundFill:new fn({color:this.option.style.text.backgroundFill.color}),backgroundStroke:new vn({color:this.option.style.text.backgroundStroke.color,width:this.option.style.text.backgroundStroke.width}),padding:this.option.style.text.padding,textBaseline:this.option.style.text.textBaseline,offsetX:this.option.style.text.offsetX,offsetY:this.option.style.text.offsetY}),image:new ii({scale:this.option.style.image.scale,radius:this.option.style.image.radius,points:3,angle:Math.PI,displacement:[0,10],fill:new fn({color:this.option.style.image.fill.color}),stroke:new vn({color:this.option.style.image.stroke.color,width:this.option.style.image.stroke.width})}),zIndex:this.option.style.zIndex}))}setCoordinates(t,e,r=og.EPSG4326){let n=this.getGeometry();this.option.dataWkID==og.EPSG4326?n.setCoordinates(rr([t,e])):this.option.dataWkID==og.EPSG3857?n.setCoordinates([t,e]):n.setCoordinates(this.Proj.ConvertCoordinatesTo3857(this.option.dataWkID,[t,e]))}},PointGraphic:Ptt,ImagePointGraphic:class extends Itt{constructor(t){let e;if(super(t),0!=this.option.lnglat[0])switch(this.option.dataWkID){case og.EPSG4326:this.setGeometry(new Vr(rr(t.lnglat)));break;case og.EPSG3857:this.setGeometry(new Vr(t.lnglat));break;case og.BAIDU:e=this.Proj.bd09_To_gps84(t.lnglat[0],t.lnglat[1]),this.setGeometry(new Vr([e.lontitude,e.latitude]));break;case og.GCJ02:e=this.Proj.gcj02ToWgs84(t.lnglat[0],t.lnglat[1]),this.setGeometry(new Vr([e.lontitude,e.latitude]));break;default:this.setGeometry(new Vr(this.Proj.ConvertCoordinatesTo3857(this.option.dataWkID,t.lnglat)))}if(this.option.attribute&&this.setProperties(this.option.attribute),"gif"==this.option.style.imageOption.type){const t=gifler(this.option.style.imageOption.src);let e=document.createElement("canvas");t.frames(e,((t,e)=>{this.getStyle()||this.setStyle(new Ai({image:new Wo({img:t.canvas,imgSize:[e.width,e.height],opacity:.8})})),t.clearRect(0,0,e.width,e.height),t.drawImage(e.buffer,e.x,e.y),this.option.style.imageOption.maprender()}),!0)}else{let t=new Wo(this.option.style.imageOption);t.load(),this.setStyle(new Ai({text:new fi({font:this.option.style.text.font,text:this.option.style.text.text,fill:new fn({color:this.option.style.text.fill.color}),backgroundFill:new fn({color:this.option.style.text.backgroundFill.color}),backgroundStroke:new vn({color:this.option.style.text.backgroundStroke.color,width:this.option.style.text.backgroundStroke.width}),stroke:new vn({color:this.option.style.text.stroke.color,width:this.option.style.text.stroke.width}),padding:this.option.style.text.padding,textBaseline:this.option.style.text.textBaseline,offsetX:this.option.style.text.offsetX,offsetY:this.option.style.text.offsetY}),image:t,zIndex:this.option.style.zIndex}))}}setCoordinates(t,e,r=og.EPSG4326){let n=this.getGeometry();this.option.dataWkID==og.EPSG4326?n.setCoordinates(rr([t,e])):this.option.dataWkID==og.EPSG3857?n.setCoordinates([t,e]):n.setCoordinates(this.Proj.ConvertCoordinatesTo3857(this.option.dataWkID,[t,e]))}},LineGraphic:class extends Itt{constructor(t){if(super(t),0!=this.option.lnglat[0])switch(this.option.dataWkID){case og.EPSG4326:this.setGeometry(new mn(t.lnglat).transform("EPSG:4326","EPSG:3857"));break;case og.EPSG3857:this.setGeometry(new mn(t.lnglat));break;case og.BAIDU:this.option.lnglat.forEach(((e,r)=>{let n=this.Proj.bd09_To_gps84(t.lnglat[0],t.lnglat[1]);this.option.lnglat[r]=[n.lontitude,n.latitude]})),this.setGeometry(new mn(this.option.lnglat));break;case og.GCJ02:this.option.lnglat.forEach(((e,r)=>{let n=this.Proj.gcj02ToWgs84(t.lnglat[0],t.lnglat[1]);this.option.lnglat[r]=[n.lontitude,n.latitude]})),this.setGeometry(new mn(this.option.lnglat));break;default:this.option.lnglat.forEach(((t,e)=>{this.option.lnglat[e]=this.Proj.ConvertCoordinatesTo3857(this.option.dataWkID,t)})),this.setGeometry(new mn(this.option.lnglat))}let e;this.option.attribute&&this.setProperties(this.option.attribute),e=this.option.style.stroke.image||this.option.style.stroke.pattern?new Ftt({pattern:this.option.style.stroke.pattern,image:"Image (PNG)"==this.option.style.stroke.pattern?new Wo({src:this.option.style.stroke.image}):void 0,ratio:this.option.style.stroke.ratio,color:this.option.style.stroke.patternColor,offset:this.option.style.stroke.offset,scale:this.option.style.stroke.scale,fill:new fn({color:this.option.style.stroke.color}),size:this.option.style.stroke.size,spacing:this.option.style.stroke.spacing,angle:this.option.style.stroke.angle,width:this.option.style.stroke.width}):new vn({color:this.option.style.stroke.color,width:this.option.style.stroke.width,lineDash:this.option.style.stroke.lineDash}),this.setStyle(new Ai({stroke:e,text:new fi({text:this.option.style.text.text,font:this.option.style.text.font,fill:new fn({color:this.option.style.text.fill.color}),stroke:new vn({color:this.option.style.stroke.color,width:this.option.style.stroke.width})}),zIndex:this.option.style.zIndex}))}lineStyle(){let t=[];for(let e=0;e<10;e++)t.push(new Ai({stroke:new vn({color:[0,255,255,1/(10-e)],width:2*(10-e)-1}),fill:new fn({color:"rgba(0, 0, 255, 0.05)"})}));return t}},PolygonGraphic:Ttt,CurveGraphic:class extends Itt{constructor(t){if(super(t),0!=this.option.lnglat[0])switch(this.option.dataWkID){case og.EPSG4326:this.setGeometry(this.createRegularPolygonCurve(this.option.lnglat,this.option.style.radius,this.option.style.startAngle,this.option.style.stopAngle,this.option.style.rotation));break;case og.EPSG3857:this.setGeometry(this.createRegularPolygonCurve(nr(this.option.lnglat),this.option.style.radius,this.option.style.startAngle,this.option.style.stopAngle,this.option.style.rotation));break;case og.BAIDU:case og.GCJ02:break;default:this.setGeometry(this.createRegularPolygonCurve(this.Proj.ConvertCoordinatesTo4326(this.option.dataWkID,this.option.lnglat),this.option.style.radius,this.option.style.startAngle,this.option.style.stopAngle,this.option.style.rotation))}this.option.attribute&&this.setProperties(this.option.attribute),this.setStyle(new Ai({stroke:new vn({color:this.option.style.stroke.color,width:this.option.style.stroke.width,lineDash:this.option.style.stroke.lineDash}),fill:new fn({color:this.option.style.fill.color}),text:new fi({text:this.option.style.text.text,font:this.option.style.text.font,fill:new fn({color:this.option.style.fill.color}),stroke:new vn({color:this.option.style.stroke.color,width:this.option.style.stroke.width})}),zIndex:this.option.style.zIndex}))}setAngle(t,e){this.option.dataWkID==og.EPSG4326?this.setGeometry(this.createRegularPolygonCurve(this.option.lnglat,this.option.style.radius,t,e,this.option.style.rotation)):this.option.dataWkID==og.EPSG3857?this.setGeometry(this.createRegularPolygonCurve(nr(this.option.lnglat),this.option.style.radius,t,e,this.option.style.rotation)):this.setGeometry(this.createRegularPolygonCurve(this.Proj.ConvertCoordinatesTo4326(this.option.dataWkID,this.option.lnglat),this.option.style.radius,t,e,this.option.style.rotation))}createRegularPolygonCurve(t,e,r,n,i){let o=mT.sector(t,e,r,n).getGeometry();return o.rotate(i,rr(t)),o}}},Symbol.toStringTag,{value:"Module"}));var Ltt=function(t){(t=t||{}).loader=this._loader,t.strategy=ps,ws.call(this,t),this.set("time",t.time||new Date),this.set("step",t.step||1)};vg(Ltt,ws),function(){function t(t){var e=Math.PI/180,r=t-2451545,n=280.46+.9856474*r,i=357.528+.9856003*r;return i%=360,{lambda:(n%=360)+1.915*Math.sin(i*e)+.02*Math.sin(2*i*e),R:1.00014-.01671*Math.cos(i*e)-.0014*Math.cos(2*i*e)}}function e(t){var e=(t-2451545)/36525;return 23.43929111-e*(46.836769/3600-e*(1831e-7/3600+e*(5.565e-7-e*(1.6e-10-4.34e-8*e/3600))))}function r(t,e){var r=180/Math.PI,n=Math.PI/180,i=Math.atan(Math.cos(e*n)*Math.tan(t*n))*r,o=Math.asin(Math.sin(e*n)*Math.sin(t*n))*r;return{alpha:i+=90*Math.floor(t/90)-90*Math.floor(i/90),delta:o}}Ltt.prototype._loader=function(t,e,r){var n=this.getCoordinates(this.get("time")),i=new hn([n]);i.transform("EPSG:4326",r),this.addFeature(new z(i))},Ltt.prototype.setTime=function(t){this.set("time",t),this.refresh()},Ltt.prototype.getSunPosition=function(n){var i=(n?new Date(n):new Date)/864e5+2440587.5,o=(18.697374558+24.06570982441908*(i-2451545))%24,s=t(i),a=e(i),l=r(s.lambda,a);return[l.alpha-15*o,l.delta]},Ltt.getNightLat=function(n,i){var o=180/Math.PI,s=Math.PI/180,a=(i?new Date(i):new Date)/864e5+2440587.5,l=(18.697374558+24.06570982441908*(a-2451545))%24,u=t(a),h=e(a),c=r(u.lambda,h),A=15*l+n-c.alpha;return Math.atan(-Math.cos(A*s)/Math.tan(c.delta*s))*o},Ltt.prototype.getCoordinates=function(n,i){for(var o=180/Math.PI,s=Math.PI/180,a=(n?new Date(n):new Date)/864e5+2440587.5,l=(18.697374558+24.06570982441908*(a-2451545))%24,u=[],h=t(a),c=e(a),A=r(h.lambda,c),f=this.get("step")||1,p=-180;p<=180;p+=f){var d=p,g=15*l+d-A.alpha,y=Math.atan(-Math.cos(g*s)/Math.tan(A.delta*s))*o;u.push([d,y])}switch(i){case"line":break;case"day":A.delta*=-1;default:y=A.delta<0?90:-90;for(var m=180;m>=-180;m-=f)u.push([m,y]);u.push(u[0])}if("daynight"===i){var v=[];u.forEach((function(t){v.push(t.slice())})),v[0][1]=-v[0][1],v[v.length-1][1]=-v[0][1],v[v.length-1][1]=-v[0][1],u=[u,v]}return u}}();var ktt,Ott=function(t,e){var r=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(r*r+n*n)};!function(){function t(t,e){var r;for(let n=t.length-1;n>0;n--)(t[n][0]>e&&t[n-1][0]<e||t[n][0]<e&&t[n-1][0]>e)&&(r=[e,(e-t[n][0])/(t[n-1][0]-t[n][0])*(t[n-1][1]-t[n][1])+t[n][1]],t.splice(n,0,r))}function e(t,e){var r;for(let n=t.length-1;n>0;n--)(t[n][1]>e&&t[n-1][1]<e||t[n][1]<e&&t[n-1][1]>e)&&(r=[(e-t[n][1])/(t[n-1][1]-t[n][1])*(t[n-1][0]-t[n][0])+t[n][0],e],t.splice(n,0,r))}ktt=function(r,n){var i="Polygon"===n.getType();if(!i&&"MultiPolygon"!==n.getType())return null;var o=n.getCoordinates();return i&&(o=[o]),o.forEach((function(n){n.forEach((function(n){t(n,r[0]),t(n,r[2]),e(n,r[1]),e(n,r[3])}))})),o.forEach((function(t){t.forEach((function(t){t.forEach((function(t){t[0]<r[0]?t[0]=r[0]:t[0]>r[2]&&(t[0]=r[2]),t[1]<r[1]?t[1]=r[1]:t[1]>r[3]&&(t[1]=r[3])}))}))})),i?new hn(o[0]):new Jl(o)}}();var Ntt=function(t,e,r,n){var i=[];!1!==n&&i.push(t);var o=Ott(t,e);if(o){var s=Math.round(o/r);if(s>1)for(var a=(e[0]-t[0])/s,l=(e[1]-t[1])/s,u=1;u<s;u++)i.push([t[0]+a*u,t[1]+l*u])}return i.push(e),i};mn.prototype.sampleAt=function(t){for(var e=this.getCoordinates(),r=[],n=1;n<e.length;n++)r=r.concat(Ntt(e[n-1],e[n],t,1===n));return new mn(r)},Vl.prototype.sampleAt=function(t){var e=this.getCoordinates(),r=[];return e.forEach((function(e){for(var n=[],i=1;i<e.length;i++)n=n.concat(Ntt(e[i-1],e[i],t,1===i));r.push(n)})),new Vl(r)},hn.prototype.sampleAt=function(t){var e=this.getCoordinates(),r=[];return e.forEach((function(e){for(var n=[],i=1;i<e.length;i++)n=n.concat(Ntt(e[i-1],e[i],t,1===i));r.push(n)})),new hn(r)},Jl.prototype.sampleAt=function(t){var e=this.getCoordinates(),r=[];return e.forEach((function(e){var n=[];r.push(n),e.forEach((function(e){for(var r=[],i=1;i<e.length;i++)r=r.concat(Ntt(e[i-1],e[i],t,1===i));n.push(r)}))})),new Jl(r)},jl.prototype.intersection=function(t,e){if(t.sampleAt){var r=mt(this.getCenter().concat(this.getCenter()),this.getRadius());t=(t=ktt(r,t)).simplify(e);var n=this.getCenter(),i=this.getRadius(),o=t.sampleAt(e).getCoordinates();switch(t.getType()){case"Polygon":o=[o];case"MultiPolygon":var s=!1,a=[];return o.forEach((function(t){var e=[];a.push(e),t.forEach((function(t){var r=[];e.push(r),t.forEach((function(t){var e=Ott(n,t);e>i?(s=!0,r.push([n[0]+i/e*(t[0]-n[0]),n[1]+i/e*(t[1]-n[1])])):r.push(t)}))}))})),s?"Polygon"===t.getType()?new hn(a[0]):new Jl(a):t}}return t};var Rtt=function(t){t=t||{},this.source=t.source,this.nodes=new ws,this.maxIteration=t.maxIteration||2e4,this.stepIteration=t.stepIteration||2e3,this.astar=!0,this.candidat=[],N.call(this),this.set("epsilon",t.epsilon||1e-6)};vg(Rtt,N),Rtt.prototype.weight=function(){return 1},Rtt.prototype.direction=function(){return 2},Rtt.prototype.getLength=function(t){return t.getGeometry&&(t=t.getGeometry()),t.getLength()},Rtt.prototype.getNodeSource=function(){return this.nodes},Rtt.prototype.getEdges=function(t){var e=mt(yt([t]),this.get("epsilon")),r=[];return this.source.forEachFeatureIntersectingExtent(e,(function(t){r.push(t)})),r},Rtt.prototype.getNode=function(t){var e=mt(yt([t]),this.get("epsilon")),r=[];return this.nodes.forEachFeatureIntersectingExtent(e,(function(t){r.push(t)})),r[0]},Rtt.prototype.addNode=function(t,e,r,n,i){if(this.wdist&&e>this.wdist)return!1;var o=this.getNode(t),s=e+this.getLength(new mn([this.end,t]))*this.weight();if(this.astar&&this.wdist&&s>this.wdist)return!1;if(o){if(o!==this.arrival&&o.get("wdist")<=e)return o;o.set("dist",r),o.set("wdist",e),o.set("dtotal",s),o.set("from",n),o.set("prev",i),o===this.arrival&&(this.wdist=e),this.candidat.push(o)}else o=new z({geometry:new Vr(t),from:n,prev:i,dist:r||0,wdist:e,dtotal:s}),e<0?o.set("wdist",!1):this.candidat.push(o),this.nodes.addFeature(o);return o},Rtt.prototype.closestCoordinate=function(t){var e=this.source.getClosestFeatureToCoordinate(t),r=e.getGeometry().getFirstCoordinate(),n=e.getGeometry().getLastCoordinate();return Ott(t,r)<Ott(t,n)?r:n},Rtt.prototype.path=function(t,e){if(this.running)return!1;if(t=this.closestCoordinate(t),this.end=this.closestCoordinate(e),t[0]===this.end[0]&&t[1]===this.end[1])return this.dispatchEvent({type:"finish",route:[],wDistance:-1,distance:this.wdist}),!1;var r=this;return this.nodes.clear(),this.candidat=[],this.wdist=0,this.running=!0,this.addNode(t,0),this.arrival=this.addNode(this.end,-1),this.nb=0,this.dispatchEvent({type:"start"}),setTimeout((function(){r._resume()})),[t,this.end]},Rtt.prototype.resume=function(){this.running||this.candidat.length&&(this.running=!0,this.nb=0,this._resume())},Rtt.prototype.pause=function(){this.running&&(this.nb=-1)},Rtt.prototype.getBestWay=function(){for(var t,e,r=-1,n=0;e=this.candidat[n];n++)e.get("wdist")>r&&(t=e,r=e.get("wdist"));return this.getRoute(t)},Rtt.prototype._resume=function(){if(this.running){for(;this.candidat.length;){this.candidat.sort((function(t,e){return t.get("dtotal")<e.get("dtotal")?1:t.get("dtotal")===e.get("dtotal")?0:-1}));for(var t,e=this.candidat.pop(),r=e.getGeometry().getCoordinates(),n=this.getEdges(r),i=0;t=n[i];i++){if(e.get("from")!==t){var o=this.getLength(t),s=e.get("wdist")+o*this.weight(t);o=e.get("dist")+o;var a=t.getGeometry().getFirstCoordinate(),l=t.getGeometry().getLastCoordinate(),u=this.direction(t);0!==u&&(r[0]===a[0]&&r[1]===a[1]&&-1!==u&&this.addNode(l,s,o,t,e),r[0]===l[0]&&r[0]===l[0]&&1!==u&&this.addNode(a,s,o,t,e))}if(-1===this.nb||this.nb++>this.maxIteration)return this.running=!1,void this.dispatchEvent({type:"pause",overflow:-1!==this.nb});if(!(this.nb%this.stepIteration)){var h=this;return window.setTimeout((function(){h._resume()}),5),void this.dispatchEvent({type:"calculating"})}}}this.nodes.clear(),this.running=!1,this.dispatchEvent({type:"finish",route:this.getRoute(this.arrival),wDistance:this.wdist,distance:this.arrival.get("dist")})}},Rtt.prototype.getRoute=function(t){for(var e=[];t;)e.unshift(t.get("from")),t=t.get("prev");return e.shift(),e};var Utt=yy,Dtt=function(t,e){return[Math.round(t[0]/e)*e,Math.round(t[1]/e)*e]},Qtt=Fh(sm),Gtt=Dtt;function jtt(t,e,r){return"FeatureCollection"===t.type?t.features.reduce((function(t,r){return jtt(r,e,t)}),r):e(r,t)}function Htt(t){return"LineString"===t.geometry.type}var ztt={compactNode:Vtt,compactGraph:function(t,e,r,n){var i=(n=n||{}).progress,o=Object.keys(t).reduce((function(e,r,o,s){var a=t[r],l=Object.keys(a),u=l.length;return!(void 0!==n.compact&&!n.compact)&&(1===u?!t[l[0]][r]:2===u&&l.filter((function(e){return t[e][r]})).length===u)||(e[r]=a),o%1e3==0&&i&&i("compact:ends",o,s.length),e}),{});return Object.keys(o).reduce((function(s,a,l,u){var h=Vtt(a,t,o,e,r,!1,n);return s.graph[a]=h.edges,s.coordinates[a]=h.coordinates,n.edgeDataReduceFn&&(s.reducedEdges[a]=h.reducedEdges),l%1e3==0&&i&&i("compact:nodes",l,u.length),s}),{graph:{},coordinates:{},reducedEdges:{}})}};function Vtt(t,e,r,n,i,o,s){s=s||{};var a=e[t];return Object.keys(a).reduce((function(a,l){var u=function(t,e,r,n,i,o,s,a){var l=r[t][e],u=r[e][t],h=[],c=[],A=a.edgeDataSeed;for(a.edgeDataReduceFn&&(A=a.edgeDataReduceFn(A,o[e][t]));!n[e];){var f=r[e];if(!f)break;var p=Object.keys(f).filter((function(e){return e!==t}))[0];if(l+=f[p],s){if(u+=r[p][e],c.indexOf(e)>=0){n[e]=r[e];break}c.push(e)}a.edgeDataReduceFn&&(A=a.edgeDataReduceFn(A,o[e][p])),h.push(i[e]),t=e,e=p}return{vertex:e,weight:l,reverseWeight:u,coordinates:h,reducedEdge:A}}(t,l,e,r,n,i,o,s),h=u.weight,c=u.reverseWeight;if(u.vertex!==t&&((!a.edges[u.vertex]||a.edges[u.vertex]>h)&&(a.edges[u.vertex]=h,a.coordinates[u.vertex]=[n[t]].concat(u.coordinates),a.reducedEdges[u.vertex]=u.reducedEdge),o&&!isNaN(c)&&(!a.incomingEdges[u.vertex]||a.incomingEdges[u.vertex]>c))){a.incomingEdges[u.vertex]=c;var A=[n[t]].concat(u.coordinates);A.reverse(),a.incomingCoordinates[u.vertex]=A}return a}),{edges:{},incomingEdges:{},coordinates:{},incomingCoordinates:{},reducedEdges:{}})}var Ktt=function(t,e){var r=(e=e||{}).keyFn||function(t){return t.join(",")},n=e.precision||1e-5,i=function(t,e){var r=[];return"FeatureCollection"===t.type&&(r=r.concat(t.features.filter(e))),{type:"FeatureCollection",features:r}}(t,Htt),o=Qtt(i).features.reduce((function(t,i,o,s){var a=Gtt(i.geometry.coordinates,n);return t[r(a)]=i.geometry.coordinates,o%1e3==0&&e.progress&&e.progress("topo:vertices",o,s.length),t}),{}),s=jtt(i,(function(t,i,o,s){return i.geometry.coordinates.forEach((function(e,o,s){if(o>0){var a=r(Gtt(s[o-1],n)),l=r(Gtt(e,n));t.push([a,l,i.properties])}})),o%1e3==0&&e.progress&&e.progress("topo:edges",o,s.length),t}),[]);return{vertices:o,edges:s}},qtt=ztt,Wtt=Fh(wy).default,{point:Xtt}=um,Ytt=ztt,Ztt=Dtt,Jtt=$tt;function $tt(t,e){if(e=e||{},t.compactedVertices||(t=function(t,e){var r,n=(e=e||{}).weightFn||function(t,e){return Wtt(Xtt(t),Xtt(e))};"FeatureCollection"===t.type?r=Ktt(t,e):t.edges&&(r=t),t=r.edges.reduce((function(t,i,o,s){var a=i[0],l=i[1],u=i[2],h=n(r.vertices[a],r.vertices[l],u),c=function(r){t.vertices[r]||(t.vertices[r]={},e.edgeDataReduceFn&&(t.edgeData[r]={}))},A=function(r,n,i){t.vertices[r][n]=i,e.edgeDataReduceFn&&(t.edgeData[r][n]=e.edgeDataReduceFn(e.edgeDataSeed,u))};return h&&(c(a),c(l),h instanceof Object?(h.forward&&A(a,l,h.forward),h.backward&&A(l,a,h.backward)):(A(a,l,h),A(l,a,h))),o%1e3==0&&e.progress&&e.progress("edgeweights",o,s.length),t}),{edgeData:{},vertices:{}});var i=qtt.compactGraph(t.vertices,r.vertices,t.edgeData,e);return{vertices:t.vertices,edgeData:t.edgeData,sourceVertices:r.vertices,compactedVertices:i.graph,compactedCoordinates:i.coordinates,compactedEdges:e.edgeDataReduceFn?i.reducedEdges:null}}(t,e)),this._graph=t,this._keyFn=e.keyFn||function(t){return t.join(",")},this._precision=e.precision||1e-5,this._options=e,0===Object.keys(this._graph.compactedVertices).filter((function(t){return"edgeData"!==t})).length)throw new Error("Compacted graph contains no forks (topology has no intersections).")}$tt.prototype={findPath:function(t,e){var r=this._keyFn(Ztt(t.geometry.coordinates,this._precision)),n=this._keyFn(Ztt(e.geometry.coordinates,this._precision));if(!this._graph.vertices[r]||!this._graph.vertices[n])return null;this._createPhantom(r),this._createPhantom(n);var i=function(t,e,r){var n={};n[e]=0;for(var i=new Utt([[0,[e],e]],(function(t,e){return t[0]-e[0]}));i.length;){var o=i.pop(),s=o[0],a=o[2];if(a===r)return o.slice(0,2);var l=t[a];Object.keys(l).forEach((function(t){var e=s+l[t];if(!(t in n)||e<n[t]){n[t]=e;var r=[e,o[1].concat([t]),t];i.push(r)}}))}return null}(this._graph.compactedVertices,r,n);if(i){var o=i[0];return{path:(i=i[1]).reduce(function(t,e,r,n){return r>0&&(t=t.concat(this._graph.compactedCoordinates[n[r-1]][e])),t}.bind(this),[]).concat([this._graph.sourceVertices[n]]),weight:o,edgeDatas:this._graph.compactedEdges?i.reduce(function(t,e,r,n){return r>0&&t.push({reducedEdge:this._graph.compactedEdges[n[r-1]][e]}),t}.bind(this),[]):void 0}}return null},serialize:function(){return this._graph},_createPhantom:function(t){if(this._graph.compactedVertices[t])return null;var e=Ytt.compactNode(t,this._graph.vertices,this._graph.compactedVertices,this._graph.sourceVertices,this._graph.edgeData,!0,this._options);return this._graph.compactedVertices[t]=e.edges,this._graph.compactedCoordinates[t]=e.coordinates,this._graph.compactedEdges&&(this._graph.compactedEdges[t]=e.reducedEdges),Object.keys(e.incomingEdges).forEach(function(r){this._graph.compactedVertices[r][t]=e.incomingEdges[r],this._graph.compactedCoordinates[r][t]=[this._graph.sourceVertices[r]].concat(e.incomingCoordinates[r].slice(0,-1)),this._graph.compactedEdges&&(this._graph.compactedEdges[r][t]=e.reducedEdges[r])}.bind(this)),t},_removePhantom:function(t){t&&(Object.keys(this._graph.compactedVertices[t]).forEach(function(e){delete this._graph.compactedVertices[e][t]}.bind(this)),Object.keys(this._graph.compactedCoordinates[t]).forEach(function(e){delete this._graph.compactedCoordinates[e][t]}.bind(this)),this._graph.compactedEdges&&Object.keys(this._graph.compactedEdges[t]).forEach(function(e){delete this._graph.compactedEdges[e][t]}.bind(this)),delete this._graph.compactedVertices[t],delete this._graph.compactedCoordinates[t],this._graph.compactedEdges&&delete this._graph.compactedEdges[t])}};var tet=function(t){Sh.call(this,t)};vg(tet,Sh),tet.prototype.getExtent=function(){return this.getSource().getExtent()};var eet=function(t){var e={attributions:t.attributions,logo:t.logo,projection:t.projection};this._image=t.image?t.image:new Image,this._image.crossOrigin=t.crossOrigin;var r=this;this._image.onload=function(){r.setCrop(r.crop),r.changed()},t.image||(this._image.src=t.url),e.canvasFunction=this.calculateImage,Rk.call(this,e),this.center=t.imageCenter,this.setScale(t.imageScale),this.rotate=t.imageRotate?t.imageRotate:0,this.crop=t.imageCrop,this.mask=t.imageMask,this.setCrop(this.crop),this.on("change",function(){this.set("extent",this.calculateExtent())}.bind(this))};vg(eet,Rk),eet.prototype.calculateImage=function(t,e,r,n){if(this.center){var i=document.createElement("canvas");i.width=n[0],i.height=n[1];var o=i.getContext("2d");if(!this._imageSize)return i;if(this.mask){o.beginPath();var s=f(this.mask[0]);o.moveTo(s[0],s[1]);for(var a=1;a<this.mask.length;a++)s=f(this.mask[a]),o.lineTo(s[0],s[1]);o.clip()}var l=f(this.center),u=(this._image.naturalWidth/2-this.crop[0])*this.scale[0]/e*r,h=(this._image.naturalHeight/2-this.crop[1])*this.scale[1]/e*r,c=this._imageSize[0]*this.scale[0]/e*r,A=this._imageSize[1]*this.scale[1]/e*r;return o.translate(l[0],l[1]),this.rotate&&o.rotate(this.rotate),o.drawImage(this._image,this.crop[0],this.crop[1],this._imageSize[0],this._imageSize[1],-u,-h,c,A),i}function f(e){return[(e[0]-t[0])/(t[2]-t[0])*n[0],(e[1]-t[3])/(t[1]-t[3])*n[1]]}},eet.prototype.getCenter=function(){return this.center},eet.prototype.setCenter=function(t){this.center=t,this.changed()},eet.prototype.getScale=function(){return this.scale},eet.prototype.setScale=function(t){switch(typeof t){case"number":t=[t,t];break;case"object":if(2!=t.length)return;break;default:return}this.scale=t,this.changed()},eet.prototype.getRotation=function(){return this.rotate},eet.prototype.setRotation=function(t){this.rotate=t,this.changed()},eet.prototype.getGeoImage=function(){return this._image},eet.prototype.getCrop=function(){return this.crop},eet.prototype.setMask=function(t){this.mask=t,this.changed()},eet.prototype.getMask=function(){return this.mask},eet.prototype.setCrop=function(t){if(this._image.naturalWidth){if(t){switch(typeof t){case"number":t=[t,t,this._image.naturalWidth-t,this._image.naturalHeight-t];break;case"object":if(4!=t.length)return;break;default:return}t=yt([[t[0],t[1]],[t[2],t[3]]]),this.crop=[Math.max(0,t[0]),Math.max(0,t[1]),Math.min(this._image.naturalWidth,t[2]),Math.min(this._image.naturalHeight,t[3])]}else this.crop=[0,0,this._image.naturalWidth,this._image.naturalHeight];this.crop[2]<=this.crop[0]&&(this.crop[2]=this.crop[0]+1),this.crop[3]<=this.crop[1]&&(this.crop[3]=this.crop[1]+1),this._imageSize=[this.crop[2]-this.crop[0],this.crop[3]-this.crop[1]],this.changed()}else this.crop=t},eet.prototype.getExtent=function(t){var e=this.get("extent");if(e||(e=this.calculateExtent()),t)for(var r=0;r<t.length;r++)t[r]=e[r];return e},eet.prototype.calculateExtent=function(t){var e;if(!1!==t&&this.getMask())e=new hn([this.getMask()]);else{var r=this.getCenter(),n=this.getScale(),i=this.getGeoImage().width*n[0],o=this.getGeoImage().height*n[1];(e=cn(yt([[r[0]-i/2,r[1]-o/2],[r[0]+i/2,r[1]+o/2]]))).rotate(-this.getRotation(),r)}return e.getExtent()};const ret=Object.freeze(Object.defineProperty({__proto__:null,ClusterLayer:class extends BT{constructor(t,r){super(t,r),e(this,"styleCache"),e(this,"clusterSource"),e(this,"selectCluster"),this.option={convexhull:!0,animatesel:!0,haslink:!0,distance:40,levelColor:[{maxnum:5e3,strokecolor:"rgba(192,0,0,0.5)",strokewidth:15,fillcolor:"rgba(192,0,0,1)"},{maxnum:1e3,strokecolor:"rgba(255,165,0,0.5)",strokewidth:15,fillcolor:"rgba(255,165,0,1)"},{maxnum:500,strokecolor:"rgba(255,128,0,0.5)",strokewidth:15,fillcolor:"rgba(255,128,0,1)"},{maxnum:100,strokecolor:"rgba(0,191,255,0.5)",strokewidth:15,fillcolor:"rgba(0,191,255,1)"},{maxnum:50,strokecolor:"rgba(139,0,139,0.5)",strokewidth:15,fillcolor:"rgba(139,0,139,1)"},{maxnum:2,strokecolor:"rgba(255,165,0,0.5)",strokewidth:15,fillcolor:"rgba(\t255,165,0,1)"}]},this.option=Object.assign({},this.option,r),this.styleCache={},this.layertype="ClusterLayer",this.clusterSource=new MT({distance:this.option.distance,source:this._source}),this.layer=new u6({zIndex:this.option.zIndex,source:this.clusterSource,style:this.getStyle.bind(this)}),this.layer.set("layerid",t);var n=new si({radius:5,stroke:new vn({color:"rgba(0,255,255,1)",width:1}),fill:new fn({color:"rgba(0,255,255,0.3)"})}),i=new Ai({image:n}),o=new Ai({image:n,stroke:new vn({color:"#fff",width:1})});this.selectCluster=new c6({layers:[this.layer],condition:sl,pointRadius:7,animate:this.option.animatesel,featureStyle:()=>[this.option.haslink?o:i],style:(t,e)=>{let r=t.get("features");if(r){if(r.length>1){var n=[this.getStyle(t,e)];if(this.option.convexhull&&A6){var i=[];for(let t=0;t<r.length;t++)i.push(r[t].getGeometry().getFirstCoordinate());var o=A6(i);n.push(new Ai({stroke:new vn({color:"rgba(0,0,192,0.5)",width:2}),fill:new fn({color:"rgba(0,0,192,0.3)"}),geometry:new hn([o]),zIndex:100}))}return n}return[new Ai({image:new si({radius:5,stroke:new vn({color:"rgba(255,0,0,0.5)",width:10}),fill:new fn({color:"rgba(255,0,0,1)"})}),text:new fi({text:r[0].getProperties().name,font:"13px Microsoft YaHei",offsetY:-15,fill:new fn({color:"#8B4513"}),stroke:new vn({color:"#fff",width:2})})})]}}}),this.selectCluster.getFeatures().on(["add"],(t=>{t.target.getArray()[0].get("features")})),this.selectCluster.getFeatures().on(["remove"],(function(t){}))}appendTo(t){var e;this._map=t,this._map.addInteraction(this.selectCluster),this.layer&&(null==(e=this._map)||e.addLayer(this.layer))}showTitle(t,e){new Promise(((r,n)=>{this._source.getFeatures().forEach((r=>{let n=r.getProperties();if(t==n.dataType)try{r.getStyle().getText().setText(e?r.get("name"):"")}catch(OR){}})),this.layer.changed()}))}addFeaturesMN(t,e){for(var r,n,i=t.getView().calculateExtent(t.getSize()),o=[],s=0;s<e;++s)o[s]=new z(new Vr([i[0]+(i[2]-i[0])*Math.random(),i[1]+(i[3]-i[1])*Math.random()])),o[s].set("id",s),o[s].set("name","123123"),o[s].set("classname",s);null==(n=null==(r=this.clusterSource)?void 0:r.getSource())||n.addFeatures(o)}getStyle(t,e){var r=t.get("features").length,n=this.styleCache[r];return 1==r?n=this.styleCache[r]=t.get("features")[0].getStyle():n||(this.option.levelColor.sort((function(t,e){return t.maxnum-e.maxnum})),this.option.levelColor.forEach((t=>{var e=Math.max(8,Math.min(.75*r,20));r>=t.maxnum&&(n=this.styleCache[r]=new Ai({image:new si({radius:e,stroke:new vn({color:t.strokecolor,width:t.strokewidth,lineCap:"butt"}),fill:new fn({color:t.fillcolor})}),text:new fi({text:r.toString(),fill:new fn({color:"#fff"})})}))}))),n}},HeatmapLayer:class extends BT{constructor(t,e){super(t,e),this.layertype="HeatmapLayer",this._source=new ws({wrapX:!1}),this.option={blur:25,radius:8,gradient:["#00f","#0ff","#0f0","#ff0","#f00"]},this.option=Object.assign({},this.option,e),this.layer=new yh({source:this._source,zIndex:this.option.zIndex,gradient:this.option.gradient,blur:this.option.blur,radius:this.option.radius}),this.layer.set("layerid",t)}setBlur(t){this.layer.setBlur(parseInt(t,10))}setRadius(t){this.layer.setRadius(parseInt(t,10))}},WfsLayer:class extends BT{constructor(t,r){super(t,r),e(this,"geoserverData"),this.layertype="WfsLayer";const n=this.option.url;this._source=new ws({format:new iA,url:function(t){return n+"&version=1.1.0&request=GetFeature&typename=xianjie1:2020年初县级矢量3857&outputFormat=application/json&srsname=EPSG:3857&NaN"+t.join(",")+",EPSG:3857"},strategy:ds}),this.layer=new ls({source:this._source,style:new Ai({stroke:new vn({color:"rgba(0, 0, 255, 1.0)",width:2})})}),this.layer.set("layerid",t),this.geoserverData={wsName:"",uri:"mars",wfsURL:this.option.url,layer:"hfty"}}loadData(){var t={srcName:"EPSG:3857",featureNS:this.geoserverData.uri,featurePrefix:this.geoserverData.wsName,featureTypes:[this.geoserverData.layer],outputFormat:"application/json"},e=(new ptt).writeGetFeature(t);fetch(this.geoserverData.wfsURL,{method:"POST",body:(new XMLSerializer).serializeToString(e)}).then((function(t){return t.json()})).then((t=>{var e=new iA({geometryName:"geom"}).readFeatures(t);this._source&&this.addFeatures("wms",e)}))}},ClusterImageLayer:class extends BT{constructor(t,r){super(t,r),e(this,"styleCache"),e(this,"clusterSource"),e(this,"selectCluster"),this.styleCache={},this.layertype="ClusterImageLayer",this.option={distance:40,imageFieldName:"主照片地址",animationDuration:600,maxResolution:40},this.option=Object.assign({},this.option,r),this._source=new ws,this.clusterSource=new MT({distance:this.option.distance,source:this._source}),this.layer=new u6({source:this.clusterSource,animationDuration:this.option.animationDuration,maxResolution:this.option.maxResolution,renderOrder:function(t,e){return e.getGeometry().getExtent()[1]-t.getGeometry().getExtent()[1]},style:(t,e)=>this.getFeatureStyle(t,e,"")}),this.layer.set("layerid",t),this.layer.set("layertype",this.layertype),this.selectCluster=new gu({layers:[this.layer],condition:sl,style:(t,e)=>this.getFeatureStyle(t,e,"sel")}),this.selectCluster.setActive(!0),this.selectCluster.getFeatures().on(["add"],(t=>{var e=t.target.getArray()[0].get("features");e&&this.trigger(Jd.onFeatureSelected,e)})),this.selectCluster.getFeatures().on(["remove"],(function(t){}))}addFeaturesMN(t,e){for(var r,n,i,o,s=t.getView().calculateExtent(t.getSize()),a=[],l=0;l<e;++l)a[l]=new z(new Vr([s[0]+(s[2]-s[0])*Math.random(),s[1]+(s[3]-s[1])*Math.random()])),a[l].set("id",l),a[l].set("name","123123"),a[l].set("classname",l),a[l].set("thumbnail","");null==(n=null==(r=this.clusterSource)?void 0:r.getSource())||n.clear(),null==(o=null==(i=this.clusterSource)?void 0:i.getSource())||o.addFeatures(a)}getFeatureStyle(t,e,r){let n,i=t.get("features")[0].get("uuid"),o=t.get("features")[0],s=t.get("features").length,a=o.get(this.option.imageFieldName);if(a=a.replace("_sss","_s"),n||(this.styleCache[i]=n=new Ai({image:new dtt({src:a,radius:20,crop:!0,kind:s>1?"folio":"square",shadow:!0,onload:function(){try{t.changed()}catch{}},stroke:new vn({width:2,color:"sel"===r?"rgba(0, 255, 0,1)":"#fff"})})})),s>1){let t=new Ai({image:new ii({points:12,radius:9,fill:new fn({color:"rgba(0, 255, 0,0.3)"})}),text:new fi({text:s.toString(),font:"bold 12px helvetica,sans-serif",fill:new fn({color:"#000"})})});var l=t.getImage().getAnchor();return l[0]-=20,l[1]+=20,[n,t]}return[n]}appendTo(t){var e,r;this._map=t,this.selectCluster&&(null==(e=this._map)||e.addInteraction(this.selectCluster)),this.layer&&(null==(r=this._map)||r.addLayer(this.layer))}},GraphicLayer:class extends BT{constructor(t,r){super(t,r),e(this,"animList"),this.animList=[],this.layertype="GraphicLayer",this.layer=new ls({source:this._source,zIndex:this.option.zIndex}),this.layer.set("layerid",t),this._source.on("addfeature",(t=>{t.feature.get("loadAnimation")&&setTimeout((()=>{this.animateFeature(t.feature,t.feature.get("loadAnimation"))}),1),t.feature.get("pulseAnimate")&&setTimeout((()=>{this.pulseAnimate(t.feature,t.feature.get("pulseAnimate"))}),1)})),this._source.on("removefeature",(t=>{t.feature.get("pulseAnimate")&&this.animList.forEach(((e,r)=>{t.feature.get("uuid")==e.uuid&&e.anim.stop({user:!0})}))})),this.layer.on(this.EventType.featureType.onFeatureContextmenu,(t=>{this._setFeatureContextmenu(t.data.feature,t.data.contextmenu)})),this._on("onClickTolayer",(t=>{"function"==typeof t.isPopupBind&&t.isPopupBind()?t.openPopup():this.option.enabledPopup&&this.openPopup(t)}))}pathAnimate(t,e,r){let n={rotate:!0,speed:1,revers:!0,repeat:1/0,easing:Bs};r=Object.assign({},n,r);let i=new wtt({path:e,rotate:r.rotate,speed:r.speed,repeat:r.repeat,revers:r.revers});return this.trigger(Jd.onPathAnimateStart,{data:t}),i.on("animationend",(t=>{this.trigger(Jd.onPathAnimateEnd,{data:t.feature})})),i.on("animating",(t=>{this.trigger(Jd.onPathAnimateRunning,{data:t})})),this.layer.animateFeature(t,i)}pulseAnimate(t,e){let r={fade:Ss,duration:2e3,revers:!1,repeat:1/0,easing:Ss,radius:30,fillcolor:"rgba(255,0,0,0.2)",strokecolor:"red",strokewidth:1};e=Object.assign({},r,e);let n=new Ptt({lnglat:t.getGeometry().getCoordinates(),style:{image:{radius:e.radius,scale:1,fill:{color:e.fillcolor},stroke:{color:e.strokecolor,width:e.strokewidth}},zIndex:990},attribute:{uuid:t.get("uuid")}}),i=new Btt(e);this.animList.push({uuid:t.get("uuid"),anim:this.layer.animateFeature(n,i)}),i.on("animationend",(t=>{this.animList.forEach(((e,r)=>{t.feature.get("uuid")==e.uuid&&this.animList.splice(r,1)}))}))}animateFeatures(t,e){t.forEach(((t,r)=>{this.animateFeature(t,e)}))}animateFeature(t,e){let r,n={duration:3e3,animateType:lg.Bounce,repeat:1,speed:.8,revers:!1,zoomOut:!1,side:!1};switch((e=Object.assign({},n,e)).animateType){case lg.Blink:r=new mtt(e);break;case lg.Drop:r=new vtt(e);break;case lg.Fade:r=new _tt(e);break;case lg.Path:r=new wtt(e);break;case lg.Shake:r=new btt(e);break;case lg.Show:r=new xtt(e);break;case lg.Slide:r=new Ctt(e);break;case lg.Teleport:r=new Stt(e);break;case lg.Throw:r=new Ett(e);break;case lg.Zoom:r=new Btt(e);break;case lg.ZoomOut:e.zoomOut=!0,r=new Btt(e);break;default:r=new ytt(e)}this.layer.animateFeature(t,r)}},GraphicImageLayer:IT,DayNightLayer:class extends BT{constructor(t,e){super(t,e),this.layertype="DayNightLayer",this._source=new Ltt({}),this.layer=new ls({source:this._source,zIndex:500,style:new Ai({image:new si({radius:5,fill:new fn({color:"red"})}),fill:new fn({color:[0,0,50,.5]})})}),this.layer.set("layerid",t),this._source.on("addfeature",(t=>{}))}setDataTime(t){this._source.setTime(t)}},kmlLayer:class extends BT{constructor(t,e){super(t,e),this.option={},Object.assign(this.option,e),this.layertype="KmlLayer",this._source=new ws({url:e.url,format:new f9({extractStyles:!1})}),this.layer=new ls({source:this._source,zIndex:900}),this.layer.set("layerid",t),this.layer.on(Jd.onClick,(t=>{t.feature&&this.trigger(Jd.onClick,t.feature.getProperties())}))}},PathLayer:class extends BT{constructor(t,r){super(t,r),e(this,"autoPointSize"),e(this,"result"),e(this,"resultlayer"),e(this,"resultSource"),e(this,"nodesLayer"),e(this,"dijkstra"),e(this,"pathDatalayer"),e(this,"animating"),e(this,"distance"),e(this,"lastTime"),e(this,"pathLine"),e(this,"position"),e(this,"geoMarker"),e(this,"styles"),e(this,"vueThis"),e(this,"pathLineFeature"),e(this,"lastAngle"),e(this,"pathIndex"),e(this,"timer"),e(this,"pathNodeInfo"),e(this,"geoMarkerCircle"),e(this,"moveNodeInfo"),e(this,"FeatureMoveProgressInfo"),e(this,"oldPathLineFeature"),e(this,"routeFeatures"),e(this,"fun",(t=>{this.vueThis.moveFeature(t)})),this.option=bT.merge({roadNetworkData:"",pathStyle:{color:"#089519",width:10,imageUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACISURBVDhP3Yy9CYAwFIQzg+ASTuFmuokjuIaFpb2Vc8S7vEswKFE78YOD5H6e+zne+xqq9H0Hhj0U6WU/gwPbZTw7gmJn/UvKR1iwXmKRjlwfYWB5gsNGKh+hYX4ijBUzLx/BZzUvkI0j9JRFNkUhHM3zE3QaR5hBM4tgkG3AaPW85U338zi3A+g3FErF6/qjAAAAAElFTkSuQmCC"},trackPathStyle:{color:"rgba(180,205,205, 1)",width:10},geoMarkerStyle:{url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAlCAYAAABGWhk4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAABYgAAAWIBXyfQUwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAYGSURBVEiJlZdvaFvXFcB/7+mPI8lvjmxHil0vKkuq1bCuYbVsQrDxFup9aSAezA5pExpGRh26hdF0FOIv+9CyrLCh7dvABARmyIWB6Qad69Ik1PH8h67E0C6anbqTI8myZUeWZE1/nu4+6D7n2VZpcuCgq/vu/d37zjvn3HMVIQS1RFEUxWiaFECYFPE1AGtN6iNRAYv8VWVfRaouf2tKTbDcrQG1AXbZRgKLprGVWrtW93ZIqCJBdsAB1Mfj8d/H4/F3gXrZZyymmMz2SIQQu1RCrYATaAKeDoVC54WUUCh0HnhaPnPKscpejmJ+C5MJrMABQAMOpjY2xgpW13cB6sq5e02NjQPAQyAD/A8oA7tMstcUe8Gu8fHxM41ud/u1Ww/Ua7ceqI1ud/v4+PgZwCXHWOWc3ebYYwKLHOwGfG1tbV2ZbG51IZnT1bdnhfr2rFhI5vRMNrfa1tbWBfjk2AOGvQ2eecfm3dYBznA4fKHe5fS8MbmiVgRUBLwxuaLWu5yecDh8Qdq4rtauVZNtjY9mBxx9fX0tL3QEXv3wyy0xcT+9s/rE/TQffrklXugIvNrX19fCIw+xYvIQ1QRVzeBgMPia3W5zvPlRdJ8rvflRVLHbbY5gMPjaHrBqwC01TOC6evVq++DZs78JLaTUqWiWn//Aw7s/ahOXjh/icL1d+WI9j9OmKj9sb3t2e3t74s6dOymgxKNo3Oe3h4BjiURiUgghbi5vGe4r1lOp5fVUatn4bzxLJBKTwDE5d8evDTvbqEaUd2xsbNCYXNb10szMzGh/f//LwIvAi/39/S/PzMyMlnW9ZIwbGxsbBLySYTO+3S7ww4dbt4QQIrm29unQ0NArQC/QA3RL7QF6h4aGXkmurX0qhBDp9NYne8H7XGx+fv58Op22njp16pb8KCpAIBCoB5ibm8vKb1gBihMTEz1ut7sQCAT+AuSoJqiyERRGYLiohrHW0NDQEA6Hf+L3+497PJ5jLpfLC5DL5VaTyeRiJBL5bHBw8K/pdDpNNbS3gG2qIa4jd+sAGoEjwPeHh4cvbm5uLgqTFPWKKOoVc5fY3NxcHB4evgg8J+c2SpZVka9bJ+1z8ObNmxd7enp+pSiK9at0kd9Nx5mN5VhIbgPwnMdJZ6uLX59owddgRwhRvn379h96e3tvUE1MWaBgkVAHoF2/fr3r3Llzv1UUxfrnf63R/94iUytZYtkSugBdQCxbYi6eY+SzdZqcVjpaXKrP5+tyOp1zk5OTCaqZTleAbwGa3+9vnZ+ff0/TNN+f5lb55cR/9wZcTflj3xF+EfCSyWS+6ujo+GkkEokBmZ0UOTo6ekHTNN/iZoG3Pl55LCjAWx+vsLhZQNM03+jo6AXpBNad/NDa2noc4J2pGNulrz0j98l2qcI7UzEAJMNugC2A1e12Pwvwzwe5x4YaYsyRDCtgUQF1YGCg2eFwNGeKOvdS+ScG30vlyRR1HA5H88DAQDOgqoCIRqMFIYSos6jY1P0H7jeJTVWos6gIIUQ0Gi0AQgUq09PTW7lcbsVuUXje63xi8PNeJ3aLQi6XW5ment4CKirV8CttbGz8G6DniPbEYGOOZJQAXaXq0MVIJDIFcO1kC09p9seGPqXZuXayBQDJ2ElCGtVwbkwkEiNer7frH/fTvBT+D+VK7YLREKuq8LfBZ/jxdxpYXV2dOXz48M+ADSBrLvjUeDx+9/Tp02f8zc66l545yJ2VLMntck3o9w45+PtZP93f1iiVSpnLly8PLSwsJKhmuAJUE7OL6tFydGRk5FI+n08KIUShrIvQ3XXx+gfL4sSNz8WJG5+L1z9YFqG766JQ1oUQQuTz+eTIyMgl4KhkuCRzp/jTAA9wtLu7++TS0tL74htkaWnp/e7u7pMS6pEMO2CpdfQfoJrtXMFgsKOzs7OztbW1vampyQ+QSqUisVjsi9nZ2dkrV67MUz018lQTfBFZxylCiFr1sI1qOq1jd80A1SOpLCEFqSVMx78QQuxUmya4sYBFAo22+aqgSy2b2hVMFWetMtasxkK17iDGlWHnTmIuY/8P3C0FYo4OztIAAAAASUVORK5CYII="},navigationOption:{defaultZoom:15,turnToZoom:17,speed:1,tracking:!0,trackingDirection:!0,showNode:!0,showStartEndNode:!0,showPathLine:!0,scale:1,pointDistance:.5}},r,!0),this.layertype="PathLayer",this._source=new ws({wrapX:!1,url:this.option.roadNetworkData,format:new iA});let n=[];this.pathDatalayer=new ls({source:this._source,zIndex:900,style:new Ai({stroke:new vn({width:1,color:[255,255,255,1]}),fill:new fn({color:"rgba(255, 255, 255, 0.1)"})})}),this.vueThis=this,this.styles={route:new Ai({stroke:new vn({width:6,color:[237,212,0,.8]})}),icon:new Ai({image:new Wo({anchor:[.5,1],src:"data/icon.png"})}),geoMarker:new Ai({zIndex:999,image:new Wo({src:this.option.geoMarkerStyle.url,rotation:0,rotateWithView:!1})})},this.resultSource=new ws,this.resultlayer=new ls({source:this.resultSource,zIndex:200,updateWhileAnimating:!0,updateWhileInteracting:!0}),this.position=new Vr([0,0]),this.geoMarker=new z({geometry:this.position}),this.geoMarker.setStyle(this.styles.geoMarker),this.resultSource.addFeature(this.geoMarker),this.resultlayer.on("change",(t=>{})),this.dijkstra=new Rtt({source:this._source}),this.dijkstra.on("start",(t=>{this.resultSource.clear()})),this.dijkstra.on("finish",(t=>{if(this.resultSource.clear(),!t.route.length)return void this.trigger(Jd.onPathComputerComplete,{pathLine:null,distance:0});if(this.routeFeatures=t.route,this.pathNodeInfo=mT.lineMerger(t.route,this.option.navigationOption.pointDistance),this.pathLineFeature=this.pathNodeInfo.line,this.pathLine=this.pathLineFeature.getGeometry(),this.option.navigationOption.totalDistance=De(this.pathLine)*this.option.navigationOption.scale,this.option.navigationOption.showNode){let t=0;this.pathLine.forEachSegment(((e,r)=>{let n=new z({geometry:new Vr(e)});n.setStyle(new Ai({image:new si({radius:12,fill:new fn({color:"#bb1422"})}),text:new fi({offsetX:0,offsetY:0,textAlign:"center",textBaseline:"middle",text:t.toString(),font:"12px sans-serif",fill:new fn({color:"white"})})})),t++,this.resultSource.addFeature(n)}))}this.position.setCoordinates(this.pathLine.getFirstCoordinate()),this.setUserMarker(this.pathLine.getFirstCoordinate(),0),this.option.navigationOption.tracking&&(this._map.getView().setCenter(this.pathLine.getFirstCoordinate()),this._map.getView().setZoom(this.option.navigationOption.defaultZoom)),this.geoMarkerCircle=new z({geometry:new jl(this.pathLine.getFirstCoordinate(),50)}),this.oldPathLineFeature=new z({geometry:new mn([this.pathLine.getFirstCoordinate()])}),this.oldPathLineFeature.setStyle(new Ai({stroke:new vn({color:this.option.trackPathStyle.color,width:this.option.trackPathStyle.width})})),this.pathLineFeature.setStyle(this.styleFunc.bind(this)),this.geoMarkerCircle.setStyle(new Ai({stroke:new vn({width:6,color:[237,212,0,.8]}),fill:new fn({color:"rgba(255, 255, 255, 0.1)"})})),this.option.navigationOption.showPathLine&&(this.resultSource.addFeature(this.geoMarker),this.resultSource.addFeature(this.oldPathLineFeature),this.resultSource.addFeature(this.pathLineFeature));let e=De(this.pathLineFeature.getGeometry());this.trigger(Jd.onPathComputerComplete,{pathLine:this.pathLineFeature,distance:e})})),this.dijkstra.on("pause",(t=>{t.overflow&&this.dijkstra.resume()})),this.dijkstra.on("calculating",(t=>{var e=this.dijkstra.getBestWay();this.resultSource.clear(),this.resultSource.addFeatures(e)})),this.nodesLayer=new ls({source:this.dijkstra.getNodeSource(),style:new Ai({image:new si({radius:5,fill:new fn({color:[255,0,0,.1]})})})}),n.push(this.nodesLayer),n.push(this.resultlayer),n.push(this.pathDatalayer),this.layer=new zs({layers:n}),this.layer.set("layerid",t),this.animating=!1,this.distance=0,this.lastTime}styleFunc(t,e){let r=[];r.push(new Ai({stroke:new vn({color:this.option.pathStyle.color,width:this.option.pathStyle.width})}));const n=t.get("geometry");if("linestring"===n.getType().toLowerCase()){const t=n.getCoordinates(),i=n.getLength(),o=80*e,s=Math.ceil(i/o);for(let e=1;e<s;e++){const t=e/s,i=n.getCoordinateAt(t),o=n.getCoordinateAt(t+.05*t),a=this.setAngle(i,o);r.push(new Ai({geometry:new Vr(i),image:new Wo({scale:.8,rotation:this.option.navigationOption.tracking?0:a.markAngle,src:this.option.pathStyle.imageUrl})}))}this.option.navigationOption.showStartEndNode&&(r.push(new Ai({geometry:new Vr(t[0]),image:new si({radius:12,fill:new fn({color:"green"})}),text:new fi({offsetX:0,offsetY:0,textAlign:"center",textBaseline:"middle",text:"起",font:"12px sans-serif",fill:new fn({color:"white"})})})),r.push(new Ai({geometry:new Vr(t[t.length-1]),image:new si({radius:12,fill:new fn({color:"#bb1422"})}),text:new fi({offsetX:0,offsetY:0,textAlign:"center",textBaseline:"middle",text:"终",font:"12px sans-serif",fill:new fn({color:"white"})})})))}return r}moveFeature(t){this.resultlayer.changed();const e=t.frameState.time,r=e-this.lastTime;if(this.distance=(this.distance+this.option.navigationOption.speed*r/1e6)%2,this.lastTime=e,this.trigger(Jd.onFeatureMoveProgress,{progress:this.distance,distance:this.distance,elapsedTime:r}),this.distance>=1)this.stopAnimation();else{const e=this.pathLine.getCoordinateAt(this.distance);let n,i=(this.distance+this.option.navigationOption.speed*r/1e6)%2;n=i>=1?this.pathLine.getLastCoordinate():this.pathLine.getCoordinateAt(i);let o=this.setAngle(e,n);this.position.setCoordinates(e),this.option.navigationOption.tracking?(this._map.getView().setCenter(e),this._map.getView().setRotation(o.viewAngle)):this.styles.geoMarker.getImage().setRotation(o.markAngle);const s=function(t){if(!(t.context instanceof CanvasRenderingContext2D))throw new Error("Only works for render events from Canvas 2D layers");var e=t.inversePixelTransform[0],r=t.frameState,n=lt(t.inversePixelTransform.slice(),r.coordinateToPixelTransform),i=ts(r.viewState.resolution,e);return new ko(t.context,e,r.extent,n,r.viewState.rotation,i,void 0)}(t);s.setStyle(this.styles.geoMarker),s.drawGeometry(this.position),this._map.render()}}setAngle(t,e){let r=e[1]-t[1],n=e[0]-t[0],i=1,o=Math.atan(r/n);r<=0&&n>=0?(i=2,o=-o):n>=0&&r>=0?(o=-o,i=1):n<=0&&r>=0?(o=Math.PI-o,i=4):n<=0&&r<=0&&(o=Math.PI-o,i=3);var s=Math.atan2(1,0);return{viewAngle:-s-o,markAngle:s+o,Angle:s-Math.atan2(r,n),xx:i}}startAnimation(t=!0,e=!0,r=10){this.lastAngle=0,this.distance=0,this.animating=!0,this.lastTime=Date.now(),this._map.getView().setCenter(this.pathLine.getFirstCoordinate()),this._map.getView().setZoom(15),this.resultlayer.addEventListener("postrender",this.fun)}pauseAnimation(){this.resultlayer.removeEventListener("postrender",this.fun)}resumeAnimation(){this.resultlayer.addEventListener("postrender",this.fun)}stopAnimation(){this.animating=!1,this.position.setCoordinates(this.pathLine.getLastCoordinate()),this.geoMarker.setGeometry(this.position),this._map.getView().setRotation(0),this._map.getView().setCenter(this.pathLine.getLastCoordinate()),this.resultlayer.removeEventListener("postrender",this.fun)}startAnimation2(t){clearInterval(this.timer),t&&(this.option.navigationOption=Object.assign({},this.option.navigationOption,t)),this.distance=0,this.animating=!0,this.lastTime=Date.now(),this.pathNodeInfo.nodeData.length>3?this.moveNodeInfo={currentNode:this.pathNodeInfo.nodeData[0],nextNode:this.pathNodeInfo.nodeData[1],threeNode:this.pathNodeInfo.nodeData[2]}:this.moveNodeInfo={currentNode:this.pathNodeInfo.nodeData[0],nextNode:this.pathNodeInfo.nodeData[1],threeNode:this.pathNodeInfo.nodeData[1]},this.option.navigationOption.tracking&&(this._map.getView().setCenter(this.pathLine.getFirstCoordinate()),this._map.getView().setZoom(this.option.navigationOption.defaultZoom),this._map.getView().setRotation(this.setAngle(rr(this.moveNodeInfo.currentNode.coords),rr(this.moveNodeInfo.nextNode.coords)).viewAngle)),this.oldPathLineFeature.getGeometry().setCoordinates([this.pathLine.getFirstCoordinate()]),this.pathIndex=0,this.FeatureMoveProgressInfo={nodeNum:this.moveNodeInfo.currentNode.coordIndex,progress:this.pathIndex/this.pathNodeInfo.coordinates.length,remainingDistance:this.option.navigationOption.totalDistance-this.option.navigationOption.totalDistance*(this.pathIndex/this.pathNodeInfo.coordinates.length),nextNodeDistance:this.moveNodeInfo.currentNode.distance*this.option.navigationOption.scale,totalDistance:this.option.navigationOption.totalDistance,angle:this.ComputDirection()},this.timer=setInterval((()=>{this.moveFeature3(this.pathIndex),this.pathIndex=this.pathIndex+this.option.navigationOption.speed}),1)}stopAnimation2(){this.animating=!1,this.position.setCoordinates(this.pathLine.getLastCoordinate()),this.geoMarker.setGeometry(this.position),this._map.getView().setRotation(0),this._map.getView().setCenter(this.pathLine.getLastCoordinate()),clearInterval(this.timer)}pauseAnimation2(){clearInterval(this.timer)}resumeAnimation2(){this.timer=setInterval((()=>{this.moveFeature3(this.pathIndex),this.pathIndex=this.pathIndex+this.option.navigationOption.speed}),100)}moveFeature3(t){const e=(new Date).getTime(),r=e-this.lastTime;if(this.distance=(this.distance+this.option.navigationOption.speed*r/1e6)%2,this.lastTime=e,t>=this.pathNodeInfo.coordinates.length)this.stopAnimation2();else{const e=rr(this.pathNodeInfo.coordinates[t]);this.oldPathLineFeature.getGeometry().appendCoordinate(e),this.oldPathLineFeature.getGeometry().changed();let r=De(new mn([e,rr(this.moveNodeInfo.nextNode.coords)]))*this.option.navigationOption.scale;if(this.position.setCoordinates(e),this.geoMarker.getGeometry().setCoordinates(e),this.geoMarkerCircle.getGeometry().setCenter(e),this.FeatureMoveProgressInfo.nodeNum=this.moveNodeInfo.currentNode.coordIndex,this.FeatureMoveProgressInfo.nextNodeDistance=r,this.FeatureMoveProgressInfo.progress=t/this.pathNodeInfo.coordinates.length,this.FeatureMoveProgressInfo.remainingDistance=this.option.navigationOption.totalDistance-this.option.navigationOption.totalDistance*this.FeatureMoveProgressInfo.progress,r<=1*this.option.navigationOption.speed){let t=this.moveNodeInfo.currentNode.coordIndex+1;if(t<this.pathNodeInfo.nodeData.length-1){this.moveNodeInfo.currentNode=this.pathNodeInfo.nodeData[t],this.moveNodeInfo.nextNode=this.pathNodeInfo.nodeData[t+1],t<this.pathNodeInfo.nodeData.length-2?(this.moveNodeInfo.threeNode=this.pathNodeInfo.nodeData[t+2],this.FeatureMoveProgressInfo.angle=this.ComputDirection()):this.FeatureMoveProgressInfo.angle="直行";let e=this.setAngle(rr(this.moveNodeInfo.currentNode.coords),rr(this.moveNodeInfo.nextNode.coords));this.option.navigationOption.tracking?this._map.getView().setRotation(e.viewAngle):this.styles.geoMarker.getImage().setRotation(e.markAngle)}}this.trigger(Jd.onFeatureMoveProgress,this.FeatureMoveProgressInfo),this.option.navigationOption.tracking&&this._map.getView().setCenter(e)}}moveFeature2(){const t=(new Date).getTime(),e=t-this.lastTime;if(this.distance=(this.distance+this.option.navigationOption.speed*e/1e6)%2,this.lastTime=t,this.distance>=1)this.stopAnimation2();else{const t=this.pathLine.getCoordinateAt(this.distance);let r,n=De(new mn([t,rr(this.moveNodeInfo.nextNode.coords)]));if(this.position.setCoordinates(t),this.geoMarker.getGeometry().setCoordinates(t),this.geoMarkerCircle.getGeometry().setCenter(t),n<100){let t=mT.movePointContain(this.geoMarkerCircle,this.pathNodeInfo.nodeData);if(-1!=t.coordIndex&&t.coordIndex!=this.moveNodeInfo.currentNode.coordIndex&&t.coordIndex<=this.moveNodeInfo.currentNode.coordIndex+2){this.moveNodeInfo={currentNode:this.pathNodeInfo.nodeData[t.coordIndex],nextNode:this.pathNodeInfo.nodeData[t.coordIndex+1],threeNode:this.pathNodeInfo.nodeData[t.coordIndex+2]};let n=this._map.getPixelFromCoordinate(rr(this.moveNodeInfo.currentNode.coords)),i=this._map.getPixelFromCoordinate(rr(this.moveNodeInfo.nextNode.coords)),o=this._map.getPixelFromCoordinate(rr(this.moveNodeInfo.threeNode.coords)),s=(i[0]-n[0])*(o[1]-i[1])-(i[1]-n[1])*(o[0]-i[0]),a=this.setAngle(rr(this.moveNodeInfo.nextNode.coords),rr(this.moveNodeInfo.threeNode.coords));this.trigger(Jd.onFeatureMoveProgress,{nodeNum:this.moveNodeInfo.currentNode.coordIndex,progress:this.distance,distance:this.option.navigationOption.totalDistance-this.option.navigationOption.totalDistance*this.distance,elapsedTime:e,nextNodeDistance:this.moveNodeInfo.currentNode.distance,nextNodeDirection:a.markAngle,angle:s>0?"右":"左",xx:a.xx}),r=this.setAngle(rr(this.moveNodeInfo.currentNode.coords),rr(this.moveNodeInfo.nextNode.coords)),this.option.navigationOption.tracking?this._map.getView().setRotation(r.viewAngle):this.styles.geoMarker.getImage().setRotation(r.markAngle)}}this.option.navigationOption.tracking?this._map.getView().setCenter(t):this.styles.geoMarker.getImage().setRotation(r.markAngle)}}ComputDirection(){let t=this._map.getPixelFromCoordinate(rr(this.moveNodeInfo.currentNode.coords)),e=this._map.getPixelFromCoordinate(rr(this.moveNodeInfo.nextNode.coords)),r=this._map.getPixelFromCoordinate(rr(this.moveNodeInfo.threeNode.coords)),n=(e[0]-t[0])*(r[1]-e[1])-(e[1]-t[1])*(r[0]-e[0]);return 0==n?"直行":n>0?"右":"左"}setUserMarker(t,e){this.position.setCoordinates(t),this.geoMarker.getGeometry().setCoordinates(t),this.styles.geoMarker.getImage().setRotation(e)}setUserCoordinate(t){let e;e=t instanceof z?t:new z({geometry:new Vr(t)});let r=new z({geometry:new Vr(this.pathLine.getFirstCoordinate())}),n=mT.nearestPointOnLine(e,this.pathLineFeature);this.geoMarker.setGeometry(n.getGeometry()),new z({geometry:new Vr(this.pathLine.getLastCoordinate())});let i=mT.lineSlice(r,n,this.pathLineFeature);this.pathIndex=n.get("index"),this.moveNodeInfo={currentNode:this.pathNodeInfo.nodeData[this.pathIndex],nextNode:this.pathNodeInfo.nodeData[this.pathIndex+1]};let o=De(i.getGeometry())*this.option.navigationOption.scale;this.FeatureMoveProgressInfo={nodeNum:this.moveNodeInfo.currentNode.coordIndex,progress:o/this.option.navigationOption.totalDistance,remainingDistance:this.option.navigationOption.totalDistance-o,nextNodeDistance:De(new mn([n.getGeometry().getCoordinates(),rr(this.moveNodeInfo.nextNode.coords)]))*this.option.navigationOption.scale,totalDistance:this.option.navigationOption.totalDistance,angle:""},this.pathIndex<this.pathNodeInfo.nodeData.length-2?(this.moveNodeInfo.threeNode=this.pathNodeInfo.nodeData[this.pathIndex+2],this.FeatureMoveProgressInfo.angle=this.ComputDirection()):(this.moveNodeInfo.threeNode=this.pathNodeInfo.nodeData[this.pathIndex+1],this.FeatureMoveProgressInfo.angle="直行"),this.trigger(Jd.onFeatureMoveProgress,this.FeatureMoveProgressInfo),this.oldPathLineFeature.setGeometry(i.getGeometry()),this.oldPathLineFeature.getGeometry().changed();let s=this.setAngle(rr(this.moveNodeInfo.currentNode.coords),rr(this.moveNodeInfo.nextNode.coords));this.option.navigationOption.tracking?this._map.getView().setRotation(s.viewAngle):this.styles.geoMarker.getImage().setRotation(s.markAngle),this.option.navigationOption.tracking&&this._map.getView().setCenter(n.getGeometry().getCoordinates())}getPathLine(){return this.pathLine}computerPath(t,e){clearInterval(this.timer),this.resultSource.clear(),this.dijkstra.path(t,e)}computerPath2(t,e){let r=this.getFile("../public/tempData/铁路_简版.json","text/json"),n=this.formatJsonTo4326Json(JSON.parse(r));var i=new Jtt(n,{weightFn:function(t,e,r){var n=t[0]-e[0],i=t[1]-e[1];return Math.sqrt(n*n+i*i)}});let o=mT.featureTo4326(t),s=mT.featureTo4326(e);i.findPath(o,s)}addGeoJsonUrl(t,e){let r=this.getFile(e,"text/json"),n=this.formatJsonTo3857(JSON.parse(r));this.addFeatures(t,n)}addGeoJson(t,e){this.addFeatures(t,this.formatJsonTo3857(e))}convertGeoJsontoFeatures(t){return this.formatJsonTo3857(t)}addFeatures(t,e){var r;null==(r=this._map)||r.getView().getZoom(),e.forEach((e=>{e.set("classname",t),e.get("featuretype")||e.set("featuretype",rg.vector),xg.getFeaturesDefaultStyle(e,25,this.autoPointSize);let r=xg.getStyle(e.getGeometry().getType(),e.get("style"));e.setStyle(r)})),this._source.addFeatures(e)}addFeature(t,e){e.set("classname",t),this._source.addFeature(e)}getFeaturesByClassName(t){let e=[];return this._source.getFeatures().forEach((r=>{r.get("classname")==t&&e.push(r)})),e}getFeatures(t){let e=[];return this._source.getFeatures().forEach((r=>{r.get("name")==t&&e.push(r)})),e}getFeature(t){let e=null;return this._source.getFeatures().forEach((r=>{r.get("name")!=t||(e=r)})),e}removeFeatures(t){this._source.getFeatures().forEach((e=>{e.get("classname")==t&&this._source.removeFeature(e)}))}pathToGeoJSON(){return(new iA).writeFeaturesObject(this.routeFeatures,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"})}},ArcGisFeatureServiceLayer:class extends BT{constructor(t,e){super(t,e),this.layertype="ArcGisFeatureServiceLayer";const r=this.option.url,n=new w6;let i=this;var o;this._source=new ws({loader:function(t,e,o,s,a){const l=r+"/query/?f=json&returnGeometry=true&spatialRel=esriSpatialRelIntersects&geometry="+encodeURIComponent('{"xmin":'+t[0]+',"ymin":'+t[1]+',"xmax":'+t[2]+',"ymax":'+t[3]+',"spatialReference":{"wkid":102100}}')+"&geometryType=esriGeometryEnvelope&inSR=102100&outFields=*&outSR=102100";fetch(l,{method:"GET"}).then((function(t){return t.json()})).then((t=>{const e=n.readFeatures(t,{featureProjection:o});e.length>0&&(i.addFeatures("",e),s(e))}))},strategy:(o=kc({tileSize:512}),function(t,e,r){var n=o.getZForResolution(function(t,e){return t}(e)),i=o.getTileRangeForExtentAndZ(Ar(t),n),s=[],a=[n,0,0];for(a[1]=i.minX;a[1]<=i.maxX;++a[1])for(a[2]=i.minY;a[2]<=i.maxY;++a[2])s.push(cr(o.getTileCoordExtent(a)));return s})}),this._source.on("featuresloadend",(t=>{this.trigger(Jd.onLoadEnd,t)})),this.layer=new ls({source:this._source}),this.layer.set("layerid",t),this.layer.set("hashMove",this.option.hashMove)}},TileXyzLayer:BO,ArcGisMapServerLayer:iO,ArcGisTileXyzLayer:nO,WmsLayer:class extends rO{constructor(t,e){super(t,e),this.layertype="ImageWMSLayer",this.layerSource=new jk(e),this.layer=new Sh({source:this.layerSource}),this.layer.set("layerid",t),this.mImageExtent&&this.layer.setExtent(this.mImageExtent),this.layerSource.on("tileloadstart",(function(){})),this.layerSource.on("tileloadend",(function(){})),this.layerSource.on("tileloaderror",(function(){}))}},WmtsLayer:class extends rO{constructor(t,e){super(t,e),this.layertype="ImageWMSLayer",this.option=Object.assign({},{opacity:.7,attributions:"",layer:"",matrixSet:"GoogleMapsCompatible",format:"image/png"},e);const r=Ye("EPSG:3857"),n=r.getExtent(),i=Kt(n)/256,o=new Array(19),s=new Array(19);for(let a=0;a<19;++a)o[a]=i/Math.pow(2,a),s[a]=a;this.layerSource=new qk({attributions:this.option.attributions,url:this.option.url,layer:this.option.layer,matrixSet:this.option.matrixSet,format:this.option.format,projection:r,tileGrid:new zk({origin:zt(n),resolutions:o,matrixIds:s}),style:"default",wrapX:!0}),this.layer=new AA({zIndex:this.option.zIndex,opacity:this.option.opacity,source:this.layerSource}),this.layer.set("layerid",t),this.mImageExtent&&this.layer.setExtent(this.mImageExtent),this.layerSource.on("tileloadstart",(function(){})),this.layerSource.on("tileloadend",(function(){})),this.layerSource.on("tileloaderror",(function(){}))}},TifLayer:class extends rO{constructor(t,e){super(t,e),this.layertype="GeoTIFFLayer",this.layerSource=new Ek({sources:[{url:this.option.url}]}),this.layer=new lf({source:this.layerSource}),this.layer.set("layerid",t),this.mImageExtent&&this.layer.setExtent(this.mImageExtent),this.layerSource.on("tileloadstart",(function(){})),this.layerSource.on("tileloadend",(function(){})),this.layerSource.on("tileloaderror",(function(){}))}padLeft(t,e,r){let n=t.toString(r||10);return(new Array(e).join("0")+n).slice(-e)}},imageLayer:PO,GeoImageLayer:class extends rO{constructor(t,r){super(t,r),e(this,"GraphicLayer"),e(this,"graphic"),e(this,"mSelectTransform");let n={imageCenter:[0,0],imageScale:[1,1],imageRotate:0,imageMask:null,ImageExtentWKID:og.EPSG3857,opacity:1,hashEdit:!1};this.option=Object.assign({},n,this.option),this.option.ImageExtentWKID==og.EPSG4326&&(this.option.imageCenter=rr(this.option.imageCenter)),this.layertype="GeoImageLayer",this.layerSource=new eet({url:this.option.url,imageMask:this.option.imageMask,imageCenter:this.option.imageCenter,imageScale:this.option.imageScale,imageRotate:Number(this.option.imageRotate*Math.PI/180)}),this.layer=new tet({source:this.layerSource,opacity:this.option.opacity}),this.layer.set("layerid",t),this.layerSource.on("imageloadend",(function(){})),this.layerSource.on("change",(()=>{this.layerSource.calculateExtent(!0)&&(this.graphic||(this.graphic=new Ttt({style:{stroke:{color:"rgba(255, 0, 0,0)",width:0},fill:{color:"rgba(255, 0, 0,0)"}},attribute:{name:t+"_graphic",movestate:!1,editallows:!1}}),this.graphic.setGeometryFromExtent(this.layerSource.getExtent()),this.GraphicLayer.addFeature("temp1",this.graphic),this.graphic.set("Scale",this.option.imageScale),this.graphic.on("onRotating",(t=>{this.option.imageRotate=t.data,this.layerSource.setRotation(t.data)})),this.graphic.on("onScaling",(t=>{this.option.imageScale=[t.data,t.data],this.layerSource.setScale(t.data)})),this.graphic.on("onMoveing",(t=>{this.option.imageCenter=t.data,this.layerSource.setCenter(t.data)}))))}))}getAttribute(){return this.option}startEdit(){this.option.hashEdit=!0,this.mSelectTransform.setActive(!0)}endEdit(){this.option.hashEdit=!1,this.mSelectTransform.setActive(!1)}appendTo(t,e,r){t.addLayer(this.layer),this.isAdded=!0,this.mSelectTransform=r,this.GraphicLayer=e}},PbfLayer:class extends eg{constructor(t,r){super(t,r),e(this,"_source"),this.layertype="PbfLayer",this.layerid=t,this._source=new Xc({format:new hc,url:r.url,tileLoadFunction:function(t,e){t.setLoader((function(r,n,i){fetch(e).then((function(e){e.arrayBuffer().then((function(e){const n=t.getFormat().readFeatures(e,{extent:r,featureProjection:i});let o=[];n.forEach((t=>{let e=rc(t);e.set("movestate",!0),e.set("editstate",!0),o.push(rc(t))})),t.setFeatures(o)}))}))}))}});const n=new Ai({fill:new fn({color:"#eeeeee"}),stroke:new vn({color:"#eeeeee",width:1})});this.layer=new Pc({zIndex:r.zIndex,source:this._source,style:function(t){return r.featureStyle&&r.featureStyle.forEach((e=>{if(t.get(e.propertiesName)==e.propertiesValue)return n.getFill().setColor(e.fillColor),n.getStroke().setColor(e.strokeColor),void n.getStroke().setWidth(e.strokeWidth)})),n}}),this.layer.set("layerid",t)}},XWebGLPointsLayer:class extends eg{constructor(t,e){super(t,e),this.layertype="XWebGLPointsLayer",this._source=new ws({wrapX:!1}),this.Layer=new nf({source:this._source,style:{symbol:{symbolType:"circle",size:["interpolate",["exponential",2.5],["zoom"],2,1,12,8,16,12],color:"#ffed02",offset:[0,0],opacity:.95}},disableHitDetection:!1,colorCallback:function(t,e,r){},attributes:[{name:"color",callback:function(t){}},{name:"size",callback:function(t){}},{name:"GraphicColor",callback:function(t){}}]}),this.Layer.on(Jd.onClick,(t=>{t.feature&&this.trigger(Jd.onClick,t.feature.getProperties())}))}appendTo(t){var e;this._map=t,null==(e=this._map)||e.addLayer(this.Layer)}addGeoJson(t,e){let r=this.formatJsonTo3857(e);this.addFeatures(t,r)}addFeatures(t,e){var r;let n=null==(r=this._map)?void 0:r.getView().getZoom();e.forEach((e=>{e.set("classname",t),e.get("featuretype")||e.set("featuretype",rg.vector);let r=xg.getFeaturesDefaultStyle(e,n,!1);e.setStyle(r)})),this._source.addFeatures(e)}}},Symbol.toStringTag,{value:"Module"})),net=Object.freeze(Object.defineProperty({__proto__:null,getJSON:function(t){const e=new XMLHttpRequest;return e.open("get",t,!1),e.setRequestHeader("content-type","application/json"),e.send(),JSON.parse(e.response)}},Symbol.toStringTag,{value:"Module"}));class iet{constructor(t){e(this,"option"),this.option={key:"50da1a3686015849769f4a414bfdfb8f"},this.option=Object.assign({},this.option,t)}}const oet=Object.freeze(Object.defineProperty({__proto__:null,GaodeRoute:class extends iet{constructor(t){super(t)}query(t){let e=new o6,r=[{type:"驾车",url:t.serverUrl+"/v3/direction/driving"},{type:"步行",url:t.serverUrl+"/v3/direction/walking"},{type:"公交",url:t.serverUrl+"/v3/direction/transit/integrated"}];t.params.key=this.option.key,ST(r[t.queryType].url+xT(t.params)).then((function(r){r.route.paths.forEach((t=>{t.points=[],t.steps.forEach((r=>{r.polyline.split(";").forEach((r=>{let n=r.split(","),i=e.gcj02ToWgs84(parseFloat(n[1]),parseFloat(n[0]));t.points.push([i.lontitude,i.latitude])}))}))})),t.success(r)})).catch((function(e){t.error&&t.error(e)}))}},GaodePOI:class extends iet{constructor(t){super(t)}query(t){let e=new o6,r={serverUrl:"",queryType:1,keywords:"",location:"",radius:"3000",city:"西安市",city_limit:!0,polygon:"",extensions:"base",offset:20,page:1,success:null,error:null};r=Object.assign({},r,t);let n=[{type:"周边搜索",url:r.serverUrl+"/v3/place/around",parameters:{key:this.option.key,keywords:r.keywords,location:r.location,radius:r.radius,offset:r.offset,page:r.page}},{type:"关键字搜索",url:r.serverUrl+"/v3/place/text",parameters:{key:this.option.key,keywords:r.keywords,city:t.city,city_limit:t.city_limit,offset:r.offset,page:r.page}},{type:"多边形区域搜索",url:r.serverUrl+"/v3/place/polygon",parameters:{key:this.option.key,keywords:t.keywords,polygon:t.polygon,offset:r.offset,page:r.page}}];r.keywords=r.keywords.replace("","|"),ST(n[r.queryType].url+xT(n[r.queryType].parameters)).then((function(r){r.pois.forEach((t=>{let r=t.location.split(","),n=e.gcj02ToWgs84(parseFloat(r[1]),parseFloat(r[0]));t.lnglat=[n.lontitude,n.latitude]})),t.success(r)})).catch((function(e){t.error&&t.error(e)}))}queryUrl(){}}},Symbol.toStringTag,{value:"Module"}));function set(t,e){let r=t.length-e,n=0;do{for(let r=e;r>0;r--)t[n+e]+=t[n],n++;r-=e}while(r>0)}function aet(t,e,r){let n=0,i=t.length;const o=i/r;for(;i>e;){for(let r=e;r>0;--r)t[n+e]+=t[n],++n;i-=e}const s=t.slice();for(let a=0;a<o;++a)for(let e=0;e<r;++e)t[r*a+e]=s[(r-e-1)*o+a]}class uet{async decode(t,e){const r=await this.decodeBlock(e),n=t.Predictor||1;if(1!==n){const e=!t.StripOffsets;return function(t,e,r,n,i,o){if(!e||1===e)return t;for(let l=0;l<i.length;++l){if(i[l]%8!=0)throw new Error("When decoding with predictor, only multiple of 8 bits are supported.");if(i[l]!==i[0])throw new Error("When decoding with predictor, all samples must have the same size.")}const s=i[0]/8,a=2===o?1:i.length;for(let l=0;l<n&&!(l*a*r*s>=t.byteLength);++l){let n;if(2===e){switch(i[0]){case 8:n=new Uint8Array(t,l*a*r*s,a*r*s);break;case 16:n=new Uint16Array(t,l*a*r*s,a*r*s/2);break;case 32:n=new Uint32Array(t,l*a*r*s,a*r*s/4);break;default:throw new Error(`Predictor 2 not allowed with ${i[0]} bits per sample.`)}set(n,a)}else 3===e&&(n=new Uint8Array(t,l*a*r*s,a*r*s),aet(n,a,s))}return t}(r,n,e?t.TileWidth:t.ImageWidth,e?t.TileLength:t.RowsPerStrip||t.ImageLength,t.BitsPerSample,t.PlanarConfiguration)}return r}}const het=Object.freeze(Object.defineProperty({__proto__:null,default:class extends uet{decodeBlock(t){return t}}},Symbol.toStringTag,{value:"Module"}));function cet(t,e){for(let r=e.length-1;r>=0;r--)t.push(e[r]);return t}const Aet=Object.freeze(Object.defineProperty({__proto__:null,default:class extends uet{decodeBlock(t){return function(t){const e=new Uint16Array(4093),r=new Uint8Array(4093);for(let p=0;p<=257;p++)e[p]=4096,r[p]=p;let n=258,i=9,o=0;function s(){n=258,i=9}function a(t){const e=function(t,e,r){const n=e%8,i=Math.floor(e/8),o=8-n,s=e+r-8*(i+1);let a=8*(i+2)-(e+r);const l=8*(i+2)-e;if(a=Math.max(0,a),i>=t.length)return 257;let u=t[i]&2**(8-n)-1;u<<=r-o;let h=u;if(i+1<t.length){let e=t[i+1]>>>a;e<<=Math.max(0,r-l),h+=e}if(s>8&&i+2<t.length){const n=8*(i+3)-(e+r);h+=t[i+2]>>>n}return h}(t,o,i);return o+=i,e}function l(t,i){return r[n]=i,e[n]=t,n++,n-1}function u(t){const n=[];for(let i=t;4096!==i;i=e[i])n.push(r[i]);return n}const h=[];s();const c=new Uint8Array(t);let A,f=a(c);for(;257!==f;){if(256===f){for(s(),f=a(c);256===f;)f=a(c);if(257===f)break;if(f>256)throw new Error(`corrupted code at scanline ${f}`);cet(h,u(f)),A=f}else if(f<n){const t=u(f);cet(h,t),l(A,t[t.length-1]),A=f}else{const t=u(A);if(!t)throw new Error(`Bogus entry. Not in dictionary, ${A} / ${n}, position: ${o}`);cet(h,t),h.push(t[t.length-1]),l(A,t[t.length-1]),A=f}n+1>=2**i&&(12===i?A=void 0:i++),f=a(c)}return new Uint8Array(h)}(t).buffer}}},Symbol.toStringTag,{value:"Module"})),fet=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]);function pet(t,e){let r=0;const n=[];let i=16;for(;i>0&&!t[i-1];)--i;n.push({children:[],index:0});let o,s=n[0];for(let a=0;a<i;a++){for(let i=0;i<t[a];i++){for(s=n.pop(),s.children[s.index]=e[r];s.index>0;)s=n.pop();for(s.index++,n.push(s);n.length<=a;)n.push(o={children:[],index:0}),s.children[s.index]=o.children,s=o;r++}a+1<i&&(n.push(o={children:[],index:0}),s.children[s.index]=o.children,s=o)}return n[0].children}function det(t,e,r,n,i,o,s,a,l){const{mcusPerLine:u,progressive:h}=r,c=e;let A=e,f=0,p=0;function d(){if(p>0)return p--,f>>p&1;if(f=t[A++],255===f){const e=t[A++];if(e)throw new Error(`unexpected marker: ${(f<<8|e).toString(16)}`)}return p=7,f>>>7}function g(t){let e,r=t;for(;null!==(e=d());){if(r=r[e],"number"==typeof r)return r;if("object"!=typeof r)throw new Error("invalid huffman sequence")}return null}function y(t){let e=t,r=0;for(;e>0;){const t=d();if(null===t)return;r=r<<1|t,--e}return r}function m(t){const e=y(t);return e>=1<<t-1?e:e+(-1<<t)+1}let v,_=0,w=0;function b(t,e,r,n,i){const o=r%u,s=(r/u|0)*t.v+n,a=o*t.h+i;e(t,t.blocks[s][a])}function x(t,e,r){const n=r/t.blocksPerLine|0,i=r%t.blocksPerLine;e(t,t.blocks[n][i])}const C=n.length;let S,E,B,I,P,F;F=h?0===o?0===a?function(t,e){const r=g(t.huffmanTableDC),n=0===r?0:m(r)<<l;t.pred+=n,e[0]=t.pred}:function(t,e){e[0]|=d()<<l}:0===a?function(t,e){if(_>0)return void _--;let r=o;const n=s;for(;r<=n;){const n=g(t.huffmanTableAC),i=15&n,o=n>>4;if(0===i){if(o<15){_=y(o)+(1<<o)-1;break}r+=16}else r+=o,e[fet[r]]=m(i)*(1<<l),r++}}:function(t,e){let r=o;const n=s;let i=0;for(;r<=n;){const n=fet[r],o=e[n]<0?-1:1;switch(w){case 0:{const e=g(t.huffmanTableAC),r=15&e;if(i=e>>4,0===r)i<15?(_=y(i)+(1<<i),w=4):(i=16,w=1);else{if(1!==r)throw new Error("invalid ACn encoding");v=m(r),w=i?2:3}continue}case 1:case 2:e[n]?e[n]+=(d()<<l)*o:(i--,0===i&&(w=2===w?3:0));break;case 3:e[n]?e[n]+=(d()<<l)*o:(e[n]=v<<l,w=0);break;case 4:e[n]&&(e[n]+=(d()<<l)*o)}r++}4===w&&(_--,0===_&&(w=0))}:function(t,e){const r=g(t.huffmanTableDC),n=0===r?0:m(r);t.pred+=n,e[0]=t.pred;let i=1;for(;i<64;){const r=g(t.huffmanTableAC),n=15&r,o=r>>4;if(0===n){if(o<15)break;i+=16}else i+=o,e[fet[i]]=m(n),i++}};let T,M,L=0;M=1===C?n[0].blocksPerLine*n[0].blocksPerColumn:u*r.mcusPerColumn;const k=i||M;for(;L<M;){for(E=0;E<C;E++)n[E].pred=0;if(_=0,1===C)for(S=n[0],P=0;P<k;P++)x(S,F,L),L++;else for(P=0;P<k;P++){for(E=0;E<C;E++){S=n[E];const{h:t,v:e}=S;for(B=0;B<e;B++)for(I=0;I<t;I++)b(S,F,L,B,I)}if(L++,L===M)break}if(p=0,T=t[A]<<8|t[A+1],T<65280)throw new Error("marker was not found");if(!(T>=65488&&T<=65495))break;A+=2}return A-c}function get(t,e){const r=[],{blocksPerLine:n,blocksPerColumn:i}=e,o=n<<3,s=new Int32Array(64),a=new Uint8Array(64);function l(t,r,n){const i=e.quantizationTable;let o,s,a,l,u,h,c,A,f;const p=n;let d;for(d=0;d<64;d++)p[d]=t[d]*i[d];for(d=0;d<8;++d){const t=8*d;0!==p[1+t]||0!==p[2+t]||0!==p[3+t]||0!==p[4+t]||0!==p[5+t]||0!==p[6+t]||0!==p[7+t]?(o=5793*p[0+t]+128>>8,s=5793*p[4+t]+128>>8,a=p[2+t],l=p[6+t],u=2896*(p[1+t]-p[7+t])+128>>8,A=2896*(p[1+t]+p[7+t])+128>>8,h=p[3+t]<<4,c=p[5+t]<<4,f=o-s+1>>1,o=o+s+1>>1,s=f,f=3784*a+1567*l+128>>8,a=1567*a-3784*l+128>>8,l=f,f=u-c+1>>1,u=u+c+1>>1,c=f,f=A+h+1>>1,h=A-h+1>>1,A=f,f=o-l+1>>1,o=o+l+1>>1,l=f,f=s-a+1>>1,s=s+a+1>>1,a=f,f=2276*u+3406*A+2048>>12,u=3406*u-2276*A+2048>>12,A=f,f=799*h+4017*c+2048>>12,h=4017*h-799*c+2048>>12,c=f,p[0+t]=o+A,p[7+t]=o-A,p[1+t]=s+c,p[6+t]=s-c,p[2+t]=a+h,p[5+t]=a-h,p[3+t]=l+u,p[4+t]=l-u):(f=5793*p[0+t]+512>>10,p[0+t]=f,p[1+t]=f,p[2+t]=f,p[3+t]=f,p[4+t]=f,p[5+t]=f,p[6+t]=f,p[7+t]=f)}for(d=0;d<8;++d){const t=d;0!==p[8+t]||0!==p[16+t]||0!==p[24+t]||0!==p[32+t]||0!==p[40+t]||0!==p[48+t]||0!==p[56+t]?(o=5793*p[0+t]+2048>>12,s=5793*p[32+t]+2048>>12,a=p[16+t],l=p[48+t],u=2896*(p[8+t]-p[56+t])+2048>>12,A=2896*(p[8+t]+p[56+t])+2048>>12,h=p[24+t],c=p[40+t],f=o-s+1>>1,o=o+s+1>>1,s=f,f=3784*a+1567*l+2048>>12,a=1567*a-3784*l+2048>>12,l=f,f=u-c+1>>1,u=u+c+1>>1,c=f,f=A+h+1>>1,h=A-h+1>>1,A=f,f=o-l+1>>1,o=o+l+1>>1,l=f,f=s-a+1>>1,s=s+a+1>>1,a=f,f=2276*u+3406*A+2048>>12,u=3406*u-2276*A+2048>>12,A=f,f=799*h+4017*c+2048>>12,h=4017*h-799*c+2048>>12,c=f,p[0+t]=o+A,p[56+t]=o-A,p[8+t]=s+c,p[48+t]=s-c,p[16+t]=a+h,p[40+t]=a-h,p[24+t]=l+u,p[32+t]=l-u):(f=5793*n[d+0]+8192>>14,p[0+t]=f,p[8+t]=f,p[16+t]=f,p[24+t]=f,p[32+t]=f,p[40+t]=f,p[48+t]=f,p[56+t]=f)}for(d=0;d<64;++d){const t=128+(p[d]+8>>4);r[d]=t<0?0:t>255?255:t}}for(let u=0;u<i;u++){const t=u<<3;for(let e=0;e<8;e++)r.push(new Uint8Array(o));for(let i=0;i<n;i++){l(e.blocks[u][i],a,s);let n=0;const o=i<<3;for(let e=0;e<8;e++){const i=r[t+e];for(let t=0;t<8;t++)i[o+t]=a[n++]}}}return r}class yet{constructor(){this.jfif=null,this.adobe=null,this.quantizationTables=[],this.huffmanTablesAC=[],this.huffmanTablesDC=[],this.resetFrames()}resetFrames(){this.frames=[]}parse(t){let e=0;function r(){const r=t[e]<<8|t[e+1];return e+=2,r}function n(){const n=r(),i=t.subarray(e,e+n-2);return e+=i.length,i}function i(t){let e,r,n=0,i=0;for(r in t.components)t.components.hasOwnProperty(r)&&(e=t.components[r],n<e.h&&(n=e.h),i<e.v&&(i=e.v));const o=Math.ceil(t.samplesPerLine/8/n),s=Math.ceil(t.scanLines/8/i);for(r in t.components)if(t.components.hasOwnProperty(r)){e=t.components[r];const a=Math.ceil(Math.ceil(t.samplesPerLine/8)*e.h/n),l=Math.ceil(Math.ceil(t.scanLines/8)*e.v/i),u=o*e.h,h=s*e.v,c=[];for(let t=0;t<h;t++){const t=[];for(let e=0;e<u;e++)t.push(new Int32Array(64));c.push(t)}e.blocksPerLine=a,e.blocksPerColumn=l,e.blocks=c}t.maxH=n,t.maxV=i,t.mcusPerLine=o,t.mcusPerColumn=s}let o=r();if(65496!==o)throw new Error("SOI not found");for(o=r();65497!==o;){switch(o){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:{const t=n();65504===o&&74===t[0]&&70===t[1]&&73===t[2]&&70===t[3]&&0===t[4]&&(this.jfif={version:{major:t[5],minor:t[6]},densityUnits:t[7],xDensity:t[8]<<8|t[9],yDensity:t[10]<<8|t[11],thumbWidth:t[12],thumbHeight:t[13],thumbData:t.subarray(14,14+3*t[12]*t[13])}),65518===o&&65===t[0]&&100===t[1]&&111===t[2]&&98===t[3]&&101===t[4]&&0===t[5]&&(this.adobe={version:t[6],flags0:t[7]<<8|t[8],flags1:t[9]<<8|t[10],transformCode:t[11]});break}case 65499:{const n=r()+e-2;for(;e<n;){const n=t[e++],i=new Int32Array(64);if(n>>4==0)for(let r=0;r<64;r++)i[fet[r]]=t[e++];else{if(n>>4!=1)throw new Error("DQT: invalid table spec");for(let t=0;t<64;t++)i[fet[t]]=r()}this.quantizationTables[15&n]=i}break}case 65472:case 65473:case 65474:{r();const n={extended:65473===o,progressive:65474===o,precision:t[e++],scanLines:r(),samplesPerLine:r(),components:{},componentsOrder:[]},s=t[e++];let a;for(let r=0;r<s;r++){a=t[e];const r=t[e+1]>>4,i=15&t[e+1],o=t[e+2];n.componentsOrder.push(a),n.components[a]={h:r,v:i,quantizationIdx:o},e+=3}i(n),this.frames.push(n);break}case 65476:{const n=r();for(let r=2;r<n;){const n=t[e++],i=new Uint8Array(16);let o=0;for(let r=0;r<16;r++,e++)i[r]=t[e],o+=i[r];const s=new Uint8Array(o);for(let r=0;r<o;r++,e++)s[r]=t[e];r+=17+o,n>>4==0?this.huffmanTablesDC[15&n]=pet(i,s):this.huffmanTablesAC[15&n]=pet(i,s)}break}case 65501:r(),this.resetInterval=r();break;case 65498:{r();const n=t[e++],i=[],o=this.frames[0];for(let r=0;r<n;r++){const r=o.components[t[e++]],n=t[e++];r.huffmanTableDC=this.huffmanTablesDC[n>>4],r.huffmanTableAC=this.huffmanTablesAC[15&n],i.push(r)}const s=t[e++],a=t[e++],l=t[e++],u=det(t,e,o,i,this.resetInterval,s,a,l>>4,15&l);e+=u;break}case 65535:255!==t[e]&&e--;break;default:if(255===t[e-3]&&t[e-2]>=192&&t[e-2]<=254){e-=3;break}throw new Error(`unknown JPEG marker ${o.toString(16)}`)}o=r()}}getResult(){const{frames:t}=this;if(0===this.frames.length)throw new Error("no frames were decoded");this.frames.length;for(let u=0;u<this.frames.length;u++){const t=this.frames[u].components;for(const e of Object.keys(t))t[e].quantizationTable=this.quantizationTables[t[e].quantizationIdx],delete t[e].quantizationIdx}const e=t[0],{components:r,componentsOrder:n}=e,i=[],o=e.samplesPerLine,s=e.scanLines;for(let u=0;u<n.length;u++){const t=r[n[u]];i.push({lines:get(0,t),scaleX:t.h/e.maxH,scaleY:t.v/e.maxV})}const a=new Uint8Array(o*s*i.length);let l=0;for(let u=0;u<s;++u)for(let t=0;t<o;++t)for(let e=0;e<i.length;++e){const r=i[e];a[l]=r.lines[0|u*r.scaleY][0|t*r.scaleX],++l}return a}}const met=Object.freeze(Object.defineProperty({__proto__:null,default:class extends uet{constructor(t){super(),this.reader=new yet,t.JPEGTables&&this.reader.parse(t.JPEGTables)}decodeBlock(t){return this.reader.resetFrames(),this.reader.parse(new Uint8Array(t)),this.reader.getResult().buffer}}},Symbol.toStringTag,{value:"Module"}));
321
+ */k4.URL=k4.URL||k4.webkitURL||function(t,e){return(e=document.createElement("a")).href=t,e};var N4=k4.Blob,R4=URL.createObjectURL,U4=URL.revokeObjectURL,D4=k4.Symbol&&k4.Symbol.toStringTag,Q4=!1,G4=!1,j4=!!k4.ArrayBuffer,H4=O4&&O4.prototype.append&&O4.prototype.getBlob;try{Q4=2===new Blob(["ä"]).size,G4=2===new Blob([new Uint8Array([1,2])]).size}catch(OR){}function z4(t){return t.map((function(t){if(t.buffer instanceof ArrayBuffer){var e=t.buffer;if(t.byteLength!==e.byteLength){var r=new Uint8Array(t.byteLength);r.set(new Uint8Array(e,t.byteOffset,t.byteLength)),e=r.buffer}return e}return t}))}function V4(t,e){e=e||{};var r=new O4;return z4(t).forEach((function(t){r.append(t)})),e.type?r.getBlob(e.type):r.getBlob()}function K4(t,e){return new N4(z4(t),e||{})}if(k4.Blob&&(V4.prototype=Blob.prototype,K4.prototype=Blob.prototype),D4)try{File.prototype[D4]="File",Blob.prototype[D4]="Blob",FileReader.prototype[D4]="FileReader"}catch(OR){}function q4(){var t=!!k4.ActiveXObject||"-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style,e=k4.XMLHttpRequest&&k4.XMLHttpRequest.prototype.send;t&&e&&(XMLHttpRequest.prototype.send=function(t){t instanceof Blob?(this.setRequestHeader("Content-Type",t.type),e.call(this,t)):e.call(this,t)});try{new File([],"")}catch(n){try{var r=new Function('class File extends Blob {constructor(chunks, name, opts) {opts = opts || {};super(chunks, opts || {});this.name = name;this.lastModifiedDate = opts.lastModified ? new Date(opts.lastModified) : new Date;this.lastModified = +this.lastModifiedDate;}};return new File([], ""), File')();k4.File=r}catch(i){r=function(t,e,r){var n=new Blob(t,r),i=r&&void 0!==r.lastModified?new Date(r.lastModified):new Date;return n.name=e,n.lastModifiedDate=i,n.lastModified=+i,n.toString=function(){return"[object File]"},D4&&(n[D4]="File"),n},k4.File=r}}}Q4?(q4(),k4.Blob=G4?k4.Blob:K4):H4?(q4(),k4.Blob=V4):function(){function t(t){for(var e=[],r=0;r<t.length;r++){var n=t.charCodeAt(r);n<128?e.push(n):n<2048?e.push(192|n>>6,128|63&n):n<55296||n>=57344?e.push(224|n>>12,128|n>>6&63,128|63&n):(r++,n=65536+((1023&n)<<10|1023&t.charCodeAt(r)),e.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return e}function e(t){var e,r,n,i,o,s;for(e="",n=t.length,r=0;r<n;)switch((i=t[r++])>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:e+=String.fromCharCode(i);break;case 12:case 13:o=t[r++],e+=String.fromCharCode((31&i)<<6|63&o);break;case 14:o=t[r++],s=t[r++],e+=String.fromCharCode((15&i)<<12|(63&o)<<6|(63&s)<<0)}return e}function r(t){for(var e=new Array(t.byteLength),r=new Uint8Array(t),n=e.length;n--;)e[n]=r[n];return e}function n(t){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r=[],n=0;n<t.length;n+=3){var i=t[n],o=n+1<t.length,s=o?t[n+1]:0,a=n+2<t.length,l=a?t[n+2]:0,u=i>>2,h=(3&i)<<4|s>>4,c=(15&s)<<2|l>>6,A=63&l;a||(A=64,o||(c=64)),r.push(e[u],e[h],e[c],e[A])}return r.join("")}var i=Object.create||function(t){function e(){}return e.prototype=t,new e};if(j4)var o=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(t){return t&&o.indexOf(Object.prototype.toString.call(t))>-1};function a(e,n){for(var i=0,o=(e=e||[]).length;i<o;i++){var l=e[i];l instanceof a?e[i]=l._buffer:"string"==typeof l?e[i]=t(l):j4&&(ArrayBuffer.prototype.isPrototypeOf(l)||s(l))?e[i]=r(l):j4&&(u=l)&&DataView.prototype.isPrototypeOf(u)?e[i]=r(l.buffer):e[i]=t(String(l))}var u;this._buffer=[].concat.apply([],e),this.size=this._buffer.length,this.type=n&&n.type||""}function l(t,e,r){r=r||{};var n=a.call(this,t,r)||this;return n.name=e,n.lastModifiedDate=r.lastModified?new Date(r.lastModified):new Date,n.lastModified=+n.lastModifiedDate,n}if(a.prototype.slice=function(t,e,r){return new a([this._buffer.slice(t||0,e||this._buffer.length)],{type:r})},a.prototype.toString=function(){return"[object Blob]"},l.prototype=i(a.prototype),l.prototype.constructor=l,Object.setPrototypeOf)Object.setPrototypeOf(l,a);else try{l.__proto__=a}catch(OR){}function u(){if(!(this instanceof u))throw new TypeError("Failed to construct 'FileReader': Please use the 'new' operator, this DOM object constructor cannot be called as a function.");var t=document.createDocumentFragment();this.addEventListener=t.addEventListener,this.dispatchEvent=function(e){var r=this["on"+e.type];"function"==typeof r&&r(e),t.dispatchEvent(e)},this.removeEventListener=t.removeEventListener}function h(t,e,r){if(!(e instanceof a))throw new TypeError("Failed to execute '"+r+"' on 'FileReader': parameter 1 is not of type 'Blob'.");t.result="",setTimeout((function(){this.readyState=u.LOADING,t.dispatchEvent(new Event("load")),t.dispatchEvent(new Event("loadend"))}))}l.prototype.toString=function(){return"[object File]"},u.EMPTY=0,u.LOADING=1,u.DONE=2,u.prototype.error=null,u.prototype.onabort=null,u.prototype.onerror=null,u.prototype.onload=null,u.prototype.onloadend=null,u.prototype.onloadstart=null,u.prototype.onprogress=null,u.prototype.readAsDataURL=function(t){h(this,t,"readAsDataURL"),this.result="data:"+t.type+";base64,"+n(t._buffer)},u.prototype.readAsText=function(t){h(this,t,"readAsText"),this.result=e(t._buffer)},u.prototype.readAsArrayBuffer=function(t){h(this,t,"readAsText"),this.result=t._buffer.slice()},u.prototype.abort=function(){},URL.createObjectURL=function(t){return t instanceof a?"data:"+t.type+";base64,"+n(t._buffer):R4.call(URL,t)},URL.revokeObjectURL=function(t){U4&&U4.call(URL,t)};var c=k4.XMLHttpRequest&&k4.XMLHttpRequest.prototype.send;c&&(XMLHttpRequest.prototype.send=function(t){t instanceof a?(this.setRequestHeader("Content-Type",t.type),c.call(this,e(t._buffer))):c.call(this,t)}),k4.FileReader=u,k4.File=l,k4.Blob=a}();var W4="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";void 0===k4.btoa&&(k4.btoa=function(t){var e,r,n,i,o,s=0,a=0,l="",u=[];if(!t)return t;do{e=(o=t.charCodeAt(s++)<<16|t.charCodeAt(s++)<<8|t.charCodeAt(s++))>>18&63,r=o>>12&63,n=o>>6&63,i=63&o,u[a++]=W4.charAt(e)+W4.charAt(r)+W4.charAt(n)+W4.charAt(i)}while(s<t.length);l=u.join("");var h=t.length%3;return(h?l.slice(0,h-3):l)+"===".slice(h||3)}),void 0===k4.atob&&(k4.atob=function(t){var e,r,n,i,o,s,a=0,l=0,u=[];if(!t)return t;t+="";do{e=(s=W4.indexOf(t.charAt(a++))<<18|W4.indexOf(t.charAt(a++))<<12|(i=W4.indexOf(t.charAt(a++)))<<6|(o=W4.indexOf(t.charAt(a++))))>>16&255,r=s>>8&255,n=255&s,u[l++]=64==i?String.fromCharCode(e):64==o?String.fromCharCode(e,r):String.fromCharCode(e,r,n)}while(a<t.length);return u.join("")});class X4 extends Ca{constructor(t){const r=t||{};let n=document.createElement("div");n.setAttribute("id","mouse-position"),n.innerHTML="",n.style.float="right",n.style.left=" 0px",n.style.right="0px",n.style.bottom="0px";var i=document.createElement("div");i.setAttribute("id","locationbar"),i.style.position="absolute",i.style.zIndex="991",i.style.padding=" 3px 10px",i.style.fontSize=" 13px",i.style.color="#e9e9e9",i.style.textShadow="2px 2px 2px #000",i.style.backgroundColor="rgba(0,0,0,.4)",i.style.minHeight="26px",i.style.left=" 0px",i.style.right="0px",i.style.bottom="0px",i.appendChild(n),super({element:i,target:r.target}),e(this,"_mouseposition"),this._mouseposition=n}show(){this.element.style.display="block"}hide(){this.element.style.display="none"}updateMousePosition(t){this._mouseposition.innerHTML=t}}class Y4 extends Ca{constructor(t,r,n){const i=t||{},o=new Image;o.src="image/basemaps/bingimage.png",o.className="mirage-mapswitch-image";const s=document.createElement("div");s.className="mirage-mapswitch-button-itemLabel",s.innerHTML="天地图影像";const a=document.createElement("div");a.className="mirage-mapswitch-button mirage-mapswitch-toolbar-button",a.appendChild(o),a.appendChild(s);const l=document.createElement("div");l.className="mirage-mapswitch-box";const u=document.createElement("div");u.className="mirage-mapswitch-baseLayerPicker-dropDown",u.style.maxHeight="300px",r.forEach((t=>{const e=new Image;e.src=t.icon,e.className="mirage-mapswitch-baseLayerPicker-itemIcon";const r=document.createElement("div");r.className="mirage-mapswitch-baseLayerPicker-itemLabel",r.innerHTML=t.name;const i=document.createElement("div");i.className="mirage-mapswitch-baseLayerPicker-item mirage-mapswitch-baseLayerPicker-selectedItem",i.appendChild(e),i.appendChild(r),i.addEventListener("click",(t=>{this._isshow=!1,u.className="mirage-mapswitch-baseLayerPicker-dropDown",o.src=t.currentTarget.children[0].src,s.innerHTML=t.currentTarget.innerText,n(t.currentTarget.innerText)}),!1),u.appendChild(i)})),l.appendChild(a),l.appendChild(u),super({element:l,target:i.target}),e(this,"mouseposition"),e(this,"_isshow"),this._isshow=!1,a.addEventListener("click",this.showSwitch.bind(this),!1)}showSwitch(t){this._isshow=!this._isshow;let e=document.getElementsByClassName("mirage-mapswitch-baseLayerPicker-dropDown");this._isshow?e[0].className="mirage-mapswitch-baseLayerPicker-dropDown mirage-mapswitch-baseLayerPicker-dropDown-visible":e[0].className="mirage-mapswitch-baseLayerPicker-dropDown"}show(){this.element.style.display="block"}hide(){this.element.style.display="none"}}var Z4=function(t){t=t||{};var e=document.createElement("button"),r=document.createElement("div");r.className=(t.className||"ol-swipe")+" ol-unselectable ol-control",r.appendChild(e),r.addEventListener("mousedown",this.move.bind(this)),r.addEventListener("touchstart",this.move.bind(this)),Ca.call(this,{element:r}),this.precomposeRight_=this.precomposeRight.bind(this),this.precomposeLeft_=this.precomposeLeft.bind(this),this.postcompose_=this.postcompose.bind(this),this.layers=[],t.layers&&this.addLayer(t.layers,!1),t.rightLayers&&this.addLayer(t.rightLayers,!0),this.on("propertychange",function(t){if(this.getMap())try{this.getMap().renderSync()}catch(e){}"horizontal"===this.get("orientation")?(this.element.style.top=100*this.get("position")+"%",this.element.style.left=""):("vertical"!==this.get("orientation")&&this.set("orientation","vertical"),this.element.style.left=100*this.get("position")+"%",this.element.style.top=""),"orientation"===t.key&&(this.element.classList.remove("horizontal","vertical"),this.element.classList.add(this.get("orientation"))),this.isMoving||this.layers.forEach((function(t){t.layer.getImageRatio&&t.layer.changed()}))}.bind(this)),this.set("position",t.position||.5),this.set("orientation",t.orientation||"vertical")};vg(Z4,Ca),Z4.prototype.setMap=function(t){var e,r;if(this.getMap()){for(e=0;e<this.layers.length;e++)(r=this.layers[e]).right?r.layer.un(["precompose","prerender"],this.precomposeRight_):r.layer.un(["precompose","prerender"],this.precomposeLeft_),r.layer.un(["postcompose","postrender"],this.postcompose_);try{this.getMap().renderSync()}catch(OR){}}if(Ca.prototype.setMap.call(this,t),t){for(this._listener=[],e=0;e<this.layers.length;e++)(r=this.layers[e]).right?r.layer.on(["precompose","prerender"],this.precomposeRight_):r.layer.on(["precompose","prerender"],this.precomposeLeft_),r.layer.on(["postcompose","postrender"],this.postcompose_);try{t.renderSync()}catch(OR){}}},Z4.prototype.isLayer_=function(t){for(var e=0;e<this.layers.length;e++)if(this.layers[e].layer===t)return e;return-1},Z4.prototype.addLayer=function(t,e){t instanceof Array||(t=[t]);for(var r=0;r<t.length;r++){var n=t[r];if(this.isLayer_(n)<0&&(this.layers.push({layer:n,right:e}),this.getMap())){e?n.on(["precompose","prerender"],this.precomposeRight_):n.on(["precompose","prerender"],this.precomposeLeft_),n.on(["postcompose","postrender"],this.postcompose_);try{this.getMap().renderSync()}catch(OR){}}}},Z4.prototype.removeLayers=function(){var t=[];this.layers.forEach((function(e){t.push(e.layer)})),this.removeLayer(t)},Z4.prototype.removeLayer=function(t){t instanceof Array||(t=[t]);for(var e=0;e<t.length;e++){var r=this.isLayer_(t[e]);r>=0&&this.getMap()&&(this.layers[r].right?t[e].un(["precompose","prerender"],this.precomposeRight_):t[e].un(["precompose","prerender"],this.precomposeLeft_),t[e].un(["postcompose","postrender"],this.postcompose_),this.layers.splice(r,1))}if(this.getMap())try{this.getMap().renderSync()}catch(OR){}},Z4.prototype.getRectangle=function(){var t;return"vertical"===this.get("orientation")?[0,0,(t=this.getMap().getSize())[0]*this.get("position"),t[1]]:[0,0,(t=this.getMap().getSize())[0],t[1]*this.get("position")]},Z4.prototype.move=function(t){var e,r=this;switch(this._movefn||(this._movefn=this.move.bind(this)),t.type){case"touchcancel":case"touchend":case"mouseup":r.isMoving=!1,["mouseup","mousemove","touchend","touchcancel","touchmove"].forEach((function(t){document.removeEventListener(t,r._movefn)})),this.layers.forEach((function(t){t.layer.getImageRatio&&t.layer.changed()}));break;case"mousedown":case"touchstart":r.isMoving=!0,["mouseup","mousemove","touchend","touchcancel","touchmove"].forEach((function(t){document.addEventListener(t,r._movefn)}));case"mousemove":case"touchmove":if(r.isMoving)if("vertical"===r.get("orientation")){var n=t.pageX||t.touches&&t.touches.length&&t.touches[0].pageX||t.changedTouches&&t.changedTouches.length&&t.changedTouches[0].pageX;if(!n)break;n-=r.getMap().getTargetElement().getBoundingClientRect().left+window.pageXOffset-document.documentElement.clientLeft;var i=(e=r.getMap().getSize()[0])-Math.min(Math.max(0,e-n),e);e=i/e,r.set("position",e),r.dispatchEvent({type:"moving",size:[i,r.getMap().getSize()[1]],position:[e,0]})}else{var o=t.pageY||t.touches&&t.touches.length&&t.touches[0].pageY||t.changedTouches&&t.changedTouches.length&&t.changedTouches[0].pageY;if(!o)break;o-=r.getMap().getTargetElement().getBoundingClientRect().top+window.pageYOffset-document.documentElement.clientTop;var s=(e=r.getMap().getSize()[1])-Math.min(Math.max(0,e-o),e);e=s/e,r.set("position",e),r.dispatchEvent({type:"moving",size:[r.getMap().getSize()[0],s],position:[0,e]})}}},Z4.prototype._transformPt=function(t,e){var r=t.inversePixelTransform,n=e[0],i=e[1];return e[0]=r[0]*n+r[2]*i+r[4],e[1]=r[1]*n+r[3]*i+r[5],e},Z4.prototype._drawRect=function(t,e){var r=t.inversePixelTransform;if(r){var n=[[e[0][0],e[0][1]],[e[0][0],e[1][1]],[e[1][0],e[1][1]],[e[1][0],e[0][1]],[e[0][0],e[0][1]]];if(t.context.save(),t.target.getImageRatio){var i=-Math.atan2(t.frameState.pixelToCoordinateTransform[1],t.frameState.pixelToCoordinateTransform[0]);t.context.translate(t.frameState.size[0]/2,t.frameState.size[1]/2),t.context.rotate(i),t.context.translate(-t.frameState.size[0]/2,-t.frameState.size[1]/2)}n.forEach((function(e,n){e=[e[0]*r[0]-e[1]*r[1]+r[4],-e[0]*r[2]+e[1]*r[3]+r[5]],n?t.context.lineTo(e[0],e[1]):t.context.moveTo(e[0],e[1])})),t.context.restore()}else{var o=t.frameState.pixelRatio;t.context.rect(e[0][0]*o,e[0][1]*o,e[1][0]*o,e[1][1]*o)}},Z4.prototype.precomposeLeft=function(t){var e=t.context;if(e instanceof WebGLRenderingContext){if("prerender"===t.type){e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.enable(e.SCISSOR_TEST);var r,n,i=this.getMap().getSize(),o=this._transformPt(t,[0,i[1]]),s=this._transformPt(t,[i[0],0]),a=s[0]-o[0],l=s[1]-o[1];"vertical"===this.get("orientation")?(r=Math.round(a*this.get("position")),n=l):(r=a,n=Math.round(l*this.get("position")),o[1]+=l-n),e.scissor(o[0],o[1],r,n)}}else{var u=t.frameState.size;e.save(),e.beginPath();var h=[[0,0],[u[0],u[1]]];"vertical"===this.get("orientation")?h[1]=[.5*u[0]+this.getMap().getSize()[0]*(this.get("position")-.5),u[1]]:h[1]=[u[0],.5*u[1]+this.getMap().getSize()[1]*(this.get("position")-.5)],this._drawRect(t,h),e.clip()}},Z4.prototype.precomposeRight=function(t){var e=t.context;if(e instanceof WebGLRenderingContext){if("prerender"===t.type){e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.enable(e.SCISSOR_TEST);var r,n,i=this.getMap().getSize(),o=this._transformPt(t,[0,i[1]]),s=this._transformPt(t,[i[0],0]),a=s[0]-o[0],l=s[1]-o[1];"vertical"===this.get("orientation")?(n=l,r=Math.round(a*(1-this.get("position"))),o[0]+=a-r):(r=a,n=Math.round(l*(1-this.get("position")))),e.scissor(o[0],o[1],r,n)}}else{var u=t.frameState.size;e.save(),e.beginPath();var h=[[0,0],[u[0],u[1]]];"vertical"===this.get("orientation")?h[0]=[.5*u[0]+this.getMap().getSize()[0]*(this.get("position")-.5),0]:h[0]=[0,.5*u[1]+this.getMap().getSize()[1]*(this.get("position")-.5)],this._drawRect(t,h),e.clip()}},Z4.prototype.postcompose=function(t){if(t.context instanceof WebGLRenderingContext){if("postrender"===t.type){var e=t.context;e.disable(e.SCISSOR_TEST)}}else t.target.getClassName&&"ol-layer"!==t.target.getClassName()&&t.target.get("declutter")?setTimeout((function(){t.context.restore()}),0):t.context.restore()};class J4{constructor(){e(this,"events",new Map)}on(t,e,r){return this.events.has(t)||this.events.set(t,[]),(this.events.get(t)||[]).push({handler:e,once:r}),()=>{this.off(t,e)}}once(t,e){return this.on(t,e,!0)}fire(t,...e){let r=0;for(;r<(this.events.get(t)||[]).length;){const n=this.events.get(t)||[],{handler:i,once:o}=n[r];o&&n.splice(r--,1),r++,i(...e)}}off(t,e){t&&(e?this.events.set(t,(this.events.get(t)||[]).filter((t=>t.handler!==e))):this.events.set(t,[]))}}class $4 extends J4{constructor(){super(),e(this,"_swipe"),this._swipe=new Z4}show(t,e,r="vertical"){this.fire("show",{swipe:this._swipe,leftlayerID:t,rightlayerID:e}),this._swipe.set("orientation",r)}hide(){this.fire("hide",this._swipe)}}var t6=function(t){t||(t={});var e=this;this.selection_=new Q,this.handles_=new Q,this.overlayLayer_=new ls({source:new ws({features:this.handles_,useSpatialIndex:!1,wrapX:!1}),name:"Transform overlay",displayInLayerSwitcher:!1,style:function(t){return e.style[(t.get("handle")||"default")+(t.get("constraint")||"")+(t.get("option")||"")]}}),Za.call(this,{handleDownEvent:this.handleDownEvent_,handleDragEvent:this.handleDragEvent_,handleMoveEvent:this.handleMoveEvent_,handleUpEvent:this.handleUpEvent_}),this.features_=t.features,"function"==typeof t.filter&&(this._filter=t.filter),this.layers_=t.layers?t.layers instanceof Array?t.layers:[t.layers]:null,this._handleEvent=t.condition||function(){return!0},this.addFn_=t.addCondition||function(){return!1},this.setPointRadius(t.pointRadius),this.set("translateFeature",!1!==t.translateFeature),this.set("translate",!1!==t.translate),this.set("translateBBox",!0===t.translateBBox),this.set("stretch",!1!==t.stretch),this.set("scale",!1!==t.scale),this.set("rotate",!1!==t.rotate),this.set("keepAspectRatio",t.keepAspectRatio||function(t){return t.originalEvent.shiftKey}),this.set("modifyCenter",t.modifyCenter||function(t){return t.originalEvent.metaKey||t.originalEvent.ctrlKey}),this.set("noFlip",t.noFlip||!1),this.set("selection",!1!==t.selection),this.set("hitTolerance",t.hitTolerance||0),this.set("enableRotatedTransform",t.enableRotatedTransform||!1),this.set("keepRectangle",t.keepRectangle||!1),this.on("propertychange",(function(){this.drawSketch_()})),this.setDefaultStyle()};function e6(t,e){var r=(t[0]*e[0]+t[1]*e[1])/(e[0]*e[0]+e[1]*e[1]);return[e[0]*r,e[1]*r]}function r6(t,e){return[e[0]-t[0],e[1]-t[1]]}function n6(t,e){return[t[0]+e[0],t[1]+e[1]]}vg(t6,Za),t6.prototype.Cursors={default:"auto",select:"pointer",translate:"move",rotate:"move",rotate0:"move",scale:"nesw-resize",scale1:"nwse-resize",scale2:"nesw-resize",scale3:"nwse-resize",scalev:"ew-resize",scaleh1:"ns-resize",scalev2:"ew-resize",scaleh3:"ns-resize"},t6.prototype.setMap=function(t){var e=this.getMap();if(e){var r=e.getTargetElement();e.removeLayer(this.overlayLayer_),this.previousCursor_&&r&&(r.style.cursor=this.previousCursor_),this.previousCursor_=void 0}Za.prototype.setMap.call(this,t),this.overlayLayer_.setMap(t),null===t&&this.select(null),null!==t&&(this.isTouch=/touch/.test(t.getViewport().className),this.setDefaultStyle())},t6.prototype.setActive=function(t){this.select(null),this.overlayLayer_.setVisible(t),Za.prototype.setActive.call(this,t)},t6.prototype.setDefaultStyle=function(t){var e=(t=t||{}).pointStroke||new vn({color:[255,0,0,1],width:1}),r=t.stroke||new vn({color:[255,0,0,1],width:1,lineDash:[4,4]}),n=t.fill||new fn({color:[255,0,0,.01]}),i=t.pointFill||new fn({color:[255,255,255,.8]}),o=new ii({fill:i,stroke:e,radius:this.isTouch?12:6,displacement:this.isTouch?[24,-24]:[12,-12],points:15});o.setDisplacement||(o.getAnchor()[0]=this.isTouch?-10:-5);var s=new ii({fill:i,stroke:e,radius:this.isTouch?16:8,points:4,angle:Math.PI/4}),a=new ii({fill:i,stroke:e,radius:this.isTouch?12:6,points:4,angle:Math.PI/4});function l(t,e,r){return[new Ai({image:t,stroke:e,fill:r})]}this.style={default:l(s,r,n),translate:l(s,e,i),rotate:l(o,e,i),rotate0:l(s,e,i),scale:l(s,e,i),scale1:l(s,e,i),scale2:l(s,e,i),scale3:l(s,e,i),scalev:l(a,e,i),scaleh1:l(a,e,i),scalev2:l(a,e,i),scaleh3:l(a,e,i)},this.drawSketch_()},t6.prototype.setStyle=function(t,e){if(e){this.style[t]=e instanceof Array?e:[e];for(var r=0;r<this.style[t].length;r++){var n=this.style[t][r].getImage();n&&("rotate"==t&&(n.getAnchor()[0]=-5),this.isTouch&&n.setScale(1.8));var i=this.style[t][r].getText();i&&("rotate"==t&&i.setOffsetX(this.isTouch?14:7),this.isTouch&&i.setScale(1.8))}this.drawSketch_()}},t6.prototype.getFeatureAtPixel_=function(t){var e=this;return this.getMap().forEachFeatureAtPixel(t,(function(t,r){var n=!1;if(!r){if(t===e.bbox_)return!!e.get("translateBBox")&&{feature:t,handle:"translate",constraint:"",option:""};if(e.handles_.forEach((function(e){e===t&&(n=!0)})),n)return{feature:t,handle:t.get("handle"),constraint:t.get("constraint"),option:t.get("option")}}if(!e.get("selection"))return e.selection_.getArray().some((function(e){return t===e}))?{feature:t}:null;if(e._filter)return e._filter(t,r)?{feature:t}:null;if(e.layers_){for(var i=0;i<e.layers_.length;i++)if(e.layers_[i]===r)return{feature:t};return null}return e.features_?(e.features_.forEach((function(e){e===t&&(n=!0)})),n?{feature:t}:null):{feature:t}}),{hitTolerance:this.get("hitTolerance")})||{}},t6.prototype.getGeometryRotateToZero_=function(t,e){var r=t.getGeometry(),n=this.getMap().getView().getRotation();if(0===n||!this.get("enableRotatedTransform"))return e?r.clone():r;var i=r.clone();return i.rotate(-1*n,this.getMap().getView().getCenter()),i},t6.prototype._isRectangle=function(t){return!(!this.get("keepRectangle")||"Polygon"!==t.getType())&&5===t.getCoordinates()[0].length},t6.prototype.drawSketch_=function(t){var e,r,n,i=this.selection_.item(0)&&this._isRectangle(this.selection_.item(0).getGeometry());if(this.overlayLayer_.getSource().clear(),this.selection_.getLength()){var o,s=this.getMap().getView().getRotation(),a=this.getGeometryRotateToZero_(this.selection_.item(0)).getExtent();i&&(o=this.getGeometryRotateToZero_(this.selection_.item(0)).getCoordinates()[0].slice(0,4)).unshift(o[3]),a=mt(a,0),this.selection_.forEach(function(t){var e=this.getGeometryRotateToZero_(t).getExtent();Ft(a,e)}.bind(this));var l=1===this.selection_.getLength()?this._pointRadius(this.selection_.item(0)):0;if(!l||l instanceof Array||(l=[l,l]),!0===t)this.ispt_||(this.overlayLayer_.getSource().addFeature(new z({geometry:new Vr(this.center_),handle:"rotate0"})),n=cn(a),this.get("enableRotatedTransform")&&0!==s&&n.rotate(s,this.getMap().getView().getCenter()),r=this.bbox_=new z(n),this.overlayLayer_.getSource().addFeature(r));else{if(this.ispt_){var u=this.getMap().getPixelFromCoordinate([a[0],a[1]]);if(u){var h=l&&l[0]||10,c=l&&l[1]||10;a=yt([this.getMap().getCoordinateFromPixel([u[0]-h,u[1]-c]),this.getMap().getCoordinateFromPixel([u[0]+h,u[1]+c])])}}n=i?new hn([o]):cn(a),this.get("enableRotatedTransform")&&0!==s&&n.rotate(s,this.getMap().getView().getCenter()),r=this.bbox_=new z(n);var A=[],f=n.getCoordinates()[0];if(!this.ispt_||l){if(A.push(r),!this.iscircle_&&!this.ispt_&&this.get("stretch")&&this.get("scale"))for(e=0;e<f.length-1;e++)r=new z({geometry:new Vr([(f[e][0]+f[e+1][0])/2,(f[e][1]+f[e+1][1])/2]),handle:"scale",constraint:e%2?"h":"v",option:e}),A.push(r);if(this.get("scale"))for(e=0;e<f.length-1;e++)r=new z({geometry:new Vr(f[e]),handle:"scale",option:e}),A.push(r);this.get("translate")&&!this.get("translateFeature")&&(r=new z({geometry:new Vr([(f[0][0]+f[2][0])/2,(f[0][1]+f[2][1])/2]),handle:"translate"}),A.push(r))}!this.iscircle_&&this.get("rotate")&&(r=new z({geometry:new Vr(f[3]),handle:"rotate"}),A.push(r)),this.overlayLayer_.getSource().addFeatures(A)}}},t6.prototype.select=function(t,e){if(!t)return this.selection_.clear(),void this.drawSketch_();if(t.getGeometry&&t.getGeometry()){if(e)this.selection_.push(t);else{var r=this.selection_.getArray().indexOf(t);this.selection_.removeAt(r)}this.ispt_=1===this.selection_.getLength()&&"Point"==this.selection_.item(0).getGeometry().getType(),this.iscircle_=1===this.selection_.getLength()&&"Circle"==this.selection_.item(0).getGeometry().getType(),this.drawSketch_(),this.watchFeatures_(),this.dispatchEvent({type:"select",feature:t,features:this.selection_})}},t6.prototype.setSelection=function(t){this.selection_.clear(),t.forEach(function(t){this.selection_.push(t)}.bind(this)),this.ispt_=1===this.selection_.getLength()&&"Point"==this.selection_.item(0).getGeometry().getType(),this.iscircle_=1===this.selection_.getLength()&&"Circle"==this.selection_.item(0).getGeometry().getType(),this.drawSketch_(),this.watchFeatures_(),this.dispatchEvent({type:"select",features:this.selection_})},t6.prototype.watchFeatures_=function(){this._featureListeners&&this._featureListeners.forEach((function(t){M(t)})),this._featureListeners=[],this.selection_.forEach(function(t){this._featureListeners.push(t.on("change",function(){this.isUpdating_||this.drawSketch_()}.bind(this)))}.bind(this))},t6.prototype.handleDownEvent_=function(t){if(this._handleEvent(t,this.selection_)){var e=this.getFeatureAtPixel_(t.pixel),r=e.feature;if(this.selection_.getLength()&&this.selection_.getArray().indexOf(r)>=0&&(this.ispt_&&this.get("translate")||this.get("translateFeature"))&&(e.handle="translate"),e.handle){this.mode_=e.handle,this.opt_=e.option,this.constraint_=e.constraint;var n=this.getMap().getView().getRotation();this.coordinate_=t.coordinate,this.pixel_=t.pixel,this.geoms_=[],this.rotatedGeoms_=[];for(var i,o=[1/0,1/0,-1/0,-1/0],s=[1/0,1/0,-1/0,-1/0],a=0;i=this.selection_.item(a);a++)if(this.geoms_.push(i.getGeometry().clone()),o=Ft(o,i.getGeometry().getExtent()),this.get("enableRotatedTransform")&&0!==n){var l=this.getGeometryRotateToZero_(i,!0);this.rotatedGeoms_.push(l),s=Ft(s,l.getExtent())}if(this.extent_=cn(o).getCoordinates()[0],this.get("enableRotatedTransform")&&0!==n&&(this.rotatedExtent_=cn(s).getCoordinates()[0]),"rotate"===this.mode_){this.center_=this.getCenter()||Ut(o);var u=t.map.getTargetElement();u.style.cursor=this.Cursors.rotate0,this.previousCursor_=u.style.cursor}else this.center_=Ut(o);return this.angle_=Math.atan2(this.center_[1]-t.coordinate[1],this.center_[0]-t.coordinate[0]),this.dispatchEvent({type:this.mode_+"start",feature:this.selection_.item(0),features:this.selection_,pixel:t.pixel,coordinate:t.coordinate}),!0}if(this.get("selection")){if(r){this.addFn_(t)||this.selection_.clear();var h=this.selection_.getArray().indexOf(r);h<0?this.selection_.push(r):this.selection_.removeAt(h)}else this.selection_.clear();return this.ispt_=1===this.selection_.getLength()&&"Point"==this.selection_.item(0).getGeometry().getType(),this.iscircle_=1===this.selection_.getLength()&&"Circle"==this.selection_.item(0).getGeometry().getType(),this.drawSketch_(),this.watchFeatures_(),this.dispatchEvent({type:"select",feature:r,features:this.selection_,pixel:t.pixel,coordinate:t.coordinate}),!1}}},t6.prototype.getFeatures=function(){return this.selection_},t6.prototype.getCenter=function(){return this.get("center")},t6.prototype.setCenter=function(t){return this.set("center",t)},t6.prototype.handleDragEvent_=function(t){if(this._handleEvent(t,this.features_)){var e,r,n,i,o=this.getMap().getView().getRotation(),s=[this.coordinate_[0],this.coordinate_[1]],a=[t.coordinate[0],t.coordinate[1]];switch(this.isUpdating_=!0,this.mode_){case"rotate":var l=Math.atan2(this.center_[1]-a[1],this.center_[0]-a[0]);if(!this.ispt)for(e=0;n=this.selection_.item(e);e++)(i=this.geoms_[e].clone()).rotate(l-this.angle_,this.center_),"Circle"==i.getType()&&i.setCenterAndRadius(i.getCenter(),i.getRadius()),n.setGeometry(i);this.drawSketch_(!0),this.dispatchEvent({type:"rotating",feature:this.selection_.item(0),features:this.selection_,angle:l-this.angle_,pixel:t.pixel,coordinate:t.coordinate});break;case"translate":var u=a[0]-s[0],h=a[1]-s[1];for(e=0;n=this.selection_.item(e);e++)n.getGeometry().translate(u,h);this.handles_.forEach((function(t){t.getGeometry().translate(u,h)})),this.coordinate_=t.coordinate,this.dispatchEvent({type:"translating",feature:this.selection_.item(0),features:this.selection_,delta:[u,h],pixel:t.pixel,coordinate:t.coordinate});break;case"scale":var c=this.center_;if(this.get("modifyCenter")(t)){var A=this.extent_;this.get("enableRotatedTransform")&&0!==o&&(A=this.rotatedExtent_),c=A[(Number(this.opt_)+2)%4]}var f=1==this.geoms_.length&&this._isRectangle(this.geoms_[0]),p=this.constraint_,d=this.opt_,g=this.coordinate_,y=t.coordinate;if(this.get("enableRotatedTransform")&&0!==o){var m=new Vr(this.coordinate_);m.rotate(-1*o,c),g=m.getCoordinates();var v=new Vr(t.coordinate);v.rotate(-1*o,c),y=v.getCoordinates()}var _=(y[0]-c[0])/(g[0]-c[0]),w=(y[1]-c[1])/(g[1]-c[1]),b=[y[0]-g[0],y[1]-g[1]];if(this.get("enableRotatedTransform")&&0!==o){var x=new Vr(c);x.rotate(-1*o,this.getMap().getView().getCenter()),c=x.getCoordinates()}for(this.get("noFlip")&&(_<0&&(_=-_),w<0&&(w=-w)),this.constraint_?"h"==this.constraint_?_=1:w=1:this.get("keepAspectRatio")(t)&&(_=w=Math.min(_,w)),e=0;n=this.selection_.item(e);e++)(i=0!==o&&this.get("enableRotatedTransform")?this.rotatedGeoms_[e].clone():this.geoms_[e].clone()).applyTransform((function(t,e,n){if(n<2)return e;if(f){var o=[[6],[0,8],[2],[4]],s=[t[0],t[1]],a=[t[2],t[3]],l=[t[4],t[5]],u=[t[6],t[7]],h=[t[8],t[9]];if(p){var A=d%2==0?r6(s,a):r6(u,s),g=e6(b,A),m=[...o[d],...o[d+1<o.length?d+1:0]];for(r=0;r<t.length;r+=n)e[r]=m.includes(r)?t[r]+g[0]:t[r],e[r+1]=m.includes(r)?t[r+1]+g[1]:t[r+1]}else{var v,x;switch(d){case 0:v=e6(b=r6(u,y),r6(l,u)),x=e6(b,r6(s,u)),[e[0],e[1]]=n6(s,v),[e[4],e[5]]=n6(l,x),[e[6],e[7]]=n6(u,b),[e[8],e[9]]=n6(h,v);break;case 1:v=e6(b=r6(s,y),r6(u,s)),x=e6(b,r6(a,s)),[e[0],e[1]]=n6(s,b),[e[2],e[3]]=n6(a,v),[e[6],e[7]]=n6(u,x),[e[8],e[9]]=n6(h,b);break;case 2:v=e6(b=r6(a,y),r6(s,a)),x=e6(b,r6(l,a)),[e[0],e[1]]=n6(s,x),[e[2],e[3]]=n6(a,b),[e[4],e[5]]=n6(l,v),[e[8],e[9]]=n6(h,x);break;case 3:v=e6(b=r6(l,y),r6(a,l)),x=e6(b,r6(u,l)),[e[2],e[3]]=n6(a,x),[e[4],e[5]]=n6(l,b),[e[6],e[7]]=n6(u,v)}}}else for(r=0;r<t.length;r+=n)1!=_&&(e[r]=c[0]+(t[r]-c[0])*_),1!=w&&(e[r+1]=c[1]+(t[r+1]-c[1])*w);return"Circle"==i.getType()&&i.setCenterAndRadius(i.getCenter(),i.getRadius()),e})),this.get("enableRotatedTransform")&&0!==o&&i.rotate(o,this.getMap().getView().getCenter()),n.setGeometry(i);this.drawSketch_(),this.dispatchEvent({type:"scaling",feature:this.selection_.item(0),features:this.selection_,scale:[_,w],pixel:t.pixel,coordinate:t.coordinate})}this.isUpdating_=!1}},t6.prototype.handleMoveEvent_=function(t){if(this._handleEvent(t,this.features_)&&!this.mode_){var e=this.getFeatureAtPixel_(t.pixel),r=t.map.getTargetElement();if(e.feature){var n=e.handle?this.Cursors[(e.handle||"default")+(e.constraint||"")+(e.option||"")]:this.Cursors.select;void 0===this.previousCursor_&&(this.previousCursor_=r.style.cursor),r.style.cursor=n}else void 0!==this.previousCursor_&&(r.style.cursor=this.previousCursor_),this.previousCursor_=void 0}},t6.prototype.handleUpEvent_=function(t){return"rotate"===this.mode_&&(t.map.getTargetElement().style.cursor=this.Cursors.default,this.previousCursor_=void 0),this.dispatchEvent({type:this.mode_+"end",feature:this.selection_.item(0),features:this.selection_,oldgeom:this.geoms_[0],oldgeoms:this.geoms_}),this.drawSketch_(),this.mode_=null,!1},t6.prototype.getFeatures=function(){return this.selection_},t6.prototype.setPointRadius=function(t){this._pointRadius="function"==typeof t?t:function(){return t}};class i6{constructor(t){e(this,"transformInteraction"),this.transformInteraction=new t6({enableRotatedTransform:!1,hitTolerance:2,translateFeature:!0,scale:!0,rotate:!0,keepAspectRatio:!1,keepRectangle:!1,translate:!0,stretch:!0,pointRadius:function(t){let e=t.get("radius")||10;return[e,e]}}),this.transformInteraction.setActive(!1),this.transformInteraction.on(["select"],(t=>{s&&t.features&&t.features.getLength()&&this.transformInteraction.setCenter(t.features.getArray()[0].getGeometry().getFirstCoordinate())}));let r=0,n=10,i=[1,1],o=[0,0],s=!1;this.transformInteraction.on(["rotatestart","translatestart","scalestart"],(function(t){r=t.feature.get("angle")||0,n=t.feature.get("radius")||10,i=t.feature.get("Scale")||[1,1],o=[0,0]})),this.transformInteraction.on("rotating",(t=>{t.feature.set("angle",r-t.angle),t.feature.dispatchEvent({type:"onRotating",data:r-t.angle})})),this.transformInteraction.on("translating",(t=>{o[0]+=t.delta[0],o[1]+=t.delta[1],t.feature.dispatchEvent({type:"onMoveing",data:Ut(t.features.getArray()[0].getGeometry().getExtent())})})),this.transformInteraction.on("scaling",(t=>{if(1===t.features.getLength()){let e=t.features.item(0);e.set("radius",n*Math.abs(t.scale[0])),e.set("Scale",[i[0]*Math.abs(t.scale[0]),i[1]*Math.abs(t.scale[1])]),t.feature.dispatchEvent({type:"onScaling",data:[i[0]*Math.abs(t.scale[0]),i[1]*Math.abs(t.scale[1])]})}})),this.transformInteraction.on(["rotateend","translateend","scaleend"],(t=>{}))}setHandleStyle(){{let t=new ii({fill:new fn({color:[255,255,255,.01]}),stroke:new vn({width:1,color:[0,0,0,.01]}),radius:8,points:10});this.transformInteraction.setStyle("rotate",new Ai({text:new fi({text:"",font:"16px Fontawesome",textAlign:"left",fill:new fn({color:"red"})}),image:t})),this.transformInteraction.setStyle("rotate0",new Ai({text:new fi({text:"",font:"20px Fontawesome",fill:new fn({color:[255,255,255,.8]}),stroke:new vn({width:2,color:"red"})})})),this.transformInteraction.setStyle("translate",new Ai({text:new fi({text:"",font:"20px Fontawesome",fill:new fn({color:[255,255,255,.8]}),stroke:new vn({width:2,color:"red"})})}))}this.transformInteraction.set("translate",this.transformInteraction.get("translate"))}appendTo(t){t.addInteraction(this.transformInteraction)}setActive(t){this.transformInteraction.setActive(t)}}class o6{constructor(){e(this,"data"),e(this,"pi"),e(this,"x_pi"),e(this,"a"),e(this,"ee"),Fd(),Td(yp),this.data=[],this.data.push({dh:13,wkid:4502}),this.data.push({dh:14,wkid:4503}),this.data.push({dh:15,wkid:4504}),this.data.push({dh:16,wkid:4505}),this.data.push({dh:17,wkid:4506}),this.data.push({dh:18,wkid:4507}),this.data.push({dh:19,wkid:4508}),this.data.push({dh:20,wkid:4509}),this.data.push({dh:21,wkid:4510}),this.data.push({dh:22,wkid:4511}),this.data.push({dh:23,wkid:4512}),this.data.push({dh:75,wkid:4534}),this.data.push({dh:78,wkid:4535}),this.data.push({dh:81,wkid:4536}),this.data.push({dh:84,wkid:4537}),this.data.push({dh:87,wkid:4538}),this.data.push({dh:90,wkid:4539}),this.data.push({dh:93,wkid:4540}),this.data.push({dh:96,wkid:4541}),this.data.push({dh:99,wkid:4542}),this.data.push({dh:102,wkid:4543}),this.data.push({dh:105,wkid:4544}),this.data.push({dh:108,wkid:4545}),this.data.push({dh:111,wkid:4546}),this.data.push({dh:114,wkid:4547}),this.data.push({dh:117,wkid:4548}),this.data.push({dh:120,wkid:4549}),this.data.push({dh:123,wkid:4550}),this.data.push({dh:126,wkid:4551}),this.data.push({dh:129,wkid:4552}),this.data.push({dh:132,wkid:4553}),this.data.push({dh:135,wkid:4554}),this.pi=3.141592653589793,this.x_pi=52.35987755982988,this.a=6378245,this.ee=.006693421622965943}ConvertToMapCoord(t,e){return{Coord3857:this.ConvertCoordinatesTo3857(t,e),Coord4326:this.ConvertCoordinatesTo4326(t,e)}}ConvertCoordinatesTo3857(t,e){return-1==t.toUpperCase().indexOf("EPSG:")&&(t="EPSG:"+t),yp(t,"EPSG:3857",e)}ConvertCoordinatesTo4326(t,e){return-1==t.toUpperCase().indexOf("EPSG:")&&(t="EPSG:"+t),yp(t,"EPSG:4326",e)}formatJsonTo3857(t){let e;return e="EPSG:3857"==t.crs.properties.name?(new iA).readFeatures(t):"EPSG:4326"==t.crs.properties.name?(new iA).readFeatures(t,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"}):(new iA).readFeatures(t,{dataProjection:t.crs.properties.name,featureProjection:"EPSG:3857"}),e}formatJsonTo4326Json(t){let e,r=new iA;return e="EPSG:4326"==t.crs.properties.name?r.readFeatures(t):"EPSG:3857"==t.crs.properties.name?r.readFeatures(t,{dataProjection:"EPSG:3857",featureProjection:"EPSG:4326"}):r.readFeatures(t,{dataProjection:t.crs.properties.name,featureProjection:"EPSG:4326"}),r.writeFeaturesObject(e)}formatJsonToPoint(t){let e=this.formatJsonTo3857(t),r=[];return e.forEach((t=>{switch(t.getGeometry().getType()){case"Polygon":r.push(new z({geometry:t.getGeometry().getInteriorPoint(),properties:t.getProperties().properties}));break;case"Point":r.push(t)}})),r}LnglatToCGCS2000(t,e,r=3){let n,i;return n=3==r?3*parseInt(((t+1.5)/3).toString()):6*parseInt(((t+6)/6).toString())-3,this.data.forEach((t=>{t.dh!=n||(i=t.wkid)})),i?yp("EPSG:4326","EPSG:"+i,[t,e]):[0,0]}ConvertWebMercatorToCGCS2000(t,e,r=3){let n=nr([t,e]);return this.LnglatToCGCS2000(n[0],n[1],r)}webMktToLngLat(t){return nr(t)}lngLatToWebMkt(t){return rr(t)}transformLat(t,e){let r=2*t-100+3*e+.2*e*e+.1*t*e+.2*Math.sqrt(Math.abs(t));return r+=2*(20*Math.sin(6*t*this.pi)+20*Math.sin(2*t*this.pi))/3,r+=2*(20*Math.sin(e*this.pi)+40*Math.sin(e/3*this.pi))/3,r+=2*(160*Math.sin(e/12*this.pi)+320*Math.sin(e*this.pi/30))/3,r}transformLon(t,e){let r=300+t+2*e+.1*t*t+.1*t*e+.1*Math.sqrt(Math.abs(t));return r+=2*(20*Math.sin(6*t*this.pi)+20*Math.sin(2*t*this.pi))/3,r+=2*(20*Math.sin(t*this.pi)+40*Math.sin(t/3*this.pi))/3,r+=2*(150*Math.sin(t/12*this.pi)+300*Math.sin(t/30*this.pi))/3,r}transform(t,e){if(this.outOfChina(t,e))return[t,e];let r=this.transformLat(e-105,t-35),n=this.transformLon(e-105,t-35),i=t/180*this.pi,o=Math.sin(i);o=1-this.ee*o*o;let s=Math.sqrt(o);return r=180*r/(this.a*(1-this.ee)/(o*s)*this.pi),n=180*n/(this.a/s*Math.cos(i)*this.pi),[t+r,e+n]}outOfChina(t,e){return e<72.004||e>137.8347||t<.8293||t>55.8271}wgs84ToGcj02(t,e){if(this.outOfChina(t,e))return{lat:t,lon:e};let r=this.transformLat(e-105,t-35),n=this.transformLon(e-105,t-35),i=t/180*this.pi,o=Math.sin(i);o=1-this.ee*o*o;let s=Math.sqrt(o);return r=180*r/(this.a*(1-this.ee)/(o*s)*this.pi),n=180*n/(this.a/s*Math.cos(i)*this.pi),{mgLat:t+r,mgLon:e+n}}gcj02ToWgs84(t,e){let r=this.transform(t,e),n=2*e-r[1];return{latitude:2*t-r[0],lontitude:n}}gcj02ToBd09(t,e){let r=e,n=t,i=Math.sqrt(r*r+n*n)+2e-5*Math.sin(n*this.x_pi),o=Math.atan2(n,r)+3e-6*Math.cos(r*this.x_pi),s=i*Math.cos(o)+.0065;return{tempLat:i*Math.sin(o)+.006,tempLon:s}}bd09ToGcj02(t,e){let r=e-.0065,n=t-.006,i=Math.sqrt(r*r+n*n)-2e-5*Math.sin(n*this.x_pi),o=Math.atan2(n,r)-3e-6*Math.cos(r*this.x_pi),s=i*Math.cos(o);return{tempLat:i*Math.sin(o),tempLon:s}}wgs84ToBd09(t,e){let r=this.wgs84ToGcj02(t,e);return this.gcj02ToBd09(r[0],r[1])}bd09_To_gps84(t,e){let r=this.bd09ToGcj02(t,e),n=this.gcj02ToWgs84(r[0],r[1]);return n[0]=n[0].toFixed(6),n[1]=n[1].toFixed(6),n}}function s6(t){const e=t.frameState,r=lt(t.inversePixelTransform.slice(),e.coordinateToPixelTransform);return new ko(t.context,e.pixelRatio,e.extent,r,e.viewState.rotation)}window.ol&&(ol.util?ol.util.VERSION||(ol.util.VERSION=ol.VERSION||"6.1.0"):ol.util={VERSION:ol.VERSION||"5.3.0"});var a6="6.15.1".split(".");a6=100*parseInt(a6[0])+parseInt(a6[1]);var l6=function(t,e){var r=t.frameState.pixelRatio;if(a6>605&&1!==r&&e.getImage()instanceof Wo){var n=(e=e.clone()).getImage();n.setScale(n.getScale()*r);var i=n.getAnchor();if(n.setDisplacement){var o=n.getDisplacement();o&&(o[0]-=i[0]/r,o[1]+=i[1]/r,n.setAnchor([0,0]))}else i&&(i[0]/=r,i[1]/=r)}return e},u6=function(t){var e=t||{};ls.call(this,e),this.oldcluster=new ws,this.clusters=[],this.animation={start:!1},this.set("animationDuration","number"==typeof e.animationDuration?e.animationDuration:700),this.set("animationMethod",e.animationMethod||Ss),this.getSource().on("change",this.saveCluster.bind(this)),this.on(["precompose","prerender"],this.animate.bind(this)),this.on(["postcompose","postrender"],this.postanimate.bind(this))};vg(u6,ls),u6.prototype.saveCluster=function(){if(this.oldcluster){if(this.oldcluster.clear(),!this.get("animationDuration"))return;var t=this.getSource().getFeatures();t.length&&t[0].get("features")&&(this.oldcluster.addFeatures(this.clusters),this.clusters=t.slice(0),this.sourceChanged=!0)}},u6.prototype.getClusterForFeature=function(t,e){for(var r,n=0;r=e[n];n++){var i=r.get("features");if(i&&i.length)for(var o,s=0;o=i[s];s++)if(t===o)return r}return!1},u6.prototype.stopAnimation=function(){this.animation.start=!1,this.animation.cA=[],this.animation.cB=[]},u6.prototype.animate=function(t){var e=this.get("animationDuration");if(e){var r,n,i=t.frameState.viewState.resolution,o=this.animation,s=t.frameState.time;if(o.resolution!=i&&this.sourceChanged){var a=t.frameState.extent;for(o.resolution<i?(a=mt(a,100*i),o.cA=this.oldcluster.getFeaturesInExtent(a),o.cB=this.getSource().getFeaturesInExtent(a),o.revers=!1):(a=mt(a,100*i),o.cA=this.getSource().getFeaturesInExtent(a),o.cB=this.oldcluster.getFeaturesInExtent(a),o.revers=!0),o.clusters=[],r=0;n=o.cA[r];r++){var l=n.get("features");if(l&&l.length){var u=this.getClusterForFeature(l[0],o.cB);u&&o.clusters.push({f:n,pt:u.getGeometry().getCoordinates()})}}if(o.resolution=i,this.sourceChanged=!1,!o.clusters.length||o.clusters.length>1e3)return void this.stopAnimation();s=o.start=(new Date).getTime()}if(o.start){var h=t.vectorContext||s6(t),c=(s-o.start)/e;c>1&&(this.stopAnimation(),c=1),c=this.get("animationMethod")(c);var A=this.getStyle(),f="function"==typeof A?A:A.length?function(){return A}:function(){return[A]};for(t.context.save(),t.context.globalAlpha=this.getOpacity(),r=0;u=o.clusters[r];r++){var p=u.f.getGeometry().getCoordinates(),d=p[0]-u.pt[0],g=p[1]-u.pt[1];o.revers?(p[0]=u.pt[0]+c*d,p[1]=u.pt[1]+c*g):(p[0]=p[0]-c*d,p[1]=p[1]-c*g);var y=f(u.f,i,!0);if(y.length||(y=[y]),1!==u.f.get("features").length||d||g){var m=new Vr(p);l=new z(m)}else l=u.f.get("features")[0];for(var v,_=0;v=y[_];_++)if(v.getText()&&/\n/.test(v.getText().getText())){var w,b=v.getText().getOffsetX(),x=v.getText().getOffsetY(),C=v.getText().getRotation()||0,S=1.2*Number((v.getText().getFont()||"10px").match(/\d+/)),E=v.getText().getText().split("\n"),B=E.length-1,I=v.clone();E.forEach((function(e,r){switch(1==r&&(I.setImage(),I.setFill(),I.setStroke()),v.getText().getTextBaseline()){case"alphabetic":case"ideographic":case"bottom":w=B;break;case"hanging":case"top":w=0;break;default:w=B/2}I.getText().setOffsetX(b-Math.sin(C)*S*(r-w)),I.getText().setOffsetY(x+Math.cos(C)*S*(r-w)),I.getText().setText(e),h.drawFeature(l,l6(t,I))}))}else h.drawFeature(l,l6(t,v))}t.context.restore(),t.frameState.animate=!0,t.context.save(),t.context.beginPath(),t.context.rect(0,0,0,0),t.context.clip(),this.clip_=!0}}},u6.prototype.postanimate=function(t){this.clip_&&(t.context.restore(),this.clip_=!1)};var h6,c6=function(t){t=t||{},this.pointRadius=t.pointRadius||12,this.circleMaxObjects=t.circleMaxObjects||10,this.maxObjects=t.maxObjects||60,this.spiral=!1!==t.spiral,this.animate=t.animate,this.animationDuration=t.animationDuration||500,this.selectCluster_=!1!==t.selectCluster,this._autoClose=!1!==t.autoClose;var e=this.overlayLayer_=new ls({source:new ws({features:new Q,wrapX:t.wrapX,useSpatialIndex:!0}),name:"Cluster overlay",updateWhileAnimating:!0,updateWhileInteracting:!0,displayInLayerSwitcher:!1,style:t.featureStyle});if(t.layers)if("function"==typeof t.layers){var r=t.layers;t.layers=function(t){return t===e||r(t)}}else t.layers.push&&t.layers.push(this.overlayLayer_);if(t.filter){var n=t.filter;t.filter=function(t,e){return!(!e&&t.get("selectclusterlink"))&&n(t,e)}}else t.filter=function(t,e){return!(!e&&t.get("selectclusterlink"))};this.filter_=t.filter,this._autoClose||t.toggleCondition||(t.toggleCondition=sl),gu.call(this,t),this.on("select",this.selectCluster.bind(this))};vg(c6,gu),c6.prototype.setMap=function(t){this.getMap()&&this.getMap().removeLayer(this.overlayLayer_),this._listener&&M(this._listener),this._listener=null,gu.prototype.setMap.call(this,t),this.overlayLayer_.setMap(t),t&&t.getView()&&(this._listener=t.getView().on("change:resolution",this.clear.bind(this)))},c6.prototype.clear=function(){this.getFeatures().clear(),this.overlayLayer_.getSource().clear()},c6.prototype.getLayer=function(){return this.overlayLayer_},c6.prototype.selectCluster=function(t){if(t instanceof z&&(t={selected:[t]}),t.selected.length){var e=t.selected[0];if(!e.get("selectclusterfeature")){var r=this.overlayLayer_.getSource();this._autoClose&&r.clear();var n=e.get("features");if(n&&1!=n.length){this.selectCluster_||this.getFeatures().clear();var i,o,s,a,l,u,h,c=e.getGeometry().getCoordinates(),A=this.getMap().getView().getResolution(),f=[];if(!this.spiral||n.length<=this.circleMaxObjects)for(a=Math.min(n.length,this.circleMaxObjects),i=A*this.pointRadius*(.5+a/4),s=0;s<a;s++)o=2*Math.PI*s/a,2!=a&&4!=a||(o+=Math.PI/4),l=[c[0]+i*Math.sin(o),c[1]+i*Math.cos(o)],(u=new z({selectclusterfeature:!0,features:[n[s]],geometry:new Vr(l)})).setStyle(n[s].getStyle()),f.push(u),h=new z({selectclusterlink:!0,geometry:new mn([c,l])}),f.push(h);else{o=0;var p=2*this.pointRadius;for(a=Math.min(this.maxObjects,n.length),s=0;s<a;s++){o+=(p+.1)/(i=p/2+p*o/(2*Math.PI));var d=A*i*Math.sin(o),g=A*i*Math.cos(o);l=[c[0]+d,c[1]+g],(u=new z({selectclusterfeature:!0,features:[n[s]],geometry:new Vr(l)})).setStyle(n[s].getStyle()),f.push(u),h=new z({selectclusterlink:!0,geometry:new mn([c,l])}),f.push(h)}}e.set("selectcluserfeatures",f),this.animate?this.animateCluster_(c,f):r.addFeatures(f)}}}else this._autoClose?this.clear():t.deselected.forEach((t=>{var e=t.get("selectcluserfeatures");e&&e.forEach((t=>{this.overlayLayer_.getSource().removeFeature(t)}))}))},c6.prototype.animateCluster_=function(t,e){if(this.listenerKey_&&M(this.listenerKey_),e.length){var r=this.overlayLayer_.getStyle(),n="function"==typeof r?r:r.length?function(){return r}:function(){return[r]},i=this.animationDuration||500,o=(new Date).getTime();this.listenerKey_=this.overlayLayer_.on(["postcompose","postrender"],function(r){for(var s,a=r.vectorContext||s6(r),l=r.frameState.pixelRatio,u=this.getMap().getView().getResolution(),h=Ss((r.frameState.time-o)/i),c=0;s=e[c];c++)if(s.get("features")){var A=s.getGeometry().getCoordinates();A[0]=t[0]+h*(A[0]-t[0]),A[1]=t[1]+h*(A[1]-t[1]);for(var f=new Vr(A),p=n(s,u),d=0;d<p.length;d++){var g,y=!Bu.prototype.getFeaturesAtPixel&&p[d].getImage();y&&(g=y.getScale(),y.setScale(l)),a.setStyle?(a.setStyle(p[d]),a.drawGeometry(f)):(a.setImageStyle(y),a.drawPointGeometry(f)),y&&y.setScale(g)}}if(h>1)return M(this.listenerKey_),this.overlayLayer_.getSource().addFeatures(e),void this.overlayLayer_.changed();r.frameState.animate=!0}.bind(this));var s=new z(new Vr(this.getMap().getView().getCenter()));s.setStyle(new Ai({image:new si({})})),this.overlayLayer_.getSource().addFeature(s)}},c6.prototype.getClusterExtent=function(t){if(!t.get("features"))return null;var e=[1/0,1/0,-1/0,-1/0];return t.get("features").forEach((function(t){e=Ft(e,t.getGeometry().getExtent())})),e[0]===e[2]&&e[1]===e[3]?null:e},function(){var t=function(t,e,r){return(t[0]-r[0])*(e[1]-r[1])-(t[1]-r[1])*(e[0]-r[0])<=0};h6=function(e){var r;e.sort((function(t,e){return t[0]==e[0]?t[1]-e[1]:t[0]-e[0]}));var n=[];for(r=0;r<e.length;r++){for(;n.length>=2&&t(n[n.length-2],n[n.length-1],e[r]);)n.pop();n.push(e[r])}var i=[];for(r=e.length-1;r>=0;r--){for(;i.length>=2&&t(i[i.length-2],i[i.length-1],e[r]);)i.pop();i.push(e[r])}return i.pop(),n.pop(),n.concat(i)};var e=function(t){var r,n,i=[];switch(t.getType()){case"Point":i.push(t.getCoordinates());break;case"LineString":case"LinearRing":case"MultiPoint":i=t.getCoordinates();break;case"MultiLineString":for(n=t.getLineStrings(),r=0;r<n.length;r++)i.concat(e(n[r]));break;case"Polygon":i=e(t.getLinearRing(0));break;case"MultiPolygon":for(n=t.getPolygons(),r=0;r<n.length;r++)i.concat(e(n[r]));break;case"GeometryCollection":for(n=t.getGeometries(),r=0;r<n.length;r++)i.concat(e(n[r]))}return i};_r.prototype.convexHull=function(){return h6(e(this))}}();const A6=h6;var f6=globalThis&&globalThis.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),p6={Point:function(t){return void 0!==t.m&&void 0!==t.z?new Vr([t.x,t.y,t.z,t.m],"XYZM"):void 0!==t.z?new Vr([t.x,t.y,t.z],"XYZ"):void 0!==t.m?new Vr([t.x,t.y,t.m],"XYM"):new Vr([t.x,t.y])},LineString:function(t){var e=m6(t);return new mn(t.paths[0],e)},Polygon:function(t){var e=m6(t);return new hn(t.rings,e)},MultiPoint:function(t){var e=m6(t);return new Wl(t.points,e)},MultiLineString:function(t){var e=m6(t);return new Vl(t.paths,e)},MultiPolygon:function(t){var e=m6(t);return new Jl(t.rings,e)}},d6={Point:function(t,e){var r,n=t.getCoordinates(),i=t.getLayout();return"XYZ"===i?r={x:n[0],y:n[1],z:n[2]}:"XYM"===i?r={x:n[0],y:n[1],m:n[2]}:"XYZM"===i?r={x:n[0],y:n[1],z:n[2],m:n[3]}:"XY"===i?r={x:n[0],y:n[1]}:G(!1,34),r},LineString:function(t,e){var r=v6(t);return{hasZ:r.hasZ,hasM:r.hasM,paths:[t.getCoordinates()]}},Polygon:function(t,e){var r=v6(t);return{hasZ:r.hasZ,hasM:r.hasM,rings:t.getCoordinates(!1)}},MultiPoint:function(t,e){var r=v6(t);return{hasZ:r.hasZ,hasM:r.hasM,points:t.getCoordinates()}},MultiLineString:function(t,e){var r=v6(t);return{hasZ:r.hasZ,hasM:r.hasM,paths:t.getCoordinates()}},MultiPolygon:function(t,e){for(var r=v6(t),n=t.getCoordinates(!1),i=[],o=0;o<n.length;o++)for(var s=n[o].length-1;s>=0;s--)i.push(n[o][s]);return{hasZ:r.hasZ,hasM:r.hasM,rings:i}}},g6=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this)||this).geometryName_=n.geometryName,r}return f6(e,t),e.prototype.readFeatureFromObject=function(t,e,r){var n=t,i=y6(n.geometry,e),o=new z;if(this.geometryName_&&o.setGeometryName(this.geometryName_),o.setGeometry(i),n.attributes){o.setProperties(n.attributes,!0);var s=n.attributes[r];void 0!==s&&o.setId(s)}return o},e.prototype.readFeaturesFromObject=function(t,e){var r=e||{};if(t.features){for(var n=[],i=t.features,o=0,s=i.length;o<s;++o)n.push(this.readFeatureFromObject(i[o],r,t.objectIdFieldName));return n}return[this.readFeatureFromObject(t,r)]},e.prototype.readGeometryFromObject=function(t,e){return y6(t,e)},e.prototype.readProjectionFromObject=function(t){return t.spatialReference&&void 0!==t.spatialReference.wkid?Ye("EPSG:"+t.spatialReference.wkid):null},e.prototype.writeGeometryObject=function(t,e){return _6(t,this.adaptOptions(e))},e.prototype.writeFeatureObject=function(t,e){e=this.adaptOptions(e);var r={};if(!t.hasProperties())return r.attributes={},r;var n=t.getProperties(),i=t.getGeometry();if(i){r.geometry=_6(i,e);var o=e&&(e.dataProjection||e.featureProjection);o&&(r.geometry.spatialReference={wkid:Number(Ye(o).getCode().split(":").pop())}),delete n[t.getGeometryName()]}return x(n)?r.attributes={}:r.attributes=n,r},e.prototype.writeFeaturesObject=function(t,e){e=this.adaptOptions(e);for(var r=[],n=0,i=t.length;n<i;++n)r.push(this.writeFeatureObject(t[n],e));return{features:r}},e}($c);function y6(t,e){var r,n,i;if(!t)return null;if("number"==typeof t.x&&"number"==typeof t.y)i="Point";else if(t.points)i="MultiPoint";else if(t.paths)i=1===t.paths.length?"LineString":"MultiLineString";else if(t.rings){var o=t,s=m6(o),a=function(t,e){var r,n,i=[],o=[],s=[];for(r=0,n=t.length;r<n;++r)i.length=0,Tr(i,0,t[r],e.length),rn(i,0,i.length,e.length)?o.push([t[r]]):s.push(t[r]);for(;s.length;){var a=s.shift(),l=!1;for(r=o.length-1;r>=0;r--){var u=o[r][0];if(bt(new Hr(u).getExtent(),new Hr(a).getExtent())){o[r].push(a),l=!0;break}}l||o.push([a.reverse()])}return o}(o.rings,s);1===a.length?(i="Polygon",t=_({},t,((r={}).rings=a[0],r))):(i="MultiPolygon",t=_({},t,((n={}).rings=a,n)))}return Bh((0,p6[i])(t),!1,e)}function m6(t){var e="XY";return!0===t.hasZ&&!0===t.hasM?e="XYZM":!0===t.hasZ?e="XYZ":!0===t.hasM&&(e="XYM"),e}function v6(t){var e=t.getLayout();return{hasZ:"XYZ"===e||"XYZM"===e,hasM:"XYM"===e||"XYZM"===e}}function _6(t,e){return(0,d6[t.getType()])(Bh(t,!0,e),e)}const w6=g6;var b6="http://www.w3.org/2001/XMLSchema-instance";function x6(t,e){return j6().createElementNS(t,e)}function C6(t,e){return S6(t,e,[]).join("")}function S6(t,e,r){if(t.nodeType==Node.CDATA_SECTION_NODE||t.nodeType==Node.TEXT_NODE)e?r.push(String(t.nodeValue).replace(/(\r\n|\r|\n)/g,"")):r.push(t.nodeValue);else{var n=void 0;for(n=t.firstChild;n;n=n.nextSibling)S6(n,e,r)}return r}function E6(t){return"documentElement"in t}function B6(t){return(new DOMParser).parseFromString(t,"application/xml")}function I6(t,e){return function(r,n){var i=t.call(void 0!==e?e:this,r,n);void 0!==i&&d(n[n.length-1],i)}}function P6(t,e){return function(r,n){var i=t.call(void 0!==e?e:this,r,n);void 0!==i&&n[n.length-1].push(i)}}function F6(t,e){return function(r,n){var i=t.call(void 0!==e?e:this,r,n);void 0!==i&&(n[n.length-1]=i)}}function T6(t,e,r){return function(n,i){var o=t.call(void 0!==r?r:this,n,i);void 0!==o&&(i[i.length-1][void 0!==e?e:n.localName]=o)}}function M6(t,e){return function(r,n,i){t.call(void 0!==e?e:this,r,n,i),i[i.length-1].node.appendChild(r)}}function L6(t,e){var r=t;return function(t,n,i){var o=n[n.length-1].node,s=r;return void 0===s&&(s=i),x6(void 0!==e?e:o.namespaceURI,s)}}var k6=L6();function O6(t,e){for(var r=e.length,n=new Array(r),i=0;i<r;++i)n[i]=t[e[i]];return n}function N6(t,e,r){var n,i,o=void 0!==r?r:{};for(n=0,i=t.length;n<i;++n)o[t[n]]=e;return o}function R6(t,e,r,n){var i;for(i=e.firstElementChild;i;i=i.nextElementSibling){var o=t[i.namespaceURI];if(void 0!==o){var s=o[i.localName];void 0!==s&&s.call(n,i,r)}}}function U6(t,e,r,n,i){return n.push(t),R6(e,r,n,i),n.pop()}function D6(t,e,r,n,i,o,s){return i.push(t),function(t,e,r,n,i,o){for(var s,a,l=(void 0!==i?i:r).length,u=0;u<l;++u)void 0!==(s=r[u])&&void 0!==(a=e.call(void 0!==o?o:this,s,n,void 0!==i?i[u]:void 0))&&t[a.namespaceURI][a.localName].call(o,a,s,n)}(e,r,n,i,o,s),i.pop()}var Q6=void 0,G6=void 0;function j6(){return void 0===G6&&"undefined"!=typeof document&&(G6=document.implementation.createDocument("","",null)),G6}var H6=globalThis&&globalThis.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();const z6=function(t){function e(){var e=t.call(this)||this;return e.xmlSerializer_=(void 0===Q6&&"undefined"!=typeof XMLSerializer&&(Q6=new XMLSerializer),Q6),e}return H6(e,t),e.prototype.getType=function(){return"xml"},e.prototype.readFeature=function(t,e){if(t){if("string"==typeof t){var r=B6(t);return this.readFeatureFromDocument(r,e)}return E6(t)?this.readFeatureFromDocument(t,e):this.readFeatureFromNode(t,e)}return null},e.prototype.readFeatureFromDocument=function(t,e){var r=this.readFeaturesFromDocument(t,e);return r.length>0?r[0]:null},e.prototype.readFeatureFromNode=function(t,e){return null},e.prototype.readFeatures=function(t,e){if(t){if("string"==typeof t){var r=B6(t);return this.readFeaturesFromDocument(r,e)}return E6(t)?this.readFeaturesFromDocument(t,e):this.readFeaturesFromNode(t,e)}return[]},e.prototype.readFeaturesFromDocument=function(t,e){for(var r=[],n=t.firstChild;n;n=n.nextSibling)n.nodeType==Node.ELEMENT_NODE&&d(r,this.readFeaturesFromNode(n,e));return r},e.prototype.readFeaturesFromNode=function(t,e){return n()},e.prototype.readGeometry=function(t,e){if(t){if("string"==typeof t){var r=B6(t);return this.readGeometryFromDocument(r,e)}return E6(t)?this.readGeometryFromDocument(t,e):this.readGeometryFromNode(t,e)}return null},e.prototype.readGeometryFromDocument=function(t,e){return null},e.prototype.readGeometryFromNode=function(t,e){return null},e.prototype.readProjection=function(t){if(t){if("string"==typeof t){var e=B6(t);return this.readProjectionFromDocument(e)}return E6(t)?this.readProjectionFromDocument(t):this.readProjectionFromNode(t)}return null},e.prototype.readProjectionFromDocument=function(t){return this.dataProjection},e.prototype.readProjectionFromNode=function(t){return this.dataProjection},e.prototype.writeFeature=function(t,e){var r=this.writeFeatureNode(t,e);return this.xmlSerializer_.serializeToString(r)},e.prototype.writeFeatureNode=function(t,e){return null},e.prototype.writeFeatures=function(t,e){var r=this.writeFeaturesNode(t,e);return this.xmlSerializer_.serializeToString(r)},e.prototype.writeFeaturesNode=function(t,e){return null},e.prototype.writeGeometry=function(t,e){var r=this.writeGeometryNode(t,e);return this.xmlSerializer_.serializeToString(r)},e.prototype.writeGeometryNode=function(t,e){return null},e}(Eh);var V6=globalThis&&globalThis.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),K6="http://www.opengis.net/gml",q6=/^[\s\xa0]*$/,W6=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.featureType=n.featureType,r.featureNS=n.featureNS,r.srsName=n.srsName,r.schemaLocation="",r.FEATURE_COLLECTION_PARSERS={},r.FEATURE_COLLECTION_PARSERS[r.namespace]={featureMember:P6(r.readFeaturesInternal),featureMembers:F6(r.readFeaturesInternal)},r.supportedMediaTypes=["application/gml+xml"],r}return V6(e,t),e.prototype.readFeaturesInternal=function(t,e){var r=t.localName,n=null;if("FeatureCollection"==r)n=U6([],this.FEATURE_COLLECTION_PARSERS,t,e,this);else if("featureMembers"==r||"featureMember"==r||"member"==r){var i=e[0],o=i.featureType,s=i.featureNS;if(!o&&t.childNodes){o=[],s={};for(var a=0,l=t.childNodes.length;a<l;++a){var u=t.childNodes[a];if(1===u.nodeType){var h=u.nodeName.split(":").pop();if(-1===o.indexOf(h)){var c="",A=0,f=u.namespaceURI;for(var p in s){if(s[p]===f){c=p;break}++A}c||(s[c="p"+A]=f),o.push(c+":"+h)}}}"featureMember"!=r&&(i.featureType=o,i.featureNS=s)}if("string"==typeof s){var d=s;(s={}).p0=d}var g={},y=Array.isArray(o)?o:[o];for(var m in s){var v={};for(a=0,l=y.length;a<l;++a)(-1===y[a].indexOf(":")?"p0":y[a].split(":")[0])===m&&(v[y[a].split(":").pop()]="featureMembers"==r?P6(this.readFeatureElement,this):F6(this.readFeatureElement,this));g[s[m]]=v}n=U6("featureMember"==r||"member"==r?void 0:[],g,t,e)}return null===n&&(n=[]),n},e.prototype.readGeometryOrExtent=function(t,e){var r=e[0];return r.srsName=t.firstElementChild.getAttribute("srsName"),r.srsDimension=t.firstElementChild.getAttribute("srsDimension"),U6(null,this.GEOMETRY_PARSERS,t,e,this)},e.prototype.readExtentElement=function(t,e){var r=e[0],n=this.readGeometryOrExtent(t,e);return n?Ih(n,r):void 0},e.prototype.readGeometryElement=function(t,e){var r=e[0],n=this.readGeometryOrExtent(t,e);return n?Bh(n,!1,r):void 0},e.prototype.readFeatureElementInternal=function(t,e,r){for(var n,i={},o=t.firstElementChild;o;o=o.nextElementSibling){var s=void 0,a=o.localName;0===o.childNodes.length||1===o.childNodes.length&&(3===o.firstChild.nodeType||4===o.firstChild.nodeType)?(s=C6(o,!1),q6.test(s)&&(s=void 0)):(r&&(s="boundedBy"===a?this.readExtentElement(o,e):this.readGeometryElement(o,e)),s?"boundedBy"!==a&&(n=a):s=this.readFeatureElementInternal(o,e,!1));var l=o.attributes.length;if(l>0){s={_content_:s};for(var u=0;u<l;u++)s[o.attributes[u].name]=o.attributes[u].value}i[a]?(i[a]instanceof Array||(i[a]=[i[a]]),i[a].push(s)):i[a]=s}if(r){var h=new z(i);n&&h.setGeometryName(n);var c=t.getAttribute("fid")||function(t,e,r){return t.getAttributeNS(e,"id")||""}(t,this.namespace);return c&&h.setId(c),h}return i},e.prototype.readFeatureElement=function(t,e){return this.readFeatureElementInternal(t,e,!0)},e.prototype.readPoint=function(t,e){var r=this.readFlatCoordinatesFromNode(t,e);if(r)return new Vr(r,"XYZ")},e.prototype.readMultiPoint=function(t,e){var r=U6([],this.MULTIPOINT_PARSERS,t,e,this);return r?new Wl(r):void 0},e.prototype.readMultiLineString=function(t,e){var r=U6([],this.MULTILINESTRING_PARSERS,t,e,this);if(r)return new Vl(r)},e.prototype.readMultiPolygon=function(t,e){var r=U6([],this.MULTIPOLYGON_PARSERS,t,e,this);if(r)return new Jl(r)},e.prototype.pointMemberParser=function(t,e){R6(this.POINTMEMBER_PARSERS,t,e,this)},e.prototype.lineStringMemberParser=function(t,e){R6(this.LINESTRINGMEMBER_PARSERS,t,e,this)},e.prototype.polygonMemberParser=function(t,e){R6(this.POLYGONMEMBER_PARSERS,t,e,this)},e.prototype.readLineString=function(t,e){var r=this.readFlatCoordinatesFromNode(t,e);return r?new mn(r,"XYZ"):void 0},e.prototype.readFlatLinearRing=function(t,e){return U6(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,e,this)||void 0},e.prototype.readLinearRing=function(t,e){var r=this.readFlatCoordinatesFromNode(t,e);if(r)return new Hr(r,"XYZ")},e.prototype.readPolygon=function(t,e){var r=U6([null],this.FLAT_LINEAR_RINGS_PARSERS,t,e,this);if(r&&r[0]){var n,i=r[0],o=[i.length],s=void 0;for(s=1,n=r.length;s<n;++s)d(i,r[s]),o.push(i.length);return new hn(i,"XYZ",o)}},e.prototype.readFlatCoordinatesFromNode=function(t,e){return U6(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,e,this)},e.prototype.readGeometryFromNode=function(t,e){return this.readGeometryElement(t,[this.getReadOptions(t,e||{})])||null},e.prototype.readFeaturesFromNode=function(t,e){var r={featureType:this.featureType,featureNS:this.featureNS};return e&&_(r,this.getReadOptions(t,e)),this.readFeaturesInternal(t,[r])||[]},e.prototype.readProjectionFromNode=function(t){return Ye(this.srsName?this.srsName:t.firstElementChild.getAttribute("srsName"))},e}(z6);W6.prototype.namespace=K6,W6.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{}},W6.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{}},W6.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{}},W6.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml":{pointMember:P6(W6.prototype.pointMemberParser),pointMembers:P6(W6.prototype.pointMemberParser)}},W6.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml":{lineStringMember:P6(W6.prototype.lineStringMemberParser),lineStringMembers:P6(W6.prototype.lineStringMemberParser)}},W6.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml":{polygonMember:P6(W6.prototype.polygonMemberParser),polygonMembers:P6(W6.prototype.polygonMemberParser)}},W6.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml":{Point:P6(W6.prototype.readFlatCoordinatesFromNode)}},W6.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:P6(W6.prototype.readLineString)}},W6.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:P6(W6.prototype.readPolygon)}},W6.prototype.RING_PARSERS={"http://www.opengis.net/gml":{LinearRing:F6(W6.prototype.readFlatLinearRing)}};const X6=W6;function Y6(t){var e,r=C6(t,!1);return(e=/^\s*(true|1)|(false|0)\s*$/.exec(r))?void 0!==e[1]||!1:void 0}function Z6(t){var e,r=C6(t,!1);return(e=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(r))?parseFloat(e[1]):void 0}function J6(t){return $6(C6(t,!1))}function $6(t){var e=/^\s*(\d+)\s*$/.exec(t);return e?parseInt(e[1],10):void 0}function t8(t){return C6(t,!1).trim()}function e8(t,e){n8(t,e?"1":"0")}function r8(t,e){var r=e.toPrecision();t.appendChild(j6().createTextNode(r))}function n8(t,e){t.appendChild(j6().createTextNode(e))}var i8=globalThis&&globalThis.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),o8={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},s8=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,n)||this).FEATURE_COLLECTION_PARSERS[K6].featureMember=P6(r.readFeaturesInternal),r.schemaLocation=n.schemaLocation?n.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/2.1.2/feature.xsd",r}return i8(e,t),e.prototype.readFlatCoordinates=function(t,e){var r=C6(t,!1).replace(/^\s*|\s*$/g,""),n=e[0].srsName,i="enu";if(n){var o=Ye(n);o&&(i=o.getAxisOrientation())}for(var s=r.trim().split(/\s+/),a=[],l=0,u=s.length;l<u;l++){var h=s[l].split(/,+/),c=parseFloat(h[0]),A=parseFloat(h[1]),f=3===h.length?parseFloat(h[2]):0;"en"===i.substr(0,2)?a.push(c,A,f):a.push(A,c,f)}return a},e.prototype.readBox=function(t,e){var r=U6([null],this.BOX_PARSERS_,t,e,this);return St(r[1][0],r[1][1],r[1][3],r[1][4])},e.prototype.innerBoundaryIsParser=function(t,e){var r=U6(void 0,this.RING_PARSERS,t,e,this);r&&e[e.length-1].push(r)},e.prototype.outerBoundaryIsParser=function(t,e){var r=U6(void 0,this.RING_PARSERS,t,e,this);r&&(e[e.length-1][0]=r)},e.prototype.GEOMETRY_NODE_FACTORY_=function(t,e,r){var n,i=e[e.length-1],o=i.multiSurface,s=i.surface,a=i.multiCurve;return Array.isArray(t)?n="Envelope":"MultiPolygon"===(n=t.getType())&&!0===o?n="MultiSurface":"Polygon"===n&&!0===s?n="Surface":"MultiLineString"===n&&!0===a&&(n="MultiCurve"),x6("http://www.opengis.net/gml",n)},e.prototype.writeFeatureElement=function(t,e,r){var n=e.getId();n&&t.setAttribute("fid",n);var i=r[r.length-1],o=i.featureNS,s=e.getGeometryName();i.serializers||(i.serializers={},i.serializers[o]={});var a=[],l=[];if(e.hasProperties()){var u=e.getProperties();for(var h in u){var c=u[h];null!==c&&(a.push(h),l.push(c),h==s||"function"==typeof c.getSimplifiedGeometry?h in i.serializers[o]||(i.serializers[o][h]=M6(this.writeGeometryElement,this)):h in i.serializers[o]||(i.serializers[o][h]=M6(n8)))}}var A=_({},i);A.node=t,D6(A,i.serializers,L6(void 0,o),l,r,a)},e.prototype.writeCurveOrLineString=function(t,e,r){var n=r[r.length-1].srsName;if("LineStringSegment"!==t.nodeName&&n&&t.setAttribute("srsName",n),"LineString"===t.nodeName||"LineStringSegment"===t.nodeName){var i=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(i),this.writeCoordinates_(i,e,r)}else if("Curve"===t.nodeName){var o=x6(t.namespaceURI,"segments");t.appendChild(o),this.writeCurveSegments_(o,e,r)}},e.prototype.writeLineStringOrCurveMember=function(t,e,r){var n=this.GEOMETRY_NODE_FACTORY_(e,r);n&&(t.appendChild(n),this.writeCurveOrLineString(n,e,r))},e.prototype.writeMultiCurveOrLineString=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName,s=n.curve;o&&t.setAttribute("srsName",o);var a=e.getLineStrings();D6({node:t,hasZ:i,srsName:o,curve:s},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,a,r,void 0,this)},e.prototype.writeGeometryElement=function(t,e,r){var n,i=r[r.length-1],o=_({},i);o.node=t,n=Array.isArray(e)?Ih(e,i):Bh(e,!0,i),D6(o,this.GEOMETRY_SERIALIZERS,this.GEOMETRY_NODE_FACTORY_,[n],r,void 0,this)},e.prototype.createCoordinatesNode_=function(t){var e=x6(t,"coordinates");return e.setAttribute("decimal","."),e.setAttribute("cs",","),e.setAttribute("ts"," "),e},e.prototype.writeCoordinates_=function(t,e,r){for(var n=r[r.length-1],i=n.hasZ,o=n.srsName,s=e.getCoordinates(),a=s.length,l=new Array(a),u=0;u<a;++u){var h=s[u];l[u]=this.getCoords_(h,o,i)}n8(t,l.join(" "))},e.prototype.writeCurveSegments_=function(t,e,r){var n=x6(t.namespaceURI,"LineStringSegment");t.appendChild(n),this.writeCurveOrLineString(n,e,r)},e.prototype.writeSurfaceOrPolygon=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName;if("PolygonPatch"!==t.nodeName&&o&&t.setAttribute("srsName",o),"Polygon"===t.nodeName||"PolygonPatch"===t.nodeName){var s=e.getLinearRings();D6({node:t,hasZ:i,srsName:o},this.RING_SERIALIZERS,this.RING_NODE_FACTORY_,s,r,void 0,this)}else if("Surface"===t.nodeName){var a=x6(t.namespaceURI,"patches");t.appendChild(a),this.writeSurfacePatches_(a,e,r)}},e.prototype.RING_NODE_FACTORY_=function(t,e,r){var n=e[e.length-1],i=n.node,o=n.exteriorWritten;return void 0===o&&(n.exteriorWritten=!0),x6(i.namespaceURI,void 0!==o?"innerBoundaryIs":"outerBoundaryIs")},e.prototype.writeSurfacePatches_=function(t,e,r){var n=x6(t.namespaceURI,"PolygonPatch");t.appendChild(n),this.writeSurfaceOrPolygon(n,e,r)},e.prototype.writeRing=function(t,e,r){var n=x6(t.namespaceURI,"LinearRing");t.appendChild(n),this.writeLinearRing(n,e,r)},e.prototype.getCoords_=function(t,e,r){var n="enu";e&&(n=Ye(e).getAxisOrientation());var i="en"===n.substr(0,2)?t[0]+","+t[1]:t[1]+","+t[0];return r&&(i+=","+(t[2]||0)),i},e.prototype.writePoint=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName;o&&t.setAttribute("srsName",o);var s=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(s);var a=e.getCoordinates();n8(s,this.getCoords_(a,o,i))},e.prototype.writeMultiPoint=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName;o&&t.setAttribute("srsName",o);var s=e.getPoints();D6({node:t,hasZ:i,srsName:o},this.POINTMEMBER_SERIALIZERS,L6("pointMember"),s,r,void 0,this)},e.prototype.writePointMember=function(t,e,r){var n=x6(t.namespaceURI,"Point");t.appendChild(n),this.writePoint(n,e,r)},e.prototype.writeLinearRing=function(t,e,r){var n=r[r.length-1].srsName;n&&t.setAttribute("srsName",n);var i=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(i),this.writeCoordinates_(i,e,r)},e.prototype.writeMultiSurfaceOrPolygon=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName,s=n.surface;o&&t.setAttribute("srsName",o);var a=e.getPolygons();D6({node:t,hasZ:i,srsName:o,surface:s},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,a,r,void 0,this)},e.prototype.writeSurfaceOrPolygonMember=function(t,e,r){var n=this.GEOMETRY_NODE_FACTORY_(e,r);n&&(t.appendChild(n),this.writeSurfaceOrPolygon(n,e,r))},e.prototype.writeEnvelope=function(t,e,r){var n=r[r.length-1].srsName;n&&t.setAttribute("srsName",n);var i=[e[0]+" "+e[1],e[2]+" "+e[3]];D6({node:t},this.ENVELOPE_SERIALIZERS,k6,i,r,["lowerCorner","upperCorner"],this)},e.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(t,e,r){var n=e[e.length-1].node;return x6("http://www.opengis.net/gml",o8[n.nodeName])},e}(X6);s8.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{coordinates:F6(s8.prototype.readFlatCoordinates)}},s8.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{innerBoundaryIs:s8.prototype.innerBoundaryIsParser,outerBoundaryIs:s8.prototype.outerBoundaryIsParser}},s8.prototype.BOX_PARSERS_={"http://www.opengis.net/gml":{coordinates:P6(s8.prototype.readFlatCoordinates)}},s8.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:F6(X6.prototype.readPoint),MultiPoint:F6(X6.prototype.readMultiPoint),LineString:F6(X6.prototype.readLineString),MultiLineString:F6(X6.prototype.readMultiLineString),LinearRing:F6(X6.prototype.readLinearRing),Polygon:F6(X6.prototype.readPolygon),MultiPolygon:F6(X6.prototype.readMultiPolygon),Box:F6(s8.prototype.readBox)}},s8.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:M6(s8.prototype.writeCurveOrLineString),MultiCurve:M6(s8.prototype.writeMultiCurveOrLineString),Point:M6(s8.prototype.writePoint),MultiPoint:M6(s8.prototype.writeMultiPoint),LineString:M6(s8.prototype.writeCurveOrLineString),MultiLineString:M6(s8.prototype.writeMultiCurveOrLineString),LinearRing:M6(s8.prototype.writeLinearRing),Polygon:M6(s8.prototype.writeSurfaceOrPolygon),MultiPolygon:M6(s8.prototype.writeMultiSurfaceOrPolygon),Surface:M6(s8.prototype.writeSurfaceOrPolygon),MultiSurface:M6(s8.prototype.writeMultiSurfaceOrPolygon),Envelope:M6(s8.prototype.writeEnvelope)}},s8.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:M6(s8.prototype.writeLineStringOrCurveMember),curveMember:M6(s8.prototype.writeLineStringOrCurveMember)}},s8.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{outerBoundaryIs:M6(s8.prototype.writeRing),innerBoundaryIs:M6(s8.prototype.writeRing)}},s8.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:M6(s8.prototype.writePointMember)}},s8.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:M6(s8.prototype.writeSurfaceOrPolygonMember),polygonMember:M6(s8.prototype.writeSurfaceOrPolygonMember)}},s8.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:M6(n8),upperCorner:M6(n8)}};const a8=s8;var l8=globalThis&&globalThis.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),u8={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},h8=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,n)||this).surface_=void 0!==n.surface&&n.surface,r.curve_=void 0!==n.curve&&n.curve,r.multiCurve_=void 0===n.multiCurve||n.multiCurve,r.multiSurface_=void 0===n.multiSurface||n.multiSurface,r.schemaLocation=n.schemaLocation?n.schemaLocation:"http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",r.hasZ=void 0!==n.hasZ&&n.hasZ,r}return l8(e,t),e.prototype.readMultiCurve=function(t,e){var r=U6([],this.MULTICURVE_PARSERS,t,e,this);return r?new Vl(r):void 0},e.prototype.readFlatCurveRing=function(t,e){for(var r=U6([],this.MULTICURVE_PARSERS,t,e,this),n=[],i=0,o=r.length;i<o;++i)d(n,r[i].getFlatCoordinates());return n},e.prototype.readMultiSurface=function(t,e){var r=U6([],this.MULTISURFACE_PARSERS,t,e,this);if(r)return new Jl(r)},e.prototype.curveMemberParser=function(t,e){R6(this.CURVEMEMBER_PARSERS,t,e,this)},e.prototype.surfaceMemberParser=function(t,e){R6(this.SURFACEMEMBER_PARSERS,t,e,this)},e.prototype.readPatch=function(t,e){return U6([null],this.PATCHES_PARSERS,t,e,this)},e.prototype.readSegment=function(t,e){return U6([],this.SEGMENTS_PARSERS,t,e,this)},e.prototype.readPolygonPatch=function(t,e){return U6([null],this.FLAT_LINEAR_RINGS_PARSERS,t,e,this)},e.prototype.readLineStringSegment=function(t,e){return U6([null],this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,e,this)},e.prototype.interiorParser=function(t,e){var r=U6(void 0,this.RING_PARSERS,t,e,this);r&&e[e.length-1].push(r)},e.prototype.exteriorParser=function(t,e){var r=U6(void 0,this.RING_PARSERS,t,e,this);r&&(e[e.length-1][0]=r)},e.prototype.readSurface=function(t,e){var r=U6([null],this.SURFACE_PARSERS,t,e,this);if(r&&r[0]){var n,i=r[0],o=[i.length],s=void 0;for(s=1,n=r.length;s<n;++s)d(i,r[s]),o.push(i.length);return new hn(i,"XYZ",o)}},e.prototype.readCurve=function(t,e){var r=U6([null],this.CURVE_PARSERS,t,e,this);return r?new mn(r,"XYZ"):void 0},e.prototype.readEnvelope=function(t,e){var r=U6([null],this.ENVELOPE_PARSERS,t,e,this);return St(r[1][0],r[1][1],r[2][0],r[2][1])},e.prototype.readFlatPos=function(t,e){for(var r,n=C6(t,!1),i=/^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/,o=[];r=i.exec(n);)o.push(parseFloat(r[1])),n=n.substr(r[0].length);if(""===n){var s=e[0].srsName,a="enu";if(s&&(a=Ye(s).getAxisOrientation()),"neu"===a){var l,u=void 0;for(u=0,l=o.length;u<l;u+=3){var h=o[u],c=o[u+1];o[u]=c,o[u+1]=h}}var A=o.length;if(2==A&&o.push(0),0!==A)return o}},e.prototype.readFlatPosList=function(t,e){var r=C6(t,!1).replace(/^\s*|\s*$/g,""),n=e[0],i=n.srsName,o=n.srsDimension,s="enu";i&&(s=Ye(i).getAxisOrientation());var a,l,u,h=r.split(/\s+/),c=2;t.getAttribute("srsDimension")?c=$6(t.getAttribute("srsDimension")):t.getAttribute("dimension")?c=$6(t.getAttribute("dimension")):t.parentNode.getAttribute("srsDimension")?c=$6(t.parentNode.getAttribute("srsDimension")):o&&(c=$6(o));for(var A=[],f=0,p=h.length;f<p;f+=c)a=parseFloat(h[f]),l=parseFloat(h[f+1]),u=3===c?parseFloat(h[f+2]):0,"en"===s.substr(0,2)?A.push(a,l,u):A.push(l,a,u);return A},e.prototype.writePos_=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=i?"3":"2";t.setAttribute("srsDimension",o);var s=n.srsName,a="enu";s&&(a=Ye(s).getAxisOrientation());var l,u=e.getCoordinates();l="en"===a.substr(0,2)?u[0]+" "+u[1]:u[1]+" "+u[0],i&&(l+=" "+(u[2]||0)),n8(t,l)},e.prototype.getCoords_=function(t,e,r){var n="enu";e&&(n=Ye(e).getAxisOrientation());var i="en"===n.substr(0,2)?t[0]+" "+t[1]:t[1]+" "+t[0];return r&&(i+=" "+(t[2]||0)),i},e.prototype.writePosList_=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=i?"3":"2";t.setAttribute("srsDimension",o);for(var s,a=n.srsName,l=e.getCoordinates(),u=l.length,h=new Array(u),c=0;c<u;++c)s=l[c],h[c]=this.getCoords_(s,a,i);n8(t,h.join(" "))},e.prototype.writePoint=function(t,e,r){var n=r[r.length-1].srsName;n&&t.setAttribute("srsName",n);var i=x6(t.namespaceURI,"pos");t.appendChild(i),this.writePos_(i,e,r)},e.prototype.writeEnvelope=function(t,e,r){var n=r[r.length-1].srsName;n&&t.setAttribute("srsName",n);var i=[e[0]+" "+e[1],e[2]+" "+e[3]];D6({node:t},this.ENVELOPE_SERIALIZERS,k6,i,r,["lowerCorner","upperCorner"],this)},e.prototype.writeLinearRing=function(t,e,r){var n=r[r.length-1].srsName;n&&t.setAttribute("srsName",n);var i=x6(t.namespaceURI,"posList");t.appendChild(i),this.writePosList_(i,e,r)},e.prototype.RING_NODE_FACTORY_=function(t,e,r){var n=e[e.length-1],i=n.node,o=n.exteriorWritten;return void 0===o&&(n.exteriorWritten=!0),x6(i.namespaceURI,void 0!==o?"interior":"exterior")},e.prototype.writeSurfaceOrPolygon=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName;if("PolygonPatch"!==t.nodeName&&o&&t.setAttribute("srsName",o),"Polygon"===t.nodeName||"PolygonPatch"===t.nodeName){var s=e.getLinearRings();D6({node:t,hasZ:i,srsName:o},this.RING_SERIALIZERS,this.RING_NODE_FACTORY_,s,r,void 0,this)}else if("Surface"===t.nodeName){var a=x6(t.namespaceURI,"patches");t.appendChild(a),this.writeSurfacePatches_(a,e,r)}},e.prototype.writeCurveOrLineString=function(t,e,r){var n=r[r.length-1].srsName;if("LineStringSegment"!==t.nodeName&&n&&t.setAttribute("srsName",n),"LineString"===t.nodeName||"LineStringSegment"===t.nodeName){var i=x6(t.namespaceURI,"posList");t.appendChild(i),this.writePosList_(i,e,r)}else if("Curve"===t.nodeName){var o=x6(t.namespaceURI,"segments");t.appendChild(o),this.writeCurveSegments_(o,e,r)}},e.prototype.writeMultiSurfaceOrPolygon=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName,s=n.surface;o&&t.setAttribute("srsName",o);var a=e.getPolygons();D6({node:t,hasZ:i,srsName:o,surface:s},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,a,r,void 0,this)},e.prototype.writeMultiPoint=function(t,e,r){var n=r[r.length-1],i=n.srsName,o=n.hasZ;i&&t.setAttribute("srsName",i);var s=e.getPoints();D6({node:t,hasZ:o,srsName:i},this.POINTMEMBER_SERIALIZERS,L6("pointMember"),s,r,void 0,this)},e.prototype.writeMultiCurveOrLineString=function(t,e,r){var n=r[r.length-1],i=n.hasZ,o=n.srsName,s=n.curve;o&&t.setAttribute("srsName",o);var a=e.getLineStrings();D6({node:t,hasZ:i,srsName:o,curve:s},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,a,r,void 0,this)},e.prototype.writeRing=function(t,e,r){var n=x6(t.namespaceURI,"LinearRing");t.appendChild(n),this.writeLinearRing(n,e,r)},e.prototype.writeSurfaceOrPolygonMember=function(t,e,r){var n=this.GEOMETRY_NODE_FACTORY_(e,r);n&&(t.appendChild(n),this.writeSurfaceOrPolygon(n,e,r))},e.prototype.writePointMember=function(t,e,r){var n=x6(t.namespaceURI,"Point");t.appendChild(n),this.writePoint(n,e,r)},e.prototype.writeLineStringOrCurveMember=function(t,e,r){var n=this.GEOMETRY_NODE_FACTORY_(e,r);n&&(t.appendChild(n),this.writeCurveOrLineString(n,e,r))},e.prototype.writeSurfacePatches_=function(t,e,r){var n=x6(t.namespaceURI,"PolygonPatch");t.appendChild(n),this.writeSurfaceOrPolygon(n,e,r)},e.prototype.writeCurveSegments_=function(t,e,r){var n=x6(t.namespaceURI,"LineStringSegment");t.appendChild(n),this.writeCurveOrLineString(n,e,r)},e.prototype.writeGeometryElement=function(t,e,r){var n,i=r[r.length-1],o=_({},i);o.node=t,n=Array.isArray(e)?Ih(e,i):Bh(e,!0,i),D6(o,this.GEOMETRY_SERIALIZERS,this.GEOMETRY_NODE_FACTORY_,[n],r,void 0,this)},e.prototype.writeFeatureElement=function(t,e,r){var n=e.getId();n&&t.setAttribute("fid",n);var i=r[r.length-1],o=i.featureNS,s=e.getGeometryName();i.serializers||(i.serializers={},i.serializers[o]={});var a=[],l=[];if(e.hasProperties()){var u=e.getProperties();for(var h in u){var c=u[h];null!==c&&(a.push(h),l.push(c),h==s||"function"==typeof c.getSimplifiedGeometry?h in i.serializers[o]||(i.serializers[o][h]=M6(this.writeGeometryElement,this)):h in i.serializers[o]||(i.serializers[o][h]=M6(n8)))}}var A=_({},i);A.node=t,D6(A,i.serializers,L6(void 0,o),l,r,a)},e.prototype.writeFeatureMembers_=function(t,e,r){var n=r[r.length-1],i=n.featureType,o=n.featureNS,s={};s[o]={},s[o][i]=M6(this.writeFeatureElement,this);var a=_({},n);a.node=t,D6(a,s,L6(i,o),e,r)},e.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(t,e,r){var n=e[e.length-1].node;return x6(this.namespace,u8[n.nodeName])},e.prototype.GEOMETRY_NODE_FACTORY_=function(t,e,r){var n,i=e[e.length-1],o=i.multiSurface,s=i.surface,a=i.curve,l=i.multiCurve;return Array.isArray(t)?n="Envelope":"MultiPolygon"===(n=t.getType())&&!0===o?n="MultiSurface":"Polygon"===n&&!0===s?n="Surface":"LineString"===n&&!0===a?n="Curve":"MultiLineString"===n&&!0===l&&(n="MultiCurve"),x6(this.namespace,n)},e.prototype.writeGeometryNode=function(t,e){e=this.adaptOptions(e);var r=x6(this.namespace,"geom"),n={node:r,hasZ:this.hasZ,srsName:this.srsName,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_};return e&&_(n,e),this.writeGeometryElement(r,t,[n]),r},e.prototype.writeFeaturesNode=function(t,e){e=this.adaptOptions(e);var r=x6(this.namespace,"featureMembers");r.setAttributeNS(b6,"xsi:schemaLocation",this.schemaLocation);var n={srsName:this.srsName,hasZ:this.hasZ,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_,featureNS:this.featureNS,featureType:this.featureType};return e&&_(n,e),this.writeFeatureMembers_(r,t,[n]),r},e}(X6);h8.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{pos:F6(h8.prototype.readFlatPos),posList:F6(h8.prototype.readFlatPosList),coordinates:F6(a8.prototype.readFlatCoordinates)}},h8.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{interior:h8.prototype.interiorParser,exterior:h8.prototype.exteriorParser}},h8.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:F6(X6.prototype.readPoint),MultiPoint:F6(X6.prototype.readMultiPoint),LineString:F6(X6.prototype.readLineString),MultiLineString:F6(X6.prototype.readMultiLineString),LinearRing:F6(X6.prototype.readLinearRing),Polygon:F6(X6.prototype.readPolygon),MultiPolygon:F6(X6.prototype.readMultiPolygon),Surface:F6(h8.prototype.readSurface),MultiSurface:F6(h8.prototype.readMultiSurface),Curve:F6(h8.prototype.readCurve),MultiCurve:F6(h8.prototype.readMultiCurve),Envelope:F6(h8.prototype.readEnvelope)}},h8.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml":{curveMember:P6(h8.prototype.curveMemberParser),curveMembers:P6(h8.prototype.curveMemberParser)}},h8.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml":{surfaceMember:P6(h8.prototype.surfaceMemberParser),surfaceMembers:P6(h8.prototype.surfaceMemberParser)}},h8.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:P6(X6.prototype.readLineString),Curve:P6(h8.prototype.readCurve)}},h8.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:P6(X6.prototype.readPolygon),Surface:P6(h8.prototype.readSurface)}},h8.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml":{patches:F6(h8.prototype.readPatch)}},h8.prototype.CURVE_PARSERS={"http://www.opengis.net/gml":{segments:F6(h8.prototype.readSegment)}},h8.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml":{lowerCorner:P6(h8.prototype.readFlatPosList),upperCorner:P6(h8.prototype.readFlatPosList)}},h8.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml":{PolygonPatch:F6(h8.prototype.readPolygonPatch)}},h8.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml":{LineStringSegment:I6(h8.prototype.readLineStringSegment)}},X6.prototype.RING_PARSERS={"http://www.opengis.net/gml":{LinearRing:F6(X6.prototype.readFlatLinearRing),Ring:F6(h8.prototype.readFlatCurveRing)}},h8.prototype.writeFeatures,h8.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{exterior:M6(h8.prototype.writeRing),interior:M6(h8.prototype.writeRing)}},h8.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:M6(n8),upperCorner:M6(n8)}},h8.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:M6(h8.prototype.writeSurfaceOrPolygonMember),polygonMember:M6(h8.prototype.writeSurfaceOrPolygonMember)}},h8.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:M6(h8.prototype.writePointMember)}},h8.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:M6(h8.prototype.writeLineStringOrCurveMember),curveMember:M6(h8.prototype.writeLineStringOrCurveMember)}},h8.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:M6(h8.prototype.writeCurveOrLineString),MultiCurve:M6(h8.prototype.writeMultiCurveOrLineString),Point:M6(h8.prototype.writePoint),MultiPoint:M6(h8.prototype.writeMultiPoint),LineString:M6(h8.prototype.writeCurveOrLineString),MultiLineString:M6(h8.prototype.writeMultiCurveOrLineString),LinearRing:M6(h8.prototype.writeLinearRing),Polygon:M6(h8.prototype.writeSurfaceOrPolygon),MultiPolygon:M6(h8.prototype.writeMultiSurfaceOrPolygon),Surface:M6(h8.prototype.writeSurfaceOrPolygon),MultiSurface:M6(h8.prototype.writeMultiSurfaceOrPolygon),Envelope:M6(h8.prototype.writeEnvelope)}};const c8=h8;var A8,f8,p8,d8,g8,y8,m8,v8,_8,w8=globalThis&&globalThis.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),b8=["http://www.google.com/kml/ext/2.2"],x8=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],C8={fraction:"fraction",pixels:"pixels",insetPixels:"pixels"},S8=N6(x8,{ExtendedData:v7,Region:_7,MultiGeometry:T6(h7,"geometry"),LineString:T6(a7,"geometry"),LinearRing:T6(l7,"geometry"),Point:T6(c7,"geometry"),Polygon:T6(f7,"geometry"),Style:T6(d7),StyleMap:function(t,e){var r=q8.call(this,t,e);if(r){var n=e[e.length-1];Array.isArray(r)?n.Style=r:"string"==typeof r?n.styleUrl=r:G(!1,38)}},address:T6(t8),description:T6(t8),name:T6(t8),open:T6(Y6),phoneNumber:T6(t8),styleUrl:T6(z8),visibility:T6(Y6)},N6(b8,{MultiTrack:T6((function(t,e){var r=U6([],t7,t,e);if(r)return new Vl(r)}),"geometry"),Track:T6(r7,"geometry")})),E8=N6(x8,{ExtendedData:v7,Region:_7,Link:function(t,e){R6(B8,t,e)},address:T6(t8),description:T6(t8),name:T6(t8),open:T6(Y6),phoneNumber:T6(t8),visibility:T6(Y6)}),B8=N6(x8,{href:T6(H8)}),I8=N6(x8,{LatLonAltBox:function(t,e){var r=U6({},x7,t,e);if(r){var n=e[e.length-1],i=[parseFloat(r.west),parseFloat(r.south),parseFloat(r.east),parseFloat(r.north)];n.extent=i,n.altitudeMode=r.altitudeMode,n.minAltitude=parseFloat(r.minAltitude),n.maxAltitude=parseFloat(r.maxAltitude)}},Lod:function(t,e){var r=U6({},C7,t,e);if(r){var n=e[e.length-1];n.minLodPixels=parseFloat(r.minLodPixels),n.maxLodPixels=parseFloat(r.maxLodPixels),n.minFadeExtent=parseFloat(r.minFadeExtent),n.maxFadeExtent=parseFloat(r.maxFadeExtent)}}}),P8=N6(x8,["Document","Placemark"]),F8=N6(x8,{Document:M6((function(t,e,r){D6({node:t},P7,F7,e,r,void 0,this)})),Placemark:M6(t9)}),T8=null,M8=null,L8=null,k8=null,O8=null,N8=null;function R8(t){return 32/Math.min(t[0],t[1])}function U8(t){return t}var D8=function(t){function e(e){var r=t.call(this)||this,n=e||{};return N8||(T8=new fn({color:A8=[255,255,255,1]}),y8="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png",M8=new Wo({anchor:f8=[20,2],anchorOrigin:"bottom-left",anchorXUnits:p8="pixels",anchorYUnits:d8="pixels",crossOrigin:"anonymous",rotation:0,scale:R8(g8=[64,64]),size:g8,src:y8}),m8="NO_IMAGE",L8=new vn({color:A8,width:1}),v8=new vn({color:[51,51,51,1],width:2}),k8=new fi({font:"bold 16px Helvetica",fill:T8,stroke:v8,scale:.8}),O8=new Ai({fill:T8,image:M8,text:k8,stroke:L8,zIndex:0}),N8=[O8]),r.dataProjection=Ye("EPSG:4326"),r.defaultStyle_=n.defaultStyle?n.defaultStyle:N8,r.extractStyles_=void 0===n.extractStyles||n.extractStyles,r.writeStyles_=void 0===n.writeStyles||n.writeStyles,r.sharedStyles_={},r.showPointNames_=void 0===n.showPointNames||n.showPointNames,r.crossOrigin_=void 0!==n.crossOrigin?n.crossOrigin:"anonymous",r.iconUrlFunction_=n.iconUrlFunction?n.iconUrlFunction:U8,r.supportedMediaTypes=["application/vnd.google-earth.kml+xml"],r}return w8(e,t),e.prototype.readDocumentOrFolder_=function(t,e){return U6([],N6(x8,{Document:I6(this.readDocumentOrFolder_,this),Folder:I6(this.readDocumentOrFolder_,this),Placemark:P6(this.readPlacemark_,this),Style:this.readSharedStyle_.bind(this),StyleMap:this.readSharedStyleMap_.bind(this)}),t,e,this)||void 0},e.prototype.readPlacemark_=function(t,e){var r,n,i,o,s,a=U6({geometry:null},S8,t,e,this);if(a){var l=new z,u=t.getAttribute("id");null!==u&&l.setId(u);var h=e[0],c=a.geometry;if(c&&Bh(c,!1,h),l.setGeometry(c),delete a.geometry,this.extractStyles_){var A=(r=a.Style,n=a.styleUrl,i=this.defaultStyle_,o=this.sharedStyles_,s=this.showPointNames_,function(t,e){var a=s,l="",u=[];if(a){var h=t.getGeometry();if(h)if(h instanceof $h)a=(u=h.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return"Point"===e||"MultiPoint"===e}))).length>0;else{var c=h.getType();a="Point"===c||"MultiPoint"===c}}a&&(l=t.get("name"),(a=a&&!!l)&&l.search(/&[^&]+;/)>-1&&(_8||(_8=document.createElement("textarea")),_8.innerHTML=l,l=_8.value));var A=i;if(r?A=r:n&&(A=Q8(n,i,o)),a){var f=function(t,e){var r=[0,0],n="start",i=t.getImage();if(i){var o=i.getSize();if(o&&2==o.length){var s=i.getScaleArray(),a=i.getAnchor();r[0]=s[0]*(o[0]-a[0]),r[1]=s[1]*(o[1]/2-a[1]),n="left"}}var l=t.getText();return l?((l=l.clone()).setFont(l.getFont()||k8.getFont()),l.setScale(l.getScale()||k8.getScale()),l.setFill(l.getFill()||k8.getFill()),l.setStroke(l.getStroke()||v8)):l=k8.clone(),l.setText(e),l.setOffsetX(r[0]),l.setOffsetY(r[1]),l.setTextAlign(n),new Ai({image:i,text:l})}(A[0],l);return u.length>0?(f.setGeometry(new $h(u)),[f,new Ai({geometry:A[0].getGeometry(),image:null,fill:A[0].getFill(),stroke:A[0].getStroke(),text:null})].concat(A.slice(1))):f}return A});l.setStyle(A)}return delete a.Style,l.setProperties(a,!0),l}},e.prototype.readSharedStyle_=function(t,e){var r=t.getAttribute("id");if(null!==r){var n=d7.call(this,t,e);if(n){var i,o=t.baseURI;o&&"about:blank"!=o||(o=window.location.href),i=o?new URL("#"+r,o).href:"#"+r,this.sharedStyles_[i]=n}}},e.prototype.readSharedStyleMap_=function(t,e){var r=t.getAttribute("id");if(null!==r){var n=q8.call(this,t,e);if(n){var i,o=t.baseURI;o&&"about:blank"!=o||(o=window.location.href),i=o?new URL("#"+r,o).href:"#"+r,this.sharedStyles_[i]=n}}},e.prototype.readFeatureFromNode=function(t,e){return A(x8,t.namespaceURI)&&this.readPlacemark_(t,[this.getReadOptions(t,e)])||null},e.prototype.readFeaturesFromNode=function(t,e){if(!A(x8,t.namespaceURI))return[];var r,n=t.localName;if("Document"==n||"Folder"==n)return(r=this.readDocumentOrFolder_(t,[this.getReadOptions(t,e)]))||[];if("Placemark"==n){var i=this.readPlacemark_(t,[this.getReadOptions(t,e)]);return i?[i]:[]}if("kml"==n){r=[];for(var o=t.firstElementChild;o;o=o.nextElementSibling){var s=this.readFeaturesFromNode(o,e);s&&d(r,s)}return r}return[]},e.prototype.readName=function(t){if(t){if("string"==typeof t){var e=B6(t);return this.readNameFromDocument(e)}return E6(t)?this.readNameFromDocument(t):this.readNameFromNode(t)}},e.prototype.readNameFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE){var r=this.readNameFromNode(e);if(r)return r}},e.prototype.readNameFromNode=function(t){for(var e=t.firstElementChild;e;e=e.nextElementSibling)if(A(x8,e.namespaceURI)&&"name"==e.localName)return t8(e);for(e=t.firstElementChild;e;e=e.nextElementSibling){var r=e.localName;if(A(x8,e.namespaceURI)&&("Document"==r||"Folder"==r||"Placemark"==r||"kml"==r)){var n=this.readNameFromNode(e);if(n)return n}}},e.prototype.readNetworkLinks=function(t){var e=[];if("string"==typeof t){var r=B6(t);d(e,this.readNetworkLinksFromDocument(r))}else E6(t)?d(e,this.readNetworkLinksFromDocument(t)):d(e,this.readNetworkLinksFromNode(t));return e},e.prototype.readNetworkLinksFromDocument=function(t){for(var e=[],r=t.firstChild;r;r=r.nextSibling)r.nodeType==Node.ELEMENT_NODE&&d(e,this.readNetworkLinksFromNode(r));return e},e.prototype.readNetworkLinksFromNode=function(t){for(var e=[],r=t.firstElementChild;r;r=r.nextElementSibling)if(A(x8,r.namespaceURI)&&"NetworkLink"==r.localName){var n=U6({},E8,r,[]);e.push(n)}for(r=t.firstElementChild;r;r=r.nextElementSibling){var i=r.localName;!A(x8,r.namespaceURI)||"Document"!=i&&"Folder"!=i&&"kml"!=i||d(e,this.readNetworkLinksFromNode(r))}return e},e.prototype.readRegion=function(t){var e=[];if("string"==typeof t){var r=B6(t);d(e,this.readRegionFromDocument(r))}else E6(t)?d(e,this.readRegionFromDocument(t)):d(e,this.readRegionFromNode(t));return e},e.prototype.readRegionFromDocument=function(t){for(var e=[],r=t.firstChild;r;r=r.nextSibling)r.nodeType==Node.ELEMENT_NODE&&d(e,this.readRegionFromNode(r));return e},e.prototype.readRegionFromNode=function(t){for(var e=[],r=t.firstElementChild;r;r=r.nextElementSibling)if(A(x8,r.namespaceURI)&&"Region"==r.localName){var n=U6({},I8,r,[]);e.push(n)}for(r=t.firstElementChild;r;r=r.nextElementSibling){var i=r.localName;!A(x8,r.namespaceURI)||"Document"!=i&&"Folder"!=i&&"kml"!=i||d(e,this.readRegionFromNode(r))}return e},e.prototype.writeFeaturesNode=function(t,e){e=this.adaptOptions(e);var r=x6(x8[4],"kml"),n="http://www.w3.org/2000/xmlns/";r.setAttributeNS(n,"xmlns:gx",b8[0]),r.setAttributeNS(n,"xmlns:xsi",b6),r.setAttributeNS(b6,"xsi:schemaLocation","http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd");var i={node:r},o={};t.length>1?o.Document=t:1==t.length&&(o.Placemark=t[0]);var s=P8[r.namespaceURI],a=O6(o,s);return D6(i,F8,k6,a,[e],s,this),r},e}(z6);function Q8(t,e,r){return Array.isArray(t)?t:"string"==typeof t?Q8(r[t],e,r):e}function G8(t){var e=C6(t,!1),r=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(e);if(r){var n=r[1];return[parseInt(n.substr(6,2),16),parseInt(n.substr(4,2),16),parseInt(n.substr(2,2),16),parseInt(n.substr(0,2),16)/255]}}function j8(t){var e=C6(t,!1),r=[];e=e.replace(/\s*,\s*/g,",");for(var n,i=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?),([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|,|$)(?:([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|$))?\s*/i;n=i.exec(e);){var o=parseFloat(n[1]),s=parseFloat(n[2]),a=n[3]?parseFloat(n[3]):0;r.push(o,s,a),e=e.substr(n[0].length)}if(""===e)return r}function H8(t){var e=C6(t,!1).trim(),r=t.baseURI;return r&&"about:blank"!=r||(r=window.location.href),r?new URL(e,r).href:e}function z8(t){var e=C6(t,!1).trim().replace(/^(?!.*#)/,"#"),r=t.baseURI;return r&&"about:blank"!=r||(r=window.location.href),r?new URL(e,r).href:e}function V8(t){return Z6(t)}var K8=N6(x8,{Pair:function(t,e){var r=U6({},w7,t,e,this);if(r){var n=r.key;if(n&&"normal"==n){var i=r.styleUrl;i&&(e[e.length-1]=i);var o=r.Style;o&&(e[e.length-1]=o)}}}});function q8(t,e){return U6(void 0,K8,t,e,this)}var W8=N6(x8,{Icon:T6((function(t,e){return U6({},n7,t,e)||null})),color:T6(G8),heading:T6(Z6),hotSpot:T6((function(t){var e,r=t.getAttribute("xunits"),n=t.getAttribute("yunits");return e="insetPixels"!==r?"insetPixels"!==n?"bottom-left":"top-left":"insetPixels"!==n?"bottom-right":"top-right",{x:parseFloat(t.getAttribute("x")),xunits:C8[r],y:parseFloat(t.getAttribute("y")),yunits:C8[n],origin:e}})),scale:T6(V8)}),X8=N6(x8,{color:T6(G8),scale:T6(V8)}),Y8=N6(x8,{color:T6(G8),width:T6(Z6)}),Z8=N6(x8,{color:T6(G8),fill:T6(Y6),outline:T6(Y6)}),J8=N6(x8,{coordinates:F6(j8)});function $8(t,e){return U6(null,J8,t,e)}var t7=N6(b8,{Track:P6(r7)}),e7=N6(x8,{when:function(t,e){var r=e[e.length-1].whens,n=C6(t,!1),i=Date.parse(n);r.push(isNaN(i)?0:i)}},N6(b8,{coord:function(t,e){var r=e[e.length-1].coordinates,n=C6(t,!1),i=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i.exec(n);if(i){var o=parseFloat(i[1]),s=parseFloat(i[2]),a=parseFloat(i[3]);r.push([o,s,a])}else r.push([])}}));function r7(t,e){var r=U6({coordinates:[],whens:[]},e7,t,e);if(r){for(var n=[],i=r.coordinates,o=r.whens,s=0,a=Math.min(i.length,o.length);s<a;++s)3==i[s].length&&n.push(i[s][0],i[s][1],i[s][2],o[s]);return new mn(n,"XYZM")}}var n7=N6(x8,{href:T6(H8)},N6(b8,{x:T6(Z6),y:T6(Z6),w:T6(Z6),h:T6(Z6)})),i7=N6(x8,{coordinates:F6(j8)});function o7(t,e){return U6(null,i7,t,e)}var s7=N6(x8,{extrude:T6(Y6),tessellate:T6(Y6),altitudeMode:T6(t8)});function a7(t,e){var r=U6({},s7,t,e),n=o7(t,e);if(n){var i=new mn(n,"XYZ");return i.setProperties(r,!0),i}}function l7(t,e){var r=U6({},s7,t,e),n=o7(t,e);if(n){var i=new hn(n,"XYZ",[n.length]);return i.setProperties(r,!0),i}}var u7=N6(x8,{LineString:P6(a7),LinearRing:P6(l7),MultiGeometry:P6(h7),Point:P6(c7),Polygon:P6(f7)});function h7(t,e){var r,n=U6([],u7,t,e);if(!n)return null;if(0===n.length)return new $h(n);for(var i=!0,o=n[0].getType(),s=1,a=n.length;s<a;++s)if(n[s].getType()!=o){i=!1;break}if(i){var l=void 0,u=void 0;if("Point"==o){var h=n[0];for(l=h.getLayout(),u=h.getFlatCoordinates(),s=1,a=n.length;s<a;++s)d(u,n[s].getFlatCoordinates());g7(r=new Wl(u,l),n)}else"LineString"==o?g7(r=new Vl(n),n):"Polygon"==o?g7(r=new Jl(n),n):"GeometryCollection"==o?r=new $h(n):G(!1,37)}else r=new $h(n);return r}function c7(t,e){var r=U6({},s7,t,e),n=o7(t,e);if(n){var i=new Vr(n,"XYZ");return i.setProperties(r,!0),i}}var A7=N6(x8,{innerBoundaryIs:function(t,e){var r=U6([],S7,t,e);if(r.length>0){var n=e[e.length-1];n.push.apply(n,r)}},outerBoundaryIs:function(t,e){var r=U6(void 0,E7,t,e);r&&(e[e.length-1][0]=r)}});function f7(t,e){var r=U6({},s7,t,e),n=U6([null],A7,t,e);if(n&&n[0]){for(var i=n[0],o=[i.length],s=1,a=n.length;s<a;++s)d(i,n[s]),o.push(i.length);var l=new hn(i,"XYZ",o);return l.setProperties(r,!0),l}}var p7=N6(x8,{IconStyle:function(t,e){var r=U6({},W8,t,e);if(r){var n,i,o,s,a=e[e.length-1],l="Icon"in r?r.Icon:{},u=!("Icon"in r)||Object.keys(l).length>0,h=l.href;h?n=h:u&&(n=y8);var c,A="bottom-left",f=r.hotSpot;f?(i=[f.x,f.y],o=f.xunits,s=f.yunits,A=f.origin):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(n)&&(/pushpin/.test(n)?(i=f8,o=p8,s=d8):/arrow-reverse/.test(n)?(i=[54,42],o=p8,s=d8):/paddle/.test(n)&&(i=[32,1],o=p8,s=d8));var p,d=l.x,g=l.y;void 0!==d&&void 0!==g&&(c=[d,g]);var y,m=l.w,v=l.h;void 0!==m&&void 0!==v&&(p=[m,v]);var _=r.heading;void 0!==_&&(y=ie(_));var w=r.scale,b=r.color;if(u){n==y8&&(p=g8);var x=new Wo({anchor:i,anchorOrigin:A,anchorXUnits:o,anchorYUnits:s,crossOrigin:this.crossOrigin_,offset:c,offsetOrigin:"bottom-left",rotation:y,scale:w,size:p,src:this.iconUrlFunction_(n),color:b}),C=x.getScaleArray()[0],S=x.getSize();if(null===S){var E=x.getImageState();if(0===E||1===E){var B=function(){var t=x.getImageState();if(0!==t&&1!==t){var e=x.getSize();if(e&&2==e.length){var r=R8(e);x.setScale(C*r)}x.unlistenImageChange(B)}};x.listenImageChange(B),0===E&&x.load()}}else if(2==S.length){var I=R8(S);x.setScale(C*I)}a.imageStyle=x}else a.imageStyle=m8}},LabelStyle:function(t,e){var r=U6({},X8,t,e);if(r){var n=e[e.length-1],i=new fi({fill:new fn({color:"color"in r?r.color:A8}),scale:r.scale});n.textStyle=i}},LineStyle:function(t,e){var r=U6({},Y8,t,e);if(r){var n=e[e.length-1],i=new vn({color:"color"in r?r.color:A8,width:"width"in r?r.width:1});n.strokeStyle=i}},PolyStyle:function(t,e){var r=U6({},Z8,t,e);if(r){var n=e[e.length-1],i=new fn({color:"color"in r?r.color:A8});n.fillStyle=i;var o=r.fill;void 0!==o&&(n.fill=o);var s=r.outline;void 0!==s&&(n.outline=s)}}});function d7(t,e){var r=U6({},p7,t,e,this);if(!r)return null;var n,i="fillStyle"in r?r.fillStyle:T8,o=r.fill;void 0===o||o||(i=null),"imageStyle"in r?r.imageStyle!=m8&&(n=r.imageStyle):n=M8;var s="textStyle"in r?r.textStyle:k8,a="strokeStyle"in r?r.strokeStyle:L8,l=r.outline;return void 0===l||l?[new Ai({fill:i,image:n,stroke:a,text:s,zIndex:void 0})]:[new Ai({geometry:function(t){var e=t.getGeometry(),r=e.getType();return"GeometryCollection"===r?new $h(e.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return"Polygon"!==e&&"MultiPolygon"!==e}))):"Polygon"!==r&&"MultiPolygon"!==r?e:void 0},fill:i,image:n,stroke:a,text:s,zIndex:void 0}),new Ai({geometry:function(t){var e=t.getGeometry(),r=e.getType();return"GeometryCollection"===r?new $h(e.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return"Polygon"===e||"MultiPolygon"===e}))):"Polygon"===r||"MultiPolygon"===r?e:void 0},fill:i,stroke:null,zIndex:void 0})]}function g7(t,e){var r,n,i,o=e.length,s=new Array(e.length),a=new Array(e.length),l=new Array(e.length);r=!1,n=!1,i=!1;for(var u=0;u<o;++u){var h=e[u];s[u]=h.get("extrude"),a[u]=h.get("tessellate"),l[u]=h.get("altitudeMode"),r=r||void 0!==s[u],n=n||void 0!==a[u],i=i||l[u]}r&&t.set("extrude",s),n&&t.set("tessellate",a),i&&t.set("altitudeMode",l)}var y7=N6(x8,{displayName:T6(t8),value:T6(t8)}),m7=N6(x8,{Data:function(t,e){var r=t.getAttribute("name");R6(y7,t,e);var n=e[e.length-1];r&&n.displayName?n[r]={value:n.value,displayName:n.displayName,toString:function(){return n.value}}:null!==r?n[r]=n.value:null!==n.displayName&&(n[n.displayName]=n.value),delete n.value},SchemaData:function(t,e){R6(b7,t,e)}});function v7(t,e){R6(m7,t,e)}function _7(t,e){R6(I8,t,e)}var w7=N6(x8,{Style:T6(d7),key:T6(t8),styleUrl:T6(z8)}),b7=N6(x8,{SimpleData:function(t,e){var r=t.getAttribute("name");if(null!==r){var n=t8(t);e[e.length-1][r]=n}}}),x7=N6(x8,{altitudeMode:T6(t8),minAltitude:T6(Z6),maxAltitude:T6(Z6),north:T6(Z6),south:T6(Z6),east:T6(Z6),west:T6(Z6)}),C7=N6(x8,{minLodPixels:T6(Z6),maxLodPixels:T6(Z6),minFadeExtent:T6(Z6),maxFadeExtent:T6(Z6)}),S7=N6(x8,{LinearRing:P6($8)}),E7=N6(x8,{LinearRing:F6($8)});function B7(t,e){for(var r=Fn(e),n=[255*(4==r.length?r[3]:1),r[2],r[1],r[0]],i=0;i<4;++i){var o=Math.floor(n[i]).toString(16);n[i]=1==o.length?"0"+o:o}n8(t,n.join(""))}var I7=N6(x8,{Data:M6((function(t,e,r){t.setAttribute("name",e.name);var n={node:t},i=e.value;"object"==typeof i?(null!==i&&i.displayName&&D6(n,I7,k6,[i.displayName],r,["displayName"]),null!==i&&i.value&&D6(n,I7,k6,[i.value],r,["value"])):D6(n,I7,k6,[i],r,["value"])})),value:M6((function(t,e){n8(t,e)})),displayName:M6((function(t,e){!function(t,e){t.appendChild(j6().createCDATASection(e))}(t,e)}))}),P7=N6(x8,{Placemark:M6(t9)}),F7=function(t,e,r){return x6(e[e.length-1].node.namespaceURI,"Placemark")},T7=L6("Data"),M7=N6(x8,["href"],N6(b8,["x","y","w","h"])),L7=N6(x8,{href:M6(n8)},N6(b8,{x:M6(r8),y:M6(r8),w:M6(r8),h:M6(r8)})),k7=function(t,e,r){return x6(b8[0],"gx:"+r)},O7=N6(x8,["scale","heading","Icon","color","hotSpot"]),N7=N6(x8,{Icon:M6((function(t,e,r){var n={node:t},i=r[r.length-1].node,o=M7[i.namespaceURI],s=O6(e,o);D6(n,L7,k6,s,r,o),s=O6(e,o=M7[b8[0]]),D6(n,L7,k7,s,r,o)})),color:M6(B7),heading:M6(r8),hotSpot:M6((function(t,e){t.setAttribute("x",String(e.x)),t.setAttribute("y",String(e.y)),t.setAttribute("xunits",e.xunits),t.setAttribute("yunits",e.yunits)})),scale:M6(h9)}),R7=N6(x8,["color","scale"]),U7=N6(x8,{color:M6(B7),scale:M6(h9)}),D7=N6(x8,["color","width"]),Q7=N6(x8,{color:M6(B7),width:M6(r8)}),G7={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},j7=function(t,e,r){if(t)return x6(e[e.length-1].node.namespaceURI,G7[t.getType()])},H7=L6("Point"),z7=L6("LineString"),V7=L6("LinearRing"),K7=L6("Polygon"),q7=N6(x8,{LineString:M6(n9),Point:M6(n9),Polygon:M6(l9),GeometryCollection:M6(W7)});function W7(t,e,r){var n,i={node:t},o=e.getType(),s=[];"GeometryCollection"===o?(e.getGeometriesArrayRecursive().forEach((function(t){var e=t.getType();"MultiPoint"===e?s=s.concat(t.getPoints()):"MultiLineString"===e?s=s.concat(t.getLineStrings()):"MultiPolygon"===e?s=s.concat(t.getPolygons()):"Point"===e||"LineString"===e||"Polygon"===e?s.push(t):G(!1,39)})),n=j7):"MultiPoint"===o?(s=e.getPoints(),n=H7):"MultiLineString"===o?(s=e.getLineStrings(),n=z7):"MultiPolygon"===o?(s=e.getPolygons(),n=K7):G(!1,39),D6(i,q7,n,s,r)}var X7=N6(x8,{LinearRing:M6(n9)});function Y7(t,e,r){D6({node:t},X7,V7,[e],r)}var Z7=N6(x8,{ExtendedData:M6((function(t,e,r){for(var n={node:t},i=e.names,o=e.values,s=i.length,a=0;a<s;a++)D6(n,I7,T7,[{name:i[a],value:o[a]}],r)})),MultiGeometry:M6(W7),LineString:M6(n9),LinearRing:M6(n9),Point:M6(n9),Polygon:M6(l9),Style:M6((function(t,e,r){var n,i={node:t},o={};if(e.pointStyles.length){var s=e.pointStyles[0].getText();s&&(o.LabelStyle=s);var a=e.pointStyles[0].getImage();a&&"function"==typeof a.getSrc&&(o.IconStyle=a)}e.lineStyles.length&&(n=e.lineStyles[0].getStroke())&&(o.LineStyle=n),e.polyStyles.length&&((n=e.polyStyles[0].getStroke())&&!o.LineStyle&&(o.LineStyle=n),o.PolyStyle=e.polyStyles[0]);var l=r[r.length-1].node,u=c9[l.namespaceURI],h=O6(o,u);D6(i,A9,k6,h,r,u)})),address:M6(n8),description:M6(n8),name:M6(n8),open:M6(e8),phoneNumber:M6(n8),styleUrl:M6(n8),visibility:M6(e8)}),J7=N6(x8,["name","open","visibility","address","phoneNumber","description","styleUrl","Style"]),$7=L6("ExtendedData");function t9(t,e,r){var n={node:t};e.getId()&&t.setAttribute("id",e.getId());var i=e.getProperties(),o={address:1,description:1,name:1,open:1,phoneNumber:1,styleUrl:1,visibility:1};o[e.getGeometryName()]=1;var s=Object.keys(i||{}).sort().filter((function(t){return!o[t]})),a=e.getStyleFunction();if(a){var l=a(e,0);if(l){var u=Array.isArray(l)?l:[l],h=u;if(e.getGeometry()&&(h=u.filter((function(t){var r=t.getGeometryFunction()(e);if(r){var n=r.getType();return"GeometryCollection"===n?r.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return"Point"===e||"MultiPoint"===e})).length:"Point"===n||"MultiPoint"===n}}))),this.writeStyles_){var c=u,A=u;e.getGeometry()&&(c=u.filter((function(t){var r=t.getGeometryFunction()(e);if(r){var n=r.getType();return"GeometryCollection"===n?r.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return"LineString"===e||"MultiLineString"===e})).length:"LineString"===n||"MultiLineString"===n}})),A=u.filter((function(t){var r=t.getGeometryFunction()(e);if(r){var n=r.getType();return"GeometryCollection"===n?r.getGeometriesArrayRecursive().filter((function(t){var e=t.getType();return"Polygon"===e||"MultiPolygon"===e})).length:"Polygon"===n||"MultiPolygon"===n}}))),i.Style={pointStyles:h,lineStyles:c,polyStyles:A}}if(h.length&&void 0===i.name){var f=h[0].getText();f&&(i.name=f.getText())}}}var p=r[r.length-1].node,d=J7[p.namespaceURI],g=O6(i,d);if(D6(n,Z7,k6,g,r,d),s.length>0){var y=O6(i,s);D6(n,Z7,$7,[{names:s,values:y}],r)}var m=r[0],v=e.getGeometry();v&&(v=Bh(v,!0,m)),D6(n,Z7,j7,[v],r)}var e9=N6(x8,["extrude","tessellate","altitudeMode","coordinates"]),r9=N6(x8,{extrude:M6(e8),tessellate:M6(e8),altitudeMode:M6(n8),coordinates:M6((function(t,e,r){var n,i=r[r.length-1],o=i.layout,s=i.stride;"XY"==o||"XYM"==o?n=2:"XYZ"==o||"XYZM"==o?n=3:G(!1,34);var a=e.length,l="";if(a>0){l+=e[0];for(var u=1;u<n;++u)l+=","+e[u];for(var h=s;h<a;h+=s)for(l+=" "+e[h],u=1;u<n;++u)l+=","+e[h+u]}n8(t,l)}))});function n9(t,e,r){var n=e.getFlatCoordinates(),i={node:t};i.layout=e.getLayout(),i.stride=e.getStride();var o=e.getProperties();o.coordinates=n;var s=r[r.length-1].node,a=e9[s.namespaceURI],l=O6(o,a);D6(i,r9,k6,l,r,a)}var i9=N6(x8,["color","fill","outline"]),o9=N6(x8,{outerBoundaryIs:M6(Y7),innerBoundaryIs:M6(Y7)}),s9=L6("innerBoundaryIs"),a9=L6("outerBoundaryIs");function l9(t,e,r){var n=e.getLinearRings(),i=n.shift(),o={node:t};D6(o,o9,s9,n,r),D6(o,o9,a9,[i],r)}var u9=N6(x8,{color:M6(B7),fill:M6(e8),outline:M6(e8)});function h9(t,e){r8(t,Math.round(1e6*e)/1e6)}var c9=N6(x8,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),A9=N6(x8,{IconStyle:M6((function(t,e,r){var n={node:t},i={},o=e.getSrc(),s=e.getSize(),a=e.getImageSize(),l={href:o};if(s){l.w=s[0],l.h=s[1];var u=e.getAnchor(),h=e.getOrigin();if(h&&a&&0!==h[0]&&h[1]!==s[1]&&(l.x=h[0],l.y=a[1]-(h[1]+s[1])),u&&(u[0]!==s[0]/2||u[1]!==s[1]/2)){var c={x:u[0],xunits:"pixels",y:s[1]-u[1],yunits:"pixels"};i.hotSpot=c}}i.Icon=l;var A=e.getScaleArray()[0],f=s;null===f&&(f=g8),2==f.length&&(A/=R8(f)),1!==A&&(i.scale=A);var p=e.getRotation();0!==p&&(i.heading=p);var d=e.getColor();d&&(i.color=d);var g=r[r.length-1].node,y=O7[g.namespaceURI],m=O6(i,y);D6(n,N7,k6,m,r,y)})),LabelStyle:M6((function(t,e,r){var n={node:t},i={},o=e.getFill();o&&(i.color=o.getColor());var s=e.getScale();s&&1!==s&&(i.scale=s);var a=r[r.length-1].node,l=R7[a.namespaceURI],u=O6(i,l);D6(n,U7,k6,u,r,l)})),LineStyle:M6((function(t,e,r){var n={node:t},i={color:e.getColor(),width:Number(e.getWidth())||1},o=r[r.length-1].node,s=D7[o.namespaceURI],a=O6(i,s);D6(n,Q7,k6,a,r,s)})),PolyStyle:M6((function(t,e,r){var n={node:t},i=e.getFill(),o=e.getStroke(),s={color:i?i.getColor():void 0,fill:!!i&&void 0,outline:!!o&&void 0},a=r[r.length-1].node,l=i9[a.namespaceURI],u=O6(s,l);D6(n,u9,k6,u,r,l)}))});const f9=D8;var p9=globalThis&&globalThis.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),d9=function(t){function e(e){var r=this,n=e||{};return(r=t.call(this,n)||this).schemaLocation=n.schemaLocation?n.schemaLocation:r.namespace+" http://schemas.opengis.net/gml/3.2.1/gml.xsd",r}return p9(e,t),e}(c8);d9.prototype.namespace="http://www.opengis.net/gml/3.2",d9.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml/3.2":{pos:F6(c8.prototype.readFlatPos),posList:F6(c8.prototype.readFlatPosList),coordinates:F6(a8.prototype.readFlatCoordinates)}},d9.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml/3.2":{interior:c8.prototype.interiorParser,exterior:c8.prototype.exteriorParser}},d9.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml/3.2":{Point:F6(X6.prototype.readPoint),MultiPoint:F6(X6.prototype.readMultiPoint),LineString:F6(X6.prototype.readLineString),MultiLineString:F6(X6.prototype.readMultiLineString),LinearRing:F6(X6.prototype.readLinearRing),Polygon:F6(X6.prototype.readPolygon),MultiPolygon:F6(X6.prototype.readMultiPolygon),Surface:F6(d9.prototype.readSurface),MultiSurface:F6(c8.prototype.readMultiSurface),Curve:F6(d9.prototype.readCurve),MultiCurve:F6(c8.prototype.readMultiCurve),Envelope:F6(d9.prototype.readEnvelope)}},d9.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml/3.2":{curveMember:P6(c8.prototype.curveMemberParser),curveMembers:P6(c8.prototype.curveMemberParser)}},d9.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{surfaceMember:P6(c8.prototype.surfaceMemberParser),surfaceMembers:P6(c8.prototype.surfaceMemberParser)}},d9.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:P6(X6.prototype.readLineString),Curve:P6(c8.prototype.readCurve)}},d9.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:P6(X6.prototype.readPolygon),Surface:P6(c8.prototype.readSurface)}},d9.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{patches:F6(c8.prototype.readPatch)}},d9.prototype.CURVE_PARSERS={"http://www.opengis.net/gml/3.2":{segments:F6(c8.prototype.readSegment)}},d9.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml/3.2":{lowerCorner:P6(c8.prototype.readFlatPosList),upperCorner:P6(c8.prototype.readFlatPosList)}},d9.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml/3.2":{PolygonPatch:F6(c8.prototype.readPolygonPatch)}},d9.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml/3.2":{LineStringSegment:I6(c8.prototype.readLineStringSegment)}},d9.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml/3.2":{pointMember:P6(X6.prototype.pointMemberParser),pointMembers:P6(X6.prototype.pointMemberParser)}},d9.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml/3.2":{lineStringMember:P6(X6.prototype.lineStringMemberParser),lineStringMembers:P6(X6.prototype.lineStringMemberParser)}},d9.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml/3.2":{polygonMember:P6(X6.prototype.polygonMemberParser),polygonMembers:P6(X6.prototype.polygonMemberParser)}},d9.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Point:P6(X6.prototype.readFlatCoordinatesFromNode)}},d9.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:P6(X6.prototype.readLineString)}},d9.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:P6(X6.prototype.readPolygon)}},d9.prototype.RING_PARSERS={"http://www.opengis.net/gml/3.2":{LinearRing:F6(X6.prototype.readFlatLinearRing),Ring:F6(d9.prototype.readFlatCurveRing)}},d9.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml/3.2":{exterior:M6(c8.prototype.writeRing),interior:M6(c8.prototype.writeRing)}},d9.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lowerCorner:M6(n8),upperCorner:M6(n8)}},d9.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{surfaceMember:M6(c8.prototype.writeSurfaceOrPolygonMember),polygonMember:M6(c8.prototype.writeSurfaceOrPolygonMember)}},d9.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{pointMember:M6(c8.prototype.writePointMember)}},d9.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lineStringMember:M6(c8.prototype.writeLineStringOrCurveMember),curveMember:M6(c8.prototype.writeLineStringOrCurveMember)}},d9.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml/3.2":{Curve:M6(c8.prototype.writeCurveOrLineString),MultiCurve:M6(c8.prototype.writeMultiCurveOrLineString),Point:M6(d9.prototype.writePoint),MultiPoint:M6(c8.prototype.writeMultiPoint),LineString:M6(c8.prototype.writeCurveOrLineString),MultiLineString:M6(c8.prototype.writeMultiCurveOrLineString),LinearRing:M6(c8.prototype.writeLinearRing),Polygon:M6(c8.prototype.writeSurfaceOrPolygon),MultiPolygon:M6(c8.prototype.writeMultiSurfaceOrPolygon),Surface:M6(c8.prototype.writeSurfaceOrPolygon),MultiSurface:M6(c8.prototype.writeMultiSurfaceOrPolygon),Envelope:M6(c8.prototype.writeEnvelope)}};const g9=d9,y9=function(){function t(t){this.tagName_=t}return t.prototype.getTagName=function(){return this.tagName_},t}();var m9=globalThis&&globalThis.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();const v9=function(t){function e(e,r){var n=t.call(this,e)||this;return n.conditions=r,G(n.conditions.length>=2,57),n}return m9(e,t),e}(y9);var _9=globalThis&&globalThis.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();const w9=function(t){function e(e){return t.call(this,"And",Array.prototype.slice.call(arguments))||this}return _9(e,t),e}(v9);var b9=globalThis&&globalThis.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();const x9=function(t){function e(e,r,n){var i=t.call(this,"BBOX")||this;if(i.geometryName=e,i.extent=r,4!==r.length)throw new Error("Expected an extent with four values ([minX, minY, maxX, maxY])");return i.srsName=n,i}return b9(e,t),e}(y9);var C9=globalThis&&globalThis.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),S9={"http://www.opengis.net/gml":{boundedBy:T6(X6.prototype.readExtentElement,"bounds")},"http://www.opengis.net/wfs/2.0":{member:P6(X6.prototype.readFeaturesInternal)}},E9={"http://www.opengis.net/wfs":{totalInserted:T6(J6),totalUpdated:T6(J6),totalDeleted:T6(J6)},"http://www.opengis.net/wfs/2.0":{totalInserted:T6(J6),totalUpdated:T6(J6),totalDeleted:T6(J6)}},B9={"http://www.opengis.net/wfs":{TransactionSummary:T6(U9,"transactionSummary"),InsertResults:T6(j9,"insertIds")},"http://www.opengis.net/wfs/2.0":{TransactionSummary:T6(U9,"transactionSummary"),InsertResults:T6(j9,"insertIds")}},I9={"http://www.opengis.net/wfs":{PropertyName:M6(n8)},"http://www.opengis.net/wfs/2.0":{PropertyName:M6(n8)}},P9={"http://www.opengis.net/wfs":{Insert:M6(H9),Update:M6(q9),Delete:M6(K9),Property:M6(W9),Native:M6(X9)},"http://www.opengis.net/wfs/2.0":{Insert:M6(H9),Update:M6(q9),Delete:M6(K9),Property:M6(W9),Native:M6(X9)}},F9="http://www.w3.org/2000/xmlns/",T9={"2.0.0":"http://www.opengis.net/ogc/1.1","1.1.0":"http://www.opengis.net/ogc","1.0.0":"http://www.opengis.net/ogc"},M9={"2.0.0":"http://www.opengis.net/wfs/2.0","1.1.0":"http://www.opengis.net/wfs","1.0.0":"http://www.opengis.net/wfs"},L9={"2.0.0":"http://www.opengis.net/fes/2.0","1.1.0":"http://www.opengis.net/fes","1.0.0":"http://www.opengis.net/fes"},k9={"2.0.0":"http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd","1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.0.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"},O9={"2.0.0":g9,"1.1.0":c8,"1.0.0":a8},N9=function(t){function e(e){var r=t.call(this)||this,n=e||{};return r.version_=n.version?n.version:"1.1.0",r.featureType_=n.featureType,r.featureNS_=n.featureNS,r.gmlFormat_=n.gmlFormat?n.gmlFormat:new O9[r.version_],r.schemaLocation_=n.schemaLocation?n.schemaLocation:k9[r.version_],r}return C9(e,t),e.prototype.getFeatureType=function(){return this.featureType_},e.prototype.setFeatureType=function(t){this.featureType_=t},e.prototype.readFeaturesFromNode=function(t,e){var r={node:t};_(r,{featureType:this.featureType_,featureNS:this.featureNS_}),_(r,this.getReadOptions(t,e||{}));var n=[r],i=U6([],"2.0.0"===this.version_?S9:this.gmlFormat_.FEATURE_COLLECTION_PARSERS,t,n,this.gmlFormat_);return i||(i=[]),i},e.prototype.readTransactionResponse=function(t){if(t){if("string"==typeof t){var e=B6(t);return this.readTransactionResponseFromDocument(e)}return E6(t)?this.readTransactionResponseFromDocument(t):this.readTransactionResponseFromNode(t)}},e.prototype.readFeatureCollectionMetadata=function(t){if(t){if("string"==typeof t){var e=B6(t);return this.readFeatureCollectionMetadataFromDocument(e)}return E6(t)?this.readFeatureCollectionMetadataFromDocument(t):this.readFeatureCollectionMetadataFromNode(t)}},e.prototype.readFeatureCollectionMetadataFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readFeatureCollectionMetadataFromNode(e)},e.prototype.readFeatureCollectionMetadataFromNode=function(t){var e={},r=$6(t.getAttribute("numberOfFeatures"));return e.numberOfFeatures=r,U6(e,S9,t,[],this.gmlFormat_)},e.prototype.readTransactionResponseFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readTransactionResponseFromNode(e)},e.prototype.readTransactionResponseFromNode=function(t){return U6({},B9,t,[])},e.prototype.writeGetFeature=function(t){var e=this,r=x6(M9[this.version_],"GetFeature");r.setAttribute("service","WFS"),r.setAttribute("version",this.version_),t.handle&&r.setAttribute("handle",t.handle),t.outputFormat&&r.setAttribute("outputFormat",t.outputFormat),void 0!==t.maxFeatures&&r.setAttribute("maxFeatures",String(t.maxFeatures)),t.resultType&&r.setAttribute("resultType",t.resultType),void 0!==t.startIndex&&r.setAttribute("startIndex",String(t.startIndex)),void 0!==t.count&&r.setAttribute("count",String(t.count)),void 0!==t.viewParams&&r.setAttribute("viewParams",t.viewParams),r.setAttributeNS(b6,"xsi:schemaLocation",this.schemaLocation_);var n={node:r};if(_(n,{version:this.version_,srsName:t.srsName,featureNS:t.featureNS?t.featureNS:this.featureNS_,featurePrefix:t.featurePrefix,propertyNames:t.propertyNames?t.propertyNames:[]}),G(Array.isArray(t.featureTypes),11),"string"==typeof t.featureTypes[0]){var i=t.filter;t.bbox&&(G(t.geometryName,12),i=this.combineBboxAndFilter(t.geometryName,t.bbox,t.srsName,i)),_(n,{geometryName:t.geometryName,filter:i}),Att(r,t.featureTypes,[n])}else t.featureTypes.forEach((function(i){var o=e.combineBboxAndFilter(i.geometryName,i.bbox,t.srsName,t.filter);_(n,{geometryName:i.geometryName,filter:o}),Att(r,[i.name],[n])}));return r},e.prototype.combineBboxAndFilter=function(t,e,r,n){var i=function(t,e,r){return new x9(t,e,r)}(t,e,r);return n?function(t){var e=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(w9,e))}(n,i):i},e.prototype.writeTransaction=function(t,e,r,n){var i,o=[],s=n.version?n.version:this.version_,a=x6(M9[s],"Transaction");a.setAttribute("service","WFS"),a.setAttribute("version",s),n&&(i=n.gmlOptions?n.gmlOptions:{},n.handle&&a.setAttribute("handle",n.handle)),a.setAttributeNS(b6,"xsi:schemaLocation",k9[s]);var l=function(t,e,r,n){var i,o=n.featurePrefix?n.featurePrefix:"feature";return"1.0.0"===r?i=2:"1.1.0"===r?i=3:"2.0.0"===r&&(i=3.2),_({node:t},{version:r,featureNS:n.featureNS,featureType:n.featureType,featurePrefix:o,gmlVersion:i,hasZ:n.hasZ,srsName:n.srsName},e)}(a,i,s,n);return t&&R9("Insert",t,o,l),e&&R9("Update",e,o,l),r&&R9("Delete",r,o,l),n.nativeElements&&R9("Native",n.nativeElements,o,l),a},e.prototype.readProjectionFromDocument=function(t){for(var e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Node.ELEMENT_NODE)return this.readProjectionFromNode(e);return null},e.prototype.readProjectionFromNode=function(t){if(t.firstElementChild&&t.firstElementChild.firstElementChild)for(var e=(t=t.firstElementChild.firstElementChild).firstElementChild;e;e=e.nextElementSibling)if(0!==e.childNodes.length&&(1!==e.childNodes.length||3!==e.firstChild.nodeType)){var r=[{}];return this.gmlFormat_.readGeometryElement(e,r),Ye(r.pop().srsName)}return null},e}(z6);function R9(t,e,r,n){D6(n,P9,L6(t),e,r)}function U9(t,e){return U6({},E9,t,e)}var D9={"http://www.opengis.net/ogc":{FeatureId:P6((function(t,e){return t.getAttribute("fid")}))},"http://www.opengis.net/ogc/1.1":{FeatureId:P6((function(t,e){return t.getAttribute("fid")}))}};function Q9(t,e){R6(D9,t,e)}var G9={"http://www.opengis.net/wfs":{Feature:Q9},"http://www.opengis.net/wfs/2.0":{Feature:Q9}};function j9(t,e){return U6([],G9,t,e)}function H9(t,e,r){var n=r[r.length-1],i=n.featureType,o=n.featureNS,s=n.gmlVersion,a=x6(o,i);t.appendChild(a),2===s?a8.prototype.writeFeatureElement(a,e,r):3===s?c8.prototype.writeFeatureElement(a,e,r):g9.prototype.writeFeatureElement(a,e,r)}function z9(t,e,r){var n=r[r.length-1].version,i=T9[n],o=x6(i,"Filter"),s=x6(i,"FeatureId");o.appendChild(s),s.setAttribute("fid",e),t.appendChild(o)}function V9(t,e){var r=(t=t||"feature")+":";return 0===e.indexOf(r)?e:r+e}function K9(t,e,r){var n=r[r.length-1];G(void 0!==e.getId(),26);var i=n.featureType,o=n.featurePrefix,s=n.featureNS,a=V9(o,i);t.setAttribute("typeName",a),t.setAttributeNS(F9,"xmlns:"+o,s);var l=e.getId();void 0!==l&&z9(t,l,r)}function q9(t,e,r){var n=r[r.length-1];G(void 0!==e.getId(),27);var i=n.version,o=n.featureType,s=n.featurePrefix,a=n.featureNS,l=V9(s,o),u=e.getGeometryName();t.setAttribute("typeName",l),t.setAttributeNS(F9,"xmlns:"+s,a);var h=e.getId();if(void 0!==h){for(var c=e.getKeys(),A=[],f=0,p=c.length;f<p;f++){var d=e.get(c[f]);if(void 0!==d){var g=c[f];d&&"function"==typeof d.getSimplifiedGeometry&&(g=u),A.push({name:g,value:d})}}D6({version:i,gmlVersion:n.gmlVersion,node:t,hasZ:n.hasZ,srsName:n.srsName},P9,L6("Property"),A,r),z9(t,h,r)}}function W9(t,e,r){var n=r[r.length-1],i=n.version,o=M9[i],s=x6(o,"Name"),a=n.gmlVersion;if(t.appendChild(s),n8(s,e.name),void 0!==e.value&&null!==e.value){var l=x6(o,"Value");t.appendChild(l),e.value&&"function"==typeof e.value.getSimplifiedGeometry?2===a?a8.prototype.writeGeometryElement(l,e.value,r):3===a?c8.prototype.writeGeometryElement(l,e.value,r):g9.prototype.writeGeometryElement(l,e.value,r):n8(l,e.value)}}function X9(t,e,r){e.vendorId&&t.setAttribute("vendorId",e.vendorId),void 0!==e.safeToIgnore&&t.setAttribute("safeToIgnore",String(e.safeToIgnore)),void 0!==e.value&&n8(t,e.value)}var Y9={"http://www.opengis.net/wfs":{Query:M6(Z9)},"http://www.opengis.net/wfs/2.0":{Query:M6(Z9)},"http://www.opengis.net/ogc":{During:M6(ett),And:M6(rtt),Or:M6(rtt),Not:M6(ntt),BBOX:M6(J9),Contains:M6($9),Intersects:M6($9),Within:M6($9),DWithin:M6(ttt),PropertyIsEqualTo:M6(itt),PropertyIsNotEqualTo:M6(itt),PropertyIsLessThan:M6(itt),PropertyIsLessThanOrEqualTo:M6(itt),PropertyIsGreaterThan:M6(itt),PropertyIsGreaterThanOrEqualTo:M6(itt),PropertyIsNull:M6(ott),PropertyIsBetween:M6(stt),PropertyIsLike:M6(att)},"http://www.opengis.net/fes/2.0":{During:M6(ett),And:M6(rtt),Or:M6(rtt),Not:M6(ntt),BBOX:M6(J9),Contains:M6($9),Disjoint:M6($9),Intersects:M6($9),ResourceId:M6((function(t,e,r){t.setAttribute("rid",e.rid)})),Within:M6($9),DWithin:M6(ttt),PropertyIsEqualTo:M6(itt),PropertyIsNotEqualTo:M6(itt),PropertyIsLessThan:M6(itt),PropertyIsLessThanOrEqualTo:M6(itt),PropertyIsGreaterThan:M6(itt),PropertyIsGreaterThanOrEqualTo:M6(itt),PropertyIsNull:M6(ott),PropertyIsBetween:M6(stt),PropertyIsLike:M6(att)}};function Z9(t,e,r){var n,i,o=r[r.length-1],s=o.version,a=o.featurePrefix,l=o.featureNS,u=o.propertyNames,h=o.srsName;n=a?V9(a,e):e,i="2.0.0"===s?"typeNames":"typeName",t.setAttribute(i,n),h&&t.setAttribute("srsName",h),l&&t.setAttributeNS(F9,"xmlns:"+a,l);var c=_({},o);c.node=t,D6(c,I9,L6("PropertyName"),u,r);var A=o.filter;if(A){var f=x6(ftt(s),"Filter");t.appendChild(f),function(t,e,r){var n=r[r.length-1],i={node:t};_(i,{context:n}),D6(i,Y9,L6(e.getTagName()),[e],r)}(f,A,r)}}function J9(t,e,r){var n=r[r.length-1],i=n.context.version;n.srsName=e.srsName;var o=O9[i];htt(i,t,e.geometryName),o.prototype.writeGeometryElement(t,e.extent,r)}function $9(t,e,r){var n=r[r.length-1],i=n.context.version;n.srsName=e.srsName;var o=O9[i];htt(i,t,e.geometryName),o.prototype.writeGeometryElement(t,e.geometry,r)}function ttt(t,e,r){var n=r[r.length-1].context.version;$9(t,e,r);var i=x6(ftt(n),"Distance");n8(i,e.distance.toString()),"2.0.0"===n?i.setAttribute("uom",e.unit):i.setAttribute("units",e.unit),t.appendChild(i)}function ett(t,e,r){var n=r[r.length-1].context.version;ltt(L9[n],"ValueReference",t,e.propertyName);var i=x6(K6,"TimePeriod");t.appendChild(i);var o=x6(K6,"begin");i.appendChild(o),ctt(o,e.begin);var s=x6(K6,"end");i.appendChild(s),ctt(s,e.end)}function rtt(t,e,r){var n=r[r.length-1].context,i={node:t};_(i,{context:n});for(var o=e.conditions,s=0,a=o.length;s<a;++s){var l=o[s];D6(i,Y9,L6(l.getTagName()),[l],r)}}function ntt(t,e,r){var n=r[r.length-1].context,i={node:t};_(i,{context:n});var o=e.condition;D6(i,Y9,L6(o.getTagName()),[o],r)}function itt(t,e,r){var n=r[r.length-1].context.version;void 0!==e.matchCase&&t.setAttribute("matchCase",e.matchCase.toString()),htt(n,t,e.propertyName),utt(n,t,""+e.expression)}function ott(t,e,r){htt(r[r.length-1].context.version,t,e.propertyName)}function stt(t,e,r){var n=r[r.length-1].context.version,i=ftt(n);htt(n,t,e.propertyName);var o=x6(i,"LowerBoundary");t.appendChild(o),utt(n,o,""+e.lowerBoundary);var s=x6(i,"UpperBoundary");t.appendChild(s),utt(n,s,""+e.upperBoundary)}function att(t,e,r){var n=r[r.length-1].context.version;t.setAttribute("wildCard",e.wildCard),t.setAttribute("singleChar",e.singleChar),t.setAttribute("escapeChar",e.escapeChar),void 0!==e.matchCase&&t.setAttribute("matchCase",e.matchCase.toString()),htt(n,t,e.propertyName),utt(n,t,""+e.pattern)}function ltt(t,e,r,n){var i=x6(t,e);n8(i,n),r.appendChild(i)}function utt(t,e,r){ltt(ftt(t),"Literal",e,r)}function htt(t,e,r){"2.0.0"===t?ltt(L9[t],"ValueReference",e,r):ltt(T9[t],"PropertyName",e,r)}function ctt(t,e){var r=x6(K6,"TimeInstant");t.appendChild(r);var n=x6(K6,"timePosition");r.appendChild(n),n8(n,e)}function Att(t,e,r){var n=r[r.length-1],i=_({},n);i.node=t,D6(i,Y9,L6("Query"),e,r)}function ftt(t){return"2.0.0"===t?L9[t]:T9[t]}const ptt=N9;var dtt=function(t){(t=t||{}).displacement||(t.displacement=[t.offsetX||0,-t.offsetY||0]),this.sanchor_="anchored"===t.kind?8:0,this._shadow=Number(t.shadow)||0,t.stroke||(t.stroke=new vn({width:0,color:"#000"}));var e=t.stroke.getWidth();if(e<0&&(e=0),"folio"==t.kind&&(e+=6),t.stroke.setWidth(e),ii.call(this,{radius:t.radius+e+this.sanchor_/2+this._shadow/2,points:0,displacement:[t.displacement[0]||0,(t.displacement[1]||0)+this.sanchor_],fill:ii.prototype.render?new fn({color:[0,0,0,0]}):null}),!this.getHitDetectionImage){var r=ii.prototype.getImage.call(this);if(!this.hitDetectionCanvas_)for(var n in this)if(this[n]&&this[n].getContext&&this[n]!==r){this.hitDetectionCanvas_=this[n];break}this.hitDetectionCanvas_=document.createElement("canvas"),this.hitDetectionCanvas_.width=r.width,this.hitDetectionCanvas_.height=r.height;var i=this.hitDetectionCanvas_;this.getHitDetectionImage=function(){return i}}this._stroke=t.stroke,this._fill=t.fill,this._crop=t.crop,this._crossOrigin=t.crossOrigin,this._kind=t.kind||"default",this._radius=t.radius,this._src=t.src,this._offset=[t.offsetX?t.offsetX:0,t.offsetY?t.offsetY:0],this._onload=t.onload,"number"==typeof t.opacity&&this.setOpacity(t.opacity),"number"==typeof t.rotation&&this.setRotation(t.rotation),this.getImage()};vg(dtt,ii),dtt.prototype.setOffset=function(t){this._offset=[t[0]||0,t[1]||0],this.getImage()},dtt.prototype.clone=function(){var t=new dtt({stroke:this._stroke,fill:this._fill,shadow:this._shadow,crop:this._crop,crossOrigin:this._crossOrigin,kind:this._kind,radius:this._radius,src:this._src,offsetX:this._offset[0],offsetY:this._offset[1],opacity:this.getOpacity(),rotation:this.getRotation()});return t.getImage(),t},CanvasRenderingContext2D.prototype.roundRect=function(t,e,r,n,i){return i?(r<2*i&&(i=r/2),n<2*i&&(i=n/2),this.beginPath(),this.moveTo(t+i,e),this.arcTo(t+r,e,t+r,e+n,i),this.arcTo(t+r,e+n,t,e+n,i),this.arcTo(t,e+n,t,e,i),this.arcTo(t,e,t+r,e,i),this.closePath()):this.rect(t,e,r,n),this},dtt.prototype.drawBack_=function(t,e,r,n){var i=this._shadow,o=t.canvas;t.beginPath(),t.fillStyle=e,t.clearRect(0,0,o.width,o.height);var s=o.width/n,a=o.height/n;switch(this._kind){case"square":t.rect(0,0,s-i,a-i);break;case"circle":t.arc(this._radius+r,this._radius+r,this._radius+r,0,2*Math.PI,!1);break;case"folio":r-=6,t.strokeStyle="rgba(0,0,0,0.5)",t.lineWidth=1;var l=s-i-12,u=Math.atan(6/l);t.save(),t.rotate(-u),t.translate(-6,2),t.beginPath(),t.rect(6,6,l,l),t.stroke(),t.fill(),t.restore(),t.save(),t.translate(6,-1),t.rotate(u),t.beginPath(),t.rect(6,6,l,l),t.stroke(),t.fill(),t.restore(),t.beginPath(),t.rect(6,6,l,l),t.stroke();break;case"anchored":t.roundRect(this.sanchor_/2,0,s-this.sanchor_-i,a-this.sanchor_-i,r),t.moveTo(s/2-this.sanchor_-i/2,a-this.sanchor_-i),t.lineTo(s/2+this.sanchor_-i/2,a-this.sanchor_-i),t.lineTo(s/2-i/2,a-i);break;default:t.roundRect(0,0,s-i,a-i,r)}t.closePath()},dtt.prototype.getImage=function(t){t=t||1;var e,r=ii.prototype.getImage.call(this,t);if(this._gethit)return r;var n=0;this._stroke&&(e=Sn(this._stroke.getColor()),n=this._stroke.getWidth()),this._gethit=!0;var i=this.getHitDetectionImage().getContext("2d");i.save(),i.setTransform(1,0,0,1,0,0),this.drawBack_(i,"#000",n,1),i.fill(),i.restore(),this._gethit=!1,(i=r.getContext("2d")).save(),i.setTransform(t,0,0,t,0,0),this.drawBack_(i,e,n,t),this._shadow&&(i.shadowColor="rgba(0,0,0,0.5)",i.shadowBlur=t*this._shadow/2,i.shadowOffsetX=t*this._shadow/2,i.shadowOffsetY=t*this._shadow/2),i.fill(),i.restore();var o=this,s=this.img_=new Image;if(this._crossOrigin&&(s.crossOrigin=this._crossOrigin),s.src=this._src,s.width?o.drawImage_(r,s,t):s.onload=function(){o.drawImage_(r,s,t),o._onload&&o._onload()},!this.getDisplacement){var a=this.getAnchor();a[0]=(r.width/t-this._shadow)/2-this._offset[0],this.sanchor_?a[1]=r.height/t-this._shadow-this._offset[1]:a[1]=(r.height/t-this._shadow)/2-this._offset[1]}return r},dtt.prototype.getPhoto=function(){return this.img_},dtt.prototype.drawImage_=function(t,e,r){var n=t.getContext("2d"),i=0;this._stroke&&(i=this._stroke.getWidth());var o,s,a,l,u,h,c,A,f,p=2*this._radius;n.save(),ii.prototype.render&&n.setTransform(r,0,0,r,0,0),"circle"==this._kind&&(n.beginPath(),n.arc(this._radius+i,this._radius+i,this._radius,0,2*Math.PI,!1),n.clip()),this._crop?(A=f=(o=Math.min(e.width/p,e.height/p))*p,h=(e.width-A)/2,c=(e.height-f)/2,s=a=0,l=u=p+1):(h=c=0,s=(p-(l=(o=Math.min(p/e.width,p/e.height))*(A=e.width)))/2,a=(p-(u=o*(f=e.height)))/2),s+=i+this.sanchor_/2,a+=i,n.drawImage(e,h,c,A,f,s,a,l,u),"circle"==this._kind&&i&&(n.beginPath(),n.strokeStyle=Sn(this._stroke.getColor()),n.lineWidth=i/4,n.arc(this._radius+i,this._radius+i,this._radius,0,2*Math.PI,!1),n.stroke()),n.restore()};var gtt=function(t){t=t||{},this.duration_="number"==typeof t.duration?t.duration>=0?t.duration:0:1e3,this.fade_="function"==typeof t.fade?t.fade:null,this.repeat_=Number(t.repeat);var e="function"==typeof t.easing?t.easing:Bs;t.revers?this.easing_=function(t){return 1-e(t)}:this.easing_=e,this.hiddenStyle=t.hiddenStyle,N.call(this)};vg(gtt,N),gtt.hiddenStyle=new Ai({image:new si({}),stroke:new vn({color:"transparent"})}),gtt.prototype.drawGeom_=function(t,e,r){this.fade_&&(t.context.globalAlpha=this.fade_(1-t.elapsed));for(var n=t.style,i=0;i<n.length;i++)try{var o=t.vectorContext||s6(t),s=l6(t,n[i]);o.setStyle(s),s.getZIndex()<0?o.drawGeometry(r||e):o.drawGeometry(e)}catch(a){}},gtt.prototype.animate=function(){return!1},Bu.prototype.animateFeature=function(t,e){var r=this._featureAnimationLayer;r||(r=this._featureAnimationLayer=new ls({source:new ws})).setMap(this),r.getSource().addFeature(t);var n=e.on("animationend",(function(e){e.feature===t&&(r.getSource().removeFeature(t),M(n))}));r.animateFeature(t,e)},di.prototype.animateFeature=function(t,e,r){var n,i=this,o=t.getStyle(),s=o||(this.getStyleFunction?this.getStyleFunction()(t):null);s||(s=[]),s instanceof Array||(s=[s]);var a={vectorContext:null,frameState:null,start:0,time:0,elapsed:0,extent:!1,feature:t,geom:t.getGeometry(),typeGeom:t.getGeometry().getType(),bbox:t.getGeometry().getExtent(),coord:Ut(t.getGeometry().getExtent()),style:s};e instanceof Array||(e=[e]);for(var l=e.length-1;l>=0;l--)0===e[l].duration_&&e.splice(l,1);var u=0,h=0,c=r&&this.getFilters?this.getFilters():[];function A(r){a.type=r.type;try{a.vectorContext=r.vectorContext||s6(r)}catch(o){}if(a.frameState=r.frameState,a.inversePixelTransform=r.inversePixelTransform,a.extent||(a.extent=r.frameState.extent,a.start=r.frameState.time,a.context=r.context),a.time=r.frameState.time-a.start,a.elapsed=a.time/e[h].duration_,a.elapsed>1&&(a.elapsed=1),r.context.save(),c.forEach((function(t){t.get("active")&&t.precompose(r)})),this.getOpacity&&(r.context.globalAlpha=this.getOpacity()),e[h].animate(a)){var n={type:"animating",step:h,start:a.start,time:a.time,elapsed:a.elapsed,rotation:a.rotation||0,geom:a.geom,coordinate:a.coord,feature:t};e[h].dispatchEvent(n),i.dispatchEvent(n)}else++u<e[h].repeat_?a.extent=!1:h<e.length-1?(e[h].dispatchEvent({type:"animationend",feature:t}),h++,u=0,a.extent=!1):f();c.forEach((function(t){t.get("active")&&t.postcompose(r)})),r.context.restore(),r.frameState.animate=!0}function f(r){M(n),n=null,t.setStyle(o);var s={type:"animationend",feature:t};if(r)for(var a in r)r.hasOwnProperty(a)&&(s[a]=r[a]);e[h].dispatchEvent(s),i.dispatchEvent(s)}function p(r){if(e.length&&!n){if(n=i.on(["postcompose","postrender"],A.bind(i)),i.renderSync)try{i.renderSync()}catch(OR){}else i.changed();t.setStyle(e[h].hiddenStyle||gtt.hiddenStyle);var o={type:"animationstart",feature:t};if(r)for(var s in r)r.hasOwnProperty(s)&&(o[s]=r[s]);e[h].dispatchEvent(o),i.dispatchEvent(o)}}return p(),{start:p,stop:f,isPlaying:function(){return!!n}}};var ytt=function(t){gtt.call(this,t=t||{}),this.amplitude_=t.amplitude||40,this.bounce_=-Math.PI*(t.bounce||3)};vg(ytt,gtt),ytt.prototype.animate=function(t){var e=t.geom.clone(),r=Math.abs(Math.sin(this.bounce_*t.elapsed))*this.amplitude_*(1-this.easing_(t.elapsed))*t.frameState.viewState.resolution;return e.translate(0,r),this.drawGeom_(t,e,t.geom),t.time<=this.duration_};var mtt=function(t){gtt.call(this,t),this.set("nb",t.nb||10)};vg(mtt,gtt),mtt.prototype.animate=function(t){return Math.round(this.easing_(t.elapsed)*this.get("nb"))%2||this.drawGeom_(t,t.geom),t.time<=this.duration_};var vtt=function(t){t=t||{},this.speed_=t.speed||0,gtt.call(this,t),this.side_=t.side||"top"};vg(vtt,gtt),vtt.prototype.animate=function(t){if(!t.time){var e=t.frameState.viewState.rotation,r=t.frameState.size[1]*t.frameState.viewState.resolution;"top"!=this.side_&&(r*=-1),this.dx=-Math.sin(e)*r,this.dy=Math.cos(e)*r,this.speed_&&(this.duration_=r/this.speed_/t.frameState.viewState.resolution)}var n=t.geom.clone();return n.translate(this.dx*(1-this.easing_(t.elapsed)),this.dy*(1-this.easing_(t.elapsed))),this.drawGeom_(t,n,t.geom),t.time<=this.duration_};var _tt=function(t){t=t||{},this.speed_=t.speed||0,gtt.call(this,t)};vg(_tt,gtt),_tt.prototype.animate=function(t){return t.context.globalAlpha=this.easing_(t.elapsed),this.drawGeom_(t,t.geom),t.time<=this.duration_};var wtt=function(t){switch(gtt.call(this,t=t||{}),this.speed_=t.speed||0,this.path_=t.path,t.rotate){case!0:case 0:this.rotate_=0;break;default:this.rotate_=t.rotate||!1}this.path_&&this.path_.getGeometry&&(this.path_=this.path_.getGeometry()),this.path_&&this.path_.getLineString&&(this.path_=this.path_.getLineString()),this.path_.getLength?(this.dist_=this.path_.getLength(),this.path_&&this.path_.getCoordinates&&(this.path_=this.path_.getCoordinates())):this.dist_=0,this.speed_>0&&(this.duration_=this.dist_/this.speed_)};vg(wtt,gtt),wtt.prototype.animate=function(t){if(!t.time&&!this.dist_)return!1;var e,r,n,i,o,s,a=this.dist_*this.easing_(t.elapsed),l=0;r=this.path_[0];for(var u=1;u<this.path_.length;u++){if(e=r,i=(r=this.path_[u])[0]-e[0],o=r[1]-e[1],(s=Math.sqrt(i*i+o*o))&&l+s>=a){n=(a-l)/s,r=[e[0]+(r[0]-e[0])*n,e[1]+(r[1]-e[1])*n];break}l+=s}var h=t.style;if(t.rotation=Math.PI/2+Math.atan2(e[1]-r[1],e[0]-r[0]),!1!==this.rotate_){var c=[],A=this.rotate_-t.rotation+t.frameState.viewState.rotation;t.rotation=Math.PI/2+Math.atan2(e[1]-r[1],e[0]-r[0]);for(var f=0;n=t.style[f];f++)n.getImage()&&n.getImage().setRotation(A),c.push(n);t.style=c}return t.geom.setCoordinates(r),this.drawGeom_(t,t.geom),t.style=h,t.time<=this.duration_};var btt=function(t){gtt.call(this,t=t||{}),this.amplitude_=t.amplitude||40,this.bounce_=-Math.PI*(t.bounce||6),this.horizontal_=t.horizontal};vg(btt,gtt),btt.prototype.animate=function(t){var e=t.geom.clone(),r=t.geom.clone(),n=this.easing_(t.elapsed);return n=Math.sin(this.bounce_*n)*this.amplitude_*(1-n)*t.frameState.viewState.resolution,this.horizontal_?(e.translate(n,0),r.translate(n,0)):e.translate(0,n),this.drawGeom_(t,e,r),t.time<=this.duration_};var xtt=function(t){gtt.call(this,t)};vg(xtt,gtt),xtt.prototype.animate=function(t){return this.drawGeom_(t,t.geom),t.time<=this.duration_};var Ctt=function(t){t=t||{},this.speed_=t.speed||0,gtt.call(this,t),this.side_=t.side||"left"};vg(Ctt,gtt),Ctt.prototype.animate=function(t){t.time||("left"==this.side_?this.dx=t.extent[0]-t.bbox[2]:this.dx=t.extent[2]-t.bbox[0],this.speed_&&(this.duration_=Math.abs(this.dx)/this.speed_/t.frameState.viewState.resolution));var e=t.geom.clone();return e.translate(this.dx*(1-this.easing_(t.elapsed)),0),this.drawGeom_(t,e),t.time<=this.duration_};var Stt=function(t){gtt.call(this,t)};vg(Stt,gtt),Stt.prototype.animate=function(t){var e=this.easing_(t.elapsed);if(e){t.context.save();var r=t.frameState.pixelRatio;t.context.globalAlpha=e,t.context.scale(e,1/e);var n=t.frameState.coordinateToPixelTransform,i=(1/e-1)*r*(n[0]*t.coord[0]+n[1]*t.coord[1]+n[4]),o=(e-1)*r*(n[2]*t.coord[0]+n[3]*t.coord[1]+n[5]);t.context.translate(i,o),this.drawGeom_(t,t.geom),t.context.restore()}return t.time<=this.duration_};var Ett=function(t){gtt.call(this,t=t||{}),this.speed_=t.speed||0,this.side_=t.side||"left"};vg(Ett,gtt),Ett.prototype.animate=function(t){var e,r;!t.time&&this.speed_&&("left"==this.side_?(e=this.dx=t.extent[0]-t.bbox[2],r=this.dy=t.extent[3]-t.bbox[1]):(e=this.dx=t.extent[2]-t.bbox[0],r=this.dy=t.extent[3]-t.bbox[1]),this.duration_=Math.sqrt(e*e+r*r)/this.speed_/t.frameState.viewState.resolution);var n=t.geom.clone(),i=t.geom.clone();return n.translate(this.dx*(1-this.easing_(t.elapsed)),this.dy*Math.cos(Math.PI/2*this.easing_(t.elapsed))),i.translate(this.dx*(1-this.easing_(t.elapsed)),0),this.drawGeom_(t,n,i),t.time<=this.duration_};var Btt=function(t){gtt.call(this,t=t||{}),this.set("zoomout",t.zoomOut)};vg(Btt,gtt),vg((function(t){(t=t||{}).zoomOut=!0,Btt.call(this,t)}),Btt),Btt.prototype.animate=function(t){var e=this.easing_(t.elapsed);if(e){this.get("zoomout")&&(e=1/e);var r,n,i=t.style,o=[];for(r=0;r<i.length;r++)(n=i[r].getImage())&&(o[r]=n.getScale(),"postrender"===t.type?n.setScale(o[r]*e/t.frameState.pixelRatio):n.setScale(o[r]*e));for(this.drawGeom_(t,t.geom),r=0;r<i.length;r++)(n=i[r].getImage())&&n.setScale(o[r])}return t.time<=this.duration_};class Itt extends z{constructor(t){super(),e(this,"option"),e(this,"Proj"),this.option={lnglat:[0,0],dataWkID:og.EPSG3857,tooltipOption:{offset:[0,0]},popupOption:{offset:[0,0]},style:{text:{font:"14px Microsoft YaHei",text:"",fill:{color:"#8B4513"},stroke:{color:"rgba(255, 255, 255,1)",width:2},backgroundFill:{color:"rgba(255, 255, 255, 0.0)"},backgroundStroke:{color:"rgba(0, 0, 0, 0.0)",width:2},padding:[3,3,3,3],offsetX:0,offsetY:-10,textBaseline:"bottom"},image:{scale:1,radius:5,fill:{color:"rgba(255, 0, 0,1)"},stroke:{color:"rgba(255, 255, 0,1)",width:1}},stroke:{color:"rgba(255, 255, 0,1)",width:2,lineDash:null,pattern:void 0,ratio:1,patternColor:"rgba(0, 0, 0,1)",offset:0,scale:1,size:5,spacing:10,angle:0},fill:{color:"rgba(255, 255, 255,0.2)",pattern:void 0,image:void 0,ratio:1,patternColor:"rgba(0, 0, 0,1)",offset:0,scale:1,size:5,spacing:10,angle:0},imageOption:{},zIndex:999,radius:0,startAngle:0,stopAngle:0,rotation:0},attribute:null},this.option=bT.merge(this.option,t,!0),this.Proj=new o6}setAttribute(t){let e=bT.merge(this.getProperties(),t,!0);this.setProperties(e)}toGeoJSON(){return(new iA).writeGeometryObject(this.getGeometry(),{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"})}bindPopup(t,e={offset:[0,0]}){this.option.popupInfo=t,this.option.popupOption=e}bindTooltip(t,e={offset:[0,0]}){this.option.tooltipInfo=t,this.option.tooltipOption=e}isPopupBind(){return!!this.option.popupInfo}isTooltipBind(){return!!this.option.tooltipInfo}openPopup(t,e){t&&(this.option.popupInfo=t),e&&(this.option.popupOption=e),this.dispatchEvent({type:"graphicPopopOpen",data:this.option.popupInfo,option:this.option.popupOption})}closePopup(){this.dispatchEvent({type:"graphicPopopClose",data:this.option.popupInfo})}openTooltip(t,e){t&&(this.option.tooltipInfo=t),e&&(this.option.tooltipOption=e),this.dispatchEvent({type:"graphicTooltipOpen",data:this.option.tooltipInfo,option:this.option.tooltipOption})}}class Ptt extends Itt{constructor(t){let e;if(super(t),this.option=bT.merge(this.option,t,!0),0!=this.option.lnglat[0])switch(this.option.dataWkID){case og.EPSG4326:this.setGeometry(new Vr(rr(t.lnglat)));break;case og.EPSG3857:this.setGeometry(new Vr(t.lnglat));break;case og.BAIDU:e=this.Proj.bd09_To_gps84(t.lnglat[0],t.lnglat[1]),this.setGeometry(new Vr([e.lontitude,e.latitude]));break;case og.GCJ02:e=this.Proj.gcj02ToWgs84(t.lnglat[0],t.lnglat[1]),this.setGeometry(new Vr([e.lontitude,e.latitude]));break;case og.CGCS2000_GK_CM_6:break;default:this.setGeometry(new Vr(this.Proj.ConvertCoordinatesTo3857(this.option.dataWkID,t.lnglat)))}this.option.attribute&&this.setProperties(this.option.attribute),this.setStyle(new Ai({text:new fi({font:this.option.style.text.font,text:this.option.style.text.text,offsetX:this.option.style.text.offsetX,offsetY:this.option.style.text.offsetY,fill:new fn({color:this.option.style.text.fill.color}),stroke:new vn({color:this.option.style.text.stroke.color,width:this.option.style.text.stroke.width})}),image:new si({scale:this.option.style.image.scale,radius:this.option.style.image.radius,fill:new fn({color:this.option.style.image.fill.color}),stroke:new vn({color:this.option.style.image.stroke.color,width:this.option.style.image.stroke.width})}),zIndex:this.option.style.zIndex}))}setCoordinates(t,e,r=og.EPSG4326){let n=this.getGeometry();this.option.dataWkID==og.EPSG4326?n.setCoordinates(rr([t,e])):this.option.dataWkID==og.EPSG3857?n.setCoordinates([t,e]):n.setCoordinates(this.Proj.ConvertCoordinatesTo3857(this.option.dataWkID,[t,e]))}}var Ftt=function(t){var e,r;t||(t={});var n=this.canvas_=document.createElement("canvas"),i=(Number(t.scale)>0?Number(t.scale):1)*rt||rt,o=n.getContext("2d");if(t.image){t.image.load();var s=t.image.getImage();if(s.width)n.width=Math.round(s.width*i),n.height=Math.round(s.height*i),o.globalAlpha="number"==typeof t.opacity?t.opacity:1,o.drawImage(s,0,0,s.width,s.height,0,0,n.width,n.height),e=o.createPattern(n,"repeat");else{var a=this;e=[0,0,0,0],s.onload=function(){n.width=Math.round(s.width*i),n.height=Math.round(s.height*i),o.globalAlpha="number"==typeof t.opacity?t.opacity:1,o.drawImage(s,0,0,s.width,s.height,0,0,n.width,n.height),e=o.createPattern(n,"repeat"),a.setColor(e)}}}else{var l=this.getPattern_(t);if(n.width=Math.round(l.width*i),n.height=Math.round(l.height*i),o.beginPath(),t.fill&&(o.fillStyle=Sn(t.fill.getColor()),o.fillRect(0,0,n.width,n.height)),o.scale(i,i),o.lineCap="round",o.lineWidth=l.stroke||1,o.fillStyle=Sn(t.color||"#000"),o.strokeStyle=Sn(t.color||"#000"),l.circles)for(r=0;r<l.circles.length;r++){var u=l.circles[r];o.beginPath(),o.arc(u[0],u[1],u[2],0,2*Math.PI),l.fill&&o.fill(),l.stroke&&o.stroke()}if(l.repeat||(l.repeat=[[0,0]]),l.char&&(o.font=l.font||l.width+"px Arial",o.textAlign="center",o.textBaseline="middle",l.angle?(o.fillText(l.char,l.width/4,l.height/4),o.fillText(l.char,5*l.width/4,5*l.height/4),o.fillText(l.char,l.width/4,5*l.height/4),o.fillText(l.char,5*l.width/4,l.height/4),o.fillText(l.char,3*l.width/4,3*l.height/4),o.fillText(l.char,-l.width/4,-l.height/4),o.fillText(l.char,3*l.width/4,-l.height/4),o.fillText(l.char,-l.width/4,3*l.height/4)):o.fillText(l.char,l.width/2,l.height/2)),l.lines)for(r=0;r<l.lines.length;r++)for(var h=0;h<l.repeat.length;h++){var c=l.lines[r];o.beginPath(),o.moveTo(c[0]+l.repeat[h][0],c[1]+l.repeat[h][1]);for(var A=2;A<c.length;A+=2)o.lineTo(c[A]+l.repeat[h][0],c[A+1]+l.repeat[h][1]);l.fill&&o.fill(),l.stroke&&o.stroke(),o.save(),o.strokeStyle="red",o.strokeWidth=.1,o.restore()}if(e=o.createPattern(n,"repeat"),t.offset){var f=t.offset;if("number"==typeof f&&(f=[f,f]),f instanceof Array){var p=Math.round(f[0]*i),d=Math.round(f[1]*i);o.scale(1/i,1/i),o.clearRect(0,0,n.width,n.height),o.translate(p,d),o.fillStyle=e,o.fillRect(-p,-d,n.width,n.height),e=o.createPattern(n,"repeat")}}}t.color=e,vn.call(this,t)};vg(Ftt,vn),Ftt.prototype.clone=function(){var t=fn.prototype.clone.call(this);return t.canvas_=this.canvas_,t},Ftt.prototype.getImage=function(){return this.canvas_},Ftt.prototype.getPattern_=function(t){var e,r=_g.prototype.patterns[t.pattern]||_g.prototype.patterns.dot,n=Math.round(t.spacing)||10;switch(t.pattern){case"dot":case"circle":e=0===t.size?0:t.size/2||2,t.angle?(n=r.width=r.height=Math.round(1.4*n),r.circles=[[n/4,n/4,e],[3*n/4,3*n/4,e]],"circle"==t.pattern&&(r.circles=r.circles.concat([[n/4+n,n/4,e],[n/4,n/4+n,e],[3*n/4-n,3*n/4,e],[3*n/4,3*n/4-n,e],[n/4+n,n/4+n,e],[3*n/4-n,3*n/4-n,e]]))):(r.width=r.height=n,r.circles=[[n/2,n/2,e]],"circle"==t.pattern&&(r.circles=r.circles.concat([[n/2+n,n/2,e],[n/2-n,n/2,e],[n/2,n/2+n,e],[n/2,n/2-n,e],[n/2+n,n/2+n,e],[n/2+n,n/2-n,e],[n/2-n,n/2+n,e],[n/2-n,n/2-n,e]])));break;case"tile":case"square":e=0===t.size?0:t.size/2||2,t.angle?(r.width=r.height=n,r.lines=[[n/2-e,n/2,n/2,n/2-e,n/2+e,n/2,n/2,n/2+e,n/2-e,n/2]]):(r.width=r.height=n,r.lines=[[n/2-e,n/2-e,n/2+e,n/2-e,n/2+e,n/2+e,n/2-e,n/2+e,n/2-e,n/2-e]]),"square"==t.pattern&&(r.repeat=[[0,0],[0,n],[n,0],[0,-n],[-n,0],[-n,-n],[n,n],[-n,n],[n,-n]]);break;case"cross":t.angle&&(t.angle=45);case"hatch":var i=Math.round(((t.angle||0)-90)%360);i>180&&(i-=360),i*=Math.PI/180;var o=Math.cos(i),s=Math.sin(i);if(Math.abs(s)<1e-4)r.width=r.height=n,r.lines=[[0,.5,n,.5]],r.repeat=[[0,0],[0,n]];else if(Math.abs(o)<1e-4)r.width=r.height=n,r.lines=[[.5,0,.5,n]],r.repeat=[[0,0],[n,0]],"cross"==t.pattern&&(r.lines.push([0,.5,n,.5]),r.repeat.push([0,n]));else{var a=r.width=Math.round(Math.abs(n/s))||1,l=r.height=Math.round(Math.abs(n/o))||1;"cross"==t.pattern?(r.lines=[[-a,-l,2*a,2*l],[2*a,-l,-a,2*l]],r.repeat=[[0,0]]):o*s>0?(r.lines=[[-a,-l,2*a,2*l]],r.repeat=[[0,0],[a,0],[0,l]]):(r.lines=[[2*a,-l,-a,2*l]],r.repeat=[[0,0],[-a,0],[0,l]])}r.stroke=0===t.size?0:t.size||4}return r};class Ttt extends Itt{constructor(t){if(super(t),0!=this.option.lnglat[0])switch(this.option.dataWkID){case og.EPSG4326:this.setGeometry(new hn(t.lnglat).transform("EPSG:4326","EPSG:3857"));break;case og.EPSG3857:this.setGeometry(new hn(t.lnglat));break;case og.BAIDU:this.option.lnglat.forEach(((t,e)=>{t.forEach(((e,r)=>{let n=this.Proj.bd09_To_gps84(e[0],e[1]);t[r]=[n.lontitude,n.latitude]}))})),this.setGeometry(new hn(this.option.lnglat));break;case og.GCJ02:this.option.lnglat.forEach(((t,e)=>{t.forEach(((e,r)=>{let n=this.Proj.gcj02ToWgs84(e[0],e[1]);t[r]=[n.lontitude,n.latitude]}))})),this.setGeometry(new hn(this.option.lnglat));break;default:this.option.lnglat.forEach((t=>{t.forEach(((e,r)=>{t[r]=this.Proj.ConvertCoordinatesTo3857(this.option.dataWkID,e)}))})),this.setGeometry(new hn(this.option.lnglat))}let e,r;if(this.option.attribute&&this.setProperties(this.option.attribute),e=this.option.style.stroke.pattern?new Ftt({pattern:this.option.style.stroke.pattern,ratio:this.option.style.stroke.ratio,color:this.option.style.stroke.patternColor,offset:this.option.style.stroke.offset,scale:this.option.style.stroke.scale,fill:new fn({color:this.option.style.stroke.color}),size:this.option.style.stroke.size,spacing:this.option.style.stroke.spacing,angle:this.option.style.stroke.angle,width:this.option.style.stroke.width}):new vn({color:this.option.style.stroke.color,width:this.option.style.stroke.width,lineDash:this.option.style.stroke.lineDash}),this.option.style.fill.pattern)r=new _g({pattern:this.option.style.fill.pattern,image:void 0,ratio:this.option.style.fill.ratio,color:this.option.style.fill.patternColor,offset:this.option.style.fill.offset,scale:this.option.style.fill.scale,size:this.option.style.fill.size,spacing:this.option.style.fill.spacing,angle:this.option.style.fill.angle,fill:new fn({color:this.option.style.fill.color})});else if(this.option.style.fill.image){const t=document.createElement("canvas").getContext("2d"),r=new Image;r.src=this.option.style.fill.image,r.onload=()=>{this.setStyle(new Ai({stroke:e,fill:new fn({color:t.createPattern(r,"repeat")}),text:new fi({text:this.option.style.text.text,font:this.option.style.text.font,fill:new fn({color:this.option.style.fill.color}),stroke:new vn({color:this.option.style.stroke.color,width:this.option.style.stroke.width})}),zIndex:this.option.style.zIndex}))}}else r=new fn({color:this.option.style.fill.color});this.setStyle(new Ai({stroke:e,fill:r,text:new fi({text:this.option.style.text.text,font:this.option.style.text.font,fill:new fn({color:this.option.style.fill.color}),stroke:new vn({color:this.option.style.stroke.color,width:this.option.style.stroke.width})}),zIndex:this.option.style.zIndex}))}setGeometryFromExtent(t){this.setGeometry(cn(t))}}const Mtt=Object.freeze(Object.defineProperty({__proto__:null,LabelGraphic:class extends Itt{constructor(t){let e;if(super(t),0!=this.option.lnglat[0])switch(this.option.dataWkID){case og.EPSG4326:this.setGeometry(new Vr(rr(t.lnglat)));break;case og.EPSG3857:this.setGeometry(new Vr(t.lnglat));break;case og.BAIDU:e=this.Proj.bd09_To_gps84(t.lnglat[0],t.lnglat[1]),this.setGeometry(new Vr([e.lontitude,e.latitude]));break;case og.GCJ02:e=this.Proj.gcj02ToWgs84(t.lnglat[0],t.lnglat[1]),this.setGeometry(new Vr([e.lontitude,e.latitude]));break;default:this.setGeometry(new Vr(this.Proj.ConvertCoordinatesTo3857(this.option.dataWkID,t.lnglat)))}this.option.attribute&&this.setProperties(this.option.attribute),this.setStyle(new Ai({text:new fi({font:this.option.style.text.font,text:this.option.style.text.text,fill:new fn({color:this.option.style.text.fill.color}),stroke:new vn({color:this.option.style.text.stroke.color,width:this.option.style.text.stroke.width}),backgroundFill:new fn({color:this.option.style.text.backgroundFill.color}),backgroundStroke:new vn({color:this.option.style.text.backgroundStroke.color,width:this.option.style.text.backgroundStroke.width}),padding:this.option.style.text.padding,textBaseline:this.option.style.text.textBaseline,offsetX:this.option.style.text.offsetX,offsetY:this.option.style.text.offsetY}),image:new ii({scale:this.option.style.image.scale,radius:this.option.style.image.radius,points:3,angle:Math.PI,displacement:[0,10],fill:new fn({color:this.option.style.image.fill.color}),stroke:new vn({color:this.option.style.image.stroke.color,width:this.option.style.image.stroke.width})}),zIndex:this.option.style.zIndex}))}setCoordinates(t,e,r=og.EPSG4326){let n=this.getGeometry();this.option.dataWkID==og.EPSG4326?n.setCoordinates(rr([t,e])):this.option.dataWkID==og.EPSG3857?n.setCoordinates([t,e]):n.setCoordinates(this.Proj.ConvertCoordinatesTo3857(this.option.dataWkID,[t,e]))}},PointGraphic:Ptt,ImagePointGraphic:class extends Itt{constructor(t){let e;if(super(t),0!=this.option.lnglat[0])switch(this.option.dataWkID){case og.EPSG4326:this.setGeometry(new Vr(rr(t.lnglat)));break;case og.EPSG3857:this.setGeometry(new Vr(t.lnglat));break;case og.BAIDU:e=this.Proj.bd09_To_gps84(t.lnglat[0],t.lnglat[1]),this.setGeometry(new Vr([e.lontitude,e.latitude]));break;case og.GCJ02:e=this.Proj.gcj02ToWgs84(t.lnglat[0],t.lnglat[1]),this.setGeometry(new Vr([e.lontitude,e.latitude]));break;default:this.setGeometry(new Vr(this.Proj.ConvertCoordinatesTo3857(this.option.dataWkID,t.lnglat)))}if(this.option.attribute&&this.setProperties(this.option.attribute),"gif"==this.option.style.imageOption.type){const t=gifler(this.option.style.imageOption.src);let e=document.createElement("canvas");t.frames(e,((t,e)=>{this.getStyle()||this.setStyle(new Ai({image:new Wo({img:t.canvas,imgSize:[e.width,e.height],opacity:.8})})),t.clearRect(0,0,e.width,e.height),t.drawImage(e.buffer,e.x,e.y),this.option.style.imageOption.maprender()}),!0)}else{let t=new Wo(this.option.style.imageOption);t.load(),this.setStyle(new Ai({text:new fi({font:this.option.style.text.font,text:this.option.style.text.text,fill:new fn({color:this.option.style.text.fill.color}),backgroundFill:new fn({color:this.option.style.text.backgroundFill.color}),backgroundStroke:new vn({color:this.option.style.text.backgroundStroke.color,width:this.option.style.text.backgroundStroke.width}),stroke:new vn({color:this.option.style.text.stroke.color,width:this.option.style.text.stroke.width}),padding:this.option.style.text.padding,textBaseline:this.option.style.text.textBaseline,offsetX:this.option.style.text.offsetX,offsetY:this.option.style.text.offsetY}),image:t,zIndex:this.option.style.zIndex}))}}setCoordinates(t,e,r=og.EPSG4326){let n=this.getGeometry();this.option.dataWkID==og.EPSG4326?n.setCoordinates(rr([t,e])):this.option.dataWkID==og.EPSG3857?n.setCoordinates([t,e]):n.setCoordinates(this.Proj.ConvertCoordinatesTo3857(this.option.dataWkID,[t,e]))}},LineGraphic:class extends Itt{constructor(t){if(super(t),0!=this.option.lnglat[0])switch(this.option.dataWkID){case og.EPSG4326:this.setGeometry(new mn(t.lnglat).transform("EPSG:4326","EPSG:3857"));break;case og.EPSG3857:this.setGeometry(new mn(t.lnglat));break;case og.BAIDU:this.option.lnglat.forEach(((e,r)=>{let n=this.Proj.bd09_To_gps84(t.lnglat[0],t.lnglat[1]);this.option.lnglat[r]=[n.lontitude,n.latitude]})),this.setGeometry(new mn(this.option.lnglat));break;case og.GCJ02:this.option.lnglat.forEach(((e,r)=>{let n=this.Proj.gcj02ToWgs84(t.lnglat[0],t.lnglat[1]);this.option.lnglat[r]=[n.lontitude,n.latitude]})),this.setGeometry(new mn(this.option.lnglat));break;default:this.option.lnglat.forEach(((t,e)=>{this.option.lnglat[e]=this.Proj.ConvertCoordinatesTo3857(this.option.dataWkID,t)})),this.setGeometry(new mn(this.option.lnglat))}let e;this.option.attribute&&this.setProperties(this.option.attribute),e=this.option.style.stroke.image||this.option.style.stroke.pattern?new Ftt({pattern:this.option.style.stroke.pattern,image:"Image (PNG)"==this.option.style.stroke.pattern?new Wo({src:this.option.style.stroke.image}):void 0,ratio:this.option.style.stroke.ratio,color:this.option.style.stroke.patternColor,offset:this.option.style.stroke.offset,scale:this.option.style.stroke.scale,fill:new fn({color:this.option.style.stroke.color}),size:this.option.style.stroke.size,spacing:this.option.style.stroke.spacing,angle:this.option.style.stroke.angle,width:this.option.style.stroke.width}):new vn({color:this.option.style.stroke.color,width:this.option.style.stroke.width,lineDash:this.option.style.stroke.lineDash}),this.setStyle(new Ai({stroke:e,text:new fi({text:this.option.style.text.text,font:this.option.style.text.font,fill:new fn({color:this.option.style.text.fill.color}),stroke:new vn({color:this.option.style.stroke.color,width:this.option.style.stroke.width})}),zIndex:this.option.style.zIndex}))}lineStyle(){let t=[];for(let e=0;e<10;e++)t.push(new Ai({stroke:new vn({color:[0,255,255,1/(10-e)],width:2*(10-e)-1}),fill:new fn({color:"rgba(0, 0, 255, 0.05)"})}));return t}},PolygonGraphic:Ttt,CurveGraphic:class extends Itt{constructor(t){if(super(t),0!=this.option.lnglat[0])switch(this.option.dataWkID){case og.EPSG4326:this.setGeometry(this.createRegularPolygonCurve(this.option.lnglat,this.option.style.radius,this.option.style.startAngle,this.option.style.stopAngle,this.option.style.rotation));break;case og.EPSG3857:this.setGeometry(this.createRegularPolygonCurve(nr(this.option.lnglat),this.option.style.radius,this.option.style.startAngle,this.option.style.stopAngle,this.option.style.rotation));break;case og.BAIDU:case og.GCJ02:break;default:this.setGeometry(this.createRegularPolygonCurve(this.Proj.ConvertCoordinatesTo4326(this.option.dataWkID,this.option.lnglat),this.option.style.radius,this.option.style.startAngle,this.option.style.stopAngle,this.option.style.rotation))}this.option.attribute&&this.setProperties(this.option.attribute),this.setStyle(new Ai({stroke:new vn({color:this.option.style.stroke.color,width:this.option.style.stroke.width,lineDash:this.option.style.stroke.lineDash}),fill:new fn({color:this.option.style.fill.color}),text:new fi({text:this.option.style.text.text,font:this.option.style.text.font,fill:new fn({color:this.option.style.fill.color}),stroke:new vn({color:this.option.style.stroke.color,width:this.option.style.stroke.width})}),zIndex:this.option.style.zIndex}))}setAngle(t,e){this.option.dataWkID==og.EPSG4326?this.setGeometry(this.createRegularPolygonCurve(this.option.lnglat,this.option.style.radius,t,e,this.option.style.rotation)):this.option.dataWkID==og.EPSG3857?this.setGeometry(this.createRegularPolygonCurve(nr(this.option.lnglat),this.option.style.radius,t,e,this.option.style.rotation)):this.setGeometry(this.createRegularPolygonCurve(this.Proj.ConvertCoordinatesTo4326(this.option.dataWkID,this.option.lnglat),this.option.style.radius,t,e,this.option.style.rotation))}createRegularPolygonCurve(t,e,r,n,i){let o=mT.sector(t,e,r,n).getGeometry();return o.rotate(i,rr(t)),o}}},Symbol.toStringTag,{value:"Module"}));var Ltt=function(t){(t=t||{}).loader=this._loader,t.strategy=ps,ws.call(this,t),this.set("time",t.time||new Date),this.set("step",t.step||1)};vg(Ltt,ws),function(){function t(t){var e=Math.PI/180,r=t-2451545,n=280.46+.9856474*r,i=357.528+.9856003*r;return i%=360,{lambda:(n%=360)+1.915*Math.sin(i*e)+.02*Math.sin(2*i*e),R:1.00014-.01671*Math.cos(i*e)-.0014*Math.cos(2*i*e)}}function e(t){var e=(t-2451545)/36525;return 23.43929111-e*(46.836769/3600-e*(1831e-7/3600+e*(5.565e-7-e*(1.6e-10-4.34e-8*e/3600))))}function r(t,e){var r=180/Math.PI,n=Math.PI/180,i=Math.atan(Math.cos(e*n)*Math.tan(t*n))*r,o=Math.asin(Math.sin(e*n)*Math.sin(t*n))*r;return{alpha:i+=90*Math.floor(t/90)-90*Math.floor(i/90),delta:o}}Ltt.prototype._loader=function(t,e,r){var n=this.getCoordinates(this.get("time")),i=new hn([n]);i.transform("EPSG:4326",r),this.addFeature(new z(i))},Ltt.prototype.setTime=function(t){this.set("time",t),this.refresh()},Ltt.prototype.getSunPosition=function(n){var i=(n?new Date(n):new Date)/864e5+2440587.5,o=(18.697374558+24.06570982441908*(i-2451545))%24,s=t(i),a=e(i),l=r(s.lambda,a);return[l.alpha-15*o,l.delta]},Ltt.getNightLat=function(n,i){var o=180/Math.PI,s=Math.PI/180,a=(i?new Date(i):new Date)/864e5+2440587.5,l=(18.697374558+24.06570982441908*(a-2451545))%24,u=t(a),h=e(a),c=r(u.lambda,h),A=15*l+n-c.alpha;return Math.atan(-Math.cos(A*s)/Math.tan(c.delta*s))*o},Ltt.prototype.getCoordinates=function(n,i){for(var o=180/Math.PI,s=Math.PI/180,a=(n?new Date(n):new Date)/864e5+2440587.5,l=(18.697374558+24.06570982441908*(a-2451545))%24,u=[],h=t(a),c=e(a),A=r(h.lambda,c),f=this.get("step")||1,p=-180;p<=180;p+=f){var d=p,g=15*l+d-A.alpha,y=Math.atan(-Math.cos(g*s)/Math.tan(A.delta*s))*o;u.push([d,y])}switch(i){case"line":break;case"day":A.delta*=-1;default:y=A.delta<0?90:-90;for(var m=180;m>=-180;m-=f)u.push([m,y]);u.push(u[0])}if("daynight"===i){var v=[];u.forEach((function(t){v.push(t.slice())})),v[0][1]=-v[0][1],v[v.length-1][1]=-v[0][1],v[v.length-1][1]=-v[0][1],u=[u,v]}return u}}();var ktt,Ott=function(t,e){var r=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(r*r+n*n)};!function(){function t(t,e){var r;for(let n=t.length-1;n>0;n--)(t[n][0]>e&&t[n-1][0]<e||t[n][0]<e&&t[n-1][0]>e)&&(r=[e,(e-t[n][0])/(t[n-1][0]-t[n][0])*(t[n-1][1]-t[n][1])+t[n][1]],t.splice(n,0,r))}function e(t,e){var r;for(let n=t.length-1;n>0;n--)(t[n][1]>e&&t[n-1][1]<e||t[n][1]<e&&t[n-1][1]>e)&&(r=[(e-t[n][1])/(t[n-1][1]-t[n][1])*(t[n-1][0]-t[n][0])+t[n][0],e],t.splice(n,0,r))}ktt=function(r,n){var i="Polygon"===n.getType();if(!i&&"MultiPolygon"!==n.getType())return null;var o=n.getCoordinates();return i&&(o=[o]),o.forEach((function(n){n.forEach((function(n){t(n,r[0]),t(n,r[2]),e(n,r[1]),e(n,r[3])}))})),o.forEach((function(t){t.forEach((function(t){t.forEach((function(t){t[0]<r[0]?t[0]=r[0]:t[0]>r[2]&&(t[0]=r[2]),t[1]<r[1]?t[1]=r[1]:t[1]>r[3]&&(t[1]=r[3])}))}))})),i?new hn(o[0]):new Jl(o)}}();var Ntt=function(t,e,r,n){var i=[];!1!==n&&i.push(t);var o=Ott(t,e);if(o){var s=Math.round(o/r);if(s>1)for(var a=(e[0]-t[0])/s,l=(e[1]-t[1])/s,u=1;u<s;u++)i.push([t[0]+a*u,t[1]+l*u])}return i.push(e),i};mn.prototype.sampleAt=function(t){for(var e=this.getCoordinates(),r=[],n=1;n<e.length;n++)r=r.concat(Ntt(e[n-1],e[n],t,1===n));return new mn(r)},Vl.prototype.sampleAt=function(t){var e=this.getCoordinates(),r=[];return e.forEach((function(e){for(var n=[],i=1;i<e.length;i++)n=n.concat(Ntt(e[i-1],e[i],t,1===i));r.push(n)})),new Vl(r)},hn.prototype.sampleAt=function(t){var e=this.getCoordinates(),r=[];return e.forEach((function(e){for(var n=[],i=1;i<e.length;i++)n=n.concat(Ntt(e[i-1],e[i],t,1===i));r.push(n)})),new hn(r)},Jl.prototype.sampleAt=function(t){var e=this.getCoordinates(),r=[];return e.forEach((function(e){var n=[];r.push(n),e.forEach((function(e){for(var r=[],i=1;i<e.length;i++)r=r.concat(Ntt(e[i-1],e[i],t,1===i));n.push(r)}))})),new Jl(r)},jl.prototype.intersection=function(t,e){if(t.sampleAt){var r=mt(this.getCenter().concat(this.getCenter()),this.getRadius());t=(t=ktt(r,t)).simplify(e);var n=this.getCenter(),i=this.getRadius(),o=t.sampleAt(e).getCoordinates();switch(t.getType()){case"Polygon":o=[o];case"MultiPolygon":var s=!1,a=[];return o.forEach((function(t){var e=[];a.push(e),t.forEach((function(t){var r=[];e.push(r),t.forEach((function(t){var e=Ott(n,t);e>i?(s=!0,r.push([n[0]+i/e*(t[0]-n[0]),n[1]+i/e*(t[1]-n[1])])):r.push(t)}))}))})),s?"Polygon"===t.getType()?new hn(a[0]):new Jl(a):t}}return t};var Rtt=function(t){t=t||{},this.source=t.source,this.nodes=new ws,this.maxIteration=t.maxIteration||2e4,this.stepIteration=t.stepIteration||2e3,this.astar=!0,this.candidat=[],N.call(this),this.set("epsilon",t.epsilon||1e-6)};vg(Rtt,N),Rtt.prototype.weight=function(){return 1},Rtt.prototype.direction=function(){return 2},Rtt.prototype.getLength=function(t){return t.getGeometry&&(t=t.getGeometry()),t.getLength()},Rtt.prototype.getNodeSource=function(){return this.nodes},Rtt.prototype.getEdges=function(t){var e=mt(yt([t]),this.get("epsilon")),r=[];return this.source.forEachFeatureIntersectingExtent(e,(function(t){r.push(t)})),r},Rtt.prototype.getNode=function(t){var e=mt(yt([t]),this.get("epsilon")),r=[];return this.nodes.forEachFeatureIntersectingExtent(e,(function(t){r.push(t)})),r[0]},Rtt.prototype.addNode=function(t,e,r,n,i){if(this.wdist&&e>this.wdist)return!1;var o=this.getNode(t),s=e+this.getLength(new mn([this.end,t]))*this.weight();if(this.astar&&this.wdist&&s>this.wdist)return!1;if(o){if(o!==this.arrival&&o.get("wdist")<=e)return o;o.set("dist",r),o.set("wdist",e),o.set("dtotal",s),o.set("from",n),o.set("prev",i),o===this.arrival&&(this.wdist=e),this.candidat.push(o)}else o=new z({geometry:new Vr(t),from:n,prev:i,dist:r||0,wdist:e,dtotal:s}),e<0?o.set("wdist",!1):this.candidat.push(o),this.nodes.addFeature(o);return o},Rtt.prototype.closestCoordinate=function(t){var e=this.source.getClosestFeatureToCoordinate(t),r=e.getGeometry().getFirstCoordinate(),n=e.getGeometry().getLastCoordinate();return Ott(t,r)<Ott(t,n)?r:n},Rtt.prototype.path=function(t,e){if(this.running)return!1;if(t=this.closestCoordinate(t),this.end=this.closestCoordinate(e),t[0]===this.end[0]&&t[1]===this.end[1])return this.dispatchEvent({type:"finish",route:[],wDistance:-1,distance:this.wdist}),!1;var r=this;return this.nodes.clear(),this.candidat=[],this.wdist=0,this.running=!0,this.addNode(t,0),this.arrival=this.addNode(this.end,-1),this.nb=0,this.dispatchEvent({type:"start"}),setTimeout((function(){r._resume()})),[t,this.end]},Rtt.prototype.resume=function(){this.running||this.candidat.length&&(this.running=!0,this.nb=0,this._resume())},Rtt.prototype.pause=function(){this.running&&(this.nb=-1)},Rtt.prototype.getBestWay=function(){for(var t,e,r=-1,n=0;e=this.candidat[n];n++)e.get("wdist")>r&&(t=e,r=e.get("wdist"));return this.getRoute(t)},Rtt.prototype._resume=function(){if(this.running){for(;this.candidat.length;){this.candidat.sort((function(t,e){return t.get("dtotal")<e.get("dtotal")?1:t.get("dtotal")===e.get("dtotal")?0:-1}));for(var t,e=this.candidat.pop(),r=e.getGeometry().getCoordinates(),n=this.getEdges(r),i=0;t=n[i];i++){if(e.get("from")!==t){var o=this.getLength(t),s=e.get("wdist")+o*this.weight(t);o=e.get("dist")+o;var a=t.getGeometry().getFirstCoordinate(),l=t.getGeometry().getLastCoordinate(),u=this.direction(t);0!==u&&(r[0]===a[0]&&r[1]===a[1]&&-1!==u&&this.addNode(l,s,o,t,e),r[0]===l[0]&&r[0]===l[0]&&1!==u&&this.addNode(a,s,o,t,e))}if(-1===this.nb||this.nb++>this.maxIteration)return this.running=!1,void this.dispatchEvent({type:"pause",overflow:-1!==this.nb});if(!(this.nb%this.stepIteration)){var h=this;return window.setTimeout((function(){h._resume()}),5),void this.dispatchEvent({type:"calculating"})}}}this.nodes.clear(),this.running=!1,this.dispatchEvent({type:"finish",route:this.getRoute(this.arrival),wDistance:this.wdist,distance:this.arrival.get("dist")})}},Rtt.prototype.getRoute=function(t){for(var e=[];t;)e.unshift(t.get("from")),t=t.get("prev");return e.shift(),e};var Utt=yy,Dtt=function(t,e){return[Math.round(t[0]/e)*e,Math.round(t[1]/e)*e]},Qtt=Fh(sm),Gtt=Dtt;function jtt(t,e,r){return"FeatureCollection"===t.type?t.features.reduce((function(t,r){return jtt(r,e,t)}),r):e(r,t)}function Htt(t){return"LineString"===t.geometry.type}var ztt={compactNode:Vtt,compactGraph:function(t,e,r,n){var i=(n=n||{}).progress,o=Object.keys(t).reduce((function(e,r,o,s){var a=t[r],l=Object.keys(a),u=l.length;return!(void 0!==n.compact&&!n.compact)&&(1===u?!t[l[0]][r]:2===u&&l.filter((function(e){return t[e][r]})).length===u)||(e[r]=a),o%1e3==0&&i&&i("compact:ends",o,s.length),e}),{});return Object.keys(o).reduce((function(s,a,l,u){var h=Vtt(a,t,o,e,r,!1,n);return s.graph[a]=h.edges,s.coordinates[a]=h.coordinates,n.edgeDataReduceFn&&(s.reducedEdges[a]=h.reducedEdges),l%1e3==0&&i&&i("compact:nodes",l,u.length),s}),{graph:{},coordinates:{},reducedEdges:{}})}};function Vtt(t,e,r,n,i,o,s){s=s||{};var a=e[t];return Object.keys(a).reduce((function(a,l){var u=function(t,e,r,n,i,o,s,a){var l=r[t][e],u=r[e][t],h=[],c=[],A=a.edgeDataSeed;for(a.edgeDataReduceFn&&(A=a.edgeDataReduceFn(A,o[e][t]));!n[e];){var f=r[e];if(!f)break;var p=Object.keys(f).filter((function(e){return e!==t}))[0];if(l+=f[p],s){if(u+=r[p][e],c.indexOf(e)>=0){n[e]=r[e];break}c.push(e)}a.edgeDataReduceFn&&(A=a.edgeDataReduceFn(A,o[e][p])),h.push(i[e]),t=e,e=p}return{vertex:e,weight:l,reverseWeight:u,coordinates:h,reducedEdge:A}}(t,l,e,r,n,i,o,s),h=u.weight,c=u.reverseWeight;if(u.vertex!==t&&((!a.edges[u.vertex]||a.edges[u.vertex]>h)&&(a.edges[u.vertex]=h,a.coordinates[u.vertex]=[n[t]].concat(u.coordinates),a.reducedEdges[u.vertex]=u.reducedEdge),o&&!isNaN(c)&&(!a.incomingEdges[u.vertex]||a.incomingEdges[u.vertex]>c))){a.incomingEdges[u.vertex]=c;var A=[n[t]].concat(u.coordinates);A.reverse(),a.incomingCoordinates[u.vertex]=A}return a}),{edges:{},incomingEdges:{},coordinates:{},incomingCoordinates:{},reducedEdges:{}})}var Ktt=function(t,e){var r=(e=e||{}).keyFn||function(t){return t.join(",")},n=e.precision||1e-5,i=function(t,e){var r=[];return"FeatureCollection"===t.type&&(r=r.concat(t.features.filter(e))),{type:"FeatureCollection",features:r}}(t,Htt),o=Qtt(i).features.reduce((function(t,i,o,s){var a=Gtt(i.geometry.coordinates,n);return t[r(a)]=i.geometry.coordinates,o%1e3==0&&e.progress&&e.progress("topo:vertices",o,s.length),t}),{}),s=jtt(i,(function(t,i,o,s){return i.geometry.coordinates.forEach((function(e,o,s){if(o>0){var a=r(Gtt(s[o-1],n)),l=r(Gtt(e,n));t.push([a,l,i.properties])}})),o%1e3==0&&e.progress&&e.progress("topo:edges",o,s.length),t}),[]);return{vertices:o,edges:s}},qtt=ztt,Wtt=Fh(wy).default,{point:Xtt}=um,Ytt=ztt,Ztt=Dtt,Jtt=$tt;function $tt(t,e){if(e=e||{},t.compactedVertices||(t=function(t,e){var r,n=(e=e||{}).weightFn||function(t,e){return Wtt(Xtt(t),Xtt(e))};"FeatureCollection"===t.type?r=Ktt(t,e):t.edges&&(r=t),t=r.edges.reduce((function(t,i,o,s){var a=i[0],l=i[1],u=i[2],h=n(r.vertices[a],r.vertices[l],u),c=function(r){t.vertices[r]||(t.vertices[r]={},e.edgeDataReduceFn&&(t.edgeData[r]={}))},A=function(r,n,i){t.vertices[r][n]=i,e.edgeDataReduceFn&&(t.edgeData[r][n]=e.edgeDataReduceFn(e.edgeDataSeed,u))};return h&&(c(a),c(l),h instanceof Object?(h.forward&&A(a,l,h.forward),h.backward&&A(l,a,h.backward)):(A(a,l,h),A(l,a,h))),o%1e3==0&&e.progress&&e.progress("edgeweights",o,s.length),t}),{edgeData:{},vertices:{}});var i=qtt.compactGraph(t.vertices,r.vertices,t.edgeData,e);return{vertices:t.vertices,edgeData:t.edgeData,sourceVertices:r.vertices,compactedVertices:i.graph,compactedCoordinates:i.coordinates,compactedEdges:e.edgeDataReduceFn?i.reducedEdges:null}}(t,e)),this._graph=t,this._keyFn=e.keyFn||function(t){return t.join(",")},this._precision=e.precision||1e-5,this._options=e,0===Object.keys(this._graph.compactedVertices).filter((function(t){return"edgeData"!==t})).length)throw new Error("Compacted graph contains no forks (topology has no intersections).")}$tt.prototype={findPath:function(t,e){var r=this._keyFn(Ztt(t.geometry.coordinates,this._precision)),n=this._keyFn(Ztt(e.geometry.coordinates,this._precision));if(!this._graph.vertices[r]||!this._graph.vertices[n])return null;this._createPhantom(r),this._createPhantom(n);var i=function(t,e,r){var n={};n[e]=0;for(var i=new Utt([[0,[e],e]],(function(t,e){return t[0]-e[0]}));i.length;){var o=i.pop(),s=o[0],a=o[2];if(a===r)return o.slice(0,2);var l=t[a];Object.keys(l).forEach((function(t){var e=s+l[t];if(!(t in n)||e<n[t]){n[t]=e;var r=[e,o[1].concat([t]),t];i.push(r)}}))}return null}(this._graph.compactedVertices,r,n);if(i){var o=i[0];return{path:(i=i[1]).reduce(function(t,e,r,n){return r>0&&(t=t.concat(this._graph.compactedCoordinates[n[r-1]][e])),t}.bind(this),[]).concat([this._graph.sourceVertices[n]]),weight:o,edgeDatas:this._graph.compactedEdges?i.reduce(function(t,e,r,n){return r>0&&t.push({reducedEdge:this._graph.compactedEdges[n[r-1]][e]}),t}.bind(this),[]):void 0}}return null},serialize:function(){return this._graph},_createPhantom:function(t){if(this._graph.compactedVertices[t])return null;var e=Ytt.compactNode(t,this._graph.vertices,this._graph.compactedVertices,this._graph.sourceVertices,this._graph.edgeData,!0,this._options);return this._graph.compactedVertices[t]=e.edges,this._graph.compactedCoordinates[t]=e.coordinates,this._graph.compactedEdges&&(this._graph.compactedEdges[t]=e.reducedEdges),Object.keys(e.incomingEdges).forEach(function(r){this._graph.compactedVertices[r][t]=e.incomingEdges[r],this._graph.compactedCoordinates[r][t]=[this._graph.sourceVertices[r]].concat(e.incomingCoordinates[r].slice(0,-1)),this._graph.compactedEdges&&(this._graph.compactedEdges[r][t]=e.reducedEdges[r])}.bind(this)),t},_removePhantom:function(t){t&&(Object.keys(this._graph.compactedVertices[t]).forEach(function(e){delete this._graph.compactedVertices[e][t]}.bind(this)),Object.keys(this._graph.compactedCoordinates[t]).forEach(function(e){delete this._graph.compactedCoordinates[e][t]}.bind(this)),this._graph.compactedEdges&&Object.keys(this._graph.compactedEdges[t]).forEach(function(e){delete this._graph.compactedEdges[e][t]}.bind(this)),delete this._graph.compactedVertices[t],delete this._graph.compactedCoordinates[t],this._graph.compactedEdges&&delete this._graph.compactedEdges[t])}};var tet=function(t){Sh.call(this,t)};vg(tet,Sh),tet.prototype.getExtent=function(){return this.getSource().getExtent()};var eet=function(t){var e={attributions:t.attributions,logo:t.logo,projection:t.projection};this._image=t.image?t.image:new Image,this._image.crossOrigin=t.crossOrigin;var r=this;this._image.onload=function(){r.setCrop(r.crop),r.changed()},t.image||(this._image.src=t.url),e.canvasFunction=this.calculateImage,Rk.call(this,e),this.center=t.imageCenter,this.setScale(t.imageScale),this.rotate=t.imageRotate?t.imageRotate:0,this.crop=t.imageCrop,this.mask=t.imageMask,this.setCrop(this.crop),this.on("change",function(){this.set("extent",this.calculateExtent())}.bind(this))};vg(eet,Rk),eet.prototype.calculateImage=function(t,e,r,n){if(this.center){var i=document.createElement("canvas");i.width=n[0],i.height=n[1];var o=i.getContext("2d");if(!this._imageSize)return i;if(this.mask){o.beginPath();var s=f(this.mask[0]);o.moveTo(s[0],s[1]);for(var a=1;a<this.mask.length;a++)s=f(this.mask[a]),o.lineTo(s[0],s[1]);o.clip()}var l=f(this.center),u=(this._image.naturalWidth/2-this.crop[0])*this.scale[0]/e*r,h=(this._image.naturalHeight/2-this.crop[1])*this.scale[1]/e*r,c=this._imageSize[0]*this.scale[0]/e*r,A=this._imageSize[1]*this.scale[1]/e*r;return o.translate(l[0],l[1]),this.rotate&&o.rotate(this.rotate),o.drawImage(this._image,this.crop[0],this.crop[1],this._imageSize[0],this._imageSize[1],-u,-h,c,A),i}function f(e){return[(e[0]-t[0])/(t[2]-t[0])*n[0],(e[1]-t[3])/(t[1]-t[3])*n[1]]}},eet.prototype.getCenter=function(){return this.center},eet.prototype.setCenter=function(t){this.center=t,this.changed()},eet.prototype.getScale=function(){return this.scale},eet.prototype.setScale=function(t){switch(typeof t){case"number":t=[t,t];break;case"object":if(2!=t.length)return;break;default:return}this.scale=t,this.changed()},eet.prototype.getRotation=function(){return this.rotate},eet.prototype.setRotation=function(t){this.rotate=t,this.changed()},eet.prototype.getGeoImage=function(){return this._image},eet.prototype.getCrop=function(){return this.crop},eet.prototype.setMask=function(t){this.mask=t,this.changed()},eet.prototype.getMask=function(){return this.mask},eet.prototype.setCrop=function(t){if(this._image.naturalWidth){if(t){switch(typeof t){case"number":t=[t,t,this._image.naturalWidth-t,this._image.naturalHeight-t];break;case"object":if(4!=t.length)return;break;default:return}t=yt([[t[0],t[1]],[t[2],t[3]]]),this.crop=[Math.max(0,t[0]),Math.max(0,t[1]),Math.min(this._image.naturalWidth,t[2]),Math.min(this._image.naturalHeight,t[3])]}else this.crop=[0,0,this._image.naturalWidth,this._image.naturalHeight];this.crop[2]<=this.crop[0]&&(this.crop[2]=this.crop[0]+1),this.crop[3]<=this.crop[1]&&(this.crop[3]=this.crop[1]+1),this._imageSize=[this.crop[2]-this.crop[0],this.crop[3]-this.crop[1]],this.changed()}else this.crop=t},eet.prototype.getExtent=function(t){var e=this.get("extent");if(e||(e=this.calculateExtent()),t)for(var r=0;r<t.length;r++)t[r]=e[r];return e},eet.prototype.calculateExtent=function(t){var e;if(!1!==t&&this.getMask())e=new hn([this.getMask()]);else{var r=this.getCenter(),n=this.getScale(),i=this.getGeoImage().width*n[0],o=this.getGeoImage().height*n[1];(e=cn(yt([[r[0]-i/2,r[1]-o/2],[r[0]+i/2,r[1]+o/2]]))).rotate(-this.getRotation(),r)}return e.getExtent()};const ret=Object.freeze(Object.defineProperty({__proto__:null,ClusterLayer:class extends BT{constructor(t,r){super(t,r),e(this,"styleCache"),e(this,"clusterSource"),e(this,"selectCluster"),this.option={convexhull:!0,animatesel:!0,haslink:!0,distance:40,levelColor:[{maxnum:5e3,strokecolor:"rgba(192,0,0,0.5)",strokewidth:15,fillcolor:"rgba(192,0,0,1)"},{maxnum:1e3,strokecolor:"rgba(255,165,0,0.5)",strokewidth:15,fillcolor:"rgba(255,165,0,1)"},{maxnum:500,strokecolor:"rgba(255,128,0,0.5)",strokewidth:15,fillcolor:"rgba(255,128,0,1)"},{maxnum:100,strokecolor:"rgba(0,191,255,0.5)",strokewidth:15,fillcolor:"rgba(0,191,255,1)"},{maxnum:50,strokecolor:"rgba(139,0,139,0.5)",strokewidth:15,fillcolor:"rgba(139,0,139,1)"},{maxnum:2,strokecolor:"rgba(255,165,0,0.5)",strokewidth:15,fillcolor:"rgba(\t255,165,0,1)"}]},this.option=Object.assign({},this.option,r),this.styleCache={},this.layertype="ClusterLayer",this.clusterSource=new MT({distance:this.option.distance,source:this._source}),this.layer=new u6({zIndex:this.option.zIndex,source:this.clusterSource,style:this.getStyle.bind(this)}),this.layer.set("layerid",t);var n=new si({radius:5,stroke:new vn({color:"rgba(0,255,255,1)",width:1}),fill:new fn({color:"rgba(0,255,255,0.3)"})}),i=new Ai({image:n}),o=new Ai({image:n,stroke:new vn({color:"#fff",width:1})});this.selectCluster=new c6({layers:[this.layer],condition:sl,pointRadius:7,animate:this.option.animatesel,featureStyle:()=>[this.option.haslink?o:i],style:(t,e)=>{let r=t.get("features");if(r){if(r.length>1){var n=[this.getStyle(t,e)];if(this.option.convexhull&&A6){var i=[];for(let t=0;t<r.length;t++)i.push(r[t].getGeometry().getFirstCoordinate());var o=A6(i);n.push(new Ai({stroke:new vn({color:"rgba(0,0,192,0.5)",width:2}),fill:new fn({color:"rgba(0,0,192,0.3)"}),geometry:new hn([o]),zIndex:100}))}return n}return[new Ai({image:new si({radius:5,stroke:new vn({color:"rgba(255,0,0,0.5)",width:10}),fill:new fn({color:"rgba(255,0,0,1)"})}),text:new fi({text:r[0].getProperties().name,font:"13px Microsoft YaHei",offsetY:-15,fill:new fn({color:"#8B4513"}),stroke:new vn({color:"#fff",width:2})})})]}}}),this.selectCluster.getFeatures().on(["add"],(t=>{t.target.getArray()[0].get("features")})),this.selectCluster.getFeatures().on(["remove"],(function(t){}))}appendTo(t){var e;this._map=t,this._map.addInteraction(this.selectCluster),this.layer&&(null==(e=this._map)||e.addLayer(this.layer))}showTitle(t,e){new Promise(((r,n)=>{this._source.getFeatures().forEach((r=>{let n=r.getProperties();if(t==n.dataType)try{r.getStyle().getText().setText(e?r.get("name"):"")}catch(OR){}})),this.layer.changed()}))}addFeaturesMN(t,e){for(var r,n,i=t.getView().calculateExtent(t.getSize()),o=[],s=0;s<e;++s)o[s]=new z(new Vr([i[0]+(i[2]-i[0])*Math.random(),i[1]+(i[3]-i[1])*Math.random()])),o[s].set("id",s),o[s].set("name","123123"),o[s].set("classname",s);null==(n=null==(r=this.clusterSource)?void 0:r.getSource())||n.addFeatures(o)}getStyle(t,e){var r=t.get("features").length,n=this.styleCache[r];return 1==r?n=this.styleCache[r]=t.get("features")[0].getStyle():n||(this.option.levelColor.sort((function(t,e){return t.maxnum-e.maxnum})),this.option.levelColor.forEach((t=>{var e=Math.max(8,Math.min(.75*r,20));r>=t.maxnum&&(n=this.styleCache[r]=new Ai({image:new si({radius:e,stroke:new vn({color:t.strokecolor,width:t.strokewidth,lineCap:"butt"}),fill:new fn({color:t.fillcolor})}),text:new fi({text:r.toString(),fill:new fn({color:"#fff"})})}))}))),n}},HeatmapLayer:class extends BT{constructor(t,e){super(t,e),this.layertype="HeatmapLayer",this._source=new ws({wrapX:!1}),this.option={blur:25,radius:8,gradient:["#00f","#0ff","#0f0","#ff0","#f00"]},this.option=Object.assign({},this.option,e),this.layer=new yh({source:this._source,zIndex:this.option.zIndex,gradient:this.option.gradient,blur:this.option.blur,radius:this.option.radius}),this.layer.set("layerid",t)}setBlur(t){this.layer.setBlur(parseInt(t,10))}setRadius(t){this.layer.setRadius(parseInt(t,10))}},WfsLayer:class extends BT{constructor(t,r){super(t,r),e(this,"geoserverData"),this.layertype="WfsLayer";const n=this.option.url;this._source=new ws({format:new iA,url:function(t){return n+"&version=1.1.0&request=GetFeature&typename=xianjie1:2020年初县级矢量3857&outputFormat=application/json&srsname=EPSG:3857&NaN"+t.join(",")+",EPSG:3857"},strategy:ds}),this.layer=new ls({source:this._source,style:new Ai({stroke:new vn({color:"rgba(0, 0, 255, 1.0)",width:2})})}),this.layer.set("layerid",t),this.geoserverData={wsName:"",uri:"mars",wfsURL:this.option.url,layer:"hfty"}}loadData(){var t={srcName:"EPSG:3857",featureNS:this.geoserverData.uri,featurePrefix:this.geoserverData.wsName,featureTypes:[this.geoserverData.layer],outputFormat:"application/json"},e=(new ptt).writeGetFeature(t);fetch(this.geoserverData.wfsURL,{method:"POST",body:(new XMLSerializer).serializeToString(e)}).then((function(t){return t.json()})).then((t=>{var e=new iA({geometryName:"geom"}).readFeatures(t);this._source&&this.addFeatures("wms",e)}))}},ClusterImageLayer:class extends BT{constructor(t,r){super(t,r),e(this,"styleCache"),e(this,"clusterSource"),e(this,"selectCluster"),this.styleCache={},this.layertype="ClusterImageLayer",this.option={distance:40,imageFieldName:"主照片地址",animationDuration:600,maxResolution:40},this.option=Object.assign({},this.option,r),this._source=new ws,this.clusterSource=new MT({distance:this.option.distance,source:this._source}),this.layer=new u6({source:this.clusterSource,animationDuration:this.option.animationDuration,maxResolution:this.option.maxResolution,renderOrder:function(t,e){return e.getGeometry().getExtent()[1]-t.getGeometry().getExtent()[1]},style:(t,e)=>this.getFeatureStyle(t,e,"")}),this.layer.set("layerid",t),this.layer.set("layertype",this.layertype),this.selectCluster=new gu({layers:[this.layer],condition:sl,style:(t,e)=>this.getFeatureStyle(t,e,"sel")}),this.selectCluster.setActive(!0),this.selectCluster.getFeatures().on(["add"],(t=>{var e=t.target.getArray()[0].get("features");e&&this.trigger(Jd.onFeatureSelected,e)})),this.selectCluster.getFeatures().on(["remove"],(function(t){}))}addFeaturesMN(t,e){for(var r,n,i,o,s=t.getView().calculateExtent(t.getSize()),a=[],l=0;l<e;++l)a[l]=new z(new Vr([s[0]+(s[2]-s[0])*Math.random(),s[1]+(s[3]-s[1])*Math.random()])),a[l].set("id",l),a[l].set("name","123123"),a[l].set("classname",l),a[l].set("thumbnail","");null==(n=null==(r=this.clusterSource)?void 0:r.getSource())||n.clear(),null==(o=null==(i=this.clusterSource)?void 0:i.getSource())||o.addFeatures(a)}getFeatureStyle(t,e,r){let n,i=t.get("features")[0].get("uuid"),o=t.get("features")[0],s=t.get("features").length,a=o.get(this.option.imageFieldName);if(a=a.replace("_sss","_s"),n||(this.styleCache[i]=n=new Ai({image:new dtt({src:a,radius:20,crop:!0,kind:s>1?"folio":"square",shadow:!0,onload:function(){try{t.changed()}catch{}},stroke:new vn({width:2,color:"sel"===r?"rgba(0, 255, 0,1)":"#fff"})})})),s>1){let t=new Ai({image:new ii({points:12,radius:9,fill:new fn({color:"rgba(0, 255, 0,0.3)"})}),text:new fi({text:s.toString(),font:"bold 12px helvetica,sans-serif",fill:new fn({color:"#000"})})});var l=t.getImage().getAnchor();return l[0]-=20,l[1]+=20,[n,t]}return[n]}appendTo(t){var e,r;this._map=t,this.selectCluster&&(null==(e=this._map)||e.addInteraction(this.selectCluster)),this.layer&&(null==(r=this._map)||r.addLayer(this.layer))}},GraphicLayer:class extends BT{constructor(t,r){super(t,r),e(this,"animList"),this.animList=[],this.layertype="GraphicLayer",this.layer=new ls({source:this._source,zIndex:this.option.zIndex}),this.layer.set("layerid",t),this._source.on("addfeature",(t=>{t.feature.get("loadAnimation")&&setTimeout((()=>{this.animateFeature(t.feature,t.feature.get("loadAnimation"))}),1),t.feature.get("pulseAnimate")&&setTimeout((()=>{this.pulseAnimate(t.feature,t.feature.get("pulseAnimate"))}),1)})),this._source.on("removefeature",(t=>{t.feature.get("pulseAnimate")&&this.animList.forEach(((e,r)=>{t.feature.get("uuid")==e.uuid&&e.anim.stop({user:!0})}))})),this.layer.on(this.EventType.featureType.onFeatureContextmenu,(t=>{this._setFeatureContextmenu(t.data.feature,t.data.contextmenu)})),this._on("onClickTolayer",(t=>{"function"==typeof t.isPopupBind&&t.isPopupBind()?t.openPopup():this.option.enabledPopup&&this.openPopup(t)}))}pathAnimate(t,e,r){let n={rotate:!0,speed:1,revers:!0,repeat:1/0,easing:Bs};r=Object.assign({},n,r);let i=new wtt({path:e,rotate:r.rotate,speed:r.speed,repeat:r.repeat,revers:r.revers});return this.trigger(Jd.onPathAnimateStart,{data:t}),i.on("animationend",(t=>{this.trigger(Jd.onPathAnimateEnd,{data:t.feature})})),i.on("animating",(t=>{this.trigger(Jd.onPathAnimateRunning,{data:t})})),this.layer.animateFeature(t,i)}pulseAnimate(t,e){let r={fade:Ss,duration:2e3,revers:!1,repeat:1/0,easing:Ss,radius:30,fillcolor:"rgba(255,0,0,0.2)",strokecolor:"red",strokewidth:1};e=Object.assign({},r,e);let n=new Ptt({lnglat:t.getGeometry().getCoordinates(),style:{image:{radius:e.radius,scale:1,fill:{color:e.fillcolor},stroke:{color:e.strokecolor,width:e.strokewidth}},zIndex:990},attribute:{uuid:t.get("uuid")}}),i=new Btt(e);this.animList.push({uuid:t.get("uuid"),anim:this.layer.animateFeature(n,i)}),i.on("animationend",(t=>{this.animList.forEach(((e,r)=>{t.feature.get("uuid")==e.uuid&&this.animList.splice(r,1)}))}))}animateFeatures(t,e){t.forEach(((t,r)=>{this.animateFeature(t,e)}))}animateFeature(t,e){let r,n={duration:3e3,animateType:lg.Bounce,repeat:1,speed:.8,revers:!1,zoomOut:!1,side:!1};switch((e=Object.assign({},n,e)).animateType){case lg.Blink:r=new mtt(e);break;case lg.Drop:r=new vtt(e);break;case lg.Fade:r=new _tt(e);break;case lg.Path:r=new wtt(e);break;case lg.Shake:r=new btt(e);break;case lg.Show:r=new xtt(e);break;case lg.Slide:r=new Ctt(e);break;case lg.Teleport:r=new Stt(e);break;case lg.Throw:r=new Ett(e);break;case lg.Zoom:r=new Btt(e);break;case lg.ZoomOut:e.zoomOut=!0,r=new Btt(e);break;default:r=new ytt(e)}this.layer.animateFeature(t,r)}},GraphicImageLayer:IT,DayNightLayer:class extends BT{constructor(t,e){super(t,e),this.layertype="DayNightLayer",this._source=new Ltt({}),this.layer=new ls({source:this._source,zIndex:500,style:new Ai({image:new si({radius:5,fill:new fn({color:"red"})}),fill:new fn({color:[0,0,50,.5]})})}),this.layer.set("layerid",t),this._source.on("addfeature",(t=>{}))}setDataTime(t){this._source.setTime(t)}},kmlLayer:class extends BT{constructor(t,e){super(t,e),this.option={},Object.assign(this.option,e),this.layertype="KmlLayer",this._source=new ws({url:e.url,format:new f9({extractStyles:!1})}),this.layer=new ls({source:this._source,zIndex:e.zIndex}),this.layer.set("layerid",t),this.layer.on(Jd.onClick,(t=>{t.feature&&this.trigger(Jd.onClick,t.feature.getProperties())}))}},PathLayer:class extends BT{constructor(t,r){super(t,r),e(this,"autoPointSize"),e(this,"result"),e(this,"resultlayer"),e(this,"resultSource"),e(this,"nodesLayer"),e(this,"dijkstra"),e(this,"pathDatalayer"),e(this,"animating"),e(this,"distance"),e(this,"lastTime"),e(this,"pathLine"),e(this,"position"),e(this,"geoMarker"),e(this,"styles"),e(this,"vueThis"),e(this,"pathLineFeature"),e(this,"lastAngle"),e(this,"pathIndex"),e(this,"timer"),e(this,"pathNodeInfo"),e(this,"geoMarkerCircle"),e(this,"moveNodeInfo"),e(this,"FeatureMoveProgressInfo"),e(this,"oldPathLineFeature"),e(this,"routeFeatures"),e(this,"fun",(t=>{this.vueThis.moveFeature(t)})),this.option=bT.merge({roadNetworkData:"",pathStyle:{color:"#089519",width:10,imageUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACISURBVDhP3Yy9CYAwFIQzg+ASTuFmuokjuIaFpb2Vc8S7vEswKFE78YOD5H6e+zne+xqq9H0Hhj0U6WU/gwPbZTw7gmJn/UvKR1iwXmKRjlwfYWB5gsNGKh+hYX4ijBUzLx/BZzUvkI0j9JRFNkUhHM3zE3QaR5hBM4tgkG3AaPW85U338zi3A+g3FErF6/qjAAAAAElFTkSuQmCC"},trackPathStyle:{color:"rgba(180,205,205, 1)",width:10},geoMarkerStyle:{url:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAlCAYAAABGWhk4AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAABYgAAAWIBXyfQUwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAYGSURBVEiJlZdvaFvXFcB/7+mPI8lvjmxHil0vKkuq1bCuYbVsQrDxFup9aSAezA5pExpGRh26hdF0FOIv+9CyrLCh7dvABARmyIWB6Qad69Ik1PH8h67E0C6anbqTI8myZUeWZE1/nu4+6D7n2VZpcuCgq/vu/d37zjvn3HMVIQS1RFEUxWiaFECYFPE1AGtN6iNRAYv8VWVfRaouf2tKTbDcrQG1AXbZRgKLprGVWrtW93ZIqCJBdsAB1Mfj8d/H4/F3gXrZZyymmMz2SIQQu1RCrYATaAKeDoVC54WUUCh0HnhaPnPKscpejmJ+C5MJrMABQAMOpjY2xgpW13cB6sq5e02NjQPAQyAD/A8oA7tMstcUe8Gu8fHxM41ud/u1Ww/Ua7ceqI1ud/v4+PgZwCXHWOWc3ebYYwKLHOwGfG1tbV2ZbG51IZnT1bdnhfr2rFhI5vRMNrfa1tbWBfjk2AOGvQ2eecfm3dYBznA4fKHe5fS8MbmiVgRUBLwxuaLWu5yecDh8Qdq4rtauVZNtjY9mBxx9fX0tL3QEXv3wyy0xcT+9s/rE/TQffrklXugIvNrX19fCIw+xYvIQ1QRVzeBgMPia3W5zvPlRdJ8rvflRVLHbbY5gMPjaHrBqwC01TOC6evVq++DZs78JLaTUqWiWn//Aw7s/ahOXjh/icL1d+WI9j9OmKj9sb3t2e3t74s6dOymgxKNo3Oe3h4BjiURiUgghbi5vGe4r1lOp5fVUatn4bzxLJBKTwDE5d8evDTvbqEaUd2xsbNCYXNb10szMzGh/f//LwIvAi/39/S/PzMyMlnW9ZIwbGxsbBLySYTO+3S7ww4dbt4QQIrm29unQ0NArQC/QA3RL7QF6h4aGXkmurX0qhBDp9NYne8H7XGx+fv58Op22njp16pb8KCpAIBCoB5ibm8vKb1gBihMTEz1ut7sQCAT+AuSoJqiyERRGYLiohrHW0NDQEA6Hf+L3+497PJ5jLpfLC5DL5VaTyeRiJBL5bHBw8K/pdDpNNbS3gG2qIa4jd+sAGoEjwPeHh4cvbm5uLgqTFPWKKOoVc5fY3NxcHB4evgg8J+c2SpZVka9bJ+1z8ObNmxd7enp+pSiK9at0kd9Nx5mN5VhIbgPwnMdJZ6uLX59owddgRwhRvn379h96e3tvUE1MWaBgkVAHoF2/fr3r3Llzv1UUxfrnf63R/94iUytZYtkSugBdQCxbYi6eY+SzdZqcVjpaXKrP5+tyOp1zk5OTCaqZTleAbwGa3+9vnZ+ff0/TNN+f5lb55cR/9wZcTflj3xF+EfCSyWS+6ujo+GkkEokBmZ0UOTo6ekHTNN/iZoG3Pl55LCjAWx+vsLhZQNM03+jo6AXpBNad/NDa2noc4J2pGNulrz0j98l2qcI7UzEAJMNugC2A1e12Pwvwzwe5x4YaYsyRDCtgUQF1YGCg2eFwNGeKOvdS+ScG30vlyRR1HA5H88DAQDOgqoCIRqMFIYSos6jY1P0H7jeJTVWos6gIIUQ0Gi0AQgUq09PTW7lcbsVuUXje63xi8PNeJ3aLQi6XW5ment4CKirV8CttbGz8G6DniPbEYGOOZJQAXaXq0MVIJDIFcO1kC09p9seGPqXZuXayBQDJ2ElCGtVwbkwkEiNer7frH/fTvBT+D+VK7YLREKuq8LfBZ/jxdxpYXV2dOXz48M+ADSBrLvjUeDx+9/Tp02f8zc66l545yJ2VLMntck3o9w45+PtZP93f1iiVSpnLly8PLSwsJKhmuAJUE7OL6tFydGRk5FI+n08KIUShrIvQ3XXx+gfL4sSNz8WJG5+L1z9YFqG766JQ1oUQQuTz+eTIyMgl4KhkuCRzp/jTAA9wtLu7++TS0tL74htkaWnp/e7u7pMS6pEMO2CpdfQfoJrtXMFgsKOzs7OztbW1vampyQ+QSqUisVjsi9nZ2dkrV67MUz018lQTfBFZxylCiFr1sI1qOq1jd80A1SOpLCEFqSVMx78QQuxUmya4sYBFAo22+aqgSy2b2hVMFWetMtasxkK17iDGlWHnTmIuY/8P3C0FYo4OztIAAAAASUVORK5CYII="},navigationOption:{defaultZoom:15,turnToZoom:17,speed:1,tracking:!0,trackingDirection:!0,showNode:!0,showStartEndNode:!0,showPathLine:!0,scale:1,pointDistance:.5}},r,!0),this.layertype="PathLayer",this._source=new ws({wrapX:!1,url:this.option.roadNetworkData,format:new iA});let n=[];this.pathDatalayer=new ls({source:this._source,zIndex:900,style:new Ai({stroke:new vn({width:1,color:[255,255,255,1]}),fill:new fn({color:"rgba(255, 255, 255, 0.1)"})})}),this.vueThis=this,this.styles={route:new Ai({stroke:new vn({width:6,color:[237,212,0,.8]})}),icon:new Ai({image:new Wo({anchor:[.5,1],src:"data/icon.png"})}),geoMarker:new Ai({zIndex:999,image:new Wo({src:this.option.geoMarkerStyle.url,rotation:0,rotateWithView:!1})})},this.resultSource=new ws,this.resultlayer=new ls({source:this.resultSource,zIndex:200,updateWhileAnimating:!0,updateWhileInteracting:!0}),this.position=new Vr([0,0]),this.geoMarker=new z({geometry:this.position}),this.geoMarker.setStyle(this.styles.geoMarker),this.resultSource.addFeature(this.geoMarker),this.resultlayer.on("change",(t=>{})),this.dijkstra=new Rtt({source:this._source}),this.dijkstra.on("start",(t=>{this.resultSource.clear()})),this.dijkstra.on("finish",(t=>{if(this.resultSource.clear(),!t.route.length)return void this.trigger(Jd.onPathComputerComplete,{pathLine:null,distance:0});if(this.routeFeatures=t.route,this.pathNodeInfo=mT.lineMerger(t.route,this.option.navigationOption.pointDistance),this.pathLineFeature=this.pathNodeInfo.line,this.pathLine=this.pathLineFeature.getGeometry(),this.option.navigationOption.totalDistance=De(this.pathLine)*this.option.navigationOption.scale,this.option.navigationOption.showNode){let t=0;this.pathLine.forEachSegment(((e,r)=>{let n=new z({geometry:new Vr(e)});n.setStyle(new Ai({image:new si({radius:12,fill:new fn({color:"#bb1422"})}),text:new fi({offsetX:0,offsetY:0,textAlign:"center",textBaseline:"middle",text:t.toString(),font:"12px sans-serif",fill:new fn({color:"white"})})})),t++,this.resultSource.addFeature(n)}))}this.position.setCoordinates(this.pathLine.getFirstCoordinate()),this.setUserMarker(this.pathLine.getFirstCoordinate(),0),this.option.navigationOption.tracking&&(this._map.getView().setCenter(this.pathLine.getFirstCoordinate()),this._map.getView().setZoom(this.option.navigationOption.defaultZoom)),this.geoMarkerCircle=new z({geometry:new jl(this.pathLine.getFirstCoordinate(),50)}),this.oldPathLineFeature=new z({geometry:new mn([this.pathLine.getFirstCoordinate()])}),this.oldPathLineFeature.setStyle(new Ai({stroke:new vn({color:this.option.trackPathStyle.color,width:this.option.trackPathStyle.width})})),this.pathLineFeature.setStyle(this.styleFunc.bind(this)),this.geoMarkerCircle.setStyle(new Ai({stroke:new vn({width:6,color:[237,212,0,.8]}),fill:new fn({color:"rgba(255, 255, 255, 0.1)"})})),this.option.navigationOption.showPathLine&&(this.resultSource.addFeature(this.geoMarker),this.resultSource.addFeature(this.oldPathLineFeature),this.resultSource.addFeature(this.pathLineFeature));let e=De(this.pathLineFeature.getGeometry());this.trigger(Jd.onPathComputerComplete,{pathLine:this.pathLineFeature,distance:e})})),this.dijkstra.on("pause",(t=>{t.overflow&&this.dijkstra.resume()})),this.dijkstra.on("calculating",(t=>{var e=this.dijkstra.getBestWay();this.resultSource.clear(),this.resultSource.addFeatures(e)})),this.nodesLayer=new ls({source:this.dijkstra.getNodeSource(),style:new Ai({image:new si({radius:5,fill:new fn({color:[255,0,0,.1]})})})}),n.push(this.nodesLayer),n.push(this.resultlayer),n.push(this.pathDatalayer),this.layer=new zs({layers:n}),this.layer.set("layerid",t),this.animating=!1,this.distance=0,this.lastTime}styleFunc(t,e){let r=[];r.push(new Ai({stroke:new vn({color:this.option.pathStyle.color,width:this.option.pathStyle.width})}));const n=t.get("geometry");if("linestring"===n.getType().toLowerCase()){const t=n.getCoordinates(),i=n.getLength(),o=80*e,s=Math.ceil(i/o);for(let e=1;e<s;e++){const t=e/s,i=n.getCoordinateAt(t),o=n.getCoordinateAt(t+.05*t),a=this.setAngle(i,o);r.push(new Ai({geometry:new Vr(i),image:new Wo({scale:.8,rotation:this.option.navigationOption.tracking?0:a.markAngle,src:this.option.pathStyle.imageUrl})}))}this.option.navigationOption.showStartEndNode&&(r.push(new Ai({geometry:new Vr(t[0]),image:new si({radius:12,fill:new fn({color:"green"})}),text:new fi({offsetX:0,offsetY:0,textAlign:"center",textBaseline:"middle",text:"起",font:"12px sans-serif",fill:new fn({color:"white"})})})),r.push(new Ai({geometry:new Vr(t[t.length-1]),image:new si({radius:12,fill:new fn({color:"#bb1422"})}),text:new fi({offsetX:0,offsetY:0,textAlign:"center",textBaseline:"middle",text:"终",font:"12px sans-serif",fill:new fn({color:"white"})})})))}return r}moveFeature(t){this.resultlayer.changed();const e=t.frameState.time,r=e-this.lastTime;if(this.distance=(this.distance+this.option.navigationOption.speed*r/1e6)%2,this.lastTime=e,this.trigger(Jd.onFeatureMoveProgress,{progress:this.distance,distance:this.distance,elapsedTime:r}),this.distance>=1)this.stopAnimation();else{const e=this.pathLine.getCoordinateAt(this.distance);let n,i=(this.distance+this.option.navigationOption.speed*r/1e6)%2;n=i>=1?this.pathLine.getLastCoordinate():this.pathLine.getCoordinateAt(i);let o=this.setAngle(e,n);this.position.setCoordinates(e),this.option.navigationOption.tracking?(this._map.getView().setCenter(e),this._map.getView().setRotation(o.viewAngle)):this.styles.geoMarker.getImage().setRotation(o.markAngle);const s=function(t){if(!(t.context instanceof CanvasRenderingContext2D))throw new Error("Only works for render events from Canvas 2D layers");var e=t.inversePixelTransform[0],r=t.frameState,n=lt(t.inversePixelTransform.slice(),r.coordinateToPixelTransform),i=ts(r.viewState.resolution,e);return new ko(t.context,e,r.extent,n,r.viewState.rotation,i,void 0)}(t);s.setStyle(this.styles.geoMarker),s.drawGeometry(this.position),this._map.render()}}setAngle(t,e){let r=e[1]-t[1],n=e[0]-t[0],i=1,o=Math.atan(r/n);r<=0&&n>=0?(i=2,o=-o):n>=0&&r>=0?(o=-o,i=1):n<=0&&r>=0?(o=Math.PI-o,i=4):n<=0&&r<=0&&(o=Math.PI-o,i=3);var s=Math.atan2(1,0);return{viewAngle:-s-o,markAngle:s+o,Angle:s-Math.atan2(r,n),xx:i}}startAnimation(t=!0,e=!0,r=10){this.lastAngle=0,this.distance=0,this.animating=!0,this.lastTime=Date.now(),this._map.getView().setCenter(this.pathLine.getFirstCoordinate()),this._map.getView().setZoom(15),this.resultlayer.addEventListener("postrender",this.fun)}pauseAnimation(){this.resultlayer.removeEventListener("postrender",this.fun)}resumeAnimation(){this.resultlayer.addEventListener("postrender",this.fun)}stopAnimation(){this.animating=!1,this.position.setCoordinates(this.pathLine.getLastCoordinate()),this.geoMarker.setGeometry(this.position),this._map.getView().setRotation(0),this._map.getView().setCenter(this.pathLine.getLastCoordinate()),this.resultlayer.removeEventListener("postrender",this.fun)}startAnimation2(t){clearInterval(this.timer),t&&(this.option.navigationOption=Object.assign({},this.option.navigationOption,t)),this.distance=0,this.animating=!0,this.lastTime=Date.now(),this.pathNodeInfo.nodeData.length>3?this.moveNodeInfo={currentNode:this.pathNodeInfo.nodeData[0],nextNode:this.pathNodeInfo.nodeData[1],threeNode:this.pathNodeInfo.nodeData[2]}:this.moveNodeInfo={currentNode:this.pathNodeInfo.nodeData[0],nextNode:this.pathNodeInfo.nodeData[1],threeNode:this.pathNodeInfo.nodeData[1]},this.option.navigationOption.tracking&&(this._map.getView().setCenter(this.pathLine.getFirstCoordinate()),this._map.getView().setZoom(this.option.navigationOption.defaultZoom),this._map.getView().setRotation(this.setAngle(rr(this.moveNodeInfo.currentNode.coords),rr(this.moveNodeInfo.nextNode.coords)).viewAngle)),this.oldPathLineFeature.getGeometry().setCoordinates([this.pathLine.getFirstCoordinate()]),this.pathIndex=0,this.FeatureMoveProgressInfo={nodeNum:this.moveNodeInfo.currentNode.coordIndex,progress:this.pathIndex/this.pathNodeInfo.coordinates.length,remainingDistance:this.option.navigationOption.totalDistance-this.option.navigationOption.totalDistance*(this.pathIndex/this.pathNodeInfo.coordinates.length),nextNodeDistance:this.moveNodeInfo.currentNode.distance*this.option.navigationOption.scale,totalDistance:this.option.navigationOption.totalDistance,angle:this.ComputDirection()},this.timer=setInterval((()=>{this.moveFeature3(this.pathIndex),this.pathIndex=this.pathIndex+this.option.navigationOption.speed}),1)}stopAnimation2(){this.animating=!1,this.position.setCoordinates(this.pathLine.getLastCoordinate()),this.geoMarker.setGeometry(this.position),this._map.getView().setRotation(0),this._map.getView().setCenter(this.pathLine.getLastCoordinate()),clearInterval(this.timer)}pauseAnimation2(){clearInterval(this.timer)}resumeAnimation2(){this.timer=setInterval((()=>{this.moveFeature3(this.pathIndex),this.pathIndex=this.pathIndex+this.option.navigationOption.speed}),100)}moveFeature3(t){const e=(new Date).getTime(),r=e-this.lastTime;if(this.distance=(this.distance+this.option.navigationOption.speed*r/1e6)%2,this.lastTime=e,t>=this.pathNodeInfo.coordinates.length)this.stopAnimation2();else{const e=rr(this.pathNodeInfo.coordinates[t]);this.oldPathLineFeature.getGeometry().appendCoordinate(e),this.oldPathLineFeature.getGeometry().changed();let r=De(new mn([e,rr(this.moveNodeInfo.nextNode.coords)]))*this.option.navigationOption.scale;if(this.position.setCoordinates(e),this.geoMarker.getGeometry().setCoordinates(e),this.geoMarkerCircle.getGeometry().setCenter(e),this.FeatureMoveProgressInfo.nodeNum=this.moveNodeInfo.currentNode.coordIndex,this.FeatureMoveProgressInfo.nextNodeDistance=r,this.FeatureMoveProgressInfo.progress=t/this.pathNodeInfo.coordinates.length,this.FeatureMoveProgressInfo.remainingDistance=this.option.navigationOption.totalDistance-this.option.navigationOption.totalDistance*this.FeatureMoveProgressInfo.progress,r<=1*this.option.navigationOption.speed){let t=this.moveNodeInfo.currentNode.coordIndex+1;if(t<this.pathNodeInfo.nodeData.length-1){this.moveNodeInfo.currentNode=this.pathNodeInfo.nodeData[t],this.moveNodeInfo.nextNode=this.pathNodeInfo.nodeData[t+1],t<this.pathNodeInfo.nodeData.length-2?(this.moveNodeInfo.threeNode=this.pathNodeInfo.nodeData[t+2],this.FeatureMoveProgressInfo.angle=this.ComputDirection()):this.FeatureMoveProgressInfo.angle="直行";let e=this.setAngle(rr(this.moveNodeInfo.currentNode.coords),rr(this.moveNodeInfo.nextNode.coords));this.option.navigationOption.tracking?this._map.getView().setRotation(e.viewAngle):this.styles.geoMarker.getImage().setRotation(e.markAngle)}}this.trigger(Jd.onFeatureMoveProgress,this.FeatureMoveProgressInfo),this.option.navigationOption.tracking&&this._map.getView().setCenter(e)}}moveFeature2(){const t=(new Date).getTime(),e=t-this.lastTime;if(this.distance=(this.distance+this.option.navigationOption.speed*e/1e6)%2,this.lastTime=t,this.distance>=1)this.stopAnimation2();else{const t=this.pathLine.getCoordinateAt(this.distance);let r,n=De(new mn([t,rr(this.moveNodeInfo.nextNode.coords)]));if(this.position.setCoordinates(t),this.geoMarker.getGeometry().setCoordinates(t),this.geoMarkerCircle.getGeometry().setCenter(t),n<100){let t=mT.movePointContain(this.geoMarkerCircle,this.pathNodeInfo.nodeData);if(-1!=t.coordIndex&&t.coordIndex!=this.moveNodeInfo.currentNode.coordIndex&&t.coordIndex<=this.moveNodeInfo.currentNode.coordIndex+2){this.moveNodeInfo={currentNode:this.pathNodeInfo.nodeData[t.coordIndex],nextNode:this.pathNodeInfo.nodeData[t.coordIndex+1],threeNode:this.pathNodeInfo.nodeData[t.coordIndex+2]};let n=this._map.getPixelFromCoordinate(rr(this.moveNodeInfo.currentNode.coords)),i=this._map.getPixelFromCoordinate(rr(this.moveNodeInfo.nextNode.coords)),o=this._map.getPixelFromCoordinate(rr(this.moveNodeInfo.threeNode.coords)),s=(i[0]-n[0])*(o[1]-i[1])-(i[1]-n[1])*(o[0]-i[0]),a=this.setAngle(rr(this.moveNodeInfo.nextNode.coords),rr(this.moveNodeInfo.threeNode.coords));this.trigger(Jd.onFeatureMoveProgress,{nodeNum:this.moveNodeInfo.currentNode.coordIndex,progress:this.distance,distance:this.option.navigationOption.totalDistance-this.option.navigationOption.totalDistance*this.distance,elapsedTime:e,nextNodeDistance:this.moveNodeInfo.currentNode.distance,nextNodeDirection:a.markAngle,angle:s>0?"右":"左",xx:a.xx}),r=this.setAngle(rr(this.moveNodeInfo.currentNode.coords),rr(this.moveNodeInfo.nextNode.coords)),this.option.navigationOption.tracking?this._map.getView().setRotation(r.viewAngle):this.styles.geoMarker.getImage().setRotation(r.markAngle)}}this.option.navigationOption.tracking?this._map.getView().setCenter(t):this.styles.geoMarker.getImage().setRotation(r.markAngle)}}ComputDirection(){let t=this._map.getPixelFromCoordinate(rr(this.moveNodeInfo.currentNode.coords)),e=this._map.getPixelFromCoordinate(rr(this.moveNodeInfo.nextNode.coords)),r=this._map.getPixelFromCoordinate(rr(this.moveNodeInfo.threeNode.coords)),n=(e[0]-t[0])*(r[1]-e[1])-(e[1]-t[1])*(r[0]-e[0]);return 0==n?"直行":n>0?"右":"左"}setUserMarker(t,e){this.position.setCoordinates(t),this.geoMarker.getGeometry().setCoordinates(t),this.styles.geoMarker.getImage().setRotation(e)}setUserCoordinate(t){let e;e=t instanceof z?t:new z({geometry:new Vr(t)});let r=new z({geometry:new Vr(this.pathLine.getFirstCoordinate())}),n=mT.nearestPointOnLine(e,this.pathLineFeature);this.geoMarker.setGeometry(n.getGeometry()),new z({geometry:new Vr(this.pathLine.getLastCoordinate())});let i=mT.lineSlice(r,n,this.pathLineFeature);this.pathIndex=n.get("index"),this.moveNodeInfo={currentNode:this.pathNodeInfo.nodeData[this.pathIndex],nextNode:this.pathNodeInfo.nodeData[this.pathIndex+1]};let o=De(i.getGeometry())*this.option.navigationOption.scale;this.FeatureMoveProgressInfo={nodeNum:this.moveNodeInfo.currentNode.coordIndex,progress:o/this.option.navigationOption.totalDistance,remainingDistance:this.option.navigationOption.totalDistance-o,nextNodeDistance:De(new mn([n.getGeometry().getCoordinates(),rr(this.moveNodeInfo.nextNode.coords)]))*this.option.navigationOption.scale,totalDistance:this.option.navigationOption.totalDistance,angle:""},this.pathIndex<this.pathNodeInfo.nodeData.length-2?(this.moveNodeInfo.threeNode=this.pathNodeInfo.nodeData[this.pathIndex+2],this.FeatureMoveProgressInfo.angle=this.ComputDirection()):(this.moveNodeInfo.threeNode=this.pathNodeInfo.nodeData[this.pathIndex+1],this.FeatureMoveProgressInfo.angle="直行"),this.trigger(Jd.onFeatureMoveProgress,this.FeatureMoveProgressInfo),this.oldPathLineFeature.setGeometry(i.getGeometry()),this.oldPathLineFeature.getGeometry().changed();let s=this.setAngle(rr(this.moveNodeInfo.currentNode.coords),rr(this.moveNodeInfo.nextNode.coords));this.option.navigationOption.tracking?this._map.getView().setRotation(s.viewAngle):this.styles.geoMarker.getImage().setRotation(s.markAngle),this.option.navigationOption.tracking&&this._map.getView().setCenter(n.getGeometry().getCoordinates())}getPathLine(){return this.pathLine}computerPath(t,e){clearInterval(this.timer),this.resultSource.clear(),this.dijkstra.path(t,e)}computerPath2(t,e){let r=this.getFile("../public/tempData/铁路_简版.json","text/json"),n=this.formatJsonTo4326Json(JSON.parse(r));var i=new Jtt(n,{weightFn:function(t,e,r){var n=t[0]-e[0],i=t[1]-e[1];return Math.sqrt(n*n+i*i)}});let o=mT.featureTo4326(t),s=mT.featureTo4326(e);i.findPath(o,s)}addGeoJsonUrl(t,e){let r=this.getFile(e,"text/json"),n=this.formatJsonTo3857(JSON.parse(r));this.addFeatures(t,n)}addGeoJson(t,e){this.addFeatures(t,this.formatJsonTo3857(e))}convertGeoJsontoFeatures(t){return this.formatJsonTo3857(t)}addFeatures(t,e){var r;null==(r=this._map)||r.getView().getZoom(),e.forEach((e=>{e.set("classname",t),e.get("featuretype")||e.set("featuretype",rg.vector),xg.getFeaturesDefaultStyle(e,25,this.autoPointSize);let r=xg.getStyle(e.getGeometry().getType(),e.get("style"));e.setStyle(r)})),this._source.addFeatures(e)}addFeature(t,e){e.set("classname",t),this._source.addFeature(e)}getFeaturesByClassName(t){let e=[];return this._source.getFeatures().forEach((r=>{r.get("classname")==t&&e.push(r)})),e}getFeatures(t){let e=[];return this._source.getFeatures().forEach((r=>{r.get("name")==t&&e.push(r)})),e}getFeature(t){let e=null;return this._source.getFeatures().forEach((r=>{r.get("name")!=t||(e=r)})),e}removeFeatures(t){this._source.getFeatures().forEach((e=>{e.get("classname")==t&&this._source.removeFeature(e)}))}pathToGeoJSON(){return(new iA).writeFeaturesObject(this.routeFeatures,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"})}},ArcGisFeatureServiceLayer:class extends BT{constructor(t,e){super(t,e),this.layertype="ArcGisFeatureServiceLayer";const r=this.option.url,n=new w6;let i=this;var o;this._source=new ws({loader:function(t,e,o,s,a){const l=r+"/query/?f=json&returnGeometry=true&spatialRel=esriSpatialRelIntersects&geometry="+encodeURIComponent('{"xmin":'+t[0]+',"ymin":'+t[1]+',"xmax":'+t[2]+',"ymax":'+t[3]+',"spatialReference":{"wkid":102100}}')+"&geometryType=esriGeometryEnvelope&inSR=102100&outFields=*&outSR=102100";fetch(l,{method:"GET"}).then((function(t){return t.json()})).then((t=>{const e=n.readFeatures(t,{featureProjection:o});e.length>0&&(i.addFeatures("",e),s(e))}))},strategy:(o=kc({tileSize:512}),function(t,e,r){var n=o.getZForResolution(function(t,e){return t}(e)),i=o.getTileRangeForExtentAndZ(Ar(t),n),s=[],a=[n,0,0];for(a[1]=i.minX;a[1]<=i.maxX;++a[1])for(a[2]=i.minY;a[2]<=i.maxY;++a[2])s.push(cr(o.getTileCoordExtent(a)));return s})}),this._source.on("featuresloadend",(t=>{this.trigger(Jd.onLoadEnd,t)})),this.layer=new ls({source:this._source}),this.layer.set("layerid",t),this.layer.set("hashMove",this.option.hashMove)}},TileXyzLayer:BO,ArcGisMapServerLayer:iO,ArcGisTileXyzLayer:nO,WmsLayer:class extends rO{constructor(t,e){super(t,e),this.layertype="ImageWMSLayer",this.layerSource=new jk(e),this.layer=new Sh({source:this.layerSource}),this.layer.set("layerid",t),this.mImageExtent&&this.layer.setExtent(this.mImageExtent),this.layerSource.on("tileloadstart",(function(){})),this.layerSource.on("tileloadend",(function(){})),this.layerSource.on("tileloaderror",(function(){}))}},WmtsLayer:class extends rO{constructor(t,e){super(t,e),this.layertype="ImageWMSLayer",this.option=Object.assign({},{opacity:.7,attributions:"",layer:"",matrixSet:"GoogleMapsCompatible",format:"image/png"},e);const r=Ye("EPSG:3857"),n=r.getExtent(),i=Kt(n)/256,o=new Array(19),s=new Array(19);for(let a=0;a<19;++a)o[a]=i/Math.pow(2,a),s[a]=a;this.layerSource=new qk({attributions:this.option.attributions,url:this.option.url,layer:this.option.layer,matrixSet:this.option.matrixSet,format:this.option.format,projection:r,tileGrid:new zk({origin:zt(n),resolutions:o,matrixIds:s}),style:"default",wrapX:!0}),this.layer=new AA({zIndex:this.option.zIndex,opacity:this.option.opacity,source:this.layerSource}),this.layer.set("layerid",t),this.mImageExtent&&this.layer.setExtent(this.mImageExtent),this.layerSource.on("tileloadstart",(function(){})),this.layerSource.on("tileloadend",(function(){})),this.layerSource.on("tileloaderror",(function(){}))}},TifLayer:class extends rO{constructor(t,e){super(t,e),this.layertype="GeoTIFFLayer",this.layerSource=new Ek({sources:[{url:this.option.url}]}),this.layer=new lf({source:this.layerSource}),this.layer.set("layerid",t),this.mImageExtent&&this.layer.setExtent(this.mImageExtent),this.layerSource.on("tileloadstart",(function(){})),this.layerSource.on("tileloadend",(function(){})),this.layerSource.on("tileloaderror",(function(){}))}padLeft(t,e,r){let n=t.toString(r||10);return(new Array(e).join("0")+n).slice(-e)}},imageLayer:PO,GeoImageLayer:class extends rO{constructor(t,r){super(t,r),e(this,"GraphicLayer"),e(this,"graphic"),e(this,"mSelectTransform");let n={imageCenter:[0,0],imageScale:[1,1],imageRotate:0,imageMask:null,ImageExtentWKID:og.EPSG3857,opacity:1,hashEdit:!1};this.option=Object.assign({},n,this.option),this.option.ImageExtentWKID==og.EPSG4326&&(this.option.imageCenter=rr(this.option.imageCenter)),this.layertype="GeoImageLayer",this.layerSource=new eet({url:this.option.url,imageMask:this.option.imageMask,imageCenter:this.option.imageCenter,imageScale:this.option.imageScale,imageRotate:Number(this.option.imageRotate*Math.PI/180)}),this.layer=new tet({source:this.layerSource,opacity:this.option.opacity}),this.layer.set("layerid",t),this.layerSource.on("imageloadend",(function(){})),this.layerSource.on("change",(()=>{this.layerSource.calculateExtent(!0)&&(this.graphic||(this.graphic=new Ttt({style:{stroke:{color:"rgba(255, 0, 0,0)",width:0},fill:{color:"rgba(255, 0, 0,0)"}},attribute:{name:t+"_graphic",movestate:!1,editallows:!1}}),this.graphic.setGeometryFromExtent(this.layerSource.getExtent()),this.GraphicLayer.addFeature("temp1",this.graphic),this.graphic.set("Scale",this.option.imageScale),this.graphic.on("onRotating",(t=>{this.option.imageRotate=t.data,this.layerSource.setRotation(t.data)})),this.graphic.on("onScaling",(t=>{this.option.imageScale=[t.data,t.data],this.layerSource.setScale(t.data)})),this.graphic.on("onMoveing",(t=>{this.option.imageCenter=t.data,this.layerSource.setCenter(t.data)}))))}))}getAttribute(){return this.option}startEdit(){this.option.hashEdit=!0,this.mSelectTransform.setActive(!0)}endEdit(){this.option.hashEdit=!1,this.mSelectTransform.setActive(!1)}appendTo(t,e,r){t.addLayer(this.layer),this.isAdded=!0,this.mSelectTransform=r,this.GraphicLayer=e}},PbfLayer:class extends eg{constructor(t,r){super(t,r),e(this,"_source"),this.layertype="PbfLayer",this.layerid=t,this._source=new Xc({format:new hc,url:r.url,tileLoadFunction:function(t,e){t.setLoader((function(r,n,i){fetch(e).then((function(e){e.arrayBuffer().then((function(e){const n=t.getFormat().readFeatures(e,{extent:r,featureProjection:i});let o=[];n.forEach((t=>{let e=rc(t);e.set("movestate",!0),e.set("editstate",!0),o.push(rc(t))})),t.setFeatures(o)}))}))}))}});const n=new Ai({fill:new fn({color:"#eeeeee"}),stroke:new vn({color:"#eeeeee",width:1})});this.layer=new Pc({zIndex:r.zIndex,source:this._source,style:function(t){return r.featureStyle&&r.featureStyle.forEach((e=>{if(t.get(e.propertiesName)==e.propertiesValue)return n.getFill().setColor(e.fillColor),n.getStroke().setColor(e.strokeColor),void n.getStroke().setWidth(e.strokeWidth)})),n}}),this.layer.set("layerid",t)}},XWebGLPointsLayer:class extends eg{constructor(t,e){super(t,e),this.layertype="XWebGLPointsLayer",this._source=new ws({wrapX:!1}),this.Layer=new nf({source:this._source,style:{symbol:{symbolType:"circle",size:["interpolate",["exponential",2.5],["zoom"],2,1,12,8,16,12],color:"#ffed02",offset:[0,0],opacity:.95}},disableHitDetection:!1,colorCallback:function(t,e,r){},attributes:[{name:"color",callback:function(t){}},{name:"size",callback:function(t){}},{name:"GraphicColor",callback:function(t){}}]}),this.Layer.on(Jd.onClick,(t=>{t.feature&&this.trigger(Jd.onClick,t.feature.getProperties())}))}appendTo(t){var e;this._map=t,null==(e=this._map)||e.addLayer(this.Layer)}addGeoJson(t,e){let r=this.formatJsonTo3857(e);this.addFeatures(t,r)}addFeatures(t,e){var r;let n=null==(r=this._map)?void 0:r.getView().getZoom();e.forEach((e=>{e.set("classname",t),e.get("featuretype")||e.set("featuretype",rg.vector);let r=xg.getFeaturesDefaultStyle(e,n,!1);e.setStyle(r)})),this._source.addFeatures(e)}}},Symbol.toStringTag,{value:"Module"})),net=Object.freeze(Object.defineProperty({__proto__:null,getJSON:function(t){const e=new XMLHttpRequest;return e.open("get",t,!1),e.setRequestHeader("content-type","application/json"),e.send(),JSON.parse(e.response)}},Symbol.toStringTag,{value:"Module"}));class iet{constructor(t){e(this,"option"),this.option={key:"50da1a3686015849769f4a414bfdfb8f"},this.option=Object.assign({},this.option,t)}}const oet=Object.freeze(Object.defineProperty({__proto__:null,GaodeRoute:class extends iet{constructor(t){super(t)}query(t){let e=new o6,r=[{type:"驾车",url:t.serverUrl+"/v3/direction/driving"},{type:"步行",url:t.serverUrl+"/v3/direction/walking"},{type:"公交",url:t.serverUrl+"/v3/direction/transit/integrated"}];t.params.key=this.option.key,ST(r[t.queryType].url+xT(t.params)).then((function(r){r.route.paths.forEach((t=>{t.points=[],t.steps.forEach((r=>{r.polyline.split(";").forEach((r=>{let n=r.split(","),i=e.gcj02ToWgs84(parseFloat(n[1]),parseFloat(n[0]));t.points.push([i.lontitude,i.latitude])}))}))})),t.success(r)})).catch((function(e){t.error&&t.error(e)}))}},GaodePOI:class extends iet{constructor(t){super(t)}query(t){let e=new o6,r={serverUrl:"",queryType:1,keywords:"",location:"",radius:"3000",city:"西安市",city_limit:!0,polygon:"",extensions:"base",offset:20,page:1,success:null,error:null};r=Object.assign({},r,t);let n=[{type:"周边搜索",url:r.serverUrl+"/v3/place/around",parameters:{key:this.option.key,keywords:r.keywords,location:r.location,radius:r.radius,offset:r.offset,page:r.page}},{type:"关键字搜索",url:r.serverUrl+"/v3/place/text",parameters:{key:this.option.key,keywords:r.keywords,city:t.city,city_limit:t.city_limit,offset:r.offset,page:r.page}},{type:"多边形区域搜索",url:r.serverUrl+"/v3/place/polygon",parameters:{key:this.option.key,keywords:t.keywords,polygon:t.polygon,offset:r.offset,page:r.page}}];r.keywords=r.keywords.replace("","|"),ST(n[r.queryType].url+xT(n[r.queryType].parameters)).then((function(r){r.pois.forEach((t=>{let r=t.location.split(","),n=e.gcj02ToWgs84(parseFloat(r[1]),parseFloat(r[0]));t.lnglat=[n.lontitude,n.latitude]})),t.success(r)})).catch((function(e){t.error&&t.error(e)}))}queryUrl(){}}},Symbol.toStringTag,{value:"Module"}));function set(t,e){let r=t.length-e,n=0;do{for(let r=e;r>0;r--)t[n+e]+=t[n],n++;r-=e}while(r>0)}function aet(t,e,r){let n=0,i=t.length;const o=i/r;for(;i>e;){for(let r=e;r>0;--r)t[n+e]+=t[n],++n;i-=e}const s=t.slice();for(let a=0;a<o;++a)for(let e=0;e<r;++e)t[r*a+e]=s[(r-e-1)*o+a]}class uet{async decode(t,e){const r=await this.decodeBlock(e),n=t.Predictor||1;if(1!==n){const e=!t.StripOffsets;return function(t,e,r,n,i,o){if(!e||1===e)return t;for(let l=0;l<i.length;++l){if(i[l]%8!=0)throw new Error("When decoding with predictor, only multiple of 8 bits are supported.");if(i[l]!==i[0])throw new Error("When decoding with predictor, all samples must have the same size.")}const s=i[0]/8,a=2===o?1:i.length;for(let l=0;l<n&&!(l*a*r*s>=t.byteLength);++l){let n;if(2===e){switch(i[0]){case 8:n=new Uint8Array(t,l*a*r*s,a*r*s);break;case 16:n=new Uint16Array(t,l*a*r*s,a*r*s/2);break;case 32:n=new Uint32Array(t,l*a*r*s,a*r*s/4);break;default:throw new Error(`Predictor 2 not allowed with ${i[0]} bits per sample.`)}set(n,a)}else 3===e&&(n=new Uint8Array(t,l*a*r*s,a*r*s),aet(n,a,s))}return t}(r,n,e?t.TileWidth:t.ImageWidth,e?t.TileLength:t.RowsPerStrip||t.ImageLength,t.BitsPerSample,t.PlanarConfiguration)}return r}}const het=Object.freeze(Object.defineProperty({__proto__:null,default:class extends uet{decodeBlock(t){return t}}},Symbol.toStringTag,{value:"Module"}));function cet(t,e){for(let r=e.length-1;r>=0;r--)t.push(e[r]);return t}const Aet=Object.freeze(Object.defineProperty({__proto__:null,default:class extends uet{decodeBlock(t){return function(t){const e=new Uint16Array(4093),r=new Uint8Array(4093);for(let p=0;p<=257;p++)e[p]=4096,r[p]=p;let n=258,i=9,o=0;function s(){n=258,i=9}function a(t){const e=function(t,e,r){const n=e%8,i=Math.floor(e/8),o=8-n,s=e+r-8*(i+1);let a=8*(i+2)-(e+r);const l=8*(i+2)-e;if(a=Math.max(0,a),i>=t.length)return 257;let u=t[i]&2**(8-n)-1;u<<=r-o;let h=u;if(i+1<t.length){let e=t[i+1]>>>a;e<<=Math.max(0,r-l),h+=e}if(s>8&&i+2<t.length){const n=8*(i+3)-(e+r);h+=t[i+2]>>>n}return h}(t,o,i);return o+=i,e}function l(t,i){return r[n]=i,e[n]=t,n++,n-1}function u(t){const n=[];for(let i=t;4096!==i;i=e[i])n.push(r[i]);return n}const h=[];s();const c=new Uint8Array(t);let A,f=a(c);for(;257!==f;){if(256===f){for(s(),f=a(c);256===f;)f=a(c);if(257===f)break;if(f>256)throw new Error(`corrupted code at scanline ${f}`);cet(h,u(f)),A=f}else if(f<n){const t=u(f);cet(h,t),l(A,t[t.length-1]),A=f}else{const t=u(A);if(!t)throw new Error(`Bogus entry. Not in dictionary, ${A} / ${n}, position: ${o}`);cet(h,t),h.push(t[t.length-1]),l(A,t[t.length-1]),A=f}n+1>=2**i&&(12===i?A=void 0:i++),f=a(c)}return new Uint8Array(h)}(t).buffer}}},Symbol.toStringTag,{value:"Module"})),fet=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]);function pet(t,e){let r=0;const n=[];let i=16;for(;i>0&&!t[i-1];)--i;n.push({children:[],index:0});let o,s=n[0];for(let a=0;a<i;a++){for(let i=0;i<t[a];i++){for(s=n.pop(),s.children[s.index]=e[r];s.index>0;)s=n.pop();for(s.index++,n.push(s);n.length<=a;)n.push(o={children:[],index:0}),s.children[s.index]=o.children,s=o;r++}a+1<i&&(n.push(o={children:[],index:0}),s.children[s.index]=o.children,s=o)}return n[0].children}function det(t,e,r,n,i,o,s,a,l){const{mcusPerLine:u,progressive:h}=r,c=e;let A=e,f=0,p=0;function d(){if(p>0)return p--,f>>p&1;if(f=t[A++],255===f){const e=t[A++];if(e)throw new Error(`unexpected marker: ${(f<<8|e).toString(16)}`)}return p=7,f>>>7}function g(t){let e,r=t;for(;null!==(e=d());){if(r=r[e],"number"==typeof r)return r;if("object"!=typeof r)throw new Error("invalid huffman sequence")}return null}function y(t){let e=t,r=0;for(;e>0;){const t=d();if(null===t)return;r=r<<1|t,--e}return r}function m(t){const e=y(t);return e>=1<<t-1?e:e+(-1<<t)+1}let v,_=0,w=0;function b(t,e,r,n,i){const o=r%u,s=(r/u|0)*t.v+n,a=o*t.h+i;e(t,t.blocks[s][a])}function x(t,e,r){const n=r/t.blocksPerLine|0,i=r%t.blocksPerLine;e(t,t.blocks[n][i])}const C=n.length;let S,E,B,I,P,F;F=h?0===o?0===a?function(t,e){const r=g(t.huffmanTableDC),n=0===r?0:m(r)<<l;t.pred+=n,e[0]=t.pred}:function(t,e){e[0]|=d()<<l}:0===a?function(t,e){if(_>0)return void _--;let r=o;const n=s;for(;r<=n;){const n=g(t.huffmanTableAC),i=15&n,o=n>>4;if(0===i){if(o<15){_=y(o)+(1<<o)-1;break}r+=16}else r+=o,e[fet[r]]=m(i)*(1<<l),r++}}:function(t,e){let r=o;const n=s;let i=0;for(;r<=n;){const n=fet[r],o=e[n]<0?-1:1;switch(w){case 0:{const e=g(t.huffmanTableAC),r=15&e;if(i=e>>4,0===r)i<15?(_=y(i)+(1<<i),w=4):(i=16,w=1);else{if(1!==r)throw new Error("invalid ACn encoding");v=m(r),w=i?2:3}continue}case 1:case 2:e[n]?e[n]+=(d()<<l)*o:(i--,0===i&&(w=2===w?3:0));break;case 3:e[n]?e[n]+=(d()<<l)*o:(e[n]=v<<l,w=0);break;case 4:e[n]&&(e[n]+=(d()<<l)*o)}r++}4===w&&(_--,0===_&&(w=0))}:function(t,e){const r=g(t.huffmanTableDC),n=0===r?0:m(r);t.pred+=n,e[0]=t.pred;let i=1;for(;i<64;){const r=g(t.huffmanTableAC),n=15&r,o=r>>4;if(0===n){if(o<15)break;i+=16}else i+=o,e[fet[i]]=m(n),i++}};let T,M,L=0;M=1===C?n[0].blocksPerLine*n[0].blocksPerColumn:u*r.mcusPerColumn;const k=i||M;for(;L<M;){for(E=0;E<C;E++)n[E].pred=0;if(_=0,1===C)for(S=n[0],P=0;P<k;P++)x(S,F,L),L++;else for(P=0;P<k;P++){for(E=0;E<C;E++){S=n[E];const{h:t,v:e}=S;for(B=0;B<e;B++)for(I=0;I<t;I++)b(S,F,L,B,I)}if(L++,L===M)break}if(p=0,T=t[A]<<8|t[A+1],T<65280)throw new Error("marker was not found");if(!(T>=65488&&T<=65495))break;A+=2}return A-c}function get(t,e){const r=[],{blocksPerLine:n,blocksPerColumn:i}=e,o=n<<3,s=new Int32Array(64),a=new Uint8Array(64);function l(t,r,n){const i=e.quantizationTable;let o,s,a,l,u,h,c,A,f;const p=n;let d;for(d=0;d<64;d++)p[d]=t[d]*i[d];for(d=0;d<8;++d){const t=8*d;0!==p[1+t]||0!==p[2+t]||0!==p[3+t]||0!==p[4+t]||0!==p[5+t]||0!==p[6+t]||0!==p[7+t]?(o=5793*p[0+t]+128>>8,s=5793*p[4+t]+128>>8,a=p[2+t],l=p[6+t],u=2896*(p[1+t]-p[7+t])+128>>8,A=2896*(p[1+t]+p[7+t])+128>>8,h=p[3+t]<<4,c=p[5+t]<<4,f=o-s+1>>1,o=o+s+1>>1,s=f,f=3784*a+1567*l+128>>8,a=1567*a-3784*l+128>>8,l=f,f=u-c+1>>1,u=u+c+1>>1,c=f,f=A+h+1>>1,h=A-h+1>>1,A=f,f=o-l+1>>1,o=o+l+1>>1,l=f,f=s-a+1>>1,s=s+a+1>>1,a=f,f=2276*u+3406*A+2048>>12,u=3406*u-2276*A+2048>>12,A=f,f=799*h+4017*c+2048>>12,h=4017*h-799*c+2048>>12,c=f,p[0+t]=o+A,p[7+t]=o-A,p[1+t]=s+c,p[6+t]=s-c,p[2+t]=a+h,p[5+t]=a-h,p[3+t]=l+u,p[4+t]=l-u):(f=5793*p[0+t]+512>>10,p[0+t]=f,p[1+t]=f,p[2+t]=f,p[3+t]=f,p[4+t]=f,p[5+t]=f,p[6+t]=f,p[7+t]=f)}for(d=0;d<8;++d){const t=d;0!==p[8+t]||0!==p[16+t]||0!==p[24+t]||0!==p[32+t]||0!==p[40+t]||0!==p[48+t]||0!==p[56+t]?(o=5793*p[0+t]+2048>>12,s=5793*p[32+t]+2048>>12,a=p[16+t],l=p[48+t],u=2896*(p[8+t]-p[56+t])+2048>>12,A=2896*(p[8+t]+p[56+t])+2048>>12,h=p[24+t],c=p[40+t],f=o-s+1>>1,o=o+s+1>>1,s=f,f=3784*a+1567*l+2048>>12,a=1567*a-3784*l+2048>>12,l=f,f=u-c+1>>1,u=u+c+1>>1,c=f,f=A+h+1>>1,h=A-h+1>>1,A=f,f=o-l+1>>1,o=o+l+1>>1,l=f,f=s-a+1>>1,s=s+a+1>>1,a=f,f=2276*u+3406*A+2048>>12,u=3406*u-2276*A+2048>>12,A=f,f=799*h+4017*c+2048>>12,h=4017*h-799*c+2048>>12,c=f,p[0+t]=o+A,p[56+t]=o-A,p[8+t]=s+c,p[48+t]=s-c,p[16+t]=a+h,p[40+t]=a-h,p[24+t]=l+u,p[32+t]=l-u):(f=5793*n[d+0]+8192>>14,p[0+t]=f,p[8+t]=f,p[16+t]=f,p[24+t]=f,p[32+t]=f,p[40+t]=f,p[48+t]=f,p[56+t]=f)}for(d=0;d<64;++d){const t=128+(p[d]+8>>4);r[d]=t<0?0:t>255?255:t}}for(let u=0;u<i;u++){const t=u<<3;for(let e=0;e<8;e++)r.push(new Uint8Array(o));for(let i=0;i<n;i++){l(e.blocks[u][i],a,s);let n=0;const o=i<<3;for(let e=0;e<8;e++){const i=r[t+e];for(let t=0;t<8;t++)i[o+t]=a[n++]}}}return r}class yet{constructor(){this.jfif=null,this.adobe=null,this.quantizationTables=[],this.huffmanTablesAC=[],this.huffmanTablesDC=[],this.resetFrames()}resetFrames(){this.frames=[]}parse(t){let e=0;function r(){const r=t[e]<<8|t[e+1];return e+=2,r}function n(){const n=r(),i=t.subarray(e,e+n-2);return e+=i.length,i}function i(t){let e,r,n=0,i=0;for(r in t.components)t.components.hasOwnProperty(r)&&(e=t.components[r],n<e.h&&(n=e.h),i<e.v&&(i=e.v));const o=Math.ceil(t.samplesPerLine/8/n),s=Math.ceil(t.scanLines/8/i);for(r in t.components)if(t.components.hasOwnProperty(r)){e=t.components[r];const a=Math.ceil(Math.ceil(t.samplesPerLine/8)*e.h/n),l=Math.ceil(Math.ceil(t.scanLines/8)*e.v/i),u=o*e.h,h=s*e.v,c=[];for(let t=0;t<h;t++){const t=[];for(let e=0;e<u;e++)t.push(new Int32Array(64));c.push(t)}e.blocksPerLine=a,e.blocksPerColumn=l,e.blocks=c}t.maxH=n,t.maxV=i,t.mcusPerLine=o,t.mcusPerColumn=s}let o=r();if(65496!==o)throw new Error("SOI not found");for(o=r();65497!==o;){switch(o){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:{const t=n();65504===o&&74===t[0]&&70===t[1]&&73===t[2]&&70===t[3]&&0===t[4]&&(this.jfif={version:{major:t[5],minor:t[6]},densityUnits:t[7],xDensity:t[8]<<8|t[9],yDensity:t[10]<<8|t[11],thumbWidth:t[12],thumbHeight:t[13],thumbData:t.subarray(14,14+3*t[12]*t[13])}),65518===o&&65===t[0]&&100===t[1]&&111===t[2]&&98===t[3]&&101===t[4]&&0===t[5]&&(this.adobe={version:t[6],flags0:t[7]<<8|t[8],flags1:t[9]<<8|t[10],transformCode:t[11]});break}case 65499:{const n=r()+e-2;for(;e<n;){const n=t[e++],i=new Int32Array(64);if(n>>4==0)for(let r=0;r<64;r++)i[fet[r]]=t[e++];else{if(n>>4!=1)throw new Error("DQT: invalid table spec");for(let t=0;t<64;t++)i[fet[t]]=r()}this.quantizationTables[15&n]=i}break}case 65472:case 65473:case 65474:{r();const n={extended:65473===o,progressive:65474===o,precision:t[e++],scanLines:r(),samplesPerLine:r(),components:{},componentsOrder:[]},s=t[e++];let a;for(let r=0;r<s;r++){a=t[e];const r=t[e+1]>>4,i=15&t[e+1],o=t[e+2];n.componentsOrder.push(a),n.components[a]={h:r,v:i,quantizationIdx:o},e+=3}i(n),this.frames.push(n);break}case 65476:{const n=r();for(let r=2;r<n;){const n=t[e++],i=new Uint8Array(16);let o=0;for(let r=0;r<16;r++,e++)i[r]=t[e],o+=i[r];const s=new Uint8Array(o);for(let r=0;r<o;r++,e++)s[r]=t[e];r+=17+o,n>>4==0?this.huffmanTablesDC[15&n]=pet(i,s):this.huffmanTablesAC[15&n]=pet(i,s)}break}case 65501:r(),this.resetInterval=r();break;case 65498:{r();const n=t[e++],i=[],o=this.frames[0];for(let r=0;r<n;r++){const r=o.components[t[e++]],n=t[e++];r.huffmanTableDC=this.huffmanTablesDC[n>>4],r.huffmanTableAC=this.huffmanTablesAC[15&n],i.push(r)}const s=t[e++],a=t[e++],l=t[e++],u=det(t,e,o,i,this.resetInterval,s,a,l>>4,15&l);e+=u;break}case 65535:255!==t[e]&&e--;break;default:if(255===t[e-3]&&t[e-2]>=192&&t[e-2]<=254){e-=3;break}throw new Error(`unknown JPEG marker ${o.toString(16)}`)}o=r()}}getResult(){const{frames:t}=this;if(0===this.frames.length)throw new Error("no frames were decoded");this.frames.length;for(let u=0;u<this.frames.length;u++){const t=this.frames[u].components;for(const e of Object.keys(t))t[e].quantizationTable=this.quantizationTables[t[e].quantizationIdx],delete t[e].quantizationIdx}const e=t[0],{components:r,componentsOrder:n}=e,i=[],o=e.samplesPerLine,s=e.scanLines;for(let u=0;u<n.length;u++){const t=r[n[u]];i.push({lines:get(0,t),scaleX:t.h/e.maxH,scaleY:t.v/e.maxV})}const a=new Uint8Array(o*s*i.length);let l=0;for(let u=0;u<s;++u)for(let t=0;t<o;++t)for(let e=0;e<i.length;++e){const r=i[e];a[l]=r.lines[0|u*r.scaleY][0|t*r.scaleX],++l}return a}}const met=Object.freeze(Object.defineProperty({__proto__:null,default:class extends uet{constructor(t){super(),this.reader=new yet,t.JPEGTables&&this.reader.parse(t.JPEGTables)}decodeBlock(t){return this.reader.resetFrames(),this.reader.parse(new Uint8Array(t)),this.reader.getResult().buffer}}},Symbol.toStringTag,{value:"Module"}));
322
322
  /*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */function vet(t){let e=t.length;for(;--e>=0;)t[e]=0}const _et=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),wet=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),bet=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),xet=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Cet=new Array(576);vet(Cet);const Eet=new Array(60);vet(Eet);const Bet=new Array(512);vet(Bet);const Iet=new Array(256);vet(Iet);const Pet=new Array(29);vet(Pet);const Fet=new Array(30);function Tet(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}let Met,Let,ket;function Oet(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}vet(Fet);const Net=t=>t<256?Bet[t]:Bet[256+(t>>>7)],Ret=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},Uet=(t,e,r)=>{t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,Ret(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)},Det=(t,e,r)=>{Uet(t,r[2*e],r[2*e+1])},Qet=(t,e)=>{let r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1},Get=(t,e,r)=>{const n=new Array(16);let i,o,s=0;for(i=1;i<=15;i++)s=s+r[i-1]<<1,n[i]=s;for(o=0;o<=e;o++){let e=t[2*o+1];0!==e&&(t[2*o]=Qet(n[e]++,e))}},jet=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},Het=t=>{t.bi_valid>8?Ret(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},zet=(t,e,r,n)=>{const i=2*e,o=2*r;return t[i]<t[o]||t[i]===t[o]&&n[e]<=n[r]},Vet=(t,e,r)=>{const n=t.heap[r];let i=r<<1;for(;i<=t.heap_len&&(i<t.heap_len&&zet(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!zet(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n},Ket=(t,e,r)=>{let n,i,o,s,a=0;if(0!==t.sym_next)do{n=255&t.pending_buf[t.sym_buf+a++],n+=(255&t.pending_buf[t.sym_buf+a++])<<8,i=t.pending_buf[t.sym_buf+a++],0===n?Det(t,i,e):(o=Iet[i],Det(t,o+256+1,e),s=_et[o],0!==s&&(i-=Pet[o],Uet(t,i,s)),n--,o=Net(n),Det(t,o,r),s=wet[o],0!==s&&(n-=Fet[o],Uet(t,n,s)))}while(a<t.sym_next);Det(t,256,e)},qet=(t,e)=>{const r=e.dyn_tree,n=e.stat_desc.static_tree,i=e.stat_desc.has_stree,o=e.stat_desc.elems;let s,a,l,u=-1;for(t.heap_len=0,t.heap_max=573,s=0;s<o;s++)0!==r[2*s]?(t.heap[++t.heap_len]=u=s,t.depth[s]=0):r[2*s+1]=0;for(;t.heap_len<2;)l=t.heap[++t.heap_len]=u<2?++u:0,r[2*l]=1,t.depth[l]=0,t.opt_len--,i&&(t.static_len-=n[2*l+1]);for(e.max_code=u,s=t.heap_len>>1;s>=1;s--)Vet(t,r,s);l=o;do{s=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Vet(t,r,1),a=t.heap[1],t.heap[--t.heap_max]=s,t.heap[--t.heap_max]=a,r[2*l]=r[2*s]+r[2*a],t.depth[l]=(t.depth[s]>=t.depth[a]?t.depth[s]:t.depth[a])+1,r[2*s+1]=r[2*a+1]=l,t.heap[1]=l++,Vet(t,r,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const r=e.dyn_tree,n=e.max_code,i=e.stat_desc.static_tree,o=e.stat_desc.has_stree,s=e.stat_desc.extra_bits,a=e.stat_desc.extra_base,l=e.stat_desc.max_length;let u,h,c,A,f,p,d=0;for(A=0;A<=15;A++)t.bl_count[A]=0;for(r[2*t.heap[t.heap_max]+1]=0,u=t.heap_max+1;u<573;u++)h=t.heap[u],A=r[2*r[2*h+1]+1]+1,A>l&&(A=l,d++),r[2*h+1]=A,h>n||(t.bl_count[A]++,f=0,h>=a&&(f=s[h-a]),p=r[2*h],t.opt_len+=p*(A+f),o&&(t.static_len+=p*(i[2*h+1]+f)));if(0!==d){do{for(A=l-1;0===t.bl_count[A];)A--;t.bl_count[A]--,t.bl_count[A+1]+=2,t.bl_count[l]--,d-=2}while(d>0);for(A=l;0!==A;A--)for(h=t.bl_count[A];0!==h;)c=t.heap[--u],c>n||(r[2*c+1]!==A&&(t.opt_len+=(A-r[2*c+1])*r[2*c],r[2*c+1]=A),h--)}})(t,e),Get(r,u,t.bl_count)},Wet=(t,e,r)=>{let n,i,o=-1,s=e[1],a=0,l=7,u=4;for(0===s&&(l=138,u=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=e[2*(n+1)+1],++a<l&&i===s||(a<u?t.bl_tree[2*i]+=a:0!==i?(i!==o&&t.bl_tree[2*i]++,t.bl_tree[32]++):a<=10?t.bl_tree[34]++:t.bl_tree[36]++,a=0,o=i,0===s?(l=138,u=3):i===s?(l=6,u=3):(l=7,u=4))},Xet=(t,e,r)=>{let n,i,o=-1,s=e[1],a=0,l=7,u=4;for(0===s&&(l=138,u=3),n=0;n<=r;n++)if(i=s,s=e[2*(n+1)+1],!(++a<l&&i===s)){if(a<u)do{Det(t,i,t.bl_tree)}while(0!=--a);else 0!==i?(i!==o&&(Det(t,i,t.bl_tree),a--),Det(t,16,t.bl_tree),Uet(t,a-3,2)):a<=10?(Det(t,17,t.bl_tree),Uet(t,a-3,3)):(Det(t,18,t.bl_tree),Uet(t,a-11,7));a=0,o=i,0===s?(l=138,u=3):i===s?(l=6,u=3):(l=7,u=4)}};let Yet=!1;const Zet=(t,e,r,n)=>{Uet(t,0+(n?1:0),3),Het(t),Ret(t,r),Ret(t,~r),r&&t.pending_buf.set(t.window.subarray(e,e+r),t.pending),t.pending+=r};var Jet={_tr_init:t=>{Yet||((()=>{let t,e,r,n,i;const o=new Array(16);for(r=0,n=0;n<28;n++)for(Pet[n]=r,t=0;t<1<<_et[n];t++)Iet[r++]=n;for(Iet[r-1]=n,i=0,n=0;n<16;n++)for(Fet[n]=i,t=0;t<1<<wet[n];t++)Bet[i++]=n;for(i>>=7;n<30;n++)for(Fet[n]=i<<7,t=0;t<1<<wet[n]-7;t++)Bet[256+i++]=n;for(e=0;e<=15;e++)o[e]=0;for(t=0;t<=143;)Cet[2*t+1]=8,t++,o[8]++;for(;t<=255;)Cet[2*t+1]=9,t++,o[9]++;for(;t<=279;)Cet[2*t+1]=7,t++,o[7]++;for(;t<=287;)Cet[2*t+1]=8,t++,o[8]++;for(Get(Cet,287,o),t=0;t<30;t++)Eet[2*t+1]=5,Eet[2*t]=Qet(t,5);Met=new Tet(Cet,_et,257,286,15),Let=new Tet(Eet,wet,0,30,15),ket=new Tet(new Array(0),bet,0,19,7)})(),Yet=!0),t.l_desc=new Oet(t.dyn_ltree,Met),t.d_desc=new Oet(t.dyn_dtree,Let),t.bl_desc=new Oet(t.bl_tree,ket),t.bi_buf=0,t.bi_valid=0,jet(t)},_tr_stored_block:Zet,_tr_flush_block:(t,e,r,n)=>{let i,o,s=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),qet(t,t.l_desc),qet(t,t.d_desc),s=(t=>{let e;for(Wet(t,t.dyn_ltree,t.l_desc.max_code),Wet(t,t.dyn_dtree,t.d_desc.max_code),qet(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*xet[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),i=t.opt_len+3+7>>>3,o=t.static_len+3+7>>>3,o<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==e?Zet(t,e,r,n):4===t.strategy||o===i?(Uet(t,2+(n?1:0),3),Ket(t,Cet,Eet)):(Uet(t,4+(n?1:0),3),((t,e,r,n)=>{let i;for(Uet(t,e-257,5),Uet(t,r-1,5),Uet(t,n-4,4),i=0;i<n;i++)Uet(t,t.bl_tree[2*xet[i]+1],3);Xet(t,t.dyn_ltree,e-1),Xet(t,t.dyn_dtree,r-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),Ket(t,t.dyn_ltree,t.dyn_dtree)),jet(t),n&&Het(t)},_tr_tally:(t,e,r)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=r,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(Iet[r]+256+1)]++,t.dyn_dtree[2*Net(e)]++),t.sym_next===t.sym_end),_tr_align:t=>{Uet(t,2,3),Det(t,256,Cet),(t=>{16===t.bi_valid?(Ret(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}},$et=(t,e,r,n)=>{let i=65535&t|0,o=t>>>16&65535|0,s=0;for(;0!==r;){s=r>2e3?2e3:r,r-=s;do{i=i+e[n++]|0,o=o+i|0}while(--s);i%=65521,o%=65521}return i|o<<16|0};const trt=new Uint32Array((()=>{let t,e=[];for(var r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e})());var ert=(t,e,r,n)=>{const i=trt,o=n+r;t^=-1;for(let s=n;s<o;s++)t=t>>>8^i[255&(t^e[s])];return-1^t},rrt={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},nrt={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:irt,_tr_stored_block:ort,_tr_flush_block:srt,_tr_tally:art,_tr_align:lrt}=Jet,{Z_NO_FLUSH:urt,Z_PARTIAL_FLUSH:hrt,Z_FULL_FLUSH:crt,Z_FINISH:Art,Z_BLOCK:frt,Z_OK:prt,Z_STREAM_END:drt,Z_STREAM_ERROR:grt,Z_DATA_ERROR:yrt,Z_BUF_ERROR:mrt,Z_DEFAULT_COMPRESSION:vrt,Z_FILTERED:_rt,Z_HUFFMAN_ONLY:wrt,Z_RLE:brt,Z_FIXED:xrt,Z_DEFAULT_STRATEGY:Crt,Z_UNKNOWN:Srt,Z_DEFLATED:Ert}=nrt,Brt=(t,e)=>(t.msg=rrt[e],e),Irt=t=>2*t-(t>4?9:0),Prt=t=>{let e=t.length;for(;--e>=0;)t[e]=0},Frt=t=>{let e,r,n,i=t.w_size;e=t.hash_size,n=e;do{r=t.head[--n],t.head[n]=r>=i?r-i:0}while(--e);e=i,n=e;do{r=t.prev[--n],t.prev[n]=r>=i?r-i:0}while(--e)};let Trt=(t,e,r)=>(e<<t.hash_shift^r)&t.hash_mask;const Mrt=t=>{const e=t.state;let r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+r),t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))},Lrt=(t,e)=>{srt(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,Mrt(t.strm)},krt=(t,e)=>{t.pending_buf[t.pending++]=e},Ort=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Nrt=(t,e,r,n)=>{let i=t.avail_in;return i>n&&(i=n),0===i?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),r),1===t.state.wrap?t.adler=$et(t.adler,e,i,r):2===t.state.wrap&&(t.adler=ert(t.adler,e,i,r)),t.next_in+=i,t.total_in+=i,i)},Rrt=(t,e)=>{let r,n,i=t.max_chain_length,o=t.strstart,s=t.prev_length,a=t.nice_match;const l=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,u=t.window,h=t.w_mask,c=t.prev,A=t.strstart+258;let f=u[o+s-1],p=u[o+s];t.prev_length>=t.good_match&&(i>>=2),a>t.lookahead&&(a=t.lookahead);do{if(r=e,u[r+s]===p&&u[r+s-1]===f&&u[r]===u[o]&&u[++r]===u[o+1]){o+=2,r++;do{}while(u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&o<A);if(n=258-(A-o),o=A-258,n>s){if(t.match_start=e,s=n,n>=a)break;f=u[o+s-1],p=u[o+s]}}}while((e=c[e&h])>l&&0!=--i);return s<=t.lookahead?s:t.lookahead},Urt=t=>{const e=t.w_size;let r,n,i;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-262)&&(t.window.set(t.window.subarray(e,e+e-n),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),Frt(t),n+=e),0===t.strm.avail_in)break;if(r=Nrt(t.strm,t.window,t.strstart+t.lookahead,n),t.lookahead+=r,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=Trt(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=Trt(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)},Drt=(t,e)=>{let r,n,i,o=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,s=0,a=t.strm.avail_in;do{if(r=65535,i=t.bi_valid+42>>3,t.strm.avail_out<i)break;if(i=t.strm.avail_out-i,n=t.strstart-t.block_start,r>n+t.strm.avail_in&&(r=n+t.strm.avail_in),r>i&&(r=i),r<o&&(0===r&&e!==Art||e===urt||r!==n+t.strm.avail_in))break;s=e===Art&&r===n+t.strm.avail_in?1:0,ort(t,0,0,s),t.pending_buf[t.pending-4]=r,t.pending_buf[t.pending-3]=r>>8,t.pending_buf[t.pending-2]=~r,t.pending_buf[t.pending-1]=~r>>8,Mrt(t.strm),n&&(n>r&&(n=r),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+n),t.strm.next_out),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n,t.block_start+=n,r-=n),r&&(Nrt(t.strm,t.strm.output,t.strm.next_out,r),t.strm.next_out+=r,t.strm.avail_out-=r,t.strm.total_out+=r)}while(0===s);return a-=t.strm.avail_in,a&&(a>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=a&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-a,t.strm.next_in),t.strstart),t.strstart+=a,t.insert+=a>t.w_size-t.insert?t.w_size-t.insert:a),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),s?4:e!==urt&&e!==Art&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(i=t.window_size-t.strstart,t.strm.avail_in>i&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,i+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),i>t.strm.avail_in&&(i=t.strm.avail_in),i&&(Nrt(t.strm,t.window,t.strstart,i),t.strstart+=i,t.insert+=i>t.w_size-t.insert?t.w_size-t.insert:i),t.high_water<t.strstart&&(t.high_water=t.strstart),i=t.bi_valid+42>>3,i=t.pending_buf_size-i>65535?65535:t.pending_buf_size-i,o=i>t.w_size?t.w_size:i,n=t.strstart-t.block_start,(n>=o||(n||e===Art)&&e!==urt&&0===t.strm.avail_in&&n<=i)&&(r=n>i?i:n,s=e===Art&&0===t.strm.avail_in&&r===n?1:0,ort(t,t.block_start,r,s),t.block_start+=r,Mrt(t.strm)),s?3:1)},Qrt=(t,e)=>{let r,n;for(;;){if(t.lookahead<262){if(Urt(t),t.lookahead<262&&e===urt)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=Trt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-262&&(t.match_length=Rrt(t,r)),t.match_length>=3)if(n=art(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=Trt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=Trt(t,t.ins_h,t.window[t.strstart+1]);else n=art(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Lrt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===Art?(Lrt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(Lrt(t,!1),0===t.strm.avail_out)?1:2},Grt=(t,e)=>{let r,n,i;for(;;){if(t.lookahead<262){if(Urt(t),t.lookahead<262&&e===urt)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=Trt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-262&&(t.match_length=Rrt(t,r),t.match_length<=5&&(t.strategy===_rt||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=art(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=Trt(t,t.ins_h,t.window[t.strstart+3-1]),r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Lrt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(n=art(t,0,t.window[t.strstart-1]),n&&Lrt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=art(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===Art?(Lrt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(Lrt(t,!1),0===t.strm.avail_out)?1:2};function jrt(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}const Hrt=[new jrt(0,0,0,0,Drt),new jrt(4,4,8,4,Qrt),new jrt(4,5,16,8,Qrt),new jrt(4,6,32,32,Qrt),new jrt(4,4,16,16,Grt),new jrt(8,16,32,32,Grt),new jrt(8,16,128,128,Grt),new jrt(8,32,128,256,Grt),new jrt(32,128,258,1024,Grt),new jrt(32,258,258,4096,Grt)];function zrt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Ert,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Prt(this.dyn_ltree),Prt(this.dyn_dtree),Prt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Prt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Prt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Vrt=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||42!==e.status&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&113!==e.status&&666!==e.status?1:0},Krt=t=>{const e=(t=>{if(Vrt(t))return Brt(t,grt);t.total_in=t.total_out=0,t.data_type=Srt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=-2,irt(e),prt})(t);var r;return e===prt&&((r=t.state).window_size=2*r.w_size,Prt(r.head),r.max_lazy_match=Hrt[r.level].max_lazy,r.good_match=Hrt[r.level].good_length,r.nice_match=Hrt[r.level].nice_length,r.max_chain_length=Hrt[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),e};var qrt=(t,e,r,n,i,o)=>{if(!t)return grt;let s=1;if(e===vrt&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),i<1||i>9||r!==Ert||n<8||n>15||e<0||e>9||o<0||o>xrt||8===n&&1!==s)return Brt(t,grt);8===n&&(n=9);const a=new zrt;return t.state=a,a.strm=t,a.status=42,a.wrap=s,a.gzhead=null,a.w_bits=n,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=i+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+3-1)/3),a.window=new Uint8Array(2*a.w_size),a.head=new Uint16Array(a.hash_size),a.prev=new Uint16Array(a.w_size),a.lit_bufsize=1<<i+6,a.pending_buf_size=4*a.lit_bufsize,a.pending_buf=new Uint8Array(a.pending_buf_size),a.sym_buf=a.lit_bufsize,a.sym_end=3*(a.lit_bufsize-1),a.level=e,a.strategy=o,a.method=r,Krt(t)},Wrt=(t,e)=>{if(Vrt(t)||e>frt||e<0)return t?Brt(t,grt):grt;const r=t.state;if(!t.output||0!==t.avail_in&&!t.input||666===r.status&&e!==Art)return Brt(t,0===t.avail_out?mrt:grt);const n=r.last_flush;if(r.last_flush=e,0!==r.pending){if(Mrt(t),0===t.avail_out)return r.last_flush=-1,prt}else if(0===t.avail_in&&Irt(e)<=Irt(n)&&e!==Art)return Brt(t,mrt);if(666===r.status&&0!==t.avail_in)return Brt(t,mrt);if(42===r.status&&0===r.wrap&&(r.status=113),42===r.status){let e=Ert+(r.w_bits-8<<4)<<8,n=-1;if(n=r.strategy>=wrt||r.level<2?0:r.level<6?1:6===r.level?2:3,e|=n<<6,0!==r.strstart&&(e|=32),e+=31-e%31,Ort(r,e),0!==r.strstart&&(Ort(r,t.adler>>>16),Ort(r,65535&t.adler)),t.adler=1,r.status=113,Mrt(t),0!==r.pending)return r.last_flush=-1,prt}if(57===r.status)if(t.adler=0,krt(r,31),krt(r,139),krt(r,8),r.gzhead)krt(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),krt(r,255&r.gzhead.time),krt(r,r.gzhead.time>>8&255),krt(r,r.gzhead.time>>16&255),krt(r,r.gzhead.time>>24&255),krt(r,9===r.level?2:r.strategy>=wrt||r.level<2?4:0),krt(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(krt(r,255&r.gzhead.extra.length),krt(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=ert(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69;else if(krt(r,0),krt(r,0),krt(r,0),krt(r,0),krt(r,0),krt(r,9===r.level?2:r.strategy>=wrt||r.level<2?4:0),krt(r,3),r.status=113,Mrt(t),0!==r.pending)return r.last_flush=-1,prt;if(69===r.status){if(r.gzhead.extra){let e=r.pending,n=(65535&r.gzhead.extra.length)-r.gzindex;for(;r.pending+n>r.pending_buf_size;){let i=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+i),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>e&&(t.adler=ert(t.adler,r.pending_buf,r.pending-e,e)),r.gzindex+=i,Mrt(t),0!==r.pending)return r.last_flush=-1,prt;e=0,n-=i}let i=new Uint8Array(r.gzhead.extra);r.pending_buf.set(i.subarray(r.gzindex,r.gzindex+n),r.pending),r.pending+=n,r.gzhead.hcrc&&r.pending>e&&(t.adler=ert(t.adler,r.pending_buf,r.pending-e,e)),r.gzindex=0}r.status=73}if(73===r.status){if(r.gzhead.name){let e,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(t.adler=ert(t.adler,r.pending_buf,r.pending-n,n)),Mrt(t),0!==r.pending)return r.last_flush=-1,prt;n=0}e=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,krt(r,e)}while(0!==e);r.gzhead.hcrc&&r.pending>n&&(t.adler=ert(t.adler,r.pending_buf,r.pending-n,n)),r.gzindex=0}r.status=91}if(91===r.status){if(r.gzhead.comment){let e,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(t.adler=ert(t.adler,r.pending_buf,r.pending-n,n)),Mrt(t),0!==r.pending)return r.last_flush=-1,prt;n=0}e=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,krt(r,e)}while(0!==e);r.gzhead.hcrc&&r.pending>n&&(t.adler=ert(t.adler,r.pending_buf,r.pending-n,n))}r.status=103}if(103===r.status){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(Mrt(t),0!==r.pending))return r.last_flush=-1,prt;krt(r,255&t.adler),krt(r,t.adler>>8&255),t.adler=0}if(r.status=113,Mrt(t),0!==r.pending)return r.last_flush=-1,prt}if(0!==t.avail_in||0!==r.lookahead||e!==urt&&666!==r.status){let n=0===r.level?Drt(r,e):r.strategy===wrt?((t,e)=>{let r;for(;;){if(0===t.lookahead&&(Urt(t),0===t.lookahead)){if(e===urt)return 1;break}if(t.match_length=0,r=art(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(Lrt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===Art?(Lrt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(Lrt(t,!1),0===t.strm.avail_out)?1:2})(r,e):r.strategy===brt?((t,e)=>{let r,n,i,o;const s=t.window;for(;;){if(t.lookahead<=258){if(Urt(t),t.lookahead<=258&&e===urt)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(i=t.strstart-1,n=s[i],n===s[++i]&&n===s[++i]&&n===s[++i])){o=t.strstart+258;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&i<o);t.match_length=258-(o-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=art(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=art(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(Lrt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===Art?(Lrt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(Lrt(t,!1),0===t.strm.avail_out)?1:2})(r,e):Hrt[r.level].func(r,e);if(3!==n&&4!==n||(r.status=666),1===n||3===n)return 0===t.avail_out&&(r.last_flush=-1),prt;if(2===n&&(e===hrt?lrt(r):e!==frt&&(ort(r,0,0,!1),e===crt&&(Prt(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),Mrt(t),0===t.avail_out))return r.last_flush=-1,prt}return e!==Art?prt:r.wrap<=0?drt:(2===r.wrap?(krt(r,255&t.adler),krt(r,t.adler>>8&255),krt(r,t.adler>>16&255),krt(r,t.adler>>24&255),krt(r,255&t.total_in),krt(r,t.total_in>>8&255),krt(r,t.total_in>>16&255),krt(r,t.total_in>>24&255)):(Ort(r,t.adler>>>16),Ort(r,65535&t.adler)),Mrt(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?prt:drt)},Xrt=t=>{if(Vrt(t))return grt;const e=t.state.status;return t.state=null,113===e?Brt(t,yrt):prt};const Yrt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Zrt=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const e in r)Yrt(r,e)&&(t[e]=r[e])}}return t},Jrt=t=>{let e=0;for(let n=0,i=t.length;n<i;n++)e+=t[n].length;const r=new Uint8Array(e);for(let n=0,i=0,o=t.length;n<o;n++){let e=t[n];r.set(e,i),i+=e.length}return r};let $rt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(rvt){$rt=!1}const tnt=new Uint8Array(256);for(let ol=0;ol<256;ol++)tnt[ol]=ol>=252?6:ol>=248?5:ol>=240?4:ol>=224?3:ol>=192?2:1;tnt[254]=tnt[254]=1;var ent=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,r,n,i,o,s=t.length,a=0;for(i=0;i<s;i++)r=t.charCodeAt(i),55296==(64512&r)&&i+1<s&&(n=t.charCodeAt(i+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),i++)),a+=r<128?1:r<2048?2:r<65536?3:4;for(e=new Uint8Array(a),o=0,i=0;o<a;i++)r=t.charCodeAt(i),55296==(64512&r)&&i+1<s&&(n=t.charCodeAt(i+1),56320==(64512&n)&&(r=65536+(r-55296<<10)+(n-56320),i++)),r<128?e[o++]=r:r<2048?(e[o++]=192|r>>>6,e[o++]=128|63&r):r<65536?(e[o++]=224|r>>>12,e[o++]=128|r>>>6&63,e[o++]=128|63&r):(e[o++]=240|r>>>18,e[o++]=128|r>>>12&63,e[o++]=128|r>>>6&63,e[o++]=128|63&r);return e},rnt=(t,e)=>{const r=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let n,i;const o=new Array(2*r);for(i=0,n=0;n<r;){let e=t[n++];if(e<128){o[i++]=e;continue}let s=tnt[e];if(s>4)o[i++]=65533,n+=s-1;else{for(e&=2===s?31:3===s?15:7;s>1&&n<r;)e=e<<6|63&t[n++],s--;s>1?o[i++]=65533:e<65536?o[i++]=e:(e-=65536,o[i++]=55296|e>>10&1023,o[i++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&$rt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let r="";for(let n=0;n<e;n++)r+=String.fromCharCode(t[n]);return r})(o,i)},nnt=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let r=e-1;for(;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+tnt[t[r]]>e?r:e},int=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const ont=Object.prototype.toString,{Z_NO_FLUSH:snt,Z_SYNC_FLUSH:ant,Z_FULL_FLUSH:lnt,Z_FINISH:unt,Z_OK:hnt,Z_STREAM_END:cnt,Z_DEFAULT_COMPRESSION:Ant,Z_DEFAULT_STRATEGY:fnt,Z_DEFLATED:pnt}=nrt;function dnt(t){this.options=Zrt({level:Ant,method:pnt,chunkSize:16384,windowBits:15,memLevel:8,strategy:fnt},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new int,this.strm.avail_out=0;let r=qrt(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(r!==hnt)throw new Error(rrt[r]);if(e.header&&(n=this.strm,i=e.header,Vrt(n)||2!==n.state.wrap||(n.state.gzhead=i)),e.dictionary){let t;if(t="string"==typeof e.dictionary?ent(e.dictionary):"[object ArrayBuffer]"===ont.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,r=((t,e)=>{let r=e.length;if(Vrt(t))return grt;const n=t.state,i=n.wrap;if(2===i||1===i&&42!==n.status||n.lookahead)return grt;if(1===i&&(t.adler=$et(t.adler,e,r,0)),n.wrap=0,r>=n.w_size){0===i&&(Prt(n.head),n.strstart=0,n.block_start=0,n.insert=0);let t=new Uint8Array(n.w_size);t.set(e.subarray(r-n.w_size,r),0),e=t,r=n.w_size}const o=t.avail_in,s=t.next_in,a=t.input;for(t.avail_in=r,t.next_in=0,t.input=e,Urt(n);n.lookahead>=3;){let t=n.strstart,e=n.lookahead-2;do{n.ins_h=Trt(n,n.ins_h,n.window[t+3-1]),n.prev[t&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=t,t++}while(--e);n.strstart=t,n.lookahead=2,Urt(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=s,t.input=a,t.avail_in=o,n.wrap=i,prt})(this.strm,t),r!==hnt)throw new Error(rrt[r]);this._dict_set=!0}var n,i}dnt.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize;let i,o;if(this.ended)return!1;for(o=e===~~e?e:!0===e?unt:snt,"string"==typeof t?r.input=ent(t):"[object ArrayBuffer]"===ont.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(o===ant||o===lnt)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(i=Wrt(r,o),i===cnt)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),i=Xrt(this.strm),this.onEnd(i),this.ended=!0,i===hnt;if(0!==r.avail_out){if(o>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},dnt.prototype.onData=function(t){this.chunks.push(t)},dnt.prototype.onEnd=function(t){t===hnt&&(this.result=Jrt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var gnt=function(t,e){let r,n,i,o,s,a,l,u,h,c,A,f,p,d,g,y,m,v,_,w,b,x,C,S;const E=t.state;r=t.next_in,C=t.input,n=r+(t.avail_in-5),i=t.next_out,S=t.output,o=i-(e-t.avail_out),s=i+(t.avail_out-257),a=E.dmax,l=E.wsize,u=E.whave,h=E.wnext,c=E.window,A=E.hold,f=E.bits,p=E.lencode,d=E.distcode,g=(1<<E.lenbits)-1,y=(1<<E.distbits)-1;t:do{f<15&&(A+=C[r++]<<f,f+=8,A+=C[r++]<<f,f+=8),m=p[A&g];e:for(;;){if(v=m>>>24,A>>>=v,f-=v,v=m>>>16&255,0===v)S[i++]=65535&m;else{if(!(16&v)){if(0==(64&v)){m=p[(65535&m)+(A&(1<<v)-1)];continue e}if(32&v){E.mode=16191;break t}t.msg="invalid literal/length code",E.mode=16209;break t}_=65535&m,v&=15,v&&(f<v&&(A+=C[r++]<<f,f+=8),_+=A&(1<<v)-1,A>>>=v,f-=v),f<15&&(A+=C[r++]<<f,f+=8,A+=C[r++]<<f,f+=8),m=d[A&y];r:for(;;){if(v=m>>>24,A>>>=v,f-=v,v=m>>>16&255,!(16&v)){if(0==(64&v)){m=d[(65535&m)+(A&(1<<v)-1)];continue r}t.msg="invalid distance code",E.mode=16209;break t}if(w=65535&m,v&=15,f<v&&(A+=C[r++]<<f,f+=8,f<v&&(A+=C[r++]<<f,f+=8)),w+=A&(1<<v)-1,w>a){t.msg="invalid distance too far back",E.mode=16209;break t}if(A>>>=v,f-=v,v=i-o,w>v){if(v=w-v,v>u&&E.sane){t.msg="invalid distance too far back",E.mode=16209;break t}if(b=0,x=c,0===h){if(b+=l-v,v<_){_-=v;do{S[i++]=c[b++]}while(--v);b=i-w,x=S}}else if(h<v){if(b+=l+h-v,v-=h,v<_){_-=v;do{S[i++]=c[b++]}while(--v);if(b=0,h<_){v=h,_-=v;do{S[i++]=c[b++]}while(--v);b=i-w,x=S}}}else if(b+=h-v,v<_){_-=v;do{S[i++]=c[b++]}while(--v);b=i-w,x=S}for(;_>2;)S[i++]=x[b++],S[i++]=x[b++],S[i++]=x[b++],_-=3;_&&(S[i++]=x[b++],_>1&&(S[i++]=x[b++]))}else{b=i-w;do{S[i++]=S[b++],S[i++]=S[b++],S[i++]=S[b++],_-=3}while(_>2);_&&(S[i++]=S[b++],_>1&&(S[i++]=S[b++]))}break}}break}}while(r<n&&i<s);_=f>>3,r-=_,f-=_<<3,A&=(1<<f)-1,t.next_in=r,t.next_out=i,t.avail_in=r<n?n-r+5:5-(r-n),t.avail_out=i<s?s-i+257:257-(i-s),E.hold=A,E.bits=f};const ynt=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),mnt=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),vnt=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),_nt=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var wnt=(t,e,r,n,i,o,s,a)=>{const l=a.bits;let u,h,c,A,f,p,d=0,g=0,y=0,m=0,v=0,_=0,w=0,b=0,x=0,C=0,S=null;const E=new Uint16Array(16),B=new Uint16Array(16);let I,P,F,T=null;for(d=0;d<=15;d++)E[d]=0;for(g=0;g<n;g++)E[e[r+g]]++;for(v=l,m=15;m>=1&&0===E[m];m--);if(v>m&&(v=m),0===m)return i[o++]=20971520,i[o++]=20971520,a.bits=1,0;for(y=1;y<m&&0===E[y];y++);for(v<y&&(v=y),b=1,d=1;d<=15;d++)if(b<<=1,b-=E[d],b<0)return-1;if(b>0&&(0===t||1!==m))return-1;for(B[1]=0,d=1;d<15;d++)B[d+1]=B[d]+E[d];for(g=0;g<n;g++)0!==e[r+g]&&(s[B[e[r+g]]++]=g);if(0===t?(S=T=s,p=20):1===t?(S=ynt,T=mnt,p=257):(S=vnt,T=_nt,p=0),C=0,g=0,d=y,f=o,_=v,w=0,c=-1,x=1<<v,A=x-1,1===t&&x>852||2===t&&x>592)return 1;for(;;){I=d-w,s[g]+1<p?(P=0,F=s[g]):s[g]>=p?(P=T[s[g]-p],F=S[s[g]-p]):(P=96,F=0),u=1<<d-w,h=1<<_,y=h;do{h-=u,i[f+(C>>w)+h]=I<<24|P<<16|F|0}while(0!==h);for(u=1<<d-1;C&u;)u>>=1;if(0!==u?(C&=u-1,C+=u):C=0,g++,0==--E[d]){if(d===m)break;d=e[r+s[g]]}if(d>v&&(C&A)!==c){for(0===w&&(w=v),f+=y,_=d-w,b=1<<_;_+w<m&&(b-=E[_+w],!(b<=0));)_++,b<<=1;if(x+=1<<_,1===t&&x>852||2===t&&x>592)return 1;c=C&A,i[c]=v<<24|_<<16|f-o|0}}return 0!==C&&(i[f+C]=d-w<<24|64<<16|0),a.bits=v,0};const{Z_FINISH:bnt,Z_BLOCK:xnt,Z_TREES:Cnt,Z_OK:Snt,Z_STREAM_END:Ent,Z_NEED_DICT:Bnt,Z_STREAM_ERROR:Int,Z_DATA_ERROR:Pnt,Z_MEM_ERROR:Fnt,Z_BUF_ERROR:Tnt,Z_DEFLATED:Mnt}=nrt,Lnt=16209,knt=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function Ont(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Nnt=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<16180||e.mode>16211?1:0},Rnt=t=>{if(Nnt(t))return Int;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,(t=>{if(Nnt(t))return Int;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=16180,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,Snt})(t)};let Unt,Dnt,Qnt=!0;const Gnt=t=>{if(Qnt){Unt=new Int32Array(512),Dnt=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(wnt(1,t.lens,0,288,Unt,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;wnt(2,t.lens,0,32,Dnt,0,t.work,{bits:5}),Qnt=!1}t.lencode=Unt,t.lenbits=9,t.distcode=Dnt,t.distbits=5},jnt=(t,e,r,n)=>{let i;const o=t.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),n>=o.wsize?(o.window.set(e.subarray(r-o.wsize,r),0),o.wnext=0,o.whave=o.wsize):(i=o.wsize-o.wnext,i>n&&(i=n),o.window.set(e.subarray(r-n,r-n+i),o.wnext),(n-=i)?(o.window.set(e.subarray(r-n,r),0),o.wnext=n,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=i))),0};var Hnt=Rnt,znt=(t,e)=>{if(!t)return Int;const r=new Ont;t.state=r,r.strm=t,r.window=null,r.mode=16180;const n=((t,e)=>{let r;if(Nnt(t))return Int;const n=t.state;return e<0?(r=0,e=-e):(r=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?Int:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,Rnt(t))})(t,e);return n!==Snt&&(t.state=null),n},Vnt=(t,e)=>{let r,n,i,o,s,a,l,u,h,c,A,f,p,d,g,y,m,v,_,w,b,x,C=0;const S=new Uint8Array(4);let E,B;const I=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Nnt(t)||!t.output||!t.input&&0!==t.avail_in)return Int;r=t.state,16191===r.mode&&(r.mode=16192),s=t.next_out,i=t.output,l=t.avail_out,o=t.next_in,n=t.input,a=t.avail_in,u=r.hold,h=r.bits,c=a,A=l,x=Snt;t:for(;;)switch(r.mode){case 16180:if(0===r.wrap){r.mode=16192;break}for(;h<16;){if(0===a)break t;a--,u+=n[o++]<<h,h+=8}if(2&r.wrap&&35615===u){0===r.wbits&&(r.wbits=15),r.check=0,S[0]=255&u,S[1]=u>>>8&255,r.check=ert(r.check,S,2,0),u=0,h=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31){t.msg="incorrect header check",r.mode=Lnt;break}if((15&u)!==Mnt){t.msg="unknown compression method",r.mode=Lnt;break}if(u>>>=4,h-=4,b=8+(15&u),0===r.wbits&&(r.wbits=b),b>15||b>r.wbits){t.msg="invalid window size",r.mode=Lnt;break}r.dmax=1<<r.wbits,r.flags=0,t.adler=r.check=1,r.mode=512&u?16189:16191,u=0,h=0;break;case 16181:for(;h<16;){if(0===a)break t;a--,u+=n[o++]<<h,h+=8}if(r.flags=u,(255&r.flags)!==Mnt){t.msg="unknown compression method",r.mode=Lnt;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=Lnt;break}r.head&&(r.head.text=u>>8&1),512&r.flags&&4&r.wrap&&(S[0]=255&u,S[1]=u>>>8&255,r.check=ert(r.check,S,2,0)),u=0,h=0,r.mode=16182;case 16182:for(;h<32;){if(0===a)break t;a--,u+=n[o++]<<h,h+=8}r.head&&(r.head.time=u),512&r.flags&&4&r.wrap&&(S[0]=255&u,S[1]=u>>>8&255,S[2]=u>>>16&255,S[3]=u>>>24&255,r.check=ert(r.check,S,4,0)),u=0,h=0,r.mode=16183;case 16183:for(;h<16;){if(0===a)break t;a--,u+=n[o++]<<h,h+=8}r.head&&(r.head.xflags=255&u,r.head.os=u>>8),512&r.flags&&4&r.wrap&&(S[0]=255&u,S[1]=u>>>8&255,r.check=ert(r.check,S,2,0)),u=0,h=0,r.mode=16184;case 16184:if(1024&r.flags){for(;h<16;){if(0===a)break t;a--,u+=n[o++]<<h,h+=8}r.length=u,r.head&&(r.head.extra_len=u),512&r.flags&&4&r.wrap&&(S[0]=255&u,S[1]=u>>>8&255,r.check=ert(r.check,S,2,0)),u=0,h=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&(f=r.length,f>a&&(f=a),f&&(r.head&&(b=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(o,o+f),b)),512&r.flags&&4&r.wrap&&(r.check=ert(r.check,n,f,o)),a-=f,o+=f,r.length-=f),r.length))break t;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===a)break t;f=0;do{b=n[o+f++],r.head&&b&&r.length<65536&&(r.head.name+=String.fromCharCode(b))}while(b&&f<a);if(512&r.flags&&4&r.wrap&&(r.check=ert(r.check,n,f,o)),a-=f,o+=f,b)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=16187;case 16187:if(4096&r.flags){if(0===a)break t;f=0;do{b=n[o+f++],r.head&&b&&r.length<65536&&(r.head.comment+=String.fromCharCode(b))}while(b&&f<a);if(512&r.flags&&4&r.wrap&&(r.check=ert(r.check,n,f,o)),a-=f,o+=f,b)break t}else r.head&&(r.head.comment=null);r.mode=16188;case 16188:if(512&r.flags){for(;h<16;){if(0===a)break t;a--,u+=n[o++]<<h,h+=8}if(4&r.wrap&&u!==(65535&r.check)){t.msg="header crc mismatch",r.mode=Lnt;break}u=0,h=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=16191;break;case 16189:for(;h<32;){if(0===a)break t;a--,u+=n[o++]<<h,h+=8}t.adler=r.check=knt(u),u=0,h=0,r.mode=16190;case 16190:if(0===r.havedict)return t.next_out=s,t.avail_out=l,t.next_in=o,t.avail_in=a,r.hold=u,r.bits=h,Bnt;t.adler=r.check=1,r.mode=16191;case 16191:if(e===xnt||e===Cnt)break t;case 16192:if(r.last){u>>>=7&h,h-=7&h,r.mode=16206;break}for(;h<3;){if(0===a)break t;a--,u+=n[o++]<<h,h+=8}switch(r.last=1&u,u>>>=1,h-=1,3&u){case 0:r.mode=16193;break;case 1:if(Gnt(r),r.mode=16199,e===Cnt){u>>>=2,h-=2;break t}break;case 2:r.mode=16196;break;case 3:t.msg="invalid block type",r.mode=Lnt}u>>>=2,h-=2;break;case 16193:for(u>>>=7&h,h-=7&h;h<32;){if(0===a)break t;a--,u+=n[o++]<<h,h+=8}if((65535&u)!=(u>>>16^65535)){t.msg="invalid stored block lengths",r.mode=Lnt;break}if(r.length=65535&u,u=0,h=0,r.mode=16194,e===Cnt)break t;case 16194:r.mode=16195;case 16195:if(f=r.length,f){if(f>a&&(f=a),f>l&&(f=l),0===f)break t;i.set(n.subarray(o,o+f),s),a-=f,o+=f,l-=f,s+=f,r.length-=f;break}r.mode=16191;break;case 16196:for(;h<14;){if(0===a)break t;a--,u+=n[o++]<<h,h+=8}if(r.nlen=257+(31&u),u>>>=5,h-=5,r.ndist=1+(31&u),u>>>=5,h-=5,r.ncode=4+(15&u),u>>>=4,h-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=Lnt;break}r.have=0,r.mode=16197;case 16197:for(;r.have<r.ncode;){for(;h<3;){if(0===a)break t;a--,u+=n[o++]<<h,h+=8}r.lens[I[r.have++]]=7&u,u>>>=3,h-=3}for(;r.have<19;)r.lens[I[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,E={bits:r.lenbits},x=wnt(0,r.lens,0,19,r.lencode,0,r.work,E),r.lenbits=E.bits,x){t.msg="invalid code lengths set",r.mode=Lnt;break}r.have=0,r.mode=16198;case 16198:for(;r.have<r.nlen+r.ndist;){for(;C=r.lencode[u&(1<<r.lenbits)-1],g=C>>>24,y=C>>>16&255,m=65535&C,!(g<=h);){if(0===a)break t;a--,u+=n[o++]<<h,h+=8}if(m<16)u>>>=g,h-=g,r.lens[r.have++]=m;else{if(16===m){for(B=g+2;h<B;){if(0===a)break t;a--,u+=n[o++]<<h,h+=8}if(u>>>=g,h-=g,0===r.have){t.msg="invalid bit length repeat",r.mode=Lnt;break}b=r.lens[r.have-1],f=3+(3&u),u>>>=2,h-=2}else if(17===m){for(B=g+3;h<B;){if(0===a)break t;a--,u+=n[o++]<<h,h+=8}u>>>=g,h-=g,b=0,f=3+(7&u),u>>>=3,h-=3}else{for(B=g+7;h<B;){if(0===a)break t;a--,u+=n[o++]<<h,h+=8}u>>>=g,h-=g,b=0,f=11+(127&u),u>>>=7,h-=7}if(r.have+f>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=Lnt;break}for(;f--;)r.lens[r.have++]=b}}if(r.mode===Lnt)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=Lnt;break}if(r.lenbits=9,E={bits:r.lenbits},x=wnt(1,r.lens,0,r.nlen,r.lencode,0,r.work,E),r.lenbits=E.bits,x){t.msg="invalid literal/lengths set",r.mode=Lnt;break}if(r.distbits=6,r.distcode=r.distdyn,E={bits:r.distbits},x=wnt(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,E),r.distbits=E.bits,x){t.msg="invalid distances set",r.mode=Lnt;break}if(r.mode=16199,e===Cnt)break t;case 16199:r.mode=16200;case 16200:if(a>=6&&l>=258){t.next_out=s,t.avail_out=l,t.next_in=o,t.avail_in=a,r.hold=u,r.bits=h,gnt(t,A),s=t.next_out,i=t.output,l=t.avail_out,o=t.next_in,n=t.input,a=t.avail_in,u=r.hold,h=r.bits,16191===r.mode&&(r.back=-1);break}for(r.back=0;C=r.lencode[u&(1<<r.lenbits)-1],g=C>>>24,y=C>>>16&255,m=65535&C,!(g<=h);){if(0===a)break t;a--,u+=n[o++]<<h,h+=8}if(y&&0==(240&y)){for(v=g,_=y,w=m;C=r.lencode[w+((u&(1<<v+_)-1)>>v)],g=C>>>24,y=C>>>16&255,m=65535&C,!(v+g<=h);){if(0===a)break t;a--,u+=n[o++]<<h,h+=8}u>>>=v,h-=v,r.back+=v}if(u>>>=g,h-=g,r.back+=g,r.length=m,0===y){r.mode=16205;break}if(32&y){r.back=-1,r.mode=16191;break}if(64&y){t.msg="invalid literal/length code",r.mode=Lnt;break}r.extra=15&y,r.mode=16201;case 16201:if(r.extra){for(B=r.extra;h<B;){if(0===a)break t;a--,u+=n[o++]<<h,h+=8}r.length+=u&(1<<r.extra)-1,u>>>=r.extra,h-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;C=r.distcode[u&(1<<r.distbits)-1],g=C>>>24,y=C>>>16&255,m=65535&C,!(g<=h);){if(0===a)break t;a--,u+=n[o++]<<h,h+=8}if(0==(240&y)){for(v=g,_=y,w=m;C=r.distcode[w+((u&(1<<v+_)-1)>>v)],g=C>>>24,y=C>>>16&255,m=65535&C,!(v+g<=h);){if(0===a)break t;a--,u+=n[o++]<<h,h+=8}u>>>=v,h-=v,r.back+=v}if(u>>>=g,h-=g,r.back+=g,64&y){t.msg="invalid distance code",r.mode=Lnt;break}r.offset=m,r.extra=15&y,r.mode=16203;case 16203:if(r.extra){for(B=r.extra;h<B;){if(0===a)break t;a--,u+=n[o++]<<h,h+=8}r.offset+=u&(1<<r.extra)-1,u>>>=r.extra,h-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=Lnt;break}r.mode=16204;case 16204:if(0===l)break t;if(f=A-l,r.offset>f){if(f=r.offset-f,f>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=Lnt;break}f>r.wnext?(f-=r.wnext,p=r.wsize-f):p=r.wnext-f,f>r.length&&(f=r.length),d=r.window}else d=i,p=s-r.offset,f=r.length;f>l&&(f=l),l-=f,r.length-=f;do{i[s++]=d[p++]}while(--f);0===r.length&&(r.mode=16200);break;case 16205:if(0===l)break t;i[s++]=r.length,l--,r.mode=16200;break;case 16206:if(r.wrap){for(;h<32;){if(0===a)break t;a--,u|=n[o++]<<h,h+=8}if(A-=l,t.total_out+=A,r.total+=A,4&r.wrap&&A&&(t.adler=r.check=r.flags?ert(r.check,i,A,s-A):$et(r.check,i,A,s-A)),A=l,4&r.wrap&&(r.flags?u:knt(u))!==r.check){t.msg="incorrect data check",r.mode=Lnt;break}u=0,h=0}r.mode=16207;case 16207:if(r.wrap&&r.flags){for(;h<32;){if(0===a)break t;a--,u+=n[o++]<<h,h+=8}if(4&r.wrap&&u!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=Lnt;break}u=0,h=0}r.mode=16208;case 16208:x=Ent;break t;case Lnt:x=Pnt;break t;case 16210:return Fnt;default:return Int}return t.next_out=s,t.avail_out=l,t.next_in=o,t.avail_in=a,r.hold=u,r.bits=h,(r.wsize||A!==t.avail_out&&r.mode<Lnt&&(r.mode<16206||e!==bnt))&&jnt(t,t.output,t.next_out,A-t.avail_out),c-=t.avail_in,A-=t.avail_out,t.total_in+=c,t.total_out+=A,r.total+=A,4&r.wrap&&A&&(t.adler=r.check=r.flags?ert(r.check,i,A,t.next_out-A):$et(r.check,i,A,t.next_out-A)),t.data_type=r.bits+(r.last?64:0)+(16191===r.mode?128:0)+(16199===r.mode||16194===r.mode?256:0),(0===c&&0===A||e===bnt)&&x===Snt&&(x=Tnt),x},Knt=t=>{if(Nnt(t))return Int;let e=t.state;return e.window&&(e.window=null),t.state=null,Snt},qnt=(t,e)=>{const r=e.length;let n,i,o;return Nnt(t)?Int:(n=t.state,0!==n.wrap&&16190!==n.mode?Int:16190===n.mode&&(i=1,i=$et(i,e,r,0),i!==n.check)?Pnt:(o=jnt(t,e,r,r),o?(n.mode=16210,Fnt):(n.havedict=1,Snt)))},Wnt=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const Xnt=Object.prototype.toString,{Z_NO_FLUSH:Ynt,Z_FINISH:Znt,Z_OK:Jnt,Z_STREAM_END:$nt,Z_NEED_DICT:tit,Z_STREAM_ERROR:eit,Z_DATA_ERROR:rit,Z_MEM_ERROR:nit}=nrt;function iit(t){this.options=Zrt({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new int,this.strm.avail_out=0;let r=znt(this.strm,e.windowBits);if(r!==Jnt)throw new Error(rrt[r]);if(this.header=new Wnt,((t,e)=>{if(Nnt(t))return Int;const r=t.state;0==(2&r.wrap)||(r.head=e,e.done=!1)})(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=ent(e.dictionary):"[object ArrayBuffer]"===Xnt.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=qnt(this.strm,e.dictionary),r!==Jnt)))throw new Error(rrt[r])}function oit(t,e){const r=new iit(e);if(r.push(t),r.err)throw r.msg||rrt[r.err];return r.result}iit.prototype.push=function(t,e){const r=this.strm,n=this.options.chunkSize,i=this.options.dictionary;let o,s,a;if(this.ended)return!1;for(s=e===~~e?e:!0===e?Znt:Ynt,"[object ArrayBuffer]"===Xnt.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),o=Vnt(r,s),o===tit&&i&&(o=qnt(r,i),o===Jnt?o=Vnt(r,s):o===rit&&(o=tit));r.avail_in>0&&o===$nt&&r.state.wrap>0&&0!==t[r.next_in];)Hnt(r),o=Vnt(r,s);switch(o){case eit:case rit:case tit:case nit:return this.onEnd(o),this.ended=!0,!1}if(a=r.avail_out,r.next_out&&(0===r.avail_out||o===$nt))if("string"===this.options.to){let t=nnt(r.output,r.next_out),e=r.next_out-t,i=rnt(r.output,t);r.next_out=e,r.avail_out=n-e,e&&r.output.set(r.output.subarray(t,t+e),0),this.onData(i)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(o!==Jnt||0!==a){if(o===$nt)return o=Knt(this.strm),this.onEnd(o),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},iit.prototype.onData=function(t){this.chunks.push(t)},iit.prototype.onEnd=function(t){t===Jnt&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Jrt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var sit={Inflate:iit,inflate:oit,inflateRaw:function(t,e){return(e=e||{}).raw=!0,oit(t,e)},ungzip:oit,constants:nrt};const{Inflate:ait,inflate:lit,inflateRaw:uit,ungzip:hit}=sit;var cit=lit;const Ait=Object.freeze(Object.defineProperty({__proto__:null,default:class extends uet{decodeBlock(t){return cit(new Uint8Array(t)).buffer}}},Symbol.toStringTag,{value:"Module"})),fit=Object.freeze(Object.defineProperty({__proto__:null,default:class extends uet{decodeBlock(t){const e=new DataView(t),r=[];for(let n=0;n<t.byteLength;++n){let t=e.getInt8(n);if(t<0){const i=e.getUint8(n+1);t=-t;for(let e=0;e<=t;++e)r.push(i);n+=1}else{for(let i=0;i<=t;++i)r.push(e.getUint8(n+i+1));n+=t+1}}return new Uint8Array(r).buffer}}},Symbol.toStringTag,{value:"Module"}));var pit={exports:{}};!function(t){
323
323
  /* Copyright 2015-2021 Esri. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @preserve */
324
324
  !function(){var e,r,n,i,o,s,a,l,u,h,c,A,f,p,d,g,y=(e={defaultNoDataValue:-34027999387901484e22,decode:function(t,s){var a=(s=s||{}).encodedMaskData||null===s.encodedMaskData,l=o(t,s.inputOffset||0,a),u=null!==s.noDataValue?s.noDataValue:e.defaultNoDataValue,h=r(l,s.pixelType||Float32Array,s.encodedMaskData,u,s.returnMask),c={width:l.width,height:l.height,pixelData:h.resultPixels,minValue:h.minValue,maxValue:l.pixels.maxValue,noDataValue:u};return h.resultMask&&(c.maskData=h.resultMask),s.returnEncodedMask&&l.mask&&(c.encodedMaskData=l.mask.bitset?l.mask.bitset:null),s.returnFileInfo&&(c.fileInfo=n(l),s.computeUsedBitDepths&&(c.fileInfo.bitDepths=i(l))),c}},r=function(t,e,r,n,i){var o,a,l,u=0,h=t.pixels.numBlocksX,c=t.pixels.numBlocksY,A=Math.floor(t.width/h),f=Math.floor(t.height/c),p=2*t.maxZError,d=Number.MAX_VALUE;r=r||(t.mask?t.mask.bitset:null),a=new e(t.width*t.height),i&&r&&(l=new Uint8Array(t.width*t.height));for(var g,y,m=new Float32Array(A*f),v=0;v<=c;v++){var _=v!==c?f:t.height%c;if(0!==_)for(var w=0;w<=h;w++){var b=w!==h?A:t.width%h;if(0!==b){var x,C,S,E,B=v*t.width*f+w*A,I=t.width-b,P=t.pixels.blocks[u];if(P.encoding<2?(0===P.encoding?x=P.rawData:(s(P.stuffedData,P.bitsPerPixel,P.numValidPixels,P.offset,p,m,t.pixels.maxValue),x=m),C=0):S=2===P.encoding?0:P.offset,r)for(y=0;y<_;y++){for(7&B&&(E=r[B>>3],E<<=7&B),g=0;g<b;g++)7&B||(E=r[B>>3]),128&E?(l&&(l[B]=1),d=d>(o=P.encoding<2?x[C++]:S)?o:d,a[B++]=o):(l&&(l[B]=0),a[B++]=n),E<<=1;B+=I}else if(P.encoding<2)for(y=0;y<_;y++){for(g=0;g<b;g++)d=d>(o=x[C++])?o:d,a[B++]=o;B+=I}else for(d=d>S?S:d,y=0;y<_;y++){for(g=0;g<b;g++)a[B++]=S;B+=I}if(1===P.encoding&&C!==P.numValidPixels)throw"Block and Mask do not match";u++}}}return{resultPixels:a,resultMask:l,minValue:d}},n=function(t){return{fileIdentifierString:t.fileIdentifierString,fileVersion:t.fileVersion,imageType:t.imageType,height:t.height,width:t.width,maxZError:t.maxZError,eofOffset:t.eofOffset,mask:t.mask?{numBlocksX:t.mask.numBlocksX,numBlocksY:t.mask.numBlocksY,numBytes:t.mask.numBytes,maxValue:t.mask.maxValue}:null,pixels:{numBlocksX:t.pixels.numBlocksX,numBlocksY:t.pixels.numBlocksY,numBytes:t.pixels.numBytes,maxValue:t.pixels.maxValue,noDataValue:t.noDataValue}}},i=function(t){for(var e=t.pixels.numBlocksX*t.pixels.numBlocksY,r={},n=0;n<e;n++){var i=t.pixels.blocks[n];0===i.encoding?r.float32=!0:1===i.encoding?r[i.bitsPerPixel]=!0:r[0]=!0}return Object.keys(r)},o=function(t,e,r){var n={},i=new Uint8Array(t,e,10);if(n.fileIdentifierString=String.fromCharCode.apply(null,i),"CntZImage"!==n.fileIdentifierString.trim())throw"Unexpected file identifier string: "+n.fileIdentifierString;e+=10;var o=new DataView(t,e,24);if(n.fileVersion=o.getInt32(0,!0),n.imageType=o.getInt32(4,!0),n.height=o.getUint32(8,!0),n.width=o.getUint32(12,!0),n.maxZError=o.getFloat64(16,!0),e+=24,!r)if(o=new DataView(t,e,16),n.mask={},n.mask.numBlocksY=o.getUint32(0,!0),n.mask.numBlocksX=o.getUint32(4,!0),n.mask.numBytes=o.getUint32(8,!0),n.mask.maxValue=o.getFloat32(12,!0),e+=16,n.mask.numBytes>0){var s=new Uint8Array(Math.ceil(n.width*n.height/8)),a=(o=new DataView(t,e,n.mask.numBytes)).getInt16(0,!0),l=2,u=0;do{if(a>0)for(;a--;)s[u++]=o.getUint8(l++);else{var h=o.getUint8(l++);for(a=-a;a--;)s[u++]=h}a=o.getInt16(l,!0),l+=2}while(l<n.mask.numBytes);if(-32768!==a||u<s.length)throw"Unexpected end of mask RLE encoding";n.mask.bitset=s,e+=n.mask.numBytes}else 0==(n.mask.numBytes|n.mask.numBlocksY|n.mask.maxValue)&&(n.mask.bitset=new Uint8Array(Math.ceil(n.width*n.height/8)));o=new DataView(t,e,16),n.pixels={},n.pixels.numBlocksY=o.getUint32(0,!0),n.pixels.numBlocksX=o.getUint32(4,!0),n.pixels.numBytes=o.getUint32(8,!0),n.pixels.maxValue=o.getFloat32(12,!0),e+=16;var c=n.pixels.numBlocksX,A=n.pixels.numBlocksY,f=c+(n.width%c>0?1:0),p=A+(n.height%A>0?1:0);n.pixels.blocks=new Array(f*p);for(var d=0,g=0;g<p;g++)for(var y=0;y<f;y++){var m=0,v=t.byteLength-e;o=new DataView(t,e,Math.min(10,v));var _={};n.pixels.blocks[d++]=_;var w=o.getUint8(0);if(m++,_.encoding=63&w,_.encoding>3)throw"Invalid block encoding ("+_.encoding+")";if(2!==_.encoding){if(0!==w&&2!==w){if(w>>=6,_.offsetType=w,2===w)_.offset=o.getInt8(1),m++;else if(1===w)_.offset=o.getInt16(1,!0),m+=2;else{if(0!==w)throw"Invalid block offset type";_.offset=o.getFloat32(1,!0),m+=4}if(1===_.encoding)if(w=o.getUint8(m),m++,_.bitsPerPixel=63&w,w>>=6,_.numValidPixelsType=w,2===w)_.numValidPixels=o.getUint8(m),m++;else if(1===w)_.numValidPixels=o.getUint16(m,!0),m+=2;else{if(0!==w)throw"Invalid valid pixel count type";_.numValidPixels=o.getUint32(m,!0),m+=4}}var b;if(e+=m,3!==_.encoding)if(0===_.encoding){var x=(n.pixels.numBytes-1)/4;if(x!==Math.floor(x))throw"uncompressed block has invalid length";b=new ArrayBuffer(4*x),new Uint8Array(b).set(new Uint8Array(t,e,4*x));var C=new Float32Array(b);_.rawData=C,e+=4*x}else if(1===_.encoding){var S=Math.ceil(_.numValidPixels*_.bitsPerPixel/8),E=Math.ceil(S/4);b=new ArrayBuffer(4*E),new Uint8Array(b).set(new Uint8Array(t,e,S)),_.stuffedData=new Uint32Array(b),e+=S}}else e++}return n.eofOffset=e,n},s=function(t,e,r,n,i,o,s){var a,l,u,h=(1<<e)-1,c=0,A=0,f=Math.ceil((s-n)/i),p=4*t.length-Math.ceil(e*r/8);for(t[t.length-1]<<=8*p,a=0;a<r;a++){if(0===A&&(u=t[c++],A=32),A>=e)l=u>>>A-e&h,A-=e;else{var d=e-A;l=(u&h)<<d&h,l+=(u=t[c++])>>>(A=32-d)}o[a]=l<f?n+l*i:s}return o},e),m=(a=function(t,e,r,n,i,o,s,a){var l,u,h,c,A,f=(1<<r)-1,p=0,d=0,g=4*t.length-Math.ceil(r*n/8);if(t[t.length-1]<<=8*g,i)for(l=0;l<n;l++)0===d&&(h=t[p++],d=32),d>=r?(u=h>>>d-r&f,d-=r):(u=(h&f)<<(c=r-d)&f,u+=(h=t[p++])>>>(d=32-c)),e[l]=i[u];else for(A=Math.ceil((a-o)/s),l=0;l<n;l++)0===d&&(h=t[p++],d=32),d>=r?(u=h>>>d-r&f,d-=r):(u=(h&f)<<(c=r-d)&f,u+=(h=t[p++])>>>(d=32-c)),e[l]=u<A?o+u*s:a},l=function(t,e,r,n,i,o){var s,a=(1<<e)-1,l=0,u=0,h=0,c=0,A=0,f=[],p=4*t.length-Math.ceil(e*r/8);t[t.length-1]<<=8*p;var d=Math.ceil((o-n)/i);for(u=0;u<r;u++)0===c&&(s=t[l++],c=32),c>=e?(A=s>>>c-e&a,c-=e):(A=(s&a)<<(h=e-c)&a,A+=(s=t[l++])>>>(c=32-h)),f[u]=A<d?n+A*i:o;return f.unshift(n),f},u=function(t,e,r,n,i,o,s,a){var l,u,h,c,A=(1<<r)-1,f=0,p=0,d=0;if(i)for(l=0;l<n;l++)0===p&&(h=t[f++],p=32,d=0),p>=r?(u=h>>>d&A,p-=r,d+=r):(u=h>>>d&A,p=32-(c=r-p),u|=((h=t[f++])&(1<<c)-1)<<r-c,d=c),e[l]=i[u];else{var g=Math.ceil((a-o)/s);for(l=0;l<n;l++)0===p&&(h=t[f++],p=32,d=0),p>=r?(u=h>>>d&A,p-=r,d+=r):(u=h>>>d&A,p=32-(c=r-p),u|=((h=t[f++])&(1<<c)-1)<<r-c,d=c),e[l]=u<g?o+u*s:a}return e},h=function(t,e,r,n,i,o){var s,a=(1<<e)-1,l=0,u=0,h=0,c=0,A=0,f=0,p=[],d=Math.ceil((o-n)/i);for(u=0;u<r;u++)0===c&&(s=t[l++],c=32,f=0),c>=e?(A=s>>>f&a,c-=e,f+=e):(A=s>>>f&a,c=32-(h=e-c),A|=((s=t[l++])&(1<<h)-1)<<e-h,f=h),p[u]=A<d?n+A*i:o;return p.unshift(n),p},c=function(t,e,r,n){var i,o,s,a,l=(1<<r)-1,u=0,h=0,c=4*t.length-Math.ceil(r*n/8);for(t[t.length-1]<<=8*c,i=0;i<n;i++)0===h&&(s=t[u++],h=32),h>=r?(o=s>>>h-r&l,h-=r):(o=(s&l)<<(a=r-h)&l,o+=(s=t[u++])>>>(h=32-a)),e[i]=o;return e},A=function(t,e,r,n){var i,o,s,a,l=(1<<r)-1,u=0,h=0,c=0;for(i=0;i<n;i++)0===h&&(s=t[u++],h=32,c=0),h>=r?(o=s>>>c&l,h-=r,c+=r):(o=s>>>c&l,h=32-(a=r-h),o|=((s=t[u++])&(1<<a)-1)<<r-a,c=a),e[i]=o;return e},f={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(t){for(var e=65535,r=65535,n=t.length,i=Math.floor(n/2),o=0;i;){var s=i>=359?359:i;i-=s;do{e+=t[o++]<<8,r+=e+=t[o++]}while(--s);e=(65535&e)+(e>>>16),r=(65535&r)+(r>>>16)}return 1&n&&(r+=e+=t[o]<<8),((r=(65535&r)+(r>>>16))<<16|(e=(65535&e)+(e>>>16)))>>>0},readHeaderInfo:function(t,e){var r=e.ptr,n=new Uint8Array(t,r,6),i={};if(i.fileIdentifierString=String.fromCharCode.apply(null,n),0!==i.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+i.fileIdentifierString;r+=6;var o,s=new DataView(t,r,8),a=s.getInt32(0,!0);if(i.fileVersion=a,r+=4,a>=3&&(i.checksum=s.getUint32(4,!0),r+=4),s=new DataView(t,r,12),i.height=s.getUint32(0,!0),i.width=s.getUint32(4,!0),r+=8,a>=4?(i.numDims=s.getUint32(8,!0),r+=4):i.numDims=1,s=new DataView(t,r,40),i.numValidPixel=s.getUint32(0,!0),i.microBlockSize=s.getInt32(4,!0),i.blobSize=s.getInt32(8,!0),i.imageType=s.getInt32(12,!0),i.maxZError=s.getFloat64(16,!0),i.zMin=s.getFloat64(24,!0),i.zMax=s.getFloat64(32,!0),r+=40,e.headerInfo=i,e.ptr=r,a>=3&&(o=a>=4?52:48,this.computeChecksumFletcher32(new Uint8Array(t,r-o,i.blobSize-14))!==i.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(t,e){var r=e.headerInfo,n=this.getDataTypeArray(r.imageType),i=r.numDims*this.getDataTypeSize(r.imageType),o=this.readSubArray(t,e.ptr,n,i),s=this.readSubArray(t,e.ptr+i,n,i);e.ptr+=2*i;var a,l=!0;for(a=0;a<r.numDims;a++)if(o[a]!==s[a]){l=!1;break}return r.minValues=o,r.maxValues=s,l},readSubArray:function(t,e,r,n){var i;if(r===Uint8Array)i=new Uint8Array(t,e,n);else{var o=new ArrayBuffer(n);new Uint8Array(o).set(new Uint8Array(t,e,n)),i=new r(o)}return i},readMask:function(t,e){var r,n,i=e.ptr,o=e.headerInfo,s=o.width*o.height,a=o.numValidPixel,l=new DataView(t,i,4),u={};if(u.numBytes=l.getUint32(0,!0),i+=4,(0===a||s===a)&&0!==u.numBytes)throw"invalid mask";if(0===a)r=new Uint8Array(Math.ceil(s/8)),u.bitset=r,n=new Uint8Array(s),e.pixels.resultMask=n,i+=u.numBytes;else if(u.numBytes>0){r=new Uint8Array(Math.ceil(s/8));var h=(l=new DataView(t,i,u.numBytes)).getInt16(0,!0),c=2,A=0,f=0;do{if(h>0)for(;h--;)r[A++]=l.getUint8(c++);else for(f=l.getUint8(c++),h=-h;h--;)r[A++]=f;h=l.getInt16(c,!0),c+=2}while(c<u.numBytes);if(-32768!==h||A<r.length)throw"Unexpected end of mask RLE encoding";n=new Uint8Array(s);var p=0,d=0;for(d=0;d<s;d++)7&d?(p=r[d>>3],p<<=7&d):p=r[d>>3],128&p&&(n[d]=1);e.pixels.resultMask=n,u.bitset=r,i+=u.numBytes}return e.ptr=i,e.mask=u,!0},readDataOneSweep:function(t,e,r,n){var i,o=e.ptr,s=e.headerInfo,a=s.numDims,l=s.width*s.height,u=s.imageType,h=s.numValidPixel*f.getDataTypeSize(u)*a,c=e.pixels.resultMask;if(r===Uint8Array)i=new Uint8Array(t,o,h);else{var A=new ArrayBuffer(h);new Uint8Array(A).set(new Uint8Array(t,o,h)),i=new r(A)}if(i.length===l*a)e.pixels.resultPixels=n?f.swapDimensionOrder(i,l,a,r,!0):i;else{e.pixels.resultPixels=new r(l*a);var p=0,d=0,g=0,y=0;if(a>1){if(n){for(d=0;d<l;d++)if(c[d])for(y=d,g=0;g<a;g++,y+=l)e.pixels.resultPixels[y]=i[p++]}else for(d=0;d<l;d++)if(c[d])for(y=d*a,g=0;g<a;g++)e.pixels.resultPixels[y+g]=i[p++]}else for(d=0;d<l;d++)c[d]&&(e.pixels.resultPixels[d]=i[p++])}return o+=h,e.ptr=o,!0},readHuffmanTree:function(t,e){var r=this.HUFFMAN_LUT_BITS_MAX,n=new DataView(t,e.ptr,16);if(e.ptr+=16,n.getInt32(0,!0)<2)throw"unsupported Huffman version";var i=n.getInt32(4,!0),o=n.getInt32(8,!0),s=n.getInt32(12,!0);if(o>=s)return!1;var a=new Uint32Array(s-o);f.decodeBits(t,e,a);var l,u,h,c,A=[];for(l=o;l<s;l++)A[u=l-(l<i?0:i)]={first:a[l-o],second:null};var d=t.byteLength-e.ptr,g=Math.ceil(d/4),y=new ArrayBuffer(4*g);new Uint8Array(y).set(new Uint8Array(t,e.ptr,d));var m,v=new Uint32Array(y),_=0,w=0;for(m=v[0],l=o;l<s;l++)(c=A[u=l-(l<i?0:i)].first)>0&&(A[u].second=m<<_>>>32-c,32-_>=c?32===(_+=c)&&(_=0,m=v[++w]):(_+=c-32,m=v[++w],A[u].second|=m>>>32-_));var b,x=0,C=new p;for(l=0;l<A.length;l++)void 0!==A[l]&&(x=Math.max(x,A[l].first));b=x>=r?r:x;var S,E,B,I,P,F=[];for(l=o;l<s;l++)if((c=A[u=l-(l<i?0:i)].first)>0)if(S=[c,u],c<=b)for(E=A[u].second<<b-c,B=1<<b-c,h=0;h<B;h++)F[E|h]=S;else for(E=A[u].second,P=C,I=c-1;I>=0;I--)E>>>I&1?(P.right||(P.right=new p),P=P.right):(P.left||(P.left=new p),P=P.left),0!==I||P.val||(P.val=S[1]);return{decodeLut:F,numBitsLUTQick:b,numBitsLUT:x,tree:C,stuffedData:v,srcPtr:w,bitPos:_}},readHuffman:function(t,e,r,n){var i,o,s,a,l,u,h,c,A,p=e.headerInfo.numDims,d=e.headerInfo.height,g=e.headerInfo.width,y=g*d,m=this.readHuffmanTree(t,e),v=m.decodeLut,_=m.tree,w=m.stuffedData,b=m.srcPtr,x=m.bitPos,C=m.numBitsLUTQick,S=m.numBitsLUT,E=0===e.headerInfo.imageType?128:0,B=e.pixels.resultMask,I=0;x>0&&(b++,x=0);var P,F=w[b],T=1===e.encodeMode,M=new r(y*p),L=M;if(p<2||T){for(P=0;P<p;P++)if(p>1&&(L=new r(M.buffer,y*P,y),I=0),e.headerInfo.numValidPixel===g*d)for(c=0,u=0;u<d;u++)for(h=0;h<g;h++,c++){if(o=0,l=a=F<<x>>>32-C,32-x<C&&(l=a|=w[b+1]>>>64-x-C),v[l])o=v[l][1],x+=v[l][0];else for(l=a=F<<x>>>32-S,32-x<S&&(l=a|=w[b+1]>>>64-x-S),i=_,A=0;A<S;A++)if(!(i=a>>>S-A-1&1?i.right:i.left).left&&!i.right){o=i.val,x=x+A+1;break}x>=32&&(x-=32,F=w[++b]),s=o-E,T?(s+=h>0?I:u>0?L[c-g]:I,s&=255,L[c]=s,I=s):L[c]=s}else for(c=0,u=0;u<d;u++)for(h=0;h<g;h++,c++)if(B[c]){if(o=0,l=a=F<<x>>>32-C,32-x<C&&(l=a|=w[b+1]>>>64-x-C),v[l])o=v[l][1],x+=v[l][0];else for(l=a=F<<x>>>32-S,32-x<S&&(l=a|=w[b+1]>>>64-x-S),i=_,A=0;A<S;A++)if(!(i=a>>>S-A-1&1?i.right:i.left).left&&!i.right){o=i.val,x=x+A+1;break}x>=32&&(x-=32,F=w[++b]),s=o-E,T?(h>0&&B[c-1]?s+=I:u>0&&B[c-g]?s+=L[c-g]:s+=I,s&=255,L[c]=s,I=s):L[c]=s}}else for(c=0,u=0;u<d;u++)for(h=0;h<g;h++)if(c=u*g+h,!B||B[c])for(P=0;P<p;P++,c+=y){if(o=0,l=a=F<<x>>>32-C,32-x<C&&(l=a|=w[b+1]>>>64-x-C),v[l])o=v[l][1],x+=v[l][0];else for(l=a=F<<x>>>32-S,32-x<S&&(l=a|=w[b+1]>>>64-x-S),i=_,A=0;A<S;A++)if(!(i=a>>>S-A-1&1?i.right:i.left).left&&!i.right){o=i.val,x=x+A+1;break}x>=32&&(x-=32,F=w[++b]),s=o-E,L[c]=s}e.ptr=e.ptr+4*(b+1)+(x>0?4:0),e.pixels.resultPixels=M,p>1&&!n&&(e.pixels.resultPixels=f.swapDimensionOrder(M,y,p,r))},decodeBits:function(t,e,r,n,i){var o=e.headerInfo,s=o.fileVersion,f=0,p=t.byteLength-e.ptr>=5?5:t.byteLength-e.ptr,d=new DataView(t,e.ptr,p),g=d.getUint8(0);f++;var y=g>>6,m=0===y?4:3-y,v=(32&g)>0,_=31&g,w=0;if(1===m)w=d.getUint8(f),f++;else if(2===m)w=d.getUint16(f,!0),f+=2;else{if(4!==m)throw"Invalid valid pixel count type";w=d.getUint32(f,!0),f+=4}var b,x,C,S,E,B,I,P,F,T=2*o.maxZError,M=o.numDims>1?o.maxValues[i]:o.zMax;if(v){for(e.counter.lut++,P=d.getUint8(f),f++,S=Math.ceil((P-1)*_/8),E=Math.ceil(S/4),x=new ArrayBuffer(4*E),C=new Uint8Array(x),e.ptr+=f,C.set(new Uint8Array(t,e.ptr,S)),I=new Uint32Array(x),e.ptr+=S,F=0;P-1>>>F;)F++;S=Math.ceil(w*F/8),E=Math.ceil(S/4),x=new ArrayBuffer(4*E),(C=new Uint8Array(x)).set(new Uint8Array(t,e.ptr,S)),b=new Uint32Array(x),e.ptr+=S,B=s>=3?h(I,_,P-1,n,T,M):l(I,_,P-1,n,T,M),s>=3?u(b,r,F,w,B):a(b,r,F,w,B)}else e.counter.bitstuffer++,F=_,e.ptr+=f,F>0&&(S=Math.ceil(w*F/8),E=Math.ceil(S/4),x=new ArrayBuffer(4*E),(C=new Uint8Array(x)).set(new Uint8Array(t,e.ptr,S)),b=new Uint32Array(x),e.ptr+=S,s>=3?null==n?A(b,r,F,w):u(b,r,F,w,!1,n,T,M):null==n?c(b,r,F,w):a(b,r,F,w,!1,n,T,M))},readTiles:function(t,e,r,n){var i=e.headerInfo,o=i.width,s=i.height,a=o*s,l=i.microBlockSize,u=i.imageType,h=f.getDataTypeSize(u),c=Math.ceil(o/l),A=Math.ceil(s/l);e.pixels.numBlocksY=A,e.pixels.numBlocksX=c,e.pixels.ptr=0;var p,d,g,y,m,v,_,w,b,x,C=0,S=0,E=0,B=0,I=0,P=0,F=0,T=0,M=0,L=0,k=0,O=0,N=0,R=0,U=0,D=new r(l*l),Q=s%l||l,G=o%l||l,j=i.numDims,H=e.pixels.resultMask,z=e.pixels.resultPixels,V=i.fileVersion>=5?14:15,K=i.zMax;for(E=0;E<A;E++)for(I=E!==A-1?l:Q,B=0;B<c;B++)for(L=E*o*l+B*l,k=o-(P=B!==c-1?l:G),w=0;w<j;w++){if(j>1?(x=z,L=E*o*l+B*l,z=new r(e.pixels.resultPixels.buffer,a*w*h,a),K=i.maxValues[w]):x=null,F=t.byteLength-e.ptr,d={},U=0,T=(p=new DataView(t,e.ptr,Math.min(10,F))).getUint8(0),U++,b=i.fileVersion>=5?4&T:0,M=T>>6&255,(T>>2&V)!=(B*l>>3&V))throw"integrity issue";if(b&&0===w)throw"integrity issue";if((m=3&T)>3)throw e.ptr+=U,"Invalid block encoding ("+m+")";if(2!==m)if(0===m){if(b)throw"integrity issue";if(e.counter.uncompressed++,e.ptr+=U,O=(O=I*P*h)<(N=t.byteLength-e.ptr)?O:N,g=new ArrayBuffer(O%h==0?O:O+h-O%h),new Uint8Array(g).set(new Uint8Array(t,e.ptr,O)),y=new r(g),R=0,H)for(C=0;C<I;C++){for(S=0;S<P;S++)H[L]&&(z[L]=y[R++]),L++;L+=k}else for(C=0;C<I;C++){for(S=0;S<P;S++)z[L++]=y[R++];L+=k}e.ptr+=R*h}else if(v=f.getDataTypeUsed(b&&u<6?4:u,M),_=f.getOnePixel(d,U,v,p),U+=f.getDataTypeSize(v),3===m)if(e.ptr+=U,e.counter.constantoffset++,H)for(C=0;C<I;C++){for(S=0;S<P;S++)H[L]&&(z[L]=b?Math.min(K,x[L]+_):_),L++;L+=k}else for(C=0;C<I;C++){for(S=0;S<P;S++)z[L]=b?Math.min(K,x[L]+_):_,L++;L+=k}else if(e.ptr+=U,f.decodeBits(t,e,D,_,w),U=0,b)if(H)for(C=0;C<I;C++){for(S=0;S<P;S++)H[L]&&(z[L]=D[U++]+x[L]),L++;L+=k}else for(C=0;C<I;C++){for(S=0;S<P;S++)z[L]=D[U++]+x[L],L++;L+=k}else if(H)for(C=0;C<I;C++){for(S=0;S<P;S++)H[L]&&(z[L]=D[U++]),L++;L+=k}else for(C=0;C<I;C++){for(S=0;S<P;S++)z[L++]=D[U++];L+=k}else{if(b)if(H)for(C=0;C<I;C++)for(S=0;S<P;S++)H[L]&&(z[L]=x[L]),L++;else for(C=0;C<I;C++)for(S=0;S<P;S++)z[L]=x[L],L++;e.counter.constant++,e.ptr+=U}}j>1&&!n&&(e.pixels.resultPixels=f.swapDimensionOrder(e.pixels.resultPixels,a,j,r))},formatFileInfo:function(t){return{fileIdentifierString:t.headerInfo.fileIdentifierString,fileVersion:t.headerInfo.fileVersion,imageType:t.headerInfo.imageType,height:t.headerInfo.height,width:t.headerInfo.width,numValidPixel:t.headerInfo.numValidPixel,microBlockSize:t.headerInfo.microBlockSize,blobSize:t.headerInfo.blobSize,maxZError:t.headerInfo.maxZError,pixelType:f.getPixelType(t.headerInfo.imageType),eofOffset:t.eofOffset,mask:t.mask?{numBytes:t.mask.numBytes}:null,pixels:{numBlocksX:t.pixels.numBlocksX,numBlocksY:t.pixels.numBlocksY,maxValue:t.headerInfo.zMax,minValue:t.headerInfo.zMin,noDataValue:t.noDataValue}}},constructConstantSurface:function(t,e){var r=t.headerInfo.zMax,n=t.headerInfo.zMin,i=t.headerInfo.maxValues,o=t.headerInfo.numDims,s=t.headerInfo.height*t.headerInfo.width,a=0,l=0,u=0,h=t.pixels.resultMask,c=t.pixels.resultPixels;if(h)if(o>1){if(e)for(a=0;a<o;a++)for(u=a*s,r=i[a],l=0;l<s;l++)h[l]&&(c[u+l]=r);else for(l=0;l<s;l++)if(h[l])for(u=l*o,a=0;a<o;a++)c[u+o]=i[a]}else for(l=0;l<s;l++)h[l]&&(c[l]=r);else if(o>1&&n!==r)if(e)for(a=0;a<o;a++)for(u=a*s,r=i[a],l=0;l<s;l++)c[u+l]=r;else for(l=0;l<s;l++)for(u=l*o,a=0;a<o;a++)c[u+a]=i[a];else for(l=0;l<s*o;l++)c[l]=r},getDataTypeArray:function(t){var e;switch(t){case 0:e=Int8Array;break;case 1:e=Uint8Array;break;case 2:e=Int16Array;break;case 3:e=Uint16Array;break;case 4:e=Int32Array;break;case 5:e=Uint32Array;break;case 6:default:e=Float32Array;break;case 7:e=Float64Array}return e},getPixelType:function(t){var e;switch(t){case 0:e="S8";break;case 1:e="U8";break;case 2:e="S16";break;case 3:e="U16";break;case 4:e="S32";break;case 5:e="U32";break;case 6:default:e="F32";break;case 7:e="F64"}return e},isValidPixelValue:function(t,e){if(null==e)return!1;var r;switch(t){case 0:r=e>=-128&&e<=127;break;case 1:r=e>=0&&e<=255;break;case 2:r=e>=-32768&&e<=32767;break;case 3:r=e>=0&&e<=65536;break;case 4:r=e>=-2147483648&&e<=2147483647;break;case 5:r=e>=0&&e<=4294967296;break;case 6:r=e>=-34027999387901484e22&&e<=34027999387901484e22;break;case 7:r=e>=-17976931348623157e292&&e<=17976931348623157e292;break;default:r=!1}return r},getDataTypeSize:function(t){var e=0;switch(t){case 0:case 1:e=1;break;case 2:case 3:e=2;break;case 4:case 5:case 6:e=4;break;case 7:e=8;break;default:e=t}return e},getDataTypeUsed:function(t,e){var r=t;switch(t){case 2:case 4:r=t-e;break;case 3:case 5:r=t-2*e;break;case 6:r=0===e?t:1===e?2:1;break;case 7:r=0===e?t:t-2*e+1;break;default:r=t}return r},getOnePixel:function(t,e,r,n){var i=0;switch(r){case 0:i=n.getInt8(e);break;case 1:i=n.getUint8(e);break;case 2:i=n.getInt16(e,!0);break;case 3:i=n.getUint16(e,!0);break;case 4:i=n.getInt32(e,!0);break;case 5:i=n.getUInt32(e,!0);break;case 6:i=n.getFloat32(e,!0);break;case 7:i=n.getFloat64(e,!0);break;default:throw"the decoder does not understand this pixel type"}return i},swapDimensionOrder:function(t,e,r,n,i){var o=0,s=0,a=0,l=0,u=t;if(r>1)if(u=new n(e*r),i)for(o=0;o<e;o++)for(l=o,a=0;a<r;a++,l+=e)u[l]=t[s++];else for(o=0;o<e;o++)for(l=o,a=0;a<r;a++,l+=e)u[s++]=t[l];return u}},p=function(t,e,r){this.val=t,this.left=e,this.right=r},{decode:function(t,e){var r=(e=e||{}).noDataValue,n=0,i={};i.ptr=e.inputOffset||0,i.pixels={},f.readHeaderInfo(t,i);var o=i.headerInfo,s=o.fileVersion,a=f.getDataTypeArray(o.imageType);if(s>5)throw"unsupported lerc version 2."+s;f.readMask(t,i),o.numValidPixel===o.width*o.height||i.pixels.resultMask||(i.pixels.resultMask=e.maskData);var l=o.width*o.height;i.pixels.resultPixels=new a(l*o.numDims),i.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0};var u,h=!e.returnPixelInterleavedDims;if(0!==o.numValidPixel)if(o.zMax===o.zMin)f.constructConstantSurface(i,h);else if(s>=4&&f.checkMinMaxRanges(t,i))f.constructConstantSurface(i,h);else{var c=new DataView(t,i.ptr,2),A=c.getUint8(0);if(i.ptr++,A)f.readDataOneSweep(t,i,a,h);else if(s>1&&o.imageType<=1&&Math.abs(o.maxZError-.5)<1e-5){var p=c.getUint8(1);if(i.ptr++,i.encodeMode=p,p>2||s<4&&p>1)throw"Invalid Huffman flag "+p;p?f.readHuffman(t,i,a,h):f.readTiles(t,i,a,h)}else f.readTiles(t,i,a,h)}i.eofOffset=i.ptr,e.inputOffset?(u=i.headerInfo.blobSize+e.inputOffset-i.ptr,Math.abs(u)>=1&&(i.eofOffset=e.inputOffset+i.headerInfo.blobSize)):(u=i.headerInfo.blobSize-i.ptr,Math.abs(u)>=1&&(i.eofOffset=i.headerInfo.blobSize));var d={width:o.width,height:o.height,pixelData:i.pixels.resultPixels,minValue:o.zMin,maxValue:o.zMax,validPixelCount:o.numValidPixel,dimCount:o.numDims,dimStats:{minValues:o.minValues,maxValues:o.maxValues},maskData:i.pixels.resultMask};if(i.pixels.resultMask&&f.isValidPixelValue(o.imageType,r)){var g=i.pixels.resultMask;for(n=0;n<l;n++)g[n]||(d.pixelData[n]=r);d.noDataValue=r}return i.noDataValue=r,e.returnFileInfo&&(d.fileInfo=f.formatFileInfo(i)),d},getBandCount:function(t){for(var e=0,r=0,n={ptr:0,pixels:{}};r<t.byteLength-58;)f.readHeaderInfo(t,n),r+=n.headerInfo.blobSize,e++,n.ptr=r;return e}}),v=(d=new ArrayBuffer(4),g=new Uint8Array(d),new Uint32Array(d)[0]=1,1===g[0]),_={decode:function(t,e){if(!v)throw"Big endian system is not supported.";var r,n,i=(e=e||{}).inputOffset||0,o=new Uint8Array(t,i,10),s=String.fromCharCode.apply(null,o);if("CntZImage"===s.trim())r=y,n=1;else{if("Lerc2"!==s.substring(0,5))throw"Unexpected file identifier string: "+s;r=m,n=2}for(var a,l,u,h,c,A,f=0,p=t.byteLength-10,d=[],g={width:0,height:0,pixels:[],pixelType:e.pixelType,mask:null,statistics:[]},_=0;i<p;){var w=r.decode(t,{inputOffset:i,encodedMaskData:a,maskData:u,returnMask:0===f,returnEncodedMask:0===f,returnFileInfo:!0,returnPixelInterleavedDims:e.returnPixelInterleavedDims,pixelType:e.pixelType||null,noDataValue:e.noDataValue||null});i=w.fileInfo.eofOffset,u=w.maskData,0===f&&(a=w.encodedMaskData,g.width=w.width,g.height=w.height,g.dimCount=w.dimCount||1,g.pixelType=w.pixelType||w.fileInfo.pixelType,g.mask=u),n>1&&(u&&d.push(u),w.fileInfo.mask&&w.fileInfo.mask.numBytes>0&&_++),f++,g.pixels.push(w.pixelData),g.statistics.push({minValue:w.minValue,maxValue:w.maxValue,noDataValue:w.noDataValue,dimStats:w.dimStats})}if(n>1&&_>1){for(A=g.width*g.height,g.bandMasks=d,(u=new Uint8Array(A)).set(d[0]),h=1;h<d.length;h++)for(l=d[h],c=0;c<A;c++)u[c]=u[c]&l[c];g.maskData=u}return g}};t.exports?t.exports=_:this.Lerc=_}()}(pit);const dit=pit.exports,git=Object.freeze(Object.defineProperty({__proto__:null,default:class extends uet{constructor(t){super(),this.planarConfiguration=void 0!==t.PlanarConfiguration?t.PlanarConfiguration:1,this.samplesPerPixel=void 0!==t.SamplesPerPixel?t.SamplesPerPixel:1,this.addCompression=t.LercParameters[1]}decodeBlock(t){switch(this.addCompression){case 0:break;case 1:t=cit(new Uint8Array(t)).buffer;break;default:throw new Error(`Unsupported LERC additional compression method identifier: ${this.addCompression}`)}return dit.decode(t,{returnPixelInterleavedDims:1===this.planarConfiguration}).pixels[0].buffer}}},Symbol.toStringTag,{value:"Module"})),yit=Object.freeze(Object.defineProperty({__proto__:null,default:class extends uet{constructor(){if(super(),"undefined"==typeof createImageBitmap)throw new Error("Cannot decode WebImage as `createImageBitmap` is not available");if("undefined"==typeof document&&"undefined"==typeof OffscreenCanvas)throw new Error("Cannot decode WebImage as neither `document` nor `OffscreenCanvas` is not available")}async decode(t,e){const r=new Blob([e]),n=await createImageBitmap(r);let i;"undefined"!=typeof document?(i=document.createElement("canvas"),i.width=n.width,i.height=n.height):i=new OffscreenCanvas(n.width,n.height);const o=i.getContext("2d");return o.drawImage(n,0,0),o.getImageData(0,0,n.width,n.height).data.buffer}}},Symbol.toStringTag,{value:"Module"}));var mit=Worker;const vit=Object.freeze(Object.defineProperty({__proto__:null,create:function(){const t='function e(e,t,r,n,i,a,o){try{var s=e[a](o),f=s.value}catch(e){return void r(e)}s.done?t(f):Promise.resolve(f).then(n,i)}function t(t){return function(){var r=this,n=arguments;return new Promise((function(i,a){var o=t.apply(r,n);function s(t){e(o,i,a,s,f,"next",t)}function f(t){e(o,i,a,s,f,"throw",t)}s(void 0)}))}}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var n={exports:{}};!function(e){var t=function(e){var t,n=Object.prototype,i=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",f=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var i=t&&t.prototype instanceof y?t:y,a=Object.create(i.prototype),o=new T(n||[]);return a._invoke=function(e,t,r){var n=h;return function(i,a){if(n===p)throw new Error("Generator is already running");if(n===m){if("throw"===i)throw a;return E()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=I(o,r);if(s){if(s===v)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var f=c(e,t,r);if("normal"===f.type){if(n=r.done?m:d,f.arg===v)continue;return{value:f.arg,done:r.done}}"throw"===f.type&&(n=m,r.method="throw",r.arg=f.arg)}}}(e,r,o),a}function c(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var h="suspendedStart",d="suspendedYield",p="executing",m="completed",v={};function y(){}function w(){}function g(){}var b={};l(b,o,(function(){return this}));var k=Object.getPrototypeOf,x=k&&k(k(D([])));x&&x!==n&&i.call(x,o)&&(b=x);var _=g.prototype=y.prototype=Object.create(b);function A(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(a,o,s,f){var l=c(e[a],e,o);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"===r(h)&&i.call(h,"__await")?t.resolve(h.__await).then((function(e){n("next",e,s,f)}),(function(e){n("throw",e,s,f)})):t.resolve(h).then((function(e){u.value=e,s(u)}),(function(e){return n("throw",e,s,f)}))}f(l.arg)}var a;this._invoke=function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return a=a?a.then(i,i):i()}}function I(e,r){var n=e.iterator[r.method];if(n===t){if(r.delegate=null,"throw"===r.method){if(e.iterator.return&&(r.method="return",r.arg=t,I(e,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a \'throw\' method")}return v}var i=c(n,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function U(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(U,this),this.reset(!0)}function D(e){if(e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,a=function r(){for(;++n<e.length;)if(i.call(e,n))return r.value=e[n],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}return{next:E}}function E(){return{value:t,done:!0}}return w.prototype=g,l(_,"constructor",g),l(g,"constructor",w),w.displayName=l(g,f,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===w||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,f,"GeneratorFunction")),e.prototype=Object.create(_),e},e.awrap=function(e){return{__await:e}},A(P.prototype),l(P.prototype,s,(function(){return this})),e.AsyncIterator=P,e.async=function(t,r,n,i,a){void 0===a&&(a=Promise);var o=new P(u(t,r,n,i),a);return e.isGeneratorFunction(r)?o:o.next().then((function(e){return e.done?e.value:o.next()}))},A(_),l(_,f,"Generator"),l(_,o,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=D,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(S),!e)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(n,i){return s.type="throw",s.arg=e,r.next=n,i&&(r.method="next",r.arg=t),!!i}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var f=i.call(o,"catchLoc"),l=i.call(o,"finallyLoc");if(f&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(f){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=e,o.arg=t,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;S(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:D(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"===("undefined"==typeof globalThis?"undefined":r(globalThis))?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}(n);var i=n.exports,a=new Map;function o(e,t){Array.isArray(e)||(e=[e]),e.forEach((function(e){return a.set(e,t)}))}function s(e){return f.apply(this,arguments)}function f(){return(f=t(i.mark((function e(t){var r,n;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=a.get(t.Compression)){e.next=3;break}throw new Error("Unknown compression method identifier: ".concat(t.Compression));case 3:return e.next=5,r();case 5:return n=e.sent,e.abrupt("return",new n(t));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}o([void 0,1],(function(){return Promise.resolve().then((function(){return _})).then((function(e){return e.default}))})),o(5,(function(){return Promise.resolve().then((function(){return S})).then((function(e){return e.default}))})),o(6,(function(){throw new Error("old style JPEG compression is not supported.")})),o(7,(function(){return Promise.resolve().then((function(){return L})).then((function(e){return e.default}))})),o([8,32946],(function(){return Promise.resolve().then((function(){return Ne})).then((function(e){return e.default}))})),o(32773,(function(){return Promise.resolve().then((function(){return Ye})).then((function(e){return e.default}))})),o(34887,(function(){return Promise.resolve().then((function(){return ut})).then((function(e){return e.default}))})),o(50001,(function(){return Promise.resolve().then((function(){return dt})).then((function(e){return e.default}))}));var l=globalThis;function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&c(e.prototype,t),r&&c(e,r),e}function d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(e,t)}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}function m(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");return e}(e)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function y(e,t){var r=e.length-t,n=0;do{for(var i=t;i>0;i--)e[n+t]+=e[n],n++;r-=t}while(r>0)}function w(e,t,r){for(var n=0,i=e.length,a=i/r;i>t;){for(var o=t;o>0;--o)e[n+t]+=e[n],++n;i-=t}for(var s=e.slice(),f=0;f<a;++f)for(var l=0;l<r;++l)e[r*f+l]=s[(r-l-1)*a+f]}function g(e,t,r,n,i,a){if(!t||1===t)return e;for(var o=0;o<i.length;++o){if(i[o]%8!=0)throw new Error("When decoding with predictor, only multiple of 8 bits are supported.");if(i[o]!==i[0])throw new Error("When decoding with predictor, all samples must have the same size.")}for(var s=i[0]/8,f=2===a?1:i.length,l=0;l<n&&!(l*f*r*s>=e.byteLength);++l){var u=void 0;if(2===t){switch(i[0]){case 8:u=new Uint8Array(e,l*f*r*s,f*r*s);break;case 16:u=new Uint16Array(e,l*f*r*s,f*r*s/2);break;case 32:u=new Uint32Array(e,l*f*r*s,f*r*s/4);break;default:throw new Error("Predictor 2 not allowed with ".concat(i[0]," bits per sample."))}y(u,f)}else 3===t&&w(u=new Uint8Array(e,l*f*r*s,f*r*s),f,s)}return e}l.addEventListener("message",function(){var e=t(i.mark((function e(t){var r,n,a,o,f,u;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.data,n=r.id,a=r.fileDirectory,o=r.buffer,e.next=3,s(a);case 3:return f=e.sent,e.next=6,f.decode(a,o);case 6:u=e.sent,l.postMessage({decoded:u,id:n},[u]);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());var b=function(){function e(){u(this,e)}var r;return h(e,[{key:"decode",value:(r=t(i.mark((function e(t,r){var n,a,o,s,f;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.decodeBlock(r);case 2:if(n=e.sent,1===(a=t.Predictor||1)){e.next=9;break}return o=!t.StripOffsets,s=o?t.TileWidth:t.ImageWidth,f=o?t.TileLength:t.RowsPerStrip||t.ImageLength,e.abrupt("return",g(n,a,s,f,t.BitsPerSample,t.PlanarConfiguration));case 9:return e.abrupt("return",n);case 10:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})}]),e}();function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=v(e);if(t){var i=v(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return m(this,r)}}var x=function(e){p(r,b);var t=k(r);function r(){return u(this,r),t.apply(this,arguments)}return h(r,[{key:"decodeBlock",value:function(e){return e}}]),r}(),_=Object.freeze({__proto__:null,default:x});function A(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=v(e);if(t){var i=v(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return m(this,r)}}function P(e,t){for(var r=t.length-1;r>=0;r--)e.push(t[r]);return e}function I(e){for(var t=new Uint16Array(4093),r=new Uint8Array(4093),n=0;n<=257;n++)t[n]=4096,r[n]=n;var i=258,a=9,o=0;function s(){i=258,a=9}function f(e){var t=function(e,t,r){var n=t%8,i=Math.floor(t/8),a=8-n,o=t+r-8*(i+1),s=8*(i+2)-(t+r),f=8*(i+2)-t;if(s=Math.max(0,s),i>=e.length)return console.warn("ran off the end of the buffer before finding EOI_CODE (end on input code)"),257;var l=e[i]&Math.pow(2,8-n)-1,u=l<<=r-a;if(i+1<e.length){var c=e[i+1]>>>s;u+=c<<=Math.max(0,r-f)}if(o>8&&i+2<e.length){var h=8*(i+3)-(t+r);u+=e[i+2]>>>h}return u}(e,o,a);return o+=a,t}function l(e,n){return r[i]=n,t[i]=e,++i-1}function u(e){for(var n=[],i=e;4096!==i;i=t[i])n.push(r[i]);return n}var c=[];s();for(var h,d=new Uint8Array(e),p=f(d);257!==p;){if(256===p){for(s(),p=f(d);256===p;)p=f(d);if(257===p)break;if(p>256)throw new Error("corrupted code at scanline ".concat(p));P(c,u(p)),h=p}else if(p<i){var m=u(p);P(c,m),l(h,m[m.length-1]),h=p}else{var v=u(h);if(!v)throw new Error("Bogus entry. Not in dictionary, ".concat(h," / ").concat(i,", position: ").concat(o));P(c,v),c.push(v[v.length-1]),l(h,v[v.length-1]),h=p}i+1>=Math.pow(2,a)&&(12===a?h=void 0:a++),p=f(d)}return new Uint8Array(c)}var U=function(e){p(r,b);var t=A(r);function r(){return u(this,r),t.apply(this,arguments)}return h(r,[{key:"decodeBlock",value:function(e){return I(e).buffer}}]),r}(),S=Object.freeze({__proto__:null,default:U});function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=v(e);if(t){var i=v(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return m(this,r)}}var D=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]);function E(e,t){for(var r=0,n=[],i=16;i>0&&!e[i-1];)--i;n.push({children:[],index:0});for(var a,o=n[0],s=0;s<i;s++){for(var f=0;f<e[s];f++){for((o=n.pop()).children[o.index]=t[r];o.index>0;)o=n.pop();for(o.index++,n.push(o);n.length<=s;)n.push(a={children:[],index:0}),o.children[o.index]=a.children,o=a;r++}s+1<i&&(n.push(a={children:[],index:0}),o.children[o.index]=a.children,o=a)}return n[0].children}function B(e,t,n,i,a,o,s,f,l){var u=n.mcusPerLine,c=n.progressive,h=t,d=t,p=0,m=0;function v(){if(m>0)return m--,p>>m&1;if(255===(p=e[d++])){var t=e[d++];if(t)throw new Error("unexpected marker: ".concat((p<<8|t).toString(16)))}return m=7,p>>>7}function y(e){for(var t,n=e;null!==(t=v());){if("number"==typeof(n=n[t]))return n;if("object"!==r(n))throw new Error("invalid huffman sequence")}return null}function w(e){for(var t=e,r=0;t>0;){var n=v();if(null===n)return;r=r<<1|n,--t}return r}function g(e){var t=w(e);return t>=1<<e-1?t:t+(-1<<e)+1}var b=0;var k,x=0;function _(e,t,r,n,i){var a=r%u,o=(r/u|0)*e.v+n,s=a*e.h+i;t(e,e.blocks[o][s])}function A(e,t,r){var n=r/e.blocksPerLine|0,i=r%e.blocksPerLine;t(e,e.blocks[n][i])}var P,I,U,S,T,E,B=i.length;E=c?0===o?0===f?function(e,t){var r=y(e.huffmanTableDC),n=0===r?0:g(r)<<l;e.pred+=n,t[0]=e.pred}:function(e,t){t[0]|=v()<<l}:0===f?function(e,t){if(b>0)b--;else for(var r=o,n=s;r<=n;){var i=y(e.huffmanTableAC),a=15&i,f=i>>4;if(0===a){if(f<15){b=w(f)+(1<<f)-1;break}r+=16}else t[D[r+=f]]=g(a)*(1<<l),r++}}:function(e,t){for(var r=o,n=s,i=0;r<=n;){var a=D[r],f=t[a]<0?-1:1;switch(x){case 0:var u=y(e.huffmanTableAC),c=15&u;if(i=u>>4,0===c)i<15?(b=w(i)+(1<<i),x=4):(i=16,x=1);else{if(1!==c)throw new Error("invalid ACn encoding");k=g(c),x=i?2:3}continue;case 1:case 2:t[a]?t[a]+=(v()<<l)*f:0==--i&&(x=2===x?3:0);break;case 3:t[a]?t[a]+=(v()<<l)*f:(t[a]=k<<l,x=0);break;case 4:t[a]&&(t[a]+=(v()<<l)*f)}r++}4===x&&0==--b&&(x=0)}:function(e,t){var r=y(e.huffmanTableDC),n=0===r?0:g(r);e.pred+=n,t[0]=e.pred;for(var i=1;i<64;){var a=y(e.huffmanTableAC),o=15&a,s=a>>4;if(0===o){if(s<15)break;i+=16}else t[D[i+=s]]=g(o),i++}};var O,M,C=0;M=1===B?i[0].blocksPerLine*i[0].blocksPerColumn:u*n.mcusPerColumn;for(var L=a||M;C<M;){for(I=0;I<B;I++)i[I].pred=0;if(b=0,1===B)for(P=i[0],T=0;T<L;T++)A(P,E,C),C++;else for(T=0;T<L;T++){for(I=0;I<B;I++){var R=P=i[I],V=R.h,G=R.v;for(U=0;U<G;U++)for(S=0;S<V;S++)_(P,E,C,U,S)}if(++C===M)break}if(m=0,(O=e[d]<<8|e[d+1])<65280)throw new Error("marker was not found");if(!(O>=65488&&O<=65495))break;d+=2}return d-h}function O(e,t){var r=[],n=t.blocksPerLine,i=t.blocksPerColumn,a=n<<3,o=new Int32Array(64),s=new Uint8Array(64);function f(e,r,n){var i,a,o,s,f,l,u,c,h,d,p=t.quantizationTable,m=n;for(d=0;d<64;d++)m[d]=e[d]*p[d];for(d=0;d<8;++d){var v=8*d;0!==m[1+v]||0!==m[2+v]||0!==m[3+v]||0!==m[4+v]||0!==m[5+v]||0!==m[6+v]||0!==m[7+v]?(i=5793*m[0+v]+128>>8,a=5793*m[4+v]+128>>8,o=m[2+v],s=m[6+v],f=2896*(m[1+v]-m[7+v])+128>>8,c=2896*(m[1+v]+m[7+v])+128>>8,l=m[3+v]<<4,h=i-a+1>>1,i=i+a+1>>1,a=h,h=3784*o+1567*s+128>>8,o=1567*o-3784*s+128>>8,s=h,h=f-(u=m[5+v]<<4)+1>>1,f=f+u+1>>1,u=h,h=c+l+1>>1,l=c-l+1>>1,c=h,h=i-s+1>>1,i=i+s+1>>1,s=h,h=a-o+1>>1,a=a+o+1>>1,o=h,h=2276*f+3406*c+2048>>12,f=3406*f-2276*c+2048>>12,c=h,h=799*l+4017*u+2048>>12,l=4017*l-799*u+2048>>12,u=h,m[0+v]=i+c,m[7+v]=i-c,m[1+v]=a+u,m[6+v]=a-u,m[2+v]=o+l,m[5+v]=o-l,m[3+v]=s+f,m[4+v]=s-f):(h=5793*m[0+v]+512>>10,m[0+v]=h,m[1+v]=h,m[2+v]=h,m[3+v]=h,m[4+v]=h,m[5+v]=h,m[6+v]=h,m[7+v]=h)}for(d=0;d<8;++d){var y=d;0!==m[8+y]||0!==m[16+y]||0!==m[24+y]||0!==m[32+y]||0!==m[40+y]||0!==m[48+y]||0!==m[56+y]?(i=5793*m[0+y]+2048>>12,a=5793*m[32+y]+2048>>12,o=m[16+y],s=m[48+y],f=2896*(m[8+y]-m[56+y])+2048>>12,c=2896*(m[8+y]+m[56+y])+2048>>12,l=m[24+y],h=i-a+1>>1,i=i+a+1>>1,a=h,h=3784*o+1567*s+2048>>12,o=1567*o-3784*s+2048>>12,s=h,h=f-(u=m[40+y])+1>>1,f=f+u+1>>1,u=h,h=c+l+1>>1,l=c-l+1>>1,c=h,h=i-s+1>>1,i=i+s+1>>1,s=h,h=a-o+1>>1,a=a+o+1>>1,o=h,h=2276*f+3406*c+2048>>12,f=3406*f-2276*c+2048>>12,c=h,h=799*l+4017*u+2048>>12,l=4017*l-799*u+2048>>12,u=h,m[0+y]=i+c,m[56+y]=i-c,m[8+y]=a+u,m[48+y]=a-u,m[16+y]=o+l,m[40+y]=o-l,m[24+y]=s+f,m[32+y]=s-f):(h=5793*n[d+0]+8192>>14,m[0+y]=h,m[8+y]=h,m[16+y]=h,m[24+y]=h,m[32+y]=h,m[40+y]=h,m[48+y]=h,m[56+y]=h)}for(d=0;d<64;++d){var w=128+(m[d]+8>>4);r[d]=w<0?0:w>255?255:w}}for(var l=0;l<i;l++){for(var u=l<<3,c=0;c<8;c++)r.push(new Uint8Array(a));for(var h=0;h<n;h++){f(t.blocks[l][h],s,o);for(var d=0,p=h<<3,m=0;m<8;m++)for(var v=r[u+m],y=0;y<8;y++)v[p+y]=s[d++]}}return r}var M=function(){function e(){u(this,e),this.jfif=null,this.adobe=null,this.quantizationTables=[],this.huffmanTablesAC=[],this.huffmanTablesDC=[],this.resetFrames()}return h(e,[{key:"resetFrames",value:function(){this.frames=[]}},{key:"parse",value:function(e){var t=0;function r(){var r=e[t]<<8|e[t+1];return t+=2,r}function n(e){var t,r,n=0,i=0;for(r in e.components)e.components.hasOwnProperty(r)&&(n<(t=e.components[r]).h&&(n=t.h),i<t.v&&(i=t.v));var a=Math.ceil(e.samplesPerLine/8/n),o=Math.ceil(e.scanLines/8/i);for(r in e.components)if(e.components.hasOwnProperty(r)){t=e.components[r];for(var s=Math.ceil(Math.ceil(e.samplesPerLine/8)*t.h/n),f=Math.ceil(Math.ceil(e.scanLines/8)*t.v/i),l=a*t.h,u=o*t.v,c=[],h=0;h<u;h++){for(var d=[],p=0;p<l;p++)d.push(new Int32Array(64));c.push(d)}t.blocksPerLine=s,t.blocksPerColumn=f,t.blocks=c}e.maxH=n,e.maxV=i,e.mcusPerLine=a,e.mcusPerColumn=o}var i,a,o=r();if(65496!==o)throw new Error("SOI not found");for(o=r();65497!==o;){switch(o){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var s=(i=void 0,a=void 0,i=r(),a=e.subarray(t,t+i-2),t+=a.length,a);65504===o&&74===s[0]&&70===s[1]&&73===s[2]&&70===s[3]&&0===s[4]&&(this.jfif={version:{major:s[5],minor:s[6]},densityUnits:s[7],xDensity:s[8]<<8|s[9],yDensity:s[10]<<8|s[11],thumbWidth:s[12],thumbHeight:s[13],thumbData:s.subarray(14,14+3*s[12]*s[13])}),65518===o&&65===s[0]&&100===s[1]&&111===s[2]&&98===s[3]&&101===s[4]&&0===s[5]&&(this.adobe={version:s[6],flags0:s[7]<<8|s[8],flags1:s[9]<<8|s[10],transformCode:s[11]});break;case 65499:for(var f=r()+t-2;t<f;){var l=e[t++],u=new Int32Array(64);if(l>>4==0)for(var c=0;c<64;c++){u[D[c]]=e[t++]}else{if(l>>4!=1)throw new Error("DQT: invalid table spec");for(var h=0;h<64;h++){u[D[h]]=r()}}this.quantizationTables[15&l]=u}break;case 65472:case 65473:case 65474:r();for(var d={extended:65473===o,progressive:65474===o,precision:e[t++],scanLines:r(),samplesPerLine:r(),components:{},componentsOrder:[]},p=e[t++],m=void 0,v=0;v<p;v++){m=e[t];var y=e[t+1]>>4,w=15&e[t+1],g=e[t+2];d.componentsOrder.push(m),d.components[m]={h:y,v:w,quantizationIdx:g},t+=3}n(d),this.frames.push(d);break;case 65476:for(var b=r(),k=2;k<b;){for(var x=e[t++],_=new Uint8Array(16),A=0,P=0;P<16;P++,t++)_[P]=e[t],A+=_[P];for(var I=new Uint8Array(A),U=0;U<A;U++,t++)I[U]=e[t];k+=17+A,x>>4==0?this.huffmanTablesDC[15&x]=E(_,I):this.huffmanTablesAC[15&x]=E(_,I)}break;case 65501:r(),this.resetInterval=r();break;case 65498:r();for(var S=e[t++],T=[],O=this.frames[0],M=0;M<S;M++){var C=O.components[e[t++]],L=e[t++];C.huffmanTableDC=this.huffmanTablesDC[L>>4],C.huffmanTableAC=this.huffmanTablesAC[15&L],T.push(C)}var R=e[t++],V=e[t++],G=e[t++],F=B(e,t,O,T,this.resetInterval,R,V,G>>4,15&G);t+=F;break;case 65535:255!==e[t]&&t--;break;default:if(255===e[t-3]&&e[t-2]>=192&&e[t-2]<=254){t-=3;break}throw new Error("unknown JPEG marker ".concat(o.toString(16)))}o=r()}}},{key:"getResult",value:function(){var e=this.frames;if(0===this.frames.length)throw new Error("no frames were decoded");this.frames.length>1&&console.warn("more than one frame is not supported");for(var t=0;t<this.frames.length;t++)for(var r=this.frames[t].components,n=0,i=Object.keys(r);n<i.length;n++){var a=i[n];r[a].quantizationTable=this.quantizationTables[r[a].quantizationIdx],delete r[a].quantizationIdx}for(var o=e[0],s=o.components,f=o.componentsOrder,l=[],u=o.samplesPerLine,c=o.scanLines,h=0;h<f.length;h++){var d=s[f[h]];l.push({lines:O(0,d),scaleX:d.h/o.maxH,scaleY:d.v/o.maxV})}for(var p=new Uint8Array(u*c*l.length),m=0,v=0;v<c;++v)for(var y=0;y<u;++y)for(var w=0;w<l.length;++w){var g=l[w];p[m]=g.lines[0|v*g.scaleY][0|y*g.scaleX],++m}return p}}]),e}(),C=function(e){p(r,b);var t=T(r);function r(e){var n;return u(this,r),(n=t.call(this)).reader=new M,e.JPEGTables&&n.reader.parse(e.JPEGTables),n}return h(r,[{key:"decodeBlock",value:function(e){return this.reader.resetFrames(),this.reader.parse(new Uint8Array(e)),this.reader.getResult().buffer}}]),r}(),L=Object.freeze({__proto__:null,default:C});function R(e){for(var t=e.length;--t>=0;)e[t]=0}R(new Array(576)),R(new Array(60)),R(new Array(512)),R(new Array(256)),R(new Array(29)),R(new Array(30));var V=function(e,t,r,n){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;0!==r;){r-=o=r>2e3?2e3:r;do{a=a+(i=i+t[n++]|0)|0}while(--o);i%=65521,a%=65521}return i|a<<16|0},G=new Uint32Array(function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}()),F=function(e,t,r,n){var i=G,a=n+r;e^=-1;for(var o=n;o<a;o++)e=e>>>8^i[255&(e^t[o])];return-1^e},z={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},j={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},N=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Z=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!==r(n))throw new TypeError(n+"must be non-object");for(var i in n)N(n,i)&&(e[i]=n[i])}}return e},K=function(e){for(var t=0,r=0,n=e.length;r<n;r++)t+=e[r].length;for(var i=new Uint8Array(t),a=0,o=0,s=e.length;a<s;a++){var f=e[a];i.set(f,o),o+=f.length}return i},H=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){H=!1}for(var Y=new Uint8Array(256),X=0;X<256;X++)Y[X]=X>=252?6:X>=248?5:X>=240?4:X>=224?3:X>=192?2:1;Y[254]=Y[254]=1;var W=function(e){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);var t,r,n,i,a,o=e.length,s=0;for(i=0;i<o;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<o&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),s+=r<128?1:r<2048?2:r<65536?3:4;for(t=new Uint8Array(s),a=0,i=0;a<s;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<o&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),r<128?t[a++]=r:r<2048?(t[a++]=192|r>>>6,t[a++]=128|63&r):r<65536?(t[a++]=224|r>>>12,t[a++]=128|r>>>6&63,t[a++]=128|63&r):(t[a++]=240|r>>>18,t[a++]=128|r>>>12&63,t[a++]=128|r>>>6&63,t[a++]=128|63&r);return t},q=function(e,t){var r,n,i=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));var a=new Array(2*i);for(n=0,r=0;r<i;){var o=e[r++];if(o<128)a[n++]=o;else{var s=Y[o];if(s>4)a[n++]=65533,r+=s-1;else{for(o&=2===s?31:3===s?15:7;s>1&&r<i;)o=o<<6|63&e[r++],s--;s>1?a[n++]=65533:o<65536?a[n++]=o:(o-=65536,a[n++]=55296|o>>10&1023,a[n++]=56320|1023&o)}}}return function(e,t){if(t<65534&&e.subarray&&H)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}(a,n)},J=function(e,t){(t=t||e.length)>e.length&&(t=e.length);for(var r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+Y[e[r]]>t?r:t};var Q=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},$=function(e,t){var r,n,i,a,o,s,f,l,u,c,h,d,p,m,v,y,w,g,b,k,x,_,A,P,I=e.state;r=e.next_in,A=e.input,n=r+(e.avail_in-5),i=e.next_out,P=e.output,a=i-(t-e.avail_out),o=i+(e.avail_out-257),s=I.dmax,f=I.wsize,l=I.whave,u=I.wnext,c=I.window,h=I.hold,d=I.bits,p=I.lencode,m=I.distcode,v=(1<<I.lenbits)-1,y=(1<<I.distbits)-1;e:do{d<15&&(h+=A[r++]<<d,d+=8,h+=A[r++]<<d,d+=8),w=p[h&v];t:for(;;){if(h>>>=g=w>>>24,d-=g,0===(g=w>>>16&255))P[i++]=65535&w;else{if(!(16&g)){if(0==(64&g)){w=p[(65535&w)+(h&(1<<g)-1)];continue t}if(32&g){I.mode=12;break e}e.msg="invalid literal/length code",I.mode=30;break e}b=65535&w,(g&=15)&&(d<g&&(h+=A[r++]<<d,d+=8),b+=h&(1<<g)-1,h>>>=g,d-=g),d<15&&(h+=A[r++]<<d,d+=8,h+=A[r++]<<d,d+=8),w=m[h&y];r:for(;;){if(h>>>=g=w>>>24,d-=g,!(16&(g=w>>>16&255))){if(0==(64&g)){w=m[(65535&w)+(h&(1<<g)-1)];continue r}e.msg="invalid distance code",I.mode=30;break e}if(k=65535&w,d<(g&=15)&&(h+=A[r++]<<d,(d+=8)<g&&(h+=A[r++]<<d,d+=8)),(k+=h&(1<<g)-1)>s){e.msg="invalid distance too far back",I.mode=30;break e}if(h>>>=g,d-=g,k>(g=i-a)){if((g=k-g)>l&&I.sane){e.msg="invalid distance too far back",I.mode=30;break e}if(x=0,_=c,0===u){if(x+=f-g,g<b){b-=g;do{P[i++]=c[x++]}while(--g);x=i-k,_=P}}else if(u<g){if(x+=f+u-g,(g-=u)<b){b-=g;do{P[i++]=c[x++]}while(--g);if(x=0,u<b){b-=g=u;do{P[i++]=c[x++]}while(--g);x=i-k,_=P}}}else if(x+=u-g,g<b){b-=g;do{P[i++]=c[x++]}while(--g);x=i-k,_=P}for(;b>2;)P[i++]=_[x++],P[i++]=_[x++],P[i++]=_[x++],b-=3;b&&(P[i++]=_[x++],b>1&&(P[i++]=_[x++]))}else{x=i-k;do{P[i++]=P[x++],P[i++]=P[x++],P[i++]=P[x++],b-=3}while(b>2);b&&(P[i++]=P[x++],b>1&&(P[i++]=P[x++]))}break}}break}}while(r<n&&i<o);r-=b=d>>3,h&=(1<<(d-=b<<3))-1,e.next_in=r,e.next_out=i,e.avail_in=r<n?n-r+5:5-(r-n),e.avail_out=i<o?o-i+257:257-(i-o),I.hold=h,I.bits=d},ee=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),te=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),re=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),ne=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),ie=function(e,t,r,n,i,a,o,s){var f,l,u,c,h,d,p,m,v,y=s.bits,w=0,g=0,b=0,k=0,x=0,_=0,A=0,P=0,I=0,U=0,S=null,T=0,D=new Uint16Array(16),E=new Uint16Array(16),B=null,O=0;for(w=0;w<=15;w++)D[w]=0;for(g=0;g<n;g++)D[t[r+g]]++;for(x=y,k=15;k>=1&&0===D[k];k--);if(x>k&&(x=k),0===k)return i[a++]=20971520,i[a++]=20971520,s.bits=1,0;for(b=1;b<k&&0===D[b];b++);for(x<b&&(x=b),P=1,w=1;w<=15;w++)if(P<<=1,(P-=D[w])<0)return-1;if(P>0&&(0===e||1!==k))return-1;for(E[1]=0,w=1;w<15;w++)E[w+1]=E[w]+D[w];for(g=0;g<n;g++)0!==t[r+g]&&(o[E[t[r+g]]++]=g);if(0===e?(S=B=o,d=19):1===e?(S=ee,T-=257,B=te,O-=257,d=256):(S=re,B=ne,d=-1),U=0,g=0,w=b,h=a,_=x,A=0,u=-1,c=(I=1<<x)-1,1===e&&I>852||2===e&&I>592)return 1;for(;;){p=w-A,o[g]<d?(m=0,v=o[g]):o[g]>d?(m=B[O+o[g]],v=S[T+o[g]]):(m=96,v=0),f=1<<w-A,b=l=1<<_;do{i[h+(U>>A)+(l-=f)]=p<<24|m<<16|v|0}while(0!==l);for(f=1<<w-1;U&f;)f>>=1;if(0!==f?(U&=f-1,U+=f):U=0,g++,0==--D[w]){if(w===k)break;w=t[r+o[g]]}if(w>x&&(U&c)!==u){for(0===A&&(A=x),h+=b,P=1<<(_=w-A);_+A<k&&!((P-=D[_+A])<=0);)_++,P<<=1;if(I+=1<<_,1===e&&I>852||2===e&&I>592)return 1;i[u=U&c]=x<<24|_<<16|h-a|0}}return 0!==U&&(i[h+U]=w-A<<24|64<<16|0),s.bits=x,0},ae=j.Z_FINISH,oe=j.Z_BLOCK,se=j.Z_TREES,fe=j.Z_OK,le=j.Z_STREAM_END,ue=j.Z_NEED_DICT,ce=j.Z_STREAM_ERROR,he=j.Z_DATA_ERROR,de=j.Z_MEM_ERROR,pe=j.Z_BUF_ERROR,me=j.Z_DEFLATED,ve=function(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)};function ye(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var we,ge,be=function(e){if(!e||!e.state)return ce;var t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,fe},ke=function(e){if(!e||!e.state)return ce;var t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,be(e)},xe=function(e,t){var r;if(!e||!e.state)return ce;var n=e.state;return t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?ce:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,ke(e))},_e=function(e,t){if(!e)return ce;var r=new ye;e.state=r,r.window=null;var n=xe(e,t);return n!==fe&&(e.state=null),n},Ae=!0,Pe=function(e){if(Ae){we=new Int32Array(512),ge=new Int32Array(32);for(var t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(ie(1,e.lens,0,288,we,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;ie(2,e.lens,0,32,ge,0,e.work,{bits:5}),Ae=!1}e.lencode=we,e.lenbits=9,e.distcode=ge,e.distbits=5},Ie=function(e,t,r,n){var i,a=e.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),n>=a.wsize?(a.window.set(t.subarray(r-a.wsize,r),0),a.wnext=0,a.whave=a.wsize):((i=a.wsize-a.wnext)>n&&(i=n),a.window.set(t.subarray(r-n,r-n+i),a.wnext),(n-=i)?(a.window.set(t.subarray(r-n,r),0),a.wnext=n,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0},Ue={inflateReset:ke,inflateReset2:xe,inflateResetKeep:be,inflateInit:function(e){return _e(e,15)},inflateInit2:_e,inflate:function(e,t){var r,n,i,a,o,s,f,l,u,c,h,d,p,m,v,y,w,g,b,k,x,_,A,P,I=0,U=new Uint8Array(4),S=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return ce;12===(r=e.state).mode&&(r.mode=13),o=e.next_out,i=e.output,f=e.avail_out,a=e.next_in,n=e.input,s=e.avail_in,l=r.hold,u=r.bits,c=s,h=f,_=fe;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;u<16;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}if(2&r.wrap&&35615===l){r.check=0,U[0]=255&l,U[1]=l>>>8&255,r.check=F(r.check,U,2,0),l=0,u=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",r.mode=30;break}if((15&l)!==me){e.msg="unknown compression method",r.mode=30;break}if(u-=4,x=8+(15&(l>>>=4)),0===r.wbits)r.wbits=x;else if(x>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<r.wbits,e.adler=r.check=1,r.mode=512&l?10:12,l=0,u=0;break;case 2:for(;u<16;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}if(r.flags=l,(255&r.flags)!==me){e.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=l>>8&1),512&r.flags&&(U[0]=255&l,U[1]=l>>>8&255,r.check=F(r.check,U,2,0)),l=0,u=0,r.mode=3;case 3:for(;u<32;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}r.head&&(r.head.time=l),512&r.flags&&(U[0]=255&l,U[1]=l>>>8&255,U[2]=l>>>16&255,U[3]=l>>>24&255,r.check=F(r.check,U,4,0)),l=0,u=0,r.mode=4;case 4:for(;u<16;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}r.head&&(r.head.xflags=255&l,r.head.os=l>>8),512&r.flags&&(U[0]=255&l,U[1]=l>>>8&255,r.check=F(r.check,U,2,0)),l=0,u=0,r.mode=5;case 5:if(1024&r.flags){for(;u<16;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}r.length=l,r.head&&(r.head.extra_len=l),512&r.flags&&(U[0]=255&l,U[1]=l>>>8&255,r.check=F(r.check,U,2,0)),l=0,u=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((d=r.length)>s&&(d=s),d&&(r.head&&(x=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(a,a+d),x)),512&r.flags&&(r.check=F(r.check,n,d,a)),s-=d,a+=d,r.length-=d),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===s)break e;d=0;do{x=n[a+d++],r.head&&x&&r.length<65536&&(r.head.name+=String.fromCharCode(x))}while(x&&d<s);if(512&r.flags&&(r.check=F(r.check,n,d,a)),s-=d,a+=d,x)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===s)break e;d=0;do{x=n[a+d++],r.head&&x&&r.length<65536&&(r.head.comment+=String.fromCharCode(x))}while(x&&d<s);if(512&r.flags&&(r.check=F(r.check,n,d,a)),s-=d,a+=d,x)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;u<16;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}if(l!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}l=0,u=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;u<32;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}e.adler=r.check=ve(l),l=0,u=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=o,e.avail_out=f,e.next_in=a,e.avail_in=s,r.hold=l,r.bits=u,ue;e.adler=r.check=1,r.mode=12;case 12:if(t===oe||t===se)break e;case 13:if(r.last){l>>>=7&u,u-=7&u,r.mode=27;break}for(;u<3;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}switch(r.last=1&l,u-=1,3&(l>>>=1)){case 0:r.mode=14;break;case 1:if(Pe(r),r.mode=20,t===se){l>>>=2,u-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}l>>>=2,u-=2;break;case 14:for(l>>>=7&u,u-=7&u;u<32;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}if((65535&l)!=(l>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&l,l=0,u=0,r.mode=15,t===se)break e;case 15:r.mode=16;case 16:if(d=r.length){if(d>s&&(d=s),d>f&&(d=f),0===d)break e;i.set(n.subarray(a,a+d),o),s-=d,a+=d,f-=d,o+=d,r.length-=d;break}r.mode=12;break;case 17:for(;u<14;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}if(r.nlen=257+(31&l),l>>>=5,u-=5,r.ndist=1+(31&l),l>>>=5,u-=5,r.ncode=4+(15&l),l>>>=4,u-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;u<3;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}r.lens[S[r.have++]]=7&l,l>>>=3,u-=3}for(;r.have<19;)r.lens[S[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,A={bits:r.lenbits},_=ie(0,r.lens,0,19,r.lencode,0,r.work,A),r.lenbits=A.bits,_){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;y=(I=r.lencode[l&(1<<r.lenbits)-1])>>>16&255,w=65535&I,!((v=I>>>24)<=u);){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}if(w<16)l>>>=v,u-=v,r.lens[r.have++]=w;else{if(16===w){for(P=v+2;u<P;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}if(l>>>=v,u-=v,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}x=r.lens[r.have-1],d=3+(3&l),l>>>=2,u-=2}else if(17===w){for(P=v+3;u<P;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}u-=v,x=0,d=3+(7&(l>>>=v)),l>>>=3,u-=3}else{for(P=v+7;u<P;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}u-=v,x=0,d=11+(127&(l>>>=v)),l>>>=7,u-=7}if(r.have+d>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;d--;)r.lens[r.have++]=x}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,A={bits:r.lenbits},_=ie(1,r.lens,0,r.nlen,r.lencode,0,r.work,A),r.lenbits=A.bits,_){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,A={bits:r.distbits},_=ie(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,A),r.distbits=A.bits,_){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,t===se)break e;case 20:r.mode=21;case 21:if(s>=6&&f>=258){e.next_out=o,e.avail_out=f,e.next_in=a,e.avail_in=s,r.hold=l,r.bits=u,$(e,h),o=e.next_out,i=e.output,f=e.avail_out,a=e.next_in,n=e.input,s=e.avail_in,l=r.hold,u=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;y=(I=r.lencode[l&(1<<r.lenbits)-1])>>>16&255,w=65535&I,!((v=I>>>24)<=u);){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}if(y&&0==(240&y)){for(g=v,b=y,k=w;y=(I=r.lencode[k+((l&(1<<g+b)-1)>>g)])>>>16&255,w=65535&I,!(g+(v=I>>>24)<=u);){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}l>>>=g,u-=g,r.back+=g}if(l>>>=v,u-=v,r.back+=v,r.length=w,0===y){r.mode=26;break}if(32&y){r.back=-1,r.mode=12;break}if(64&y){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&y,r.mode=22;case 22:if(r.extra){for(P=r.extra;u<P;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}r.length+=l&(1<<r.extra)-1,l>>>=r.extra,u-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;y=(I=r.distcode[l&(1<<r.distbits)-1])>>>16&255,w=65535&I,!((v=I>>>24)<=u);){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}if(0==(240&y)){for(g=v,b=y,k=w;y=(I=r.distcode[k+((l&(1<<g+b)-1)>>g)])>>>16&255,w=65535&I,!(g+(v=I>>>24)<=u);){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}l>>>=g,u-=g,r.back+=g}if(l>>>=v,u-=v,r.back+=v,64&y){e.msg="invalid distance code",r.mode=30;break}r.offset=w,r.extra=15&y,r.mode=24;case 24:if(r.extra){for(P=r.extra;u<P;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}r.offset+=l&(1<<r.extra)-1,l>>>=r.extra,u-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===f)break e;if(d=h-f,r.offset>d){if((d=r.offset-d)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}d>r.wnext?(d-=r.wnext,p=r.wsize-d):p=r.wnext-d,d>r.length&&(d=r.length),m=r.window}else m=i,p=o-r.offset,d=r.length;d>f&&(d=f),f-=d,r.length-=d;do{i[o++]=m[p++]}while(--d);0===r.length&&(r.mode=21);break;case 26:if(0===f)break e;i[o++]=r.length,f--,r.mode=21;break;case 27:if(r.wrap){for(;u<32;){if(0===s)break e;s--,l|=n[a++]<<u,u+=8}if(h-=f,e.total_out+=h,r.total+=h,h&&(e.adler=r.check=r.flags?F(r.check,i,h,o-h):V(r.check,i,h,o-h)),h=f,(r.flags?l:ve(l))!==r.check){e.msg="incorrect data check",r.mode=30;break}l=0,u=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;u<32;){if(0===s)break e;s--,l+=n[a++]<<u,u+=8}if(l!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=30;break}l=0,u=0}r.mode=29;case 29:_=le;break e;case 30:_=he;break e;case 31:return de;default:return ce}return e.next_out=o,e.avail_out=f,e.next_in=a,e.avail_in=s,r.hold=l,r.bits=u,(r.wsize||h!==e.avail_out&&r.mode<30&&(r.mode<27||t!==ae))&&Ie(e,e.output,e.next_out,h-e.avail_out),c-=e.avail_in,h-=e.avail_out,e.total_in+=c,e.total_out+=h,r.total+=h,r.wrap&&h&&(e.adler=r.check=r.flags?F(r.check,i,h,e.next_out-h):V(r.check,i,h,e.next_out-h)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0===c&&0===h||t===ae)&&_===fe&&(_=pe),_},inflateEnd:function(e){if(!e||!e.state)return ce;var t=e.state;return t.window&&(t.window=null),e.state=null,fe},inflateGetHeader:function(e,t){if(!e||!e.state)return ce;var r=e.state;return 0==(2&r.wrap)?ce:(r.head=t,t.done=!1,fe)},inflateSetDictionary:function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?ce:11===r.mode&&V(1,t,n,0)!==r.check?he:Ie(e,t,n,n)?(r.mode=31,de):(r.havedict=1,fe):ce},inflateInfo:"pako inflate (from Nodeca project)"};var Se=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},Te=Object.prototype.toString,De=j.Z_NO_FLUSH,Ee=j.Z_FINISH,Be=j.Z_OK,Oe=j.Z_STREAM_END,Me=j.Z_NEED_DICT,Ce=j.Z_STREAM_ERROR,Le=j.Z_DATA_ERROR,Re=j.Z_MEM_ERROR;function Ve(e){this.options=Z({chunkSize:65536,windowBits:15,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Q,this.strm.avail_out=0;var r=Ue.inflateInit2(this.strm,t.windowBits);if(r!==Be)throw new Error(z[r]);if(this.header=new Se,Ue.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=W(t.dictionary):"[object ArrayBuffer]"===Te.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=Ue.inflateSetDictionary(this.strm,t.dictionary))!==Be))throw new Error(z[r])}function Ge(e,t){var r=new Ve(t);if(r.push(e),r.err)throw r.msg||z[r.err];return r.result}Ve.prototype.push=function(e,t){var r,n,i,a=this.strm,o=this.options.chunkSize,s=this.options.dictionary;if(this.ended)return!1;for(n=t===~~t?t:!0===t?Ee:De,"[object ArrayBuffer]"===Te.call(e)?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;;){for(0===a.avail_out&&(a.output=new Uint8Array(o),a.next_out=0,a.avail_out=o),(r=Ue.inflate(a,n))===Me&&s&&((r=Ue.inflateSetDictionary(a,s))===Be?r=Ue.inflate(a,n):r===Le&&(r=Me));a.avail_in>0&&r===Oe&&a.state.wrap>0&&0!==e[a.next_in];)Ue.inflateReset(a),r=Ue.inflate(a,n);switch(r){case Ce:case Le:case Me:case Re:return this.onEnd(r),this.ended=!0,!1}if(i=a.avail_out,a.next_out&&(0===a.avail_out||r===Oe))if("string"===this.options.to){var f=J(a.output,a.next_out),l=a.next_out-f,u=q(a.output,f);a.next_out=l,a.avail_out=o-l,l&&a.output.set(a.output.subarray(f,f+l),0),this.onData(u)}else this.onData(a.output.length===a.next_out?a.output:a.output.subarray(0,a.next_out));if(r!==Be||0!==i){if(r===Oe)return r=Ue.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,!0;if(0===a.avail_in)break}}return!0},Ve.prototype.onData=function(e){this.chunks.push(e)},Ve.prototype.onEnd=function(e){e===Be&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=K(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Fe={Inflate:Ve,inflate:Ge,inflateRaw:function(e,t){return(t=t||{}).raw=!0,Ge(e,t)},ungzip:Ge,constants:j}.inflate;function ze(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=v(e);if(t){var i=v(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return m(this,r)}}var je=function(e){p(r,b);var t=ze(r);function r(){return u(this,r),t.apply(this,arguments)}return h(r,[{key:"decodeBlock",value:function(e){return Fe(new Uint8Array(e)).buffer}}]),r}(),Ne=Object.freeze({__proto__:null,default:je});function Ze(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=v(e);if(t){var i=v(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return m(this,r)}}var Ke,He=function(e){p(r,b);var t=Ze(r);function r(){return u(this,r),t.apply(this,arguments)}return h(r,[{key:"decodeBlock",value:function(e){for(var t=new DataView(e),r=[],n=0;n<e.byteLength;++n){var i=t.getInt8(n);if(i<0){var a=t.getUint8(n+1);i=-i;for(var o=0;o<=i;++o)r.push(a);n+=1}else{for(var s=0;s<=i;++s)r.push(t.getUint8(n+s+1));n+=i+1}}return new Uint8Array(r).buffer}}]),r}(),Ye=Object.freeze({__proto__:null,default:He}),Xe={exports:{}};Ke=Xe,\n/* Copyright 2015-2021 Esri. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 @preserve */\nfunction(){var e,t,r,n,i,a,o,s,f,l,u,c,h,d,p,m,v=(e={defaultNoDataValue:-34027999387901484e22,decode:function(a,o){var s=(o=o||{}).encodedMaskData||null===o.encodedMaskData,f=i(a,o.inputOffset||0,s),l=null!==o.noDataValue?o.noDataValue:e.defaultNoDataValue,u=t(f,o.pixelType||Float32Array,o.encodedMaskData,l,o.returnMask),c={width:f.width,height:f.height,pixelData:u.resultPixels,minValue:u.minValue,maxValue:f.pixels.maxValue,noDataValue:l};return u.resultMask&&(c.maskData=u.resultMask),o.returnEncodedMask&&f.mask&&(c.encodedMaskData=f.mask.bitset?f.mask.bitset:null),o.returnFileInfo&&(c.fileInfo=r(f),o.computeUsedBitDepths&&(c.fileInfo.bitDepths=n(f))),c}},t=function(e,t,r,n,i){var o,s,f,l=0,u=e.pixels.numBlocksX,c=e.pixels.numBlocksY,h=Math.floor(e.width/u),d=Math.floor(e.height/c),p=2*e.maxZError,m=Number.MAX_VALUE;r=r||(e.mask?e.mask.bitset:null),s=new t(e.width*e.height),i&&r&&(f=new Uint8Array(e.width*e.height));for(var v,y,w=new Float32Array(h*d),g=0;g<=c;g++){var b=g!==c?d:e.height%c;if(0!==b)for(var k=0;k<=u;k++){var x=k!==u?h:e.width%u;if(0!==x){var _,A,P,I,U=g*e.width*d+k*h,S=e.width-x,T=e.pixels.blocks[l];if(T.encoding<2?(0===T.encoding?_=T.rawData:(a(T.stuffedData,T.bitsPerPixel,T.numValidPixels,T.offset,p,w,e.pixels.maxValue),_=w),A=0):P=2===T.encoding?0:T.offset,r)for(y=0;y<b;y++){for(7&U&&(I=r[U>>3],I<<=7&U),v=0;v<x;v++)7&U||(I=r[U>>3]),128&I?(f&&(f[U]=1),m=m>(o=T.encoding<2?_[A++]:P)?o:m,s[U++]=o):(f&&(f[U]=0),s[U++]=n),I<<=1;U+=S}else if(T.encoding<2)for(y=0;y<b;y++){for(v=0;v<x;v++)m=m>(o=_[A++])?o:m,s[U++]=o;U+=S}else for(m=m>P?P:m,y=0;y<b;y++){for(v=0;v<x;v++)s[U++]=P;U+=S}if(1===T.encoding&&A!==T.numValidPixels)throw"Block and Mask do not match";l++}}}return{resultPixels:s,resultMask:f,minValue:m}},r=function(e){return{fileIdentifierString:e.fileIdentifierString,fileVersion:e.fileVersion,imageType:e.imageType,height:e.height,width:e.width,maxZError:e.maxZError,eofOffset:e.eofOffset,mask:e.mask?{numBlocksX:e.mask.numBlocksX,numBlocksY:e.mask.numBlocksY,numBytes:e.mask.numBytes,maxValue:e.mask.maxValue}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,numBytes:e.pixels.numBytes,maxValue:e.pixels.maxValue,noDataValue:e.noDataValue}}},n=function(e){for(var t=e.pixels.numBlocksX*e.pixels.numBlocksY,r={},n=0;n<t;n++){var i=e.pixels.blocks[n];0===i.encoding?r.float32=!0:1===i.encoding?r[i.bitsPerPixel]=!0:r[0]=!0}return Object.keys(r)},i=function(e,t,r){var n={},i=new Uint8Array(e,t,10);if(n.fileIdentifierString=String.fromCharCode.apply(null,i),"CntZImage"!==n.fileIdentifierString.trim())throw"Unexpected file identifier string: "+n.fileIdentifierString;t+=10;var a=new DataView(e,t,24);if(n.fileVersion=a.getInt32(0,!0),n.imageType=a.getInt32(4,!0),n.height=a.getUint32(8,!0),n.width=a.getUint32(12,!0),n.maxZError=a.getFloat64(16,!0),t+=24,!r)if(a=new DataView(e,t,16),n.mask={},n.mask.numBlocksY=a.getUint32(0,!0),n.mask.numBlocksX=a.getUint32(4,!0),n.mask.numBytes=a.getUint32(8,!0),n.mask.maxValue=a.getFloat32(12,!0),t+=16,n.mask.numBytes>0){var o=new Uint8Array(Math.ceil(n.width*n.height/8)),s=(a=new DataView(e,t,n.mask.numBytes)).getInt16(0,!0),f=2,l=0;do{if(s>0)for(;s--;)o[l++]=a.getUint8(f++);else{var u=a.getUint8(f++);for(s=-s;s--;)o[l++]=u}s=a.getInt16(f,!0),f+=2}while(f<n.mask.numBytes);if(-32768!==s||l<o.length)throw"Unexpected end of mask RLE encoding";n.mask.bitset=o,t+=n.mask.numBytes}else 0==(n.mask.numBytes|n.mask.numBlocksY|n.mask.maxValue)&&(n.mask.bitset=new Uint8Array(Math.ceil(n.width*n.height/8)));a=new DataView(e,t,16),n.pixels={},n.pixels.numBlocksY=a.getUint32(0,!0),n.pixels.numBlocksX=a.getUint32(4,!0),n.pixels.numBytes=a.getUint32(8,!0),n.pixels.maxValue=a.getFloat32(12,!0),t+=16;var c=n.pixels.numBlocksX,h=n.pixels.numBlocksY,d=c+(n.width%c>0?1:0),p=h+(n.height%h>0?1:0);n.pixels.blocks=new Array(d*p);for(var m=0,v=0;v<p;v++)for(var y=0;y<d;y++){var w=0,g=e.byteLength-t;a=new DataView(e,t,Math.min(10,g));var b={};n.pixels.blocks[m++]=b;var k=a.getUint8(0);if(w++,b.encoding=63&k,b.encoding>3)throw"Invalid block encoding ("+b.encoding+")";if(2!==b.encoding){if(0!==k&&2!==k){if(k>>=6,b.offsetType=k,2===k)b.offset=a.getInt8(1),w++;else if(1===k)b.offset=a.getInt16(1,!0),w+=2;else{if(0!==k)throw"Invalid block offset type";b.offset=a.getFloat32(1,!0),w+=4}if(1===b.encoding)if(k=a.getUint8(w),w++,b.bitsPerPixel=63&k,k>>=6,b.numValidPixelsType=k,2===k)b.numValidPixels=a.getUint8(w),w++;else if(1===k)b.numValidPixels=a.getUint16(w,!0),w+=2;else{if(0!==k)throw"Invalid valid pixel count type";b.numValidPixels=a.getUint32(w,!0),w+=4}}var x;if(t+=w,3!==b.encoding)if(0===b.encoding){var _=(n.pixels.numBytes-1)/4;if(_!==Math.floor(_))throw"uncompressed block has invalid length";x=new ArrayBuffer(4*_),new Uint8Array(x).set(new Uint8Array(e,t,4*_));var A=new Float32Array(x);b.rawData=A,t+=4*_}else if(1===b.encoding){var P=Math.ceil(b.numValidPixels*b.bitsPerPixel/8),I=Math.ceil(P/4);x=new ArrayBuffer(4*I),new Uint8Array(x).set(new Uint8Array(e,t,P)),b.stuffedData=new Uint32Array(x),t+=P}}else t++}return n.eofOffset=t,n},a=function(e,t,r,n,i,a,o){var s,f,l,u=(1<<t)-1,c=0,h=0,d=Math.ceil((o-n)/i),p=4*e.length-Math.ceil(t*r/8);for(e[e.length-1]<<=8*p,s=0;s<r;s++){if(0===h&&(l=e[c++],h=32),h>=t)f=l>>>h-t&u,h-=t;else{var m=t-h;f=(l&u)<<m&u,f+=(l=e[c++])>>>(h=32-m)}a[s]=f<d?n+f*i:o}return a},e),y=(o=function(e,t,r,n,i,a,o,s){var f,l,u,c,h,d=(1<<r)-1,p=0,m=0,v=4*e.length-Math.ceil(r*n/8);if(e[e.length-1]<<=8*v,i)for(f=0;f<n;f++)0===m&&(u=e[p++],m=32),m>=r?(l=u>>>m-r&d,m-=r):(l=(u&d)<<(c=r-m)&d,l+=(u=e[p++])>>>(m=32-c)),t[f]=i[l];else for(h=Math.ceil((s-a)/o),f=0;f<n;f++)0===m&&(u=e[p++],m=32),m>=r?(l=u>>>m-r&d,m-=r):(l=(u&d)<<(c=r-m)&d,l+=(u=e[p++])>>>(m=32-c)),t[f]=l<h?a+l*o:s},s=function(e,t,r,n,i,a){var o,s=(1<<t)-1,f=0,l=0,u=0,c=0,h=0,d=[],p=4*e.length-Math.ceil(t*r/8);e[e.length-1]<<=8*p;var m=Math.ceil((a-n)/i);for(l=0;l<r;l++)0===c&&(o=e[f++],c=32),c>=t?(h=o>>>c-t&s,c-=t):(h=(o&s)<<(u=t-c)&s,h+=(o=e[f++])>>>(c=32-u)),d[l]=h<m?n+h*i:a;return d.unshift(n),d},f=function(e,t,r,n,i,a,o,s){var f,l,u,c,h=(1<<r)-1,d=0,p=0,m=0;if(i)for(f=0;f<n;f++)0===p&&(u=e[d++],p=32,m=0),p>=r?(l=u>>>m&h,p-=r,m+=r):(l=u>>>m&h,p=32-(c=r-p),l|=((u=e[d++])&(1<<c)-1)<<r-c,m=c),t[f]=i[l];else{var v=Math.ceil((s-a)/o);for(f=0;f<n;f++)0===p&&(u=e[d++],p=32,m=0),p>=r?(l=u>>>m&h,p-=r,m+=r):(l=u>>>m&h,p=32-(c=r-p),l|=((u=e[d++])&(1<<c)-1)<<r-c,m=c),t[f]=l<v?a+l*o:s}return t},l=function(e,t,r,n,i,a){var o,s=(1<<t)-1,f=0,l=0,u=0,c=0,h=0,d=0,p=[],m=Math.ceil((a-n)/i);for(l=0;l<r;l++)0===c&&(o=e[f++],c=32,d=0),c>=t?(h=o>>>d&s,c-=t,d+=t):(h=o>>>d&s,c=32-(u=t-c),h|=((o=e[f++])&(1<<u)-1)<<t-u,d=u),p[l]=h<m?n+h*i:a;return p.unshift(n),p},u=function(e,t,r,n){var i,a,o,s,f=(1<<r)-1,l=0,u=0,c=4*e.length-Math.ceil(r*n/8);for(e[e.length-1]<<=8*c,i=0;i<n;i++)0===u&&(o=e[l++],u=32),u>=r?(a=o>>>u-r&f,u-=r):(a=(o&f)<<(s=r-u)&f,a+=(o=e[l++])>>>(u=32-s)),t[i]=a;return t},c=function(e,t,r,n){var i,a,o,s,f=(1<<r)-1,l=0,u=0,c=0;for(i=0;i<n;i++)0===u&&(o=e[l++],u=32,c=0),u>=r?(a=o>>>c&f,u-=r,c+=r):(a=o>>>c&f,u=32-(s=r-u),a|=((o=e[l++])&(1<<s)-1)<<r-s,c=s),t[i]=a;return t},h={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(e){for(var t=65535,r=65535,n=e.length,i=Math.floor(n/2),a=0;i;){var o=i>=359?359:i;i-=o;do{t+=e[a++]<<8,r+=t+=e[a++]}while(--o);t=(65535&t)+(t>>>16),r=(65535&r)+(r>>>16)}return 1&n&&(r+=t+=e[a]<<8),((r=(65535&r)+(r>>>16))<<16|(t=(65535&t)+(t>>>16)))>>>0},readHeaderInfo:function(e,t){var r=t.ptr,n=new Uint8Array(e,r,6),i={};if(i.fileIdentifierString=String.fromCharCode.apply(null,n),0!==i.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+i.fileIdentifierString;r+=6;var a,o=new DataView(e,r,8),s=o.getInt32(0,!0);if(i.fileVersion=s,r+=4,s>=3&&(i.checksum=o.getUint32(4,!0),r+=4),o=new DataView(e,r,12),i.height=o.getUint32(0,!0),i.width=o.getUint32(4,!0),r+=8,s>=4?(i.numDims=o.getUint32(8,!0),r+=4):i.numDims=1,o=new DataView(e,r,40),i.numValidPixel=o.getUint32(0,!0),i.microBlockSize=o.getInt32(4,!0),i.blobSize=o.getInt32(8,!0),i.imageType=o.getInt32(12,!0),i.maxZError=o.getFloat64(16,!0),i.zMin=o.getFloat64(24,!0),i.zMax=o.getFloat64(32,!0),r+=40,t.headerInfo=i,t.ptr=r,s>=3&&(a=s>=4?52:48,this.computeChecksumFletcher32(new Uint8Array(e,r-a,i.blobSize-14))!==i.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(e,t){var r=t.headerInfo,n=this.getDataTypeArray(r.imageType),i=r.numDims*this.getDataTypeSize(r.imageType),a=this.readSubArray(e,t.ptr,n,i),o=this.readSubArray(e,t.ptr+i,n,i);t.ptr+=2*i;var s,f=!0;for(s=0;s<r.numDims;s++)if(a[s]!==o[s]){f=!1;break}return r.minValues=a,r.maxValues=o,f},readSubArray:function(e,t,r,n){var i;if(r===Uint8Array)i=new Uint8Array(e,t,n);else{var a=new ArrayBuffer(n);new Uint8Array(a).set(new Uint8Array(e,t,n)),i=new r(a)}return i},readMask:function(e,t){var r,n,i=t.ptr,a=t.headerInfo,o=a.width*a.height,s=a.numValidPixel,f=new DataView(e,i,4),l={};if(l.numBytes=f.getUint32(0,!0),i+=4,(0===s||o===s)&&0!==l.numBytes)throw"invalid mask";if(0===s)r=new Uint8Array(Math.ceil(o/8)),l.bitset=r,n=new Uint8Array(o),t.pixels.resultMask=n,i+=l.numBytes;else if(l.numBytes>0){r=new Uint8Array(Math.ceil(o/8));var u=(f=new DataView(e,i,l.numBytes)).getInt16(0,!0),c=2,h=0,d=0;do{if(u>0)for(;u--;)r[h++]=f.getUint8(c++);else for(d=f.getUint8(c++),u=-u;u--;)r[h++]=d;u=f.getInt16(c,!0),c+=2}while(c<l.numBytes);if(-32768!==u||h<r.length)throw"Unexpected end of mask RLE encoding";n=new Uint8Array(o);var p=0,m=0;for(m=0;m<o;m++)7&m?(p=r[m>>3],p<<=7&m):p=r[m>>3],128&p&&(n[m]=1);t.pixels.resultMask=n,l.bitset=r,i+=l.numBytes}return t.ptr=i,t.mask=l,!0},readDataOneSweep:function(e,t,r,n){var i,a=t.ptr,o=t.headerInfo,s=o.numDims,f=o.width*o.height,l=o.imageType,u=o.numValidPixel*h.getDataTypeSize(l)*s,c=t.pixels.resultMask;if(r===Uint8Array)i=new Uint8Array(e,a,u);else{var d=new ArrayBuffer(u);new Uint8Array(d).set(new Uint8Array(e,a,u)),i=new r(d)}if(i.length===f*s)t.pixels.resultPixels=n?h.swapDimensionOrder(i,f,s,r,!0):i;else{t.pixels.resultPixels=new r(f*s);var p=0,m=0,v=0,y=0;if(s>1){if(n){for(m=0;m<f;m++)if(c[m])for(y=m,v=0;v<s;v++,y+=f)t.pixels.resultPixels[y]=i[p++]}else for(m=0;m<f;m++)if(c[m])for(y=m*s,v=0;v<s;v++)t.pixels.resultPixels[y+v]=i[p++]}else for(m=0;m<f;m++)c[m]&&(t.pixels.resultPixels[m]=i[p++])}return a+=u,t.ptr=a,!0},readHuffmanTree:function(e,t){var r=this.HUFFMAN_LUT_BITS_MAX,n=new DataView(e,t.ptr,16);if(t.ptr+=16,n.getInt32(0,!0)<2)throw"unsupported Huffman version";var i=n.getInt32(4,!0),a=n.getInt32(8,!0),o=n.getInt32(12,!0);if(a>=o)return!1;var s=new Uint32Array(o-a);h.decodeBits(e,t,s);var f,l,u,c,p=[];for(f=a;f<o;f++)p[l=f-(f<i?0:i)]={first:s[f-a],second:null};var m=e.byteLength-t.ptr,v=Math.ceil(m/4),y=new ArrayBuffer(4*v);new Uint8Array(y).set(new Uint8Array(e,t.ptr,m));var w,g=new Uint32Array(y),b=0,k=0;for(w=g[0],f=a;f<o;f++)(c=p[l=f-(f<i?0:i)].first)>0&&(p[l].second=w<<b>>>32-c,32-b>=c?32===(b+=c)&&(b=0,w=g[++k]):(b+=c-32,w=g[++k],p[l].second|=w>>>32-b));var x=0,_=0,A=new d;for(f=0;f<p.length;f++)void 0!==p[f]&&(x=Math.max(x,p[f].first));_=x>=r?r:x;var P,I,U,S,T,D=[];for(f=a;f<o;f++)if((c=p[l=f-(f<i?0:i)].first)>0)if(P=[c,l],c<=_)for(I=p[l].second<<_-c,U=1<<_-c,u=0;u<U;u++)D[I|u]=P;else for(I=p[l].second,T=A,S=c-1;S>=0;S--)I>>>S&1?(T.right||(T.right=new d),T=T.right):(T.left||(T.left=new d),T=T.left),0!==S||T.val||(T.val=P[1]);return{decodeLut:D,numBitsLUTQick:_,numBitsLUT:x,tree:A,stuffedData:g,srcPtr:k,bitPos:b}},readHuffman:function(e,t,r,n){var i,a,o,s,f,l,u,c,d,p=t.headerInfo.numDims,m=t.headerInfo.height,v=t.headerInfo.width,y=v*m,w=this.readHuffmanTree(e,t),g=w.decodeLut,b=w.tree,k=w.stuffedData,x=w.srcPtr,_=w.bitPos,A=w.numBitsLUTQick,P=w.numBitsLUT,I=0===t.headerInfo.imageType?128:0,U=t.pixels.resultMask,S=0;_>0&&(x++,_=0);var T,D=k[x],E=1===t.encodeMode,B=new r(y*p),O=B;if(p<2||E){for(T=0;T<p;T++)if(p>1&&(O=new r(B.buffer,y*T,y),S=0),t.headerInfo.numValidPixel===v*m)for(c=0,l=0;l<m;l++)for(u=0;u<v;u++,c++){if(a=0,f=s=D<<_>>>32-A,32-_<A&&(f=s|=k[x+1]>>>64-_-A),g[f])a=g[f][1],_+=g[f][0];else for(f=s=D<<_>>>32-P,32-_<P&&(f=s|=k[x+1]>>>64-_-P),i=b,d=0;d<P;d++)if(!(i=s>>>P-d-1&1?i.right:i.left).left&&!i.right){a=i.val,_=_+d+1;break}_>=32&&(_-=32,D=k[++x]),o=a-I,E?(o+=u>0?S:l>0?O[c-v]:S,o&=255,O[c]=o,S=o):O[c]=o}else for(c=0,l=0;l<m;l++)for(u=0;u<v;u++,c++)if(U[c]){if(a=0,f=s=D<<_>>>32-A,32-_<A&&(f=s|=k[x+1]>>>64-_-A),g[f])a=g[f][1],_+=g[f][0];else for(f=s=D<<_>>>32-P,32-_<P&&(f=s|=k[x+1]>>>64-_-P),i=b,d=0;d<P;d++)if(!(i=s>>>P-d-1&1?i.right:i.left).left&&!i.right){a=i.val,_=_+d+1;break}_>=32&&(_-=32,D=k[++x]),o=a-I,E?(u>0&&U[c-1]?o+=S:l>0&&U[c-v]?o+=O[c-v]:o+=S,o&=255,O[c]=o,S=o):O[c]=o}}else for(c=0,l=0;l<m;l++)for(u=0;u<v;u++)if(c=l*v+u,!U||U[c])for(T=0;T<p;T++,c+=y){if(a=0,f=s=D<<_>>>32-A,32-_<A&&(f=s|=k[x+1]>>>64-_-A),g[f])a=g[f][1],_+=g[f][0];else for(f=s=D<<_>>>32-P,32-_<P&&(f=s|=k[x+1]>>>64-_-P),i=b,d=0;d<P;d++)if(!(i=s>>>P-d-1&1?i.right:i.left).left&&!i.right){a=i.val,_=_+d+1;break}_>=32&&(_-=32,D=k[++x]),o=a-I,O[c]=o}t.ptr=t.ptr+4*(x+1)+(_>0?4:0),t.pixels.resultPixels=B,p>1&&!n&&(t.pixels.resultPixels=h.swapDimensionOrder(B,y,p,r))},decodeBits:function(e,t,r,n,i){var a=t.headerInfo,h=a.fileVersion,d=0,p=e.byteLength-t.ptr>=5?5:e.byteLength-t.ptr,m=new DataView(e,t.ptr,p),v=m.getUint8(0);d++;var y=v>>6,w=0===y?4:3-y,g=(32&v)>0,b=31&v,k=0;if(1===w)k=m.getUint8(d),d++;else if(2===w)k=m.getUint16(d,!0),d+=2;else{if(4!==w)throw"Invalid valid pixel count type";k=m.getUint32(d,!0),d+=4}var x,_,A,P,I,U,S,T,D,E=2*a.maxZError,B=a.numDims>1?a.maxValues[i]:a.zMax;if(g){for(t.counter.lut++,T=m.getUint8(d),d++,P=Math.ceil((T-1)*b/8),I=Math.ceil(P/4),_=new ArrayBuffer(4*I),A=new Uint8Array(_),t.ptr+=d,A.set(new Uint8Array(e,t.ptr,P)),S=new Uint32Array(_),t.ptr+=P,D=0;T-1>>>D;)D++;P=Math.ceil(k*D/8),I=Math.ceil(P/4),_=new ArrayBuffer(4*I),(A=new Uint8Array(_)).set(new Uint8Array(e,t.ptr,P)),x=new Uint32Array(_),t.ptr+=P,U=h>=3?l(S,b,T-1,n,E,B):s(S,b,T-1,n,E,B),h>=3?f(x,r,D,k,U):o(x,r,D,k,U)}else t.counter.bitstuffer++,D=b,t.ptr+=d,D>0&&(P=Math.ceil(k*D/8),I=Math.ceil(P/4),_=new ArrayBuffer(4*I),(A=new Uint8Array(_)).set(new Uint8Array(e,t.ptr,P)),x=new Uint32Array(_),t.ptr+=P,h>=3?null==n?c(x,r,D,k):f(x,r,D,k,!1,n,E,B):null==n?u(x,r,D,k):o(x,r,D,k,!1,n,E,B))},readTiles:function(e,t,r,n){var i=t.headerInfo,a=i.width,o=i.height,s=a*o,f=i.microBlockSize,l=i.imageType,u=h.getDataTypeSize(l),c=Math.ceil(a/f),d=Math.ceil(o/f);t.pixels.numBlocksY=d,t.pixels.numBlocksX=c,t.pixels.ptr=0;var p,m,v,y,w,g,b,k,x,_,A=0,P=0,I=0,U=0,S=0,T=0,D=0,E=0,B=0,O=0,M=0,C=0,L=0,R=0,V=0,G=new r(f*f),F=o%f||f,z=a%f||f,j=i.numDims,N=t.pixels.resultMask,Z=t.pixels.resultPixels,K=i.fileVersion>=5?14:15,H=i.zMax;for(I=0;I<d;I++)for(S=I!==d-1?f:F,U=0;U<c;U++)for(O=I*a*f+U*f,M=a-(T=U!==c-1?f:z),k=0;k<j;k++){if(j>1?(_=Z,O=I*a*f+U*f,Z=new r(t.pixels.resultPixels.buffer,s*k*u,s),H=i.maxValues[k]):_=null,D=e.byteLength-t.ptr,m={},V=0,E=(p=new DataView(e,t.ptr,Math.min(10,D))).getUint8(0),V++,x=i.fileVersion>=5?4&E:0,B=E>>6&255,(E>>2&K)!=(U*f>>3&K))throw"integrity issue";if(x&&0===k)throw"integrity issue";if((w=3&E)>3)throw t.ptr+=V,"Invalid block encoding ("+w+")";if(2!==w)if(0===w){if(x)throw"integrity issue";if(t.counter.uncompressed++,t.ptr+=V,C=(C=S*T*u)<(L=e.byteLength-t.ptr)?C:L,v=new ArrayBuffer(C%u==0?C:C+u-C%u),new Uint8Array(v).set(new Uint8Array(e,t.ptr,C)),y=new r(v),R=0,N)for(A=0;A<S;A++){for(P=0;P<T;P++)N[O]&&(Z[O]=y[R++]),O++;O+=M}else for(A=0;A<S;A++){for(P=0;P<T;P++)Z[O++]=y[R++];O+=M}t.ptr+=R*u}else if(g=h.getDataTypeUsed(x&&l<6?4:l,B),b=h.getOnePixel(m,V,g,p),V+=h.getDataTypeSize(g),3===w)if(t.ptr+=V,t.counter.constantoffset++,N)for(A=0;A<S;A++){for(P=0;P<T;P++)N[O]&&(Z[O]=x?Math.min(H,_[O]+b):b),O++;O+=M}else for(A=0;A<S;A++){for(P=0;P<T;P++)Z[O]=x?Math.min(H,_[O]+b):b,O++;O+=M}else if(t.ptr+=V,h.decodeBits(e,t,G,b,k),V=0,x)if(N)for(A=0;A<S;A++){for(P=0;P<T;P++)N[O]&&(Z[O]=G[V++]+_[O]),O++;O+=M}else for(A=0;A<S;A++){for(P=0;P<T;P++)Z[O]=G[V++]+_[O],O++;O+=M}else if(N)for(A=0;A<S;A++){for(P=0;P<T;P++)N[O]&&(Z[O]=G[V++]),O++;O+=M}else for(A=0;A<S;A++){for(P=0;P<T;P++)Z[O++]=G[V++];O+=M}else{if(x)if(N)for(A=0;A<S;A++)for(P=0;P<T;P++)N[O]&&(Z[O]=_[O]),O++;else for(A=0;A<S;A++)for(P=0;P<T;P++)Z[O]=_[O],O++;t.counter.constant++,t.ptr+=V}}j>1&&!n&&(t.pixels.resultPixels=h.swapDimensionOrder(t.pixels.resultPixels,s,j,r))},formatFileInfo:function(e){return{fileIdentifierString:e.headerInfo.fileIdentifierString,fileVersion:e.headerInfo.fileVersion,imageType:e.headerInfo.imageType,height:e.headerInfo.height,width:e.headerInfo.width,numValidPixel:e.headerInfo.numValidPixel,microBlockSize:e.headerInfo.microBlockSize,blobSize:e.headerInfo.blobSize,maxZError:e.headerInfo.maxZError,pixelType:h.getPixelType(e.headerInfo.imageType),eofOffset:e.eofOffset,mask:e.mask?{numBytes:e.mask.numBytes}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,maxValue:e.headerInfo.zMax,minValue:e.headerInfo.zMin,noDataValue:e.noDataValue}}},constructConstantSurface:function(e,t){var r=e.headerInfo.zMax,n=e.headerInfo.zMin,i=e.headerInfo.maxValues,a=e.headerInfo.numDims,o=e.headerInfo.height*e.headerInfo.width,s=0,f=0,l=0,u=e.pixels.resultMask,c=e.pixels.resultPixels;if(u)if(a>1){if(t)for(s=0;s<a;s++)for(l=s*o,r=i[s],f=0;f<o;f++)u[f]&&(c[l+f]=r);else for(f=0;f<o;f++)if(u[f])for(l=f*a,s=0;s<a;s++)c[l+a]=i[s]}else for(f=0;f<o;f++)u[f]&&(c[f]=r);else if(a>1&&n!==r)if(t)for(s=0;s<a;s++)for(l=s*o,r=i[s],f=0;f<o;f++)c[l+f]=r;else for(f=0;f<o;f++)for(l=f*a,s=0;s<a;s++)c[l+s]=i[s];else for(f=0;f<o*a;f++)c[f]=r},getDataTypeArray:function(e){var t;switch(e){case 0:t=Int8Array;break;case 1:t=Uint8Array;break;case 2:t=Int16Array;break;case 3:t=Uint16Array;break;case 4:t=Int32Array;break;case 5:t=Uint32Array;break;case 6:default:t=Float32Array;break;case 7:t=Float64Array}return t},getPixelType:function(e){var t;switch(e){case 0:t="S8";break;case 1:t="U8";break;case 2:t="S16";break;case 3:t="U16";break;case 4:t="S32";break;case 5:t="U32";break;case 6:default:t="F32";break;case 7:t="F64"}return t},isValidPixelValue:function(e,t){if(null==t)return!1;var r;switch(e){case 0:r=t>=-128&&t<=127;break;case 1:r=t>=0&&t<=255;break;case 2:r=t>=-32768&&t<=32767;break;case 3:r=t>=0&&t<=65536;break;case 4:r=t>=-2147483648&&t<=2147483647;break;case 5:r=t>=0&&t<=4294967296;break;case 6:r=t>=-34027999387901484e22&&t<=34027999387901484e22;break;case 7:r=t>=-17976931348623157e292&&t<=17976931348623157e292;break;default:r=!1}return r},getDataTypeSize:function(e){var t=0;switch(e){case 0:case 1:t=1;break;case 2:case 3:t=2;break;case 4:case 5:case 6:t=4;break;case 7:t=8;break;default:t=e}return t},getDataTypeUsed:function(e,t){var r=e;switch(e){case 2:case 4:r=e-t;break;case 3:case 5:r=e-2*t;break;case 6:r=0===t?e:1===t?2:1;break;case 7:r=0===t?e:e-2*t+1;break;default:r=e}return r},getOnePixel:function(e,t,r,n){var i=0;switch(r){case 0:i=n.getInt8(t);break;case 1:i=n.getUint8(t);break;case 2:i=n.getInt16(t,!0);break;case 3:i=n.getUint16(t,!0);break;case 4:i=n.getInt32(t,!0);break;case 5:i=n.getUInt32(t,!0);break;case 6:i=n.getFloat32(t,!0);break;case 7:i=n.getFloat64(t,!0);break;default:throw"the decoder does not understand this pixel type"}return i},swapDimensionOrder:function(e,t,r,n,i){var a=0,o=0,s=0,f=0,l=e;if(r>1)if(l=new n(t*r),i)for(a=0;a<t;a++)for(f=a,s=0;s<r;s++,f+=t)l[f]=e[o++];else for(a=0;a<t;a++)for(f=a,s=0;s<r;s++,f+=t)l[o++]=e[f];return l}},d=function(e,t,r){this.val=e,this.left=t,this.right=r},{decode:function(e,t){var r=(t=t||{}).noDataValue,n=0,i={};i.ptr=t.inputOffset||0,i.pixels={},h.readHeaderInfo(e,i);var a=i.headerInfo,o=a.fileVersion,s=h.getDataTypeArray(a.imageType);if(o>5)throw"unsupported lerc version 2."+o;h.readMask(e,i),a.numValidPixel===a.width*a.height||i.pixels.resultMask||(i.pixels.resultMask=t.maskData);var f=a.width*a.height;i.pixels.resultPixels=new s(f*a.numDims),i.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0};var l,u=!t.returnPixelInterleavedDims;if(0!==a.numValidPixel)if(a.zMax===a.zMin)h.constructConstantSurface(i,u);else if(o>=4&&h.checkMinMaxRanges(e,i))h.constructConstantSurface(i,u);else{var c=new DataView(e,i.ptr,2),d=c.getUint8(0);if(i.ptr++,d)h.readDataOneSweep(e,i,s,u);else if(o>1&&a.imageType<=1&&Math.abs(a.maxZError-.5)<1e-5){var p=c.getUint8(1);if(i.ptr++,i.encodeMode=p,p>2||o<4&&p>1)throw"Invalid Huffman flag "+p;p?h.readHuffman(e,i,s,u):h.readTiles(e,i,s,u)}else h.readTiles(e,i,s,u)}i.eofOffset=i.ptr,t.inputOffset?(l=i.headerInfo.blobSize+t.inputOffset-i.ptr,Math.abs(l)>=1&&(i.eofOffset=t.inputOffset+i.headerInfo.blobSize)):(l=i.headerInfo.blobSize-i.ptr,Math.abs(l)>=1&&(i.eofOffset=i.headerInfo.blobSize));var m={width:a.width,height:a.height,pixelData:i.pixels.resultPixels,minValue:a.zMin,maxValue:a.zMax,validPixelCount:a.numValidPixel,dimCount:a.numDims,dimStats:{minValues:a.minValues,maxValues:a.maxValues},maskData:i.pixels.resultMask};if(i.pixels.resultMask&&h.isValidPixelValue(a.imageType,r)){var v=i.pixels.resultMask;for(n=0;n<f;n++)v[n]||(m.pixelData[n]=r);m.noDataValue=r}return i.noDataValue=r,t.returnFileInfo&&(m.fileInfo=h.formatFileInfo(i)),m},getBandCount:function(e){for(var t=0,r=0,n={ptr:0,pixels:{}};r<e.byteLength-58;)h.readHeaderInfo(e,n),r+=n.headerInfo.blobSize,t++,n.ptr=r;return t}}),w=(p=new ArrayBuffer(4),m=new Uint8Array(p),new Uint32Array(p)[0]=1,1===m[0]),g={decode:function(e,t){if(!w)throw"Big endian system is not supported.";var r,n,i=(t=t||{}).inputOffset||0,a=new Uint8Array(e,i,10),o=String.fromCharCode.apply(null,a);if("CntZImage"===o.trim())r=v,n=1;else{if("Lerc2"!==o.substring(0,5))throw"Unexpected file identifier string: "+o;r=y,n=2}for(var s,f,l,u,c,h,d=0,p=e.byteLength-10,m=[],g={width:0,height:0,pixels:[],pixelType:t.pixelType,mask:null,statistics:[]},b=0;i<p;){var k=r.decode(e,{inputOffset:i,encodedMaskData:s,maskData:l,returnMask:0===d,returnEncodedMask:0===d,returnFileInfo:!0,returnPixelInterleavedDims:t.returnPixelInterleavedDims,pixelType:t.pixelType||null,noDataValue:t.noDataValue||null});i=k.fileInfo.eofOffset,l=k.maskData,0===d&&(s=k.encodedMaskData,g.width=k.width,g.height=k.height,g.dimCount=k.dimCount||1,g.pixelType=k.pixelType||k.fileInfo.pixelType,g.mask=l),n>1&&(l&&m.push(l),k.fileInfo.mask&&k.fileInfo.mask.numBytes>0&&b++),d++,g.pixels.push(k.pixelData),g.statistics.push({minValue:k.minValue,maxValue:k.maxValue,noDataValue:k.noDataValue,dimStats:k.dimStats})}if(n>1&&b>1){for(h=g.width*g.height,g.bandMasks=m,(l=new Uint8Array(h)).set(m[0]),u=1;u<m.length;u++)for(f=m[u],c=0;c<h;c++)l[c]=l[c]&f[c];g.maskData=l}return g}};Ke.exports?Ke.exports=g:this.Lerc=g}();var We=Xe.exports,qe={315:"Artist",258:"BitsPerSample",265:"CellLength",264:"CellWidth",320:"ColorMap",259:"Compression",33432:"Copyright",306:"DateTime",338:"ExtraSamples",266:"FillOrder",289:"FreeByteCounts",288:"FreeOffsets",291:"GrayResponseCurve",290:"GrayResponseUnit",316:"HostComputer",270:"ImageDescription",257:"ImageLength",256:"ImageWidth",271:"Make",281:"MaxSampleValue",280:"MinSampleValue",272:"Model",254:"NewSubfileType",274:"Orientation",262:"PhotometricInterpretation",284:"PlanarConfiguration",296:"ResolutionUnit",278:"RowsPerStrip",277:"SamplesPerPixel",305:"Software",279:"StripByteCounts",273:"StripOffsets",255:"SubfileType",263:"Threshholding",282:"XResolution",283:"YResolution",326:"BadFaxLines",327:"CleanFaxData",343:"ClipPath",328:"ConsecutiveBadFaxLines",433:"Decode",434:"DefaultImageColor",269:"DocumentName",336:"DotRange",321:"HalftoneHints",346:"Indexed",347:"JPEGTables",285:"PageName",297:"PageNumber",317:"Predictor",319:"PrimaryChromaticities",532:"ReferenceBlackWhite",339:"SampleFormat",340:"SMinSampleValue",341:"SMaxSampleValue",559:"StripRowCounts",330:"SubIFDs",292:"T4Options",293:"T6Options",325:"TileByteCounts",323:"TileLength",324:"TileOffsets",322:"TileWidth",301:"TransferFunction",318:"WhitePoint",344:"XClipPathUnits",286:"XPosition",529:"YCbCrCoefficients",531:"YCbCrPositioning",530:"YCbCrSubSampling",345:"YClipPathUnits",287:"YPosition",37378:"ApertureValue",40961:"ColorSpace",36868:"DateTimeDigitized",36867:"DateTimeOriginal",34665:"Exif IFD",36864:"ExifVersion",33434:"ExposureTime",41728:"FileSource",37385:"Flash",40960:"FlashpixVersion",33437:"FNumber",42016:"ImageUniqueID",37384:"LightSource",37500:"MakerNote",37377:"ShutterSpeedValue",37510:"UserComment",33723:"IPTC",34675:"ICC Profile",700:"XMP",42112:"GDAL_METADATA",42113:"GDAL_NODATA",34377:"Photoshop",33550:"ModelPixelScale",33922:"ModelTiepoint",34264:"ModelTransformation",34735:"GeoKeyDirectory",34736:"GeoDoubleParams",34737:"GeoAsciiParams",50674:"LercParameters"},Je={};for(var Qe in qe)qe.hasOwnProperty(Qe)&&(Je[qe[Qe]]=parseInt(Qe,10));Je.BitsPerSample,Je.ExtraSamples,Je.SampleFormat,Je.StripByteCounts,Je.StripOffsets,Je.StripRowCounts,Je.TileByteCounts,Je.TileOffsets,Je.SubIFDs;var $e={1:"BYTE",2:"ASCII",3:"SHORT",4:"LONG",5:"RATIONAL",6:"SBYTE",7:"UNDEFINED",8:"SSHORT",9:"SLONG",10:"SRATIONAL",11:"FLOAT",12:"DOUBLE",13:"IFD",16:"LONG8",17:"SLONG8",18:"IFD8"},et={};for(var tt in $e)$e.hasOwnProperty(tt)&&(et[$e[tt]]=parseInt(tt,10));var rt=1,nt=0,it=1,at={1024:"GTModelTypeGeoKey",1025:"GTRasterTypeGeoKey",1026:"GTCitationGeoKey",2048:"GeographicTypeGeoKey",2049:"GeogCitationGeoKey",2050:"GeogGeodeticDatumGeoKey",2051:"GeogPrimeMeridianGeoKey",2052:"GeogLinearUnitsGeoKey",2053:"GeogLinearUnitSizeGeoKey",2054:"GeogAngularUnitsGeoKey",2055:"GeogAngularUnitSizeGeoKey",2056:"GeogEllipsoidGeoKey",2057:"GeogSemiMajorAxisGeoKey",2058:"GeogSemiMinorAxisGeoKey",2059:"GeogInvFlatteningGeoKey",2060:"GeogAzimuthUnitsGeoKey",2061:"GeogPrimeMeridianLongGeoKey",2062:"GeogTOWGS84GeoKey",3072:"ProjectedCSTypeGeoKey",3073:"PCSCitationGeoKey",3074:"ProjectionGeoKey",3075:"ProjCoordTransGeoKey",3076:"ProjLinearUnitsGeoKey",3077:"ProjLinearUnitSizeGeoKey",3078:"ProjStdParallel1GeoKey",3079:"ProjStdParallel2GeoKey",3080:"ProjNatOriginLongGeoKey",3081:"ProjNatOriginLatGeoKey",3082:"ProjFalseEastingGeoKey",3083:"ProjFalseNorthingGeoKey",3084:"ProjFalseOriginLongGeoKey",3085:"ProjFalseOriginLatGeoKey",3086:"ProjFalseOriginEastingGeoKey",3087:"ProjFalseOriginNorthingGeoKey",3088:"ProjCenterLongGeoKey",3089:"ProjCenterLatGeoKey",3090:"ProjCenterEastingGeoKey",3091:"ProjCenterNorthingGeoKey",3092:"ProjScaleAtNatOriginGeoKey",3093:"ProjScaleAtCenterGeoKey",3094:"ProjAzimuthAngleGeoKey",3095:"ProjStraightVertPoleLongGeoKey",3096:"ProjRectifiedGridAngleGeoKey",4096:"VerticalCSTypeGeoKey",4097:"VerticalCitationGeoKey",4098:"VerticalDatumGeoKey",4099:"VerticalUnitsGeoKey"},ot={};for(var st in at)at.hasOwnProperty(st)&&(ot[at[st]]=parseInt(st,10));function ft(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=v(e);if(t){var i=v(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return m(this,r)}}var lt=function(e){p(r,b);var t=ft(r);function r(e){var n;return u(this,r),(n=t.call(this)).planarConfiguration=void 0!==e.PlanarConfiguration?e.PlanarConfiguration:1,n.samplesPerPixel=void 0!==e.SamplesPerPixel?e.SamplesPerPixel:1,n.addCompression=e.LercParameters[rt],n}return h(r,[{key:"decodeBlock",value:function(e){switch(this.addCompression){case nt:break;case it:e=Fe(new Uint8Array(e)).buffer;break;default:throw new Error("Unsupported LERC additional compression method identifier: ".concat(this.addCompression))}return We.decode(e,{returnPixelInterleavedDims:1===this.planarConfiguration}).pixels[0].buffer}}]),r}(),ut=Object.freeze({__proto__:null,default:lt});function ct(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=v(e);if(t){var i=v(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return m(this,r)}}var ht=function(e){p(a,b);var r,n=ct(a);function a(){var e;if(u(this,a),e=n.call(this),"undefined"==typeof createImageBitmap)throw new Error("Cannot decode WebImage as `createImageBitmap` is not available");if("undefined"==typeof document&&"undefined"==typeof OffscreenCanvas)throw new Error("Cannot decode WebImage as neither `document` nor `OffscreenCanvas` is not available");return e}return h(a,[{key:"decode",value:(r=t(i.mark((function e(t,r){var n,a,o,s;return i.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new Blob([r]),e.next=3,createImageBitmap(n);case 3:return a=e.sent,"undefined"!=typeof document?((o=document.createElement("canvas")).width=a.width,o.height=a.height):o=new OffscreenCanvas(a.width,a.height),(s=o.getContext("2d")).drawImage(a,0,0),e.abrupt("return",s.getImageData(0,0,a.width,a.height).data.buffer);case 8:case"end":return e.stop()}}),e)}))),function(e,t){return r.apply(this,arguments)})}]),a}(),dt=Object.freeze({__proto__:null,default:ht});';return new mit("undefined"==typeof Blob?"data:application/javascript;base64,"+Buffer.from(t,"binary").toString("base64"):URL.createObjectURL(new Blob([t],{type:"application/javascript"})))}},Symbol.toStringTag,{value:"Module"}));